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;