diff options
| author | Jonas Gutenschwager <spam.saikai@googlemail.com> | 2023-01-18 00:39:31 +0100 |
|---|---|---|
| committer | Jonas Gutenschwager <spam.saikai@googlemail.com> | 2023-01-18 00:39:31 +0100 |
| commit | 66c71b5b5ba953ccb32f210c144bc036da1ba42f (patch) | |
| tree | b1ae6f18dabc296f04c533cb6727dd3ffd65497e /src/yuzu/hotkeys.cpp | |
| parent | 67b76a2bd449d8573f2776a2d5e49190cf0ec8a9 (diff) | |
allow volume up/down hotkeys to be repeated
Diffstat (limited to 'src/yuzu/hotkeys.cpp')
| -rw-r--r-- | src/yuzu/hotkeys.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/yuzu/hotkeys.cpp b/src/yuzu/hotkeys.cpp index 13723f6e53..091336528c 100644 --- a/src/yuzu/hotkeys.cpp +++ b/src/yuzu/hotkeys.cpp @@ -21,7 +21,8 @@ void HotkeyRegistry::SaveHotkeys() { {hotkey.first, group.first, UISettings::ContextualShortcut({hotkey.second.keyseq.toString(), hotkey.second.controller_keyseq, - hotkey.second.context})}); + hotkey.second.context, + hotkey.second.repeat})}); } } } @@ -47,6 +48,7 @@ void HotkeyRegistry::LoadHotkeys() { hk.controller_shortcut->disconnect(); hk.controller_shortcut->SetKey(hk.controller_keyseq); } + hk.repeat = shortcut.shortcut.repeat; } } @@ -57,8 +59,7 @@ QShortcut* HotkeyRegistry::GetHotkey(const QString& group, const QString& action hk.shortcut = new QShortcut(hk.keyseq, widget, nullptr, nullptr, hk.context); } - hk.shortcut->setAutoRepeat(false); - + hk.shortcut->setAutoRepeat(hk.repeat); return hk.shortcut; } |
