android: Move settings to debug submenu
This commit is contained in:
parent
5de8c5b5c7
commit
5e58af0616
|
@ -108,6 +108,7 @@ class Settings {
|
||||||
const val SECTION_AUDIO = "Audio"
|
const val SECTION_AUDIO = "Audio"
|
||||||
const val SECTION_CPU = "Cpu"
|
const val SECTION_CPU = "Cpu"
|
||||||
const val SECTION_THEME = "Theme"
|
const val SECTION_THEME = "Theme"
|
||||||
|
const val SECTION_DEBUG = "Debug"
|
||||||
|
|
||||||
const val PREF_OVERLAY_INIT = "OverlayInit"
|
const val PREF_OVERLAY_INIT = "OverlayInit"
|
||||||
const val PREF_CONTROL_SCALE = "controlScale"
|
const val PREF_CONTROL_SCALE = "controlScale"
|
||||||
|
|
|
@ -6,10 +6,9 @@ package org.yuzu.yuzu_emu.features.settings.model.view
|
||||||
import org.yuzu.yuzu_emu.features.settings.model.AbstractSetting
|
import org.yuzu.yuzu_emu.features.settings.model.AbstractSetting
|
||||||
|
|
||||||
class SubmenuSetting(
|
class SubmenuSetting(
|
||||||
setting: AbstractSetting?,
|
|
||||||
titleId: Int,
|
titleId: Int,
|
||||||
descriptionId: Int,
|
descriptionId: Int,
|
||||||
val menuKey: String
|
val menuKey: String
|
||||||
) : SettingsItem(setting, titleId, descriptionId) {
|
) : SettingsItem(null, titleId, descriptionId) {
|
||||||
override val type = TYPE_SUBMENU
|
override val type = TYPE_SUBMENU
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,6 +68,7 @@ class SettingsFragmentPresenter(private val fragmentView: SettingsFragmentView)
|
||||||
Settings.SECTION_RENDERER -> addGraphicsSettings(sl)
|
Settings.SECTION_RENDERER -> addGraphicsSettings(sl)
|
||||||
Settings.SECTION_AUDIO -> addAudioSettings(sl)
|
Settings.SECTION_AUDIO -> addAudioSettings(sl)
|
||||||
Settings.SECTION_THEME -> addThemeSettings(sl)
|
Settings.SECTION_THEME -> addThemeSettings(sl)
|
||||||
|
Settings.SECTION_DEBUG -> addDebugSettings(sl)
|
||||||
else -> {
|
else -> {
|
||||||
fragmentView.showToastMessage("Unimplemented menu", false)
|
fragmentView.showToastMessage("Unimplemented menu", false)
|
||||||
return
|
return
|
||||||
|
@ -82,7 +83,6 @@ class SettingsFragmentPresenter(private val fragmentView: SettingsFragmentView)
|
||||||
sl.apply {
|
sl.apply {
|
||||||
add(
|
add(
|
||||||
SubmenuSetting(
|
SubmenuSetting(
|
||||||
null,
|
|
||||||
R.string.preferences_general,
|
R.string.preferences_general,
|
||||||
0,
|
0,
|
||||||
Settings.SECTION_GENERAL
|
Settings.SECTION_GENERAL
|
||||||
|
@ -90,7 +90,6 @@ class SettingsFragmentPresenter(private val fragmentView: SettingsFragmentView)
|
||||||
)
|
)
|
||||||
add(
|
add(
|
||||||
SubmenuSetting(
|
SubmenuSetting(
|
||||||
null,
|
|
||||||
R.string.preferences_system,
|
R.string.preferences_system,
|
||||||
0,
|
0,
|
||||||
Settings.SECTION_SYSTEM
|
Settings.SECTION_SYSTEM
|
||||||
|
@ -98,7 +97,6 @@ class SettingsFragmentPresenter(private val fragmentView: SettingsFragmentView)
|
||||||
)
|
)
|
||||||
add(
|
add(
|
||||||
SubmenuSetting(
|
SubmenuSetting(
|
||||||
null,
|
|
||||||
R.string.preferences_graphics,
|
R.string.preferences_graphics,
|
||||||
0,
|
0,
|
||||||
Settings.SECTION_RENDERER
|
Settings.SECTION_RENDERER
|
||||||
|
@ -106,12 +104,18 @@ class SettingsFragmentPresenter(private val fragmentView: SettingsFragmentView)
|
||||||
)
|
)
|
||||||
add(
|
add(
|
||||||
SubmenuSetting(
|
SubmenuSetting(
|
||||||
null,
|
|
||||||
R.string.preferences_audio,
|
R.string.preferences_audio,
|
||||||
0,
|
0,
|
||||||
Settings.SECTION_AUDIO
|
Settings.SECTION_AUDIO
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
add(
|
||||||
|
SubmenuSetting(
|
||||||
|
R.string.preferences_debug,
|
||||||
|
0,
|
||||||
|
Settings.SECTION_DEBUG
|
||||||
|
)
|
||||||
|
)
|
||||||
add(
|
add(
|
||||||
RunnableSetting(
|
RunnableSetting(
|
||||||
R.string.reset_to_default,
|
R.string.reset_to_default,
|
||||||
|
@ -223,17 +227,7 @@ class SettingsFragmentPresenter(private val fragmentView: SettingsFragmentView)
|
||||||
private fun addGraphicsSettings(sl: ArrayList<SettingsItem>) {
|
private fun addGraphicsSettings(sl: ArrayList<SettingsItem>) {
|
||||||
settingsActivity.setToolbarTitle(settingsActivity.getString(R.string.preferences_graphics))
|
settingsActivity.setToolbarTitle(settingsActivity.getString(R.string.preferences_graphics))
|
||||||
sl.apply {
|
sl.apply {
|
||||||
add(
|
|
||||||
SingleChoiceSetting(
|
|
||||||
IntSetting.RENDERER_BACKEND,
|
|
||||||
R.string.renderer_api,
|
|
||||||
0,
|
|
||||||
R.array.rendererApiNames,
|
|
||||||
R.array.rendererApiValues,
|
|
||||||
IntSetting.RENDERER_BACKEND.key,
|
|
||||||
IntSetting.RENDERER_BACKEND.defaultValue
|
|
||||||
)
|
|
||||||
)
|
|
||||||
add(
|
add(
|
||||||
SingleChoiceSetting(
|
SingleChoiceSetting(
|
||||||
IntSetting.RENDERER_ACCURACY,
|
IntSetting.RENDERER_ACCURACY,
|
||||||
|
@ -327,15 +321,6 @@ class SettingsFragmentPresenter(private val fragmentView: SettingsFragmentView)
|
||||||
IntSetting.RENDERER_ASYNCHRONOUS_SHADERS.defaultValue
|
IntSetting.RENDERER_ASYNCHRONOUS_SHADERS.defaultValue
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
add(
|
|
||||||
SwitchSetting(
|
|
||||||
IntSetting.RENDERER_DEBUG,
|
|
||||||
R.string.renderer_debug,
|
|
||||||
R.string.renderer_debug_description,
|
|
||||||
IntSetting.RENDERER_DEBUG.key,
|
|
||||||
IntSetting.RENDERER_DEBUG.defaultValue
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -451,4 +436,30 @@ class SettingsFragmentPresenter(private val fragmentView: SettingsFragmentView)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun addDebugSettings(sl: ArrayList<SettingsItem>) {
|
||||||
|
settingsActivity.setToolbarTitle(settingsActivity.getString(R.string.preferences_debug))
|
||||||
|
sl.apply {
|
||||||
|
add(
|
||||||
|
SingleChoiceSetting(
|
||||||
|
IntSetting.RENDERER_BACKEND,
|
||||||
|
R.string.renderer_api,
|
||||||
|
0,
|
||||||
|
R.array.rendererApiNames,
|
||||||
|
R.array.rendererApiValues,
|
||||||
|
IntSetting.RENDERER_BACKEND.key,
|
||||||
|
IntSetting.RENDERER_BACKEND.defaultValue
|
||||||
|
)
|
||||||
|
)
|
||||||
|
add(
|
||||||
|
SwitchSetting(
|
||||||
|
IntSetting.RENDERER_DEBUG,
|
||||||
|
R.string.renderer_debug,
|
||||||
|
R.string.renderer_debug_description,
|
||||||
|
IntSetting.RENDERER_DEBUG.key,
|
||||||
|
IntSetting.RENDERER_DEBUG.defaultValue
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -196,6 +196,7 @@
|
||||||
<string name="preferences_graphics">Graphics</string>
|
<string name="preferences_graphics">Graphics</string>
|
||||||
<string name="preferences_audio">Audio</string>
|
<string name="preferences_audio">Audio</string>
|
||||||
<string name="preferences_theme">Theme and color</string>
|
<string name="preferences_theme">Theme and color</string>
|
||||||
|
<string name="preferences_debug">Debug</string>
|
||||||
|
|
||||||
<!-- ROM loading errors -->
|
<!-- ROM loading errors -->
|
||||||
<string name="loader_error_encrypted">Your ROM is encrypted</string>
|
<string name="loader_error_encrypted">Your ROM is encrypted</string>
|
||||||
|
|
Reference in New Issue