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
f39adfe9
Commit
f39adfe9
authored
Jun 04, 2019
by
Zebediah Figura
Committed by
Alexandre Julliard
Jun 04, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winebus.sys: Make the device and instance IDs consistent.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
6e999b4a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
2 deletions
+15
-2
main.c
dlls/winebus.sys/main.c
+15
-2
No files found.
dlls/winebus.sys/main.c
View file @
f39adfe9
...
...
@@ -168,13 +168,26 @@ static WCHAR *get_instance_id(DEVICE_OBJECT *device)
static
WCHAR
*
get_device_id
(
DEVICE_OBJECT
*
device
)
{
static
const
WCHAR
formatW
[]
=
{
'%'
,
's'
,
'\\'
,
'V'
,
'i'
,
'd'
,
'_'
,
'%'
,
'0'
,
'4'
,
'x'
,
'&'
,
'P'
,
'i'
,
'd'
,
'_'
,
'%'
,
'0'
,
'4'
,
'x'
,
0
};
static
const
WCHAR
formatW
[]
=
{
'%'
,
's'
,
'\\'
,
'v'
,
'i'
,
'd'
,
'_'
,
'%'
,
'0'
,
'4'
,
'x'
,
'&'
,
'p'
,
'i'
,
'd'
,
'_'
,
'%'
,
'0'
,
'4'
,
'x'
,
0
};
static
const
WCHAR
format_inputW
[]
=
{
'%'
,
's'
,
'\\'
,
'v'
,
'i'
,
'd'
,
'_'
,
'%'
,
'0'
,
'4'
,
'x'
,
'&'
,
'p'
,
'i'
,
'd'
,
'_'
,
'%'
,
'0'
,
'4'
,
'x'
,
'&'
,
'%'
,
's'
,
'_'
,
'%'
,
'i'
,
0
};
struct
device_extension
*
ext
=
(
struct
device_extension
*
)
device
->
DeviceExtension
;
DWORD
len
=
strlenW
(
ext
->
busid
)
+
19
;
DWORD
len
=
strlenW
(
ext
->
busid
)
+
34
;
WCHAR
*
dst
;
if
((
dst
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
))))
{
if
(
ext
->
input
==
(
WORD
)
-
1
)
{
sprintfW
(
dst
,
formatW
,
ext
->
busid
,
ext
->
vid
,
ext
->
pid
);
}
else
{
sprintfW
(
dst
,
format_inputW
,
ext
->
busid
,
ext
->
vid
,
ext
->
pid
,
ext
->
is_gamepad
?
igW
:
miW
,
ext
->
input
);
}
}
return
dst
;
}
...
...
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