Skip to content
Snippets Groups Projects
Commit 5f01ec33 authored by Lioncash's avatar Lioncash
Browse files

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.
parent d00ca5c6
No related branches found
No related tags found
No related merge requests found
......@@ -28,8 +28,9 @@ ConfigureAudio::ConfigureAudio(QWidget* parent)
connect(ui->output_sink_combo_box, qOverload<int>(&QComboBox::currentIndexChanged), this,
&ConfigureAudio::updateAudioDevices);
ui->output_sink_combo_box->setEnabled(!Core::System::GetInstance().IsPoweredOn());
ui->audio_device_combo_box->setEnabled(!Core::System::GetInstance().IsPoweredOn());
const bool is_powered_on = 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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment