From 5a2500f580025f474a12f0c6afd5129e23a50b14 Mon Sep 17 00:00:00 2001 From: geequlim Date: Wed, 19 Jul 2017 09:25:35 +0800 Subject: [PATCH] Fix errors with global config names no more sorrys please --- core/global_config.cpp | 2 +- core/input_map.cpp | 2 +- main/main.cpp | 2 +- platform/iphone/export/export.cpp | 4 ++-- platform/osx/export/export.cpp | 6 +++--- platform/uwp/export/export.cpp | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/core/global_config.cpp b/core/global_config.cpp index 95f4ec5e220..76572df2a7f 100644 --- a/core/global_config.cpp +++ b/core/global_config.cpp @@ -945,7 +945,7 @@ GlobalConfig::GlobalConfig() { GLOBAL_DEF("input/ui_page_down", va); input_presets.push_back("input/ui_page_down"); - //GLOBAL_DEF("display/handheld/orientation", "landscape"); + //GLOBAL_DEF("display/window/handheld/orientation", "landscape"); custom_prop_info["display/window/handheld/orientation"] = PropertyInfo(Variant::STRING, "display/window/handheld/orientation", PROPERTY_HINT_ENUM, "landscape,portrait,reverse_landscape,reverse_portrait,sensor_landscape,sensor_portrait,sensor"); custom_prop_info["rendering/threads/thread_model"] = PropertyInfo(Variant::INT, "rendering/threads/thread_model", PROPERTY_HINT_ENUM, "Single-Unsafe,Single-Safe,Multi-Threaded"); diff --git a/core/input_map.cpp b/core/input_map.cpp index 1307c467e65..ab7fcb5b15e 100644 --- a/core/input_map.cpp +++ b/core/input_map.cpp @@ -281,7 +281,7 @@ void InputMap::load_default() { key->set_scancode(KEY_PAGEDOWN); action_add_event("ui_page_down", key); - //set("display/handheld/orientation", "landscape"); + //set("display/window/handheld/orientation", "landscape"); } InputMap::InputMap() { diff --git a/main/main.cpp b/main/main.cpp index ece54e7427a..94544a0cde1 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -679,7 +679,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph #ifdef TOOLS_ENABLED - if (main_args.size() == 0 && (!GlobalConfig::get_singleton()->has("application/run/main_loop_type")) && (!GlobalConfig::get_singleton()->has("application/main_scene") || String(GlobalConfig::get_singleton()->get("application/main_scene")) == "")) + if (main_args.size() == 0 && (!GlobalConfig::get_singleton()->has("application/run/main_loop_type")) && (!GlobalConfig::get_singleton()->has("application/run/main_scene") || String(GlobalConfig::get_singleton()->get("application/run/main_scene")) == "")) use_custom_res = false; //project manager (run without arguments) #endif diff --git a/platform/iphone/export/export.cpp b/platform/iphone/export/export.cpp index 0960ec87919..9cd3ec64cfe 100644 --- a/platform/iphone/export/export.cpp +++ b/platform/iphone/export/export.cpp @@ -175,8 +175,8 @@ Error EditorExportPlatformIOS::export_project(const Ref &p_p String pkg_name; if (p_preset->get("application/name") != "") pkg_name = p_preset->get("application/name"); // app_name - else if (String(GlobalConfig::get_singleton()->get("application/name")) != "") - pkg_name = String(GlobalConfig::get_singleton()->get("application/name")); + else if (String(GlobalConfig::get_singleton()->get("application/config/name")) != "") + pkg_name = String(GlobalConfig::get_singleton()->get("application/config/name")); else pkg_name = "Unnamed"; diff --git a/platform/osx/export/export.cpp b/platform/osx/export/export.cpp index ca5535f7717..f0a7e3772ea 100644 --- a/platform/osx/export/export.cpp +++ b/platform/osx/export/export.cpp @@ -275,8 +275,8 @@ Error EditorExportPlatformOSX::export_project(const Ref &p_p String pkg_name; if (p_preset->get("application/name") != "") pkg_name = p_preset->get("application/name"); // app_name - else if (String(GlobalConfig::get_singleton()->get("application/name")) != "") - pkg_name = String(GlobalConfig::get_singleton()->get("application/name")); + else if (String(GlobalConfig::get_singleton()->get("application/config/name")) != "") + pkg_name = String(GlobalConfig::get_singleton()->get("application/config/name")); else pkg_name = "Unnamed"; @@ -438,7 +438,7 @@ Error EditorExportPlatformOSX::export_project(const Ref &p_p /** When exporting for OSX from any other platform we don't have access to code signing or creating DMGs so we'll wrap the bundle into a zip file. - Should probably find a nicer way to have just one export method instead of duplicating the method like this but I would the code got very + Should probably find a nicer way to have just one export method instead of duplicating the method like this but I would the code got very messy with switches inside of it. **/ Error EditorExportPlatformOSX::export_project(const Ref &p_preset, bool p_debug, const String &p_path, int p_flags) { diff --git a/platform/uwp/export/export.cpp b/platform/uwp/export/export.cpp index 92a7b2c1126..bc41d989680 100644 --- a/platform/uwp/export/export.cpp +++ b/platform/uwp/export/export.cpp @@ -774,7 +774,7 @@ class EditorExportUWP : public EditorExportPlatform { String architecture = arch == ARM ? "ARM" : arch == X86 ? "x86" : "x64"; result = result.replace("$architecture$", architecture); - result = result.replace("$display_name$", String(p_preset->get("package/display_name")).empty() ? (String)GlobalConfig::get_singleton()->get("application/name") : String(p_preset->get("package/display_name"))); + result = result.replace("$display_name$", String(p_preset->get("package/display_name")).empty() ? (String)GlobalConfig::get_singleton()->get("application/config/name") : String(p_preset->get("package/display_name"))); result = result.replace("$publisher_display_name$", p_preset->get("package/publisher_display_name")); result = result.replace("$app_description$", p_preset->get("package/description")); result = result.replace("$bg_color$", p_preset->get("images/background_color"));