restore Y too
This commit is contained in:
parent
31fc20de9a
commit
6640812315
1 changed files with 2 additions and 6 deletions
|
|
@ -1325,8 +1325,8 @@ void virt_dualsense_compose(virt_dualsense_t *const gamepad, gamepad_status_t *c
|
|||
// point of contact number 0
|
||||
out_shifted_buf[33] = in_device_status->touchpad_touch_num == -1 ? 0x80 : 0x7F; //contact
|
||||
out_shifted_buf[34] = in_device_status->touchpad_x & (int16_t)0x00FF; //x_lo
|
||||
out_shifted_buf[35] = (((in_device_status->touchpad_x & (int16_t)0x0F00) >> (int16_t)8) /*| ((in_device_status->touchpad_y & (int16_t)0x000F) << (int16_t)4)*/); // x_hi:4 y_lo:4
|
||||
out_shifted_buf[36] = 0 /*((in_device_status->touchpad_y & (int16_t)0x0FF0) >> (int16_t)4)*/; //y_hi
|
||||
out_shifted_buf[35] = (((in_device_status->touchpad_x & (int16_t)0x0F00) >> (int16_t)8) | ((in_device_status->touchpad_y & (int16_t)0x000F) << (int16_t)4)); // x_hi:4 y_lo:4
|
||||
out_shifted_buf[36] = (in_device_status->touchpad_y & (int16_t)0x0FF0) >> (int16_t)4; //y_hi
|
||||
|
||||
// point of contact number 1
|
||||
out_shifted_buf[37] = 0x80; //contact
|
||||
|
|
@ -1339,10 +1339,6 @@ void virt_dualsense_compose(virt_dualsense_t *const gamepad, gamepad_status_t *c
|
|||
crc = ~crc32_le(crc, (const Bytef *)&out_shifted_buf[0], DS_INPUT_REPORT_BT_SIZE - 4);
|
||||
memcpy(&out_shifted_buf[DS_INPUT_REPORT_BT_SIZE - sizeof(crc)], &crc, sizeof(crc));
|
||||
}
|
||||
|
||||
if (in_device_status->touchpad_touch_num != -1) {
|
||||
printf("%4x -> %2x @\n", (int)in_device_status->touchpad_x, (int)out_shifted_buf[35]);
|
||||
}
|
||||
}
|
||||
|
||||
int virt_dualsense_send(virt_dualsense_t *const gamepad, uint8_t *const out_shifted_buf) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue