src/events/SDL_keyboard.c
changeset 10926 97c829825e0e
parent 10801 4e2e979bdbee
child 11149 504c67e71589
     1.1 --- a/src/events/SDL_keyboard.c	Thu Mar 02 13:33:04 2017 -0500
     1.2 +++ b/src/events/SDL_keyboard.c	Fri Mar 03 16:38:17 2017 -0500
     1.3 @@ -569,7 +569,7 @@
     1.4  #ifdef DEBUG_KEYBOARD
     1.5      printf("Resetting keyboard\n");
     1.6  #endif
     1.7 -    for (scancode = 0; scancode < SDL_NUM_SCANCODES; ++scancode) {
     1.8 +    for (scancode = (SDL_Scancode) 0; scancode < SDL_NUM_SCANCODES; ++scancode) {
     1.9          if (keyboard->keystate[scancode] == SDL_PRESSED) {
    1.10              SDL_SendKeyboardKey(SDL_RELEASED, scancode);
    1.11          }
    1.12 @@ -834,7 +834,7 @@
    1.13  {
    1.14      SDL_Keyboard *keyboard = &SDL_keyboard;
    1.15  
    1.16 -    return keyboard->modstate;
    1.17 +    return (SDL_Keymod) keyboard->modstate;
    1.18  }
    1.19  
    1.20  void
    1.21 @@ -863,7 +863,7 @@
    1.22  {
    1.23      SDL_Keyboard *keyboard = &SDL_keyboard;
    1.24  
    1.25 -    if (scancode < SDL_SCANCODE_UNKNOWN || scancode >= SDL_NUM_SCANCODES) {
    1.26 +    if (((int)scancode) < ((int)SDL_SCANCODE_UNKNOWN) || scancode >= SDL_NUM_SCANCODES) {
    1.27            SDL_InvalidParamError("scancode");
    1.28            return 0;
    1.29      }
    1.30 @@ -890,7 +890,7 @@
    1.31  SDL_GetScancodeName(SDL_Scancode scancode)
    1.32  {
    1.33      const char *name;
    1.34 -    if (scancode < SDL_SCANCODE_UNKNOWN || scancode >= SDL_NUM_SCANCODES) {
    1.35 +    if (((int)scancode) < ((int)SDL_SCANCODE_UNKNOWN) || scancode >= SDL_NUM_SCANCODES) {
    1.36            SDL_InvalidParamError("scancode");
    1.37            return "";
    1.38      }