From 21819da8cd7da60be8f8ba82dc940c2496a5317e Mon Sep 17 00:00:00 2001 From: german77 Date: Fri, 22 Oct 2021 12:34:44 -0500 Subject: [PATCH] yuzu: Fix loading input profiles --- src/core/hid/motion_input.cpp | 2 ++ src/yuzu/configuration/configure_input_player.cpp | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/src/core/hid/motion_input.cpp b/src/core/hid/motion_input.cpp index 93f37b77bd..c25fea966b 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) { rotations += gyro * sample_period; } +// Based on Madgwick's implementation of Mayhony's AHRS algorithm. +// 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 void MotionInput::UpdateOrientation(u64 elapsed_time) { if (!IsCalibrated(0.1f)) { ResetOrientation(); diff --git a/src/yuzu/configuration/configure_input_player.cpp b/src/yuzu/configuration/configure_input_player.cpp index 81310a5b3b..cd33b57118 100644 --- a/src/yuzu/configuration/configure_input_player.cpp +++ b/src/yuzu/configuration/configure_input_player.cpp @@ -598,8 +598,15 @@ void ConfigureInputPlayer::RetranslateUI() { } void ConfigureInputPlayer::LoadConfiguration() { + emulated_controller->ReloadFromSettings(); + UpdateUI(); UpdateInputDeviceCombobox(); + + if (debug) { + return; + } + const int comboBoxIndex = GetIndexFromControllerType(emulated_controller->GetNpadType(true)); ui->comboControllerType->setCurrentIndex(comboBoxIndex); ui->groupConnectedController->setChecked(emulated_controller->IsConnected(true));