From 9f2518b47c5248804d43db63c64a4ec72dce59f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Bernon?= Date: Tue, 8 Jun 2021 09:26:36 +0200 Subject: [PATCH] hidclass.sys: Dump HID descriptor with 16 byte columns. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: RĂ©mi Bernon Signed-off-by: Alexandre Julliard --- dlls/hidclass.sys/descriptor.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/dlls/hidclass.sys/descriptor.c b/dlls/hidclass.sys/descriptor.c index 1c988d89719..65c2f9aadae 100644 --- a/dlls/hidclass.sys/descriptor.c +++ b/dlls/hidclass.sys/descriptor.c @@ -789,6 +789,7 @@ WINE_HIDP_PREPARSED_DATA* ParseDescriptor(BYTE *descriptor, unsigned int length) WINE_HIDP_PREPARSED_DATA *data = NULL; struct collection *base; HIDP_VALUE_CAPS caps; + int i; struct list caps_stack; @@ -797,14 +798,13 @@ WINE_HIDP_PREPARSED_DATA* ParseDescriptor(BYTE *descriptor, unsigned int length) if (TRACE_ON(hid)) { - TRACE("Descriptor[%i]: ", length); - for (cidx = 0; cidx < length; cidx++) + TRACE("descriptor %p, length %u:\n", descriptor, length); + for (i = 0; i < length;) { - TRACE("%x ",descriptor[cidx]); - if ((cidx+1) % 80 == 0) - TRACE("\n"); + TRACE("%08x ", i); + do { TRACE(" %02x", descriptor[i]); } while (++i % 16 && i < length); + TRACE("\n"); } - TRACE("\n"); } list_init(&caps_stack);