aboutsummaryrefslogtreecommitdiff
path: root/shell/input/sdl
diff options
context:
space:
mode:
authorneonloop2021-03-11 01:00:34 +0000
committerneonloop2021-03-11 01:00:34 +0000
commitcf10b4323da80ea564b6b5a07b48faf375471af9 (patch)
tree0684547c367eb7e060b88b57413cc6dee68e8bd7 /shell/input/sdl
parent0858fb319e54923deb611536cb6c5ad89a6fc70d (diff)
downloadsnesemu-cf10b4323da80ea564b6b5a07b48faf375471af9.tar.gz
snesemu-cf10b4323da80ea564b6b5a07b48faf375471af9.tar.bz2
snesemu-cf10b4323da80ea564b6b5a07b48faf375471af9.zip
Restricts input handling to player 1
Without this change, it acted like every controller was hitting the button, which broke selecting 1P mode on some Nintendo games.
Diffstat (limited to 'shell/input/sdl')
-rw-r--r--shell/input/sdl/input.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/shell/input/sdl/input.c b/shell/input/sdl/input.c
index 6ddc761..a4ceba3 100644
--- a/shell/input/sdl/input.c
+++ b/shell/input/sdl/input.c
@@ -50,6 +50,9 @@ uint32_t S9xReadJoypad(int32_t port)
int32_t i;
uint32_t joypad = 0;
+ // Only 1P is supported
+ if (port > 0) return joypad;
+
keystate = SDL_GetKeyState(NULL);
while (SDL_PollEvent(&event))