mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-22 18:53:28 +01:00
input: Use same dualsense gyro values as linux kernel
This commit is contained in:
parent
78cb7963fb
commit
df6bec236f
@ -432,31 +432,12 @@ bool dualsense_pad_handler::get_calibration_data(DualSenseDevice* dualsense_devi
|
|||||||
dualsense_device->calib_data[CalibIndex::YAW].bias = read_s16(&buf[3]);
|
dualsense_device->calib_data[CalibIndex::YAW].bias = read_s16(&buf[3]);
|
||||||
dualsense_device->calib_data[CalibIndex::ROLL].bias = read_s16(&buf[5]);
|
dualsense_device->calib_data[CalibIndex::ROLL].bias = read_s16(&buf[5]);
|
||||||
|
|
||||||
s16 pitch_plus, pitch_minus, roll_plus, roll_minus, yaw_plus, yaw_minus;
|
const s16 pitch_plus = read_s16(&buf[7]);
|
||||||
|
const s16 pitch_minus = read_s16(&buf[9]);
|
||||||
// TODO: This was copied from DS4. Find out if it applies here.
|
const s16 yaw_plus = read_s16(&buf[11]);
|
||||||
// Check for calibration data format
|
const s16 yaw_minus = read_s16(&buf[13]);
|
||||||
// It's going to be either alternating +/- or +++---
|
const s16 roll_plus = read_s16(&buf[15]);
|
||||||
if (read_s16(&buf[9]) < 0 && read_s16(&buf[7]) > 0)
|
const s16 roll_minus = read_s16(&buf[17]);
|
||||||
{
|
|
||||||
// Wired mode for OEM controllers
|
|
||||||
pitch_plus = read_s16(&buf[7]);
|
|
||||||
pitch_minus = read_s16(&buf[9]);
|
|
||||||
yaw_plus = read_s16(&buf[11]);
|
|
||||||
yaw_minus = read_s16(&buf[13]);
|
|
||||||
roll_plus = read_s16(&buf[15]);
|
|
||||||
roll_minus = read_s16(&buf[17]);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// Bluetooth mode and wired mode for some 3rd party controllers
|
|
||||||
pitch_plus = read_s16(&buf[7]);
|
|
||||||
yaw_plus = read_s16(&buf[9]);
|
|
||||||
roll_plus = read_s16(&buf[11]);
|
|
||||||
pitch_minus = read_s16(&buf[13]);
|
|
||||||
yaw_minus = read_s16(&buf[15]);
|
|
||||||
roll_minus = read_s16(&buf[17]);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Confirm correctness. Need confirmation with dongle with no active controller
|
// Confirm correctness. Need confirmation with dongle with no active controller
|
||||||
if (pitch_plus <= 0 || yaw_plus <= 0 || roll_plus <= 0 ||
|
if (pitch_plus <= 0 || yaw_plus <= 0 || roll_plus <= 0 ||
|
||||||
|
Loading…
Reference in New Issue
Block a user