Bruno Jesus : dinput: DISFFC_RESET will not release the effects.
Alexandre Julliard
julliard at winehq.org
Thu Apr 20 12:35:10 CDT 2017
Module: wine
Branch: stable
Commit: 2b3c631b2e8ac0d843e31198836aa32a443b5bb4
URL: http://source.winehq.org/git/wine.git/?a=commit;h=2b3c631b2e8ac0d843e31198836aa32a443b5bb4
Author: Bruno Jesus <00cpxxx at gmail.com>
Date: Thu Jan 26 17:07:03 2017 -0200
dinput: DISFFC_RESET will not release the effects.
Signed-off-by: Bruno Jesus <00cpxxx at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
(cherry picked from commit 27f456844b8195dac09bfce0c4cc906236462a60)
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
---
dlls/dinput/joystick_linuxinput.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/dlls/dinput/joystick_linuxinput.c b/dlls/dinput/joystick_linuxinput.c
index 911700b..9b99b36 100644
--- a/dlls/dinput/joystick_linuxinput.c
+++ b/dlls/dinput/joystick_linuxinput.c
@@ -1331,9 +1331,9 @@ static HRESULT WINAPI JoystickWImpl_SendForceFeedbackCommand(LPDIRECTINPUTDEVICE
{
case DISFFC_STOPALL:
{
- /* Stop all effects */
effect_list_item *itr;
+ /* Stop all effects */
LIST_FOR_EACH_ENTRY(itr, &This->ff_effects, effect_list_item, entry)
IDirectInputEffect_Stop(itr->ref);
break;
@@ -1341,12 +1341,14 @@ static HRESULT WINAPI JoystickWImpl_SendForceFeedbackCommand(LPDIRECTINPUTDEVICE
case DISFFC_RESET:
{
- effect_list_item *itr, *ptr;
+ effect_list_item *itr;
- /* Stop, unload, release and free all effects */
- /* This returns the device to its "bare" state */
- LIST_FOR_EACH_ENTRY_SAFE(itr, ptr, &This->ff_effects, effect_list_item, entry)
- IDirectInputEffect_Release(itr->ref);
+ /* Stop and unload all effects. It is not true that effects are released */
+ LIST_FOR_EACH_ENTRY(itr, &This->ff_effects, effect_list_item, entry)
+ {
+ IDirectInputEffect_Stop(itr->ref);
+ IDirectInputEffect_Unload(itr->ref);
+ }
break;
}
case DISFFC_PAUSE:
More information about the wine-cvs
mailing list