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
f9486e98
Commit
f9486e98
authored
Sep 16, 2021
by
Rémi Bernon
Committed by
Alexandre Julliard
Sep 16, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput8/tests: Add some HID joystick IDirectInputDevice8_(Un)Acquire tests.
Signed-off-by:
Rémi Bernon
<
rbernon@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
2975ad81
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
hid.c
dlls/dinput8/tests/hid.c
+20
-0
No files found.
dlls/dinput8/tests/hid.c
View file @
f9486e98
...
...
@@ -3721,11 +3721,31 @@ static void test_simple_joystick(void)
ok
(
hr
==
DI_OK
,
"IDirectInputDevice8_SetCooperativeLevel returned: %#x
\n
"
,
hr
);
hr
=
IDirectInputDevice8_SetCooperativeLevel
(
device
,
hwnd
,
DISCL_FOREGROUND
|
DISCL_EXCLUSIVE
);
ok
(
hr
==
DI_OK
,
"IDirectInputDevice8_SetCooperativeLevel returned: %#x
\n
"
,
hr
);
hr
=
IDirectInputDevice8_Unacquire
(
device
);
ok
(
hr
==
DI_NOEFFECT
,
"IDirectInputDevice8_Unacquire returned: %#x
\n
"
,
hr
);
hr
=
IDirectInputDevice8_Acquire
(
device
);
ok
(
hr
==
DI_OK
,
"IDirectInputDevice8_Acquire returned: %#x
\n
"
,
hr
);
hr
=
IDirectInputDevice8_SetCooperativeLevel
(
device
,
hwnd
,
DISCL_FOREGROUND
|
DISCL_EXCLUSIVE
);
todo_wine
ok
(
hr
==
DIERR_ACQUIRED
,
"IDirectInputDevice8_SetCooperativeLevel returned: %#x
\n
"
,
hr
);
hr
=
IDirectInputDevice8_Unacquire
(
device
);
ok
(
hr
==
DI_OK
,
"IDirectInputDevice8_Unacquire returned: %#x
\n
"
,
hr
);
DestroyWindow
(
hwnd
);
hr
=
IDirectInputDevice8_SetCooperativeLevel
(
device
,
NULL
,
DISCL_BACKGROUND
|
DISCL_NONEXCLUSIVE
);
ok
(
hr
==
DI_OK
,
"IDirectInputDevice8_SetCooperativeLevel returned: %#x
\n
"
,
hr
);
hr
=
IDirectInputDevice8_Acquire
(
device
);
ok
(
hr
==
DI_OK
,
"IDirectInputDevice8_Acquire returned: %#x
\n
"
,
hr
);
hr
=
IDirectInputDevice8_Unacquire
(
device
);
ok
(
hr
==
DI_OK
,
"IDirectInputDevice8_Unacquire returned: %#x
\n
"
,
hr
);
/* FIXME: we have to wait a bit because Wine DInput internal thread keeps a reference */
Sleep
(
100
);
ref
=
IDirectInputDevice8_Release
(
device
);
ok
(
ref
==
0
,
"IDirectInputDeviceW_Release returned %d
\n
"
,
ref
);
...
...
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