mirror of https://github.com/mgba-emu/mgba.git
SDL: Fix input when caps/num lock are on (fixes #774)
This commit is contained in:
parent
c5ff781ed6
commit
9ed127d524
|
@ -407,7 +407,7 @@ static void _pauseAfterFrame(struct mCoreThread* context) {
|
||||||
|
|
||||||
static void _mSDLHandleKeypress(struct mCoreThread* context, struct mSDLPlayer* sdlContext, const struct SDL_KeyboardEvent* event) {
|
static void _mSDLHandleKeypress(struct mCoreThread* context, struct mSDLPlayer* sdlContext, const struct SDL_KeyboardEvent* event) {
|
||||||
int key = -1;
|
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);
|
key = mInputMapKey(sdlContext->bindings, SDL_BINDING_KEY, event->keysym.sym);
|
||||||
}
|
}
|
||||||
if (key != -1) {
|
if (key != -1) {
|
||||||
|
|
Loading…
Reference in New Issue