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

Method UpdateOutput

source/ControllerSwitch/SwitchHDLHandler.cpp:184–201  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

182}
183
184void SwitchHDLHandler::UpdateOutput()
185{
186 // Process a single output packet from a buffer
187 if (R_SUCCEEDED(m_controller->OutputBuffer()))
188 return;
189
190 // Process rumble values if supported
191 if (DoesControllerSupport(m_controller->GetType(), SUPPORTS_RUMBLE))
192 {
193 Result rc;
194 HidVibrationValue value;
195 rc = hidGetActualVibrationValue(m_vibrationDeviceHandle, &value);
196 if (R_SUCCEEDED(rc))
197 m_controller->SetRumble(static_cast<uint8_t>(value.amp_high * 255.0f), static_cast<uint8_t>(value.amp_low * 255.0f));
198 }
199
200 svcSleepThread(1e+7L);
201}
202
203HiddbgHdlsSessionId &SwitchHDLHandler::GetHdlsSessionId()
204{

Callers 1

OutputThreadLoopMethod · 0.45

Calls 4

DoesControllerSupportFunction · 0.85
OutputBufferMethod · 0.45
GetTypeMethod · 0.45
SetRumbleMethod · 0.45

Tested by

no test coverage detected