mirror of
https://github.com/joel16/SDL2.git
synced 2025-03-03 17:07:15 +00:00
Fixed bug #124
Print Screen key events weren't reported on Windows --HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401530
This commit is contained in:
parent
38b0054e82
commit
710a6bc22a
@ -160,7 +160,7 @@ LRESULT DIB_HandleMessage(_THIS, HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar
|
||||
SDL_keysym keysym;
|
||||
|
||||
#ifdef _WIN32_WCE
|
||||
// Drop GAPI artefacts
|
||||
// Drop GAPI artifacts
|
||||
if (wParam == 0x84 || wParam == 0x5B)
|
||||
return 0;
|
||||
|
||||
@ -197,6 +197,11 @@ LRESULT DIB_HandleMessage(_THIS, HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar
|
||||
wParam = VK_LMENU;
|
||||
break;
|
||||
}
|
||||
/* Windows only reports keyup for print screen */
|
||||
if ( wParam == VK_SNAPSHOT && SDL_GetKeyState(NULL)[SDLK_PRINT] == SDL_RELEASED ) {
|
||||
posted = SDL_PrivateKeyboard(SDL_PRESSED,
|
||||
TranslateKey(wParam,HIWORD(lParam),&keysym,1));
|
||||
}
|
||||
posted = SDL_PrivateKeyboard(SDL_RELEASED,
|
||||
TranslateKey(wParam,HIWORD(lParam),&keysym,0));
|
||||
}
|
||||
|
@ -802,7 +802,7 @@ void DX5_InitOSKeymap(_THIS)
|
||||
DIK_keymap[DIK_NUMPADENTER] = SDLK_KP_ENTER;
|
||||
DIK_keymap[DIK_RCONTROL] = SDLK_RCTRL;
|
||||
DIK_keymap[DIK_DIVIDE] = SDLK_KP_DIVIDE;
|
||||
DIK_keymap[DIK_SYSRQ] = SDLK_SYSREQ;
|
||||
DIK_keymap[DIK_SYSRQ] = SDLK_PRINT;
|
||||
DIK_keymap[DIK_RMENU] = SDLK_RALT;
|
||||
DIK_keymap[DIK_PAUSE] = SDLK_PAUSE;
|
||||
DIK_keymap[DIK_HOME] = SDLK_HOME;
|
||||
|
Loading…
x
Reference in New Issue
Block a user