diff options
author | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2021-02-12 10:50:02 +0100 |
---|---|---|
committer | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2021-02-12 12:01:44 +0100 |
commit | 6cff589b5bd483b563fe465bde74ca94902aab41 (patch) | |
tree | af9eec5b24ba8c299d9d665f1a9934d2ddde77c3 /platform/javascript/godot_js.h | |
parent | e9a25b8552150393db9632fff23c0f60403b987a (diff) | |
download | redot-engine-6cff589b5bd483b563fe465bde74ca94902aab41.tar.gz |
[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).
Diffstat (limited to 'platform/javascript/godot_js.h')
-rw-r--r-- | platform/javascript/godot_js.h | 1 |
1 files changed, 1 insertions, 0 deletions
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(); |