1.1 --- a/src/video/cocoa/SDL_cocoamodes.m Sun Jun 15 13:05:30 2014 -0700
1.2 +++ b/src/video/cocoa/SDL_cocoamodes.m Sun Jun 15 17:18:05 2014 -0700
1.3 @@ -200,14 +200,14 @@
1.4 static const char *
1.5 Cocoa_GetDisplayName(CGDirectDisplayID displayID)
1.6 {
1.7 - NSDictionary *deviceInfo = (NSDictionary *)IODisplayCreateInfoDictionary(CGDisplayIOServicePort(displayID), kIODisplayOnlyPreferredName);
1.8 - NSDictionary *localizedNames = [deviceInfo objectForKey:[NSString stringWithUTF8String:kDisplayProductName]];
1.9 + CFDictionaryRef deviceInfo = IODisplayCreateInfoDictionary(CGDisplayIOServicePort(displayID), kIODisplayOnlyPreferredName);
1.10 + NSDictionary *localizedNames = [(NSDictionary *)deviceInfo objectForKey:[NSString stringWithUTF8String:kDisplayProductName]];
1.11 const char* displayName = NULL;
1.12
1.13 if ([localizedNames count] > 0) {
1.14 displayName = SDL_strdup([[localizedNames objectForKey:[[localizedNames allKeys] objectAtIndex:0]] UTF8String]);
1.15 }
1.16 - [deviceInfo release];
1.17 + CFRelease(deviceInfo);
1.18 return displayName;
1.19 }
1.20