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

Method SendInitBytes

source/ControllerLib/Controllers/XboxOneController.cpp:190–207  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

188}
189
190Result XboxOneController::SendInitBytes()
191{
192 Result rc;
193 uint16_t vendor = m_device->GetVendor();
194 uint16_t product = m_device->GetProduct();
195 for (int i = 0; i != (sizeof(init_packets) / sizeof(VendorProductPacket)); ++i)
196 {
197 if (init_packets[i].VendorID != 0 && init_packets[i].VendorID != vendor)
198 continue;
199 if (init_packets[i].ProductID != 0 && init_packets[i].ProductID != product)
200 continue;
201
202 rc = m_outPipe->Write(init_packets[i].Packet, init_packets[i].Length);
203 if (R_FAILED(rc))
204 break;
205 }
206 return rc;
207}
208
209float XboxOneController::NormalizeTrigger(uint8_t deadzonePercent, uint16_t value)
210{

Callers

nothing calls this directly

Calls 3

GetVendorMethod · 0.80
GetProductMethod · 0.80
WriteMethod · 0.80

Tested by

no test coverage detected