summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.cpp')
-rw-r--r--Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.cpp17
1 files changed, 5 insertions, 12 deletions
diff --git a/Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.cpp b/Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.cpp
index ecd5db838c..bc8638293e 100644
--- a/Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.cpp
+++ b/Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.cpp
@@ -149,7 +149,9 @@ Joystick::Joystick( /*const LPCDIDEVICEINSTANCE lpddi, */const LPDIRECTINPUTDEVI
InitForceFeedback(m_device, (int)objects.size());
}
- ClearInputState();
+ ZeroMemory(&m_state_in, sizeof(m_state_in));
+ // set hats to center
+ memset(m_state_in.rgdwPOV, 0xFF, sizeof(m_state_in.rgdwPOV));
}
Joystick::~Joystick()
@@ -158,13 +160,6 @@ Joystick::~Joystick()
m_device->Release();
}
-void Joystick::ClearInputState()
-{
- ZeroMemory(&m_state_in, sizeof(m_state_in));
- // set hats to center
- memset(m_state_in.rgdwPOV, 0xFF, sizeof(m_state_in.rgdwPOV));
-}
-
std::string Joystick::GetName() const
{
return GetDeviceName(m_device);
@@ -182,7 +177,7 @@ std::string Joystick::GetSource() const
// update IO
-bool Joystick::UpdateInput()
+void Joystick::UpdateInput()
{
HRESULT hr = 0;
@@ -220,9 +215,7 @@ bool Joystick::UpdateInput()
// try reacquire if input lost
if (DIERR_INPUTLOST == hr || DIERR_NOTACQUIRED == hr)
- hr = m_device->Acquire();
-
- return SUCCEEDED(hr);
+ m_device->Acquire();
}
// get name