try to use immersive mode on android 13 and above

This commit is contained in:
kevlahnota
2024-11-17 11:07:44 +08:00
committed by GitHub
parent f46e22cc54
commit c603bfb818

View File

@@ -432,7 +432,8 @@ public class Main extends AndroidApplication {
config.useCompass = false; config.useCompass = false;
config.useGyroscope = false; config.useGyroscope = false;
config.useRotationVectorSensor = false; config.useRotationVectorSensor = false;
config.useImmersiveMode = false; // try to use immersive mode on android 13 and above
config.useImmersiveMode = Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU;
config.nativeLoader = () -> ReLinker.loadLibrary(getContext(), "gdx"); config.nativeLoader = () -> ReLinker.loadLibrary(getContext(), "gdx");
if (!Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState())) { if (!Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState())) {