diff options
Diffstat (limited to 'src')
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( | |||
| 8 | override val section: String, | 8 | override val section: String, |
| 9 | override val defaultValue: Boolean | 9 | override val defaultValue: Boolean |
| 10 | ) : AbstractBooleanSetting { | 10 | ) : AbstractBooleanSetting { |
| 11 | CPU_DEBUG_MODE("cpu_debug_mode", Settings.SECTION_CPU, false), | ||
| 11 | FASTMEM("cpuopt_fastmem", Settings.SECTION_CPU, true), | 12 | FASTMEM("cpuopt_fastmem", Settings.SECTION_CPU, true), |
| 12 | FASTMEM_EXCLUSIVES("cpuopt_fastmem_exclusives", Settings.SECTION_CPU, true), | 13 | FASTMEM_EXCLUSIVES("cpuopt_fastmem_exclusives", Settings.SECTION_CPU, true), |
| 13 | PICTURE_IN_PICTURE("picture_in_picture", Settings.SECTION_GENERAL, true), | 14 | 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 @@ | |||
| 3 | 3 | ||
| 4 | package org.yuzu.yuzu_emu.features.settings.model.view | 4 | package org.yuzu.yuzu_emu.features.settings.model.view |
| 5 | 5 | ||
| 6 | import org.yuzu.yuzu_emu.features.settings.model.AbstractSetting | ||
| 7 | |||
| 8 | class HeaderSetting( | 6 | class HeaderSetting( |
| 9 | setting: AbstractSetting?, | 7 | titleId: Int |
| 10 | titleId: Int, | 8 | ) : SettingsItem(null, titleId, 0) { |
| 11 | descriptionId: Int | ||
| 12 | ) : SettingsItem(setting, titleId, descriptionId) { | ||
| 13 | override val type = TYPE_HEADER | 9 | override val type = TYPE_HEADER |
| 14 | } | 10 | } |
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) | |||
| 467 | private fun addDebugSettings(sl: ArrayList<SettingsItem>) { | 467 | private fun addDebugSettings(sl: ArrayList<SettingsItem>) { |
| 468 | settingsActivity.setToolbarTitle(settingsActivity.getString(R.string.preferences_debug)) | 468 | settingsActivity.setToolbarTitle(settingsActivity.getString(R.string.preferences_debug)) |
| 469 | sl.apply { | 469 | sl.apply { |
| 470 | add(HeaderSetting(R.string.gpu)) | ||
| 470 | add( | 471 | add( |
| 471 | SingleChoiceSetting( | 472 | SingleChoiceSetting( |
| 472 | IntSetting.RENDERER_BACKEND, | 473 | IntSetting.RENDERER_BACKEND, |
| @@ -488,6 +489,17 @@ class SettingsFragmentPresenter(private val fragmentView: SettingsFragmentView) | |||
| 488 | ) | 489 | ) |
| 489 | ) | 490 | ) |
| 490 | 491 | ||
| 492 | add(HeaderSetting(R.string.cpu)) | ||
| 493 | add( | ||
| 494 | SwitchSetting( | ||
| 495 | BooleanSetting.CPU_DEBUG_MODE, | ||
| 496 | R.string.cpu_debug_mode, | ||
| 497 | R.string.cpu_debug_mode_description, | ||
| 498 | BooleanSetting.CPU_DEBUG_MODE.key, | ||
| 499 | BooleanSetting.CPU_DEBUG_MODE.defaultValue | ||
| 500 | ) | ||
| 501 | ) | ||
| 502 | |||
| 491 | val fastmem = object : AbstractBooleanSetting { | 503 | val fastmem = object : AbstractBooleanSetting { |
| 492 | override var boolean: Boolean | 504 | override var boolean: Boolean |
| 493 | get() = | 505 | 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 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" | 2 | <com.google.android.material.textview.MaterialTextView xmlns:android="http://schemas.android.com/apk/res/android" |
| 3 | xmlns:tools="http://schemas.android.com/tools" | 3 | xmlns:tools="http://schemas.android.com/tools" |
| 4 | android:id="@+id/text_header_name" | ||
| 5 | style="@style/TextAppearance.Material3.TitleSmall" | ||
| 4 | android:layout_width="match_parent" | 6 | android:layout_width="match_parent" |
| 5 | android:layout_height="48dp" | 7 | android:layout_height="wrap_content" |
| 6 | android:paddingVertical="4dp" | 8 | android:layout_gravity="start|center_vertical" |
| 7 | android:paddingHorizontal="@dimen/spacing_large"> | 9 | android:paddingHorizontal="@dimen/spacing_large" |
| 8 | 10 | android:paddingVertical="16dp" | |
| 9 | <com.google.android.material.textview.MaterialTextView | 11 | android:textAlignment="viewStart" |
| 10 | style="@style/TextAppearance.Material3.TitleSmall" | 12 | android:textColor="?attr/colorPrimary" |
| 11 | android:id="@+id/text_header_name" | 13 | android:textStyle="bold" |
| 12 | android:layout_width="match_parent" | 14 | tools:text="CPU Settings" /> |
| 13 | android:layout_height="wrap_content" | ||
| 14 | android:layout_gravity="start|center_vertical" | ||
| 15 | android:textColor="?attr/colorPrimary" | ||
| 16 | android:textAlignment="viewStart" | ||
| 17 | android:textStyle="bold" | ||
| 18 | tools:text="CPU Settings" /> | ||
| 19 | |||
| 20 | </FrameLayout> | ||
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 @@ | |||
| 175 | <string name="use_disk_shader_cache_description">Reduces stuttering by locally storing and loading generated shaders.</string> | 175 | <string name="use_disk_shader_cache_description">Reduces stuttering by locally storing and loading generated shaders.</string> |
| 176 | 176 | ||
| 177 | <!-- Debug settings strings --> | 177 | <!-- Debug settings strings --> |
| 178 | <string name="cpu">CPU</string> | ||
| 179 | <string name="cpu_debug_mode">CPU Debugging</string> | ||
| 180 | <string name="cpu_debug_mode_description">Puts the CPU in a slow debugging mode.</string> | ||
| 181 | <string name="gpu">GPU</string> | ||
| 178 | <string name="renderer_api">API</string> | 182 | <string name="renderer_api">API</string> |
| 179 | <string name="renderer_debug">Graphics debugging</string> | 183 | <string name="renderer_debug">Graphics debugging</string> |
| 180 | <string name="renderer_debug_description">Sets the graphics API to a slow debugging mode.</string> | 184 | <string name="renderer_debug_description">Sets the graphics API to a slow debugging mode.</string> |