diff options
author | spholz <44805808+spholz@users.noreply.github.com> | 2021-08-12 22:27:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-12 22:27:17 +0200 |
commit | 78a82495931e8c6b2161f79d2ac00ea88baea4f2 (patch) | |
tree | 94480efdcd09a71e676782434a44d124002f835a /src/yuzu/configuration/configure_input_player.cpp | |
parent | 21743daf38f19160baa2da0e939a4e945dd57228 (diff) | |
parent | 0509fe33775bfc2b0221732dfdf08860d47283fc (diff) |
Merge branch 'yuzu-emu:master' into fix-lan-play
Diffstat (limited to 'src/yuzu/configuration/configure_input_player.cpp')
-rw-r--r-- | src/yuzu/configuration/configure_input_player.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/yuzu/configuration/configure_input_player.cpp b/src/yuzu/configuration/configure_input_player.cpp index 6b9bd05f1..7527c068b 100644 --- a/src/yuzu/configuration/configure_input_player.cpp +++ b/src/yuzu/configuration/configure_input_player.cpp @@ -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>( |