diff options
| author | 2022-12-20 18:09:59 -0600 | |
|---|---|---|
| committer | 2023-01-19 18:05:21 -0600 | |
| commit | 5676c2e17fe895e450e185029991fc20bdf56ec5 (patch) | |
| tree | 2852ddbe053d4d20b86a955e2bccbe8f23852182 /src/input_common/helpers/joycon_driver.cpp | |
| parent | input_common: Add support for joycon generic functions (diff) | |
| download | yuzu-5676c2e17fe895e450e185029991fc20bdf56ec5.tar.gz yuzu-5676c2e17fe895e450e185029991fc20bdf56ec5.tar.xz yuzu-5676c2e17fe895e450e185029991fc20bdf56ec5.zip | |
input_common: Use calibration from joycon
Diffstat (limited to 'src/input_common/helpers/joycon_driver.cpp')
| -rw-r--r-- | src/input_common/helpers/joycon_driver.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/input_common/helpers/joycon_driver.cpp b/src/input_common/helpers/joycon_driver.cpp index 0de55578b..ac11be1c1 100644 --- a/src/input_common/helpers/joycon_driver.cpp +++ b/src/input_common/helpers/joycon_driver.cpp | |||
| @@ -64,6 +64,7 @@ DriverResult JoyconDriver::InitializeDevice() { | |||
| 64 | accelerometer_performance = Joycon::AccelerometerPerformance::HZ100; | 64 | accelerometer_performance = Joycon::AccelerometerPerformance::HZ100; |
| 65 | 65 | ||
| 66 | // Initialize HW Protocols | 66 | // Initialize HW Protocols |
| 67 | calibration_protocol = std::make_unique<CalibrationProtocol>(hidapi_handle); | ||
| 67 | generic_protocol = std::make_unique<GenericProtocol>(hidapi_handle); | 68 | generic_protocol = std::make_unique<GenericProtocol>(hidapi_handle); |
| 68 | 69 | ||
| 69 | // Get fixed joycon info | 70 | // Get fixed joycon info |
| @@ -79,6 +80,9 @@ DriverResult JoyconDriver::InitializeDevice() { | |||
| 79 | supported_features = GetSupportedFeatures(); | 80 | supported_features = GetSupportedFeatures(); |
| 80 | 81 | ||
| 81 | // Get Calibration data | 82 | // Get Calibration data |
| 83 | calibration_protocol->GetLeftJoyStickCalibration(left_stick_calibration); | ||
| 84 | calibration_protocol->GetRightJoyStickCalibration(right_stick_calibration); | ||
| 85 | calibration_protocol->GetImuCalibration(motion_calibration); | ||
| 82 | 86 | ||
| 83 | // Set led status | 87 | // Set led status |
| 84 | generic_protocol->SetLedBlinkPattern(static_cast<u8>(1 + port)); | 88 | generic_protocol->SetLedBlinkPattern(static_cast<u8>(1 + port)); |