all repos — mgba @ 9ed127d5244406b1c01dfe374c5ba11b3ffb9074

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

9ed127d5244406b1c01dfe374c5ba11b3ffb9074

parent

c5ff781ed6cdf5d36b7e59748c1506709c5e2e5d

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