diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/audio_core/renderer/effect/effect_info_base.h | 8 | ||||
| -rw-r--r-- | src/common/threadsafe_queue.h | 2 | ||||
| -rw-r--r-- | src/yuzu/main.cpp | 18 |
3 files changed, 21 insertions, 7 deletions
diff --git a/src/audio_core/renderer/effect/effect_info_base.h b/src/audio_core/renderer/effect/effect_info_base.h index 43d0589cc..8c9583878 100644 --- a/src/audio_core/renderer/effect/effect_info_base.h +++ b/src/audio_core/renderer/effect/effect_info_base.h | |||
| @@ -419,13 +419,13 @@ protected: | |||
| 419 | /// Workbuffers assigned to this effect | 419 | /// Workbuffers assigned to this effect |
| 420 | std::array<AddressInfo, 2> workbuffers{AddressInfo(CpuAddr(0), 0), AddressInfo(CpuAddr(0), 0)}; | 420 | std::array<AddressInfo, 2> workbuffers{AddressInfo(CpuAddr(0), 0), AddressInfo(CpuAddr(0), 0)}; |
| 421 | /// Aux/Capture buffer info for reading | 421 | /// Aux/Capture buffer info for reading |
| 422 | CpuAddr send_buffer_info; | 422 | CpuAddr send_buffer_info{}; |
| 423 | /// Aux/Capture buffer for reading | 423 | /// Aux/Capture buffer for reading |
| 424 | CpuAddr send_buffer; | 424 | CpuAddr send_buffer{}; |
| 425 | /// Aux/Capture buffer info for writing | 425 | /// Aux/Capture buffer info for writing |
| 426 | CpuAddr return_buffer_info; | 426 | CpuAddr return_buffer_info{}; |
| 427 | /// Aux/Capture buffer for writing | 427 | /// Aux/Capture buffer for writing |
| 428 | CpuAddr return_buffer; | 428 | CpuAddr return_buffer{}; |
| 429 | /// Parameters of this effect | 429 | /// Parameters of this effect |
| 430 | std::array<u8, sizeof(InParameterVersion2)> parameter{}; | 430 | std::array<u8, sizeof(InParameterVersion2)> parameter{}; |
| 431 | /// State of this effect used by the AudioRenderer across calls | 431 | /// State of this effect used by the AudioRenderer across calls |
diff --git a/src/common/threadsafe_queue.h b/src/common/threadsafe_queue.h index f7ae9d8c2..053798e79 100644 --- a/src/common/threadsafe_queue.h +++ b/src/common/threadsafe_queue.h | |||
| @@ -39,7 +39,7 @@ public: | |||
| 39 | template <typename Arg> | 39 | template <typename Arg> |
| 40 | void Push(Arg&& t) { | 40 | void Push(Arg&& t) { |
| 41 | // create the element, add it to the queue | 41 | // create the element, add it to the queue |
| 42 | write_ptr->current = std::forward<Arg>(t); | 42 | write_ptr->current = std::move(t); |
| 43 | // set the next pointer to a new element ptr | 43 | // set the next pointer to a new element ptr |
| 44 | // then advance the write pointer | 44 | // then advance the write pointer |
| 45 | ElementPtr* new_ptr = new ElementPtr(); | 45 | ElementPtr* new_ptr = new ElementPtr(); |
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index e8a57f4b4..f8c234082 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp | |||
| @@ -1076,12 +1076,26 @@ void GMainWindow::InitializeHotkeys() { | |||
| 1076 | [] { Settings::values.audio_muted = !Settings::values.audio_muted; }); | 1076 | [] { Settings::values.audio_muted = !Settings::values.audio_muted; }); |
| 1077 | connect_shortcut(QStringLiteral("Audio Volume Down"), [] { | 1077 | connect_shortcut(QStringLiteral("Audio Volume Down"), [] { |
| 1078 | const auto current_volume = static_cast<int>(Settings::values.volume.GetValue()); | 1078 | const auto current_volume = static_cast<int>(Settings::values.volume.GetValue()); |
| 1079 | const auto new_volume = std::max(current_volume - 5, 0); | 1079 | int step = 5; |
| 1080 | if (current_volume <= 30) { | ||
| 1081 | step = 2; | ||
| 1082 | } | ||
| 1083 | if (current_volume <= 6) { | ||
| 1084 | step = 1; | ||
| 1085 | } | ||
| 1086 | const auto new_volume = std::max(current_volume - step, 0); | ||
| 1080 | Settings::values.volume.SetValue(static_cast<u8>(new_volume)); | 1087 | Settings::values.volume.SetValue(static_cast<u8>(new_volume)); |
| 1081 | }); | 1088 | }); |
| 1082 | connect_shortcut(QStringLiteral("Audio Volume Up"), [] { | 1089 | connect_shortcut(QStringLiteral("Audio Volume Up"), [] { |
| 1083 | const auto current_volume = static_cast<int>(Settings::values.volume.GetValue()); | 1090 | const auto current_volume = static_cast<int>(Settings::values.volume.GetValue()); |
| 1084 | const auto new_volume = std::min(current_volume + 5, 100); | 1091 | int step = 5; |
| 1092 | if (current_volume < 30) { | ||
| 1093 | step = 2; | ||
| 1094 | } | ||
| 1095 | if (current_volume < 6) { | ||
| 1096 | step = 1; | ||
| 1097 | } | ||
| 1098 | const auto new_volume = std::min(current_volume + step, 100); | ||
| 1085 | Settings::values.volume.SetValue(static_cast<u8>(new_volume)); | 1099 | Settings::values.volume.SetValue(static_cast<u8>(new_volume)); |
| 1086 | }); | 1100 | }); |
| 1087 | connect_shortcut(QStringLiteral("Toggle Framerate Limit"), [] { | 1101 | connect_shortcut(QStringLiteral("Toggle Framerate Limit"), [] { |