From 634345f1525d1c0b46754dfdecde0b0c197504ad Mon Sep 17 00:00:00 2001 From: Relintai Date: Tue, 26 Jul 2022 12:33:36 +0200 Subject: [PATCH] Ported: Remove duplicate resizable settings - m4gr3d https://github.com/godotengine/godot/commit/a3b445d7e84a0365f83b58c9793d2ff3eb1b4204 --- doc/classes/ProjectSettings.xml | 2 +- platform/android/export/export_plugin.cpp | 3 +-- platform/android/export/gradle_export_util.cpp | 2 +- platform/android/java_pandemonium_io_wrapper.cpp | 3 --- 4 files changed, 3 insertions(+), 7 deletions(-) diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index 3ef139f33..b2fcd8345 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -495,7 +495,7 @@ Allows the window to be resizable by default. - [b]Note:[/b] This setting is ignored on iOS and Android. + [b]Note:[/b] This setting is ignored on iOS. If greater than zero, overrides the window height when running the game. Useful for testing stretch modes. diff --git a/platform/android/export/export_plugin.cpp b/platform/android/export/export_plugin.cpp index 7b329a3ed..dcf21e81c 100644 --- a/platform/android/export/export_plugin.cpp +++ b/platform/android/export/export_plugin.cpp @@ -834,7 +834,7 @@ void EditorExportPlatformAndroid::_fix_manifest(const Ref &p bool classify_as_game = p_preset->get("package/classify_as_game"); bool retain_data_on_uninstall = p_preset->get("package/retain_data_on_uninstall"); bool exclude_from_recents = p_preset->get("package/exclude_from_recents"); - bool is_resizeable = p_preset->get("screen/is_resizeable"); + bool is_resizeable = bool(GLOBAL_GET("display/window/size/resizable")); Vector perms; // Write permissions into the perms variable. @@ -1674,7 +1674,6 @@ void EditorExportPlatformAndroid::get_export_options(List *r_optio r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "screen/support_normal"), true)); r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "screen/support_large"), true)); r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "screen/support_xlarge"), true)); - r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "screen/is_resizeable"), false)); r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "user_data_backup/allow"), false)); diff --git a/platform/android/export/gradle_export_util.cpp b/platform/android/export/gradle_export_util.cpp index 47411bae5..d7536a534 100644 --- a/platform/android/export/gradle_export_util.cpp +++ b/platform/android/export/gradle_export_util.cpp @@ -235,7 +235,7 @@ String _get_activity_tag(const Ref &p_preset) { "android:resizeableActivity=\"%s\">\n", bool_to_string(p_preset->get("package/exclude_from_recents")), orientation, - bool_to_string(p_preset->get("screen/is_resizeable"))); + bool_to_string(bool(GLOBAL_GET("display/window/size/resizable")))); manifest_activity_text += " \n"; manifest_activity_text += " \n"; return manifest_activity_text; diff --git a/platform/android/java_pandemonium_io_wrapper.cpp b/platform/android/java_pandemonium_io_wrapper.cpp index 0cbeaa40d..ea589a1a7 100644 --- a/platform/android/java_pandemonium_io_wrapper.cpp +++ b/platform/android/java_pandemonium_io_wrapper.cpp @@ -207,14 +207,11 @@ void PandemoniumIOJavaWrapper::hide_vk() { } void PandemoniumIOJavaWrapper::set_screen_orientation(int p_orient) { -// The Godot Android Editor sets its own orientation via its AndroidManifest -#ifndef TOOLS_ENABLED if (_set_screen_orientation) { JNIEnv *env = get_jni_env(); ERR_FAIL_COND(env == nullptr); env->CallVoidMethod(pandemonium_io_instance, _set_screen_orientation, p_orient); } -#endif } int PandemoniumIOJavaWrapper::get_screen_orientation() const {