From e540e5d4da607420cc10f4c2b412aa0ff3d1fb5c Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Sun, 17 Feb 2013 16:35:44 +0100 Subject: core: add fs-screen option for fullscreen display selection `--fs-screen` allows to decide what display to go fullscreen into. The semantics of `--screen` changed and now it is only used to select the windowed display when starting the application. This is useful for people using mpv with an external TV. They will start windowed on their laptop's screen and switch to fullscreen on the TV. @wm4 worked on the x11 and w32 parts of the code. All is squashed in one commit for history clarity. --- core/cfg-mplayer.h | 3 +++ core/defaultopts.c | 1 + core/options.h | 1 + 3 files changed, 5 insertions(+) (limited to 'core') diff --git a/core/cfg-mplayer.h b/core/cfg-mplayer.h index 23c4bedee8..3a79702959 100644 --- a/core/cfg-mplayer.h +++ b/core/cfg-mplayer.h @@ -613,6 +613,9 @@ const m_option_t mplayer_opts[]={ {"mouseinput", &vo_nomouse_input, CONF_TYPE_FLAG, 0, 1, 0, NULL}, OPT_CHOICE_OR_INT("screen", vo_screen_id, 0, 0, 32, + ({"default", -1})), + + OPT_CHOICE_OR_INT("fs-screen", vo_fsscreen_id, 0, 0, 32, ({"all", -2}, {"current", -1})), OPT_INTRANGE("brightness", vo_gamma_brightness, 0, -100, 100), diff --git a/core/defaultopts.c b/core/defaultopts.c index b6e7f28524..a3c315b186 100644 --- a/core/defaultopts.c +++ b/core/defaultopts.c @@ -23,6 +23,7 @@ void set_default_mplayer_options(struct MPOpts *opts) .vo_panscanrange = 1.0, .cursor_autohide_delay = 1000, .vo_screen_id = -1, + .vo_fsscreen_id = -1, .vo_gamma_gamma = 1000, .vo_gamma_brightness = 1000, .vo_gamma_contrast = 1000, diff --git a/core/options.h b/core/options.h index 8e64c07723..254af2e241 100644 --- a/core/options.h +++ b/core/options.h @@ -19,6 +19,7 @@ typedef struct MPOpts { int vo_screenwidth; int vo_screenheight; int vo_screen_id; + int vo_fsscreen_id; struct m_geometry vo_geometry; struct m_geometry vo_autofit; struct m_geometry vo_autofit_larger; -- cgit v1.2.3