1. Richard Goedeken
  2. mupen64plus-core

Commits

ecsv  committed f19f7d7

Ignore key repeats caused by the OS keyrepeat

  • Participants
  • Parent commits e2f93b1
  • Branches default

Comments (0)

Files changed (1)

File src/main/eventloop.c

View file
 
         case SDL_KEYDOWN:
 #if SDL_VERSION_ATLEAST(1,3,0)
+            if (event->key.repeat)
+                return 0;
+
             event_sdl_keydown(event->key.keysym.scancode, event->key.keysym.mod);
 #else
             event_sdl_keydown(event->key.keysym.sym, event->key.keysym.mod);
     }
 
     /* set up SDL event filter and disable key repeat */
-#if SDL_VERSION_ATLEAST(2,0,0)
-#warning SDL_EnableKeyRepeat unsupported
-#else
+#if !SDL_VERSION_ATLEAST(2,0,0)
     SDL_EnableKeyRepeat(0, 0);
 #endif
     SDL_SetEventFilter(event_sdl_filter, NULL);