[Connection defaultConnection] and NewString are deprecated in OS X 10.6.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5492 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Soren Jorvang 2010-05-26 20:54:48 +00:00
parent d391c59519
commit 208a4f5646

View File

@ -52,7 +52,7 @@ bool cocoaKeyCode(NSEvent *event)
bool Return = false; bool Return = false;
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
NSConnection *connec = [NSConnection defaultConnection]; NSConnection *connec = [[NSConnection new] autorelease];
[connec setRootObject: event]; [connec setRootObject: event];
if ([connec registerName: @"DolphinCocoaEvent"] == NO) if ([connec registerName: @"DolphinCocoaEvent"] == NO)
@ -62,8 +62,7 @@ bool cocoaKeyCode(NSEvent *event)
if( [event type] != NSFlagsChanged ) if( [event type] != NSFlagsChanged )
{ {
NSString *NewString = [event characters]; const char *Keys = [[event characters] UTF8String];
char *Keys = [NewString UTF8String];
if( Keys[0] == 'q' && [event type] == NSKeyDown ) if( Keys[0] == 'q' && [event type] == NSKeyDown )
QDown = true; QDown = true;