Christian's comment:
authorSam Lantinga <slouken@libsdl.org>
Tue, 05 Feb 2008 07:30:50 +0000
changeset 230450f58ce12497
parent 2303 d87417504c75
child 2305 fbe8ff44c519
Christian's comment:
/* Actually returns a UInt32 containing two character codes (and two 'reserved' bytes), but we're only interested in the second (or only) one */
src/video/cocoa/SDL_cocoakeyboard.m
     1.1 --- a/src/video/cocoa/SDL_cocoakeyboard.m	Tue Feb 05 07:19:23 2008 +0000
     1.2 +++ b/src/video/cocoa/SDL_cocoakeyboard.m	Tue Feb 05 07:30:50 2008 +0000
     1.3 @@ -413,13 +413,13 @@
     1.4                  continue;
     1.5              }
     1.6  
     1.7 -            c = KeyTranslate (chr_data, i, &state);
     1.8 +            c = KeyTranslate (chr_data, i, &state) & 255;
     1.9              if (state) {
    1.10                  /* Dead key, process key up */
    1.11 -                c = KeyTranslate (chr_data, i | 128, &state);
    1.12 +                c = KeyTranslate (chr_data, i | 128, &state) & 255;
    1.13              }
    1.14  
    1.15 -            if (c != 0 && c != 0x10 && c < 256) {
    1.16 +            if (c != 0 && c != 0x10) {
    1.17                  /* MacRoman to Unicode table, taken from X.org sources */
    1.18                  static const unsigned short macroman_table[128] = {
    1.19                      0xc4, 0xc5, 0xc7, 0xc9, 0xd1, 0xd6, 0xdc, 0xe1,