Permalink
Browse files

SDL: Fix keyrepeat causing thread interruptions

  • Loading branch information...
endrift committed Jan 28, 2018
1 parent c0115cf commit 932b8117a4d83632534536a8b87b8dafcafefbe0
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/platform/sdl/sdl-events.c
@@ -410,7 +410,7 @@ static void _mSDLHandleKeypress(struct mCoreThread* context, struct mSDLPlayer*
if (!event->keysym.mod) {
key = mInputMapKey(sdlContext->bindings, SDL_BINDING_KEY, event->keysym.sym);
}
- if (key != -1) {
+ if (key != -1 && !event->repeat) {
mCoreThreadInterrupt(context);
if (event->type == SDL_KEYDOWN) {
context->core->addKeys(context->core, 1 << key);

0 comments on commit 932b811

Please sign in to comment.