From 53abd96720acf8ce3e1aa73d7fbe5f28b4c812f2 Mon Sep 17 00:00:00 2001 From: colin Date: Thu, 3 Jan 2013 19:16:49 +0000 Subject: [PATCH] Made non-chatpad enabled controllers work again --- 360Controller/_60Controller.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/360Controller/_60Controller.cpp b/360Controller/_60Controller.cpp index 6680c29..cf179f4 100644 --- a/360Controller/_60Controller.cpp +++ b/360Controller/_60Controller.cpp @@ -382,11 +382,10 @@ bool Xbox360Peripheral::start(IOService *provider) intf.bInterfaceProtocol = 2; intf.bAlternateSetting = kIOUSBFindInterfaceDontCare; serialIn = device->FindNextInterface(NULL, &intf); - if (serialIn == NULL) - { + if (serialIn == NULL) { IOLog("start - unable to find chatpad interface\n"); - goto fail; - } + goto nochat; + } serialIn->open(this); // Find chatpad pipe pipe.direction = kUSBIn; @@ -436,10 +435,11 @@ bool Xbox360Peripheral::start(IOService *provider) serialTimerState = tsToggle; serialTimer->setTimeoutMS(1000); // Begin reading + if (!QueueSerialRead()) + goto fail; +nochat: if (!QueueRead()) goto fail; - if (!QueueSerialRead()) - goto fail; // Disable LED Xbox360_Prepare(led,outLed); led.pattern=ledOff;