diff options
author | James Ross-Gowan <rossymiles@gmail.com> | 2015-04-20 20:24:19 +1000 |
---|---|---|
committer | James Ross-Gowan <rossymiles@gmail.com> | 2015-04-20 20:24:19 +1000 |
commit | 88d30586814f86297ce98edb5c45678fe58625f7 (patch) | |
tree | b6e9d078caa845996c1d37d34abbe25e25d0e280 | |
parent | 34d5b73fbbae87db10e4503a363753ea60ba0b24 (diff) | |
download | mpv-88d30586814f86297ce98edb5c45678fe58625f7.tar.bz2 mpv-88d30586814f86297ce98edb5c45678fe58625f7.tar.xz |
w32_common: prevent system sleep
This prevents the machine from going to sleep while a video-only stream
is playing. When audio is playing, the audio stack should make this
request for us.
-rw-r--r-- | video/out/w32_common.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/video/out/w32_common.c b/video/out/w32_common.c index e1ec3ad8e9..b208666e0c 100644 --- a/video/out/w32_common.c +++ b/video/out/w32_common.c @@ -1316,7 +1316,8 @@ static int gui_thread_control(struct vo_w32_state *w32, int request, void *arg) return VO_TRUE; case VOCTRL_KILL_SCREENSAVER: w32->disable_screensaver = true; - SetThreadExecutionState(ES_CONTINUOUS | ES_DISPLAY_REQUIRED); + SetThreadExecutionState(ES_CONTINUOUS | ES_SYSTEM_REQUIRED | + ES_DISPLAY_REQUIRED); return VO_TRUE; case VOCTRL_RESTORE_SCREENSAVER: w32->disable_screensaver = false; |