mirror of
https://github.com/mpv-player/mpv
synced 2024-12-25 00:02:13 +00:00
win32: fix for wm_syscommand
According to MSDN, in WM_SYSCOMMAND messages, the four low-order bits of the wParam parameter are used internally by the system. To obtain the correct result when testing the value of wParam, an application must combine the value 0xFFF0 with the wParam value by using the bitwise AND operator.
This commit is contained in:
parent
2ff0745ddb
commit
0e7dd6d4ff
@ -786,7 +786,7 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam,
|
||||
PostQuitMessage(0);
|
||||
break;
|
||||
case WM_SYSCOMMAND:
|
||||
switch (wParam) {
|
||||
switch (wParam & 0xFFF0) {
|
||||
case SC_SCREENSAVE:
|
||||
case SC_MONITORPOWER:
|
||||
if (w32->disable_screensaver) {
|
||||
|
Loading…
Reference in New Issue
Block a user