yuzu-emu
/
yuzu-mainline
Archived
1
0
Fork 0

yuzu: Make mute audio persistent

This commit is contained in:
Narr the Reg 2023-11-09 20:30:00 -06:00
parent 9169cbf728
commit 9e331f9957
2 changed files with 7 additions and 7 deletions

View File

@ -153,7 +153,7 @@ struct Values {
true, true,
true}; true};
Setting<bool, false> audio_muted{ Setting<bool, false> audio_muted{
linkage, false, "audio_muted", Category::Audio, Specialization::Default, false, true}; linkage, false, "audio_muted", Category::Audio, Specialization::Default, true, true};
Setting<bool, false> dump_audio_commands{ Setting<bool, false> dump_audio_commands{
linkage, false, "dump_audio_commands", Category::Audio, Specialization::Default, false}; linkage, false, "dump_audio_commands", Category::Audio, Specialization::Default, false};

View File

@ -1064,12 +1064,6 @@ void GMainWindow::InitializeWidgets() {
volume_slider->setObjectName(QStringLiteral("volume_slider")); volume_slider->setObjectName(QStringLiteral("volume_slider"));
volume_slider->setMaximum(200); volume_slider->setMaximum(200);
volume_slider->setPageStep(5); volume_slider->setPageStep(5);
connect(volume_slider, &QSlider::valueChanged, this, [this](int percentage) {
Settings::values.audio_muted = false;
const auto volume = static_cast<u8>(percentage);
Settings::values.volume.SetValue(volume);
UpdateVolumeUI();
});
volume_popup->layout()->addWidget(volume_slider); volume_popup->layout()->addWidget(volume_slider);
volume_button = new VolumeButton(); volume_button = new VolumeButton();
@ -1077,6 +1071,12 @@ void GMainWindow::InitializeWidgets() {
volume_button->setFocusPolicy(Qt::NoFocus); volume_button->setFocusPolicy(Qt::NoFocus);
volume_button->setCheckable(true); volume_button->setCheckable(true);
UpdateVolumeUI(); UpdateVolumeUI();
connect(volume_slider, &QSlider::valueChanged, this, [this](int percentage) {
Settings::values.audio_muted = false;
const auto volume = static_cast<u8>(percentage);
Settings::values.volume.SetValue(volume);
UpdateVolumeUI();
});
connect(volume_button, &QPushButton::clicked, this, [&] { connect(volume_button, &QPushButton::clicked, this, [&] {
UpdateVolumeUI(); UpdateVolumeUI();
volume_popup->setVisible(!volume_popup->isVisible()); volume_popup->setVisible(!volume_popup->isVisible());