You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-29 16:16:38 +00:00
[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).
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user