diff options
| author | Leon Krause | 2017-10-02 16:09:24 +0200 |
|---|---|---|
| committer | Leon Krause | 2017-10-02 21:07:05 +0200 |
| commit | 7b23665e728fe10cd0eedb54824aaeae4ae23758 (patch) | |
| tree | 289ef1982791cba4c35cc0de331083170c0b18b4 /core/bind | |
| parent | 66987d687879017affb787b4a3ffb1ef11880336 (diff) | |
| download | godot-7b23665e728fe10cd0eedb54824aaeae4ae23758.tar.gz godot-7b23665e728fe10cd0eedb54824aaeae4ae23758.tar.zst godot-7b23665e728fe10cd0eedb54824aaeae4ae23758.zip | |
Add OS::is_userfs_persistent to check user:// persistence
Allows starting HTML5 export when IndexedDB is not available.
Diffstat (limited to 'core/bind')
| -rw-r--r-- | core/bind/core_bind.cpp | 6 | ||||
| -rw-r--r-- | core/bind/core_bind.h | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index 2477b1b18..3cc5489dd 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 1a22d4593..e0985383c 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; |
