1
0
mirror of https://github.com/godotengine/godot.git synced 2026-01-01 18:51:18 +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:
Fabio Alessandrelli
2021-02-10 16:22:48 +01:00
parent 9fb27eba8d
commit 8c9a503bde
4 changed files with 14 additions and 11 deletions

View File

@@ -814,6 +814,7 @@ void OS_JavaScript::initialize_core() {
Error OS_JavaScript::initialize(const VideoMode &p_desired, int p_video_driver, int p_audio_driver) {
godot_js_display_setup_canvas(); // Handle contextmenu, webglcontextlost
swap_ok_cancel = godot_js_display_is_swap_ok_cancel() == 1;
EmscriptenWebGLContextAttributes attributes;