From 39fc5e1deb0c5753e7123529e4dd5c750aed1e8d Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 2 Oct 2016 12:33:34 +0200 Subject: 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. --- player/video.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'player/video.c') 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); -- cgit v1.2.3