diff options
Diffstat (limited to 'src/yuzu/configuration')
| -rw-r--r-- | src/yuzu/configuration/config.cpp | 2 | ||||
| -rw-r--r-- | src/yuzu/configuration/configure_debug.cpp | 2 | ||||
| -rw-r--r-- | src/yuzu/configuration/configure_debug.ui | 7 | ||||
| -rw-r--r-- | src/yuzu/configuration/configure_input_player.cpp | 34 | 
4 files changed, 45 insertions, 0 deletions
| diff --git a/src/yuzu/configuration/config.cpp b/src/yuzu/configuration/config.cpp index 2c70d0548..463d500c2 100644 --- a/src/yuzu/configuration/config.cpp +++ b/src/yuzu/configuration/config.cpp @@ -508,6 +508,7 @@ void Config::ReadDebuggingValues() {      ReadBasicSetting(Settings::values.extended_logging);      ReadBasicSetting(Settings::values.use_debug_asserts);      ReadBasicSetting(Settings::values.use_auto_stub); +    ReadBasicSetting(Settings::values.enable_all_controllers);      qt_config->endGroup();  } @@ -1051,6 +1052,7 @@ void Config::SaveDebuggingValues() {      WriteBasicSetting(Settings::values.quest_flag);      WriteBasicSetting(Settings::values.use_debug_asserts);      WriteBasicSetting(Settings::values.disable_macro_jit); +    WriteBasicSetting(Settings::values.enable_all_controllers);      qt_config->endGroup();  } diff --git a/src/yuzu/configuration/configure_debug.cpp b/src/yuzu/configuration/configure_debug.cpp index 07bfa0360..633fc295b 100644 --- a/src/yuzu/configuration/configure_debug.cpp +++ b/src/yuzu/configuration/configure_debug.cpp @@ -42,6 +42,7 @@ void ConfigureDebug::SetConfiguration() {      ui->quest_flag->setChecked(Settings::values.quest_flag.GetValue());      ui->use_debug_asserts->setChecked(Settings::values.use_debug_asserts.GetValue());      ui->use_auto_stub->setChecked(Settings::values.use_auto_stub.GetValue()); +    ui->enable_all_controllers->setChecked(Settings::values.enable_all_controllers.GetValue());      ui->enable_graphics_debugging->setEnabled(runtime_lock);      ui->enable_graphics_debugging->setChecked(Settings::values.renderer_debug.GetValue());      ui->enable_shader_feedback->setEnabled(runtime_lock); @@ -67,6 +68,7 @@ void ConfigureDebug::ApplyConfiguration() {      Settings::values.quest_flag = ui->quest_flag->isChecked();      Settings::values.use_debug_asserts = ui->use_debug_asserts->isChecked();      Settings::values.use_auto_stub = ui->use_auto_stub->isChecked(); +    Settings::values.enable_all_controllers = ui->enable_all_controllers->isChecked();      Settings::values.renderer_debug = ui->enable_graphics_debugging->isChecked();      Settings::values.renderer_shader_feedback = ui->enable_shader_feedback->isChecked();      Settings::values.cpu_debug_mode = ui->enable_cpu_debugging->isChecked(); diff --git a/src/yuzu/configuration/configure_debug.ui b/src/yuzu/configuration/configure_debug.ui index b884a56b0..0f3b51c8d 100644 --- a/src/yuzu/configuration/configure_debug.ui +++ b/src/yuzu/configuration/configure_debug.ui @@ -198,6 +198,13 @@          </property>         </widget>        </item> +      <item row="1" column="1"> +       <widget class="QCheckBox" name="enable_all_controllers"> +        <property name="text"> +         <string>Enable all Controller Types</string> +        </property> +       </widget> +      </item>       </layout>      </widget>     </item> diff --git a/src/yuzu/configuration/configure_input_player.cpp b/src/yuzu/configuration/configure_input_player.cpp index ec071d6ec..16284d5a6 100644 --- a/src/yuzu/configuration/configure_input_player.cpp +++ b/src/yuzu/configuration/configure_input_player.cpp @@ -947,6 +947,40 @@ void ConfigureInputPlayer::SetConnectableControllers() {                                                       Core::HID::NpadStyleIndex::GameCube);              ui->comboControllerType->addItem(tr("GameCube Controller"));          } + +        // Disable all unsupported controllers +        if (!Settings::values.enable_all_controllers) { +            return; +        } +        if (enable_all || npad_style_set.palma == 1) { +            index_controller_type_pairs.emplace_back(ui->comboControllerType->count(), +                                                     Core::HID::NpadStyleIndex::Pokeball); +            ui->comboControllerType->addItem(tr("Poke Ball Plus")); +        } + +        if (enable_all || npad_style_set.lark == 1) { +            index_controller_type_pairs.emplace_back(ui->comboControllerType->count(), +                                                     Core::HID::NpadStyleIndex::NES); +            ui->comboControllerType->addItem(tr("NES Controller")); +        } + +        if (enable_all || npad_style_set.lucia == 1) { +            index_controller_type_pairs.emplace_back(ui->comboControllerType->count(), +                                                     Core::HID::NpadStyleIndex::SNES); +            ui->comboControllerType->addItem(tr("SNES Controller")); +        } + +        if (enable_all || npad_style_set.lagoon == 1) { +            index_controller_type_pairs.emplace_back(ui->comboControllerType->count(), +                                                     Core::HID::NpadStyleIndex::N64); +            ui->comboControllerType->addItem(tr("N64 Controller")); +        } + +        if (enable_all || npad_style_set.lager == 1) { +            index_controller_type_pairs.emplace_back(ui->comboControllerType->count(), +                                                     Core::HID::NpadStyleIndex::SegaGenesis); +            ui->comboControllerType->addItem(tr("Sega Genesis")); +        }      };      if (!is_powered_on) { | 
