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

Method UpdateOutput

source/ControllerSwitch/SwitchAbstractedPadHandler.cpp:169–184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

167}
168
169void SwitchAbstractedPadHandler::UpdateOutput()
170{
171 if (R_SUCCEEDED(m_controller->OutputBuffer()))
172 return;
173
174 if (DoesControllerSupport(m_controller->GetType(), SUPPORTS_RUMBLE))
175 {
176 Result rc;
177 HidVibrationValue value;
178 rc = hidGetActualVibrationValue(m_vibrationDeviceHandle, &value);
179 if (R_SUCCEEDED(rc))
180 GetController()->SetRumble(static_cast<uint8_t>(value.amp_high * 255.0f), static_cast<uint8_t>(value.amp_low * 255.0f));
181 }
182
183 svcSleepThread(1e+7L);
184}

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected