mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-07-04 23:31:19 +01:00
yuzu: Fix loading input profiles
This commit is contained in:
parent
b5e72de753
commit
21819da8cd
2 changed files with 9 additions and 0 deletions
|
@ -73,6 +73,8 @@ void MotionInput::UpdateRotation(u64 elapsed_time) {
|
||||||
rotations += gyro * sample_period;
|
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) {
|
void MotionInput::UpdateOrientation(u64 elapsed_time) {
|
||||||
if (!IsCalibrated(0.1f)) {
|
if (!IsCalibrated(0.1f)) {
|
||||||
ResetOrientation();
|
ResetOrientation();
|
||||||
|
|
|
@ -598,8 +598,15 @@ void ConfigureInputPlayer::RetranslateUI() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConfigureInputPlayer::LoadConfiguration() {
|
void ConfigureInputPlayer::LoadConfiguration() {
|
||||||
|
emulated_controller->ReloadFromSettings();
|
||||||
|
|
||||||
UpdateUI();
|
UpdateUI();
|
||||||
UpdateInputDeviceCombobox();
|
UpdateInputDeviceCombobox();
|
||||||
|
|
||||||
|
if (debug) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const int comboBoxIndex = GetIndexFromControllerType(emulated_controller->GetNpadType(true));
|
const int comboBoxIndex = GetIndexFromControllerType(emulated_controller->GetNpadType(true));
|
||||||
ui->comboControllerType->setCurrentIndex(comboBoxIndex);
|
ui->comboControllerType->setCurrentIndex(comboBoxIndex);
|
||||||
ui->groupConnectedController->setChecked(emulated_controller->IsConnected(true));
|
ui->groupConnectedController->setChecked(emulated_controller->IsConnected(true));
|
||||||
|
|
Loading…
Reference in a new issue