Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
1ccb1719
Commit
1ccb1719
authored
Feb 02, 2017
by
Aric Stewart
Committed by
Alexandre Julliard
Feb 02, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hidclass.sys: IOCTL_HID_GET_INPUT_REPORT has report ID as first byte.
Signed-off-by:
Aric Stewart
<
aric@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
1707df3d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
8 deletions
+20
-8
device.c
dlls/hid/tests/device.c
+1
-0
device.c
dlls/hidclass.sys/device.c
+19
-8
No files found.
dlls/hid/tests/device.c
View file @
1ccb1719
...
@@ -356,6 +356,7 @@ static void test_get_input_report(void)
...
@@ -356,6 +356,7 @@ static void test_get_input_report(void)
if
(
rc
)
if
(
rc
)
{
{
ok
(
data
[
0
]
==
0
,
"Report ID (0) is not the first byte of the data
\n
"
);
report
[
0
]
=
0
;
report
[
0
]
=
0
;
for
(
i
=
0
;
i
<
Caps
.
InputReportByteLength
&&
i
<
Caps
.
InputReportByteLength
;
i
++
)
for
(
i
=
0
;
i
<
Caps
.
InputReportByteLength
&&
i
<
Caps
.
InputReportByteLength
;
i
++
)
{
{
...
...
dlls/hidclass.sys/device.c
View file @
1ccb1719
...
@@ -584,19 +584,30 @@ NTSTATUS WINAPI HID_Device_ioctl(DEVICE_OBJECT *device, IRP *irp)
...
@@ -584,19 +584,30 @@ NTSTATUS WINAPI HID_Device_ioctl(DEVICE_OBJECT *device, IRP *irp)
}
}
case
IOCTL_HID_GET_INPUT_REPORT
:
case
IOCTL_HID_GET_INPUT_REPORT
:
{
{
HID_XFER_PACKET
packet
;
HID_XFER_PACKET
*
packet
;
UINT
packet_size
=
sizeof
(
*
packet
)
+
irpsp
->
Parameters
.
DeviceIoControl
.
OutputBufferLength
;
BYTE
*
buffer
=
MmGetSystemAddressForMdlSafe
(
irp
->
MdlAddress
,
NormalPagePriority
);
BYTE
*
buffer
=
MmGetSystemAddressForMdlSafe
(
irp
->
MdlAddress
,
NormalPagePriority
);
ULONG
out_length
;
packet
=
HeapAlloc
(
GetProcessHeap
(),
0
,
packet_size
);
if
(
extension
->
preparseData
->
InputReports
[
0
].
reportID
)
if
(
extension
->
preparseData
->
InputReports
[
0
].
reportID
)
packet
.
reportId
=
buffer
[
0
];
packet
->
reportId
=
buffer
[
0
];
else
else
packet
.
reportId
=
0
;
packet
->
reportId
=
0
;
packet
.
reportBuffer
=
buffer
;
packet
->
reportBuffer
=
(
BYTE
*
)
packet
+
sizeof
(
*
packet
)
;
packet
.
reportBufferLen
=
irpsp
->
Parameters
.
DeviceIoControl
.
OutputBufferLength
;
packet
->
reportBufferLen
=
irpsp
->
Parameters
.
DeviceIoControl
.
OutputBufferLength
-
1
;
call_minidriver
(
IOCTL_HID_GET_INPUT_REPORT
,
device
,
NULL
,
0
,
&
packet
,
sizeof
(
packet
));
rc
=
call_minidriver
(
IOCTL_HID_GET_INPUT_REPORT
,
device
,
NULL
,
0
,
packet
,
sizeof
(
*
packet
));
irp
->
IoStatus
.
Information
=
packet
.
reportBufferLen
;
if
(
rc
==
STATUS_SUCCESS
)
irp
->
IoStatus
.
u
.
Status
=
STATUS_SUCCESS
;
{
rc
=
copy_packet_into_buffer
(
packet
,
buffer
,
irpsp
->
Parameters
.
DeviceIoControl
.
OutputBufferLength
,
&
out_length
);
irp
->
IoStatus
.
Information
=
out_length
;
}
else
irp
->
IoStatus
.
Information
=
0
;
irp
->
IoStatus
.
u
.
Status
=
rc
;
HeapFree
(
GetProcessHeap
(),
0
,
packet
);
break
;
break
;
}
}
case
IOCTL_SET_NUM_DEVICE_INPUT_BUFFERS
:
case
IOCTL_SET_NUM_DEVICE_INPUT_BUFFERS
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment