diff options
| author | 2019-05-19 11:23:21 -0400 | |
|---|---|---|
| committer | 2019-05-19 11:23:25 -0400 | |
| commit | d81d4a0f68852082403971d874cf64c96fe7550e (patch) | |
| tree | 79c079e95afe42245489d74249d373967b463e9f /src | |
| parent | yuzu/configuration/configure_general: Specify string conversions explicitly (diff) | |
| download | yuzu-d81d4a0f68852082403971d874cf64c96fe7550e.tar.gz yuzu-d81d4a0f68852082403971d874cf64c96fe7550e.tar.xz yuzu-d81d4a0f68852082403971d874cf64c96fe7550e.zip | |
yuzu/configuration/configure_input: Mark controller type names as translateable
These are user-facing strings, so they should be localizable.
Diffstat (limited to 'src')
| -rw-r--r-- | src/yuzu/configuration/configure_input.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/yuzu/configuration/configure_input.cpp b/src/yuzu/configuration/configure_input.cpp index f39d57998..87e459714 100644 --- a/src/yuzu/configuration/configure_input.cpp +++ b/src/yuzu/configuration/configure_input.cpp | |||
| @@ -75,8 +75,8 @@ ConfigureInput::ConfigureInput(QWidget* parent) | |||
| 75 | }; | 75 | }; |
| 76 | 76 | ||
| 77 | for (auto* controller_box : players_controller) { | 77 | for (auto* controller_box : players_controller) { |
| 78 | controller_box->addItems({"None", "Pro Controller", "Dual Joycons", "Single Right Joycon", | 78 | controller_box->addItems({tr("None"), tr("Pro Controller"), tr("Dual Joycons"), |
| 79 | "Single Left Joycon"}); | 79 | tr("Single Right Joycon"), tr("Single Left Joycon")}); |
| 80 | } | 80 | } |
| 81 | 81 | ||
| 82 | this->loadConfiguration(); | 82 | this->loadConfiguration(); |
| @@ -85,9 +85,10 @@ ConfigureInput::ConfigureInput(QWidget* parent) | |||
| 85 | connect(ui->restore_defaults_button, &QPushButton::pressed, this, | 85 | connect(ui->restore_defaults_button, &QPushButton::pressed, this, |
| 86 | &ConfigureInput::restoreDefaults); | 86 | &ConfigureInput::restoreDefaults); |
| 87 | 87 | ||
| 88 | for (auto* enabled : players_controller) | 88 | for (auto* enabled : players_controller) { |
| 89 | connect(enabled, QOverload<int>::of(&QComboBox::currentIndexChanged), this, | 89 | connect(enabled, QOverload<int>::of(&QComboBox::currentIndexChanged), this, |
| 90 | &ConfigureInput::updateUIEnabled); | 90 | &ConfigureInput::updateUIEnabled); |
| 91 | } | ||
| 91 | connect(ui->use_docked_mode, &QCheckBox::stateChanged, this, &ConfigureInput::updateUIEnabled); | 92 | connect(ui->use_docked_mode, &QCheckBox::stateChanged, this, &ConfigureInput::updateUIEnabled); |
| 92 | connect(ui->handheld_connected, &QCheckBox::stateChanged, this, | 93 | connect(ui->handheld_connected, &QCheckBox::stateChanged, this, |
| 93 | &ConfigureInput::updateUIEnabled); | 94 | &ConfigureInput::updateUIEnabled); |
| @@ -147,10 +148,12 @@ void ConfigureInput::updateUIEnabled() { | |||
| 147 | bool hit_disabled = false; | 148 | bool hit_disabled = false; |
| 148 | for (auto* player : players_controller) { | 149 | for (auto* player : players_controller) { |
| 149 | player->setDisabled(hit_disabled); | 150 | player->setDisabled(hit_disabled); |
| 150 | if (hit_disabled) | 151 | if (hit_disabled) { |
| 151 | player->setCurrentIndex(0); | 152 | player->setCurrentIndex(0); |
| 152 | if (!hit_disabled && player->currentIndex() == 0) | 153 | } |
| 154 | if (!hit_disabled && player->currentIndex() == 0) { | ||
| 153 | hit_disabled = true; | 155 | hit_disabled = true; |
| 156 | } | ||
| 154 | } | 157 | } |
| 155 | 158 | ||
| 156 | for (std::size_t i = 0; i < players_controller.size(); ++i) { | 159 | for (std::size_t i = 0; i < players_controller.size(); ++i) { |