Skip to content

Commit

Permalink
Windows: don't beep on Alt-* key combos (Thanks, historic_bruno!).
Browse files Browse the repository at this point in the history
Fixes Bugzilla 2669.
  • Loading branch information
icculus committed May 26, 2015
1 parent bb437f0 commit b11b349
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/video/windows/SDL_windowsevents.c
Expand Up @@ -791,19 +791,23 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
}
return (1);

#if defined(SC_SCREENSAVE) || defined(SC_MONITORPOWER)
case WM_SYSCOMMAND:
{
if ((wParam & 0xFFF0) == SC_KEYMENU) {
return (0);
}

#if defined(SC_SCREENSAVE) || defined(SC_MONITORPOWER)
/* Don't start the screensaver or blank the monitor in fullscreen apps */
if ((wParam & 0xFFF0) == SC_SCREENSAVE ||
(wParam & 0xFFF0) == SC_MONITORPOWER) {
if (SDL_GetVideoDevice()->suspend_screensaver) {
return (0);
}
}
#endif /* System has screensaver support */
}
break;
#endif /* System has screensaver support */

case WM_CLOSE:
{
Expand Down

0 comments on commit b11b349

Please sign in to comment.