diff --git a/detect.py b/detect.py index 70083a2..ca44cd4 100644 --- a/detect.py +++ b/detect.py @@ -41,6 +41,7 @@ def get_opts(): return [ BoolVariable("use_sanitizer", "Use LLVM compiler address sanitizer", False), BoolVariable("use_leak_sanitizer", "Use LLVM compiler memory leaks sanitizer (implies use_sanitizer)", False), + BoolVariable("use_lto", "", False), EnumVariable("debug_symbols", "Add debugging symbols to release builds", "yes", ("yes", "no", "full")), BoolVariable("separate_debug_symbols", "Create a separate file containing debugging symbols", False), BoolVariable("touch", "Enable touch events", True), diff --git a/export/export.cpp b/export/export.cpp index d39d829..b7bffc2 100644 --- a/export/export.cpp +++ b/export/export.cpp @@ -276,7 +276,7 @@ class EditorExportPlatformSwitch : public EditorExportPlatform { return OK; } - virtual bool can_export(const Ref &p_preset, String &r_error, bool &r_missing_templates) const { + virtual bool has_valid_export_configuration(const Ref &p_preset, String &r_error, bool &r_missing_templates) const { String err; r_missing_templates = find_export_template(TEMPLATE_RELEASE) == String() || @@ -296,6 +296,10 @@ class EditorExportPlatformSwitch : public EditorExportPlatform { return valid; } + virtual bool has_valid_project_configuration(const Ref &p_preset, String &r_error) const { + return true; + } + virtual List get_binary_extensions(const Ref &p_preset) const { List list; list.push_back("nro"); @@ -592,6 +596,7 @@ void register_switch_exporter() { EDITOR_DEF("export/switch/build_romfs", ""); EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::STRING, "export/switch/build_romfs", PROPERTY_HINT_GLOBAL_FILE, exe_ext)); - Ref exporter = Ref(memnew(EditorExportPlatformSwitch)); + Ref exporter; + exporter.instance(); EditorExport::get_singleton()->add_export_platform(exporter); } diff --git a/os_switch.cpp b/os_switch.cpp index 9973af0..446546d 100644 --- a/os_switch.cpp +++ b/os_switch.cpp @@ -217,7 +217,7 @@ void OS_Switch::alert(const String &p_alert, const String &p_title) { errorApplicationCreate(&config, p_title.utf8().ptr(), p_alert.utf8().ptr()); errorApplicationShow(&config); } -String OS_Switch::get_stdin_string(bool p_block) { +String OS_Switch::get_stdin_string() { return ""; } Point2 OS_Switch::get_mouse_position() const { diff --git a/os_switch.h b/os_switch.h index 4907b9f..c4e616f 100644 --- a/os_switch.h +++ b/os_switch.h @@ -68,7 +68,7 @@ class OS_Switch : public OS { virtual bool _check_internal_feature_support(const String &p_feature); virtual void alert(const String &p_alert, const String &p_title = "ALERT!"); - virtual String get_stdin_string(bool p_block = true); + virtual String get_stdin_string(); virtual Point2 get_mouse_position() const; virtual int get_mouse_button_state() const; virtual void set_window_title(const String &p_title);