Skip to content

Commit d6d5d95

Browse files
libretro: Fix input handling for multiplayer games
Input handler was just previously reading from port 1
1 parent 613f5be commit d6d5d95

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libretro/libretro.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1640,11 +1640,11 @@ static void updateInput_Joypad(void)
16401640

16411641
if (retropad_device[port] == RETRO_DEVICE_JOYPAD) {
16421642
if (libretro_supports_bitmasks)
1643-
inbuf = input_cb(0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_MASK);
1643+
inbuf = input_cb(port, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_MASK);
16441644
else
16451645
{
16461646
for (int i = 0; i < (RETRO_DEVICE_ID_JOYPAD_R3 + 1); i++)
1647-
inbuf |= input_cb(0, RETRO_DEVICE_JOYPAD, 0, i) ? (1 << i) : 0;
1647+
inbuf |= input_cb(port, RETRO_DEVICE_JOYPAD, 0, i) ? (1 << i) : 0;
16481648
}
16491649

16501650
for (unsigned button = 0; button < max_buttons; button++)

0 commit comments

Comments
 (0)