Fixed left/right shift detection on Windows (thanks Mike!)
authorSam Lantinga <slouken@libsdl.org>
Wed, 11 Dec 2002 05:47:32 +0000
changeset 558 2312d983e1fe
parent 557 0ce5a68278fd
child 559 b528214c8c9a
Fixed left/right shift detection on Windows (thanks Mike!)
src/video/windib/SDL_dibevents.c
--- a/src/video/windib/SDL_dibevents.c	Sat Dec 07 06:54:47 2002 +0000
+++ b/src/video/windib/SDL_dibevents.c	Wed Dec 11 05:47:32 2002 +0000
@@ -82,7 +82,13 @@
 					break;
 				case VK_SHIFT:
 					/* EXTENDED trick doesn't work here */
-					wParam = VK_LSHIFT;
+					if ( GetKeyState(VK_LSHIFT) & 0x8000 ) {
+						wParam = VK_LSHIFT;
+					} else if ( GetKeyState(VK_RSHIFT) & 0x8000 ) {
+						wParam = VK_RSHIFT;
+					} else {
+						/* Huh? */
+					}
 					break;
 				case VK_MENU:
 					if ( lParam&EXTENDED_KEYMASK )