| 160 | } |
| 161 | |
| 162 | void 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 | |
| 184 | void SwitchHDLHandler::UpdateOutput() |
| 185 | { |
no test coverage detected