From c4c67b4b08940994fdfbcd081f7d62a6b6c239dc Mon Sep 17 00:00:00 2001 From: retro-wertz Date: Sat, 30 Sep 2017 12:00:33 +0800 Subject: [PATCH] Proper fix for VS Unisystem input not working with some games. --- src/drivers/libretro/libretro.c | 3 --- src/input.c | 8 +++----- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/drivers/libretro/libretro.c b/src/drivers/libretro/libretro.c index bc79651..d784522 100644 --- a/src/drivers/libretro/libretro.c +++ b/src/drivers/libretro/libretro.c @@ -1178,9 +1178,6 @@ static void FCEUD_UpdateInput(void) } } - if (GameInfo->type == GIT_VSUNI) - FCEU_VSUniSwap(&pad[0], &pad[1]); - JSReturn[0] = pad[0] | (pad[1] << 8) | (pad[2] << 16) | (pad[3] << 24); if (t[0] == RETRO_DEVICE_MOUSE || t[1] == RETRO_DEVICE_MOUSE) diff --git a/src/input.c b/src/input.c index 9203359..ca57ad5 100644 --- a/src/input.c +++ b/src/input.c @@ -199,11 +199,6 @@ static void FP_FASTAPASS(3) UpdateGP(int w, void *data, int arg) { if (FCEUnetplay) NetplayUpdate(joy); #endif FCEUMOV_AddJoy(joy); -#ifdef __LIBRETRO__ -#else - if (GameInfo->type == GIT_VSUNI) /* moved to libretro.c */ - FCEU_VSUniSwap(&joy[0], &joy[1]); -#endif } static void FP_FASTAPASS(1) StrobeGP(int w) { @@ -231,6 +226,9 @@ void FCEU_UpdateInput(void) if (GameInfo && GameInfo->type == GIT_VSUNI) if (coinon) coinon--; + + if (GameInfo->type == GIT_VSUNI) /* moved to libretro.c */ + FCEU_VSUniSwap(&joy[0], &joy[1]); } static DECLFR(VSUNIRead0)