all repos — mgba @ 932b8117a4d83632534536a8b87b8dafcafefbe0

mGBA Game Boy Advance Emulator

SDL: Fix keyrepeat causing thread interruptions
Vicki Pfau vi@endrift.com
Sun, 28 Jan 2018 08:44:55 -0800
commit

932b8117a4d83632534536a8b87b8dafcafefbe0

parent

c0115cfc43ed33f969928a4e2ccb8caef39ff51b

1 files changed, 1 insertions(+), 1 deletions(-)

jump to
M src/platform/sdl/sdl-events.csrc/platform/sdl/sdl-events.c

@@ -410,7 +410,7 @@ int key = -1;

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);