diff options
author | bunnei <bunneidev@gmail.com> | 2022-08-12 15:40:15 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-12 15:40:15 -0700 |
commit | 411e58de28e94dad9460bbb07dfd6a348983202b (patch) | |
tree | 2936076d7a6b197ae318a83292fe51d9eb5c12fa /src/yuzu/main.cpp | |
parent | cba3b05c94776bebae07b3af0b8d7dcf0516cfff (diff) | |
parent | 85c9e31791a38d895d8d940b900e4bd94e866901 (diff) |
Merge pull request #8756 from Kelebek1/vol
Allow audio volume up to 200%
Diffstat (limited to 'src/yuzu/main.cpp')
-rw-r--r-- | src/yuzu/main.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 44d7feddc..8bd1f92f7 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -1094,7 +1094,7 @@ void GMainWindow::InitializeHotkeys() { 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 current_volume = static_cast<s32>(Settings::values.volume.GetValue()); int step = 5; if (current_volume <= 30) { step = 2; @@ -1102,11 +1102,10 @@ void GMainWindow::InitializeHotkeys() { if (current_volume <= 6) { step = 1; } - const auto new_volume = std::max(current_volume - step, 0); - Settings::values.volume.SetValue(static_cast<u8>(new_volume)); + Settings::values.volume.SetValue(std::max(current_volume - step, 0)); }); connect_shortcut(QStringLiteral("Audio Volume Up"), [] { - const auto current_volume = static_cast<int>(Settings::values.volume.GetValue()); + const auto current_volume = static_cast<s32>(Settings::values.volume.GetValue()); int step = 5; if (current_volume < 30) { step = 2; @@ -1114,8 +1113,7 @@ void GMainWindow::InitializeHotkeys() { if (current_volume < 6) { step = 1; } - const auto new_volume = std::min(current_volume + step, 100); - Settings::values.volume.SetValue(static_cast<u8>(new_volume)); + Settings::values.volume.SetValue(current_volume + step); }); connect_shortcut(QStringLiteral("Toggle Framerate Limit"), [] { Settings::values.use_speed_limit.SetValue(!Settings::values.use_speed_limit.GetValue()); |