mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-09 17:48:19 +00:00
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:
commit
98b0f50111
|
@ -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;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue