diff src/video/windib/SDL_dibevents.c @ 1526:89f90f32f6c0

Fixed bug #124 Print Screen key events weren't reported on Windows
author Sam Lantinga <slouken@libsdl.org>
date Tue, 14 Mar 2006 07:06:06 +0000
parents 21b1fbb53f4a
children 782fd950bd46 eb2d5480ae95
line wrap: on
line diff
--- 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));
 		}