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,6 +110,10 @@ u8 PadDualshock2::Mystery(u8 commandByte)
u8 PadDualshock2::ButtonQuery(u8 commandByte)
{
switch (this->currentMode)
{
case Pad::Mode::DUALSHOCK2:
case Pad::Mode::ANALOG:
switch (commandBytesReceived)
{
case 3:
@ -123,6 +127,16 @@ u8 PadDualshock2::ButtonQuery(u8 commandByte)
default:
return 0x00;
}
default:
switch (commandBytesReceived)
{
case 8:
g_Sio0.SetAcknowledge(false);
return 0x5a;
default:
return 0x00;
}
}
}
u8 PadDualshock2::Poll(u8 commandByte)