Fixed bug #124
authorSam Lantinga <slouken@libsdl.org>
Tue, 14 Mar 2006 07:06:06 +0000
changeset 152689f90f32f6c0
parent 1525 23a347cfbed8
child 1527 ce84e28c2c07
Fixed bug #124
Print Screen key events weren't reported on Windows
src/video/windib/SDL_dibevents.c
src/video/windx5/SDL_dx5events.c
     1.1 --- a/src/video/windib/SDL_dibevents.c	Tue Mar 14 06:00:30 2006 +0000
     1.2 +++ b/src/video/windib/SDL_dibevents.c	Tue Mar 14 07:06:06 2006 +0000
     1.3 @@ -160,7 +160,7 @@
     1.4  			SDL_keysym keysym;
     1.5  
     1.6  #ifdef _WIN32_WCE
     1.7 -			// Drop GAPI artefacts
     1.8 +			// Drop GAPI artifacts
     1.9  			if (wParam == 0x84 || wParam == 0x5B)
    1.10  				return 0;
    1.11  
    1.12 @@ -197,6 +197,11 @@
    1.13  						wParam = VK_LMENU;
    1.14  					break;
    1.15  			}
    1.16 +			/* Windows only reports keyup for print screen */
    1.17 +			if ( wParam == VK_SNAPSHOT && SDL_GetKeyState(NULL)[SDLK_PRINT] == SDL_RELEASED ) {
    1.18 +				posted = SDL_PrivateKeyboard(SDL_PRESSED,
    1.19 +					TranslateKey(wParam,HIWORD(lParam),&keysym,1));
    1.20 +			}
    1.21  			posted = SDL_PrivateKeyboard(SDL_RELEASED,
    1.22  				TranslateKey(wParam,HIWORD(lParam),&keysym,0));
    1.23  		}
     2.1 --- a/src/video/windx5/SDL_dx5events.c	Tue Mar 14 06:00:30 2006 +0000
     2.2 +++ b/src/video/windx5/SDL_dx5events.c	Tue Mar 14 07:06:06 2006 +0000
     2.3 @@ -802,7 +802,7 @@
     2.4  	DIK_keymap[DIK_NUMPADENTER] = SDLK_KP_ENTER;
     2.5  	DIK_keymap[DIK_RCONTROL] = SDLK_RCTRL;
     2.6  	DIK_keymap[DIK_DIVIDE] = SDLK_KP_DIVIDE;
     2.7 -	DIK_keymap[DIK_SYSRQ] = SDLK_SYSREQ;
     2.8 +	DIK_keymap[DIK_SYSRQ] = SDLK_PRINT;
     2.9  	DIK_keymap[DIK_RMENU] = SDLK_RALT;
    2.10  	DIK_keymap[DIK_PAUSE] = SDLK_PAUSE;
    2.11  	DIK_keymap[DIK_HOME] = SDLK_HOME;