mirror of
https://github.com/nunuhara/xsystem4.git
synced 2026-10-10 08:18:14 +03:00
Fix crash when SDL_VIDEODRIVER=wayland
glewInit returns an error when using the SDL wayland backend because distro-provided packages are built for GLX instead of EGL.
This commit is contained in:
+2
-1
@@ -183,7 +183,8 @@ int gfx_init(void)
|
||||
ERROR("SDL_GL_CreateContext failed: %s", SDL_GetError());
|
||||
|
||||
glewExperimental = GL_TRUE;
|
||||
if (glewInit() != GLEW_OK)
|
||||
GLenum err = glewInit();
|
||||
if (err != GLEW_OK && err != GLEW_ERROR_NO_GLX_DISPLAY)
|
||||
ERROR("glewInit failed");
|
||||
|
||||
SDL_GL_SetSwapInterval(0);
|
||||
|
||||
Reference in New Issue
Block a user