From 960c0cc2a0d95c7d62138efcbc32dd4c12bade9b Mon Sep 17 00:00:00 2001 From: Sacha Date: Mon, 18 Nov 2013 22:56:14 +1000 Subject: [PATCH] Buildfix for Qt (some platforms). Fixes #4574 --- Qt/mainwindow.cpp | 2 +- Qt/qtemugl.cpp | 12 +----------- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/Qt/mainwindow.cpp b/Qt/mainwindow.cpp index 0caf9a68ab..8130602009 100644 --- a/Qt/mainwindow.cpp +++ b/Qt/mainwindow.cpp @@ -56,7 +56,7 @@ MainWindow::MainWindow(QWidget *parent) : SetGameTitle(fileToStart); connect(&timer, SIGNAL(timeout()), this, SLOT(Update())); - timer.setInterval(0); + timer.setInterval(16); // 62.5 refreshes but close enough timer.start(); // if (!fileToStart.isNull()) diff --git a/Qt/qtemugl.cpp b/Qt/qtemugl.cpp index 786e0bc6be..90d3581624 100644 --- a/Qt/qtemugl.cpp +++ b/Qt/qtemugl.cpp @@ -1,7 +1,6 @@ #include "qtemugl.h" #include -#include #include "base/display.h" #include "base/timeutil.h" @@ -26,19 +25,10 @@ void QtEmuGL::initializeGL() } void QtEmuGL::paintGL() { - static double startTime = 0; NativeUpdate(*input_state); NativeRender(); EndInputState(input_state); - - if (globalUIState != UISTATE_INGAME && globalUIState != UISTATE_EXIT) { - time_update(); - double diffTime = time_now_d() - startTime; - startTime = time_now_d(); - int sleepTime = (int) (1000000.0 / 60.0) - (int) (diffTime * 1000000.0); - if (sleepTime > 0) - QThread::usleep(sleepTime); - } + time_update(); } void QtEmuGL::mouseDoubleClickEvent(QMouseEvent *)