mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-28 19:58:53 +00:00
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:
parent
61fcfc4bf2
commit
f2787f620e
19 changed files with 35 additions and 76 deletions
|
@ -203,23 +203,19 @@ std::string Device::GetSource() const
|
|||
|
||||
// Update I/O
|
||||
|
||||
bool Device::UpdateInput()
|
||||
void Device::UpdateInput()
|
||||
{
|
||||
return (ERROR_SUCCESS == PXInputGetState(m_index, &m_state_in));
|
||||
PXInputGetState(m_index, &m_state_in);
|
||||
}
|
||||
|
||||
bool Device::UpdateOutput()
|
||||
void Device::UpdateOutput()
|
||||
{
|
||||
// this if statement is to make rumble work better when multiple ControllerInterfaces are using the device
|
||||
// only calls XInputSetState if the state changed
|
||||
if (memcmp(&m_state_out, &m_current_state_out, sizeof(m_state_out)))
|
||||
{
|
||||
m_current_state_out = m_state_out;
|
||||
return (ERROR_SUCCESS == PXInputSetState(m_index, &m_state_out));
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
PXInputSetState(m_index, &m_state_out);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -73,8 +73,8 @@ private:
|
|||
};
|
||||
|
||||
public:
|
||||
bool UpdateInput();
|
||||
bool UpdateOutput();
|
||||
void UpdateInput() override;
|
||||
void UpdateOutput() override;
|
||||
|
||||
Device(const XINPUT_CAPABILITIES& capabilities, u8 index);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue