mirror of
https://github.com/yuzu-mirror/yuzu
synced 2024-12-24 14:23:04 +00:00
yuzu/configuration/configure_audio: Store power on query into a variable
Avoids using the system accessor more than necessary, and ensures that both dialog boxes see the same power on state.
This commit is contained in:
parent
d00ca5c6c8
commit
5f01ec338e
1 changed files with 3 additions and 2 deletions
|
@ -28,8 +28,9 @@ ConfigureAudio::ConfigureAudio(QWidget* parent)
|
||||||
connect(ui->output_sink_combo_box, qOverload<int>(&QComboBox::currentIndexChanged), this,
|
connect(ui->output_sink_combo_box, qOverload<int>(&QComboBox::currentIndexChanged), this,
|
||||||
&ConfigureAudio::updateAudioDevices);
|
&ConfigureAudio::updateAudioDevices);
|
||||||
|
|
||||||
ui->output_sink_combo_box->setEnabled(!Core::System::GetInstance().IsPoweredOn());
|
const bool is_powered_on = Core::System::GetInstance().IsPoweredOn();
|
||||||
ui->audio_device_combo_box->setEnabled(!Core::System::GetInstance().IsPoweredOn());
|
ui->output_sink_combo_box->setEnabled(!is_powered_on);
|
||||||
|
ui->audio_device_combo_box->setEnabled(!is_powered_on);
|
||||||
}
|
}
|
||||||
|
|
||||||
ConfigureAudio::~ConfigureAudio() = default;
|
ConfigureAudio::~ConfigureAudio() = default;
|
||||||
|
|
Loading…
Reference in a new issue