src/video/win32/SDL_win32events.c
changeset 2311 54e21acfec5a
parent 2310 2f31ce8f1149
child 2312 bcec4b189f5b
     1.1 --- a/src/video/win32/SDL_win32events.c	Sat Feb 09 07:18:38 2008 +0000
     1.2 +++ b/src/video/win32/SDL_win32events.c	Sat Feb 09 22:28:27 2008 +0000
     1.3 @@ -54,17 +54,12 @@
     1.4         We try to provide USB scancodes, so undo this mapping.
     1.5       */
     1.6      if (wParam >= 'A' && wParam <= 'Z') {
     1.7 -        /* Alphabetic scancodes for PC keyboards */
     1.8 -        static BYTE scancodes[26] = {
     1.9 -            30, 48, 46, 32, 18, 33, 34, 35, 23, 36, 37, 38, 50, 49, 24,
    1.10 -            25, 16, 19, 31, 20, 22, 47, 17, 45, 21, 44
    1.11 -        };
    1.12          BYTE scancode = (lParam >> 16) & 0xFF;
    1.13          int i;
    1.14  
    1.15 -        if (scancode != scancodes[wParam - 'A']) {
    1.16 -            for (i = 0; i < SDL_arraysize(scancodes); ++i) {
    1.17 -                if (scancode == scancodes[i]) {
    1.18 +        if (scancode != alpha_scancodes[wParam - 'A']) {
    1.19 +            for (i = 0; i < SDL_arraysize(alpha_scancodes); ++i) {
    1.20 +                if (scancode == alpha_scancodes[i]) {
    1.21                      wParam = 'A' + i;
    1.22                      break;
    1.23                  }
    1.24 @@ -448,6 +443,12 @@
    1.25          }
    1.26          return (0);
    1.27  
    1.28 +    case WM_INPUTLANGCHANGE:
    1.29 +        {
    1.30 +            WIN_UpdateKeymap(data->videodata->keyboard);
    1.31 +        }
    1.32 +        return (1);
    1.33 +
    1.34      case WM_GETMINMAXINFO:
    1.35          {
    1.36              MINMAXINFO *info;