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

Method init

360Controller/_60Controller.cpp:299–337  ·  view source on GitHub ↗

Initialise the extension

Source from the content-addressed store, hash-verified

297
298// Initialise the extension
299bool 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
340void Xbox360Peripheral::free(void)

Callers 2

PadConnectMethod · 0.45
SerialConnectMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected