all repos — mgba @ 45873a32f69d636b436f7b2dcf9792bdd50f3b44

mGBA Game Boy Advance Emulator

SDL: Fix input when caps/num lock are on (fixes #774)
Vicki Pfau vi@endrift.com
Sun, 19 Aug 2018 09:53:21 -0700
commit

45873a32f69d636b436f7b2dcf9792bdd50f3b44

parent

d60b2417ced4572e3b610ba7b11da531bdbab1f6

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

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

@@ -407,7 +407,7 @@ }

static void _mSDLHandleKeypress(struct mCoreThread* context, struct mSDLPlayer* sdlContext, const struct SDL_KeyboardEvent* event) { int key = -1; - if (!event->keysym.mod) { + if (!(event->keysym.mod & ~(KMOD_NUM | KMOD_CAPS))) { key = mInputMapKey(sdlContext->bindings, SDL_BINDING_KEY, event->keysym.sym); } if (key != -1) {