diff options
Diffstat (limited to 'src/yuzu')
-rw-r--r-- | src/yuzu/applets/qt_controller.cpp | 9 | ||||
-rw-r--r-- | src/yuzu/configuration/config.cpp | 11 | ||||
-rw-r--r-- | src/yuzu/configuration/configure_graphics_advanced.cpp | 2 | ||||
-rw-r--r-- | src/yuzu/configuration/configure_input_per_game.cpp | 5 | ||||
-rw-r--r-- | src/yuzu/configuration/configure_input_player.cpp | 8 |
5 files changed, 6 insertions, 29 deletions
diff --git a/src/yuzu/applets/qt_controller.cpp b/src/yuzu/applets/qt_controller.cpp index c30b54499..d22db9f6b 100644 --- a/src/yuzu/applets/qt_controller.cpp +++ b/src/yuzu/applets/qt_controller.cpp @@ -542,19 +542,14 @@ void QtControllerSelectorDialog::UpdateControllerState(std::size_t player_index) const auto player_connected = player_groupboxes[player_index]->isChecked() && controller_type != Core::HID::NpadStyleIndex::Handheld; - if (controller->GetNpadStyleIndex(true) == controller_type && - controller->IsConnected(true) == player_connected) { - return; - } - // Disconnect the controller first. UpdateController(controller, controller_type, false); // Handheld if (player_index == 0) { + auto* handheld = system.HIDCore().GetEmulatedController(Core::HID::NpadIdType::Handheld); + UpdateController(handheld, controller_type, false); if (controller_type == Core::HID::NpadStyleIndex::Handheld) { - auto* handheld = - system.HIDCore().GetEmulatedController(Core::HID::NpadIdType::Handheld); UpdateController(handheld, Core::HID::NpadStyleIndex::Handheld, player_groupboxes[player_index]->isChecked()); } diff --git a/src/yuzu/configuration/config.cpp b/src/yuzu/configuration/config.cpp index dd1c1e94a..4dad83b75 100644 --- a/src/yuzu/configuration/config.cpp +++ b/src/yuzu/configuration/config.cpp @@ -212,16 +212,11 @@ void Config::ReadPlayerValue(std::size_t player_index) { } if (player_prefix.isEmpty() && Settings::IsConfiguringGlobal()) { - const auto controller = static_cast<Settings::ControllerType>( + player.controller_type = static_cast<Settings::ControllerType>( qt_config ->value(QStringLiteral("%1type").arg(player_prefix), static_cast<u8>(Settings::ControllerType::ProController)) .toUInt()); - - if (controller == Settings::ControllerType::LeftJoycon || - controller == Settings::ControllerType::RightJoycon) { - player.controller_type = controller; - } } else { player.connected = ReadSetting(QStringLiteral("%1connected").arg(player_prefix), player_index == 0) @@ -1313,9 +1308,7 @@ void Config::SaveRendererValues() { static_cast<u32>(Settings::values.renderer_backend.GetValue(global)), static_cast<u32>(Settings::values.renderer_backend.GetDefault()), Settings::values.renderer_backend.UsingGlobal()); - WriteSetting(QString::fromStdString(Settings::values.renderer_force_max_clock.GetLabel()), - static_cast<u32>(Settings::values.renderer_force_max_clock.GetValue(global)), - static_cast<u32>(Settings::values.renderer_force_max_clock.GetDefault())); + WriteGlobalSetting(Settings::values.renderer_force_max_clock); WriteGlobalSetting(Settings::values.vulkan_device); WriteSetting(QString::fromStdString(Settings::values.fullscreen_mode.GetLabel()), static_cast<u32>(Settings::values.fullscreen_mode.GetValue(global)), diff --git a/src/yuzu/configuration/configure_graphics_advanced.cpp b/src/yuzu/configuration/configure_graphics_advanced.cpp index bbc363322..59fb1b334 100644 --- a/src/yuzu/configuration/configure_graphics_advanced.cpp +++ b/src/yuzu/configuration/configure_graphics_advanced.cpp @@ -47,8 +47,6 @@ void ConfigureGraphicsAdvanced::SetConfiguration() { &Settings::values.max_anisotropy); ConfigurationShared::SetHighlight(ui->label_gpu_accuracy, !Settings::values.gpu_accuracy.UsingGlobal()); - ConfigurationShared::SetHighlight(ui->renderer_force_max_clock, - !Settings::values.renderer_force_max_clock.UsingGlobal()); ConfigurationShared::SetHighlight(ui->af_label, !Settings::values.max_anisotropy.UsingGlobal()); } diff --git a/src/yuzu/configuration/configure_input_per_game.cpp b/src/yuzu/configuration/configure_input_per_game.cpp index 78e65d468..4e77fe00b 100644 --- a/src/yuzu/configuration/configure_input_per_game.cpp +++ b/src/yuzu/configuration/configure_input_per_game.cpp @@ -57,7 +57,7 @@ void ConfigureInputPerGame::ApplyConfiguration() { } void ConfigureInputPerGame::LoadConfiguration() { - static constexpr size_t HANDHELD_INDEX = 8; + static constexpr size_t HANDHELD_INDEX = 0; auto& hid_core = system.HIDCore(); for (size_t player_index = 0; player_index < profile_comboboxes.size(); ++player_index) { @@ -69,9 +69,6 @@ void ConfigureInputPerGame::LoadConfiguration() { const auto selection_index = player_combobox->currentIndex(); if (selection_index == 0) { Settings::values.players.GetValue()[player_index].profile_name = ""; - if (player_index == 0) { - Settings::values.players.GetValue()[HANDHELD_INDEX] = {}; - } Settings::values.players.SetGlobal(true); emulated_controller->ReloadFromSettings(); continue; diff --git a/src/yuzu/configuration/configure_input_player.cpp b/src/yuzu/configuration/configure_input_player.cpp index 50b62293e..93eb10ceb 100644 --- a/src/yuzu/configuration/configure_input_player.cpp +++ b/src/yuzu/configuration/configure_input_player.cpp @@ -1589,7 +1589,6 @@ void ConfigureInputPlayer::LoadProfile() { } void ConfigureInputPlayer::SaveProfile() { - static constexpr size_t HANDHELD_INDEX = 8; const QString profile_name = ui->comboProfiles->itemText(ui->comboProfiles->currentIndex()); if (profile_name.isEmpty()) { @@ -1598,12 +1597,7 @@ void ConfigureInputPlayer::SaveProfile() { ApplyConfiguration(); - // When we're in handheld mode, only the handheld emulated controller bindings are updated - const bool is_handheld = player_index == 0 && emulated_controller->GetNpadIdType() == - Core::HID::NpadIdType::Handheld; - const auto profile_player_index = is_handheld ? HANDHELD_INDEX : player_index; - - if (!profiles->SaveProfile(profile_name.toStdString(), profile_player_index)) { + if (!profiles->SaveProfile(profile_name.toStdString(), player_index)) { QMessageBox::critical(this, tr("Save Input Profile"), tr("Failed to save the input profile \"%1\"").arg(profile_name)); UpdateInputProfiles(); |