Fix inverted logic.
authorJoe Wreschnig <joe.wreschnig@gmail.com>
Thu, 28 Feb 2013 18:25:33 +0000 (19:25 +0100)
committerJoe Wreschnig <joe.wreschnig@gmail.com>
Thu, 28 Feb 2013 18:25:33 +0000 (19:25 +0100)
JoystickController.m

index ed941ed..13db938 100644 (file)
@@ -158,7 +158,7 @@ static void remove_callback(void *ctx, IOReturn inResult, void *inSender, IOHIDD
     
     IOHIDManagerScheduleWithRunLoop(hidManager, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode);
     IOReturn ret = IOHIDManagerOpen(hidManager, kIOHIDOptionsTypeNone);
-    if (ret == kIOReturnSuccess) {
+    if (ret != kIOReturnSuccess) {
         [[NSAlert alertWithMessageText:@"Input devices are unavailable"
                          defaultButton:nil
                        alternateButton:nil