[MPlayer-dev-eng] [MPlayer-users] [PATCH] fix in screen resolution detection by the gui

Philippe Dumont dumont at lifl.fr
Wed May 5 10:44:28 CEST 2004


Hello,

the screen resolution detection is not the same in
MPlayer-1.0pre4/Gui/wm/ws.c and in MPlayer-1.0pre4/libvo/x11_common.c It
can produce "strange" result in fullscreen mode using the mplayer gui.

The problem is simple : i have an ati radeon and two screens, i want to
use graphic acceleration, but it's not compatible with xinerama (with the
ati drivers fglrx). So i use the one big screen option from fglrxconfig
and my two screens are detected as only one with a resolution of 2048x768.
When i use mplayer in fullscreen the video is in one screen (x11_common.c)
and the menu is in the middle between the two screens.
The patch try to fix it.

I hope the patch is correct and it can help you.

Philippe

PS : the video in fullscreen is always in the same screen wsOrgX and
wsOrgY are equal to zero. Is there's a way to solve this problem ???
-------------- next part --------------
40a41,44
> #ifdef HAVE_XF86VM
> #include <X11/extensions/xf86vmode.h>
> #endif
> 
233a238
> 
251a257,267
> #ifdef HAVE_XF86VM
>     {
>       int clock;
>       XF86VidModeModeLine modeline;
> 
>       wsOrgX = wsOrgY = 0;
>       XF86VidModeGetModeLine( wsDisplay,wsScreen,&clock ,&modeline );
>       wsMaxX=modeline.hdisplay;
>       wsMaxY=modeline.vdisplay;
>     }
> #endif
253,255c269,272
<  wsOrgX = wsOrgY = 0;
<  wsMaxX=DisplayWidth( wsDisplay,wsScreen );
<  wsMaxY=DisplayHeight( wsDisplay,wsScreen );
---
>    if ( !wsOrgX ) wsOrgX = 0;
>    if ( !wsOrgY ) wsOrgY = 0;
>    if ( !wsMaxX ) wsMaxX=DisplayWidth( wsDisplay,wsScreen );
>    if ( !wsMaxY ) wsMaxY=DisplayHeight( wsDisplay,wsScreen );
754d770
< 


More information about the MPlayer-dev-eng mailing list