Add get_screen_refresh_rate() to OS

This method can be used to get the refresh rate of a given screen.
It is supported on Windows, macOS, Linux, Android and iOS (but not
HTML5).
This commit is contained in:
Hugo Locurcio 2022-03-06 00:34:56 +01:00
parent 8975470bc2
commit cec7c908ca
No known key found for this signature in database
GPG key ID: 39E8F8BE30B0A49C
17 changed files with 177 additions and 1 deletions

View file

@ -445,6 +445,7 @@ public:
virtual Point2 get_screen_position(int p_screen = -1) 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_refresh_rate(int p_screen = -1) const;
virtual Point2 get_window_position() const;
virtual void set_window_position(const Point2 &p_position);