diff options
author | Narr the Reg <juangerman-13@hotmail.com> | 2022-07-27 18:34:00 +0200 |
---|---|---|
committer | Narr the Reg <juangerman-13@hotmail.com> | 2022-07-27 18:34:46 +0200 |
commit | 2fdefd706409c9d1ce2a211bb142017c8eca6bc1 (patch) | |
tree | 64d6ef3762fc7ff135664b00ae233e406daba945 | |
parent | Merge pull request #8484 from german77/irs_release (diff) | |
download | yuzu-2fdefd706409c9d1ce2a211bb142017c8eca6bc1.tar yuzu-2fdefd706409c9d1ce2a211bb142017c8eca6bc1.tar.gz yuzu-2fdefd706409c9d1ce2a211bb142017c8eca6bc1.tar.bz2 yuzu-2fdefd706409c9d1ce2a211bb142017c8eca6bc1.tar.lz yuzu-2fdefd706409c9d1ce2a211bb142017c8eca6bc1.tar.xz yuzu-2fdefd706409c9d1ce2a211bb142017c8eca6bc1.tar.zst yuzu-2fdefd706409c9d1ce2a211bb142017c8eca6bc1.zip |
Diffstat (limited to '')
-rw-r--r-- | src/yuzu/main.cpp | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 08ccc1555..609d68ab4 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -1050,12 +1050,26 @@ void GMainWindow::InitializeHotkeys() { [] { 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); + int step = 5; + if (current_volume <= 30) { + step = 2; + } + 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)); }); 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); + int step = 5; + if (current_volume < 30) { + step = 2; + } + 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)); }); connect_shortcut(QStringLiteral("Toggle Framerate Limit"), [] { |