Commit cb8bc378 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

dinput: Only dump the HID report data that has been read.

parent 33578878
...@@ -1607,14 +1607,14 @@ static HRESULT hid_joystick_read_state( IDirectInputDevice8W *iface ) ...@@ -1607,14 +1607,14 @@ static HRESULT hid_joystick_read_state( IDirectInputDevice8W *iface )
if (ret && TRACE_ON(dinput)) if (ret && TRACE_ON(dinput))
{ {
TRACE( "read size %u report:\n", count ); TRACE( "read size %u report:\n", count );
for (i = 0; i < report_len;) for (i = 0; i < count;)
{ {
char buffer[256], *buf = buffer; char buffer[256], *buf = buffer;
buf += sprintf(buf, "%08x ", i); buf += sprintf(buf, "%08x ", i);
do do
{ {
buf += sprintf(buf, " %02x", (BYTE)report_buf[i] ); buf += sprintf(buf, " %02x", (BYTE)report_buf[i] );
} while (++i % 16 && i < report_len); } while (++i % 16 && i < count);
TRACE("%s\n", buffer); TRACE("%s\n", buffer);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment