diff options
| author | Hein-Pieter van Braam <hp@tmm.cx> | 2017-10-03 12:24:11 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-10-03 12:24:11 +0200 |
| commit | 2bece6bbd35c53390b2d3eedcf9b6d9949db518d (patch) | |
| tree | aad5340ed55e7727d50d6beb438cc843c78051e2 /core | |
| parent | cc407847286e8033252db8caa382857a5601fbf2 (diff) | |
| parent | 7b23665e728fe10cd0eedb54824aaeae4ae23758 (diff) | |
Merge pull request #11782 from eska014/persistent-userfs-test
Add OS::is_userfs_persistent, allow starting HTML5 platform in private mode
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 f47d540351..7de1c7e6b9 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 f12ab9f000..6f3606dcc3 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 c9d25792b9..5de07be005 100644 --- a/core/os/os.h +++ b/core/os/os.h @@ -283,6 +283,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() {} |