File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1324,7 +1324,7 @@ Return Value:
13241324 PMANUAL_QUEUE_CONTEXT queueContext ;
13251325 WDFREQUEST request ;
13261326 LONG command ;
1327- UCHAR inputReport [ 1 + TEST_VDEV_REPORT_SIZE ]; /* report id + payload */
1327+ const UCHAR * payload ;
13281328 static const UCHAR inputA [TEST_VDEV_REPORT_SIZE ] = { TEST_VDEV_INPUT_A_BYTES };
13291329 static const UCHAR inputB [TEST_VDEV_REPORT_SIZE ] = { TEST_VDEV_INPUT_B_BYTES };
13301330
@@ -1352,12 +1352,11 @@ Return Value:
13521352 return ;
13531353 }
13541354
1355- inputReport [0 ] = 0 ; /* report id (the device is unnumbered) */
1356- RtlCopyMemory (inputReport + 1 ,
1357- (command == TEST_VDEV_CMD_EMIT_B ) ? inputB : inputA ,
1358- TEST_VDEV_REPORT_SIZE );
1359-
1360- status = RequestCopyFromBuffer (request , inputReport , sizeof (inputReport ));
1355+ /* Deliver the raw report bytes (no report-id prefix: the device is
1356+ unnumbered, so the report on the wire is just the payload). hidclass
1357+ frames it for user mode; HIDAPI returns exactly these bytes. */
1358+ payload = (command == TEST_VDEV_CMD_EMIT_B ) ? inputB : inputA ;
1359+ status = RequestCopyFromBuffer (request , (PVOID )payload , TEST_VDEV_REPORT_SIZE );
13611360 WdfRequestComplete (request , status );
13621361}
13631362
You can’t perform that action at this time.
0 commit comments