From 86c6c7c9036474d2ad66994613ad3042dee8fde2 Mon Sep 17 00:00:00 2001 From: rsn8887 Date: Sat, 18 Feb 2017 19:21:26 -0600 Subject: SDL: increase resolution of slow analog pointer motion --- backends/events/sdl/sdl-events.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'backends/events/sdl') diff --git a/backends/events/sdl/sdl-events.cpp b/backends/events/sdl/sdl-events.cpp index 378e0370fb..469f1d5a44 100644 --- a/backends/events/sdl/sdl-events.cpp +++ b/backends/events/sdl/sdl-events.cpp @@ -270,8 +270,14 @@ bool SdlEventSource::handleKbdMouse(Common::Event &event) { } if (_km.x != oldKmX || _km.y != oldKmY) { + // keep hi-res coordinates since + // processMouseEvent will overwrite them with lo-res numbers + oldKmX = _km.x; + oldKmY = _km.y; event.type = Common::EVENT_MOUSEMOVE; processMouseEvent(event, _km.x / MULTIPLIER, _km.y / MULTIPLIER); + _km.x = oldKmX; + _km.y = oldKmY; return true; } } -- cgit v1.2.3