diff options
author | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2020-10-23 18:33:20 +0200 |
---|---|---|
committer | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2020-11-10 11:42:51 +0100 |
commit | e2083871eb57e56fe637c3d8f6647ddb4ff539e0 (patch) | |
tree | a58669c68065541e0062f82d7edb45789d8f354f /platform/javascript/os_javascript.h | |
parent | 54cda5c3b8622c9168fcd5d1c68964ef7697b27e (diff) | |
download | redot-engine-e2083871eb57e56fe637c3d8f6647ddb4ff539e0.tar.gz |
[HTML5] Port JavaScript inline code to libraries.
The API is implemented in javascript, and generates C functions that can
be called from godot.
This allows much cleaner code replacing all `EM_ASM` calls in our C++
code with plain C function calls.
This also gets rid of few hacks and comes with few optimizations (e.g.
custom cursor shapes should be much faster now).
Diffstat (limited to 'platform/javascript/os_javascript.h')
-rw-r--r-- | platform/javascript/os_javascript.h | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/platform/javascript/os_javascript.h b/platform/javascript/os_javascript.h index 85551d708b..03a3053367 100644 --- a/platform/javascript/os_javascript.h +++ b/platform/javascript/os_javascript.h @@ -42,13 +42,14 @@ class OS_JavaScript : public OS_Unix { MainLoop *main_loop = nullptr; AudioDriverJavaScript *audio_driver_javascript = nullptr; - bool finalizing = false; + bool idb_is_syncing = false; bool idb_available = false; bool idb_needs_sync = false; static void main_loop_callback(); static void file_access_close_callback(const String &p_file, int p_flags); + static void fs_sync_callback(); protected: void initialize() override; @@ -61,15 +62,12 @@ protected: bool _check_internal_feature_support(const String &p_feature) override; public: - bool idb_is_syncing = false; - // Override return type to make writing static callbacks less tedious. static OS_JavaScript *get_singleton(); void initialize_joypads() override; MainLoop *get_main_loop() const override; - void finalize_async(); bool main_loop_iterate(); 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) override; @@ -88,11 +86,9 @@ public: String get_data_path() const override; String get_user_data_dir() const override; - void set_idb_available(bool p_idb_available); bool is_userfs_persistent() const override; void resume_audio(); - bool is_finalizing() { return finalizing; } OS_JavaScript(); }; |