mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-21 07:35:45 +00:00
input_common: Add support for analog toggle
This commit is contained in:
parent
9bec068e76
commit
d4fb46d8f9
4 changed files with 15 additions and 0 deletions
|
@ -382,6 +382,12 @@ ConfigureInputPlayer::ConfigureInputPlayer(QWidget* parent, std::size_t player_i
|
|||
button_map[button_id]->setText(ButtonToText(param));
|
||||
emulated_controller->SetButtonParam(button_id, param);
|
||||
});
|
||||
context_menu.addAction(tr("Toggle axis"), [&] {
|
||||
const bool toggle_value = !param.Get("toggle", false);
|
||||
param.Set("toggle", toggle_value);
|
||||
button_map[button_id]->setText(ButtonToText(param));
|
||||
emulated_controller->SetButtonParam(button_id, param);
|
||||
});
|
||||
context_menu.addAction(tr("Set threshold"), [&] {
|
||||
const int button_threshold =
|
||||
static_cast<int>(param.Get("threshold", 0.5f) * 100.0f);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue