From b8d71c6562330a673204be617c4f5633e9881767 Mon Sep 17 00:00:00 2001 From: BearOso Date: Thu, 30 Nov 2023 17:12:42 -0600 Subject: [PATCH] Qt: Update actual bindings after using menu items. --- qt/src/ControllerPanel.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/qt/src/ControllerPanel.cpp b/qt/src/ControllerPanel.cpp index d5b7a5b4..3cb14c3e 100644 --- a/qt/src/ControllerPanel.cpp +++ b/qt/src/ControllerPanel.cpp @@ -93,6 +93,7 @@ void ControllerPanel::autoPopulateWithKeyboard(int slot) buttons[app->config->allowed_bindings * i + slot] = EmuBinding::keyboard(QKeySequence::fromString(button_list[i])[0].key()); fillTable(); + app->updateBindings(); } void ControllerPanel::autoPopulateWithJoystick(int joystick_id, int slot) @@ -124,6 +125,7 @@ void ControllerPanel::autoPopulateWithJoystick(int joystick_id, int slot) buttons[4 * i + slot] = EmuBinding::joystick_axis(device.index, sdl_binding.value.axis, sdl_binding.value.axis); } fillTable(); + app->updateBindings(); } void ControllerPanel::swapControllers(int first, int second) @@ -138,6 +140,8 @@ void ControllerPanel::swapControllers(int first, int second) b[i] = a[i]; a[i] = swap; } + + app->updateBindings(); } void ControllerPanel::clearCurrentController() @@ -146,6 +150,7 @@ void ControllerPanel::clearCurrentController() for (auto &b : c.buttons) b = {}; fillTable(); + app->updateBindings(); } void ControllerPanel::clearAllControllers() @@ -154,6 +159,7 @@ void ControllerPanel::clearAllControllers() for (auto &b : c.buttons) b = {}; fillTable(); + app->updateBindings(); } void ControllerPanel::showEvent(QShowEvent *event)