[vlc-devel] [PATCH] [PATCH] playlist: allow monitor energy saving mode on windwos
andrei.ciurea96 at gmail.com
andrei.ciurea96 at gmail.com
Tue Mar 28 08:56:06 CEST 2017
From: Andrei Ciurea <andrei.ciurea96 at gmail.com>
---
src/playlist/control.c | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/src/playlist/control.c b/src/playlist/control.c
index 2da525a2d6..afb5a88aca 100644
--- a/src/playlist/control.c
+++ b/src/playlist/control.c
@@ -25,6 +25,11 @@
# include "config.h"
#endif
+ #if (_WIN32)
+ {
+ #include <windows.h>
+ }
+
#include <vlc_common.h>
#include "vlc_playlist.h"
#include "playlist_internal.h"
@@ -107,12 +112,20 @@ static void playlist_vaControl( playlist_t *p_playlist, int i_query,
pl_priv(p_playlist)->request.p_node = get_current_status_node( p_playlist );
pl_priv(p_playlist)->request.p_item = get_current_status_item( p_playlist );
pl_priv(p_playlist)->request.i_skip = 0;
+ #if (_WIN32)
+ {
+ SetThreadExecutionState?( ES_DISPLAY_REQUIRED | ES_SYSTEM_REQUIRED | ES_CONTINUOUS );
+ }
}
- else
+ else{
if( var_GetInteger( pl_priv(p_playlist)->p_input, "state" ) == PAUSE_S )
var_SetInteger( pl_priv(p_playlist)->p_input, "state", PLAYING_S );
else
var_SetInteger( pl_priv(p_playlist)->p_input, "state", PAUSE_S );
+ #if(_WIN32){
+ SetThreadExecutionState?( ES_SYSTEM_REQUIRED | ES_CONTINUOUS );
+ }
+ }
break;
case PLAYLIST_SKIP:
--
2.11.0
More information about the vlc-devel
mailing list