summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt2
-rw-r--r--ftnoir_protocol_sc/ftnoir_protocol_sc.cpp6
2 files changed, 6 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c45163dc..448375f3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -304,7 +304,7 @@ endif()
if(SDK_SIMCONNECT)
opentrack_library(opentrack-proto-simconnect ftnoir_protocol_sc)
- target_link_libraries(opentrack-proto-simconnect ${SDK_SIMCONNECT}/lib/SimConnect.lib)
+ target_link_libraries(opentrack-proto-simconnect ${SDK_SIMCONNECT}/lib/SimConnect.lib winmm)
include_directories(opentrack-proto-simconnect SYSTEM PUBLIC ${SDK_SIMCONNECT}/inc)
endif()
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 ) {