Merge pull request #13069 from JosJuice/android-real-balance-board

Android: Add the "Real Balance Board" setting
This commit is contained in:
JMC47 2024-10-13 15:17:26 -04:00 committed by GitHub
commit 8d5b6e8e86
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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>