diff options
| author | 2021-01-20 17:05:44 -0800 | |
|---|---|---|
| committer | 2021-01-20 17:05:44 -0800 | |
| commit | d98b0f8f48e1412b140ec70181893c718704eb10 (patch) | |
| tree | ca12e0ef95b67153d6b00ff21988af0540c0a7f2 | |
| parent | Merge pull request #5755 from FearlessTobi/port-5344 (diff) | |
| parent | Always update configuration for handheld (diff) | |
| download | yuzu-d98b0f8f48e1412b140ec70181893c718704eb10.tar.gz yuzu-d98b0f8f48e1412b140ec70181893c718704eb10.tar.xz yuzu-d98b0f8f48e1412b140ec70181893c718704eb10.zip | |
Merge pull request #5743 from german77/HandheldFix
Fix player 1 turning on handheld and not updating handheld settings
Diffstat (limited to '')
| -rw-r--r-- | src/yuzu/configuration/config.cpp | 3 | ||||
| -rw-r--r-- | src/yuzu/configuration/configure_input_player.cpp | 10 |
2 files changed, 12 insertions, 1 deletions
diff --git a/src/yuzu/configuration/config.cpp b/src/yuzu/configuration/config.cpp index cda448718..9f73d37d4 100644 --- a/src/yuzu/configuration/config.cpp +++ b/src/yuzu/configuration/config.cpp | |||
| @@ -1005,7 +1005,8 @@ void Config::SavePlayerValue(std::size_t player_index) { | |||
| 1005 | static_cast<u8>(Settings::ControllerType::ProController)); | 1005 | static_cast<u8>(Settings::ControllerType::ProController)); |
| 1006 | 1006 | ||
| 1007 | if (!player_prefix.isEmpty()) { | 1007 | if (!player_prefix.isEmpty()) { |
| 1008 | WriteSetting(QStringLiteral("%1connected").arg(player_prefix), player.connected, false); | 1008 | WriteSetting(QStringLiteral("%1connected").arg(player_prefix), player.connected, |
| 1009 | player_index == 0); | ||
| 1009 | WriteSetting(QStringLiteral("%1vibration_enabled").arg(player_prefix), | 1010 | WriteSetting(QStringLiteral("%1vibration_enabled").arg(player_prefix), |
| 1010 | player.vibration_enabled, true); | 1011 | player.vibration_enabled, true); |
| 1011 | WriteSetting(QStringLiteral("%1vibration_strength").arg(player_prefix), | 1012 | WriteSetting(QStringLiteral("%1vibration_strength").arg(player_prefix), |
diff --git a/src/yuzu/configuration/configure_input_player.cpp b/src/yuzu/configuration/configure_input_player.cpp index 46ea026e4..13f0351d4 100644 --- a/src/yuzu/configuration/configure_input_player.cpp +++ b/src/yuzu/configuration/configure_input_player.cpp | |||
| @@ -575,6 +575,16 @@ void ConfigureInputPlayer::ApplyConfiguration() { | |||
| 575 | 575 | ||
| 576 | std::transform(motions_param.begin(), motions_param.end(), motions.begin(), | 576 | std::transform(motions_param.begin(), motions_param.end(), motions.begin(), |
| 577 | [](const Common::ParamPackage& param) { return param.Serialize(); }); | 577 | [](const Common::ParamPackage& param) { return param.Serialize(); }); |
| 578 | |||
| 579 | // Apply configuration for handheld | ||
| 580 | if (player_index == 0) { | ||
| 581 | auto& handheld = Settings::values.players.GetValue()[HANDHELD_INDEX]; | ||
| 582 | if (player.controller_type == Settings::ControllerType::Handheld) { | ||
| 583 | handheld = player; | ||
| 584 | } | ||
| 585 | handheld.connected = ui->groupConnectedController->isChecked() && | ||
| 586 | player.controller_type == Settings::ControllerType::Handheld; | ||
| 587 | } | ||
| 578 | } | 588 | } |
| 579 | 589 | ||
| 580 | void ConfigureInputPlayer::TryConnectSelectedController() { | 590 | void ConfigureInputPlayer::TryConnectSelectedController() { |