Resolves concerns from e4907bdb6e. Fixes #6395

Tested By: Langbart, nwtour
Differential Revision: https://code.wildfiregames.com/D4370
This was SVN commit r26051.
This commit is contained in:
Vladislav Belov 2021-12-10 21:29:40 +00:00
parent 9cb6e4c105
commit 5e61febf16

View File

@ -428,7 +428,12 @@ bool CVideoMode::InitSDL()
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 2);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 0);
#else
// Some macOS and MESA drivers might not create a context even if they can
// with the core profile. So disable it for a while until we can guarantee
// its creation.
#if OS_WIN
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);
#endif
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 2);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 1);
#endif