Android: Add the "Real Balance Board" setting

This commit is contained in:
JosJuice 2024-09-22 21:51:12 +02:00
parent de67c4c93b
commit 0c1070a07b
2 changed files with 20 additions and 0 deletions

View File

@ -1226,6 +1226,24 @@ class SettingsFragmentPresenter(
MenuTag.getWiimoteMenuTag(3)
)
)
sl.add(SwitchSetting(context, object : AbstractBooleanSetting {
override val isOverridden: Boolean = IntSetting.WIIMOTE_BB_SOURCE.isOverridden
override val isRuntimeEditable: Boolean = IntSetting.WIIMOTE_BB_SOURCE.isRuntimeEditable
override fun delete(settings: Settings): Boolean {
return IntSetting.WIIMOTE_BB_SOURCE.delete(settings)
}
override val boolean: Boolean get() = IntSetting.WIIMOTE_BB_SOURCE.int == 2
override fun setBoolean(settings: Settings, newValue: Boolean) {
// 0 == None
// 1 == Emulated
// 2 == Real
IntSetting.WIIMOTE_BB_SOURCE.setInt(settings, if (newValue) 2 else 0)
}
}, R.string.real_balance_board, 0))
}
private fun addGraphicsSettings(sl: ArrayList<SettingsItem>) {

View File

@ -23,6 +23,8 @@
<string name="wiimote_extension_2">Wii Remote Extension 3</string>
<string name="wiimote_extension_3">Wii Remote Extension 4</string>
<string name="real_balance_board">Real Balance Board</string>
<string name="wiimote">Wii Remote</string>
<string name="wiimote_general">Buttons</string>
<string name="wiimote_motion_simulation">Motion Simulation</string>