diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/common/settings.h | 2 | ||||
| -rw-r--r-- | src/yuzu/main.cpp | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/common/settings.h b/src/common/settings.h index 9317075f7..e899f1ae6 100644 --- a/src/common/settings.h +++ b/src/common/settings.h | |||
| @@ -153,7 +153,7 @@ struct Values { | |||
| 153 | true, | 153 | true, |
| 154 | true}; | 154 | true}; |
| 155 | Setting<bool, false> audio_muted{ | 155 | Setting<bool, false> audio_muted{ |
| 156 | linkage, false, "audio_muted", Category::Audio, Specialization::Default, false, true}; | 156 | linkage, false, "audio_muted", Category::Audio, Specialization::Default, true, true}; |
| 157 | Setting<bool, false> dump_audio_commands{ | 157 | Setting<bool, false> dump_audio_commands{ |
| 158 | linkage, false, "dump_audio_commands", Category::Audio, Specialization::Default, false}; | 158 | linkage, false, "dump_audio_commands", Category::Audio, Specialization::Default, false}; |
| 159 | 159 | ||
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 91aba118a..1bf173efb 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp | |||
| @@ -1064,12 +1064,6 @@ void GMainWindow::InitializeWidgets() { | |||
| 1064 | volume_slider->setObjectName(QStringLiteral("volume_slider")); | 1064 | volume_slider->setObjectName(QStringLiteral("volume_slider")); |
| 1065 | volume_slider->setMaximum(200); | 1065 | volume_slider->setMaximum(200); |
| 1066 | volume_slider->setPageStep(5); | 1066 | volume_slider->setPageStep(5); |
| 1067 | connect(volume_slider, &QSlider::valueChanged, this, [this](int percentage) { | ||
| 1068 | Settings::values.audio_muted = false; | ||
| 1069 | const auto volume = static_cast<u8>(percentage); | ||
| 1070 | Settings::values.volume.SetValue(volume); | ||
| 1071 | UpdateVolumeUI(); | ||
| 1072 | }); | ||
| 1073 | volume_popup->layout()->addWidget(volume_slider); | 1067 | volume_popup->layout()->addWidget(volume_slider); |
| 1074 | 1068 | ||
| 1075 | volume_button = new VolumeButton(); | 1069 | volume_button = new VolumeButton(); |
| @@ -1077,6 +1071,12 @@ void GMainWindow::InitializeWidgets() { | |||
| 1077 | volume_button->setFocusPolicy(Qt::NoFocus); | 1071 | volume_button->setFocusPolicy(Qt::NoFocus); |
| 1078 | volume_button->setCheckable(true); | 1072 | volume_button->setCheckable(true); |
| 1079 | UpdateVolumeUI(); | 1073 | UpdateVolumeUI(); |
| 1074 | connect(volume_slider, &QSlider::valueChanged, this, [this](int percentage) { | ||
| 1075 | Settings::values.audio_muted = false; | ||
| 1076 | const auto volume = static_cast<u8>(percentage); | ||
| 1077 | Settings::values.volume.SetValue(volume); | ||
| 1078 | UpdateVolumeUI(); | ||
| 1079 | }); | ||
| 1080 | connect(volume_button, &QPushButton::clicked, this, [&] { | 1080 | connect(volume_button, &QPushButton::clicked, this, [&] { |
| 1081 | UpdateVolumeUI(); | 1081 | UpdateVolumeUI(); |
| 1082 | volume_popup->setVisible(!volume_popup->isVisible()); | 1082 | volume_popup->setVisible(!volume_popup->isVisible()); |