mirror of
https://github.com/PabloMK7/citra.git
synced 2024-11-17 04:17:15 +01:00
configure_audio: Use QString::fromStdString() for converting audio device names
This ensures that the proper codec will always be used no matter what. It also avoids relying on ASCII conversions.
This commit is contained in:
parent
97e8354fb0
commit
2a612f7bd4
@ -79,10 +79,10 @@ void ConfigureAudio::updateAudioDevices(int sink_index) {
|
|||||||
ui->audio_device_combo_box->clear();
|
ui->audio_device_combo_box->clear();
|
||||||
ui->audio_device_combo_box->addItem(AudioCore::auto_device_name);
|
ui->audio_device_combo_box->addItem(AudioCore::auto_device_name);
|
||||||
|
|
||||||
std::string sink_id = ui->output_sink_combo_box->itemText(sink_index).toStdString();
|
const std::string sink_id = ui->output_sink_combo_box->itemText(sink_index).toStdString();
|
||||||
std::vector<std::string> device_list = AudioCore::GetSinkDetails(sink_id).list_devices();
|
const std::vector<std::string> device_list = AudioCore::GetSinkDetails(sink_id).list_devices();
|
||||||
for (const auto& device : device_list) {
|
for (const auto& device : device_list) {
|
||||||
ui->audio_device_combo_box->addItem(device.c_str());
|
ui->audio_device_combo_box->addItem(QString::fromStdString(device));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user