Buildfix for Qt (some platforms). Fixes #4574

This commit is contained in:
Sacha 2013-11-18 22:56:14 +10:00
parent 221dd153f4
commit 960c0cc2a0
2 changed files with 2 additions and 12 deletions

View file

@ -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())

View file

@ -1,7 +1,6 @@
#include "qtemugl.h"
#include <QMouseEvent>
#include <QThread>
#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 *)