Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
9491a5e5
Commit
9491a5e5
authored
Mar 20, 2019
by
Aric Stewart
Committed by
Alexandre Julliard
Mar 21, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winebus.sys: Add UID to IOHID devices.
Signed-off-by:
Aric Stewart
<
aric@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
15f85201
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
bus_iohid.c
dlls/winebus.sys/bus_iohid.c
+3
-2
No files found.
dlls/winebus.sys/bus_iohid.c
View file @
9491a5e5
...
...
@@ -286,7 +286,7 @@ static const platform_vtbl iohid_vtbl =
static
void
handle_DeviceMatchingCallback
(
void
*
context
,
IOReturn
result
,
void
*
sender
,
IOHIDDeviceRef
IOHIDDevice
)
{
DEVICE_OBJECT
*
device
;
DWORD
vid
,
pid
,
version
;
DWORD
vid
,
pid
,
version
,
uid
;
CFStringRef
str
=
NULL
;
WCHAR
serial_string
[
256
];
BOOL
is_gamepad
=
FALSE
;
...
...
@@ -298,6 +298,7 @@ static void handle_DeviceMatchingCallback(void *context, IOReturn result, void *
version
=
CFNumberToDWORD
(
IOHIDDeviceGetProperty
(
IOHIDDevice
,
CFSTR
(
kIOHIDVersionNumberKey
)));
str
=
IOHIDDeviceGetProperty
(
IOHIDDevice
,
CFSTR
(
kIOHIDSerialNumberKey
));
if
(
str
)
CFStringToWSTR
(
str
,
serial_string
,
ARRAY_SIZE
(
serial_string
));
uid
=
CFNumberToDWORD
(
IOHIDDeviceGetProperty
(
IOHIDDevice
,
CFSTR
(
kIOHIDLocationIDKey
)));
if
(
IOHIDDeviceConformsTo
(
IOHIDDevice
,
kHIDPage_GenericDesktop
,
kHIDUsage_GD_GamePad
)
||
IOHIDDeviceConformsTo
(
IOHIDDevice
,
kHIDPage_GenericDesktop
,
kHIDUsage_GD_Joystick
))
...
...
@@ -344,7 +345,7 @@ static void handle_DeviceMatchingCallback(void *context, IOReturn result, void *
}
}
device
=
bus_create_hid_device
(
iohid_driver_obj
,
busidW
,
vid
,
pid
,
version
,
0
,
str
?
serial_string
:
NULL
,
is_gamepad
,
&
GUID_DEVCLASS_IOHID
,
&
iohid_vtbl
,
sizeof
(
struct
platform_private
));
device
=
bus_create_hid_device
(
iohid_driver_obj
,
busidW
,
vid
,
pid
,
version
,
uid
,
str
?
serial_string
:
NULL
,
is_gamepad
,
&
GUID_DEVCLASS_IOHID
,
&
iohid_vtbl
,
sizeof
(
struct
platform_private
));
if
(
!
device
)
ERR
(
"Failed to create device
\n
"
);
else
...
...
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