android: Add accelerated boot configuration option

This commit is contained in:
Merry 2024-01-21 17:16:49 +00:00
parent c59ef7d9d0
commit e48bf0bb4a
3 changed files with 32 additions and 0 deletions

View file

@ -10,6 +10,7 @@ enum class BooleanSetting(override val key: String) : AbstractBooleanSetting {
CPU_DEBUG_MODE("cpu_debug_mode"),
FASTMEM("cpuopt_fastmem"),
FASTMEM_EXCLUSIVES("cpuopt_fastmem_exclusives"),
MULTIBLOCK_COMPILATION("cpuopt_multiblock_compilation"),
RENDERER_USE_SPEED_LIMIT("use_speed_limit"),
USE_DOCKED_MODE("use_docked_mode"),
RENDERER_USE_DISK_SHADER_CACHE("use_disk_shader_cache"),

View file

@ -328,6 +328,36 @@ abstract class SettingsItem(
override fun reset() = setBoolean(defaultValue)
}
put(SwitchSetting(fastmem, R.string.fastmem, 0))
val multiblock_compilation = object : AbstractBooleanSetting {
override fun getBoolean(needsGlobal: Boolean): Boolean =
BooleanSetting.MULTIBLOCK_COMPILATION.getBoolean()
override fun setBoolean(value: Boolean) {
BooleanSetting.MULTIBLOCK_COMPILATION.setBoolean(value)
}
override val key: String = MULTIBLOCK_COMPILATION
override val isRuntimeModifiable: Boolean = false
override val pairedSettingKey = BooleanSetting.CPU_DEBUG_MODE.key
override val defaultValue: Boolean = true
override val isSwitchable: Boolean = true
override var global: Boolean
get() {
return BooleanSetting.MULTIBLOCK_COMPILATION.global
}
set(value) {
BooleanSetting.MULTIBLOCK_COMPILATION.global = value
}
override val isSaveable = true
override fun getValueAsString(needsGlobal: Boolean): String =
getBoolean().toString()
override fun reset() = setBoolean(defaultValue)
}
put(SwitchSetting(multiblock_compilation, R.string.multiblock_compilation, 0))
}
}
}

View file

@ -246,6 +246,7 @@
<string name="renderer_debug">Graphics debugging</string>
<string name="renderer_debug_description">Sets the graphics API to a slow debugging mode.</string>
<string name="fastmem">Fastmem</string>
<string name="multiblock_compilation">Accelerated boot</string>
<!-- Audio settings strings -->
<string name="audio_output_engine">Output engine</string>