mirror of
https://github.com/PabloMK7/citra.git
synced 2025-09-08 03:40:05 +00:00
Reenable dpad axes option
This commit is contained in:
parent
0ec72a122d
commit
f1b328920c
5 changed files with 15 additions and 7 deletions
|
@ -165,9 +165,11 @@ class Settings {
|
|||
KEY_CSTICK_AXIS_VERTICAL,
|
||||
KEY_CSTICK_AXIS_HORIZONTAL
|
||||
)
|
||||
val dPadKeys = listOf(
|
||||
// KEY_DPAD_AXIS_VERTICAL,
|
||||
// KEY_DPAD_AXIS_HORIZONTAL,
|
||||
val dPadAxisKeys = listOf(
|
||||
KEY_DPAD_AXIS_VERTICAL,
|
||||
KEY_DPAD_AXIS_HORIZONTAL
|
||||
)
|
||||
val dPadButtonKeys = listOf(
|
||||
KEY_BUTTON_UP,
|
||||
KEY_BUTTON_DOWN,
|
||||
KEY_BUTTON_LEFT,
|
||||
|
|
|
@ -136,7 +136,6 @@ class InputBindingSetting(
|
|||
Settings.KEY_BUTTON_DOWN -> NativeLibrary.ButtonType.DPAD_DOWN
|
||||
Settings.KEY_BUTTON_LEFT -> NativeLibrary.ButtonType.DPAD_LEFT
|
||||
Settings.KEY_BUTTON_RIGHT -> NativeLibrary.ButtonType.DPAD_RIGHT
|
||||
|
||||
Settings.HOTKEY_SCREEN_SWAP -> Hotkey.SWAP_SCREEN.button
|
||||
Settings.HOTKEY_CYCLE_LAYOUT -> Hotkey.CYCLE_LAYOUT.button
|
||||
Settings.HOTKEY_CLOSE_GAME -> Hotkey.CLOSE_GAME.button
|
||||
|
|
|
@ -191,7 +191,7 @@ class SettingsActivity : AppCompatActivity(), SettingsActivityView {
|
|||
presenter.onSettingsReset()
|
||||
|
||||
val controllerKeys = Settings.buttonKeys + Settings.circlePadKeys + Settings.cStickKeys +
|
||||
Settings.dPadKeys + Settings.triggerKeys
|
||||
Settings.dPadButtonKeys + Settings.dPadAxisKeys + Settings.triggerKeys
|
||||
val editor =
|
||||
PreferenceManager.getDefaultSharedPreferences(CitraApplication.appContext).edit()
|
||||
controllerKeys.forEach { editor.remove(it) }
|
||||
|
|
|
@ -621,8 +621,13 @@ class SettingsFragmentPresenter(private val fragmentView: SettingsFragmentView)
|
|||
add(InputBindingSetting(button, Settings.axisTitles[i]))
|
||||
}
|
||||
|
||||
add(HeaderSetting(R.string.controller_dpad))
|
||||
Settings.dPadKeys.forEachIndexed { i: Int, key: String ->
|
||||
add(HeaderSetting(R.string.controller_dpad_axis))
|
||||
Settings.dPadAxisKeys.forEachIndexed { i: Int, key: String ->
|
||||
val button = getInputObject(key)
|
||||
add(InputBindingSetting(button, Settings.axisTitles[i]))
|
||||
}
|
||||
add(HeaderSetting(R.string.controller_dpad_button))
|
||||
Settings.dPadButtonKeys.forEachIndexed { i: Int, key: String ->
|
||||
val button = getInputObject(key)
|
||||
add(InputBindingSetting(button, Settings.dPadTitles[i]))
|
||||
}
|
||||
|
|
|
@ -108,6 +108,8 @@
|
|||
<string name="controller_triggers">Triggers</string>
|
||||
<string name="controller_trigger">Trigger</string>
|
||||
<string name="controller_dpad">D-Pad</string>
|
||||
<string name="controller_dpad_axis">D-Pad (Axis)</string>
|
||||
<string name="controller_dpad_button">D-Pad (Buttons)</string>
|
||||
<string name="controller_axis_vertical">Up/Down Axis</string>
|
||||
<string name="controller_axis_horizontal">Left/Right Axis</string>
|
||||
<string name="direction_up">Up</string>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue