# HG changeset patch # User Sam Lantinga # Date 1142319966 0 # Node ID 89f90f32f6c0ed99539213cf2a50cdf300370357 # Parent 23a347cfbed85e0f28eb40370dfcb7269247d4e1 Fixed bug #124 Print Screen key events weren't reported on Windows diff -r 23a347cfbed8 -r 89f90f32f6c0 src/video/windib/SDL_dibevents.c --- a/src/video/windib/SDL_dibevents.c Tue Mar 14 06:00:30 2006 +0000 +++ b/src/video/windib/SDL_dibevents.c Tue Mar 14 07:06:06 2006 +0000 @@ -160,7 +160,7 @@ SDL_keysym keysym; #ifdef _WIN32_WCE - // Drop GAPI artefacts + // Drop GAPI artifacts if (wParam == 0x84 || wParam == 0x5B) return 0; @@ -197,6 +197,11 @@ 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)); } diff -r 23a347cfbed8 -r 89f90f32f6c0 src/video/windx5/SDL_dx5events.c --- a/src/video/windx5/SDL_dx5events.c Tue Mar 14 06:00:30 2006 +0000 +++ b/src/video/windx5/SDL_dx5events.c Tue Mar 14 07:06:06 2006 +0000 @@ -802,7 +802,7 @@ 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;