From 2a612f7bd483a4a169dc5cabee10b3aa10e0af66 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 2 Oct 2018 19:50:48 -0400 Subject: [PATCH] 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. --- src/citra_qt/configuration/configure_audio.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/citra_qt/configuration/configure_audio.cpp b/src/citra_qt/configuration/configure_audio.cpp index 98191fbe4..8a20fd5ca 100644 --- a/src/citra_qt/configuration/configure_audio.cpp +++ b/src/citra_qt/configuration/configure_audio.cpp @@ -79,10 +79,10 @@ void ConfigureAudio::updateAudioDevices(int sink_index) { ui->audio_device_combo_box->clear(); ui->audio_device_combo_box->addItem(AudioCore::auto_device_name); - std::string sink_id = ui->output_sink_combo_box->itemText(sink_index).toStdString(); - std::vector device_list = AudioCore::GetSinkDetails(sink_id).list_devices(); + const std::string sink_id = ui->output_sink_combo_box->itemText(sink_index).toStdString(); + const std::vector device_list = AudioCore::GetSinkDetails(sink_id).list_devices(); for (const auto& device : device_list) { - ui->audio_device_combo_box->addItem(device.c_str()); + ui->audio_device_combo_box->addItem(QString::fromStdString(device)); } }