diff --git a/src/common/EventHandlerSDL.cxx b/src/common/EventHandlerSDL.cxx index 06fc8befb..9db111b02 100644 --- a/src/common/EventHandlerSDL.cxx +++ b/src/common/EventHandlerSDL.cxx @@ -49,6 +49,8 @@ EventHandlerSDL::EventHandlerSDL(OSystem& osystem) #endif SDL_SetHint(SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH, "1"); + //SDL_SetHint(SDL_HINT_MOUSE_RELATIVE_SYSTEM_SCALE, "1"); + //SDL_SetHint(SDL_HINT_MOUSE_RELATIVE_MODE_CENTER, "0"); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/common/FBBackendSDL.cxx b/src/common/FBBackendSDL.cxx index f6e4de754..45626d569 100644 --- a/src/common/FBBackendSDL.cxx +++ b/src/common/FBBackendSDL.cxx @@ -524,6 +524,8 @@ void FBBackendSDL::grabMouse(bool grab) ASSERT_MAIN_THREAD; SDL_SetWindowMouseGrab(myWindow, grab); + SDL_SetHint(SDL_HINT_MOUSE_RELATIVE_SYSTEM_SCALE, grab ? "1" : "0"); + SDL_SetWindowRelativeMouseMode(myWindow, grab); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -