Merge pull request #57335 from jordigcs/display-refresh-rate

This commit is contained in:
Rémi Verschelde 2022-02-04 11:51:07 +01:00 committed by GitHub
commit d235c1bb19
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 172 additions and 0 deletions

View file

@ -161,6 +161,16 @@ int DisplayServerAndroid::screen_get_dpi(int p_screen) const {
return godot_io_java->get_screen_dpi();
}
float DisplayServerAndroid::screen_get_refresh_rate(int p_screen) const {
GodotIOJavaWrapper *godot_io_java = OS_Android::get_singleton()->get_godot_io_java();
if (!godot_io_java) {
ERR_PRINT("An error occured while trying to get the screen refresh rate.");
return SCREEN_REFRESH_RATE_FALLBACK;
}
return godot_io_java->get_screen_refresh_rate(SCREEN_REFRESH_RATE_FALLBACK);
}
bool DisplayServerAndroid::screen_is_touchscreen(int p_screen) const {
return true;
}