Bug#1023847: Patch for SDL_VIDEO_X11_NO_SHM environment variable

2022-11-11 Thread 王昊然
Further debugging shows this wasn't the root cause, instead the X BadShmSeg error is happening inside libGLX.so.0 function glXSwapBuffers, which is called from src/video/x11/SDL_x11opengl.c, function X11_GL_SwapWindow. As such I guess the bug may actually be in GLX. 2022-11-11 19:37 GMT+08:00,

Bug#1023847: Patch for SDL_VIDEO_X11_NO_SHM environment variable

2022-11-11 Thread 王昊然
--- src/video/x11/SDL_x11framebuffer.c.orig2022-01-08 10:29:52.0 +0800 +++ src/video/x11/SDL_x11framebuffer.c2022-11-11 19:27:12.527050231 +0800 @@ -42,6 +42,10 @@ static SDL_bool have_mitshm(Display *dpy) { +const char *no_shm = SDL_getenv("SDL_VIDEO_X11_NO_SHM"); +if(no_shm &&