diff options
Diffstat (limited to 'src')
| -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() { | |||
| 1050 | [] { Settings::values.audio_muted = !Settings::values.audio_muted; }); | 1050 | [] { Settings::values.audio_muted = !Settings::values.audio_muted; }); |
| 1051 | connect_shortcut(QStringLiteral("Audio Volume Down"), [] { | 1051 | connect_shortcut(QStringLiteral("Audio Volume Down"), [] { |
| 1052 | const auto current_volume = static_cast<int>(Settings::values.volume.GetValue()); | 1052 | const auto current_volume = static_cast<int>(Settings::values.volume.GetValue()); |
| 1053 | const auto new_volume = std::max(current_volume - 5, 0); | 1053 | int step = 5; |
| 1054 | if (current_volume <= 30) { | ||
| 1055 | step = 2; | ||
| 1056 | } | ||
| 1057 | if (current_volume <= 6) { | ||
| 1058 | step = 1; | ||
| 1059 | } | ||
| 1060 | const auto new_volume = std::max(current_volume - step, 0); | ||
| 1054 | Settings::values.volume.SetValue(static_cast<u8>(new_volume)); | 1061 | Settings::values.volume.SetValue(static_cast<u8>(new_volume)); |
| 1055 | }); | 1062 | }); |
| 1056 | connect_shortcut(QStringLiteral("Audio Volume Up"), [] { | 1063 | connect_shortcut(QStringLiteral("Audio Volume Up"), [] { |
| 1057 | const auto current_volume = static_cast<int>(Settings::values.volume.GetValue()); | 1064 | const auto current_volume = static_cast<int>(Settings::values.volume.GetValue()); |
| 1058 | const auto new_volume = std::min(current_volume + 5, 100); | 1065 | int step = 5; |
| 1066 | if (current_volume < 30) { | ||
| 1067 | step = 2; | ||
| 1068 | } | ||
| 1069 | if (current_volume < 6) { | ||
| 1070 | step = 1; | ||
| 1071 | } | ||
| 1072 | const auto new_volume = std::min(current_volume + step, 100); | ||
| 1059 | Settings::values.volume.SetValue(static_cast<u8>(new_volume)); | 1073 | Settings::values.volume.SetValue(static_cast<u8>(new_volume)); |
| 1060 | }); | 1074 | }); |
| 1061 | connect_shortcut(QStringLiteral("Toggle Framerate Limit"), [] { | 1075 | connect_shortcut(QStringLiteral("Toggle Framerate Limit"), [] { |