diff options
Diffstat (limited to 'tracker-joystick/ftnoir_tracker_joystick.cpp')
-rw-r--r-- | tracker-joystick/ftnoir_tracker_joystick.cpp | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/tracker-joystick/ftnoir_tracker_joystick.cpp b/tracker-joystick/ftnoir_tracker_joystick.cpp index 77fd7241..742ce972 100644 --- a/tracker-joystick/ftnoir_tracker_joystick.cpp +++ b/tracker-joystick/ftnoir_tracker_joystick.cpp @@ -19,17 +19,20 @@ FTNoIR_Tracker::FTNoIR_Tracker() : void FTNoIR_Tracker::reload() { s.b->reload(); - QMutexLocker foo(&mtx); - if (g_pJoystick) { - g_pJoystick->Unacquire(); - g_pJoystick->Release(); + QMutexLocker foo(&mtx); + + if (g_pJoystick) + { + g_pJoystick->Unacquire(); + g_pJoystick->Release(); + } + if (g_pDI) + g_pDI->Release(); + + g_pJoystick = nullptr; + g_pDI = nullptr; } - if (g_pDI) - g_pDI->Release(); - - g_pJoystick = nullptr; - g_pDI = nullptr; start_tracker(frame); } |