Ported: Remove duplicate resizable settings - m4gr3d

a3b445d7e8
This commit is contained in:
Relintai 2022-07-26 12:33:36 +02:00
parent d14f7d0134
commit 634345f152
4 changed files with 3 additions and 7 deletions

View File

@ -495,7 +495,7 @@
</member> </member>
<member name="display/window/size/resizable" type="bool" setter="" getter="" default="true"> <member name="display/window/size/resizable" type="bool" setter="" getter="" default="true">
Allows the window to be resizable by default. 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.
</member> </member>
<member name="display/window/size/test_height" type="int" setter="" getter="" default="0"> <member name="display/window/size/test_height" type="int" setter="" getter="" default="0">
If greater than zero, overrides the window height when running the game. Useful for testing stretch modes. If greater than zero, overrides the window height when running the game. Useful for testing stretch modes.

View File

@ -834,7 +834,7 @@ void EditorExportPlatformAndroid::_fix_manifest(const Ref<EditorExportPreset> &p
bool classify_as_game = p_preset->get("package/classify_as_game"); 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 retain_data_on_uninstall = p_preset->get("package/retain_data_on_uninstall");
bool exclude_from_recents = p_preset->get("package/exclude_from_recents"); 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<String> perms; Vector<String> perms;
// Write permissions into the perms variable. // Write permissions into the perms variable.
@ -1674,7 +1674,6 @@ void EditorExportPlatformAndroid::get_export_options(List<ExportOption> *r_optio
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "screen/support_normal"), true)); 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_large"), true));
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "screen/support_xlarge"), 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)); r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "user_data_backup/allow"), false));

View File

@ -235,7 +235,7 @@ String _get_activity_tag(const Ref<EditorExportPreset> &p_preset) {
"android:resizeableActivity=\"%s\">\n", "android:resizeableActivity=\"%s\">\n",
bool_to_string(p_preset->get("package/exclude_from_recents")), bool_to_string(p_preset->get("package/exclude_from_recents")),
orientation, orientation,
bool_to_string(p_preset->get("screen/is_resizeable"))); bool_to_string(bool(GLOBAL_GET("display/window/size/resizable"))));
manifest_activity_text += " <meta-data tools:node=\"remove\" android:name=\"com.oculus.vr.focusaware\" />\n"; manifest_activity_text += " <meta-data tools:node=\"remove\" android:name=\"com.oculus.vr.focusaware\" />\n";
manifest_activity_text += " </activity>\n"; manifest_activity_text += " </activity>\n";
return manifest_activity_text; return manifest_activity_text;

View File

@ -207,14 +207,11 @@ void PandemoniumIOJavaWrapper::hide_vk() {
} }
void PandemoniumIOJavaWrapper::set_screen_orientation(int p_orient) { 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) { if (_set_screen_orientation) {
JNIEnv *env = get_jni_env(); JNIEnv *env = get_jni_env();
ERR_FAIL_COND(env == nullptr); ERR_FAIL_COND(env == nullptr);
env->CallVoidMethod(pandemonium_io_instance, _set_screen_orientation, p_orient); env->CallVoidMethod(pandemonium_io_instance, _set_screen_orientation, p_orient);
} }
#endif
} }
int PandemoniumIOJavaWrapper::get_screen_orientation() const { int PandemoniumIOJavaWrapper::get_screen_orientation() const {