summaryrefslogtreecommitdiff
path: root/core/os
diff options
context:
space:
mode:
Diffstat (limited to 'core/os')
-rw-r--r--core/os/os.cpp4
-rw-r--r--core/os/os.h2
2 files changed, 6 insertions, 0 deletions
diff --git a/core/os/os.cpp b/core/os/os.cpp
index 535eee4797..f7af74da3e 100644
--- a/core/os/os.cpp
+++ b/core/os/os.cpp
@@ -110,6 +110,10 @@ void OS::printerr(const char *p_format, ...) {
va_end(argp);
}
+void OS::alert(const String &p_alert, const String &p_title) {
+ fprintf(stderr, "%s: %s\n", p_title.utf8().get_data(), p_alert.utf8().get_data());
+}
+
void OS::set_low_processor_usage_mode(bool p_enabled) {
low_processor_usage_mode = p_enabled;
}
diff --git a/core/os/os.h b/core/os/os.h
index 301718a8b3..fcb195afe1 100644
--- a/core/os/os.h
+++ b/core/os/os.h
@@ -120,6 +120,8 @@ public:
virtual void open_midi_inputs();
virtual void close_midi_inputs();
+ virtual void alert(const String &p_alert, const String &p_title = "ALERT!");
+
virtual Error open_dynamic_library(const String p_path, void *&p_library_handle, bool p_also_set_library_path = false) { return ERR_UNAVAILABLE; }
virtual Error close_dynamic_library(void *p_library_handle) { return ERR_UNAVAILABLE; }
virtual Error get_dynamic_library_symbol_handle(void *p_library_handle, const String p_name, void *&p_symbol_handle, bool p_optional = false) { return ERR_UNAVAILABLE; }