Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove duplicate Android resizable setting #59880

Merged
merged 1 commit into from
Apr 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/classes/ProjectSettings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@
</member>
<member name="display/window/size/resizable" type="bool" setter="" getter="" default="true">
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 name="display/window/size/viewport_height" type="int" setter="" getter="" default="600">
Sets the game's main viewport height. On desktop platforms, this is also the initial window height.
Expand Down
3 changes: 1 addition & 2 deletions platform/android/export/export_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -863,7 +863,7 @@ void EditorExportPlatformAndroid::_fix_manifest(const Ref<EditorExportPreset> &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<String> perms;
// Write permissions into the perms variable.
Expand Down Expand Up @@ -1738,7 +1738,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_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));

Expand Down
2 changes: 1 addition & 1 deletion platform/android/export/gradle_export_util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ String _get_activity_tag(const Ref<EditorExportPreset> &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"))));
if (uses_xr) {
manifest_activity_text += " <meta-data tools:node=\"replace\" android:name=\"com.oculus.vr.focusaware\" android:value=\"true\" />\n";
} else {
Expand Down
3 changes: 0 additions & 3 deletions platform/android/java_godot_io_wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,14 +198,11 @@ void GodotIOJavaWrapper::hide_vk() {
}

void GodotIOJavaWrapper::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(godot_io_instance, _set_screen_orientation, p_orient);
}
#endif
}

int GodotIOJavaWrapper::get_screen_orientation() {
Expand Down