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.
This commit is contained in:
Jasper St. Pierre
2014-11-13 00:55:14 -08:00
parent 61fcfc4bf2
commit f2787f620e
19 changed files with 35 additions and 76 deletions

View File

@ -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<>

View File

@ -52,7 +52,7 @@ private:
public:
bool InitForceFeedback(const LPDIRECTINPUTDEVICE8, int cAxes);
bool UpdateOutput();
void UpdateOutput() override;
virtual ~ForceFeedbackDevice();
private: