*** empty log message ***
authorSam Lantinga <slouken@libsdl.org>
Sun, 31 Mar 2002 03:34:16 +0000
changeset 327 13fc64213765
parent 326 72d55d02cb47
child 328 dc21fa30faa9
*** empty log message ***
src/video/wincommon/SDL_sysevents.c
src/video/wincommon/SDL_wingl.c
src/video/windib/SDL_dibevents.c
src/video/windib/SDL_vkeys.h
src/video/windx5/SDL_dx5events.c
--- a/src/video/wincommon/SDL_sysevents.c	Sun Mar 31 03:34:11 2002 +0000
+++ b/src/video/wincommon/SDL_sysevents.c	Sun Mar 31 03:34:16 2002 +0000
@@ -131,6 +131,7 @@
 #ifndef NO_GETKEYBOARDSTATE
 	SDLMod state;
 	BYTE keyboard[256];
+	Uint8 *kstate = SDL_GetKeyState(NULL);
 
 	state = KMOD_NONE;
 	if ( GetKeyboardState(keyboard) ) {
@@ -154,9 +155,11 @@
 		}
 		if ( keyboard[VK_NUMLOCK] & 0x01) {
 			state |= KMOD_NUM;
+			kstate[SDLK_NUMLOCK] = SDL_PRESSED;
 		}
 		if ( keyboard[VK_CAPITAL] & 0x01) {
 			state |= KMOD_CAPS;
+			kstate[SDLK_CAPSLOCK] = SDL_PRESSED;
 		}
 	}
 	SDL_SetModState(state);
--- a/src/video/wincommon/SDL_wingl.c	Sun Mar 31 03:34:11 2002 +0000
+++ b/src/video/wincommon/SDL_wingl.c	Sun Mar 31 03:34:16 2002 +0000
@@ -27,8 +27,7 @@
 
 /* WGL implementation of SDL OpenGL support */
 
-#include <windows.h>
-
+#include "SDL_opengl.h"
 #include "SDL_error.h"
 #include "SDL_lowvideo.h"
 #include "SDL_wingl_c.h"
--- a/src/video/windib/SDL_dibevents.c	Sun Mar 31 03:34:11 2002 +0000
+++ b/src/video/windib/SDL_dibevents.c	Sun Mar 31 03:34:16 2002 +0000
@@ -215,6 +215,7 @@
 	VK_keymap[VK_BACKSLASH] = SDLK_BACKSLASH;
 	VK_keymap[VK_RBRACKET] = SDLK_RIGHTBRACKET;
 	VK_keymap[VK_GRAVE] = SDLK_BACKQUOTE;
+	VK_keymap[VK_BACKTICK] = SDLK_BACKQUOTE;
 	VK_keymap[VK_A] = SDLK_a;
 	VK_keymap[VK_B] = SDLK_b;
 	VK_keymap[VK_C] = SDLK_c;
--- a/src/video/windib/SDL_vkeys.h	Sun Mar 31 03:34:11 2002 +0000
+++ b/src/video/windib/SDL_vkeys.h	Sun Mar 31 03:34:16 2002 +0000
@@ -66,13 +66,14 @@
 
 /* These keys haven't been defined, but were experimentally determined */
 #define VK_SEMICOLON	0xBA
-#define VK_EQUALS		0xBB
-#define VK_COMMA		0xBC
-#define VK_MINUS		0xBD
-#define VK_PERIOD		0xBE
-#define VK_SLASH		0xBF
-#define VK_GRAVE		0xC0
-#define VK_LBRACKET		0xDB
+#define VK_EQUALS	0xBB
+#define VK_COMMA	0xBC
+#define VK_MINUS	0xBD
+#define VK_PERIOD	0xBE
+#define VK_SLASH	0xBF
+#define VK_GRAVE	0xC0
+#define VK_LBRACKET	0xDB
 #define VK_BACKSLASH	0xDC
-#define VK_RBRACKET		0xDD
+#define VK_RBRACKET	0xDD
 #define VK_APOSTROPHE	0xDE
+#define VK_BACKTICK	0xDF
--- a/src/video/windx5/SDL_dx5events.c	Sun Mar 31 03:34:11 2002 +0000
+++ b/src/video/windx5/SDL_dx5events.c	Sun Mar 31 03:34:16 2002 +0000
@@ -625,6 +625,9 @@
 #ifndef DIK_PAUSE
 #define DIK_PAUSE	0xC5
 #endif
+#ifndef DIK_OEM_102
+#define DIK_OEM_102	0x56	/* < > | on UK/Germany keyboards */
+#endif
 	int i;
 
 	/* Map the DIK scancodes to SDL keysyms */
@@ -675,6 +678,7 @@
 	DIK_keymap[DIK_GRAVE] = SDLK_BACKQUOTE;
 	DIK_keymap[DIK_LSHIFT] = SDLK_LSHIFT;
 	DIK_keymap[DIK_BACKSLASH] = SDLK_BACKSLASH;
+	DIK_keymap[DIK_OEM_102] = SDLK_BACKSLASH;
 	DIK_keymap[DIK_Z] = SDLK_z;
 	DIK_keymap[DIK_X] = SDLK_x;
 	DIK_keymap[DIK_C] = SDLK_c;