summaryrefslogtreecommitdiff
path: root/core/os
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2018-07-19 18:58:15 -0300
committerJuan Linietsky <reduzio@gmail.com>2018-07-19 19:02:04 -0300
commitc69de2ba46463adeadf90f38660d6b6e034d7e0b (patch)
treeddeb1c8e40c080a6544eba86fc12f138b54be0ed /core/os
parent76bfe14e00ee5c8b65275d8b8e0c4cdc25b4b899 (diff)
-Project/Editor settings now use new inspector
-Project/Editor settings now show tooltips properly -Settings thar require restart now will show a restart warning -Video driver is now visible all the time, can be changed easily -Added function to request current video driver
Diffstat (limited to 'core/os')
-rw-r--r--core/os/os.cpp12
-rw-r--r--core/os/os.h10
2 files changed, 21 insertions, 1 deletions
diff --git a/core/os/os.cpp b/core/os/os.cpp
index d0a7bc6fbe..f99e98c240 100644
--- a/core/os/os.cpp
+++ b/core/os/os.cpp
@@ -659,6 +659,18 @@ 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_argumens() const {
+ return restart_commandline;
+}
+
OS::OS() {
void *volatile stack_bottom;
diff --git a/core/os/os.h b/core/os/os.h
index adf01a90e7..2e4888dfba 100644
--- a/core/os/os.h
+++ b/core/os/os.h
@@ -74,6 +74,9 @@ class OS {
CompositeLogger *_logger;
+ bool restart_on_exit;
+ List<String> restart_commandline;
+
protected:
void _set_logger(CompositeLogger *p_logger);
@@ -182,7 +185,7 @@ public:
virtual int get_video_driver_count() const;
virtual const char *get_video_driver_name(int p_driver) const;
-
+ virtual int get_current_video_driver() const = 0;
virtual int get_audio_driver_count() const;
virtual const char *get_audio_driver_name(int p_driver) const;
@@ -496,6 +499,11 @@ public:
bool is_layered_allowed() const { return _allow_layered; }
bool is_hidpi_allowed() const { return _allow_hidpi; }
+
+ void set_restart_on_exit(bool p_restart, const List<String> &p_restart_arguments);
+ bool is_restart_on_exit_set() const;
+ List<String> get_restart_on_exit_argumens() const;
+
OS();
virtual ~OS();
};