Browse Source

sdlinput: fix captured mouse coordinates

undefined
Jean-Yves Lamoureux Sam Hocevar <sam@hocevar.net> 11 years ago
parent
commit
81e4f7421e
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      src/platform/sdl/sdlinput.cpp

+ 2
- 0
src/platform/sdl/sdlinput.cpp View File

@@ -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);
}



Loading…
Cancel
Save