From 03378ebe438d5c2c69365ff09ea8cc2175db943c Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Tue, 3 Jan 2023 00:13:40 -0600 Subject: [PATCH] [nostalgia/core/gba] Fix buttonDown to return false for non-gamepad buttons --- src/nostalgia/core/gba/core.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nostalgia/core/gba/core.cpp b/src/nostalgia/core/gba/core.cpp index bcbb443b..91dacf9a 100644 --- a/src/nostalgia/core/gba/core.cpp +++ b/src/nostalgia/core/gba/core.cpp @@ -74,7 +74,7 @@ uint64_t ticksMs(Context*) noexcept { } bool buttonDown(Context*, Key k) noexcept { - return !(REG_GAMEPAD & (1 << static_cast(k))); + return k <= Key::GamePad_L && !(REG_GAMEPAD & (1 << static_cast(k))); } void shutdown(Context *ctx) noexcept {