From 65ec88baf39263f0de83e7f993b0c58302a5ef6d Mon Sep 17 00:00:00 2001 From: RonaldReagan Date: Fri, 21 May 2021 21:53:20 -0600 Subject: [PATCH] Fix mouse capture behavior on MacOS #300 --- source/src/main.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/src/main.cpp b/source/src/main.cpp index d01b06ee..9d5c4d7e 100644 --- a/source/src/main.cpp +++ b/source/src/main.cpp @@ -1350,6 +1350,11 @@ int main(int argc, char **argv) SDL_SetWindowIcon(screen, icon); #endif +#ifdef __APPLE__ + // Fix https://github.com/assaultcube/AC/issues/300 + SDL_SetHintWithPriority(SDL_HINT_MOUSE_RELATIVE_MODE_WARP, "1", SDL_HINT_OVERRIDE); +#endif + SDL_ShowCursor(0); initlog("gl");