summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerInterface/ForceFeedback
diff options
context:
space:
mode:
authorJasper St. Pierre <jstpierre@mecheye.net>2014-11-13 00:55:14 -0800
committerJasper St. Pierre <jstpierre@mecheye.net>2014-11-28 10:50:45 -0800
commitf2787f620eebbbfb746f59cfbd0318210297061b (patch)
treef40c85046226e9ae38114132df65c8e8c16d2425 /Source/Core/InputCommon/ControllerInterface/ForceFeedback
parent61fcfc4bf2058d971af6882af2765ad34d935fcb (diff)
ControllerInterface: Make UpdateInput / UpdateOutput return void
The return values here have never been checked, so it doesn't make sense to return a value to begin with.
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface/ForceFeedback')
-rw-r--r--Source/Core/InputCommon/ControllerInterface/ForceFeedback/ForceFeedbackDevice.cpp14
-rw-r--r--Source/Core/InputCommon/ControllerInterface/ForceFeedback/ForceFeedbackDevice.h2
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: