diff options
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface/ForceFeedback')
| -rw-r--r-- | Source/Core/InputCommon/ControllerInterface/ForceFeedback/ForceFeedbackDevice.cpp | 14 | ||||
| -rw-r--r-- | Source/Core/InputCommon/ControllerInterface/ForceFeedback/ForceFeedbackDevice.h | 2 |
2 files changed, 4 insertions, 12 deletions
diff --git a/Source/Core/InputCommon/ControllerInterface/ForceFeedback/ForceFeedbackDevice.cpp b/Source/Core/InputCommon/ControllerInterface/ForceFeedback/ForceFeedbackDevice.cpp index 4350444492..f8efad343a 100644 --- a/Source/Core/InputCommon/ControllerInterface/ForceFeedback/ForceFeedbackDevice.cpp +++ b/Source/Core/InputCommon/ControllerInterface/ForceFeedback/ForceFeedbackDevice.cpp @@ -133,10 +133,8 @@ bool ForceFeedbackDevice::InitForceFeedback(const LPDIRECTINPUTDEVICE8 device, i return true; } -bool ForceFeedbackDevice::UpdateOutput() +void ForceFeedbackDevice::UpdateOutput() { - size_t ok_count = 0; - DIEFFECT eff; memset(&eff, 0, sizeof(eff)); eff.dwSize = sizeof(DIEFFECT); @@ -151,22 +149,16 @@ bool ForceFeedbackDevice::UpdateOutput() eff.cbTypeSpecificParams = state.size; eff.lpvTypeSpecificParams = state.params; // set params and start effect - ok_count += SUCCEEDED(state.iface->SetParameters(&eff, DIEP_TYPESPECIFICPARAMS | DIEP_START)); + state.iface->SetParameters(&eff, DIEP_TYPESPECIFICPARAMS | DIEP_START); } else { - ok_count += SUCCEEDED(state.iface->Stop()); + state.iface->Stop(); } state.params = nullptr; } - else - { - ++ok_count; - } } - - return (m_state_out.size() == ok_count); } template<> diff --git a/Source/Core/InputCommon/ControllerInterface/ForceFeedback/ForceFeedbackDevice.h b/Source/Core/InputCommon/ControllerInterface/ForceFeedback/ForceFeedbackDevice.h index 31a1884aae..8b26ffeff2 100644 --- a/Source/Core/InputCommon/ControllerInterface/ForceFeedback/ForceFeedbackDevice.h +++ b/Source/Core/InputCommon/ControllerInterface/ForceFeedback/ForceFeedbackDevice.h @@ -52,7 +52,7 @@ private: public: bool InitForceFeedback(const LPDIRECTINPUTDEVICE8, int cAxes); - bool UpdateOutput(); + void UpdateOutput() override; virtual ~ForceFeedbackDevice(); private: |
