mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 16:33:30 +00:00
[HTML5] Handle contextmenu, webglcontextlost internally.
This way they are automatically cleaned up when the engine exits, landing a hand to browsers garbage collectors.
This commit is contained in:
parent
e9e2dedb76
commit
3366122e1a
4 changed files with 16 additions and 11 deletions
|
@ -703,6 +703,9 @@ DisplayServerJavaScript::DisplayServerJavaScript(const String &p_rendering_drive
|
|||
// Ensure the canvas ID.
|
||||
godot_js_config_canvas_id_get(canvas_id, 256);
|
||||
|
||||
// Handle contextmenu, webglcontextlost
|
||||
godot_js_display_setup_canvas();
|
||||
|
||||
// Check if it's windows.
|
||||
swap_cancel_ok = godot_js_display_is_swap_ok_cancel() == 1;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue