From df3c9838b83fdb79486b713f5bac8bc43a8f062e Mon Sep 17 00:00:00 2001 From: thrust26 Date: Sat, 31 May 2025 10:47:43 +0200 Subject: [PATCH] trying to fix Trackball mouse barriers (#1079), but mouse becomes sluggish now. --- src/common/EventHandlerSDL.cxx | 2 ++ src/common/FBBackendSDL.cxx | 2 ++ 2 files changed, 4 insertions(+) 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); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -