From b647fb0c196b2934ff04a933bdc7adc85e0cbc1e Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sun, 31 Mar 2002 03:34:16 +0000 Subject: [PATCH] *** empty log message *** --- src/video/wincommon/SDL_sysevents.c | 3 +++ src/video/wincommon/SDL_wingl.c | 3 +-- src/video/windib/SDL_dibevents.c | 1 + src/video/windib/SDL_vkeys.h | 17 +++++++++-------- src/video/windx5/SDL_dx5events.c | 4 ++++ 5 files changed, 18 insertions(+), 10 deletions(-) diff --git a/src/video/wincommon/SDL_sysevents.c b/src/video/wincommon/SDL_sysevents.c index c4601e233..11d6a3463 100644 --- a/src/video/wincommon/SDL_sysevents.c +++ b/src/video/wincommon/SDL_sysevents.c @@ -131,6 +131,7 @@ static void WIN_GetKeyboardState(void) #ifndef NO_GETKEYBOARDSTATE SDLMod state; BYTE keyboard[256]; + Uint8 *kstate = SDL_GetKeyState(NULL); state = KMOD_NONE; if ( GetKeyboardState(keyboard) ) { @@ -154,9 +155,11 @@ static void WIN_GetKeyboardState(void) } 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); diff --git a/src/video/wincommon/SDL_wingl.c b/src/video/wincommon/SDL_wingl.c index 5a2262eb9..ea1d336a7 100644 --- a/src/video/wincommon/SDL_wingl.c +++ b/src/video/wincommon/SDL_wingl.c @@ -27,8 +27,7 @@ static char rcsid = /* WGL implementation of SDL OpenGL support */ -#include - +#include "SDL_opengl.h" #include "SDL_error.h" #include "SDL_lowvideo.h" #include "SDL_wingl_c.h" diff --git a/src/video/windib/SDL_dibevents.c b/src/video/windib/SDL_dibevents.c index 26c2a7f7c..ff8ef64f1 100644 --- a/src/video/windib/SDL_dibevents.c +++ b/src/video/windib/SDL_dibevents.c @@ -215,6 +215,7 @@ void DIB_InitOSKeymap(_THIS) 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; diff --git a/src/video/windib/SDL_vkeys.h b/src/video/windib/SDL_vkeys.h index f84c6438b..7d19903ee 100644 --- a/src/video/windib/SDL_vkeys.h +++ b/src/video/windib/SDL_vkeys.h @@ -66,13 +66,14 @@ static char rcsid = /* 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 diff --git a/src/video/windx5/SDL_dx5events.c b/src/video/windx5/SDL_dx5events.c index dc950002b..5fb8f7397 100644 --- a/src/video/windx5/SDL_dx5events.c +++ b/src/video/windx5/SDL_dx5events.c @@ -624,6 +624,9 @@ void DX5_InitOSKeymap(_THIS) { #ifndef DIK_PAUSE #define DIK_PAUSE 0xC5 +#endif +#ifndef DIK_OEM_102 +#define DIK_OEM_102 0x56 /* < > | on UK/Germany keyboards */ #endif int i; @@ -675,6 +678,7 @@ void DX5_InitOSKeymap(_THIS) 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;