Update the editor display scale based on the device's scaled density
This commit is contained in:
@ -222,10 +222,14 @@ public class GodotIO {
|
||||
}
|
||||
|
||||
public int getScreenDPI() {
|
||||
DisplayMetrics metrics = activity.getApplicationContext().getResources().getDisplayMetrics();
|
||||
DisplayMetrics metrics = activity.getResources().getDisplayMetrics();
|
||||
return (int)(metrics.density * 160f);
|
||||
}
|
||||
|
||||
public float getScaledDensity() {
|
||||
return activity.getResources().getDisplayMetrics().scaledDensity;
|
||||
}
|
||||
|
||||
public double getScreenRefreshRate(double fallback) {
|
||||
Display display = activity.getWindowManager().getDefaultDisplay();
|
||||
if (display != null) {
|
||||
|
||||
Reference in New Issue
Block a user