1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-08 12:40:44 +00:00

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
17 changed files with 177 additions and 1 deletions

View File

@@ -444,6 +444,10 @@ int OS_Android::get_screen_dpi(int p_screen) const {
return godot_io_java->get_screen_dpi();
}
float OS_Android::get_screen_refresh_rate(int p_screen) const {
return godot_io_java->get_screen_refresh_rate(OS::get_singleton()->SCREEN_REFRESH_RATE_FALLBACK);
}
String OS_Android::get_data_path() const {
return get_user_data_dir();
}