diff options
| author | 2021-10-22 12:34:44 -0500 | |
|---|---|---|
| committer | 2021-11-24 20:30:25 -0600 | |
| commit | 21819da8cd7da60be8f8ba82dc940c2496a5317e (patch) | |
| tree | c651a1d740ef15196811b602dd9589cabfae88e4 | |
| parent | kraken: Address comments from review (diff) | |
| download | yuzu-21819da8cd7da60be8f8ba82dc940c2496a5317e.tar.gz yuzu-21819da8cd7da60be8f8ba82dc940c2496a5317e.tar.xz yuzu-21819da8cd7da60be8f8ba82dc940c2496a5317e.zip | |
yuzu: Fix loading input profiles
Diffstat (limited to '')
| -rw-r--r-- | src/core/hid/motion_input.cpp | 2 | ||||
| -rw-r--r-- | src/yuzu/configuration/configure_input_player.cpp | 7 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/core/hid/motion_input.cpp b/src/core/hid/motion_input.cpp index 93f37b77b..c25fea966 100644 --- a/src/core/hid/motion_input.cpp +++ b/src/core/hid/motion_input.cpp | |||
| @@ -73,6 +73,8 @@ void MotionInput::UpdateRotation(u64 elapsed_time) { | |||
| 73 | rotations += gyro * sample_period; | 73 | rotations += gyro * sample_period; |
| 74 | } | 74 | } |
| 75 | 75 | ||
| 76 | // Based on Madgwick's implementation of Mayhony's AHRS algorithm. | ||
| 77 | // https://github.com/xioTechnologies/Open-Source-AHRS-With-x-IMU/blob/master/x-IMU%20IMU%20and%20AHRS%20Algorithms/x-IMU%20IMU%20and%20AHRS%20Algorithms/AHRS/MahonyAHRS.cs | ||
| 76 | void MotionInput::UpdateOrientation(u64 elapsed_time) { | 78 | void MotionInput::UpdateOrientation(u64 elapsed_time) { |
| 77 | if (!IsCalibrated(0.1f)) { | 79 | if (!IsCalibrated(0.1f)) { |
| 78 | ResetOrientation(); | 80 | ResetOrientation(); |
diff --git a/src/yuzu/configuration/configure_input_player.cpp b/src/yuzu/configuration/configure_input_player.cpp index 81310a5b3..cd33b5711 100644 --- a/src/yuzu/configuration/configure_input_player.cpp +++ b/src/yuzu/configuration/configure_input_player.cpp | |||
| @@ -598,8 +598,15 @@ void ConfigureInputPlayer::RetranslateUI() { | |||
| 598 | } | 598 | } |
| 599 | 599 | ||
| 600 | void ConfigureInputPlayer::LoadConfiguration() { | 600 | void ConfigureInputPlayer::LoadConfiguration() { |
| 601 | emulated_controller->ReloadFromSettings(); | ||
| 602 | |||
| 601 | UpdateUI(); | 603 | UpdateUI(); |
| 602 | UpdateInputDeviceCombobox(); | 604 | UpdateInputDeviceCombobox(); |
| 605 | |||
| 606 | if (debug) { | ||
| 607 | return; | ||
| 608 | } | ||
| 609 | |||
| 603 | const int comboBoxIndex = GetIndexFromControllerType(emulated_controller->GetNpadType(true)); | 610 | const int comboBoxIndex = GetIndexFromControllerType(emulated_controller->GetNpadType(true)); |
| 604 | ui->comboControllerType->setCurrentIndex(comboBoxIndex); | 611 | ui->comboControllerType->setCurrentIndex(comboBoxIndex); |
| 605 | ui->groupConnectedController->setChecked(emulated_controller->IsConnected(true)); | 612 | ui->groupConnectedController->setChecked(emulated_controller->IsConnected(true)); |