diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2017-06-12 23:27:07 +0200 | 
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2017-06-12 23:27:07 +0200 | 
| commit | e52611bc00698aa24a2efd85d495f3826e5919af (patch) | |
| tree | 6cba517abc329a4426261cfb30d238ae544a5300 /logic | |
| parent | 1a65333bb92cd6ad1b0b6b35734eb8eed70454bd (diff) | |
logic/tracker: add multimedia timer again
Diffstat (limited to 'logic')
| -rw-r--r-- | logic/tracker.cpp | 11 | 
1 files changed, 8 insertions, 3 deletions
| diff --git a/logic/tracker.cpp b/logic/tracker.cpp index 24eaa6ad..ffa3eff4 100644 --- a/logic/tracker.cpp +++ b/logic/tracker.cpp @@ -358,9 +358,9 @@ void Tracker::logic()  void Tracker::run()  { -    setPriority(QThread::HighPriority); -    setPriority(QThread::HighestPriority); -    setPriority(QThread::TimeCriticalPriority); +#if defined _WIN32 +    const MMRESULT mmres = timeBeginPeriod(1); +#endif      {          static constexpr const char* posechannels[6] = { "TX", "TY", "TZ", "Yaw", "Pitch", "Roll" }; @@ -414,6 +414,11 @@ void Tracker::run()          m(i).spline_main.set_tracking_active(false);          m(i).spline_alt.set_tracking_active(false);      } + +#if defined _WIN32 +    if (mmres == 0) +        (void) timeEndPeriod(1); +#endif  }  void Tracker::raw_and_mapped_pose(double* mapped, double* raw) const | 
