diff options
Diffstat (limited to 'ftnoir_tracker_joystick')
-rw-r--r-- | ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp | 10 | ||||
-rw-r--r-- | ftnoir_tracker_joystick/ftnoir_tracker_joystick.h | 2 |
2 files changed, 5 insertions, 7 deletions
diff --git a/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp b/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp index 66138e90..8f5ac162 100644 --- a/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp +++ b/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp @@ -175,13 +175,13 @@ fail: qDebug() << "joy init failure"; } -bool FTNoIR_Tracker::GiveHeadPoseData(double *data) +void FTNoIR_Tracker::GiveHeadPoseData(double *data) { QMutexLocker foo(&mtx); DIJOYSTATE js = {0}; if( !g_pDI || !g_pJoystick) - return false; + return; auto hr = g_pJoystick->Poll(); if( FAILED( hr )) @@ -190,11 +190,11 @@ bool FTNoIR_Tracker::GiveHeadPoseData(double *data) for (int i = 0; hr == DIERR_INPUTLOST && i < 200; i++) hr = g_pJoystick->Acquire(); if (hr != DI_OK) - return false; + return; } if( FAILED( hr = g_pJoystick->GetDeviceState( sizeof( js ), &js ) ) ) - return false; + return; const LONG values[] = { js.lRx, @@ -232,8 +232,6 @@ bool FTNoIR_Tracker::GiveHeadPoseData(double *data) data[i] = val * limits[i] / (double) (val >= 0 ? max : min); } } - - return true; } void FTNoIR_Tracker::loadSettings() { diff --git a/ftnoir_tracker_joystick/ftnoir_tracker_joystick.h b/ftnoir_tracker_joystick/ftnoir_tracker_joystick.h index cdf4fc7b..809d8c73 100644 --- a/ftnoir_tracker_joystick/ftnoir_tracker_joystick.h +++ b/ftnoir_tracker_joystick/ftnoir_tracker_joystick.h @@ -42,7 +42,7 @@ public: ~FTNoIR_Tracker(); void StartTracker(QFrame *frame); - bool GiveHeadPoseData(double *data); + void GiveHeadPoseData(double *data); void loadSettings(); LPDIRECTINPUT8 g_pDI; LPDIRECTINPUTDEVICE8 g_pJoystick; |