mirror of https://github.com/mpv-player/mpv
Move vidmode to options struct
This commit is contained in:
parent
41d6879236
commit
0dc3a72273
|
@ -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),
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue