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
e47fcc11
Commit
e47fcc11
authored
Sep 30, 2021
by
Rémi Bernon
Committed by
Alexandre Julliard
Sep 30, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput8/tests: Add some HID joystick IDirectInputDevice8_GetEffectInfo tests.
Signed-off-by:
Rémi Bernon
<
rbernon@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
5f492b5e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
0 deletions
+30
-0
hid.c
dlls/dinput8/tests/hid.c
+30
-0
No files found.
dlls/dinput8/tests/hid.c
View file @
e47fcc11
...
...
@@ -3679,6 +3679,7 @@ static void test_simple_joystick(void)
DIDEVICEOBJECTDATA
objdata
[
32
]
=
{{
0
}};
DIDEVICEOBJECTINSTANCEW
objinst
=
{
0
};
DIDEVICEINSTANCEW
devinst
=
{
0
};
DIEFFECTINFOW
effectinfo
=
{
0
};
DIDATAFORMAT
dataformat
=
{
0
};
IDirectInputDevice8W
*
device
;
DIDEVCAPS
caps
=
{
0
};
...
...
@@ -4049,6 +4050,21 @@ static void test_simple_joystick(void)
ok
(
check_effects_params
.
index
>=
check_effects_params
.
expect_count
,
"missing %u effects
\n
"
,
check_effects_params
.
expect_count
-
check_effects_params
.
index
);
hr
=
IDirectInputDevice8_GetEffectInfo
(
device
,
NULL
,
&
GUID_Sine
);
todo_wine
ok
(
hr
==
E_POINTER
,
"IDirectInputDevice8_GetEffectInfo returned %#x
\n
"
,
hr
);
effectinfo
.
dwSize
=
sizeof
(
DIEFFECTINFOW
)
+
1
;
hr
=
IDirectInputDevice8_GetEffectInfo
(
device
,
&
effectinfo
,
&
GUID_Sine
);
todo_wine
ok
(
hr
==
DIERR_INVALIDPARAM
,
"IDirectInputDevice8_GetEffectInfo returned %#x
\n
"
,
hr
);
effectinfo
.
dwSize
=
sizeof
(
DIEFFECTINFOW
);
hr
=
IDirectInputDevice8_GetEffectInfo
(
device
,
&
effectinfo
,
&
GUID_NULL
);
todo_wine
ok
(
hr
==
DIERR_DEVICENOTREG
,
"IDirectInputDevice8_GetEffectInfo returned %#x
\n
"
,
hr
);
hr
=
IDirectInputDevice8_GetEffectInfo
(
device
,
&
effectinfo
,
&
GUID_Sine
);
todo_wine
ok
(
hr
==
DIERR_DEVICENOTREG
,
"IDirectInputDevice8_GetEffectInfo returned %#x
\n
"
,
hr
);
hr
=
IDirectInputDevice8_SetDataFormat
(
device
,
NULL
);
ok
(
hr
==
E_POINTER
,
"IDirectInputDevice8_SetDataFormat returned: %#x
\n
"
,
hr
);
hr
=
IDirectInputDevice8_SetDataFormat
(
device
,
&
dataformat
);
...
...
@@ -5416,6 +5432,7 @@ static void test_force_feedback_joystick( void )
};
WCHAR
cwd
[
MAX_PATH
],
tempdir
[
MAX_PATH
];
DIDEVICEINSTANCEW
devinst
=
{
0
};
DIEFFECTINFOW
effectinfo
=
{
0
};
IDirectInputDevice8W
*
device
;
DIDEVCAPS
caps
=
{
0
};
IDirectInput8W
*
di
;
...
...
@@ -5514,6 +5531,19 @@ static void test_force_feedback_joystick( void )
ok
(
check_effects_params
.
index
>=
check_effects_params
.
expect_count
,
"missing %u effects
\n
"
,
check_effects_params
.
expect_count
-
check_effects_params
.
index
);
effectinfo
.
dwSize
=
sizeof
(
DIEFFECTINFOW
);
hr
=
IDirectInputDevice8_GetEffectInfo
(
device
,
&
effectinfo
,
&
GUID_Sine
);
ok
(
hr
==
DI_OK
,
"IDirectInputDevice8_GetEffectInfo returned %#x
\n
"
,
hr
);
todo_wine
check_member_guid
(
effectinfo
,
expect_effects
[
0
],
guid
);
check_member
(
effectinfo
,
expect_effects
[
0
],
"%#x"
,
dwEffType
);
todo_wine
check_member
(
effectinfo
,
expect_effects
[
0
],
"%#x"
,
dwStaticParams
);
todo_wine
check_member
(
effectinfo
,
expect_effects
[
0
],
"%#x"
,
dwDynamicParams
);
todo_wine
check_member_wstr
(
effectinfo
,
expect_effects
[
0
],
tszName
);
hr
=
IDirectInputDevice8_SetDataFormat
(
device
,
&
c_dfDIJoystick2
);
ok
(
hr
==
DI_OK
,
"IDirectInputDevice8_SetDataFormat 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