summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorFabio Alessandrelli <fabio.alessandrelli@gmail.com>2021-01-10 11:05:38 +0100
committerFabio Alessandrelli <fabio.alessandrelli@gmail.com>2021-01-10 12:04:09 +0100
commit33e914b1ebc011579cf0686aacdc0626aa7fd19a (patch)
tree256c6ab90a77bccd0e0ec31fe74727d6325e86ed /platform
parenteb5304842ab566d5c5a53e01c60d532d016971c8 (diff)
Fix JavaScript platform after MainLoop methods rename.
Diffstat (limited to 'platform')
-rw-r--r--platform/javascript/http_client_javascript.cpp4
-rw-r--r--platform/javascript/javascript_main.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/platform/javascript/http_client_javascript.cpp b/platform/javascript/http_client_javascript.cpp
index 44819c495c..c8c48dd582 100644
--- a/platform/javascript/http_client_javascript.cpp
+++ b/platform/javascript/http_client_javascript.cpp
@@ -220,13 +220,13 @@ Error HTTPClient::poll() {
has_polled = true;
} else {
// forcing synchronous requests is not possible on the web
- if (last_polling_frame == Engine::get_singleton()->get_idle_frames()) {
+ if (last_polling_frame == Engine::get_singleton()->get_process_frames()) {
WARN_PRINT("HTTPClient polled multiple times in one frame, "
"but request cannot progress more than once per "
"frame on the HTML5 platform.");
}
}
- last_polling_frame = Engine::get_singleton()->get_idle_frames();
+ last_polling_frame = Engine::get_singleton()->get_process_frames();
#endif
polled_response_code = godot_xhr_get_status(xhr_id);
diff --git a/platform/javascript/javascript_main.cpp b/platform/javascript/javascript_main.cpp
index 5656ecd7dc..0b8af70b13 100644
--- a/platform/javascript/javascript_main.cpp
+++ b/platform/javascript/javascript_main.cpp
@@ -87,7 +87,7 @@ extern EMSCRIPTEN_KEEPALIVE int godot_js_main(int argc, char *argv[]) {
ResourceLoader::set_abort_on_missing_resources(false);
Main::start();
- os->get_main_loop()->init();
+ os->get_main_loop()->initialize();
emscripten_set_main_loop(main_loop_callback, -1, false);
// Immediately run the first iteration.
// We are inside an animation frame, we want to immediately draw on the newly setup canvas.