Skip to content

Commit

Permalink
Fix build for 3.6
Browse files Browse the repository at this point in the history
  • Loading branch information
halotroop2288 committed Nov 2, 2024
1 parent dd65d3d commit e6cb232
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
1 change: 1 addition & 0 deletions detect.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
9 changes: 7 additions & 2 deletions export/export.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ class EditorExportPlatformSwitch : public EditorExportPlatform {
return OK;
}

virtual bool can_export(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const {
virtual bool has_valid_export_configuration(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const {
String err;
r_missing_templates =
find_export_template(TEMPLATE_RELEASE) == String() ||
Expand All @@ -296,6 +296,10 @@ class EditorExportPlatformSwitch : public EditorExportPlatform {
return valid;
}

virtual bool has_valid_project_configuration(const Ref<EditorExportPreset> &p_preset, String &r_error) const {
return true;
}

virtual List<String> get_binary_extensions(const Ref<EditorExportPreset> &p_preset) const {
List<String> list;
list.push_back("nro");
Expand Down Expand Up @@ -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<EditorExportPlatformSwitch> exporter = Ref<EditorExportPlatformSwitch>(memnew(EditorExportPlatformSwitch));
Ref<EditorExportPlatformSwitch> exporter;
exporter.instance();
EditorExport::get_singleton()->add_export_platform(exporter);
}
2 changes: 1 addition & 1 deletion os_switch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion os_switch.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit e6cb232

Please sign in to comment.