Module: wine Branch: master Commit: f2fa2448aa946e79431a965b3a9608a35ce48f10 URL: http://source.winehq.org/git/wine.git/?a=commit;h=f2fa2448aa946e79431a965b3a...
Author: Bruno Jesus 00cpxxx@gmail.com Date: Mon Aug 15 19:11:38 2016 -0300
winmm/tests: Enumerate all joystick devices during the test.
Signed-off-by: Bruno Jesus 00cpxxx@gmail.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/winmm/tests/joystick.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/winmm/tests/joystick.c b/dlls/winmm/tests/joystick.c index 2f230f5..5714001 100644 --- a/dlls/winmm/tests/joystick.c +++ b/dlls/winmm/tests/joystick.c @@ -82,7 +82,9 @@ static void test_api(void) ret = joyGetDevCapsA(JOYSTICKID1 + i, &jc, sizeof(jc)); if (ret == JOYERR_NOERROR) { - joyid = JOYSTICKID1 + i; + if (joyid == -1) /* Cache the first found joystick to run advanced tests below */ + joyid = JOYSTICKID1 + i; + trace("Joystick[%d] - name: '%s', axes: %d, buttons: %d, period range: %d - %d\n", JOYSTICKID1 + i, jc.szPname, jc.wNumAxes, jc.wNumButtons, jc.wPeriodMin, jc.wPeriodMax); ret = joyGetDevCapsW(JOYSTICKID1 + i, &jcw, sizeof(jcw)); @@ -93,7 +95,6 @@ static void test_api(void) ok(jc.wNumButtons == jcw.wNumButtons, "Expected %d == %d\n", jc.wNumButtons, jcw.wNumButtons); } else win98++; - break; } else {