mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 08:23:29 +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
9fb27eba8d
commit
8c9a503bde
4 changed files with 14 additions and 11 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue