summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerInterface/DInput/DInputKeyboardMouse.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface/DInput/DInputKeyboardMouse.cpp')
-rw-r--r--Source/Core/InputCommon/ControllerInterface/DInput/DInputKeyboardMouse.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/Core/InputCommon/ControllerInterface/DInput/DInputKeyboardMouse.cpp b/Source/Core/InputCommon/ControllerInterface/DInput/DInputKeyboardMouse.cpp
index 24edc4386c..1e617d6c24 100644
--- a/Source/Core/InputCommon/ControllerInterface/DInput/DInputKeyboardMouse.cpp
+++ b/Source/Core/InputCommon/ControllerInterface/DInput/DInputKeyboardMouse.cpp
@@ -125,9 +125,11 @@ void KeyboardMouse::UpdateCursorInput()
const auto win_width = rect.right - rect.left;
const auto win_height = rect.bottom - rect.top;
+ const auto window_scale = g_controller_interface.GetWindowInputScale();
+
// Convert the cursor position to a range from -1 to 1.
- m_state_in.cursor.x = ControlState(point.x) / win_width * 2 - 1;
- m_state_in.cursor.y = ControlState(point.y) / win_height * 2 - 1;
+ m_state_in.cursor.x = (ControlState(point.x) / win_width * 2 - 1) * window_scale.x;
+ m_state_in.cursor.y = (ControlState(point.y) / win_height * 2 - 1) * window_scale.y;
}
void KeyboardMouse::UpdateInput()