[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 b6e97c10ad
commit f34c7982c5
4 changed files with 13 additions and 8 deletions

View file

@ -683,7 +683,7 @@ DisplayServerJavaScript::DisplayServerJavaScript(const String &p_rendering_drive
godot_js_config_canvas_id_get(canvas_id, 256);
// Handle contextmenu, webglcontextlost
godot_js_display_setup_canvas(p_resolution.x, p_resolution.y, p_mode == WINDOW_MODE_FULLSCREEN);
godot_js_display_setup_canvas(p_resolution.x, p_resolution.y, p_mode == WINDOW_MODE_FULLSCREEN, OS::get_singleton()->is_hidpi_allowed() ? 1 : 0);
// Check if it's windows.
swap_cancel_ok = godot_js_display_is_swap_ok_cancel() == 1;