trunk/src/osd/windows/debugwin.c
r23298 | r23299 | |
393 | 393 | // debugwin_init_windows |
394 | 394 | //============================================================ |
395 | 395 | |
396 | | void debugwin_init_windows(running_machine &machine) |
| 396 | void windows_osd_interface::init_debugger() |
397 | 397 | { |
398 | 398 | static int class_registered; |
399 | 399 | |
r23298 | r23299 | |
439 | 439 | |
440 | 440 | if (temp_dc != NULL) |
441 | 441 | { |
442 | | windows_options &options = downcast<windows_options &>(machine.options()); |
| 442 | windows_options &options = downcast<windows_options &>(machine().options()); |
443 | 443 | int size = options.debugger_font_size(); |
444 | 444 | TCHAR *t_face; |
445 | 445 | |
r23298 | r23299 | |
469 | 469 | // get other metrics |
470 | 470 | hscroll_height = GetSystemMetrics(SM_CYHSCROLL); |
471 | 471 | vscroll_width = GetSystemMetrics(SM_CXVSCROLL); |
| 472 | |
| 473 | // ensure we get called on the way out |
| 474 | machine().add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(debugwin_destroy_windows), &machine())); |
472 | 475 | } |
473 | 476 | |
474 | 477 | |
r23298 | r23299 | |
477 | 480 | // debugwin_destroy_windows |
478 | 481 | //============================================================ |
479 | 482 | |
480 | | void debugwin_destroy_windows(void) |
| 483 | void debugwin_destroy_windows(running_machine &machine) |
481 | 484 | { |
482 | 485 | // loop over windows and free them |
483 | 486 | while (window_list != NULL) |
r23298 | r23299 | |
493 | 496 | |
494 | 497 | |
495 | 498 | //============================================================ |
496 | | // debugwin_show |
497 | | //============================================================ |
498 | | |
499 | | void debugwin_show(int type) |
500 | | { |
501 | | debugwin_info *info; |
502 | | |
503 | | // loop over windows and show/hide them |
504 | | for (info = window_list; info != NULL; info = info->next) |
505 | | ShowWindow(info->wnd, type); |
506 | | } |
507 | | |
508 | | |
509 | | |
510 | | //============================================================ |
511 | 499 | // debugwin_update_during_game |
512 | 500 | //============================================================ |
513 | 501 | |
trunk/src/osd/windows/windows.mak
r23298 | r23299 | |
77 | 77 | WINOBJ = $(OBJ)/osd/$(OSD) |
78 | 78 | |
79 | 79 | OBJDIRS += $(WINOBJ) |
| 80 | ifdef USE_QTDEBUG |
| 81 | OBJDIRS += $(WINOBJ)/../sdl |
| 82 | endif |
80 | 83 | |
81 | 84 | |
82 | 85 | |
r23298 | r23299 | |
329 | 332 | $(WINOBJ)/drawgdi.o : $(SRC)/emu/rendersw.c |
330 | 333 | $(WINOBJ)/winmidi.o: $(SRC)/osd/portmedia/pmmidi.c |
331 | 334 | |
| 335 | ifndef USE_QTDEBUG |
332 | 336 | # add debug-specific files |
333 | 337 | OSDOBJS += \ |
334 | 338 | $(WINOBJ)/debugwin.o |
| 339 | endif |
335 | 340 | |
336 | 341 | # add a stub resource file |
337 | 342 | RESFILE = $(WINOBJ)/mame.res |
338 | 343 | |
| 344 | #------------------------------------------------- |
| 345 | # QT Debug library |
| 346 | #------------------------------------------------- |
| 347 | ifdef USE_QTDEBUG |
| 348 | QTPATH := $(dir $(shell where gcc.exe))../Qt |
| 349 | LIBS += -L$(QTPATH)/lib -lqtmain -lQtGui4 -lQtCore4 |
| 350 | INCPATH += -I$(QTPATH)/include/QtCore -I$(QTPATH)/include/QtGui -I$(QTPATH)/include |
| 351 | SDLOBJ := $(WINOBJ)/../sdl |
| 352 | SDLSRC := $(WINSRC)/../sdl |
339 | 353 | |
| 354 | MOC = @$(QTPATH)/bin/moc |
| 355 | $(SDLOBJ)/%.moc.c: $(SDLSRC)/%.h |
| 356 | $(MOC) $(INCPATH) $(DEFS) $< -o $@ |
340 | 357 | |
| 358 | OSDOBJS += \ |
| 359 | $(SDLOBJ)/debugqt.o \ |
| 360 | $(SDLOBJ)/debugqtview.o \ |
| 361 | $(SDLOBJ)/debugqtwindow.o \ |
| 362 | $(SDLOBJ)/debugqtlogwindow.o \ |
| 363 | $(SDLOBJ)/debugqtdasmwindow.o \ |
| 364 | $(SDLOBJ)/debugqtmainwindow.o \ |
| 365 | $(SDLOBJ)/debugqtmemorywindow.o \ |
| 366 | $(SDLOBJ)/debugqtview.moc.o \ |
| 367 | $(SDLOBJ)/debugqtwindow.moc.o \ |
| 368 | $(SDLOBJ)/debugqtlogwindow.moc.o \ |
| 369 | $(SDLOBJ)/debugqtdasmwindow.moc.o \ |
| 370 | $(SDLOBJ)/debugqtmainwindow.moc.o \ |
| 371 | $(SDLOBJ)/debugqtmemorywindow.moc.o |
| 372 | endif |
| 373 | |
341 | 374 | #------------------------------------------------- |
342 | 375 | # rules for building the libaries |
343 | 376 | #------------------------------------------------- |
trunk/src/osd/sdl/debugqt.c
r23298 | r23299 | |
15 | 15 | #include <QtGui/QApplication> |
16 | 16 | |
17 | 17 | #include "emu.h" |
| 18 | #if defined(SDL) |
18 | 19 | #include "osdsdl.h" |
| 20 | #define xxx_osd_interface sdl_osd_interface |
| 21 | #elif defined(WIN32) |
| 22 | #include "winmain.h" |
| 23 | #define xxx_osd_interface windows_osd_interface |
| 24 | #endif |
19 | 25 | #include "config.h" |
20 | 26 | #include "debugger.h" |
21 | 27 | |
r23298 | r23299 | |
179 | 185 | // Core functionality |
180 | 186 | //============================================================ |
181 | 187 | |
182 | | void sdl_osd_interface::init_debugger() |
| 188 | void xxx_osd_interface::init_debugger() |
183 | 189 | { |
184 | 190 | if (qApp == NULL) |
185 | 191 | { |
r23298 | r23299 | |
214 | 220 | extern int sdl_entered_debugger; |
215 | 221 | #endif |
216 | 222 | |
217 | | void sdl_osd_interface::wait_for_debugger(device_t &device, bool firststop) |
| 223 | void xxx_osd_interface::wait_for_debugger(device_t &device, bool firststop) |
218 | 224 | { |
| 225 | #if defined(SDL) |
219 | 226 | sdl_entered_debugger = 1; |
| 227 | #endif |
220 | 228 | |
221 | 229 | // Dialog initialization |
222 | 230 | if (oneShot) |