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:
@@ -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 ();
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user