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

Method ModeSwitch

pcsx2/SIO/Pad/PadPopn.cpp:178–206  ·  view source on GitHub ↗

Changes the mode of the controller between digital and analog, and adjusts the analog LED accordingly.

Source from the content-addressed store, hash-verified

176
177// Changes the mode of the controller between digital and analog, and adjusts the analog LED accordingly.
178u8 PadPopn::ModeSwitch(u8 commandByte)
179{
180 switch (commandBytesReceived)
181 {
182 case 3:
183 this->analogLight = commandByte;
184
185 if (this->analogLight)
186 {
187 this->currentMode = Pad::Mode::ANALOG;
188 }
189 else
190 {
191 this->currentMode = Pad::Mode::DIGITAL;
192 }
193
194 break;
195 case 4:
196 this->analogLocked = (commandByte == 0x03);
197 break;
198 case 8:
199 g_Sio0.SetAcknowledge(false);
200 break;
201 default:
202 break;
203 }
204
205 return 0x00;
206}
207
208u8 PadPopn::StatusInfo(u8 commandByte)
209{

Callers

nothing calls this directly

Calls 1

SetAcknowledgeMethod · 0.80

Tested by

no test coverage detected