Bruno Jesus : xinput1_3/tests: Cope with XInputGetStateEx not being present by name.

Alexandre Julliard julliard at winehq.org
Fri Sep 2 11:41:43 CDT 2016


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

Author: Bruno Jesus <00cpxxx at gmail.com>
Date:   Thu Sep  1 16:26:12 2016 -0300

xinput1_3/tests: Cope with XInputGetStateEx not being present by name.

Signed-off-by: Bruno Jesus <00cpxxx at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/xinput1_3/tests/xinput.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/dlls/xinput1_3/tests/xinput.c b/dlls/xinput1_3/tests/xinput.c
index 5261425..fadacae 100644
--- a/dlls/xinput1_3/tests/xinput.c
+++ b/dlls/xinput1_3/tests/xinput.c
@@ -238,10 +238,10 @@ START_TEST(xinput)
     pXInputGetDSoundAudioDeviceGuids = (void*)GetProcAddress(hXinput, "XInputGetDSoundAudioDeviceGuids");
     pXInputGetBatteryInformation = (void*)GetProcAddress(hXinput, "XInputGetBatteryInformation");
 
-    if (pXInputGetStateEx_Ordinal)
-        ok (pXInputGetStateEx_Ordinal == pXInputGetStateEx, "XInputGetStateEx in the wrong ordinal\n");
-    else
-        ok (broken(1), "XInputGetStateEx not found in this dll version\n");
+    /* XInputGetStateEx may not be present by name, use ordinal in this case */
+    if (!pXInputGetStateEx)
+        pXInputGetStateEx = pXInputGetStateEx_Ordinal;
+    ok (pXInputGetStateEx != NULL, "XInputGetStateEx not found in this dll version\n");
 
     test_set_state();
     test_get_state();




More information about the wine-cvs mailing list