summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUoti Urpala <uau@symbol.nonexistent.invalid>2008-04-24 07:01:53 +0300
committerUoti Urpala <uau@symbol.nonexistent.invalid>2008-04-25 03:34:27 +0300
commit0dc3a72273127e28aec60b39373b48ad8da80c57 (patch)
tree58aaa964583452f8e0258808785ae589972ae9f0
parent41d6879236d2792300c57fc9825878ba4f634edd (diff)
downloadmpv-0dc3a72273127e28aec60b39373b48ad8da80c57.tar.bz2
mpv-0dc3a72273127e28aec60b39373b48ad8da80c57.tar.xz
Move vidmode to options struct
-rw-r--r--cfg-mplayer.h5
-rw-r--r--libmpcodecs/vd.c5
-rw-r--r--libvo/old_vo_defines.h1
-rw-r--r--libvo/vo_directx.c2
-rw-r--r--options.h1
5 files changed, 6 insertions, 8 deletions
diff --git a/cfg-mplayer.h b/cfg-mplayer.h
index 398e9100ab..1d20fe1fd7 100644
--- a/cfg-mplayer.h
+++ b/cfg-mplayer.h
@@ -25,7 +25,6 @@ extern char *vo_geometry;
extern int opt_screen_size_x;
extern int opt_screen_size_y;
-extern int vidmode;
extern char *ao_outputfilename;
extern int ao_pcm_waveheader;
@@ -175,8 +174,8 @@ const m_option_t mplayer_opts[]={
{"monitoraspect", &force_monitor_aspect, CONF_TYPE_FLOAT, CONF_RANGE, 0.0, 9.0, NULL},
{"monitorpixelaspect", &monitor_pixel_aspect, CONF_TYPE_FLOAT, CONF_RANGE, 0.2, 9.0, NULL},
// video mode switching: (x11,xv,dga)
- {"vm", &vidmode, CONF_TYPE_FLAG, 0, 0, 1, NULL},
- {"novm", &vidmode, CONF_TYPE_FLAG, 0, 1, 0, NULL},
+ OPT_FLAG_ON("vm", vidmode, 0),
+ OPT_FLAG_OFF("novm", vidmode, 0),
// start in fullscreen mode:
OPT_FLAG_ON("fs", fullscreen, 0),
OPT_FLAG_OFF("nofs", fullscreen, 0),
diff --git a/libmpcodecs/vd.c b/libmpcodecs/vd.c
index 4362b2360a..c123423411 100644
--- a/libmpcodecs/vd.c
+++ b/libmpcodecs/vd.c
@@ -111,7 +111,6 @@ vd_functions_t* mpcodecs_vd_drivers[] = {
#include "libvo/video_out.h"
// libvo opts:
-int vidmode=0;
int softzoom=0;
int flip=-1;
int opt_screen_size_x=0;
@@ -255,7 +254,7 @@ csp_again:
if(opt_screen_size_x||opt_screen_size_y){
screen_size_x = opt_screen_size_x;
screen_size_y = opt_screen_size_y;
- if(!vidmode){
+ if(!opts->vidmode){
if(!screen_size_x) screen_size_x=SCREEN_SIZE_X;
if(!screen_size_y) screen_size_y=SCREEN_SIZE_Y;
if(screen_size_x<=8) screen_size_x*=sh->disp_w;
@@ -292,7 +291,7 @@ csp_again:
}
vocfg_flags = (opts->fullscreen ? VOFLAG_FULLSCREEN:0)
- | (vidmode ? VOFLAG_MODESWITCHING:0)
+ | (opts->vidmode ? VOFLAG_MODESWITCHING:0)
| (softzoom ? VOFLAG_SWSCALE:0)
| (flip ? VOFLAG_FLIPPING:0);
diff --git a/libvo/old_vo_defines.h b/libvo/old_vo_defines.h
index a092589377..db3084373e 100644
--- a/libvo/old_vo_defines.h
+++ b/libvo/old_vo_defines.h
@@ -17,4 +17,5 @@
#define vo_dbpp global_vo->opts->vo_dbpp
#define vo_screenwidth global_vo->opts->vo_screenwidth
#define vo_screenheight global_vo->opts->vo_screenheight
+#define vidmode global_vo->opts->vidmode
#endif
diff --git a/libvo/vo_directx.c b/libvo/vo_directx.c
index 5d3bd355e3..b56f39b36b 100644
--- a/libvo/vo_directx.c
+++ b/libvo/vo_directx.c
@@ -87,8 +87,6 @@ static float window_aspect;
static BOOL (WINAPI* myGetMonitorInfo)(HMONITOR, LPMONITORINFO) = NULL;
static RECT last_rect = {0xDEADC0DE, 0xDEADC0DE, 0xDEADC0DE, 0xDEADC0DE};
-extern int vidmode;
-
/*****************************************************************************
* DirectDraw GUIDs.
* Defining them here allows us to get rid of the dxguid library during
diff --git a/options.h b/options.h
index 6048a6af99..55fbedb895 100644
--- a/options.h
+++ b/options.h
@@ -8,6 +8,7 @@ typedef struct MPOpts {
int vo_ontop;
int vo_screenwidth;
int vo_screenheight;
+ int vidmode;
int fullscreen;
int vo_dbpp;
int correct_pts;