Zebediah Figura : dinput/tests: Set the callback event after setting "impl->invoked".

Alexandre Julliard julliard at winehq.org
Tue May 3 15:39:25 CDT 2022


Module: wine
Branch: master
Commit: 887f6891e736f207956af2b1264559b6406b2967
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=887f6891e736f207956af2b1264559b6406b2967

Author: Zebediah Figura <zfigura at codeweavers.com>
Date:   Mon May  2 16:48:42 2022 -0500

dinput/tests: Set the callback event after setting "impl->invoked".

Fixes an intermittent test failure.

Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/dinput/tests/force_feedback.c | 2 +-
 dlls/dinput/tests/hotplug.c        | 2 +-
 dlls/dinput/tests/joystick8.c      | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/dlls/dinput/tests/force_feedback.c b/dlls/dinput/tests/force_feedback.c
index d9dad38446c..7fadd043656 100644
--- a/dlls/dinput/tests/force_feedback.c
+++ b/dlls/dinput/tests/force_feedback.c
@@ -4437,8 +4437,8 @@ static HRESULT WINAPI controller_handler_Invoke( IEventHandler_RawGameController
     trace( "iface %p, sender %p, controller %p\n", iface, sender, controller );
 
     ok( sender == NULL, "got sender %p\n", sender );
-    SetEvent( impl->event );
     impl->invoked = TRUE;
+    SetEvent( impl->event );
 
     return S_OK;
 }
diff --git a/dlls/dinput/tests/hotplug.c b/dlls/dinput/tests/hotplug.c
index 2d000317c9f..97e9e69fa9f 100644
--- a/dlls/dinput/tests/hotplug.c
+++ b/dlls/dinput/tests/hotplug.c
@@ -526,8 +526,8 @@ static HRESULT WINAPI controller_handler_Invoke( IEventHandler_RawGameController
     trace( "iface %p, sender %p, controller %p\n", iface, sender, controller );
 
     ok( sender == NULL, "got sender %p\n", sender );
-    SetEvent( impl->event );
     impl->invoked = TRUE;
+    SetEvent( impl->event );
 
     return S_OK;
 }
diff --git a/dlls/dinput/tests/joystick8.c b/dlls/dinput/tests/joystick8.c
index 32d03a603c3..890209cd5e0 100644
--- a/dlls/dinput/tests/joystick8.c
+++ b/dlls/dinput/tests/joystick8.c
@@ -3845,8 +3845,8 @@ static HRESULT WINAPI controller_handler_Invoke( IEventHandler_RawGameController
     trace( "iface %p, sender %p, controller %p\n", iface, sender, controller );
 
     ok( sender == NULL, "got sender %p\n", sender );
-    SetEvent( impl->event );
     impl->invoked = TRUE;
+    SetEvent( impl->event );
 
     return S_OK;
 }




More information about the wine-cvs mailing list