Module: wine Branch: master Commit: 573e8bada9054cc92dfcf184343ecb814ff939cd URL: https://source.winehq.org/git/wine.git/?a=commit;h=573e8bada9054cc92dfcf1843...
Author: Rémi Bernon rbernon@codeweavers.com Date: Mon Jun 7 11:06:56 2021 +0200
hid/tests: Don't print buttons after HidP_GetUsages failed.
Signed-off-by: Rémi Bernon rbernon@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/hid/tests/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/hid/tests/device.c b/dlls/hid/tests/device.c index 3dd22b7f068..6693bc8bf5a 100644 --- a/dlls/hid/tests/device.c +++ b/dlls/hid/tests/device.c @@ -215,7 +215,7 @@ static void process_data(HIDP_CAPS Caps, PHIDP_PREPARSED_DATA ppd, CHAR *data, D status = HidP_GetUsages(HidP_Input, i, 0, button_pages, &usage_length, ppd, data, data_length); ok (status == HIDP_STATUS_SUCCESS || usage_length == 0, "HidP_GetUsages failed (%x) but usage length still %i\n", status, usage_length); - if (usage_length) + if (status == HIDP_STATUS_SUCCESS && usage_length) { CHAR report[50]; int count;