summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorStefano Pigozzi <stefano.pigozzi@gmail.com>2013-02-17 16:35:44 +0100
committerStefano Pigozzi <stefano.pigozzi@gmail.com>2013-02-21 22:23:08 +0100
commite540e5d4da607420cc10f4c2b412aa0ff3d1fb5c (patch)
tree1355bc1cfbce42f775d12ac95f664acb7eb37f86 /core
parent41c1749f46e0e36af39be2487ee992cbf18e6679 (diff)
downloadmpv-e540e5d4da607420cc10f4c2b412aa0ff3d1fb5c.tar.bz2
mpv-e540e5d4da607420cc10f4c2b412aa0ff3d1fb5c.tar.xz
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.
Diffstat (limited to 'core')
-rw-r--r--core/cfg-mplayer.h3
-rw-r--r--core/defaultopts.c1
-rw-r--r--core/options.h1
3 files changed, 5 insertions, 0 deletions
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;