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 ed941ed142f12062c14d84eed08f46f73a368099..13db938c8d33febd60669a0dd10104111314230d 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