diff options
author | Leon Krause <lk@leonkrause.com> | 2017-10-02 16:09:24 +0200 |
---|---|---|
committer | Leon Krause <lk@leonkrause.com> | 2017-10-02 21:07:05 +0200 |
commit | 7b23665e728fe10cd0eedb54824aaeae4ae23758 (patch) | |
tree | 289ef1982791cba4c35cc0de331083170c0b18b4 /core | |
parent | 66987d687879017affb787b4a3ffb1ef11880336 (diff) |
Add OS::is_userfs_persistent to check user:// persistence
Allows starting HTML5 export when IndexedDB is not available.
Diffstat (limited to 'core')
-rw-r--r-- | core/bind/core_bind.cpp | 6 | ||||
-rw-r--r-- | core/bind/core_bind.h | 2 | ||||
-rw-r--r-- | core/os/os.h | 2 |
3 files changed, 10 insertions, 0 deletions
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index 2477b1b187..3cc5489dd5 100644 --- a/core/bind/core_bind.cpp +++ b/core/bind/core_bind.cpp @@ -755,6 +755,11 @@ bool _OS::can_draw() const { return OS::get_singleton()->can_draw(); } +bool _OS::is_userfs_persistent() const { + + return OS::get_singleton()->is_userfs_persistent(); +} + int _OS::get_processor_count() const { return OS::get_singleton()->get_processor_count(); @@ -1051,6 +1056,7 @@ void _OS::_bind_methods() { ClassDB::bind_method(D_METHOD("get_model_name"), &_OS::get_model_name); ClassDB::bind_method(D_METHOD("can_draw"), &_OS::can_draw); + ClassDB::bind_method(D_METHOD("is_userfs_persistent"), &_OS::is_userfs_persistent); ClassDB::bind_method(D_METHOD("is_stdout_verbose"), &_OS::is_stdout_verbose); ClassDB::bind_method(D_METHOD("can_use_threads"), &_OS::can_use_threads); diff --git a/core/bind/core_bind.h b/core/bind/core_bind.h index 1a22d45932..e0985383c2 100644 --- a/core/bind/core_bind.h +++ b/core/bind/core_bind.h @@ -266,6 +266,8 @@ public: bool can_draw() const; + bool is_userfs_persistent() const; + bool is_stdout_verbose() const; int get_processor_count() const; diff --git a/core/os/os.h b/core/os/os.h index 38bbbc0a57..954cc61b2c 100644 --- a/core/os/os.h +++ b/core/os/os.h @@ -284,6 +284,8 @@ public: virtual bool can_draw() const = 0; + virtual bool is_userfs_persistent() const { return true; } + bool is_stdout_verbose() const; virtual void disable_crash_handler() {} |