summaryrefslogtreecommitdiff
path: root/core/os/os.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/os/os.h')
-rw-r--r--core/os/os.h34
1 files changed, 18 insertions, 16 deletions
diff --git a/core/os/os.h b/core/os/os.h
index a31b1c1f4b..9ca034a01c 100644
--- a/core/os/os.h
+++ b/core/os/os.h
@@ -42,21 +42,20 @@
#include <stdarg.h>
class OS {
-
static OS *singleton;
String _execpath;
List<String> _cmdline;
- bool _keep_screen_on;
- bool low_processor_usage_mode;
- int low_processor_usage_mode_sleep_usec;
- bool _verbose_stdout;
+ bool _keep_screen_on = true; // set default value to true, because this had been true before godot 2.0.
+ bool low_processor_usage_mode = false;
+ int low_processor_usage_mode_sleep_usec = 10000;
+ bool _verbose_stdout = false;
String _local_clipboard;
uint64_t _msec_splash;
- bool _no_window;
- int _exit_code;
+ bool _no_window = false;
+ int _exit_code = 0;
int _orientation;
- bool _allow_hidpi;
- bool _allow_layered;
+ bool _allow_hidpi = false;
+ bool _allow_layered = false;
bool _use_vsync;
bool _vsync_via_compositor;
@@ -64,9 +63,9 @@ class OS {
void *_stack_bottom;
- CompositeLogger *_logger;
+ CompositeLogger *_logger = nullptr;
- bool restart_on_exit;
+ bool restart_on_exit = false;
List<String> restart_commandline;
protected:
@@ -86,8 +85,8 @@ public:
protected:
friend class Main;
- HasServerFeatureCallback has_server_feature_callback;
- RenderThreadMode _render_thread_mode;
+ HasServerFeatureCallback has_server_feature_callback = nullptr;
+ RenderThreadMode _render_thread_mode = RENDER_THREAD_SAFE;
// functions used by main to initialize/deinitialize the OS
void add_logger(Logger *p_logger);
@@ -130,7 +129,7 @@ public:
virtual int get_low_processor_usage_mode_sleep_usec() const;
virtual String get_executable_path() const;
- virtual Error execute(const String &p_path, const List<String> &p_arguments, bool p_blocking = true, ProcessID *r_child_id = NULL, String *r_pipe = NULL, int *r_exitcode = NULL, bool read_stderr = false, Mutex *p_pipe_mutex = NULL) = 0;
+ virtual Error execute(const String &p_path, const List<String> &p_arguments, bool p_blocking = true, ProcessID *r_child_id = nullptr, String *r_pipe = nullptr, int *r_exitcode = nullptr, bool read_stderr = false, Mutex *p_pipe_mutex = nullptr) = 0;
virtual Error kill(const ProcessID &p_pid) = 0;
virtual int get_process_id() const;
virtual void vibrate_handheld(int p_duration_ms = 500);
@@ -149,6 +148,11 @@ public:
bool is_layered_allowed() const { return _allow_layered; }
bool is_hidpi_allowed() const { return _allow_hidpi; }
+ virtual int get_tablet_driver_count() const { return 0; };
+ virtual String get_tablet_driver_name(int p_driver) const { return ""; };
+ virtual String get_current_tablet_driver() const { return ""; };
+ virtual void set_current_tablet_driver(const String &p_driver){};
+
void ensure_user_data_dir();
virtual MainLoop *get_main_loop() const = 0;
@@ -183,7 +187,6 @@ public:
};
struct Date {
-
int year;
Month month;
int day;
@@ -192,7 +195,6 @@ public:
};
struct Time {
-
int hour;
int min;
int sec;