MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / ButtonQuery

Method ButtonQuery

pcsx2/SIO/Pad/PadDualshock2.cpp:172–201  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

170}
171
172u8 PadDualshock2::ButtonQuery(u8 commandByte)
173{
174 switch (this->currentMode)
175 {
176 case Pad::Mode::DUALSHOCK2:
177 case Pad::Mode::ANALOG:
178 switch (commandBytesReceived)
179 {
180 case 3:
181 case 4:
182 return 0xff;
183 case 5:
184 return 0x03;
185 case 8:
186 g_Sio0.SetAcknowledge(false);
187 return 0x5a;
188 default:
189 return 0x00;
190 }
191 default:
192 switch (commandBytesReceived)
193 {
194 case 8:
195 g_Sio0.SetAcknowledge(false);
196 return 0x00;
197 default:
198 return 0x00;
199 }
200 }
201}
202
203u8 PadDualshock2::Poll(u8 commandByte)
204{

Callers

nothing calls this directly

Calls 1

SetAcknowledgeMethod · 0.80

Tested by

no test coverage detected