Przeglądaj źródła

Don't toggle modifier state for repeated keys (thanks @dalawren!)

Closes https://github.com/libsdl-org/SDL/pull/9387
Sam Lantinga 1 rok temu
rodzic
commit
836e6c1531
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      src/events/SDL_keyboard.c

+ 1 - 1
src/events/SDL_keyboard.c

@@ -1006,7 +1006,7 @@ static int SDL_SendKeyboardKeyInternal(Uint64 timestamp, Uint32 flags, SDL_Keybo
     }
 
     /* Update modifiers state if applicable */
-    if (!(flags & KEYBOARD_IGNOREMODIFIERS)) {
+    if (!(flags & KEYBOARD_IGNOREMODIFIERS) && !repeat) {
         switch (keycode) {
         case SDLK_LCTRL:
             modifier = SDL_KMOD_LCTRL;