diff options
Diffstat (limited to 'facetracknoir/tracker.cpp')
-rw-r--r-- | facetracknoir/tracker.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/facetracknoir/tracker.cpp b/facetracknoir/tracker.cpp index 981be4b7..cff2e765 100644 --- a/facetracknoir/tracker.cpp +++ b/facetracknoir/tracker.cpp @@ -24,6 +24,10 @@ #include "tracker.h"
#include "facetracknoir.h"
+#if defined(_WIN32)
+# include <windows.h>
+#endif
+
/** constructor **/
Tracker::Tracker( FaceTrackNoIR *parent ) :
should_quit(false),
@@ -69,7 +73,11 @@ void Tracker::run() { double newpose[6];
double last_post_filter[6];
- forever
+#if defined(_WIN32)
+ (void) timeBeginPeriod(1);
+#endif
+
+ for (;;)
{
if (should_quit)
break;
@@ -157,6 +165,9 @@ void Tracker::run() { //for lower cpu load
msleep(8);
}
+#if defined(_WIN32)
+ (void) timeEndPeriod(1);
+#endif
for (int i = 0; i < 6; i++)
{
@@ -192,7 +203,7 @@ void Tracker::loadSettings() { qDebug() << "Tracker::loadSettings says: Starting ";
QSettings settings("opentrack"); // Registry settings (in HK_USER)
- QString currentFile = settings.value ( "SettingsFile", QCoreApplication::applicationDirPath() + "/settings/default.ini" ).toString(); + QString currentFile = settings.value ( "SettingsFile", QCoreApplication::applicationDirPath() + "/settings/default.ini" ).toString();
QSettings iniFile( currentFile, QSettings::IniFormat ); // Application settings (in INI-file)
iniFile.beginGroup("Tracking");
|