diff --git a/Source/Core/DolphinWX/Src/cocoaApp.m b/Source/Core/DolphinWX/Src/cocoaApp.m index 15ac8d3fc2..5c5402cf89 100644 --- a/Source/Core/DolphinWX/Src/cocoaApp.m +++ b/Source/Core/DolphinWX/Src/cocoaApp.m @@ -52,7 +52,7 @@ bool cocoaKeyCode(NSEvent *event) bool Return = false; NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; - NSConnection *connec = [NSConnection defaultConnection]; + NSConnection *connec = [[NSConnection new] autorelease]; [connec setRootObject: event]; if ([connec registerName: @"DolphinCocoaEvent"] == NO) @@ -62,8 +62,7 @@ bool cocoaKeyCode(NSEvent *event) if( [event type] != NSFlagsChanged ) { - NSString *NewString = [event characters]; - char *Keys = [NewString UTF8String]; + const char *Keys = [[event characters] UTF8String]; if( Keys[0] == 'q' && [event type] == NSKeyDown ) QDown = true;