mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Buildfix for Qt (some platforms). Fixes #4574
This commit is contained in:
parent
221dd153f4
commit
960c0cc2a0
2 changed files with 2 additions and 12 deletions
|
@ -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())
|
||||
|
|
|
@ -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 *)
|
||||
|
|
Loading…
Add table
Reference in a new issue