From 19fc3bf0a4b3f59b8033796c8db7af9ab9a1d56b Mon Sep 17 00:00:00 2001 From: OpenSauce04 Date: Fri, 2 Aug 2024 23:44:08 +0100 Subject: [PATCH] main.cpp: `connect_shortcut` now also connects to the secondary window --- src/citra_qt/main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/citra_qt/main.cpp b/src/citra_qt/main.cpp index 7a93508e7..6aa295bfc 100644 --- a/src/citra_qt/main.cpp +++ b/src/citra_qt/main.cpp @@ -605,7 +605,7 @@ void GMainWindow::InitializeSaveStateMenuActions() { UpdateSaveStates(); } -void GMainWindow::InitializeHotkeys() { // TODO: This code kind of sucks +void GMainWindow::InitializeHotkeys() { hotkey_registry.LoadHotkeys(); const QString main_window = QStringLiteral("Main Window"); @@ -666,7 +666,9 @@ void GMainWindow::InitializeHotkeys() { // TODO: This code kind of sucks const auto connect_shortcut = [&](const QString& action_name, const auto& function) { const auto* hotkey = hotkey_registry.GetHotkey(main_window, action_name, this); + const auto* secondary_hotkey = hotkey_registry.GetHotkey(main_window, action_name, secondary_window); connect(hotkey, &QShortcut::activated, this, function); + connect(secondary_hotkey, &QShortcut::activated, this, function); }; connect(hotkey_registry.GetHotkey(main_window, toggle_screen_layout, render_window),