Skip to content

armgit / godot

Public Imported from GitHub
0

Godot Engine – Multi-platform 2D and 3D game engine

Android editor: Fix orientation switch when auto-rotate is disabled

Anish Kumar6770183d8b92
diff --git a/platform/android/java/editor/src/main/java/org/godotengine/editor/BaseGodotEditor.kt b/platform/android/java/editor/src/main/java/org/godotengine/editor/BaseGodotEditor.kt
index 22b8c8df1d5..e638d26d36a 100644
--- a/platform/android/java/editor/src/main/java/org/godotengine/editor/BaseGodotEditor.kt
+++ b/platform/android/java/editor/src/main/java/org/godotengine/editor/BaseGodotEditor.kt
@@ -1104,7 +1104,7 @@ abstract class BaseGodotEditor : GodotActivity(), GameMenuFragment.GameMenuListe
private fun toggleEditorOrientation() {
if (distractionFreeModeEnabled) {
changingOrientationAllowed = true
- requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_USER
+ requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_SENSOR
} else if (changingOrientationAllowed) {
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_USER_LANDSCAPE
changingOrientationAllowed = false