summaryrefslogtreecommitdiffstats
path: root/options/options.c
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2022-02-18 14:39:25 -0600
committerDudemanguy <random342@airmail.cc>2022-02-18 22:04:08 +0000
commit27c38eac1040cd781f39d977ce53adcd65ddcfb6 (patch)
treec14b81de97c5b6c1581dac26d0aa55c268ff70b9 /options/options.c
parentbeac97ba0740982ec82bf1081821295ef6ba5b3e (diff)
downloadmpv-27c38eac1040cd781f39d977ce53adcd65ddcfb6.tar.bz2
mpv-27c38eac1040cd781f39d977ce53adcd65ddcfb6.tar.xz
options: add always to stop-screensaver
The stop-screensaver option is currently limited to a simple yes/no option. While the no option does always disable mpv trying to stop the screensaver, yes does not mean the screensaver is always stopped. The screensaver will be enabled again depending on certain conditions (like if the player is paused). Simply introduce a new value for this option, always, which does exactly what the name implies: the screensaver will always be disabled.
Diffstat (limited to 'options/options.c')
-rw-r--r--options/options.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/options/options.c b/options/options.c
index 1341cb891c..64d7f9146e 100644
--- a/options/options.c
+++ b/options/options.c
@@ -648,7 +648,11 @@ static const m_option_t mp_opts[] = {
{"cursor-autohide", OPT_CHOICE(cursor_autohide_delay,
{"no", -1}, {"always", -2}), M_RANGE(0, 30000)},
{"cursor-autohide-fs-only", OPT_FLAG(cursor_autohide_fs)},
- {"stop-screensaver", OPT_FLAG(stop_screensaver), .flags = UPDATE_SCREENSAVER},
+ {"stop-screensaver", OPT_CHOICE(stop_screensaver,
+ {"no", 0},
+ {"yes", 1},
+ {"always", 2}),
+ .flags = UPDATE_SCREENSAVER},
{"", OPT_SUBSTRUCT(video_equalizer, mp_csp_equalizer_conf)},