src/events/SDL_keyboard.c
changeset 11240 1f6105d09344
parent 11149 504c67e71589
child 11247 27eb9a10002c
     1.1 --- a/src/events/SDL_keyboard.c	Sat Aug 12 12:24:59 2017 -0700
     1.2 +++ b/src/events/SDL_keyboard.c	Sat Aug 12 12:34:09 2017 -0700
     1.3 @@ -672,7 +672,6 @@
     1.4      int posted;
     1.5      SDL_Keymod modifier;
     1.6      SDL_Keycode keycode;
     1.7 -    Uint16 modstate;
     1.8      Uint32 type;
     1.9      Uint8 repeat;
    1.10  
    1.11 @@ -745,7 +744,6 @@
    1.12          break;
    1.13      }
    1.14      if (SDL_KEYDOWN == type) {
    1.15 -        modstate = keyboard->modstate;
    1.16          switch (keycode) {
    1.17          case SDLK_NUMLOCKCLEAR:
    1.18              keyboard->modstate ^= KMOD_NUM;
    1.19 @@ -759,7 +757,6 @@
    1.20          }
    1.21      } else {
    1.22          keyboard->modstate &= ~modifier;
    1.23 -        modstate = keyboard->modstate;
    1.24      }
    1.25  
    1.26      /* Post the event, if desired */
    1.27 @@ -771,7 +768,7 @@
    1.28          event.key.repeat = repeat;
    1.29          event.key.keysym.scancode = scancode;
    1.30          event.key.keysym.sym = keycode;
    1.31 -        event.key.keysym.mod = modstate;
    1.32 +        event.key.keysym.mod = keyboard->modstate;
    1.33          event.key.windowID = keyboard->focus ? keyboard->focus->id : 0;
    1.34          posted = (SDL_PushEvent(&event) > 0);
    1.35      }