@@ -0,0 +1,112 @@
1+--- MPlayer/configure.orig 2005-08-21 23:47:47.000000000 +0200
2++++ MPlayer/configure 2005-08-21 23:55:02.000000000 +0200
3+@@ -162,6 +162,7 @@
4+ --enable-lircc enable LIRCCD (LIRC client daemon) input [autodetect]
5+ --enable-joystick enable joystick support [disable]
6+ --disable-vm disable support X video mode extensions [autodetect]
7++ --disable-randr disable support for X resize and rotate extension [autodetect]
8+ --disable-xf86keysym disable support for 'multimedia' keys [autodetect]
9+ --disable-tv disable TV Interface (tv/dvb grabbers) [enable]
10+ --disable-tv-v4l disable Video4Linux TV Interface support [autodetect]
11+@@ -252,6 +253,7 @@
12+ --enable-xv build with Xv render support for X 4.x [autodetect]
13+ --enable-xvmc build with XvMC acceleration for X 4.x [disable]
14+ --enable-vm build with XF86VidMode support for X11 [autodetect]
15++ --enable-randr build with XRandR support for X11 [autodetect]
16+ --enable-xinerama build with Xinerama support for X11 [autodetect]
17+ --enable-x11 build with X11 render support [autodetect]
18+ --enable-fbdev build with FBDev render support [autodetect]
19+@@ -1351,6 +1353,7 @@
20+ _mga=auto
21+ _xmga=auto
22+ _vm=auto
23++_randr=auto
24+ _xf86keysym=auto
25+ _mlib=auto
26+ _sgiaudio=auto
27+@@ -1562,6 +1565,8 @@
28+ --disable-xmga) _xmga=no ;;
29+ --enable-vm) _vm=yes ;;
30+ --disable-vm) _vm=no ;;
31++ --enable-randr) _randr=yes ;;
32++ --disable-randr) _randr=no ;;
33+ --enable-xf86keysym) _xf86keysym=yes ;;
34+ --disable-xf86keysym) _xf86keysym=no ;;
35+ --enable-mlib) _mlib=yes ;;
36+@@ -3603,6 +3608,25 @@
37+ fi
38+ echores "$_vm"
39+
40++# X Resize, Rotate and Reflect extension
41++echocheck "Xrandr"
42++if test "$_x11" = yes && test "$_randr" = auto; then
43++ cat > $TMPC <<EOF
44++#include <X11/Xlib.h>
45++#include <X11/extensions/Xrandr.h>
46++int main(void) { (void) XRRQueryExtension(0, 0, 0); return 0; }
47++EOF
48++ _randr=no
49++ cc_check $_inc_x11 -lXrandr $_ld_x11 && _randr=yes
50++fi
51++if test "$_randr" = yes ; then
52++ _def_randr='#define HAVE_XRANDR 1'
53++ _ld_randr='-lXrandr'
54++else
55++ _def_randr='#undef HAVE_XRANDR'
56++fi
57++echores "$_randr"
58++
59+ # Check for the presence of special keycodes, like audio control buttons
60+ # that XFree86 might have. Used to be bundled with the xf86vm check, but
61+ # has nothing to do with xf86vm and XFree 3.x has xf86vm but does NOT
62+@@ -6762,7 +6786,7 @@
63+ SLIBSUF=.so
64+
65+ # video output
66+-X_LIB = $_ld_gl $_ld_dga $_ld_xv $_ld_xvmc $_ld_vm $_ld_xinerama $_ld_x11 $_ld_sock
67++X_LIB = $_ld_gl $_ld_dga $_ld_xv $_ld_xvmc $_ld_vm $_ld_randr $_ld_xinerama $_ld_x11 $_ld_sock
68+ GGI_LIB = $_ld_ggi
69+ MLIB_LIB = $_ld_mlib
70+ MLIB_INC = $_inc_mlib
71+@@ -7465,6 +7489,7 @@
72+ $_def_xv
73+ $_def_xvmc
74+ $_def_vm
75++$_def_randr
76+ $_def_xf86keysym
77+ $_def_xinerama
78+ $_def_gl
79+--- MPlayer/libvo/x11_common.c.orig 2005-08-21 23:56:20.000000000 +0200
80++++ MPlayer/libvo/x11_common.c 2005-08-22 00:05:17.000000000 +0200
81+@@ -39,6 +39,10 @@
82+ #include <X11/extensions/xf86vmode.h>
83+ #endif
84+
85++#ifdef HAVE_XRANDR
86++#include <X11/extensions/Xrandr.h>
87++#endif
88++
89+ #ifdef HAVE_XF86XK
90+ #include <X11/XF86keysym.h>
91+ #endif
92+@@ -434,6 +438,20 @@
93+ int clock;
94+
95+ XF86VidModeGetModeLine(mDisplay, mScreen, &clock, &modeline);
96++#ifdef HAVE_XRANDR
97++ {
98++ Rotation current_rotation;
99++
100++ XRRRotations(mDisplay, mScreen, ¤t_rotation);
101++ if ((current_rotation&RR_Rotate_90) != 0 ||
102++ (current_rotation&RR_Rotate_270) != 0) {
103++ unsigned short tmp;
104++ tmp = modeline.hdisplay;
105++ modeline.hdisplay = modeline.vdisplay;
106++ modeline.vdisplay = tmp;
107++ }
108++ }
109++#endif
110+ if (!vo_screenwidth)
111+ vo_screenwidth = modeline.hdisplay;
112+ if (!vo_screenheight)