SDL: Fix keyrepeat causing thread interruptions

This commit is contained in:
Vicki Pfau 2018-01-28 08:44:55 -08:00
parent c0115cfc43
commit 932b8117a4
1 changed files with 1 additions and 1 deletions

View File

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