From 0b33df3341da4913fe6071f1bfa20d20de56d487 Mon Sep 17 00:00:00 2001 From: RedPanda4552 Date: Tue, 25 Jul 2023 20:45:50 -0400 Subject: [PATCH] Pad: Change button query response depending on current mode Fixes CoD 3 not understanding which buttons the controller has available --- pcsx2/SIO/Pad/PadDualshock2.cpp | 34 +++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/pcsx2/SIO/Pad/PadDualshock2.cpp b/pcsx2/SIO/Pad/PadDualshock2.cpp index 7b7863e267..bc834570eb 100644 --- a/pcsx2/SIO/Pad/PadDualshock2.cpp +++ b/pcsx2/SIO/Pad/PadDualshock2.cpp @@ -110,18 +110,32 @@ u8 PadDualshock2::Mystery(u8 commandByte) u8 PadDualshock2::ButtonQuery(u8 commandByte) { - switch (commandBytesReceived) + switch (this->currentMode) { - case 3: - case 4: - return 0xff; - case 5: - return 0x03; - case 8: - g_Sio0.SetAcknowledge(false); - return 0x5a; + case Pad::Mode::DUALSHOCK2: + case Pad::Mode::ANALOG: + switch (commandBytesReceived) + { + case 3: + case 4: + return 0xff; + case 5: + return 0x03; + case 8: + g_Sio0.SetAcknowledge(false); + return 0x5a; + default: + return 0x00; + } default: - return 0x00; + switch (commandBytesReceived) + { + case 8: + g_Sio0.SetAcknowledge(false); + return 0x5a; + default: + return 0x00; + } } }