| 97 | |
| 98 | |
| 99 | class XboxOneControllerClass : public Xbox360ControllerClass |
| 100 | { |
| 101 | OSDeclareDefaultStructors(XboxOneControllerClass) |
| 102 | |
| 103 | #define XboxOne_Prepare(x,t) {memset(&x,0,sizeof(x));x.header.command=t;x.header.size=sizeof(x-4);} |
| 104 | |
| 105 | protected: |
| 106 | UInt8 lastData[20]; |
| 107 | bool isXboxOneGuideButtonPressed; |
| 108 | void reorderButtons(UInt16* buttons, UInt8 mapping[]); |
| 109 | UInt16 convertButtonPacket(UInt16 buttons); |
| 110 | |
| 111 | public: |
| 112 | virtual IOReturn setReport(IOMemoryDescriptor *report,IOHIDReportType reportType,IOOptionBits options=0); |
| 113 | virtual IOReturn handleReport( |
| 114 | IOMemoryDescriptor * report, |
| 115 | IOHIDReportType reportType = kIOHIDReportTypeInput, |
| 116 | IOOptionBits options = 0 ); |
| 117 | |
| 118 | virtual void convertFromXboxOne(void *buffer, UInt8 packetSize); |
| 119 | virtual OSString* newProductString() const; |
| 120 | }; |
| 121 | |
| 122 | |
| 123 | class XboxOnePretend360Class : public XboxOneControllerClass |
nothing calls this directly
no outgoing calls
no test coverage detected