diff options
Diffstat (limited to 'platform/android/java/lib')
-rw-r--r-- | platform/android/java/lib/src/org/godotengine/godot/GodotIO.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/platform/android/java/lib/src/org/godotengine/godot/GodotIO.java b/platform/android/java/lib/src/org/godotengine/godot/GodotIO.java index d679fd92c0..b151e7eec1 100644 --- a/platform/android/java/lib/src/org/godotengine/godot/GodotIO.java +++ b/platform/android/java/lib/src/org/godotengine/godot/GodotIO.java @@ -226,6 +226,14 @@ public class GodotIO { return (int)(metrics.density * 160f); } + public double getScreenRefreshRate(double fallback) { + Display display = activity.getWindowManager().getDefaultDisplay(); + if (display != null) { + return display.getRefreshRate(); + } + return fallback; + } + public int[] screenGetUsableRect() { DisplayMetrics metrics = activity.getResources().getDisplayMetrics(); Display display = activity.getWindowManager().getDefaultDisplay(); |