diff options
| author | Lioncash <mathew1800@gmail.com> | 2013-04-24 09:48:11 -0400 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2013-04-24 09:48:11 -0400 |
| commit | bd284f14689688c423fc097d69af894215778aa0 (patch) | |
| tree | 1e62068387eca1ea974dafd531c01c2479a64137 /Source/Android | |
| parent | 62ebfa0a78f2cbb8d40d2ae974ee9d404ddf6721 (diff) | |
[Android] WINDOW_SERVICE should be accessed statically.
(it's a static final variable in the Context class, so... yeah).
Diffstat (limited to 'Source/Android')
| -rw-r--r-- | Source/Android/src/org/dolphinemu/dolphinemu/DolphinEmulator.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/Android/src/org/dolphinemu/dolphinemu/DolphinEmulator.java b/Source/Android/src/org/dolphinemu/dolphinemu/DolphinEmulator.java index 95c319b6aa..79d1bd44f2 100644 --- a/Source/Android/src/org/dolphinemu/dolphinemu/DolphinEmulator.java +++ b/Source/Android/src/org/dolphinemu/dolphinemu/DolphinEmulator.java @@ -9,6 +9,7 @@ import java.io.OutputStream; import net.simonvt.menudrawer.MenuDrawer; import android.app.Activity; +import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.os.Environment; @@ -135,7 +136,8 @@ public class DolphinEmulator<MainActivity> extends Activity if (resultCode == Activity.RESULT_OK) { DisplayMetrics displayMetrics = new DisplayMetrics(); - WindowManager wm = (WindowManager) getApplicationContext().getSystemService(getApplicationContext().WINDOW_SERVICE); // the results will be higher than using the activity context object or the getWindowManager() shortcut + getApplicationContext(); + WindowManager wm = (WindowManager) getApplicationContext().getSystemService(Context.WINDOW_SERVICE); // the results will be higher than using the activity context object or the getWindowManager() shortcut wm.getDefaultDisplay().getMetrics(displayMetrics); screenWidth = displayMetrics.widthPixels; screenHeight = displayMetrics.heightPixels; |
