Initialise the extension
| 297 | |
| 298 | // Initialise the extension |
| 299 | bool Xbox360Peripheral::init(OSDictionary *propTable) |
| 300 | { |
| 301 | bool res=super::init(propTable); |
| 302 | mainLock = IOLockAlloc(); |
| 303 | device=NULL; |
| 304 | interface=NULL; |
| 305 | inPipe=NULL; |
| 306 | outPipe=NULL; |
| 307 | inBuffer=NULL; |
| 308 | padHandler = NULL; |
| 309 | serialIn = NULL; |
| 310 | serialInPipe = NULL; |
| 311 | serialInBuffer = NULL; |
| 312 | serialTimer = NULL; |
| 313 | serialHandler = NULL; |
| 314 | // Default settings |
| 315 | invertLeftX=invertLeftY=false; |
| 316 | invertRightX=invertRightY=false; |
| 317 | deadzoneLeft=deadzoneRight=0; |
| 318 | relativeLeft=relativeRight=false; |
| 319 | deadOffLeft = false; |
| 320 | deadOffRight = false; |
| 321 | swapSticks = false; |
| 322 | pretend360 = false; |
| 323 | // Controller Specific |
| 324 | rumbleType = 0; |
| 325 | // Bindings |
| 326 | noMapping = true; |
| 327 | for (int i = 0; i < 11; i++) |
| 328 | { |
| 329 | mapping[i] = i; |
| 330 | } |
| 331 | for (int i = 12; i < 16; i++) |
| 332 | { |
| 333 | mapping[i-1] = i; |
| 334 | } |
| 335 | // Done |
| 336 | return res; |
| 337 | } |
| 338 | |
| 339 | // Free the extension |
| 340 | void Xbox360Peripheral::free(void) |
no outgoing calls
no test coverage detected