mirror of
https://github.com/PabloMK7/citra.git
synced 2025-09-08 20:00:04 +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_VERTICAL,
|
||||||
KEY_CSTICK_AXIS_HORIZONTAL
|
KEY_CSTICK_AXIS_HORIZONTAL
|
||||||
)
|
)
|
||||||
val dPadKeys = listOf(
|
val dPadAxisKeys = listOf(
|
||||||
// KEY_DPAD_AXIS_VERTICAL,
|
KEY_DPAD_AXIS_VERTICAL,
|
||||||
// KEY_DPAD_AXIS_HORIZONTAL,
|
KEY_DPAD_AXIS_HORIZONTAL
|
||||||
|
)
|
||||||
|
val dPadButtonKeys = listOf(
|
||||||
KEY_BUTTON_UP,
|
KEY_BUTTON_UP,
|
||||||
KEY_BUTTON_DOWN,
|
KEY_BUTTON_DOWN,
|
||||||
KEY_BUTTON_LEFT,
|
KEY_BUTTON_LEFT,
|
||||||
|
|
|
@ -136,7 +136,6 @@ class InputBindingSetting(
|
||||||
Settings.KEY_BUTTON_DOWN -> NativeLibrary.ButtonType.DPAD_DOWN
|
Settings.KEY_BUTTON_DOWN -> NativeLibrary.ButtonType.DPAD_DOWN
|
||||||
Settings.KEY_BUTTON_LEFT -> NativeLibrary.ButtonType.DPAD_LEFT
|
Settings.KEY_BUTTON_LEFT -> NativeLibrary.ButtonType.DPAD_LEFT
|
||||||
Settings.KEY_BUTTON_RIGHT -> NativeLibrary.ButtonType.DPAD_RIGHT
|
Settings.KEY_BUTTON_RIGHT -> NativeLibrary.ButtonType.DPAD_RIGHT
|
||||||
|
|
||||||
Settings.HOTKEY_SCREEN_SWAP -> Hotkey.SWAP_SCREEN.button
|
Settings.HOTKEY_SCREEN_SWAP -> Hotkey.SWAP_SCREEN.button
|
||||||
Settings.HOTKEY_CYCLE_LAYOUT -> Hotkey.CYCLE_LAYOUT.button
|
Settings.HOTKEY_CYCLE_LAYOUT -> Hotkey.CYCLE_LAYOUT.button
|
||||||
Settings.HOTKEY_CLOSE_GAME -> Hotkey.CLOSE_GAME.button
|
Settings.HOTKEY_CLOSE_GAME -> Hotkey.CLOSE_GAME.button
|
||||||
|
|
|
@ -191,7 +191,7 @@ class SettingsActivity : AppCompatActivity(), SettingsActivityView {
|
||||||
presenter.onSettingsReset()
|
presenter.onSettingsReset()
|
||||||
|
|
||||||
val controllerKeys = Settings.buttonKeys + Settings.circlePadKeys + Settings.cStickKeys +
|
val controllerKeys = Settings.buttonKeys + Settings.circlePadKeys + Settings.cStickKeys +
|
||||||
Settings.dPadKeys + Settings.triggerKeys
|
Settings.dPadButtonKeys + Settings.dPadAxisKeys + Settings.triggerKeys
|
||||||
val editor =
|
val editor =
|
||||||
PreferenceManager.getDefaultSharedPreferences(CitraApplication.appContext).edit()
|
PreferenceManager.getDefaultSharedPreferences(CitraApplication.appContext).edit()
|
||||||
controllerKeys.forEach { editor.remove(it) }
|
controllerKeys.forEach { editor.remove(it) }
|
||||||
|
|
|
@ -621,8 +621,13 @@ class SettingsFragmentPresenter(private val fragmentView: SettingsFragmentView)
|
||||||
add(InputBindingSetting(button, Settings.axisTitles[i]))
|
add(InputBindingSetting(button, Settings.axisTitles[i]))
|
||||||
}
|
}
|
||||||
|
|
||||||
add(HeaderSetting(R.string.controller_dpad))
|
add(HeaderSetting(R.string.controller_dpad_axis))
|
||||||
Settings.dPadKeys.forEachIndexed { i: Int, key: String ->
|
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)
|
val button = getInputObject(key)
|
||||||
add(InputBindingSetting(button, Settings.dPadTitles[i]))
|
add(InputBindingSetting(button, Settings.dPadTitles[i]))
|
||||||
}
|
}
|
||||||
|
|
|
@ -108,6 +108,8 @@
|
||||||
<string name="controller_triggers">Triggers</string>
|
<string name="controller_triggers">Triggers</string>
|
||||||
<string name="controller_trigger">Trigger</string>
|
<string name="controller_trigger">Trigger</string>
|
||||||
<string name="controller_dpad">D-Pad</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_vertical">Up/Down Axis</string>
|
||||||
<string name="controller_axis_horizontal">Left/Right Axis</string>
|
<string name="controller_axis_horizontal">Left/Right Axis</string>
|
||||||
<string name="direction_up">Up</string>
|
<string name="direction_up">Up</string>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue