summaryrefslogtreecommitdiffstats
path: root/video/out/vo_sdl.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-02-24 23:36:40 +0100
committerwm4 <wm4@nowhere>2013-02-26 02:01:48 +0100
commit70346d3be623bc5edc31a15bd1ca205c33050219 (patch)
tree005f21e1e123cf86e6334e74213ad76479c339bb /video/out/vo_sdl.c
parentb23dce6d7cd66c11a770ce921659f7a19c804cf7 (diff)
downloadmpv-70346d3be623bc5edc31a15bd1ca205c33050219.tar.bz2
mpv-70346d3be623bc5edc31a15bd1ca205c33050219.tar.xz
video/out: remove video mode switching (--vm)
This allowed making the player switch the monitor video mode when creating the video window. This was a questionable feature, and with today's LCD screens certainly not useful anymore. Switching to a random video mode (going by video width/height) doesn't sound too useful either. I'm not sure about the win32 implementation, but the X part had several bugs. Even in mplayer-svn (where x11_common.c hasn't been receiving any larger changes for a long time), this code is buggy and doesn't do the right thing anyway. (And what the hell _did_ it do when using multiple physical monitors?) If you really want this, write a shell script that calls xrandr before and after calling mpv. vo_sdl still can do mode switching, because SDL has native support for it, and using it is trivial. Add a new sub-option for this.
Diffstat (limited to 'video/out/vo_sdl.c')
-rw-r--r--video/out/vo_sdl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/video/out/vo_sdl.c b/video/out/vo_sdl.c
index e9967f37e5..99829aefa6 100644
--- a/video/out/vo_sdl.c
+++ b/video/out/vo_sdl.c
@@ -197,6 +197,7 @@ struct priv {
// options
int allow_sw;
+ int switch_mode;
};
static bool is_good_renderer(SDL_RendererInfo *ri,
@@ -370,11 +371,10 @@ static void check_resize(struct vo *vo)
static void set_fullscreen(struct vo *vo, int fs)
{
struct priv *vc = vo->priv;
- struct MPOpts *opts = vo->opts;
Uint32 fs_flags = 0;
if (fs) {
- if (opts->vidmode)
+ if (vc->switch_mode)
fs_flags |= SDL_WINDOW_FULLSCREEN;
else
fs_flags |= SDL_WINDOW_FULLSCREEN_DESKTOP;
@@ -1036,6 +1036,7 @@ const struct vo_driver video_out_sdl = {
},
.options = (const struct m_option []){
OPT_FLAG("sw", allow_sw, 0),
+ OPT_FLAG("switch-mode", switch_mode, 0),
{NULL}
},
.preinit = preinit,