Skip to content

Commit

Permalink
Pad: Change button query response depending on current mode
Browse files Browse the repository at this point in the history
Fixes CoD 3 not understanding which buttons the controller has available
  • Loading branch information
RedPanda4552 authored and stenzek committed Jul 26, 2023
1 parent 744cc4b commit 0b33df3
Showing 1 changed file with 24 additions and 10 deletions.
34 changes: 24 additions & 10 deletions pcsx2/SIO/Pad/PadDualshock2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
}

Expand Down

0 comments on commit 0b33df3

Please sign in to comment.