[PATCH 2/4] kernel32: Forward SetThreadExecutionState() to ntdll.
Chip Davis
cdavis at codeweavers.com
Wed Jul 31 17:24:56 CDT 2019
Signed-off-by: Chip Davis <cdavis at codeweavers.com>
---
dlls/kernel32/powermgnt.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/dlls/kernel32/powermgnt.c b/dlls/kernel32/powermgnt.c
index 81e43b4ecf7..056dd9df692 100644
--- a/dlls/kernel32/powermgnt.c
+++ b/dlls/kernel32/powermgnt.c
@@ -21,6 +21,7 @@
#include "windef.h"
#include "winbase.h"
+#include "winternl.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(powermgnt);
@@ -100,14 +101,10 @@ BOOL WINAPI SetSystemPowerState(BOOL suspend_or_hibernate,
*/
EXECUTION_STATE WINAPI SetThreadExecutionState(EXECUTION_STATE flags)
{
- static EXECUTION_STATE current =
- ES_SYSTEM_REQUIRED | ES_DISPLAY_REQUIRED | ES_USER_PRESENT;
- EXECUTION_STATE old = current;
+ EXECUTION_STATE old;
- WARN("(0x%x): stub, harmless.\n", flags);
+ NtSetThreadExecutionState(flags, &old);
- if (!(current & ES_CONTINUOUS) || (flags & ES_CONTINUOUS))
- current = flags;
return old;
}
--
2.21.0
More information about the wine-devel
mailing list