Paul Vriens : xinput1_3/tests: Call FreeLibrary() after tests.

Alexandre Julliard julliard at winehq.org
Tue Dec 16 08:40:32 CST 2008


Module: wine
Branch: master
Commit: 99eaf51bb72d8c92daa9c03fb471b68c3155b6bc
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=99eaf51bb72d8c92daa9c03fb471b68c3155b6bc

Author: Paul Vriens <Paul.Vriens.Wine at gmail.com>
Date:   Mon Dec 15 14:50:06 2008 +0100

xinput1_3/tests: Call FreeLibrary() after tests.

---

 dlls/xinput1_3/tests/xinput.c |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/dlls/xinput1_3/tests/xinput.c b/dlls/xinput1_3/tests/xinput.c
index ffc0d33..1125dcc 100644
--- a/dlls/xinput1_3/tests/xinput.c
+++ b/dlls/xinput1_3/tests/xinput.c
@@ -94,15 +94,15 @@ START_TEST(xinput)
     HMODULE hXinput;
     hXinput = LoadLibraryA( "xinput1_3.dll" );
 
-    if (hXinput)
+    if (!hXinput)
     {
-        pXInputGetState = (void*)GetProcAddress(hXinput, "XInputGetState");
-        pXInputGetCapabilities = (void*)GetProcAddress(hXinput, "XInputGetCapabilities");
-        test_get_state();
-        test_get_capabilities();
-    }
-    else
-    {
-        skip("Could not load xinput1_3.dll\n");
+        win_skip("Could not load xinput1_3.dll\n");
+        return;
     }
+
+    pXInputGetState = (void*)GetProcAddress(hXinput, "XInputGetState");
+    pXInputGetCapabilities = (void*)GetProcAddress(hXinput, "XInputGetCapabilities");
+    test_get_state();
+    test_get_capabilities();
+    FreeLibrary(hXinput);
 }




More information about the wine-cvs mailing list