mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-12-25 01:11:48 +01:00
Desktop: HLE audio settings are greyed out when non-HLE audio emulation is selected
This commit is contained in:
parent
81f1848044
commit
fd81779233
@ -49,6 +49,8 @@ ConfigureAudio::ConfigureAudio(bool is_powered_on, QWidget* parent)
|
||||
&ConfigureAudio::UpdateAudioOutputDevices);
|
||||
connect(ui->input_type_combo_box, qOverload<int>(&QComboBox::currentIndexChanged), this,
|
||||
&ConfigureAudio::UpdateAudioInputDevices);
|
||||
connect(ui->emulation_combo_box, qOverload<int>(&QComboBox::currentIndexChanged), this,
|
||||
&ConfigureAudio::SetHleFeaturesEnabled);
|
||||
}
|
||||
|
||||
ConfigureAudio::~ConfigureAudio() {}
|
||||
@ -65,6 +67,7 @@ void ConfigureAudio::SetConfiguration() {
|
||||
|
||||
ui->toggle_audio_stretching->setChecked(Settings::values.enable_audio_stretching.GetValue());
|
||||
ui->toggle_realtime_audio->setChecked(Settings::values.enable_realtime_audio.GetValue());
|
||||
SetHleFeaturesEnabled();
|
||||
|
||||
const s32 volume =
|
||||
static_cast<s32>(Settings::values.volume.GetValue() * ui->volume_slider->maximum());
|
||||
@ -153,6 +156,14 @@ void ConfigureAudio::SetVolumeIndicatorText(int percentage) {
|
||||
ui->volume_indicator->setText(tr("%1%", "Volume percentage (e.g. 50%)").arg(percentage));
|
||||
}
|
||||
|
||||
void ConfigureAudio::SetHleFeaturesEnabled() {
|
||||
const bool is_hle =
|
||||
ui->emulation_combo_box->currentIndex() == static_cast<int>(Settings::AudioEmulation::HLE);
|
||||
|
||||
ui->toggle_audio_stretching->setEnabled(is_hle);
|
||||
ui->toggle_realtime_audio->setEnabled(is_hle);
|
||||
}
|
||||
|
||||
void ConfigureAudio::ApplyConfiguration() {
|
||||
ConfigurationShared::ApplyPerGameSetting(&Settings::values.enable_audio_stretching,
|
||||
ui->toggle_audio_stretching, audio_stretching);
|
||||
|
@ -35,6 +35,7 @@ private:
|
||||
void SetInputTypeFromInputType();
|
||||
void SetInputDeviceFromDeviceID();
|
||||
void SetVolumeIndicatorText(int percentage);
|
||||
void SetHleFeaturesEnabled();
|
||||
|
||||
void SetupPerGameUI();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user