From efd993f382fbefa90e55bd31479f1cef93a3c525 Mon Sep 17 00:00:00 2001 From: TryTwo Date: Fri, 28 Mar 2025 14:22:40 -0700 Subject: [PATCH] AudioPanel bugfix: Forgot to wrap an optional slider in a conditional. --- Source/Core/DolphinQt/Settings/AudioPane.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/Source/Core/DolphinQt/Settings/AudioPane.cpp b/Source/Core/DolphinQt/Settings/AudioPane.cpp index 6ec374b4a2..c5856fddb9 100644 --- a/Source/Core/DolphinQt/Settings/AudioPane.cpp +++ b/Source/Core/DolphinQt/Settings/AudioPane.cpp @@ -161,8 +161,12 @@ void AudioPane::ConnectWidgets() m_volume_indicator->setText(tr("%1%").arg(value)); AudioCommon::UpdateSoundStream(Core::System::GetInstance()); }); - connect(m_latency_slider, &QSlider::valueChanged, this, - [this](int value) { m_latency_label->setText(tr("Latency: %1 ms").arg(value)); }); + + if (m_latency_control_supported) + { + connect(m_latency_slider, &QSlider::valueChanged, this, + [this](int value) { m_latency_label->setText(tr("Latency: %1 ms").arg(value)); }); + } } void AudioPane::OnDspChanged() @@ -242,9 +246,6 @@ void AudioPane::AddDescriptions() static const char TR_AUDIO_BACKEND_DESCRIPTION[] = QT_TR_NOOP("Selects which audio API to use internally.

If unsure, " "select %1."); - static const char TR_WASAPI_DEVICE_DESCRIPTION[] = - QT_TR_NOOP("Selects an output device to use.

If unsure, select " - "Default Device."); static const char TR_LATENCY_SLIDER_DESCRIPTION[] = QT_TR_NOOP( "Sets the audio latency in milliseconds. Higher values may reduce audio crackling. Certain " "backends only.

If unsure, leave this at 20 ms."); @@ -279,9 +280,13 @@ void AudioPane::AddDescriptions() m_dolby_quality_combo->SetDescription(tr(TR_DOLBY_OPTIONS_DESCRIPTION)); #ifdef _WIN32 + static const char TR_WASAPI_DEVICE_DESCRIPTION[] = + QT_TR_NOOP("Selects an output device to use.

If unsure, select " + "Default Device."); m_wasapi_device_combo->SetTitle(tr("Output Device")); m_wasapi_device_combo->SetDescription(tr(TR_WASAPI_DEVICE_DESCRIPTION)); #endif + m_volume_slider->SetTitle(tr("Volume")); m_volume_slider->SetDescription(tr(TR_VOLUME_DESCRIPTION));