summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerInterface/DInput/DInputKeyboardMouse.cpp
diff options
context:
space:
mode:
authorPierre Bourdon <delroth@gmail.com>2014-02-28 23:08:56 +0100
committerPierre Bourdon <delroth@gmail.com>2014-02-28 23:08:56 +0100
commitbc844a168fe54174cd4de04e17ef23849e1fcccb (patch)
tree1293208fb1072c1f13cdf16006190a18a7882dfd /Source/Core/InputCommon/ControllerInterface/DInput/DInputKeyboardMouse.cpp
parent1a7e3b3227070fcac6499e6e9eaa8d8ad3ef3e49 (diff)
parent892012dc02d13229e88db1809f7b785fc3516787 (diff)
Merge pull request #100 from Tilka/misc_fixes
Misc fixes
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface/DInput/DInputKeyboardMouse.cpp')
-rw-r--r--Source/Core/InputCommon/ControllerInterface/DInput/DInputKeyboardMouse.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/Source/Core/InputCommon/ControllerInterface/DInput/DInputKeyboardMouse.cpp b/Source/Core/InputCommon/ControllerInterface/DInput/DInputKeyboardMouse.cpp
index c9dd9034fe..0cd55b448c 100644
--- a/Source/Core/InputCommon/ControllerInterface/DInput/DInputKeyboardMouse.cpp
+++ b/Source/Core/InputCommon/ControllerInterface/DInput/DInputKeyboardMouse.cpp
@@ -138,7 +138,6 @@ KeyboardMouse::KeyboardMouse(const LPDIRECTINPUTDEVICE8 kb_device, const LPDIREC
void GetMousePos(float* const x, float* const y)
{
- unsigned int win_width = 2, win_height = 2;
POINT point = { 1, 1 };
GetCursorPos(&point);
// Get the cursor position relative to the upper left corner of the rendering window
@@ -148,8 +147,8 @@ void GetMousePos(float* const x, float* const y)
RECT rect;
GetClientRect(hwnd, &rect);
// Width and height is the size of the rendering window
- win_width = rect.right - rect.left;
- win_height = rect.bottom - rect.top;
+ unsigned int win_width = rect.right - rect.left;
+ unsigned int win_height = rect.bottom - rect.top;
// Return the mouse position as a range from -1 to 1
*x = (float)point.x / (float)win_width * 2 - 1;