Disregard the haptics select flag for vibration
This commit is contained in:
parent
4ab34c4547
commit
658551fac1
1 changed files with 4 additions and 10 deletions
14
virt_ds5.c
14
virt_ds5.c
|
|
@ -1266,16 +1266,10 @@ int virt_dualsense_event(virt_dualsense_t *const gamepad, gamepad_status_t *cons
|
||||||
uint8_t lightbar_green = common_report[45];
|
uint8_t lightbar_green = common_report[45];
|
||||||
uint8_t lightbar_blue = common_report[46];
|
uint8_t lightbar_blue = common_report[46];
|
||||||
|
|
||||||
if ((valid_flag0 & DS_OUTPUT_VALID_FLAG0_HAPTICS_SELECT) || ((motor_left == 0) && (motor_right == 0))) {
|
if ((valid_flag2 & DS_OUTPUT_VALID_FLAG2_COMPATIBLE_VIBRATION2) || (valid_flag0 & DS_OUTPUT_VALID_FLAG0_COMPATIBLE_VIBRATION)) {
|
||||||
uint8_t motors_shift = 0;
|
uint8_t motors_shift = valid_flag2 & DS_OUTPUT_VALID_FLAG2_COMPATIBLE_VIBRATION2 ? 0 : 1;
|
||||||
if ((valid_flag2 & DS_OUTPUT_VALID_FLAG2_COMPATIBLE_VIBRATION2) || (valid_flag0 & DS_OUTPUT_VALID_FLAG0_COMPATIBLE_VIBRATION)) {
|
out_device_status->motors_intensity[0] = (motor_left << motors_shift) | ((motors_shift > 0) ? ((motor_left == 0) ? 0 : 1) : 0);
|
||||||
out_device_status->motors_intensity[0] = (motor_left << 1) | ((motor_left == 0) ? 0 : 1);
|
out_device_status->motors_intensity[1] = (motor_right << motors_shift) | ((motors_shift > 0) ? ((motor_right == 0) ? 0 : 1) : 0);
|
||||||
out_device_status->motors_intensity[1] = (motor_right << 1) | ((motor_right == 0) ? 0 : 1);
|
|
||||||
} else {
|
|
||||||
out_device_status->motors_intensity[0] = motor_left;
|
|
||||||
out_device_status->motors_intensity[1] = motor_right;
|
|
||||||
}
|
|
||||||
|
|
||||||
++out_device_status->rumble_events_count;
|
++out_device_status->rumble_events_count;
|
||||||
|
|
||||||
if (gamepad->debug) {
|
if (gamepad->debug) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue