浏览代码

Fix parsing of the `keep_screen_on` display setting

(cherry picked from commit 3c75887d41b09e8ca6a9002b77f894a1c3813d73)
Fredia Huya-Kouadio 2 年之前
父节点
当前提交
d08e057194
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      platform/android/java/lib/src/org/godotengine/godot/Godot.java

+ 1 - 1
platform/android/java/lib/src/org/godotengine/godot/Godot.java

@@ -392,7 +392,7 @@ public class Godot extends Fragment implements SensorEventListener, IDownloaderC
 			for (GodotPlugin plugin : pluginRegistry.getAllPlugins()) {
 				plugin.onRegisterPluginWithGodotNative();
 			}
-			setKeepScreenOn("True".equals(GodotLib.getGlobal("display/window/energy_saving/keep_screen_on")));
+			setKeepScreenOn(Boolean.parseBoolean(GodotLib.getGlobal("display/window/energy_saving/keep_screen_on")));
 
 			// The Godot Android plugins are setup on completion of GodotLib.setup
 			mainThreadHandler.post(() -> {