Changed fps on desktop to run at 200 fps, changed mobile to start in

fullscreen
This commit is contained in:
Xawotihs
2010-11-22 22:58:57 +00:00
parent 8c7e06b6dc
commit 8d758d4775
+12 -1
View File
@@ -197,7 +197,6 @@ JGEQtRenderer::JGEQtRenderer(QWidget *parent)
, dBusConnection(QDBusConnection::systemBus()) , dBusConnection(QDBusConnection::systemBus())
#endif //Q_WS_MAEMO_5 #endif //Q_WS_MAEMO_5
{ {
// startTimer( 33 ); // 30 fps should be more than enough
setWindowTitle(g_launcher->GetName()); setWindowTitle(g_launcher->GetName());
#ifdef Q_WS_MAEMO_5 #ifdef Q_WS_MAEMO_5
setAttribute(Qt::WA_Maemo5AutoOrientation); setAttribute(Qt::WA_Maemo5AutoOrientation);
@@ -490,7 +489,13 @@ void JGEQtRenderer::showEvent ( QShowEvent * event )
{ {
if(!timerStarted) if(!timerStarted)
{ {
#ifdef Q_WS_MAEMO_5
// 30 fps max on mobile
timerId = startTimer(33); timerId = startTimer(33);
#else
// 200 fps max on desktop
timerId = startTimer(5);
#endif //Q_WS_MAEMO_5
timerStarted = true; timerStarted = true;
} }
} }
@@ -529,7 +534,13 @@ int main(int argc, char* argv[])
g_glwidget = new JGEQtRenderer(NULL); g_glwidget = new JGEQtRenderer(NULL);
g_glwidget->resize(ACTUAL_SCREEN_WIDTH, ACTUAL_SCREEN_HEIGHT); g_glwidget->resize(ACTUAL_SCREEN_WIDTH, ACTUAL_SCREEN_HEIGHT);
#ifdef Q_WS_MAEMO_5
// We start in fullscreen on mobile
g_glwidget->showFullScreen();
#else
// not on desktop
g_glwidget->show(); g_glwidget->show();
#endif
if (!InitGame()) if (!InitGame())
{ {