mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-13 21:17:58 -05:00
sdl_impl: Revert to the "old" method of mapping sticks
Not all controllers have a SDL_GameController binding. This caused controllers not present in the SDL GameController database to have buttons mapped instead of axes. Furthermore, it was not possible to invert the axes when it could be useful such as emulating a horizontal single joycon or other potential cases. This allows us to invert the axes by reversing the order of mapping (vertical, then horizontal).
This commit is contained in:
@ -370,6 +370,18 @@ ConfigureInputPlayer::ConfigureInputPlayer(QWidget* parent, std::size_t player_i
|
||||
}
|
||||
|
||||
connect(analog_button, &QPushButton::clicked, [=, this] {
|
||||
if (!map_analog_stick_accepted) {
|
||||
map_analog_stick_accepted =
|
||||
QMessageBox::information(
|
||||
this, tr("Map Analog Stick"),
|
||||
tr("After pressing OK, first move your joystick horizontally, and then "
|
||||
"vertically.\nTo invert the axes, first move your joystick "
|
||||
"vertically, and then horizontally."),
|
||||
QMessageBox::Ok | QMessageBox::Cancel) == QMessageBox::Ok;
|
||||
if (!map_analog_stick_accepted) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
HandleClick(
|
||||
analog_map_buttons[analog_id][sub_button_id],
|
||||
[=, this](const Common::ParamPackage& params) {
|
||||
|
Reference in New Issue
Block a user