diff options
author | t895 <clombardo169@gmail.com> | 2024-02-20 14:07:15 +0100 |
---|---|---|
committer | t895 <clombardo169@gmail.com> | 2024-02-20 14:16:38 +0100 |
commit | 6a90db8c19e047da03f9dce36dfc1949d239f4af (patch) | |
tree | fd8b2963ff77e707f29cbdf24a2d6282432d66a0 /src | |
parent | android: Add StringInputSetting settings item (diff) | |
download | yuzu-6a90db8c19e047da03f9dce36dfc1949d239f4af.tar yuzu-6a90db8c19e047da03f9dce36dfc1949d239f4af.tar.gz yuzu-6a90db8c19e047da03f9dce36dfc1949d239f4af.tar.bz2 yuzu-6a90db8c19e047da03f9dce36dfc1949d239f4af.tar.lz yuzu-6a90db8c19e047da03f9dce36dfc1949d239f4af.tar.xz yuzu-6a90db8c19e047da03f9dce36dfc1949d239f4af.tar.zst yuzu-6a90db8c19e047da03f9dce36dfc1949d239f4af.zip |
Diffstat (limited to 'src')
4 files changed, 7 insertions, 1 deletions
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/StringSetting.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/StringSetting.kt index a0d8cfede..6f16cf5b1 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/StringSetting.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/StringSetting.kt @@ -6,7 +6,8 @@ package org.yuzu.yuzu_emu.features.settings.model import org.yuzu.yuzu_emu.utils.NativeConfig enum class StringSetting(override val key: String) : AbstractStringSetting { - DRIVER_PATH("driver_path"); + DRIVER_PATH("driver_path"), + DEVICE_NAME("device_name"); override fun getString(needsGlobal: Boolean): String = NativeConfig.getString(key, needsGlobal) diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/view/SettingsItem.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/view/SettingsItem.kt index 40d7c4df7..5fdf98318 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/view/SettingsItem.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/view/SettingsItem.kt @@ -16,6 +16,7 @@ import org.yuzu.yuzu_emu.features.settings.model.ByteSetting import org.yuzu.yuzu_emu.features.settings.model.IntSetting import org.yuzu.yuzu_emu.features.settings.model.LongSetting import org.yuzu.yuzu_emu.features.settings.model.ShortSetting +import org.yuzu.yuzu_emu.features.settings.model.StringSetting import org.yuzu.yuzu_emu.utils.NativeConfig /** @@ -109,6 +110,7 @@ abstract class SettingsItem( // List of all general val settingsItems = HashMap<String, SettingsItem>().apply { + put(StringInputSetting(StringSetting.DEVICE_NAME, titleId = R.string.device_name)) put( SwitchSetting( BooleanSetting.RENDERER_USE_SPEED_LIMIT, 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 e491c29a2..6907bec02 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 @@ -23,6 +23,7 @@ import org.yuzu.yuzu_emu.features.settings.model.LongSetting import org.yuzu.yuzu_emu.features.settings.model.Settings import org.yuzu.yuzu_emu.features.settings.model.Settings.MenuTag import org.yuzu.yuzu_emu.features.settings.model.ShortSetting +import org.yuzu.yuzu_emu.features.settings.model.StringSetting import org.yuzu.yuzu_emu.features.settings.model.view.* import org.yuzu.yuzu_emu.utils.InputHandler import org.yuzu.yuzu_emu.utils.NativeConfig @@ -153,6 +154,7 @@ class SettingsFragmentPresenter( private fun addSystemSettings(sl: ArrayList<SettingsItem>) { sl.apply { + add(StringSetting.DEVICE_NAME.key) add(BooleanSetting.RENDERER_USE_SPEED_LIMIT.key) add(ShortSetting.RENDERER_SPEED_LIMIT.key) add(BooleanSetting.USE_DOCKED_MODE.key) diff --git a/src/android/app/src/main/res/values/strings.xml b/src/android/app/src/main/res/values/strings.xml index 6a631f664..f7f19cdad 100644 --- a/src/android/app/src/main/res/values/strings.xml +++ b/src/android/app/src/main/res/values/strings.xml @@ -209,6 +209,7 @@ <string name="value_with_units">%1$s%2$s</string> <!-- System settings strings --> + <string name="device_name">Device name</string> <string name="use_docked_mode">Docked Mode</string> <string name="use_docked_mode_description">Increases resolution, decreasing performance. Handheld Mode is used when disabled, lowering resolution and increasing performance.</string> <string name="emulated_region">Emulated region</string> |