You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-11 13:10:58 +00:00
Fix JavaScript platform after MainLoop methods rename.
This commit is contained in:
@@ -220,13 +220,13 @@ Error HTTPClient::poll() {
|
|||||||
has_polled = true;
|
has_polled = true;
|
||||||
} else {
|
} else {
|
||||||
// forcing synchronous requests is not possible on the web
|
// 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, "
|
WARN_PRINT("HTTPClient polled multiple times in one frame, "
|
||||||
"but request cannot progress more than once per "
|
"but request cannot progress more than once per "
|
||||||
"frame on the HTML5 platform.");
|
"frame on the HTML5 platform.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
last_polling_frame = Engine::get_singleton()->get_idle_frames();
|
last_polling_frame = Engine::get_singleton()->get_process_frames();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
polled_response_code = godot_xhr_get_status(xhr_id);
|
polled_response_code = godot_xhr_get_status(xhr_id);
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ extern EMSCRIPTEN_KEEPALIVE int godot_js_main(int argc, char *argv[]) {
|
|||||||
ResourceLoader::set_abort_on_missing_resources(false);
|
ResourceLoader::set_abort_on_missing_resources(false);
|
||||||
|
|
||||||
Main::start();
|
Main::start();
|
||||||
os->get_main_loop()->init();
|
os->get_main_loop()->initialize();
|
||||||
emscripten_set_main_loop(main_loop_callback, -1, false);
|
emscripten_set_main_loop(main_loop_callback, -1, false);
|
||||||
// Immediately run the first iteration.
|
// Immediately run the first iteration.
|
||||||
// We are inside an animation frame, we want to immediately draw on the newly setup canvas.
|
// We are inside an animation frame, we want to immediately draw on the newly setup canvas.
|
||||||
|
|||||||
Reference in New Issue
Block a user