From b442e617e95e9142a7a855b9f1b731317a3aefe8 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sat, 21 Nov 2020 18:15:55 -0800 Subject: [PATCH] Fixed adding an extra zero byte for feature reports At least with PS4 and PS5 controllers DeviceIoControl() returns the correct value --- src/hidapi/windows/hid.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/hidapi/windows/hid.c b/src/hidapi/windows/hid.c index 7cdad25e8..1d1771429 100644 --- a/src/hidapi/windows/hid.c +++ b/src/hidapi/windows/hid.c @@ -919,12 +919,6 @@ int HID_API_EXPORT HID_API_CALL hid_get_feature_report(hid_device *dev, unsigned return -1; } - /* bytes_returned does not include the first byte which contains the - report ID. The data buffer actually contains one more byte than - bytes_returned. */ - bytes_returned++; - - return bytes_returned; #endif }