mirror of
https://github.com/godotengine/godot.git
synced 2025-11-01 22:21:18 +00:00
[JS] Check canvas size each loop, force redraw.
Remove ResizeObserver, fix compatibility issues, achieve smoother resizing.
This commit is contained in:
parent
093c463ebf
commit
c7d2767ab9
3 changed files with 23 additions and 17 deletions
|
|
@ -61,6 +61,9 @@ class OS_JavaScript : public OS_Unix {
|
|||
double last_click_ms;
|
||||
int last_click_button_index;
|
||||
|
||||
int last_width;
|
||||
int last_height;
|
||||
|
||||
MainLoop *main_loop;
|
||||
int video_driver_index;
|
||||
AudioDriverJavaScript audio_driver_javascript;
|
||||
|
|
@ -105,6 +108,7 @@ protected:
|
|||
public:
|
||||
String canvas_id;
|
||||
void finalize_async();
|
||||
bool check_size_force_redraw();
|
||||
|
||||
// Override return type to make writing static callbacks less tedious.
|
||||
static OS_JavaScript *get_singleton();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue