Fix error during glew loading under Wayland

Solution taken from Supertux: https://github.com/SuperTux/supertux/pull/808
This commit is contained in:
Ian Douglas Scott 2020-04-11 18:58:54 -07:00
parent ff14e8ca35
commit 14b7eadc45
No known key found for this signature in database
GPG Key ID: 4924E10E199B5959

View File

@ -204,6 +204,11 @@ void OpenGLSdlGraphicsManager::createOrUpdateScreen() {
#ifdef USE_GLEW
GLenum err = glewInit();
#ifdef GLEW_ERROR_NO_GLX_DISPLAY
if (err == GLEW_ERROR_NO_GLX_DISPLAY) {
// Wayland: https://github.com/nigels-com/glew/issues/172
} else
#endif
if (err != GLEW_OK) {
warning("Error: %s", glewGetErrorString(err));
g_system->quit();