Beispiel #1
0
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();
}
Beispiel #2
0
void osd_wait_for_debugger(const device_config *device, int firststop)
{
	// create a console window
	if(!dmain) 
	{
		// GTK init should probably be done earlier
		gtk_init(0, 0);
		debugmain_init(device->machine);
	}

	// update the views in the console to reflect the current CPU
	debugmain_set_cpu(device);

	debugwin_show(1);
	gtk_main_iteration();
}