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
11374e70
Commit
11374e70
authored
Dec 21, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
Dec 21, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput/tests: Test dinput force feedback effect envelope removal.
parent
d348cf37
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
75 additions
and
0 deletions
+75
-0
force_feedback.c
dlls/dinput/tests/force_feedback.c
+75
-0
No files found.
dlls/dinput/tests/force_feedback.c
View file @
11374e70
...
...
@@ -425,6 +425,55 @@ static void test_periodic_effect( IDirectInputDevice8W *device, HANDLE file, DWO
.
report_buf
=
{
0x03
,
0x01
,
0x02
,
0x08
,
0x01
,
0x00
,
version
>=
0x700
?
0x06
:
0x00
,
0x00
,
0x01
,
0x55
,
0xd5
},
},
};
struct
hid_expect
expect_download_3
[]
=
{
/* set periodic */
{
.
code
=
IOCTL_HID_WRITE_REPORT
,
.
report_id
=
5
,
.
report_len
=
2
,
.
report_buf
=
{
0x05
,
0x19
},
},
/* set envelope */
{
.
code
=
IOCTL_HID_WRITE_REPORT
,
.
report_id
=
6
,
.
report_len
=
7
,
.
report_buf
=
{
0x06
,
0x19
,
0x4c
,
0x01
,
0x00
,
0x04
,
0x00
},
},
/* update effect */
{
.
code
=
IOCTL_HID_WRITE_REPORT
,
.
report_id
=
3
,
.
report_len
=
11
,
.
report_buf
=
{
0x03
,
0x01
,
0x02
,
0x08
,
0xff
,
0xff
,
version
>=
0x700
?
0x06
:
0x00
,
0x00
,
0x01
,
0x55
,
0xd5
},
},
};
struct
hid_expect
expect_download_4
[]
=
{
/* set periodic */
{
.
code
=
IOCTL_HID_WRITE_REPORT
,
.
report_id
=
5
,
.
report_len
=
2
,
.
report_buf
=
{
0x05
,
0x19
},
},
/* set envelope (wine) */
{
.
code
=
IOCTL_HID_WRITE_REPORT
,
.
report_id
=
6
,
.
report_len
=
7
,
.
report_buf
=
{
0x06
,
0x19
,
0x4c
,
0x01
,
0x00
,
0x04
,
0x00
},
.
todo
=
TRUE
,
.
wine_only
=
TRUE
,
},
/* update effect */
{
.
code
=
IOCTL_HID_WRITE_REPORT
,
.
report_id
=
3
,
.
report_len
=
11
,
.
report_buf
=
{
0x03
,
0x01
,
0x02
,
0x08
,
0xff
,
0xff
,
version
>=
0x700
?
0x06
:
0x00
,
0x00
,
0x01
,
0x55
,
0xd5
},
},
};
struct
hid_expect
expect_update
[]
=
{
/* update effect */
...
...
@@ -1442,6 +1491,32 @@ static void test_periodic_effect( IDirectInputDevice8W *device, HANDLE file, DWO
wait_hid_expect
(
file
,
100
);
/* these updates are sent asynchronously */
set_hid_expect
(
file
,
&
expect_stop
,
sizeof
(
expect_stop
)
);
hr
=
IDirectInputEffect_Unload
(
effect
);
ok
(
hr
==
DI_OK
,
"Unload returned %#lx
\n
"
,
hr
);
set_hid_expect
(
file
,
NULL
,
0
);
hr
=
IDirectInputEffect_SetParameters
(
effect
,
&
expect_desc
,
DIEP_NODOWNLOAD
);
ok
(
hr
==
DI_DOWNLOADSKIPPED
,
"SetParameters returned %#lx
\n
"
,
hr
);
set_hid_expect
(
file
,
expect_download_3
,
sizeof
(
expect_download_3
)
);
hr
=
IDirectInputEffect_SetParameters
(
effect
,
&
expect_desc
,
0
);
ok
(
hr
==
DI_OK
,
"SetParameters returned %#lx
\n
"
,
hr
);
wait_hid_expect
(
file
,
100
);
/* these updates are sent asynchronously */
set_hid_expect
(
file
,
&
expect_stop
,
sizeof
(
expect_stop
)
);
hr
=
IDirectInputEffect_Unload
(
effect
);
ok
(
hr
==
DI_OK
,
"Unload returned %#lx
\n
"
,
hr
);
set_hid_expect
(
file
,
NULL
,
0
);
desc
=
expect_desc
;
desc
.
lpEnvelope
=
NULL
;
hr
=
IDirectInputEffect_SetParameters
(
effect
,
&
desc
,
DIEP_NODOWNLOAD
|
DIEP_ENVELOPE
);
ok
(
hr
==
DI_DOWNLOADSKIPPED
,
"SetParameters returned %#lx
\n
"
,
hr
);
set_hid_expect
(
file
,
expect_download_4
,
sizeof
(
expect_download_4
)
);
hr
=
IDirectInputEffect_SetParameters
(
effect
,
&
expect_desc
,
0
);
ok
(
hr
==
DI_OK
,
"SetParameters returned %#lx
\n
"
,
hr
);
wait_hid_expect
(
file
,
100
);
/* these updates are sent asynchronously */
set_hid_expect
(
file
,
&
expect_stop
,
sizeof
(
expect_stop
)
);
ref
=
IDirectInputEffect_Release
(
effect
);
ok
(
ref
==
0
,
"Release returned %ld
\n
"
,
ref
);
set_hid_expect
(
file
,
NULL
,
0
);
...
...
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