mirror of
https://git.h3cjp.net/H3cJP/yuzu.git
synced 2024-11-15 16:22:45 +00:00
android: Expose CPU debugging option
This commit is contained in:
parent
3ac2c74e85
commit
13a4de647d
|
@ -8,6 +8,7 @@ enum class BooleanSetting(
|
||||||
override val section: String,
|
override val section: String,
|
||||||
override val defaultValue: Boolean
|
override val defaultValue: Boolean
|
||||||
) : AbstractBooleanSetting {
|
) : AbstractBooleanSetting {
|
||||||
|
CPU_DEBUG_MODE("cpu_debug_mode", Settings.SECTION_CPU, false),
|
||||||
FASTMEM("cpuopt_fastmem", Settings.SECTION_CPU, true),
|
FASTMEM("cpuopt_fastmem", Settings.SECTION_CPU, true),
|
||||||
FASTMEM_EXCLUSIVES("cpuopt_fastmem_exclusives", Settings.SECTION_CPU, true),
|
FASTMEM_EXCLUSIVES("cpuopt_fastmem_exclusives", Settings.SECTION_CPU, true),
|
||||||
PICTURE_IN_PICTURE("picture_in_picture", Settings.SECTION_GENERAL, true),
|
PICTURE_IN_PICTURE("picture_in_picture", Settings.SECTION_GENERAL, true),
|
||||||
|
|
|
@ -3,12 +3,8 @@
|
||||||
|
|
||||||
package org.yuzu.yuzu_emu.features.settings.model.view
|
package org.yuzu.yuzu_emu.features.settings.model.view
|
||||||
|
|
||||||
import org.yuzu.yuzu_emu.features.settings.model.AbstractSetting
|
|
||||||
|
|
||||||
class HeaderSetting(
|
class HeaderSetting(
|
||||||
setting: AbstractSetting?,
|
titleId: Int
|
||||||
titleId: Int,
|
) : SettingsItem(null, titleId, 0) {
|
||||||
descriptionId: Int
|
|
||||||
) : SettingsItem(setting, titleId, descriptionId) {
|
|
||||||
override val type = TYPE_HEADER
|
override val type = TYPE_HEADER
|
||||||
}
|
}
|
||||||
|
|
|
@ -467,6 +467,7 @@ class SettingsFragmentPresenter(private val fragmentView: SettingsFragmentView)
|
||||||
private fun addDebugSettings(sl: ArrayList<SettingsItem>) {
|
private fun addDebugSettings(sl: ArrayList<SettingsItem>) {
|
||||||
settingsActivity.setToolbarTitle(settingsActivity.getString(R.string.preferences_debug))
|
settingsActivity.setToolbarTitle(settingsActivity.getString(R.string.preferences_debug))
|
||||||
sl.apply {
|
sl.apply {
|
||||||
|
add(HeaderSetting(R.string.gpu))
|
||||||
add(
|
add(
|
||||||
SingleChoiceSetting(
|
SingleChoiceSetting(
|
||||||
IntSetting.RENDERER_BACKEND,
|
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 {
|
val fastmem = object : AbstractBooleanSetting {
|
||||||
override var boolean: Boolean
|
override var boolean: Boolean
|
||||||
get() =
|
get() =
|
||||||
|
|
|
@ -1,20 +1,14 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?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"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
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:id="@+id/text_header_name"
|
||||||
|
style="@style/TextAppearance.Material3.TitleSmall"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="start|center_vertical"
|
android:layout_gravity="start|center_vertical"
|
||||||
android:textColor="?attr/colorPrimary"
|
android:paddingHorizontal="@dimen/spacing_large"
|
||||||
|
android:paddingVertical="16dp"
|
||||||
android:textAlignment="viewStart"
|
android:textAlignment="viewStart"
|
||||||
|
android:textColor="?attr/colorPrimary"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
tools:text="CPU Settings" />
|
tools:text="CPU Settings" />
|
||||||
|
|
||||||
</FrameLayout>
|
|
||||||
|
|
|
@ -175,6 +175,10 @@
|
||||||
<string name="use_disk_shader_cache_description">Reduces stuttering by locally storing and loading generated shaders.</string>
|
<string name="use_disk_shader_cache_description">Reduces stuttering by locally storing and loading generated shaders.</string>
|
||||||
|
|
||||||
<!-- Debug settings strings -->
|
<!-- 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_api">API</string>
|
||||||
<string name="renderer_debug">Graphics debugging</string>
|
<string name="renderer_debug">Graphics debugging</string>
|
||||||
<string name="renderer_debug_description">Sets the graphics API to a slow debugging mode.</string>
|
<string name="renderer_debug_description">Sets the graphics API to a slow debugging mode.</string>
|
||||||
|
|
Loading…
Reference in a new issue