|
@@ -200,14 +200,14 @@ Cocoa_ReleaseDisplayModeList(_THIS, CFArrayRef modelist)
|
|
|
static const char *
|
|
|
Cocoa_GetDisplayName(CGDirectDisplayID displayID)
|
|
|
{
|
|
|
- NSDictionary *deviceInfo = (NSDictionary *)IODisplayCreateInfoDictionary(CGDisplayIOServicePort(displayID), kIODisplayOnlyPreferredName);
|
|
|
- NSDictionary *localizedNames = [deviceInfo objectForKey:[NSString stringWithUTF8String:kDisplayProductName]];
|
|
|
+ CFDictionaryRef deviceInfo = IODisplayCreateInfoDictionary(CGDisplayIOServicePort(displayID), kIODisplayOnlyPreferredName);
|
|
|
+ NSDictionary *localizedNames = [(NSDictionary *)deviceInfo objectForKey:[NSString stringWithUTF8String:kDisplayProductName]];
|
|
|
const char* displayName = NULL;
|
|
|
|
|
|
if ([localizedNames count] > 0) {
|
|
|
displayName = SDL_strdup([[localizedNames objectForKey:[[localizedNames allKeys] objectAtIndex:0]] UTF8String]);
|
|
|
}
|
|
|
- [deviceInfo release];
|
|
|
+ CFRelease(deviceInfo);
|
|
|
return displayName;
|
|
|
}
|
|
|
|