diff options
Diffstat (limited to '')
5 files changed, 30 insertions, 23 deletions
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/BooleanSetting.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/BooleanSetting.kt index 28dbead36..d41933766 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/BooleanSetting.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/BooleanSetting.kt @@ -8,6 +8,7 @@ enum class BooleanSetting( override val section: String, override val defaultValue: Boolean ) : AbstractBooleanSetting { + CPU_DEBUG_MODE("cpu_debug_mode", Settings.SECTION_CPU, false), FASTMEM("cpuopt_fastmem", Settings.SECTION_CPU, true), FASTMEM_EXCLUSIVES("cpuopt_fastmem_exclusives", Settings.SECTION_CPU, true), PICTURE_IN_PICTURE("picture_in_picture", Settings.SECTION_GENERAL, true), diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/view/HeaderSetting.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/view/HeaderSetting.kt index 0f8edbfb0..a67001311 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/view/HeaderSetting.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/view/HeaderSetting.kt @@ -3,12 +3,8 @@ package org.yuzu.yuzu_emu.features.settings.model.view -import org.yuzu.yuzu_emu.features.settings.model.AbstractSetting - class HeaderSetting( - setting: AbstractSetting?, - titleId: Int, - descriptionId: Int -) : SettingsItem(setting, titleId, descriptionId) { + titleId: Int +) : SettingsItem(null, titleId, 0) { override val type = TYPE_HEADER } diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragmentPresenter.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragmentPresenter.kt index 35e3f62f9..8215a08eb 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragmentPresenter.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragmentPresenter.kt @@ -467,6 +467,7 @@ class SettingsFragmentPresenter(private val fragmentView: SettingsFragmentView) private fun addDebugSettings(sl: ArrayList<SettingsItem>) { settingsActivity.setToolbarTitle(settingsActivity.getString(R.string.preferences_debug)) sl.apply { + add(HeaderSetting(R.string.gpu)) add( SingleChoiceSetting( IntSetting.RENDERER_BACKEND, @@ -488,6 +489,17 @@ class SettingsFragmentPresenter(private val fragmentView: SettingsFragmentView) ) ) + add(HeaderSetting(R.string.cpu)) + add( + SwitchSetting( + BooleanSetting.CPU_DEBUG_MODE, + R.string.cpu_debug_mode, + R.string.cpu_debug_mode_description, + BooleanSetting.CPU_DEBUG_MODE.key, + BooleanSetting.CPU_DEBUG_MODE.defaultValue + ) + ) + val fastmem = object : AbstractBooleanSetting { override var boolean: Boolean get() = diff --git a/src/android/app/src/main/res/layout/list_item_settings_header.xml b/src/android/app/src/main/res/layout/list_item_settings_header.xml index abd24df6f..cf85bc0da 100644 --- a/src/android/app/src/main/res/layout/list_item_settings_header.xml +++ b/src/android/app/src/main/res/layout/list_item_settings_header.xml @@ -1,20 +1,14 @@ <?xml version="1.0" encoding="utf-8"?> -<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" +<com.google.android.material.textview.MaterialTextView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" + android:id="@+id/text_header_name" + style="@style/TextAppearance.Material3.TitleSmall" android:layout_width="match_parent" - android:layout_height="48dp" - android:paddingVertical="4dp" - android:paddingHorizontal="@dimen/spacing_large"> - - <com.google.android.material.textview.MaterialTextView - style="@style/TextAppearance.Material3.TitleSmall" - android:id="@+id/text_header_name" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_gravity="start|center_vertical" - android:textColor="?attr/colorPrimary" - android:textAlignment="viewStart" - android:textStyle="bold" - tools:text="CPU Settings" /> - -</FrameLayout> + android:layout_height="wrap_content" + android:layout_gravity="start|center_vertical" + android:paddingHorizontal="@dimen/spacing_large" + android:paddingVertical="16dp" + android:textAlignment="viewStart" + android:textColor="?attr/colorPrimary" + android:textStyle="bold" + tools:text="CPU Settings" /> diff --git a/src/android/app/src/main/res/values/strings.xml b/src/android/app/src/main/res/values/strings.xml index 0e42956f7..a7ea01b55 100644 --- a/src/android/app/src/main/res/values/strings.xml +++ b/src/android/app/src/main/res/values/strings.xml @@ -175,6 +175,10 @@ <string name="use_disk_shader_cache_description">Reduces stuttering by locally storing and loading generated shaders.</string> <!-- Debug settings strings --> + <string name="cpu">CPU</string> + <string name="cpu_debug_mode">CPU Debugging</string> + <string name="cpu_debug_mode_description">Puts the CPU in a slow debugging mode.</string> + <string name="gpu">GPU</string> <string name="renderer_api">API</string> <string name="renderer_debug">Graphics debugging</string> <string name="renderer_debug_description">Sets the graphics API to a slow debugging mode.</string> |