From 8f1d1fa94bd54a93b497cfe3e4c82cf8e96b07e7 Mon Sep 17 00:00:00 2001 From: Magnus Norddahl Date: Tue, 31 Dec 2019 01:46:54 +0100 Subject: [PATCH] Fix mouse move precision loss when only moving the mouse a pixel or two. Also make the baseline mouse scaling more reasonable. --- source/common/console/d_event.cpp | 2 +- source/common/inputstate.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/common/console/d_event.cpp b/source/common/console/d_event.cpp index bcfe7e42e..c811167ba 100644 --- a/source/common/console/d_event.cpp +++ b/source/common/console/d_event.cpp @@ -134,7 +134,7 @@ void D_PostEvent (const event_t *ev) if (ev->type == EV_Mouse && GUICapture == 0 && appactive) { - inputState.MouseAddToPos(ev->x / 3, -ev->y / 2); + inputState.MouseAddToPos(ev->x, -ev->y); return; } diff --git a/source/common/inputstate.cpp b/source/common/inputstate.cpp index aa02c8065..791899f39 100644 --- a/source/common/inputstate.cpp +++ b/source/common/inputstate.cpp @@ -15,7 +15,7 @@ void InputState::GetMouseDelta(ControlInfo * info) input = g_mousePos; g_mousePos = {}; - vec2f_t finput = { float(input.x), float(input.y) }; + vec2f_t finput = { float(input.x) / 3.0f, float(input.y) }; if (in_mousesmoothing) {