+1
-1
| { | ||
| "name": "win32-fun", | ||
| "version": "1.1.1", | ||
| "version": "1.1.2", | ||
| "description": "disk memory information, put the monitor into sleep mode, wake up the monitor, set volume", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/sid-max1996/win32-fun", |
+2
-1
@@ -5,2 +5,3 @@ #include "screen.h" | ||
| void ScreenSleep() { | ||
| // HWND_BROADCAST intead GetConsoleWindow() works too | ||
| SendMessage(GetConsoleWindow(), WM_SYSCOMMAND, SC_MONITORPOWER, (LPARAM)2); | ||
@@ -14,3 +15,3 @@ } | ||
| void PreventLockScreen() { | ||
| SetThreadExecutionState(ES_CONTINUOUS | ES_SYSTEM_REQUIRED | ES_AWAYMODE_REQUIRED); | ||
| SetThreadExecutionState(ES_CONTINUOUS | ES_DISPLAY_REQUIRED | ES_SYSTEM_REQUIRED | ES_AWAYMODE_REQUIRED); | ||
| } |
Sorry, the diff of this file is not supported yet
11383
1.08%