void sdl_osd_interface::wait_for_debugger(device_t &device, bool firststop) { win_i *dmain = get_first_win_i(WIN_TYPE_MAIN); // Create a console window if one doesn't already exist if(!dmain) { // GTK init should probably be done earlier gtk_init(0, 0); debugmain_init(machine()); // Resize the main window for (int i = 0; i < windowStateCount; i++) { if (windowStateArray[i].type == WIN_TYPE_MAIN) { gtk_window_move(GTK_WINDOW(win_list->win), windowStateArray[i].positionX, windowStateArray[i].positionY); gtk_window_resize(GTK_WINDOW(win_list->win), windowStateArray[i].sizeX, windowStateArray[i].sizeY); } } // Respawn and reposition every other window for (int i = 0; i < windowStateCount; i++) { if (!windowStateArray[i].type || windowStateArray[i].type == WIN_TYPE_MAIN) continue; switch (windowStateArray[i].type) { case WIN_TYPE_MEMORY: memorywin_new(machine()); break; case WIN_TYPE_DISASM: disasmwin_new(machine()); break; case WIN_TYPE_LOG: logwin_new(machine()); break; default: break; } gtk_window_move(GTK_WINDOW(win_list->win), windowStateArray[i].positionX, windowStateArray[i].positionY); gtk_window_resize(GTK_WINDOW(win_list->win), windowStateArray[i].sizeX, windowStateArray[i].sizeY); } // Bring focus back to the main window gtk_window_present(GTK_WINDOW(get_first_win_i(WIN_TYPE_MAIN)->win)); } // update the views in the console to reflect the current CPU debugmain_set_cpu(&device); debugwin_show(1); gtk_main_iteration(); }
void on_new_errorlog_activate(GtkWidget *win) { logwin_new(*get_running_machine(win)); }
void on_new_errorlog_activate(GtkMenuItem *item, gpointer user_data) { logwin_new((running_machine *)user_data); }