diff options
Diffstat (limited to 'core/os/os.cpp')
-rw-r--r-- | core/os/os.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/core/os/os.cpp b/core/os/os.cpp index 5eed10e30c..8dcf0990fc 100644 --- a/core/os/os.cpp +++ b/core/os/os.cpp @@ -33,6 +33,7 @@ #include "dir_access.h" #include "input.h" #include "os/file_access.h" +#include "os/midi_driver.h" #include "project_settings.h" #include "servers/audio_server.h" #include "version_generated.gen.h" @@ -614,6 +615,9 @@ bool OS::has_feature(const String &p_feature) { if (_check_internal_feature_support(p_feature)) return true; + if (ProjectSettings::get_singleton()->has_custom_feature(p_feature)) + return true; + return false; } @@ -656,9 +660,32 @@ const char *OS::get_audio_driver_name(int p_driver) const { return AudioDriverManager::get_driver(p_driver)->get_name(); } +void OS::set_restart_on_exit(bool p_restart, const List<String> &p_restart_arguments) { + restart_on_exit = p_restart; + restart_commandline = p_restart_arguments; +} + +bool OS::is_restart_on_exit_set() const { + return restart_on_exit; +} + +List<String> OS::get_restart_on_exit_arguments() const { + return restart_commandline; +} + +PoolStringArray OS::get_connected_midi_inputs() { + + if (MIDIDriver::get_singleton()) + return MIDIDriver::get_singleton()->get_connected_inputs(); + + PoolStringArray list; + return list; +} + OS::OS() { void *volatile stack_bottom; + restart_on_exit = false; last_error = NULL; singleton = this; _keep_screen_on = true; // set default value to true, because this had been true before godot 2.0. |