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
42082d4d
Commit
42082d4d
authored
Dec 21, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
Jan 25, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput: Avoid sending envelope report if it has been removed.
parent
d05ce2e7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
41 deletions
+10
-41
joystick_hid.c
dlls/dinput/joystick_hid.c
+10
-1
force_feedback.c
dlls/dinput/tests/force_feedback.c
+0
-40
No files found.
dlls/dinput/joystick_hid.c
View file @
42082d4d
...
...
@@ -2641,7 +2641,9 @@ static HRESULT WINAPI hid_joystick_effect_SetParameters( IDirectInputEffect *ifa
impl
->
params
.
cbTypeSpecificParams
=
params
->
cbTypeSpecificParams
;
}
if
((
flags
&
DIEP_ENVELOPE
)
&&
params
->
lpEnvelope
)
if
(
!
(
flags
&
DIEP_ENVELOPE
))
TRACE
(
"Keeping previous effect envelope
\n
"
);
else
if
(
params
->
lpEnvelope
)
{
if
(
params
->
lpEnvelope
->
dwSize
!=
sizeof
(
DIENVELOPE
))
return
DIERR_INVALIDPARAM
;
impl
->
params
.
lpEnvelope
=
&
impl
->
envelope
;
...
...
@@ -2649,6 +2651,13 @@ static HRESULT WINAPI hid_joystick_effect_SetParameters( IDirectInputEffect *ifa
impl
->
modified
|=
DIEP_ENVELOPE
;
memcpy
(
impl
->
params
.
lpEnvelope
,
params
->
lpEnvelope
,
sizeof
(
DIENVELOPE
)
);
}
else
{
flags
&=
~
DIEP_ENVELOPE
;
impl
->
flags
&=
~
DIEP_ENVELOPE
;
impl
->
modified
&=
~
DIEP_ENVELOPE
;
impl
->
params
.
lpEnvelope
=
NULL
;
}
if
(
flags
&
DIEP_DURATION
)
{
...
...
dlls/dinput/tests/force_feedback.c
View file @
42082d4d
...
...
@@ -458,14 +458,6 @@ static void test_periodic_effect( IDirectInputDevice8W *device, HANDLE file, DWO
.
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
,
...
...
@@ -5683,14 +5675,6 @@ static void test_windows_gaming_input(void)
.
report_len
=
10
,
.
report_buf
=
{
7
,
0x01
,
0x10
,
0x27
,
0x00
,
0x00
,
0x70
,
0xff
,
0xe8
,
0x03
},
},
/* set envelope (wine) */
{
.
code
=
IOCTL_HID_WRITE_REPORT
,
.
report_id
=
8
,
.
report_len
=
8
,
.
report_buf
=
{
8
,
0x01
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
},
.
todo
=
TRUE
,
.
wine_only
=
TRUE
,
},
/* update effect */
{
.
code
=
IOCTL_HID_WRITE_REPORT
,
...
...
@@ -5822,14 +5806,6 @@ static void test_windows_gaming_input(void)
.
report_len
=
4
,
.
report_buf
=
{
9
,
0x01
,
0x18
,
0xfc
},
},
/* set envelope (wine) */
{
.
code
=
IOCTL_HID_WRITE_REPORT
,
.
report_id
=
8
,
.
report_len
=
8
,
.
report_buf
=
{
8
,
0x01
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
},
.
todo
=
TRUE
,
.
wine_only
=
TRUE
,
},
/* update effect (wine) */
{
.
code
=
IOCTL_HID_WRITE_REPORT
,
...
...
@@ -5908,14 +5884,6 @@ static void test_windows_gaming_input(void)
.
report_len
=
6
,
.
report_buf
=
{
10
,
0x01
,
0xe8
,
0x03
,
0xa0
,
0x0f
},
},
/* set envelope (wine) */
{
.
code
=
IOCTL_HID_WRITE_REPORT
,
.
report_id
=
8
,
.
report_len
=
8
,
.
report_buf
=
{
8
,
0x01
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
},
.
todo
=
TRUE
,
.
wine_only
=
TRUE
,
},
/* update effect (wine) */
{
.
code
=
IOCTL_HID_WRITE_REPORT
,
...
...
@@ -5956,14 +5924,6 @@ static void test_windows_gaming_input(void)
.
report_len
=
6
,
.
report_buf
=
{
10
,
0x01
,
0x18
,
0xfc
,
0x60
,
0xf0
},
},
/* set envelope (wine) */
{
.
code
=
IOCTL_HID_WRITE_REPORT
,
.
report_id
=
8
,
.
report_len
=
8
,
.
report_buf
=
{
8
,
0x01
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
},
.
todo
=
TRUE
,
.
wine_only
=
TRUE
,
},
/* update effect (wine) */
{
.
code
=
IOCTL_HID_WRITE_REPORT
,
...
...
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