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
d5fb7383
Commit
d5fb7383
authored
Aug 09, 2019
by
Andrew Eikum
Committed by
Alexandre Julliard
Aug 12, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winebus.sys: Report device revision number for hidraw, too.
Signed-off-by:
Andrew Eikum
<
aeikum@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
2c73a086
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
1 deletion
+26
-1
bus_udev.c
dlls/winebus.sys/bus_udev.c
+26
-1
No files found.
dlls/winebus.sys/bus_udev.c
View file @
d5fb7383
...
...
@@ -1124,10 +1124,23 @@ next_line:
return
(
found_id
&&
found_serial
);
}
static
DWORD
a_to_bcd
(
const
char
*
s
)
{
DWORD
r
=
0
;
const
char
*
c
;
int
shift
=
strlen
(
s
)
-
1
;
for
(
c
=
s
;
*
c
;
++
c
)
{
r
|=
(
*
c
-
'0'
)
<<
(
shift
*
4
);
--
shift
;
}
return
r
;
}
static
void
try_add_device
(
struct
udev_device
*
dev
)
{
DWORD
vid
=
0
,
pid
=
0
,
version
=
0
;
struct
udev_device
*
hiddev
=
NULL
;
struct
udev_device
*
hiddev
=
NULL
,
*
walk_device
;
DEVICE_OBJECT
*
device
=
NULL
;
const
char
*
subsystem
;
const
char
*
devnode
;
...
...
@@ -1150,6 +1163,7 @@ static void try_add_device(struct udev_device *dev)
hiddev
=
udev_device_get_parent_with_subsystem_devtype
(
dev
,
"hid"
,
NULL
);
if
(
hiddev
)
{
const
char
*
bcdDevice
=
NULL
;
#ifdef HAS_PROPER_INPUT_HEADER
const
platform_vtbl
*
other_vtbl
=
NULL
;
DEVICE_OBJECT
*
dup
=
NULL
;
...
...
@@ -1171,6 +1185,17 @@ static void try_add_device(struct udev_device *dev)
&
vid
,
&
pid
,
&
input
,
&
serial
);
if
(
serial
==
NULL
)
serial
=
strdupAtoW
(
base_serial
);
walk_device
=
dev
;
while
(
walk_device
&&
!
bcdDevice
)
{
bcdDevice
=
udev_device_get_sysattr_value
(
walk_device
,
"bcdDevice"
);
walk_device
=
udev_device_get_parent
(
walk_device
);
}
if
(
bcdDevice
)
{
version
=
a_to_bcd
(
bcdDevice
);
}
}
#ifdef HAS_PROPER_INPUT_HEADER
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