diff options
Diffstat (limited to 'main')
-rw-r--r-- | main/main.cpp | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/main/main.cpp b/main/main.cpp index 67d8d93728..2f191b5f63 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -1327,23 +1327,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph } { - String orientation = GLOBAL_DEF("display/window/handheld/orientation", "landscape"); - - if (orientation == "portrait") { - window_orientation = DisplayServer::SCREEN_PORTRAIT; - } else if (orientation == "reverse_landscape") { - window_orientation = DisplayServer::SCREEN_REVERSE_LANDSCAPE; - } else if (orientation == "reverse_portrait") { - window_orientation = DisplayServer::SCREEN_REVERSE_PORTRAIT; - } else if (orientation == "sensor_landscape") { - window_orientation = DisplayServer::SCREEN_SENSOR_LANDSCAPE; - } else if (orientation == "sensor_portrait") { - window_orientation = DisplayServer::SCREEN_SENSOR_PORTRAIT; - } else if (orientation == "sensor") { - window_orientation = DisplayServer::SCREEN_SENSOR; - } else { - window_orientation = DisplayServer::SCREEN_LANDSCAPE; - } + window_orientation = DisplayServer::ScreenOrientation(int(GLOBAL_DEF_BASIC("display/window/handheld/orientation", DisplayServer::ScreenOrientation::SCREEN_LANDSCAPE))); } Engine::get_singleton()->set_iterations_per_second(GLOBAL_DEF_BASIC("physics/common/physics_fps", 60)); |