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
1832dc3d
Commit
1832dc3d
authored
Apr 23, 2020
by
Brendan Shanks
Committed by
Alexandre Julliard
Apr 24, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput: Fix IDirectInputEffect::SetParameters() when called with flags=0.
Signed-off-by:
Brendan Shanks
<
bshanks@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
23a55927
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
10 deletions
+7
-10
effect_linuxinput.c
dlls/dinput/effect_linuxinput.c
+3
-7
joystick_linuxinput.c
dlls/dinput/joystick_linuxinput.c
+4
-1
joystick.c
dlls/dinput/tests/joystick.c
+0
-2
No files found.
dlls/dinput/effect_linuxinput.c
View file @
1832dc3d
...
...
@@ -489,15 +489,11 @@ static HRESULT WINAPI LinuxInputEffectImpl_SetParameters(
TRACE
(
"(this=%p,%p,%d)
\n
"
,
This
,
peff
,
dwFlags
);
if
((
dwFlags
&
~
DIEP_NORESTART
&
~
DIEP_NODOWNLOAD
&
~
DIEP_START
)
==
0
)
{
/* set everything */
dwFlags
=
DIEP_AXES
|
DIEP_DIRECTION
|
DIEP_DURATION
|
DIEP_ENVELOPE
|
DIEP_GAIN
|
DIEP_SAMPLEPERIOD
|
DIEP_STARTDELAY
|
DIEP_TRIGGERBUTTON
|
DIEP_TRIGGERREPEATINTERVAL
|
DIEP_TYPESPECIFICPARAMS
;
}
dump_DIEFFECT
(
peff
,
&
This
->
guid
,
dwFlags
);
if
(
!
dwFlags
)
return
DI_NOEFFECT
;
if
(
dwFlags
&
DIEP_AXES
)
{
if
(
!
(
peff
->
rgdwAxes
))
return
DIERR_INVALIDPARAM
;
...
...
dlls/dinput/joystick_linuxinput.c
View file @
1832dc3d
...
...
@@ -1097,7 +1097,10 @@ static HRESULT WINAPI JoystickWImpl_CreateEffect(LPDIRECTINPUTDEVICE8W iface, RE
if
(
lpeff
!=
NULL
)
{
retval
=
IDirectInputEffect_SetParameters
(
new_effect
->
ref
,
lpeff
,
0
);
retval
=
IDirectInputEffect_SetParameters
(
new_effect
->
ref
,
lpeff
,
DIEP_AXES
|
DIEP_DIRECTION
|
DIEP_DURATION
|
DIEP_ENVELOPE
|
DIEP_GAIN
|
DIEP_SAMPLEPERIOD
|
DIEP_STARTDELAY
|
DIEP_TRIGGERBUTTON
|
DIEP_TRIGGERREPEATINTERVAL
|
DIEP_TYPESPECIFICPARAMS
);
if
(
retval
!=
DI_OK
&&
retval
!=
DI_DOWNLOADSKIPPED
)
{
...
...
dlls/dinput/tests/joystick.c
View file @
1832dc3d
...
...
@@ -663,11 +663,9 @@ static BOOL CALLBACK EnumJoysticks(const DIDEVICEINSTANCEA *lpddi, void *pvRef)
memset
(
&
effect_empty
,
0
,
sizeof
(
effect_empty
));
effect_empty
.
dwSize
=
sizeof
(
effect_empty
);
hr
=
IDirectInputEffect_SetParameters
(
effect
,
&
effect_empty
,
0
);
todo_wine
ok
(
hr
==
DI_NOEFFECT
,
"IDirectInputEffect_SetParameters failed: %08x
\n
"
,
hr
);
/* Start effect with SetParameters and a zeroed-out DIEFFECT. */
hr
=
IDirectInputEffect_SetParameters
(
effect
,
&
effect_empty
,
DIEP_START
);
todo_wine
ok
(
hr
==
DI_OK
,
"IDirectInputEffect_SetParameters failed: %08x
\n
"
,
hr
);
hr
=
IDirectInputEffect_GetEffectStatus
(
effect
,
&
effect_status
);
ok
(
hr
==
DI_OK
,
"IDirectInputEffect_GetEffectStatus() failed: %08x
\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