MCPcopy Create free account
hub / github.com/360Controller/360Controller / handleReport

Method handleReport

360Controller/Controller.cpp:130–146  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

128}
129
130IOReturn Xbox360ControllerClass::handleReport(IOMemoryDescriptor * descriptor, IOHIDReportType reportType, IOOptionBits options) {
131 if (descriptor->getLength() >= sizeof(XBOX360_IN_REPORT)) {
132 IOBufferMemoryDescriptor *desc = OSDynamicCast(IOBufferMemoryDescriptor, descriptor);
133 if (desc != NULL) {
134 XBOX360_IN_REPORT *report=(XBOX360_IN_REPORT*)desc->getBytesNoCopy();
135 if ((report->header.command==inReport) && (report->header.size==sizeof(XBOX360_IN_REPORT))) {
136 GetOwner(this)->fiddleReport(report->left, report->right);
137 if (!(GetOwner(this)->noMapping))
138 remapButtons(report);
139 if (GetOwner(this)->swapSticks)
140 remapAxes(report);
141 }
142 }
143 }
144 IOReturn ret = IOHIDDevice::handleReport(descriptor, reportType, options);
145 return ret;
146}
147
148
149// Returns the string for the specified index from the USB device's string list, with an optional default

Callers

nothing calls this directly

Calls 5

GetOwnerFunction · 0.85
convertFromXboxOriginalFunction · 0.85
logDataFunction · 0.85
fiddleReportMethod · 0.45
QueueWriteMethod · 0.45

Tested by

no test coverage detected