mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-21 07:35:45 +00:00
yuzu: Config allow to delete single axis directions when buttons are mapped to a stick
This commit is contained in:
parent
d0bdbb9afb
commit
ec8fa22768
2 changed files with 24 additions and 3 deletions
|
@ -520,7 +520,28 @@ ConfigureInputPlayer::ConfigureInputPlayer(QWidget* parent, std::size_t player_i
|
|||
QMenu context_menu;
|
||||
Common::ParamPackage param = emulated_controller->GetStickParam(analog_id);
|
||||
context_menu.addAction(tr("Clear"), [&] {
|
||||
emulated_controller->SetStickParam(analog_id, {});
|
||||
if (param.Get("engine", "") != "analog_from_button") {
|
||||
emulated_controller->SetStickParam(analog_id, {});
|
||||
for (auto button : analog_map_buttons[analog_id]) {
|
||||
button->setText(tr("[not set]"));
|
||||
}
|
||||
return;
|
||||
}
|
||||
switch (sub_button_id) {
|
||||
case 0:
|
||||
param.Erase("up");
|
||||
break;
|
||||
case 1:
|
||||
param.Erase("down");
|
||||
break;
|
||||
case 2:
|
||||
param.Erase("left");
|
||||
break;
|
||||
case 3:
|
||||
param.Erase("right");
|
||||
break;
|
||||
}
|
||||
emulated_controller->SetStickParam(analog_id, param);
|
||||
analog_map_buttons[analog_id][sub_button_id]->setText(tr("[not set]"));
|
||||
});
|
||||
context_menu.addAction(tr("Center axis"), [&] {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue