summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/debugger
diff options
context:
space:
mode:
author R. Belmont <rb6502@users.noreply.github.com>2014-05-23 20:50:16 +0000
committer R. Belmont <rb6502@users.noreply.github.com>2014-05-23 20:50:16 +0000
commit5305ed398f0c4ee097642eacd3110d5245183a8a (patch)
treebdd090ee0ac3f3865522bb3a1f5c226e1e03fabd /src/osd/modules/debugger
parentab7d30873a6e14abb9022dfc91b3e5284e62adc1 (diff)
debugqt: Fix 'source' capability. [Happy]
Diffstat (limited to 'src/osd/modules/debugger')
-rw-r--r--src/osd/modules/debugger/debugqt.c60
1 files changed, 28 insertions, 32 deletions
diff --git a/src/osd/modules/debugger/debugqt.c b/src/osd/modules/debugger/debugqt.c
index 20eb39538a4..8bf8d7492d2 100644
--- a/src/osd/modules/debugger/debugqt.c
+++ b/src/osd/modules/debugger/debugqt.c
@@ -2,7 +2,7 @@
//
// debugqt.c - SDL/QT debug window handling
//
-// Copyright (c) 1996-2010, Nicola Salmoria and the MAME Team.
+// Copyright (c) 1996-2014, Nicola Salmoria and the MAME Team.
// Visit http://mamedev.org for licensing and usage restrictions.
//
// SDLMAME by Olivier Galibert and R. Belmont
@@ -284,45 +284,41 @@ void debugger_qt::wait_for_debugger(device_t &device, bool firststop)
mainQtWindow->setProcessor(&device);
// Run our own QT event loop
- while (debug_cpu_is_stopped(m_osd.machine()))
- {
- osd_sleep(50000);
- qApp->processEvents(QEventLoop::AllEvents, 1);
+ osd_sleep(50000);
+ qApp->processEvents(QEventLoop::AllEvents, 1);
- // Refresh everyone if requested
- if (mainQtWindow->wantsRefresh())
- {
- QWidgetList allWidgets = qApp->allWidgets();
- for (int i = 0; i < allWidgets.length(); i++)
- allWidgets[i]->update();
- mainQtWindow->clearRefreshFlag();
- }
+ // Refresh everyone if requested
+ if (mainQtWindow->wantsRefresh())
+ {
+ QWidgetList allWidgets = qApp->allWidgets();
+ for (int i = 0; i < allWidgets.length(); i++)
+ allWidgets[i]->update();
+ mainQtWindow->clearRefreshFlag();
+ }
- // Hide all top level widgets if requested
- if (mainQtWindow->wantsHide())
+ // Hide all top level widgets if requested
+ if (mainQtWindow->wantsHide())
+ {
+ foreach (QWidget* widget, QApplication::topLevelWidgets())
{
- foreach (QWidget* widget, QApplication::topLevelWidgets())
- {
- if (!widget->isWindow() || widget->windowType() != Qt::Window)
- continue;
- widget->hide();
- }
- mainQtWindow->clearHideFlag();
+ if (!widget->isWindow() || widget->windowType() != Qt::Window)
+ continue;
+ widget->hide();
}
+ mainQtWindow->clearHideFlag();
+ }
- // Exit if the machine has been instructed to do so (scheduled event == exit || hard_reset)
- if (m_osd.machine().scheduled_event_pending())
- {
- // Keep a list of windows we want to save.
- // We need to do this here because by the time xml_configuration_save gets called
- // all the QT windows are already gone.
- gather_save_configurations();
- break;
- }
+ // Exit if the machine has been instructed to do so (scheduled event == exit || hard_reset)
+ if (m_osd.machine().scheduled_event_pending())
+ {
+ // Keep a list of windows we want to save.
+ // We need to do this here because by the time xml_configuration_save gets called
+ // all the QT windows are already gone.
+ gather_save_configurations();
+ }
#if defined(WIN32) && !defined(SDLMAME_WIN32)
winwindow_update_cursor_state(m_osd.machine()); // make sure the cursor isn't hidden while in debugger
#endif
- }
}