Use getDisplayMetrics().

`getRealMetrics()` is now deprecated as well. It suggests using `getCurrentWindowMetrics()` instead, but that's new in SDK 30 and doesn't even contain DPI information. Whereas this function has been around since the start.
This commit is contained in:
player-03
2022-12-20 14:29:37 -05:00
committed by GitHub
parent b5d6db38a7
commit 61dd0629be

View File

@@ -37,8 +37,7 @@ public class GameActivity extends SDLActivity {
if (metrics == null) {
metrics = new DisplayMetrics ();
Extension.mainActivity.getWindowManager ().getDefaultDisplay ().getRealMetrics (metrics);
metrics = Extension.mainContext.getResources ().getDisplayMetrics ();
}