You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
[JS] Check canvas size each loop, force redraw.
Fix compatibility issues, achieve smoother resizing.
This commit is contained in:
@@ -47,6 +47,10 @@ void exit_callback() {
|
||||
}
|
||||
|
||||
void main_loop_callback() {
|
||||
bool force_draw = DisplayServerJavaScript::get_singleton()->check_size_force_redraw();
|
||||
if (force_draw) {
|
||||
Main::force_redraw();
|
||||
}
|
||||
if (os->main_loop_iterate()) {
|
||||
emscripten_cancel_main_loop(); // Cancel current loop and wait for finalize_async.
|
||||
EM_ASM({
|
||||
|
||||
Reference in New Issue
Block a user