v1.1.2: iOS version now takes advantage of higher framerate devices
This commit is contained in:
parent
1dfefbae6a
commit
3a587bbec4
|
@ -18,9 +18,11 @@ import org.robovm.apple.foundation.NSAutoreleasePool;
|
||||||
import org.robovm.apple.foundation.NSBundle;
|
import org.robovm.apple.foundation.NSBundle;
|
||||||
import org.robovm.apple.foundation.NSDictionary;
|
import org.robovm.apple.foundation.NSDictionary;
|
||||||
import org.robovm.apple.foundation.NSException;
|
import org.robovm.apple.foundation.NSException;
|
||||||
|
import org.robovm.apple.foundation.NSProcessInfo;
|
||||||
import org.robovm.apple.glkit.GLKViewDrawableColorFormat;
|
import org.robovm.apple.glkit.GLKViewDrawableColorFormat;
|
||||||
import org.robovm.apple.glkit.GLKViewDrawableDepthFormat;
|
import org.robovm.apple.glkit.GLKViewDrawableDepthFormat;
|
||||||
import org.robovm.apple.uikit.UIApplication;
|
import org.robovm.apple.uikit.UIApplication;
|
||||||
|
import org.robovm.apple.uikit.UIScreen;
|
||||||
|
|
||||||
public class IOSLauncher extends IOSApplication.Delegate {
|
public class IOSLauncher extends IOSApplication.Delegate {
|
||||||
@Override
|
@Override
|
||||||
|
@ -59,6 +61,10 @@ public class IOSLauncher extends IOSApplication.Delegate {
|
||||||
config.depthFormat = GLKViewDrawableDepthFormat.None;
|
config.depthFormat = GLKViewDrawableDepthFormat.None;
|
||||||
config.hdpiMode = HdpiMode.Pixels;
|
config.hdpiMode = HdpiMode.Pixels;
|
||||||
|
|
||||||
|
if (NSProcessInfo.getSharedProcessInfo().getOperatingSystemVersion().getMajorVersion() >= 11) {
|
||||||
|
config.preferredFramesPerSecond = (int)(UIScreen.getMainScreen().getMaximumFramesPerSecond());
|
||||||
|
}
|
||||||
|
|
||||||
CGRect statusBarFrame = UIApplication.getSharedApplication().getStatusBarFrame();
|
CGRect statusBarFrame = UIApplication.getSharedApplication().getStatusBarFrame();
|
||||||
double statusBarHeight = Math.min(statusBarFrame.getWidth(), statusBarFrame.getHeight());
|
double statusBarHeight = Math.min(statusBarFrame.getWidth(), statusBarFrame.getHeight());
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user