From 16de70a9d955ac213551e34eb3bdfeb526e70af2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francisco=20Jos=C3=A9=20Garc=C3=ADa=20Garc=C3=ADa?= Date: Sat, 17 Sep 2016 14:19:26 +0200 Subject: [PATCH 1/2] Update psp_joypad.c --- input/drivers_joypad/psp_joypad.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/input/drivers_joypad/psp_joypad.c b/input/drivers_joypad/psp_joypad.c index 0880915bba..fe2309ba9a 100644 --- a/input/drivers_joypad/psp_joypad.c +++ b/input/drivers_joypad/psp_joypad.c @@ -148,7 +148,7 @@ static void psp_joypad_poll(void) * can be 0 or 1 to read the first controller on * a PSTV, but HAS to be 0 for a real VITA and 2 * for the 2nd controller on a PSTV */ - unsigned p = (player == 1) ? 2 : player; + unsigned p = (player > 0) ? player+1 : player; int32_t ret = CtrlPeekBufferPositive(p, &state_tmp, 1); pad_state[i] = 0; From 16257d58ef7ef8df4ad8730158510e054d1d1725 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francisco=20Jos=C3=A9=20Garc=C3=ADa=20Garc=C3=ADa?= Date: Sat, 17 Sep 2016 14:22:45 +0200 Subject: [PATCH 2/2] Add up to 4 players --- input/drivers_joypad/psp_joypad.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/input/drivers_joypad/psp_joypad.c b/input/drivers_joypad/psp_joypad.c index fe2309ba9a..1eae1fbda5 100644 --- a/input/drivers_joypad/psp_joypad.c +++ b/input/drivers_joypad/psp_joypad.c @@ -21,7 +21,7 @@ #include "../../configuration.h" #if defined(SN_TARGET_PSP2) || defined(VITA) -#define PSP_MAX_PADS 2 +#define PSP_MAX_PADS 4 #else #define PSP_MAX_PADS 1 #endif