mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-26 03:35:26 +00:00
[Android] Simplify call for getting the WindowManager instance within EmulationActivity.
This commit is contained in:
parent
cb3afe8f70
commit
c517b7fe7e
@ -45,7 +45,7 @@ public final class EmulationActivity extends Activity
|
||||
|
||||
// Retrieve screen dimensions.
|
||||
DisplayMetrics displayMetrics = new DisplayMetrics();
|
||||
WindowManager wm = (WindowManager) getApplicationContext().getSystemService(Context.WINDOW_SERVICE); // the results will be higher than using the activity context object or the getWindowManager() shortcut
|
||||
WindowManager wm = getWindowManager();
|
||||
wm.getDefaultDisplay().getMetrics(displayMetrics);
|
||||
this.screenHeight = displayMetrics.heightPixels;
|
||||
this.screenWidth = displayMetrics.widthPixels;
|
||||
|
Loading…
x
Reference in New Issue
Block a user