From 5f5262ad34ba618dfc66e2e2d2e1bfe6f06b0f61 Mon Sep 17 00:00:00 2001 From: zackhow Date: Wed, 7 Nov 2018 19:50:44 -0500 Subject: [PATCH] AndroidTv: don't show landscape lock setting for leanback --- .../settings/ui/SettingsFragmentPresenter.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragmentPresenter.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragmentPresenter.java index f27596228f..fb44556dc4 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragmentPresenter.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragmentPresenter.java @@ -3,6 +3,7 @@ package org.dolphinemu.dolphinemu.features.settings.ui; import android.os.Bundle; import android.text.TextUtils; +import org.dolphinemu.dolphinemu.DolphinApplication; import org.dolphinemu.dolphinemu.NativeLibrary; import org.dolphinemu.dolphinemu.R; import org.dolphinemu.dolphinemu.features.settings.model.BooleanSetting; @@ -24,6 +25,7 @@ import org.dolphinemu.dolphinemu.features.settings.utils.SettingsFile; import org.dolphinemu.dolphinemu.utils.DirectoryInitialization; import org.dolphinemu.dolphinemu.utils.EGLHelper; import org.dolphinemu.dolphinemu.utils.Log; +import org.dolphinemu.dolphinemu.utils.TvUtil; import java.io.File; import java.util.ArrayList; @@ -265,9 +267,12 @@ public final class SettingsFragmentPresenter sl.add(new CheckBoxSetting(SettingsFile.KEY_ENABLE_SAVE_STATES, Settings.SECTION_INI_CORE, R.string.enable_save_states, R.string.enable_save_states_description, false, enableSaveState)); - sl.add(new CheckBoxSetting(SettingsFile.KEY_LOCK_LANDSCAPE, Settings.SECTION_INI_CORE, - R.string.lock_emulation_landscape, R.string.lock_emulation_landscape_desc, true, - lockToLandscape)); + if (!TvUtil.isLeanback(DolphinApplication.getAppContext())) + { + sl.add(new CheckBoxSetting(SettingsFile.KEY_LOCK_LANDSCAPE, Settings.SECTION_INI_CORE, + R.string.lock_emulation_landscape, R.string.lock_emulation_landscape_desc, true, + lockToLandscape)); + } sl.add(new CheckBoxSetting(SettingsFile.KEY_ANALYTICS_ENABLED, Settings.SECTION_ANALYTICS, R.string.analytics, 0, false, analytics)); }