diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2015-07-06 07:11:24 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2015-07-06 07:11:24 +0200 |
commit | d2076ff5deb2046d1f8bcd2d324e5cd917c3871d (patch) | |
tree | e9b28e66f397bfa5692dddeb8aa8ed588f7b72bc /ftnoir_protocol_sc | |
parent | 2bcab030f7640387e015f232df6254e1806aa586 (diff) |
simconnect: increase timer precision just to be safe
Diffstat (limited to 'ftnoir_protocol_sc')
-rw-r--r-- | ftnoir_protocol_sc/ftnoir_protocol_sc.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp b/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp index eb8d1a79..f767d232 100644 --- a/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp +++ b/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp @@ -44,6 +44,8 @@ void FTNoIR_Protocol::run() { Affinity thr; + (void) timeBeginPeriod(1); + while (!should_stop) { if (SUCCEEDED(simconnect_open(&hSimConnect, "opentrack", NULL, 0, 0, 0))) @@ -54,7 +56,7 @@ void FTNoIR_Protocol::run() { if (FAILED(simconnect_calldispatch(hSimConnect, processNextSimconnectEvent, reinterpret_cast<void*>(this)))) break; - Sleep(1); + Sleep(3); } (void) simconnect_close(hSimConnect); @@ -62,6 +64,8 @@ void FTNoIR_Protocol::run() Sleep(100); } + + (void) timeEndPeriod(1); } void FTNoIR_Protocol::pose( const double *headpose ) { |