summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@nokia.com>2009-11-04 14:08:30 (GMT)
committerKai Koehne <kai.koehne@nokia.com>2009-11-04 14:08:30 (GMT)
commit375bbf981fb4fc9a910aa078f6b7caf19c255ae8 (patch)
tree4555b9f51eb2287472a46539ee68feefe191b610
parentf080d232ef072976b28ca4b448dcb210b5941b2e (diff)
downloadQt-375bbf981fb4fc9a910aa078f6b7caf19c255ae8.zip
Qt-375bbf981fb4fc9a910aa078f6b7caf19c255ae8.tar.gz
Qt-375bbf981fb4fc9a910aa078f6b7caf19c255ae8.tar.bz2
Raise the limit for _not_ using multimedia timers to 20ms
To achieve 60FPS you need a new frame every 16ms -> this just missed the original threshold of 15ms. This came up in the context of a Snake game written in qml. Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
-rw-r--r--src/corelib/kernel/qeventdispatcher_win.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/kernel/qeventdispatcher_win.cpp b/src/corelib/kernel/qeventdispatcher_win.cpp
index d13e1d1..b608d85 100644
--- a/src/corelib/kernel/qeventdispatcher_win.cpp
+++ b/src/corelib/kernel/qeventdispatcher_win.cpp
@@ -550,7 +550,7 @@ void QEventDispatcherWin32Private::registerTimer(WinTimerInfo *t)
Q_Q(QEventDispatcherWin32);
int ok = 0;
- if (t->interval > 15 || !t->interval || !qtimeSetEvent) {
+ if (t->interval > 20 || !t->interval || !qtimeSetEvent) {
ok = 1;
if (!t->interval) // optimization for single-shot-zero-timer
QCoreApplication::postEvent(q, new QZeroTimerEvent(t->timerId));