wugren преди 3 години
родител
ревизия
f577612fd6
променени са 1 файла, в които са добавени 0 реда и са изтрити 22 реда
  1. 0 22
      hidapi/windows/hid.c

+ 0 - 22
hidapi/windows/hid.c

@@ -575,28 +575,6 @@ HID_API_EXPORT hid_device * HID_API_CALL hid_open_path(const char *path)
 		goto err;
 	}
 
-	/* Set the Input Report buffer size to 64 reports. */
-	res = HidD_SetNumInputBuffers(dev->device_handle, 64);
-	if (!res) {
-		register_error(dev, "HidD_SetNumInputBuffers");
-		goto err;
-	}
-
-	/* Get the Input Report length for the device. */
-	res = HidD_GetPreparsedData(dev->device_handle, &pp_data);
-	if (!res) {
-		register_error(dev, "HidD_GetPreparsedData");
-		goto err;
-	}
-	nt_res = HidP_GetCaps(pp_data, &caps);
-	if (nt_res != HIDP_STATUS_SUCCESS) {
-		register_error(dev, "HidP_GetCaps");
-		goto err_pp_data;
-	}
-	dev->output_report_length = caps.OutputReportByteLength;
-	dev->input_report_length = caps.InputReportByteLength;
-	HidD_FreePreparsedData(pp_data);
-
 	dev->read_buf = (char*) malloc(dev->input_report_length);
 
 	return dev;