1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

[HTML5] Respect allow_hidpi option during setup

The option was forced to `true` before, unlike on other platforms.
This commit is contained in:
Fabio Alessandrelli
2021-03-08 19:31:52 +01:00
parent fd5966af64
commit 758daab3ad
4 changed files with 14 additions and 8 deletions

View File

@@ -782,7 +782,8 @@ Error OS_JavaScript::initialize(const VideoMode &p_desired, int p_video_driver,
video_mode = p_desired;
// fullscreen_change_callback will correct this if the request is successful.
video_mode.fullscreen = false;
godot_js_display_setup_canvas(video_mode.width, video_mode.height, video_mode.fullscreen); // Handle contextmenu, webglcontextlost
// Handle contextmenu, webglcontextlost, initial canvas setup.
godot_js_display_setup_canvas(video_mode.width, video_mode.height, video_mode.fullscreen, is_hidpi_allowed() ? 1 : 0);
swap_ok_cancel = godot_js_display_is_swap_ok_cancel() == 1;