From 3104e669bf43f11f686a5d0a6dfff5b8bbda9392 Mon Sep 17 00:00:00 2001 From: Edgar Date: Tue, 9 May 2023 14:46:14 +0200 Subject: [PATCH] set SDL_MAC_OPENGL_ASYNC_DISPATCH sdl hint to fix macos resizing --- src/engine/client/client.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/engine/client/client.cpp b/src/engine/client/client.cpp index a4ca7d332..06cf8f57d 100644 --- a/src/engine/client/client.cpp +++ b/src/engine/client/client.cpp @@ -4715,6 +4715,12 @@ int main(int argc, const char **argv) pClient->ShellRegister(); #endif +#if defined(CONF_PLATFORM_MACOS) + // Hints will not be set if there is an existing override hint or environment variable that takes precedence. + // So this respects cli environment overrides. + SDL_SetHint("SDL_MAC_OPENGL_ASYNC_DISPATCH", "1"); +#endif + // init SDL if(SDL_Init(0) < 0) {