MCPcopy Create free account
hub / github.com/cathery/sys-con / UpdateInput

Method UpdateInput

source/ControllerSwitch/SwitchHDLHandler.cpp:162–182  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

160}
161
162void SwitchHDLHandler::UpdateInput()
163{
164 // We process any input packets here. If it fails, return and try again
165 Result rc = m_controller->GetInput();
166 if (R_FAILED(rc))
167 return;
168
169 // This is a check for controllers that can prompt themselves to go inactive - e.g. wireless Xbox 360 controllers
170 if (!m_controller->IsControllerActive())
171 {
172 hiddbgDetachHdlsVirtualDevice(m_hdlHandle);
173 }
174 else
175 {
176 // We get the button inputs from the input packet and update the state of our controller
177 FillHdlState(m_controller->GetNormalizedButtonData());
178 rc = UpdateHdlState();
179 if (R_FAILED(rc))
180 return;
181 }
182}
183
184void SwitchHDLHandler::UpdateOutput()
185{

Callers 1

InputThreadLoopMethod · 0.45

Calls 3

GetInputMethod · 0.45
IsControllerActiveMethod · 0.45

Tested by

no test coverage detected