mirror of https://github.com/axmolengine/axmol.git
Fix line wrapper in CCDevice
This commit is contained in:
parent
f9249f0e49
commit
d20052cc22
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue