From 81e4f7421e87e21f6cbeba360818e89ed3e3d4d3 Mon Sep 17 00:00:00 2001 From: Jean-Yves Lamoureux Date: Sun, 5 Jan 2014 12:05:12 +0000 Subject: [PATCH] sdlinput: fix captured mouse coordinates --- src/platform/sdl/sdlinput.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/platform/sdl/sdlinput.cpp b/src/platform/sdl/sdlinput.cpp index 3215f3c5..447c6981 100644 --- a/src/platform/sdl/sdlinput.cpp +++ b/src/platform/sdl/sdlinput.cpp @@ -222,6 +222,8 @@ void SdlInputData::Tick(float seconds) { m_mousecapture = InputDeviceInternal::GetMouseCapture(); SDL_WM_GrabInput(m_mousecapture ? SDL_GRAB_ON : SDL_GRAB_OFF); + mouse = m_app/2; + SdlInputData::SetMousePos(mouse); //SDL_ShowCursor(m_mousecapture ? SDL_DISABLE : SDL_ENABLE); }