| 128 | } |
| 129 | |
| 130 | IOReturn 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 |
nothing calls this directly
no test coverage detected