You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +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:
@@ -134,6 +134,9 @@ public:
|
||||
virtual void set_window_fullscreen(bool p_enabled);
|
||||
virtual bool is_window_fullscreen() const;
|
||||
virtual Size2 get_screen_size(int p_screen = -1) const;
|
||||
virtual int get_screen_dpi(int p_screen = -1) const;
|
||||
virtual float get_screen_scale(int p_screen = -1) const;
|
||||
virtual float get_screen_max_scale() const;
|
||||
|
||||
virtual Point2 get_mouse_position() const;
|
||||
virtual int get_mouse_button_state() const;
|
||||
|
||||
Reference in New Issue
Block a user