Fix line wrapper in CCDevice

This commit is contained in:
pandamicro 2015-08-04 11:07:04 +08:00
parent f9249f0e49
commit d20052cc22
1 changed files with 1 additions and 2 deletions

View File

@ -39,8 +39,7 @@ int Device::getDPI()
NSScreen *screen = [NSScreen mainScreen];
NSDictionary *description = [screen deviceDescription];
NSSize displayPixelSize = [[description objectForKey:NSDeviceSize] sizeValue];
CGSize displayPhysicalSize = CGDisplayScreenSize(
[[description objectForKey:@"NSScreenNumber"] unsignedIntValue]);
CGSize displayPhysicalSize = CGDisplayScreenSize([[description objectForKey:@"NSScreenNumber"] unsignedIntValue]);
return ((displayPixelSize.width / displayPhysicalSize.width) * 25.4f);
}