summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerInterface/DInput
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/DInput
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/DInput')
-rw-r--r--Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.cpp6
-rw-r--r--Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.h2
-rw-r--r--Source/Core/InputCommon/ControllerInterface/DInput/DInputKeyboardMouse.cpp6
-rw-r--r--Source/Core/InputCommon/ControllerInterface/DInput/DInputKeyboardMouse.h2
4 files changed, 5 insertions, 11 deletions
diff --git a/Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.cpp b/Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.cpp
index 0c1ed5aa18..bc8638293e 100644
--- a/Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.cpp
+++ b/Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.cpp
@@ -177,7 +177,7 @@ std::string Joystick::GetSource() const
// update IO
-bool Joystick::UpdateInput()
+void Joystick::UpdateInput()
{
HRESULT hr = 0;
@@ -215,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
diff --git a/Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.h b/Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.h
index 17770afe5a..f1af8102cd 100644
--- a/Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.h
+++ b/Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.h
@@ -52,7 +52,7 @@ private:
};
public:
- bool UpdateInput();
+ void UpdateInput() override;
Joystick(const LPDIRECTINPUTDEVICE8 device, const unsigned int index);
~Joystick();
diff --git a/Source/Core/InputCommon/ControllerInterface/DInput/DInputKeyboardMouse.cpp b/Source/Core/InputCommon/ControllerInterface/DInput/DInputKeyboardMouse.cpp
index 692826aebb..c96e51a830 100644
--- a/Source/Core/InputCommon/ControllerInterface/DInput/DInputKeyboardMouse.cpp
+++ b/Source/Core/InputCommon/ControllerInterface/DInput/DInputKeyboardMouse.cpp
@@ -139,7 +139,7 @@ void GetMousePos(ControlState* const x, ControlState* const y)
*y = (ControlState)point.y / (ControlState)win_height * 2 - 1;
}
-bool KeyboardMouse::UpdateInput()
+void KeyboardMouse::UpdateInput()
{
DIMOUSESTATE2 tmp_mouse;
@@ -175,11 +175,7 @@ bool KeyboardMouse::UpdateInput()
// update mouse cursor
GetMousePos(&m_state_in.cursor.x, &m_state_in.cursor.y);
-
- return true;
}
-
- return false;
}
std::string KeyboardMouse::GetName() const
diff --git a/Source/Core/InputCommon/ControllerInterface/DInput/DInputKeyboardMouse.h b/Source/Core/InputCommon/ControllerInterface/DInput/DInputKeyboardMouse.h
index 0f3dfece83..704635057e 100644
--- a/Source/Core/InputCommon/ControllerInterface/DInput/DInputKeyboardMouse.h
+++ b/Source/Core/InputCommon/ControllerInterface/DInput/DInputKeyboardMouse.h
@@ -77,7 +77,7 @@ private:
};
public:
- bool UpdateInput();
+ void UpdateInput() override;
KeyboardMouse(const LPDIRECTINPUTDEVICE8 kb_device, const LPDIRECTINPUTDEVICE8 mo_device);
~KeyboardMouse();