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
@ -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 New Issue
Block a user