diff options
| author | Pierre Bourdon <delroth@gmail.com> | 2018-10-31 01:16:23 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-10-31 01:16:23 +0100 |
| commit | 22ddd11573fd8d3e43a879804e7a64e50928435d (patch) | |
| tree | 1bc39579d828e0aa24fd7317a03b4cdc1aa2f1a4 /Source/Android/app/src/main/java | |
| parent | 550808234544c814f29e553a670aa528374c282b (diff) | |
| parent | b7d0b27a8c3ce7e1827c26d84ab8f375aed9f273 (diff) | |
Merge pull request #7536 from zackhow/correct-landscape
Android: fix landscape lock
Diffstat (limited to 'Source/Android/app/src/main/java')
| -rw-r--r-- | Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/activities/EmulationActivity.java | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/activities/EmulationActivity.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/activities/EmulationActivity.java index 1c9ac12953..1093c37a1a 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/activities/EmulationActivity.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/activities/EmulationActivity.java @@ -212,17 +212,13 @@ public final class EmulationActivity extends AppCompatActivity int themeId; if (mDeviceHasTouchScreen) { - // Force landscape - if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT) - { - BooleanSetting lockLandscape = - (BooleanSetting) mSettings.getSection(Settings.SECTION_INI_CORE) - .getSetting(SettingsFile.KEY_LOCK_LANDSCAPE); - if (lockLandscape == null || lockLandscape.getValue()) - new Handler().postDelayed( - () -> setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE), - 100); - } + BooleanSetting lockLandscape = + (BooleanSetting) mSettings.getSection(Settings.SECTION_INI_CORE) + .getSetting(SettingsFile.KEY_LOCK_LANDSCAPE); + // Force landscape if set + if (lockLandscape == null || lockLandscape.getValue()) + setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE); + themeId = R.style.DolphinEmulationBase; // Get a handle to the Window containing the UI. |
