From c85afd6f386706d01a3f234a13a7de4a93c66b67 Mon Sep 17 00:00:00 2001 From: neonloop Date: Wed, 31 Mar 2021 21:10:18 +0000 Subject: Fixes ignoring other controller buttons --- shell/input/sdl/input.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'shell/input') diff --git a/shell/input/sdl/input.c b/shell/input/sdl/input.c index bf6cff5..ad70881 100644 --- a/shell/input/sdl/input.c +++ b/shell/input/sdl/input.c @@ -26,6 +26,9 @@ static uint32_t joypad = 0; uint32_t S9xReadJoypad(int32_t port) { + // Only 1P is supported + if (port != 0) return 0; + SDL_Event event; static const uint32_t snes_lut[] = { @@ -43,9 +46,6 @@ uint32_t S9xReadJoypad(int32_t port) SNES_TR_MASK }; - // Only 1P is supported - if (port > 0) return joypad; - while (SDL_PollEvent(&event)) { switch (event.type) -- cgit v1.2.3