cce11c4f1f
* Added a patch to MPlayer to fix the aspect ratio on screens rotated with Xrandr. * Disable toolbus for now because it requires a non-existant package (tcltk). svn path=/nixpkgs/trunk/; revision=5171
113 lines
3.7 KiB
Diff
113 lines
3.7 KiB
Diff
--- MPlayer/configure.orig 2005-08-21 23:47:47.000000000 +0200
|
|
+++ MPlayer/configure 2005-08-21 23:55:02.000000000 +0200
|
|
@@ -162,6 +162,7 @@
|
|
--enable-lircc enable LIRCCD (LIRC client daemon) input [autodetect]
|
|
--enable-joystick enable joystick support [disable]
|
|
--disable-vm disable support X video mode extensions [autodetect]
|
|
+ --disable-randr disable support for X resize and rotate extension [autodetect]
|
|
--disable-xf86keysym disable support for 'multimedia' keys [autodetect]
|
|
--disable-tv disable TV Interface (tv/dvb grabbers) [enable]
|
|
--disable-tv-v4l disable Video4Linux TV Interface support [autodetect]
|
|
@@ -252,6 +253,7 @@
|
|
--enable-xv build with Xv render support for X 4.x [autodetect]
|
|
--enable-xvmc build with XvMC acceleration for X 4.x [disable]
|
|
--enable-vm build with XF86VidMode support for X11 [autodetect]
|
|
+ --enable-randr build with XRandR support for X11 [autodetect]
|
|
--enable-xinerama build with Xinerama support for X11 [autodetect]
|
|
--enable-x11 build with X11 render support [autodetect]
|
|
--enable-fbdev build with FBDev render support [autodetect]
|
|
@@ -1351,6 +1353,7 @@
|
|
_mga=auto
|
|
_xmga=auto
|
|
_vm=auto
|
|
+_randr=auto
|
|
_xf86keysym=auto
|
|
_mlib=auto
|
|
_sgiaudio=auto
|
|
@@ -1562,6 +1565,8 @@
|
|
--disable-xmga) _xmga=no ;;
|
|
--enable-vm) _vm=yes ;;
|
|
--disable-vm) _vm=no ;;
|
|
+ --enable-randr) _randr=yes ;;
|
|
+ --disable-randr) _randr=no ;;
|
|
--enable-xf86keysym) _xf86keysym=yes ;;
|
|
--disable-xf86keysym) _xf86keysym=no ;;
|
|
--enable-mlib) _mlib=yes ;;
|
|
@@ -3603,6 +3608,25 @@
|
|
fi
|
|
echores "$_vm"
|
|
|
|
+# X Resize, Rotate and Reflect extension
|
|
+echocheck "Xrandr"
|
|
+if test "$_x11" = yes && test "$_randr" = auto; then
|
|
+ cat > $TMPC <<EOF
|
|
+#include <X11/Xlib.h>
|
|
+#include <X11/extensions/Xrandr.h>
|
|
+int main(void) { (void) XRRQueryExtension(0, 0, 0); return 0; }
|
|
+EOF
|
|
+ _randr=no
|
|
+ cc_check $_inc_x11 -lXrandr $_ld_x11 && _randr=yes
|
|
+fi
|
|
+if test "$_randr" = yes ; then
|
|
+ _def_randr='#define HAVE_XRANDR 1'
|
|
+ _ld_randr='-lXrandr'
|
|
+else
|
|
+ _def_randr='#undef HAVE_XRANDR'
|
|
+fi
|
|
+echores "$_randr"
|
|
+
|
|
# Check for the presence of special keycodes, like audio control buttons
|
|
# that XFree86 might have. Used to be bundled with the xf86vm check, but
|
|
# has nothing to do with xf86vm and XFree 3.x has xf86vm but does NOT
|
|
@@ -6762,7 +6786,7 @@
|
|
SLIBSUF=.so
|
|
|
|
# video output
|
|
-X_LIB = $_ld_gl $_ld_dga $_ld_xv $_ld_xvmc $_ld_vm $_ld_xinerama $_ld_x11 $_ld_sock
|
|
+X_LIB = $_ld_gl $_ld_dga $_ld_xv $_ld_xvmc $_ld_vm $_ld_randr $_ld_xinerama $_ld_x11 $_ld_sock
|
|
GGI_LIB = $_ld_ggi
|
|
MLIB_LIB = $_ld_mlib
|
|
MLIB_INC = $_inc_mlib
|
|
@@ -7465,6 +7489,7 @@
|
|
$_def_xv
|
|
$_def_xvmc
|
|
$_def_vm
|
|
+$_def_randr
|
|
$_def_xf86keysym
|
|
$_def_xinerama
|
|
$_def_gl
|
|
--- MPlayer/libvo/x11_common.c.orig 2005-08-21 23:56:20.000000000 +0200
|
|
+++ MPlayer/libvo/x11_common.c 2005-08-22 00:05:17.000000000 +0200
|
|
@@ -39,6 +39,10 @@
|
|
#include <X11/extensions/xf86vmode.h>
|
|
#endif
|
|
|
|
+#ifdef HAVE_XRANDR
|
|
+#include <X11/extensions/Xrandr.h>
|
|
+#endif
|
|
+
|
|
#ifdef HAVE_XF86XK
|
|
#include <X11/XF86keysym.h>
|
|
#endif
|
|
@@ -434,6 +438,20 @@
|
|
int clock;
|
|
|
|
XF86VidModeGetModeLine(mDisplay, mScreen, &clock, &modeline);
|
|
+#ifdef HAVE_XRANDR
|
|
+ {
|
|
+ Rotation current_rotation;
|
|
+
|
|
+ XRRRotations(mDisplay, mScreen, ¤t_rotation);
|
|
+ if ((current_rotation&RR_Rotate_90) != 0 ||
|
|
+ (current_rotation&RR_Rotate_270) != 0) {
|
|
+ unsigned short tmp;
|
|
+ tmp = modeline.hdisplay;
|
|
+ modeline.hdisplay = modeline.vdisplay;
|
|
+ modeline.vdisplay = tmp;
|
|
+ }
|
|
+ }
|
|
+#endif
|
|
if (!vo_screenwidth)
|
|
vo_screenwidth = modeline.hdisplay;
|
|
if (!vo_screenheight)
|