From 27c38eac1040cd781f39d977ce53adcd65ddcfb6 Mon Sep 17 00:00:00 2001 From: Dudemanguy Date: Fri, 18 Feb 2022 14:39:25 -0600 Subject: 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. --- options/options.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'options/options.c') 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)}, -- cgit v1.2.3