diff options
author | Morph <39850852+Morph1984@users.noreply.github.com> | 2022-04-23 16:21:23 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-23 16:21:23 -0400 |
commit | 7f77aafe41051c5fa8c7729e8743af2c09f3365e (patch) | |
tree | a0f78bf751ec52fb78cbd49b1d492aac9800074d /src | |
parent | dc71bccc5ce3c74b86664f72838806e2489da295 (diff) | |
parent | 4de43e4d4a20217599e682306438ab6452207c6b (diff) |
Merge pull request #8249 from german77/queued
hotkeys: Trigger actions on a separate thread
Diffstat (limited to 'src')
-rw-r--r-- | src/yuzu/main.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 5e26aad29c..f607f464a6 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -933,8 +933,9 @@ void GMainWindow::LinkActionShortcut(QAction* action, const QString& action_name auto* controller = system->HIDCore().GetEmulatedController(Core::HID::NpadIdType::Player1); const auto* controller_hotkey = hotkey_registry.GetControllerHotkey(main_window, action_name, controller); - connect(controller_hotkey, &ControllerShortcut::Activated, this, - [action] { action->trigger(); }); + connect( + controller_hotkey, &ControllerShortcut::Activated, this, [action] { action->trigger(); }, + Qt::QueuedConnection); } void GMainWindow::InitializeHotkeys() { @@ -961,7 +962,8 @@ void GMainWindow::InitializeHotkeys() { const auto* controller_hotkey = hotkey_registry.GetControllerHotkey(main_window, action_name, controller); connect(hotkey, &QShortcut::activated, this, function); - connect(controller_hotkey, &ControllerShortcut::Activated, this, function); + connect(controller_hotkey, &ControllerShortcut::Activated, this, function, + Qt::QueuedConnection); }; connect_shortcut(QStringLiteral("Exit Fullscreen"), [&] { |