Added logic to process all QCoreApplication events in main window loop to ensure that GUI stays responsive when rendering slows app execution down. Mac OS OpenGL was causing odd event processing delays. So now we will ensure all events are processed before attempting any rendering.

This commit is contained in:
mjbudd77 2021-03-21 18:31:20 -04:00
parent b942f07e9f
commit 04caf3a03f
1 changed files with 3 additions and 8 deletions

View File

@ -2872,14 +2872,10 @@ void consoleWin_t::syncActionConfig( QAction *act, const char *property )
void consoleWin_t::updatePeriodic(void)
{
//struct timespec ts;
//double t;
//clock_gettime( CLOCK_REALTIME, &ts );
//t = (double)ts.tv_sec + (double)(ts.tv_nsec * 1.0e-9);
//printf("Run Frame %f\n", t);
// Process all events before attempting to render viewport
QCoreApplication::processEvents();
// Update Input Devices
FCEUD_UpdateInput();
@ -2896,7 +2892,6 @@ void consoleWin_t::updatePeriodic(void)
else
{
viewport_GL->transfer2LocalBuffer();
//viewport_GL->repaint();
viewport_GL->update();
}
}