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
4315d279
Commit
4315d279
authored
Oct 07, 2021
by
Rémi Bernon
Committed by
Alexandre Julliard
Oct 07, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput8/tests: Add some HID joystick IDirectInputEffect_(Start|Stop) tests.
Signed-off-by:
Rémi Bernon
<
rbernon@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
93677c12
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
89 additions
and
0 deletions
+89
-0
hid.c
dlls/dinput8/tests/hid.c
+89
-0
No files found.
dlls/dinput8/tests/hid.c
View file @
4315d279
...
...
@@ -5122,6 +5122,46 @@ static void test_periodic_effect( IDirectInputDevice8W *device, HANDLE file )
.
report_buf
=
{
0x02
,
0x01
,
0x01
,
0x01
},
},
};
struct
hid_expect
expect_start
=
{
.
code
=
IOCTL_HID_WRITE_REPORT
,
.
todo
=
TRUE
,
.
report_id
=
2
,
.
report_len
=
4
,
.
report_buf
=
{
0x02
,
0x01
,
0x01
,
0x01
},
};
struct
hid_expect
expect_start_solo
=
{
.
code
=
IOCTL_HID_WRITE_REPORT
,
.
todo
=
TRUE
,
.
report_id
=
2
,
.
report_len
=
4
,
.
report_buf
=
{
0x02
,
0x01
,
0x02
,
0x01
},
};
struct
hid_expect
expect_start_0
=
{
.
code
=
IOCTL_HID_WRITE_REPORT
,
.
todo
=
TRUE
,
.
report_id
=
2
,
.
report_len
=
4
,
.
report_buf
=
{
0x02
,
0x01
,
0x01
,
0x00
},
};
struct
hid_expect
expect_start_4
=
{
.
code
=
IOCTL_HID_WRITE_REPORT
,
.
todo
=
TRUE
,
.
report_id
=
2
,
.
report_len
=
4
,
.
report_buf
=
{
0x02
,
0x01
,
0x01
,
0x04
},
};
struct
hid_expect
expect_stop
=
{
.
code
=
IOCTL_HID_WRITE_REPORT
,
.
todo
=
TRUE
,
.
report_id
=
2
,
.
report_len
=
4
,
.
report_buf
=
{
0x02
,
0x01
,
0x03
,
0x00
},
};
struct
hid_expect
expect_unload
[]
=
{
{
...
...
@@ -5131,6 +5171,7 @@ static void test_periodic_effect( IDirectInputDevice8W *device, HANDLE file )
.
report_len
=
4
,
.
report_buf
=
{
0x02
,
0x01
,
0x03
,
0x00
},
},
/* device reset, when unloaded from Unacquire */
{
.
code
=
IOCTL_HID_WRITE_REPORT
,
.
report_id
=
1
,
...
...
@@ -5723,6 +5764,13 @@ static void test_periodic_effect( IDirectInputDevice8W *device, HANDLE file )
todo_wine
check_member
(
periodic
,
expect_periodic
,
"%u"
,
dwPeriod
);
hr
=
IDirectInputEffect_Start
(
effect
,
1
,
DIES_NODOWNLOAD
);
todo_wine
ok
(
hr
==
DIERR_NOTDOWNLOADED
,
"Start returned %#x
\n
"
,
hr
);
hr
=
IDirectInputEffect_Stop
(
effect
);
todo_wine
ok
(
hr
==
DIERR_NOTDOWNLOADED
,
"Stop returned %#x
\n
"
,
hr
);
set_hid_expect
(
file
,
expect_download
,
3
*
sizeof
(
struct
hid_expect
)
);
hr
=
IDirectInputEffect_Download
(
effect
);
todo_wine
...
...
@@ -5733,6 +5781,40 @@ static void test_periodic_effect( IDirectInputDevice8W *device, HANDLE file )
todo_wine
ok
(
hr
==
DI_NOEFFECT
,
"Download returned %#x
\n
"
,
hr
);
hr
=
IDirectInputEffect_Start
(
effect
,
1
,
0xdeadbeef
);
todo_wine
ok
(
hr
==
DIERR_INVALIDPARAM
,
"Start returned %#x
\n
"
,
hr
);
set_hid_expect
(
file
,
&
expect_start_solo
,
sizeof
(
expect_start_solo
)
);
hr
=
IDirectInputEffect_Start
(
effect
,
1
,
DIES_SOLO
);
todo_wine
ok
(
hr
==
DI_OK
,
"Start returned %#x
\n
"
,
hr
);
set_hid_expect
(
file
,
NULL
,
0
);
set_hid_expect
(
file
,
&
expect_stop
,
sizeof
(
expect_stop
)
);
hr
=
IDirectInputEffect_Stop
(
effect
);
todo_wine
ok
(
hr
==
DI_OK
,
"Stop returned %#x
\n
"
,
hr
);
set_hid_expect
(
file
,
NULL
,
0
);
set_hid_expect
(
file
,
&
expect_start
,
sizeof
(
expect_start
)
);
hr
=
IDirectInputEffect_Start
(
effect
,
1
,
0
);
todo_wine
ok
(
hr
==
DI_OK
,
"Start returned %#x
\n
"
,
hr
);
set_hid_expect
(
file
,
NULL
,
0
);
set_hid_expect
(
file
,
&
expect_start_4
,
sizeof
(
expect_start_4
)
);
hr
=
IDirectInputEffect_Start
(
effect
,
4
,
0
);
todo_wine
ok
(
hr
==
DI_OK
,
"Start returned %#x
\n
"
,
hr
);
set_hid_expect
(
file
,
NULL
,
0
);
set_hid_expect
(
file
,
&
expect_start_0
,
sizeof
(
expect_start_4
)
);
hr
=
IDirectInputEffect_Start
(
effect
,
0
,
0
);
todo_wine
ok
(
hr
==
DI_OK
,
"Start returned %#x
\n
"
,
hr
);
set_hid_expect
(
file
,
NULL
,
0
);
set_hid_expect
(
file
,
expect_unload
,
sizeof
(
struct
hid_expect
)
);
hr
=
IDirectInputEffect_Unload
(
effect
);
todo_wine
...
...
@@ -5762,6 +5844,13 @@ static void test_periodic_effect( IDirectInputDevice8W *device, HANDLE file )
ok
(
hr
==
DI_OK
,
"Unacquire returned: %#x
\n
"
,
hr
);
set_hid_expect
(
file
,
NULL
,
0
);
hr
=
IDirectInputEffect_Start
(
effect
,
1
,
DIES_NODOWNLOAD
);
todo_wine
ok
(
hr
==
DIERR_NOTEXCLUSIVEACQUIRED
,
"Start returned %#x
\n
"
,
hr
);
hr
=
IDirectInputEffect_Stop
(
effect
);
todo_wine
ok
(
hr
==
DIERR_NOTEXCLUSIVEACQUIRED
,
"Stop returned %#x
\n
"
,
hr
);
set_hid_expect
(
file
,
&
expect_dc_reset
,
sizeof
(
expect_dc_reset
)
);
hr
=
IDirectInputDevice8_Acquire
(
device
);
ok
(
hr
==
DI_OK
,
"Acquire returned: %#x
\n
"
,
hr
);
...
...
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