Bug#1023847: Patch for SDL_VIDEO_X11_NO_SHM environment variable

王昊然 msl0000023508 at gmail.com
Fri Nov 11 11:37:27 GMT 2022


--- src/video/x11/SDL_x11framebuffer.c.orig2022-01-08 10:29:52.000000000 +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 && *no_shm) {
+        return SDL_FALSE;
+    }
     /* Only use shared memory on local X servers */
     return X11_XShmQueryExtension(dpy) ? SDL_X11_HAVE_SHM : SDL_FALSE;
 }



More information about the Pkg-sdl-maintainers mailing list