diff options
-rw-r--r-- | core/input/input_map.cpp | 4 | ||||
-rw-r--r-- | core/input/input_map.h | 2 | ||||
-rw-r--r-- | core/io/resource.cpp | 8 | ||||
-rw-r--r-- | main/main.cpp | 2 | ||||
-rw-r--r-- | platform/android/export/export.cpp | 9 |
5 files changed, 15 insertions, 10 deletions
diff --git a/core/input/input_map.cpp b/core/input/input_map.cpp index 9fd5476f51..979809c7af 100644 --- a/core/input/input_map.cpp +++ b/core/input/input_map.cpp @@ -51,7 +51,7 @@ void InputMap::_bind_methods() { ClassDB::bind_method(D_METHOD("action_erase_events", "action"), &InputMap::action_erase_events); ClassDB::bind_method(D_METHOD("action_get_events", "action"), &InputMap::_action_get_events); ClassDB::bind_method(D_METHOD("event_is_action", "event", "action"), &InputMap::event_is_action); - ClassDB::bind_method(D_METHOD("load_from_globals"), &InputMap::load_from_globals); + ClassDB::bind_method(D_METHOD("load_from_project_settings"), &InputMap::load_from_project_settings); } void InputMap::add_action(const StringName &p_action, float p_deadzone) { @@ -228,7 +228,7 @@ const Map<StringName, InputMap::Action> &InputMap::get_action_map() const { return input_map; } -void InputMap::load_from_globals() { +void InputMap::load_from_project_settings() { input_map.clear(); List<PropertyInfo> pinfo; diff --git a/core/input/input_map.h b/core/input/input_map.h index 019a1056fb..948d78ebdd 100644 --- a/core/input/input_map.h +++ b/core/input/input_map.h @@ -82,7 +82,7 @@ public: bool event_get_action_status(const Ref<InputEvent> &p_event, const StringName &p_action, bool *p_pressed = nullptr, float *p_strength = nullptr, float *p_raw_strength = nullptr) const; const Map<StringName, Action> &get_action_map() const; - void load_from_globals(); + void load_from_project_settings(); void load_default(); InputMap(); diff --git a/core/io/resource.cpp b/core/io/resource.cpp index 08f5021889..58ab9a8cde 100644 --- a/core/io/resource.cpp +++ b/core/io/resource.cpp @@ -147,8 +147,8 @@ Ref<Resource> Resource::duplicate_for_local_scene(Node *p_for_scene, Map<Ref<Res List<PropertyInfo> plist; get_property_list(&plist); - Resource *r = Object::cast_to<Resource>(ClassDB::instance(get_class())); - ERR_FAIL_COND_V(!r, Ref<Resource>()); + Ref<Resource> r = Object::cast_to<Resource>(ClassDB::instance(get_class())); + ERR_FAIL_COND_V(r.is_null(), Ref<Resource>()); r->local_scene = p_for_scene; @@ -175,9 +175,7 @@ Ref<Resource> Resource::duplicate_for_local_scene(Node *p_for_scene, Map<Ref<Res r->set(E->get().name, p); } - RES res = Ref<Resource>(r); - - return res; + return r; } void Resource::configure_for_local_scene(Node *p_for_scene, Map<Ref<Resource>, Ref<Resource>> &remap_cache) { diff --git a/main/main.cpp b/main/main.cpp index 09f16e9d75..82be327cbb 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -1143,7 +1143,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph use_custom_res = false; input_map->load_default(); //keys for editor } else { - input_map->load_from_globals(); //keys for game + input_map->load_from_project_settings(); //keys for game } if (bool(ProjectSettings::get_singleton()->get("application/run/disable_stdout"))) { diff --git a/platform/android/export/export.cpp b/platform/android/export/export.cpp index 53b43ae0e8..35a7c54a8f 100644 --- a/platform/android/export/export.cpp +++ b/platform/android/export/export.cpp @@ -2269,6 +2269,13 @@ public: Error _zip_align_project(const String &sdk_path, const String &unaligned_file_path, const String &aligned_file_path) { // Look for the zipalign tool. + String zipalign_command_name; +#ifdef WINDOWS_ENABLED + zipalign_command_name = "zipalign.exe"; +#else + zipalign_command_name = "zipalign"; +#endif + String zipalign_command; Error errn; String build_tools_dir = sdk_path.plus_file("build-tools"); @@ -2283,7 +2290,7 @@ public: while (!sub_dir.empty()) { if (!sub_dir.begins_with(".") && da->current_is_dir()) { // Check if the tool is here. - String tool_path = build_tools_dir.plus_file(sub_dir).plus_file("zipalign"); + String tool_path = build_tools_dir.plus_file(sub_dir).plus_file(zipalign_command_name); if (FileAccess::exists(tool_path)) { zipalign_command = tool_path; break; |