Skip to content

Commit 2e02d61

Browse files
author
Brian Kendall
committed
Increased polling interval to 250 times/sec
Since Windows timers can't do fine-grained resolution, an interval of 4 ms seemed to be a good balance between polling a lot to reduce input latency and not taxing the CPU too much.
1 parent 0699347 commit 2e02d61

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

controllerremapper.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ void ControllerRemapper::run()
389389
pollTimer->moveToThread(this);
390390
connect(pollTimer, SIGNAL(timeout()), this, SLOT(poll()), Qt::DirectConnection);
391391
pollTimer->setTimerType(Qt::PreciseTimer);
392-
pollTimer->setInterval(1000 / kPollingCyclesPerSecond);
392+
pollTimer->setInterval(4);
393393

394394
if (enabled) {
395395
pollTimer->start();

controllerremapper.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
// The following is a value that an XInput axis is guaranteed never to have, and
1414
// is therefore safe to use as a flag indicating an unset value:
1515
#define kAxisUnset -100000
16-
#define kPollingCyclesPerSecond 150
1716

1817
enum {
1918
kUp = 0,

0 commit comments

Comments
 (0)