[PATCH 1/5] windows.gaming.input: Set get_AreEffectsPaused value to FALSE when dinput fails.

Rémi Bernon wine at gitlab.winehq.org
Wed May 4 04:34:00 CDT 2022


From: Rémi Bernon <rbernon at codeweavers.com>

Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
---
 dlls/windows.gaming.input/force_feedback.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/dlls/windows.gaming.input/force_feedback.c b/dlls/windows.gaming.input/force_feedback.c
index a9a875c48e3..24810d1d787 100644
--- a/dlls/windows.gaming.input/force_feedback.c
+++ b/dlls/windows.gaming.input/force_feedback.c
@@ -111,11 +111,10 @@ static HRESULT WINAPI motor_get_AreEffectsPaused( IForceFeedbackMotor *iface, BO
 
     TRACE( "iface %p, value %p.\n", iface, value );
 
-    if (FAILED(hr = IDirectInputDevice8_GetForceFeedbackState( impl->device, &state )))
-        return hr;
+    if (FAILED(hr = IDirectInputDevice8_GetForceFeedbackState( impl->device, &state ))) *value = FALSE;
+    else *value = (state & DIGFFS_PAUSED);
 
-    *value = (state & DIGFFS_PAUSED);
-    return S_OK;
+    return hr;
 }
 
 static HRESULT WINAPI motor_get_MasterGain( IForceFeedbackMotor *iface, double *value )
-- 
GitLab


https://gitlab.winehq.org/wine/wine/-/merge_requests/33



More information about the wine-devel mailing list