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
e69f27d2
Commit
e69f27d2
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_CreateEffect tests.
Signed-off-by:
Rémi Bernon
<
rbernon@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
6d7e5c71
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
0 deletions
+40
-0
device.c
dlls/dinput/device.c
+1
-0
hid.c
dlls/dinput8/tests/hid.c
+39
-0
No files found.
dlls/dinput/device.c
View file @
e69f27d2
...
...
@@ -1578,6 +1578,7 @@ HRESULT WINAPI IDirectInputDevice2WImpl_CreateEffect(LPDIRECTINPUTDEVICE8W iface
{
IDirectInputDeviceImpl
*
This
=
impl_from_IDirectInputDevice8W
(
iface
);
FIXME
(
"(%p)->(%s,%p,%p,%p): stub!
\n
"
,
This
,
debugstr_guid
(
rguid
),
lpeff
,
ppdef
,
pUnkOuter
);
if
(
!
ppdef
)
return
E_POINTER
;
FIXME
(
"not available in the generic implementation
\n
"
);
*
ppdef
=
NULL
;
...
...
dlls/dinput8/tests/hid.c
View file @
e69f27d2
...
...
@@ -3682,6 +3682,7 @@ static void test_simple_joystick(void)
DIEFFECTINFOW
effectinfo
=
{
0
};
DIDATAFORMAT
dataformat
=
{
0
};
IDirectInputDevice8W
*
device
;
IDirectInputEffect
*
effect
;
DIEFFESCAPE
escape
=
{
0
};
DIDEVCAPS
caps
=
{
0
};
IDirectInput8W
*
di
;
...
...
@@ -4673,9 +4674,21 @@ static void test_simple_joystick(void)
todo_wine
ok
(
hr
==
DIERR_INVALIDPARAM
,
"IDirectInputDevice8_SendDeviceData returned %#x
\n
"
,
hr
);
hr
=
IDirectInputDevice8_CreateEffect
(
device
,
&
GUID_Sine
,
NULL
,
NULL
,
NULL
);
ok
(
hr
==
E_POINTER
,
"IDirectInputDevice8_CreateEffect returned %#x
\n
"
,
hr
);
hr
=
IDirectInputDevice8_CreateEffect
(
device
,
NULL
,
NULL
,
&
effect
,
NULL
);
ok
(
hr
==
DIERR_UNSUPPORTED
,
"IDirectInputDevice8_CreateEffect returned %#x
\n
"
,
hr
);
hr
=
IDirectInputDevice8_CreateEffect
(
device
,
&
GUID_NULL
,
NULL
,
&
effect
,
NULL
);
ok
(
hr
==
DIERR_UNSUPPORTED
,
"IDirectInputDevice8_CreateEffect returned %#x
\n
"
,
hr
);
hr
=
IDirectInputDevice8_CreateEffect
(
device
,
&
GUID_Sine
,
NULL
,
&
effect
,
NULL
);
ok
(
hr
==
DIERR_UNSUPPORTED
,
"IDirectInputDevice8_CreateEffect returned %#x
\n
"
,
hr
);
hr
=
IDirectInputDevice8_Unacquire
(
device
);
ok
(
hr
==
DI_OK
,
"IDirectInputDevice8_Unacquire returned: %#x
\n
"
,
hr
);
hr
=
IDirectInputDevice8_CreateEffect
(
device
,
&
GUID_Sine
,
NULL
,
&
effect
,
NULL
);
ok
(
hr
==
DIERR_UNSUPPORTED
,
"IDirectInputDevice8_CreateEffect returned %#x
\n
"
,
hr
);
hr
=
IDirectInputDevice8_Escape
(
device
,
NULL
);
todo_wine
ok
(
hr
==
E_POINTER
,
"IDirectInputDevice8_Escape returned: %#x
\n
"
,
hr
);
...
...
@@ -5051,6 +5064,30 @@ static BOOL test_device_types(void)
return
success
;
}
static
void
test_periodic_effect
(
IDirectInputDevice8W
*
device
,
HANDLE
file
)
{
IDirectInputEffect
*
effect
;
HRESULT
hr
;
ULONG
ref
;
hr
=
IDirectInputDevice8_CreateEffect
(
device
,
&
GUID_Sine
,
NULL
,
NULL
,
NULL
);
ok
(
hr
==
E_POINTER
,
"IDirectInputDevice8_CreateEffect returned %#x
\n
"
,
hr
);
hr
=
IDirectInputDevice8_CreateEffect
(
device
,
NULL
,
NULL
,
&
effect
,
NULL
);
todo_wine
ok
(
hr
==
E_POINTER
,
"IDirectInputDevice8_CreateEffect returned %#x
\n
"
,
hr
);
hr
=
IDirectInputDevice8_CreateEffect
(
device
,
&
GUID_NULL
,
NULL
,
&
effect
,
NULL
);
todo_wine
ok
(
hr
==
DIERR_DEVICENOTREG
,
"IDirectInputDevice8_CreateEffect returned %#x
\n
"
,
hr
);
hr
=
IDirectInputDevice8_CreateEffect
(
device
,
&
GUID_Sine
,
NULL
,
&
effect
,
NULL
);
todo_wine
ok
(
hr
==
DI_OK
,
"IDirectInputDevice8_CreateEffect returned %#x
\n
"
,
hr
);
if
(
hr
!=
DI_OK
)
return
;
ref
=
IDirectInputEffect_Release
(
effect
);
ok
(
ref
==
0
,
"IDirectInputDeviceW_Release returned %d
\n
"
,
ref
);
}
static
void
test_force_feedback_joystick
(
void
)
{
#include "psh_hid_macros.h"
...
...
@@ -5797,6 +5834,8 @@ static void test_force_feedback_joystick( void )
todo_wine
ok
(
hr
==
DIERR_INVALIDPARAM
,
"IDirectInputDevice8_SendDeviceData returned %#x
\n
"
,
hr
);
test_periodic_effect
(
device
,
file
);
set_hid_expect
(
file
,
&
expect_dc_reset
,
sizeof
(
expect_dc_reset
)
);
hr
=
IDirectInputDevice8_Unacquire
(
device
);
ok
(
hr
==
DI_OK
,
"IDirectInputDevice8_Unacquire 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