[Mplayer-cvslog] CVS: main/libvo x11_common.c,1.57,1.58
Atmosfear
atmos4 at mplayer.dev.hu
Sun Mar 10 09:16:10 CET 2002
Update of /cvsroot/mplayer/main/libvo
In directory mplayer:/var/tmp.root/cvs-serv332/libvo
Modified Files:
x11_common.c
Log Message:
VM fixes by Nilmoni Deb.
Index: x11_common.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/x11_common.c,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -r1.57 -r1.58
--- x11_common.c 8 Mar 2002 20:14:08 -0000 1.57
+++ x11_common.c 10 Mar 2002 08:16:07 -0000 1.58
@@ -672,16 +672,27 @@
void vo_vm_close(Display *dpy)
{
#ifdef HAVE_NEW_GUI
- if ((vidmodes!=NULL)&&( vo_window == None ) )
+ if (vidmodes!=NULL && vo_window != None)
#else
if (vidmodes!=NULL)
#endif
- {
- int screen; screen=DefaultScreen( dpy );
- XF86VidModeSwitchToMode(dpy,screen,vidmodes[0]);
- XF86VidModeSwitchToMode(dpy,screen,vidmodes[0]);
- free(vidmodes);
- }
+ {
+ int i, modecount;
+ int screen; screen=DefaultScreen( dpy );
+
+ free(vidmodes); vidmodes=NULL;
+ XF86VidModeGetAllModeLines(mDisplay,mScreen,&modecount,&vidmodes);
+ for (i=0; i<modecount; i++)
+ if ((vidmodes[i]->hdisplay == vo_screenwidth) && (vidmodes[i]->vdisplay == vo_screenheight))
+ {
+ printf("\nReturning to original mode %dx%d\n", vo_screenwidth, vo_screenheight);
+ break;
+ }
+
+ XF86VidModeSwitchToMode(dpy,screen,vidmodes[i]);
+ XF86VidModeSwitchToMode(dpy,screen,vidmodes[i]);
+ free(vidmodes);
+ }
}
#endif
More information about the MPlayer-cvslog
mailing list