diff options
author | wm4 <wm4@nowhere> | 2016-10-02 12:33:34 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-10-02 12:33:34 +0200 |
commit | 39fc5e1deb0c5753e7123529e4dd5c750aed1e8d (patch) | |
tree | 92b460dc2802ccf34c3ea413370daa98428f7a1e /player/video.c | |
parent | e3a57272a712542e739b97db31efebc4cc17c53a (diff) | |
download | mpv-39fc5e1deb0c5753e7123529e4dd5c750aed1e8d.tar.bz2 mpv-39fc5e1deb0c5753e7123529e4dd5c750aed1e8d.tar.xz |
player: make --stop-screensaver runtime-changeable
Move the screensaver enable/disable determination to a central place,
and call it if the stop-screensaver property is changed.
Also, do not stop the screensaver when in idle mode (i.e. no file is
loaded).
Fixes #3615.
Diffstat (limited to 'player/video.c')
-rw-r--r-- | player/video.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/player/video.c b/player/video.c index 69128025b7..ff72f92d8e 100644 --- a/player/video.c +++ b/player/video.c @@ -449,7 +449,6 @@ int reinit_video_chain(struct MPContext *mpctx) int reinit_video_chain_src(struct MPContext *mpctx, struct lavfi_pad *src) { - struct MPOpts *opts = mpctx->opts; struct track *track = NULL; struct sh_stream *sh = NULL; if (!src) { @@ -513,9 +512,7 @@ int reinit_video_chain_src(struct MPContext *mpctx, struct lavfi_pad *src) recreate_video_filters(mpctx); - bool saver_state = opts->pause || !opts->stop_screensaver; - vo_control(vo_c->vo, saver_state ? VOCTRL_RESTORE_SCREENSAVER - : VOCTRL_KILL_SCREENSAVER, NULL); + update_screensaver_state(mpctx); vo_set_paused(vo_c->vo, mpctx->paused); |