[MPlayer-dev-eng] [RFC] keep fullscreen mode over aspect, file etc. change if set by user
Reimar Döffinger
Reimar.Doeffinger at stud.uni-karlsruhe.de
Tue Jun 26 16:02:15 CEST 2007
Hello,
Please test and comment attached patch.
Greetings,
Reimar Döffinger
-------------- next part --------------
Index: libvo/video_out.c
===================================================================
--- libvo/video_out.c (revision 23664)
+++ libvo/video_out.c (working copy)
@@ -32,6 +32,10 @@
int vo_config_count=0;
+int vo_user_override;
+int vo_user_fs;
+int vo_user_x;
+int vo_user_y;
// requested resolution/bpp: (-x -y -bpp options)
int vo_dx=0;
int vo_dy=0;
@@ -339,10 +343,16 @@
vo_screenwidth, vo_screenheight);
vo_dx += xinerama_x;
vo_dy += xinerama_y;
- vo_dwidth = d_width;
- vo_dheight = d_height;
}
+ if (vo_user_override & VO_USER_OVERRIDE_FS) {
+ if (vo_user_fs) flags |= VOFLAG_FULLSCREEN;
+ else flags &= ~VOFLAG_FULLSCREEN;
+ }
+ if (vo_user_override & VO_USER_OVERRIDE_POS) {
+ vo_dx = vo_user_x;
+ vo_dy = vo_user_y;
+ }
return vo->config(width, height, d_width, d_height, flags, title, format);
}
Index: libvo/video_out.h
===================================================================
--- libvo/video_out.h (revision 23664)
+++ libvo/video_out.h (working copy)
@@ -21,6 +21,13 @@
#define VO_EVENT_RESIZE 2
#define VO_EVENT_KEYPRESS 4
+#define VO_USER_OVERRIDE_FS 1
+#define VO_USER_OVERRIDE_POS 2
+extern int vo_user_override;
+extern int vo_user_fs;
+extern int vo_user_x;
+extern int vo_user_y;
+
/* Obsolete: VOCTRL_QUERY_VAA 1 */
/* does the device support the required format */
#define VOCTRL_QUERY_FORMAT 2
Index: libvo/vo_gl.c
===================================================================
--- libvo/vo_gl.c (revision 23664)
+++ libvo/vo_gl.c (working copy)
@@ -965,6 +965,8 @@
return VO_TRUE;
case VOCTRL_FULLSCREEN:
vo_fullscreen();
+ vo_user_override |= VO_USER_OVERRIDE_FS;
+ vo_user_fs = vo_fs;
resize(vo_dwidth, vo_dheight);
return VO_TRUE;
#ifdef GL_WIN32
Index: libvo/vo_xv.c
===================================================================
--- libvo/vo_xv.c (revision 23664)
+++ libvo/vo_xv.c (working copy)
@@ -898,6 +898,8 @@
return VO_TRUE;
case VOCTRL_FULLSCREEN:
vo_x11_fullscreen();
+ vo_user_override |= VO_USER_OVERRIDE_FS;
+ vo_user_fs = vo_fs;
/* indended, fallthrough to update panscan on fullscreen/windowed switch */
case VOCTRL_SET_PANSCAN:
if ((vo_fs && (vo_panscan != vo_panscan_amount))
More information about the MPlayer-dev-eng
mailing list