summaryrefslogtreecommitdiff
path: root/main/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'main/main.cpp')
-rw-r--r--main/main.cpp34
1 files changed, 15 insertions, 19 deletions
diff --git a/main/main.cpp b/main/main.cpp
index 4103fad17c..d67761db55 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -375,8 +375,8 @@ void Main::print_help(const char *p_binary) {
#ifdef TESTS_ENABLED
OS::get_singleton()->print(" --test [--help] Run unit tests. Use --test --help for more information.\n");
#endif
- OS::get_singleton()->print("\n");
#endif
+ OS::get_singleton()->print("\n");
}
#ifdef TESTS_ENABLED
@@ -390,6 +390,8 @@ Error Main::test_setup() {
register_core_types();
register_core_driver_types();
+ packed_data = memnew(PackedData);
+
globals = memnew(ProjectSettings);
GLOBAL_DEF("debug/settings/crash_handler/message",
@@ -459,6 +461,9 @@ void Main::test_cleanup() {
if (globals) {
memdelete(globals);
}
+ if (packed_data) {
+ memdelete(packed_data);
+ }
if (engine) {
memdelete(engine);
}
@@ -1248,6 +1253,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
}
GLOBAL_DEF("internationalization/rendering/force_right_to_left_layout_direction", false);
+ GLOBAL_DEF("internationalization/locale/include_text_server_data", false);
if (!force_lowdpi) {
OS::get_singleton()->_allow_hidpi = GLOBAL_DEF("display/window/dpi/allow_hidpi", false);
@@ -1321,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));
@@ -1455,6 +1445,12 @@ Error Main::setup2(Thread::ID p_main_tid_override) {
}
#endif
+#ifdef TOOLS_ENABLED
+ if (editor || project_manager) {
+ EditorNode::register_editor_paths(project_manager);
+ }
+#endif
+
/* Determine text driver */
if (text_driver == "") {
@@ -2246,7 +2242,7 @@ bool Main::start() {
ProjectSettings::get_singleton()->set_custom_property_info(
"rendering/textures/canvas_textures/default_texture_filter",
PropertyInfo(Variant::INT, "rendering/textures/canvas_textures/default_texture_filter", PROPERTY_HINT_ENUM,
- "Nearest,Linear,MipmapLinear,MipmapNearest"));
+ "Nearest,Linear,Linear Mipmap,Nearest Mipmap"));
GLOBAL_DEF_BASIC("rendering/textures/canvas_textures/default_texture_repeat", 0);
ProjectSettings::get_singleton()->set_custom_property_info(
"rendering/textures/canvas_textures/default_texture_repeat",