Pad: Change button query response depending on current mode

Fixes CoD 3 not understanding which buttons the controller has available
This commit is contained in:
RedPanda4552 2023-07-25 20:45:50 -04:00 committed by Connor McLaughlin
parent 744cc4b705
commit 0b33df3341
1 changed files with 24 additions and 10 deletions

View File

@ -110,18 +110,32 @@ u8 PadDualshock2::Mystery(u8 commandByte)
u8 PadDualshock2::ButtonQuery(u8 commandByte) u8 PadDualshock2::ButtonQuery(u8 commandByte)
{ {
switch (commandBytesReceived) switch (this->currentMode)
{ {
case 3: case Pad::Mode::DUALSHOCK2:
case 4: case Pad::Mode::ANALOG:
return 0xff; switch (commandBytesReceived)
case 5: {
return 0x03; case 3:
case 8: case 4:
g_Sio0.SetAcknowledge(false); return 0xff;
return 0x5a; case 5:
return 0x03;
case 8:
g_Sio0.SetAcknowledge(false);
return 0x5a;
default:
return 0x00;
}
default: default:
return 0x00; switch (commandBytesReceived)
{
case 8:
g_Sio0.SetAcknowledge(false);
return 0x5a;
default:
return 0x00;
}
} }
} }