I have finished messages

This commit is contained in:
Denis 2024-01-02 21:35:54 +01:00
parent 42832e0b0d
commit f3ac4dc285
No known key found for this signature in database
GPG key ID: DD9B63F805CF5C03

View file

@ -1325,10 +1325,12 @@ 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] = 0/*in_device_status->touchpad_x & (int16_t)0x00FF*/; //x_lo
out_shifted_buf[35] = (((in_device_status->touchpad_x & (int16_t)0x0F00) >> (int16_t)4) /*| ((in_device_status->touchpad_y & (int16_t)0x000F) << (int16_t)4)*/); // x_hi:4 y_lo:4
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
printf("%d -> %d\n", (int)in_device_status->touchpad_x, (int)out_shifted_buf[35]);
if (in_device_status->touchpad_touch_num != -1) {
printf("%d -> %d\n", (int)in_device_status->touchpad_x, (int)out_shifted_buf[35]);
}
// point of contact number 1
out_shifted_buf[37] = 0x80; //contact