mirror of https://github.com/mpv-player/mpv
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:
parent
34d5b73fbb
commit
88d3058681
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue