From 98cc5f70c25e2aaa971a38925a71af9928292f4e Mon Sep 17 00:00:00 2001 From: EmeraldLockdown Date: Fri, 3 Jul 2026 02:13:44 -0500 Subject: [PATCH] Dont break macos opengl :pray: --- src/pc/gfx/gfx_sdl.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/pc/gfx/gfx_sdl.c b/src/pc/gfx/gfx_sdl.c index fe5081ad5..c4f84cf06 100644 --- a/src/pc/gfx/gfx_sdl.c +++ b/src/pc/gfx/gfx_sdl.c @@ -133,15 +133,19 @@ static void gfx_sdl_init(const char *window_title) { SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24); SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1); - #ifdef USE_GLES +#ifdef USE_GLES SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 2); // These attributes allow for hardware acceleration on RPis. SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 0); SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_ES); - #else +#else SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 4); +#ifdef OSX_BUILD + SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 1); +#else SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 5); +#endif SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE); - #endif +#endif } int xpos = (configWindow.x == WAPI_WIN_CENTERPOS) ? SDL_WINDOWPOS_CENTERED : configWindow.x;