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
50785992
Commit
50785992
authored
Aug 13, 2019
by
Brendan Shanks
Committed by
Alexandre Julliard
Aug 20, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput/tests: Test for correct guidProduct.
Signed-off-by:
Brendan Shanks
<
bshanks@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
509e8d20
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
dinput.c
dlls/dinput/tests/dinput.c
+24
-0
No files found.
dlls/dinput/tests/dinput.c
View file @
50785992
...
...
@@ -386,6 +386,30 @@ static BOOL CALLBACK enum_devices_callback(const DIDEVICEINSTANCEA *instance, vo
wine_dbgstr_guid
(
&
instance
->
guidProduct
));
}
if
((
instance
->
dwDevType
&
0xff
)
==
DIDEVTYPE_KEYBOARD
)
ok
(
IsEqualGUID
(
&
instance
->
guidProduct
,
&
GUID_SysKeyboard
),
"Keyboard guidProduct (%s) does not match GUID_SysKeyboard (%s)
\n
"
,
wine_dbgstr_guid
(
&
instance
->
guidProduct
),
wine_dbgstr_guid
(
&
GUID_SysMouse
));
else
if
((
instance
->
dwDevType
&
0xff
)
==
DIDEVTYPE_MOUSE
)
ok
(
IsEqualGUID
(
&
instance
->
guidProduct
,
&
GUID_SysMouse
),
"Mouse guidProduct (%s) does not match GUID_SysMouse (%s)
\n
"
,
wine_dbgstr_guid
(
&
instance
->
guidProduct
),
wine_dbgstr_guid
(
&
GUID_SysMouse
));
else
{
/* Non-keyboard/mouse devices use the "PIDVID" guidProduct */
static
const
GUID
pidvid_product_guid
=
{
/* device_pidvid-0000-0000-0000-504944564944 "PIDVID" */
0x00000000
,
0x0000
,
0x0000
,
{
0x00
,
0x00
,
0x50
,
0x49
,
0x44
,
0x56
,
0x49
,
0x44
}
};
ok
(
instance
->
guidProduct
.
Data2
==
pidvid_product_guid
.
Data2
,
"guidProduct.Data2 is %04x
\n
"
,
instance
->
guidProduct
.
Data2
);
ok
(
instance
->
guidProduct
.
Data3
==
pidvid_product_guid
.
Data3
,
"guidProduct.Data3 is %04x
\n
"
,
instance
->
guidProduct
.
Data3
);
ok
(
!
memcmp
(
instance
->
guidProduct
.
Data4
,
pidvid_product_guid
.
Data4
,
sizeof
(
pidvid_product_guid
.
Data4
)),
"guidProduct.Data4 does not match: %s
\n
"
,
wine_dbgstr_guid
(
&
instance
->
guidProduct
));
}
enum_test
->
device_count
++
;
return
enum_test
->
return_value
;
}
...
...
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