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.
This commit is contained in:
James Ross-Gowan 2015-04-20 20:24:19 +10:00
parent 34d5b73fbb
commit 88d3058681
1 changed files with 2 additions and 1 deletions

View File

@ -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;