Previous 199869 Revisions Next

r30622 Friday 23rd May, 2014 at 20:50:16 UTC by R. Belmont
debugqt: Fix 'source' capability. [Happy]
[src/osd/modules/debugger]debugqt.c

trunk/src/osd/modules/debugger/debugqt.c
r30621r30622
22//
33//  debugqt.c - SDL/QT debug window handling
44//
5//  Copyright (c) 1996-2010, Nicola Salmoria and the MAME Team.
5//  Copyright (c) 1996-2014, Nicola Salmoria and the MAME Team.
66//  Visit http://mamedev.org for licensing and usage restrictions.
77//
88//  SDLMAME by Olivier Galibert and R. Belmont
r30621r30622
284284   mainQtWindow->setProcessor(&device);
285285
286286   // Run our own QT event loop
287   while (debug_cpu_is_stopped(m_osd.machine()))
287   osd_sleep(50000);
288   qApp->processEvents(QEventLoop::AllEvents, 1);
289
290   // Refresh everyone if requested
291   if (mainQtWindow->wantsRefresh())
288292   {
289      osd_sleep(50000);
290      qApp->processEvents(QEventLoop::AllEvents, 1);
293      QWidgetList allWidgets = qApp->allWidgets();
294      for (int i = 0; i < allWidgets.length(); i++)
295         allWidgets[i]->update();
296      mainQtWindow->clearRefreshFlag();
297   }
291298
292      // Refresh everyone if requested
293      if (mainQtWindow->wantsRefresh())
299   // Hide all top level widgets if requested
300   if (mainQtWindow->wantsHide())
301   {
302      foreach (QWidget* widget, QApplication::topLevelWidgets())
294303      {
295         QWidgetList allWidgets = qApp->allWidgets();
296         for (int i = 0; i < allWidgets.length(); i++)
297            allWidgets[i]->update();
298         mainQtWindow->clearRefreshFlag();
304         if (!widget->isWindow() || widget->windowType() != Qt::Window)
305            continue;
306         widget->hide();
299307      }
308      mainQtWindow->clearHideFlag();
309   }
300310
301      // Hide all top level widgets if requested
302      if (mainQtWindow->wantsHide())
303      {
304         foreach (QWidget* widget, QApplication::topLevelWidgets())
305         {
306            if (!widget->isWindow() || widget->windowType() != Qt::Window)
307               continue;
308            widget->hide();
309         }
310         mainQtWindow->clearHideFlag();
311      }
312
313      // Exit if the machine has been instructed to do so (scheduled event == exit || hard_reset)
314      if (m_osd.machine().scheduled_event_pending())
315      {
316         // Keep a list of windows we want to save.
317         // We need to do this here because by the time xml_configuration_save gets called
318         // all the QT windows are already gone.
319         gather_save_configurations();
320         break;
321      }
311   // Exit if the machine has been instructed to do so (scheduled event == exit || hard_reset)
312   if (m_osd.machine().scheduled_event_pending())
313   {
314      // Keep a list of windows we want to save.
315      // We need to do this here because by the time xml_configuration_save gets called
316      // all the QT windows are already gone.
317      gather_save_configurations();
318   }
322319#if defined(WIN32) && !defined(SDLMAME_WIN32)
323320      winwindow_update_cursor_state(m_osd.machine()); // make sure the cursor isn't hidden while in debugger
324321#endif
325   }
326322}
327323
328324

Previous 199869 Revisions Next


© 1997-2024 The MAME Team