Use an enum to represent screen orientation in the Project Settings

- Tweak the setting property hint to be more informative.
- Make the setting a "basic" setting so it appears when Advanced Settings
  is disabled.
- Remove redundant orientation setting in the iOS export preset.
  The project setting is now used (like on Android).

Projects upgrading from a previous version will have to set the
screen orientation again in the Project Settings if it wasn't set
to the default value ("landscape").
This commit is contained in:
Hugo Locurcio
2021-05-21 21:29:24 +02:00
parent 2362a59a11
commit 660952a857
7 changed files with 44 additions and 60 deletions

View File

@@ -847,7 +847,8 @@ class EditorExportPlatformAndroid : public EditorExportPlatform {
int version_code = p_preset->get("version/code");
String package_name = p_preset->get("package/unique_name");
const int screen_orientation = _get_android_orientation_value(_get_screen_orientation());
const int screen_orientation =
_get_android_orientation_value(DisplayServer::ScreenOrientation(int(GLOBAL_GET("display/window/handheld/orientation"))));
bool screen_support_small = p_preset->get("screen/support_small");
bool screen_support_normal = p_preset->get("screen/support_normal");