Date: Tue, 22 Feb 2005 17:09:16 +0900
From: Aric Cyr
To: sdl@libsdl.org
Subject: [SDL] [PATCH] XRandR video mode support
Index: configure.in
===================================================================
RCS file: /home/sdlweb/libsdl.org/cvs/SDL12/configure.in,v
retrieving revision 1.163
diff -u -5 -r1.163 configure.in
--- configure.in 12 Feb 2005 18:01:29 -0000 1.163
+++ configure.in 22 Feb 2005 07:19:07 -0000
@@ -716,10 +716,30 @@
CFLAGS="$CFLAGS -DHAVE_XINERAMA"
VIDEO_SUBDIRS="$VIDEO_SUBDIRS XFree86/Xinerama"
VIDEO_DRIVERS="$VIDEO_DRIVERS XFree86/Xinerama/libXFree86_Xinerama.la"
fi
fi
+ AC_ARG_ENABLE(video-x11-xrandr,
+[ --enable-video-x11-xrandr enable X11 Xrandr extension for fullscreen [default=yes]],
+ , enable_video_x11_xrandr=yes)
+ if test x$enable_video_x11_xrandr = xyes; then
+ AC_MSG_CHECKING(for X11 Xrandr support)
+ video_x11_xrandr=no
+ AC_TRY_COMPILE([
+ #include
+ #include
+ ],[
+ XRRScreenConfiguration *config;
+ ],[
+ video_x11_xrandr=yes
+ ])
+ AC_MSG_RESULT($video_x11_xrandr)
+ if test x$video_x11_xrandr = xyes; then
+ CFLAGS="$CFLAGS -DHAVE_XRANDR"
+ SYSTEM_LIBS="$SYSTEM_LIBS -lXrandr -lXrender"
+ fi
+ fi
AC_ARG_ENABLE(video-x11-xme,
[ --enable-video-x11-xme enable Xi Graphics XME for fullscreen [default=yes]],
, enable_video_x11_xme=yes)
if test x$enable_video_x11_xme = xyes; then
AC_MSG_CHECKING(for Xi Graphics XiGMiscExtension support)
Index: docs/html/sdlenvvars.html
===================================================================
RCS file: /home/sdlweb/libsdl.org/cvs/SDL12/docs/html/sdlenvvars.html,v
retrieving revision 1.1
diff -u -5 -r1.1 sdlenvvars.html
--- docs/html/sdlenvvars.html 10 Feb 2004 15:15:39 -0000 1.1
+++ docs/html/sdlenvvars.html 22 Feb 2005 07:19:07 -0000
@@ -574,10 +574,22 @@
algorithm. It can be in decimal or in hex (prefixed by 0x).
SDL_VIDEO_X11_NO_XRANDRIf set, don't attempt to use the Xrandr extension for resolution mode
+switching. Normally Xrandr takes precedence over the XF86VidMode
+extension, so setting this environment variable will cause the
+XF86VidMode extension to be used if it is available.
SDL_VIDEO_YUV_DIRECTIf set, display YUV overlay directly on the video surface if possible,
@@ -1207,6 +1219,6 @@
>