aboutsummaryrefslogtreecommitdiff
path: root/src/yuzu/main.cpp
diff options
context:
space:
mode:
authorgerman77 <juangerman-13@hotmail.com>2022-01-15 13:44:18 -0600
committergerman77 <juangerman-13@hotmail.com>2022-01-15 20:28:37 -0600
commitc8b3a1285653deb6156acd63f45179b13e07c549 (patch)
tree331a27bbd744608d01f99abd4d731685ff0cd170 /src/yuzu/main.cpp
parent419f427a014601e0b19a7f2e36a041052e92b46b (diff)
yuzu: Add volume up/down hotkeys
Diffstat (limited to 'src/yuzu/main.cpp')
-rw-r--r--src/yuzu/main.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp
index b3ad892813..d9e689d14b 100644
--- a/src/yuzu/main.cpp
+++ b/src/yuzu/main.cpp
@@ -1014,8 +1014,18 @@ void GMainWindow::InitializeHotkeys() {
Settings::values.use_docked_mode.GetValue(), *system);
dock_status_button->setChecked(Settings::values.use_docked_mode.GetValue());
});
- connect_shortcut(QStringLiteral("Mute Audio"),
+ connect_shortcut(QStringLiteral("Audio Mute/Unmute"),
[] { Settings::values.audio_muted = !Settings::values.audio_muted; });
+ connect_shortcut(QStringLiteral("Audio Volume Down"), [] {
+ const auto current_volume = static_cast<int>(Settings::values.volume.GetValue());
+ const auto new_volume = std::max(current_volume - 5, 0);
+ Settings::values.volume.SetValue(static_cast<u8>(new_volume));
+ });
+ connect_shortcut(QStringLiteral("Audio Volume Up"), [] {
+ const auto current_volume = static_cast<int>(Settings::values.volume.GetValue());
+ const auto new_volume = std::min(current_volume + 5, 100);
+ Settings::values.volume.SetValue(static_cast<u8>(new_volume));
+ });
connect_shortcut(QStringLiteral("Toggle Framerate Limit"), [] {
Settings::values.disable_fps_limit.SetValue(!Settings::values.disable_fps_limit.GetValue());
});