mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-10 03:44:26 +00:00
Merge pull request #7536 from zackhow/correct-landscape
Android: fix landscape lock
This commit is contained in:
commit
22ddd11573
@ -212,17 +212,13 @@ public final class EmulationActivity extends AppCompatActivity
|
|||||||
int themeId;
|
int themeId;
|
||||||
if (mDeviceHasTouchScreen)
|
if (mDeviceHasTouchScreen)
|
||||||
{
|
{
|
||||||
// Force landscape
|
BooleanSetting lockLandscape =
|
||||||
if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT)
|
(BooleanSetting) mSettings.getSection(Settings.SECTION_INI_CORE)
|
||||||
{
|
.getSetting(SettingsFile.KEY_LOCK_LANDSCAPE);
|
||||||
BooleanSetting lockLandscape =
|
// Force landscape if set
|
||||||
(BooleanSetting) mSettings.getSection(Settings.SECTION_INI_CORE)
|
if (lockLandscape == null || lockLandscape.getValue())
|
||||||
.getSetting(SettingsFile.KEY_LOCK_LANDSCAPE);
|
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE);
|
||||||
if (lockLandscape == null || lockLandscape.getValue())
|
|
||||||
new Handler().postDelayed(
|
|
||||||
() -> setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE),
|
|
||||||
100);
|
|
||||||
}
|
|
||||||
themeId = R.style.DolphinEmulationBase;
|
themeId = R.style.DolphinEmulationBase;
|
||||||
|
|
||||||
// Get a handle to the Window containing the UI.
|
// Get a handle to the Window containing the UI.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user