[nostalgia/core/gba] Fix buttonDown to return false for non-gamepad buttons

This commit is contained in:
Gary Talent 2023-01-03 00:13:40 -06:00
parent 2669aafe81
commit 03378ebe43

View File

@ -74,7 +74,7 @@ uint64_t ticksMs(Context*) noexcept {
} }
bool buttonDown(Context*, Key k) noexcept { bool buttonDown(Context*, Key k) noexcept {
return !(REG_GAMEPAD & (1 << static_cast<int>(k))); return k <= Key::GamePad_L && !(REG_GAMEPAD & (1 << static_cast<int>(k)));
} }
void shutdown(Context *ctx) noexcept { void shutdown(Context *ctx) noexcept {