From 6cff589b5bd483b563fe465bde74ca94902aab41 Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Fri, 12 Feb 2021 10:50:02 +0100 Subject: [HTML5] Detect screen scale and DPI. `OS.get_screen_scale` will now return the `window.devicePixelRatio` value, `OS.get_screen_dpi` uses CSS media queries to find approximate DPI value for the current display. `OS.get_screen_size` also return the actual screen size (not the CSS pixel size). --- platform/javascript/godot_js.h | 1 + 1 file changed, 1 insertion(+) (limited to 'platform/javascript/godot_js.h') diff --git a/platform/javascript/godot_js.h b/platform/javascript/godot_js.h index e8f41d4cae..d2a2fbd6db 100644 --- a/platform/javascript/godot_js.h +++ b/platform/javascript/godot_js.h @@ -51,6 +51,7 @@ extern int godot_js_os_execute(const char *p_json); extern void godot_js_os_shell_open(const char *p_uri); // Display +extern int godot_js_display_screen_dpi_get(); extern double godot_js_display_pixel_ratio_get(); extern void godot_js_display_alert(const char *p_text); extern int godot_js_display_touchscreen_is_available(); -- cgit v1.2.3