Commit 7e4d8b2b authored by Sam Lantinga's avatar Sam Lantinga

*** empty log message ***

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40328
parent 3fa7d611
...@@ -131,6 +131,7 @@ static void WIN_GetKeyboardState(void) ...@@ -131,6 +131,7 @@ static void WIN_GetKeyboardState(void)
#ifndef NO_GETKEYBOARDSTATE #ifndef NO_GETKEYBOARDSTATE
SDLMod state; SDLMod state;
BYTE keyboard[256]; BYTE keyboard[256];
Uint8 *kstate = SDL_GetKeyState(NULL);
state = KMOD_NONE; state = KMOD_NONE;
if ( GetKeyboardState(keyboard) ) { if ( GetKeyboardState(keyboard) ) {
...@@ -154,9 +155,11 @@ static void WIN_GetKeyboardState(void) ...@@ -154,9 +155,11 @@ static void WIN_GetKeyboardState(void)
} }
if ( keyboard[VK_NUMLOCK] & 0x01) { if ( keyboard[VK_NUMLOCK] & 0x01) {
state |= KMOD_NUM; state |= KMOD_NUM;
kstate[SDLK_NUMLOCK] = SDL_PRESSED;
} }
if ( keyboard[VK_CAPITAL] & 0x01) { if ( keyboard[VK_CAPITAL] & 0x01) {
state |= KMOD_CAPS; state |= KMOD_CAPS;
kstate[SDLK_CAPSLOCK] = SDL_PRESSED;
} }
} }
SDL_SetModState(state); SDL_SetModState(state);
......
...@@ -27,8 +27,7 @@ static char rcsid = ...@@ -27,8 +27,7 @@ static char rcsid =
/* WGL implementation of SDL OpenGL support */ /* WGL implementation of SDL OpenGL support */
#include <windows.h> #include "SDL_opengl.h"
#include "SDL_error.h" #include "SDL_error.h"
#include "SDL_lowvideo.h" #include "SDL_lowvideo.h"
#include "SDL_wingl_c.h" #include "SDL_wingl_c.h"
......
...@@ -215,6 +215,7 @@ void DIB_InitOSKeymap(_THIS) ...@@ -215,6 +215,7 @@ void DIB_InitOSKeymap(_THIS)
VK_keymap[VK_BACKSLASH] = SDLK_BACKSLASH; VK_keymap[VK_BACKSLASH] = SDLK_BACKSLASH;
VK_keymap[VK_RBRACKET] = SDLK_RIGHTBRACKET; VK_keymap[VK_RBRACKET] = SDLK_RIGHTBRACKET;
VK_keymap[VK_GRAVE] = SDLK_BACKQUOTE; VK_keymap[VK_GRAVE] = SDLK_BACKQUOTE;
VK_keymap[VK_BACKTICK] = SDLK_BACKQUOTE;
VK_keymap[VK_A] = SDLK_a; VK_keymap[VK_A] = SDLK_a;
VK_keymap[VK_B] = SDLK_b; VK_keymap[VK_B] = SDLK_b;
VK_keymap[VK_C] = SDLK_c; VK_keymap[VK_C] = SDLK_c;
......
...@@ -66,13 +66,14 @@ static char rcsid = ...@@ -66,13 +66,14 @@ static char rcsid =
/* These keys haven't been defined, but were experimentally determined */ /* These keys haven't been defined, but were experimentally determined */
#define VK_SEMICOLON 0xBA #define VK_SEMICOLON 0xBA
#define VK_EQUALS 0xBB #define VK_EQUALS 0xBB
#define VK_COMMA 0xBC #define VK_COMMA 0xBC
#define VK_MINUS 0xBD #define VK_MINUS 0xBD
#define VK_PERIOD 0xBE #define VK_PERIOD 0xBE
#define VK_SLASH 0xBF #define VK_SLASH 0xBF
#define VK_GRAVE 0xC0 #define VK_GRAVE 0xC0
#define VK_LBRACKET 0xDB #define VK_LBRACKET 0xDB
#define VK_BACKSLASH 0xDC #define VK_BACKSLASH 0xDC
#define VK_RBRACKET 0xDD #define VK_RBRACKET 0xDD
#define VK_APOSTROPHE 0xDE #define VK_APOSTROPHE 0xDE
#define VK_BACKTICK 0xDF
...@@ -624,6 +624,9 @@ void DX5_InitOSKeymap(_THIS) ...@@ -624,6 +624,9 @@ void DX5_InitOSKeymap(_THIS)
{ {
#ifndef DIK_PAUSE #ifndef DIK_PAUSE
#define DIK_PAUSE 0xC5 #define DIK_PAUSE 0xC5
#endif
#ifndef DIK_OEM_102
#define DIK_OEM_102 0x56 /* < > | on UK/Germany keyboards */
#endif #endif
int i; int i;
...@@ -675,6 +678,7 @@ void DX5_InitOSKeymap(_THIS) ...@@ -675,6 +678,7 @@ void DX5_InitOSKeymap(_THIS)
DIK_keymap[DIK_GRAVE] = SDLK_BACKQUOTE; DIK_keymap[DIK_GRAVE] = SDLK_BACKQUOTE;
DIK_keymap[DIK_LSHIFT] = SDLK_LSHIFT; DIK_keymap[DIK_LSHIFT] = SDLK_LSHIFT;
DIK_keymap[DIK_BACKSLASH] = SDLK_BACKSLASH; DIK_keymap[DIK_BACKSLASH] = SDLK_BACKSLASH;
DIK_keymap[DIK_OEM_102] = SDLK_BACKSLASH;
DIK_keymap[DIK_Z] = SDLK_z; DIK_keymap[DIK_Z] = SDLK_z;
DIK_keymap[DIK_X] = SDLK_x; DIK_keymap[DIK_X] = SDLK_x;
DIK_keymap[DIK_C] = SDLK_c; DIK_keymap[DIK_C] = SDLK_c;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment