From 5bbd1edf2c0cc46fab98f712171a68f9182b0670 Mon Sep 17 00:00:00 2001 From: Joe Wreschnig Date: Fri, 1 Mar 2013 20:28:06 +0100 Subject: [PATCH] Show HID error as a sheet so the main window still appears. --- JoystickController.m | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/JoystickController.m b/JoystickController.m index 33201f5..967a935 100644 --- a/JoystickController.m +++ b/JoystickController.m @@ -177,7 +177,10 @@ static void remove_callback(void *ctx, IOReturn inResult, void *inSender, IOHIDD informativeTextWithFormat:@"Error 0x%08x occured trying to access your devices. " @"Input may not be correctly detected or mapped.", ret] - runModal]; + beginSheetModalForWindow:outlineView.window + modalDelegate:nil + didEndSelector:nil + contextInfo:nil]; } IOHIDManagerRegisterDeviceMatchingCallback(hidManager, add_callback, (__bridge void *)self); -- 2.30.2