Rémi Bernon : hidclass.sys: Dump HID descriptor with 16 byte columns.

Alexandre Julliard julliard at winehq.org
Tue Jun 8 16:34:26 CDT 2021


Module: wine
Branch: master
Commit: 9f2518b47c5248804d43db63c64a4ec72dce59f5
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=9f2518b47c5248804d43db63c64a4ec72dce59f5

Author: Rémi Bernon <rbernon at codeweavers.com>
Date:   Tue Jun  8 09:26:36 2021 +0200

hidclass.sys: Dump HID descriptor with 16 byte columns.

Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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);




More information about the wine-cvs mailing list