From 2c3d7de0e4f7bd8f45aa501f07c916c189a09443 Mon Sep 17 00:00:00 2001 From: Denis Date: Wed, 3 Jan 2024 02:56:07 +0100 Subject: [PATCH] kernel does it this way... --- virt_ds4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/virt_ds4.c b/virt_ds4.c index 6ccb11a..3dda39d 100644 --- a/virt_ds4.c +++ b/virt_ds4.c @@ -806,7 +806,7 @@ void virt_dualshock_compose(virt_dualshock_t *const gamepad, gamepad_status_t *c out_buf[0] = gamepad->bluetooth ? DS4_INPUT_REPORT_BT : DS4_INPUT_REPORT_USB; // [00] report ID (0x01) - uint8_t *const out_shifted_buf = gamepad->bluetooth ? &out_buf[1] : &out_buf[0]; + uint8_t *const out_shifted_buf = gamepad->bluetooth ? &out_buf[2] : &out_buf[0]; out_shifted_buf[1] = ((uint64_t)((int64_t)in_device_status->joystick_positions[0][0] + (int64_t)32768) >> (uint64_t)8); // L stick, X axis out_shifted_buf[2] = ((uint64_t)((int64_t)in_device_status->joystick_positions[0][1] + (int64_t)32768) >> (uint64_t)8); // L stick, Y axis