src/events/SDL_keyboard.c
changeset 6813 b21879e67db2
parent 6811 60d95fcfaf3c
child 6885 700f1b25f77f
equal deleted inserted replaced
6812:1f92a4ad24e7 6813:b21879e67db2
   858 
   858 
   859 SDL_Keycode
   859 SDL_Keycode
   860 SDL_GetKeyFromScancode(SDL_Scancode scancode)
   860 SDL_GetKeyFromScancode(SDL_Scancode scancode)
   861 {
   861 {
   862     SDL_Keyboard *keyboard = &SDL_keyboard;
   862     SDL_Keyboard *keyboard = &SDL_keyboard;
       
   863     
       
   864     if (scancode<SDL_SCANCODE_UNKNOWN || scancode >= SDL_NUM_SCANCODES) {
       
   865           SDL_InvalidParamError("scancode");
       
   866           return 0;
       
   867     }
   863 
   868 
   864     return keyboard->keymap[scancode];
   869     return keyboard->keymap[scancode];
   865 }
   870 }
   866 
   871 
   867 SDL_Scancode
   872 SDL_Scancode