mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-21 09:55:45 +00:00
input_common: Improve SDL joystick and hide toggle option
This commit is contained in:
parent
7f907227dd
commit
32e0572a68
4 changed files with 76 additions and 33 deletions
|
@ -309,11 +309,14 @@ ConfigureInputPlayer::ConfigureInputPlayer(QWidget* parent, std::size_t player_i
|
|||
buttons_param[button_id].Clear();
|
||||
button_map[button_id]->setText(tr("[not set]"));
|
||||
});
|
||||
context_menu.addAction(tr("Toggle button"), [&] {
|
||||
const bool toggle_value = !buttons_param[button_id].Get("toggle", false);
|
||||
buttons_param[button_id].Set("toggle", toggle_value);
|
||||
button_map[button_id]->setText(ButtonToText(buttons_param[button_id]));
|
||||
});
|
||||
if (buttons_param[button_id].Has("toggle")) {
|
||||
context_menu.addAction(tr("Toggle button"), [&] {
|
||||
const bool toggle_value =
|
||||
!buttons_param[button_id].Get("toggle", false);
|
||||
buttons_param[button_id].Set("toggle", toggle_value);
|
||||
button_map[button_id]->setText(ButtonToText(buttons_param[button_id]));
|
||||
});
|
||||
}
|
||||
if (buttons_param[button_id].Has("threshold")) {
|
||||
context_menu.addAction(tr("Set threshold"), [&] {
|
||||
const int button_threshold = static_cast<int>(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue