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

Zebediah Figura zfigura at codeweavers.com
Mon May 2 16:48:42 CDT 2022


Fixes an intermittent test failure.

Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
---
 dlls/dinput/tests/hotplug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;
 }
-- 
2.35.1




More information about the wine-devel mailing list