mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-27 07:44:55 +00:00
Merge pull request #13489 from AdmiralCurtiss/translate-audio-backend
DolphinQt/AudioPane: Fix Audio backend dropdown not using translated names
This commit is contained in:
commit
4f210df86a
1 changed files with 18 additions and 2 deletions
|
@ -3,6 +3,10 @@
|
||||||
|
|
||||||
#include "DolphinQt/Settings/AudioPane.h"
|
#include "DolphinQt/Settings/AudioPane.h"
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <utility>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
#include <QFontMetrics>
|
#include <QFontMetrics>
|
||||||
#include <QFormLayout>
|
#include <QFormLayout>
|
||||||
#include <QGridLayout>
|
#include <QGridLayout>
|
||||||
|
@ -11,6 +15,7 @@
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include <QRadioButton>
|
#include <QRadioButton>
|
||||||
#include <QSpacerItem>
|
#include <QSpacerItem>
|
||||||
|
#include <QString>
|
||||||
#include <QVBoxLayout>
|
#include <QVBoxLayout>
|
||||||
|
|
||||||
#include "AudioCommon/AudioCommon.h"
|
#include "AudioCommon/AudioCommon.h"
|
||||||
|
@ -80,8 +85,19 @@ void AudioPane::CreateWidgets()
|
||||||
auto* backend_layout = new QFormLayout;
|
auto* backend_layout = new QFormLayout;
|
||||||
backend_box->setLayout(backend_layout);
|
backend_box->setLayout(backend_layout);
|
||||||
m_backend_label = new QLabel(tr("Audio Backend:"));
|
m_backend_label = new QLabel(tr("Audio Backend:"));
|
||||||
m_backend_combo =
|
|
||||||
new ConfigStringChoice(AudioCommon::GetSoundBackends(), Config::MAIN_AUDIO_BACKEND);
|
{
|
||||||
|
std::vector<std::string> backends = AudioCommon::GetSoundBackends();
|
||||||
|
std::vector<std::pair<QString, QString>> translated_backends;
|
||||||
|
translated_backends.reserve(backends.size());
|
||||||
|
for (const std::string& backend : backends)
|
||||||
|
{
|
||||||
|
translated_backends.push_back(
|
||||||
|
std::make_pair(tr(backend.c_str()), QString::fromStdString(backend)));
|
||||||
|
}
|
||||||
|
m_backend_combo = new ConfigStringChoice(translated_backends, Config::MAIN_AUDIO_BACKEND);
|
||||||
|
}
|
||||||
|
|
||||||
m_dolby_pro_logic = new ConfigBool(tr("Dolby Pro Logic II Decoder"), Config::MAIN_DPL2_DECODER);
|
m_dolby_pro_logic = new ConfigBool(tr("Dolby Pro Logic II Decoder"), Config::MAIN_DPL2_DECODER);
|
||||||
m_dolby_quality_label = new QLabel(tr("Decoding Quality:"));
|
m_dolby_quality_label = new QLabel(tr("Decoding Quality:"));
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue