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

Method Poll

pcsx2/SIO/Pad/PadPopn.cpp:112–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

110}
111
112u8 PadPopn::Poll(u8 commandByte)
113{
114 const u32 buttons = GetButtons();
115
116 switch (commandBytesReceived)
117 {
118 case 3:
119 return (buttons >> 8) & 0xff;
120 case 4:
121 // PS1 mode: If the controller is still in digital mode, it is time to stop acknowledging.
122 if (this->currentMode == Pad::Mode::DIGITAL)
123 {
124 g_Sio0.SetAcknowledge(false);
125 }
126
127 return buttons & 0xff;
128 }
129
130 Console.Warning("%s(%02X) Did not reach a valid return path! Returning zero as a failsafe!", __FUNCTION__, commandByte);
131 return 0x00;
132}
133
134u8 PadPopn::Config(u8 commandByte)
135{

Callers 2

AddDeviceMethod · 0.45
PollEventsMethod · 0.45

Calls 2

SetAcknowledgeMethod · 0.80
WarningMethod · 0.45

Tested by

no test coverage detected