Merge pull request #8661 from DynamoFox/workaround-glew-on-wayland-partial-init

Workaround GLEW error code on init with Wayland
This commit is contained in:
Jupeyy 2024-08-29 18:21:08 +00:00 committed by GitHub
commit 98b0f50111
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -443,7 +443,9 @@ static bool BackendInitGlew(EBackendType BackendType, int &GlewMajor, int &GlewM
#ifdef CONF_GLEW_HAS_CONTEXT_INIT #ifdef CONF_GLEW_HAS_CONTEXT_INIT
if(GLEW_OK != glewContextInit()) if(GLEW_OK != glewContextInit())
#else #else
if(GLEW_OK != glewInit()) GLenum InitResult = glewInit();
const char *pVideoDriver = SDL_GetCurrentVideoDriver();
if(GLEW_OK != InitResult && pVideoDriver && !str_comp(pVideoDriver, "wayland") && GLEW_ERROR_NO_GLX_DISPLAY != InitResult)
#endif #endif
return false; return false;