dinput: Also trace report buffers on immediate ReadFile success.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Rémi Bernon 2022-02-18 10:31:13 +01:00 committed by Alexandre Julliard
parent a9b3adaac0
commit f6ef943b9c
1 changed files with 13 additions and 14 deletions

View File

@ -1226,24 +1226,23 @@ static HRESULT hid_joystick_read( IDirectInputDevice8W *iface )
BOOL ret;
ret = GetOverlappedResult( impl->device, &impl->read_ovl, &count, FALSE );
if (ret && TRACE_ON(dinput))
{
TRACE( "read size %lu report:\n", count );
for (i = 0; i < count;)
{
char buffer[256], *buf = buffer;
buf += sprintf(buf, "%08lx ", i);
do
{
buf += sprintf(buf, " %02x", (BYTE)report_buf[i] );
} while (++i % 16 && i < count);
TRACE("%s\n", buffer);
}
}
EnterCriticalSection( &impl->base.crit );
while (ret)
{
if (TRACE_ON(dinput))
{
TRACE( "iface %p, size %lu, report:\n", iface, count );
for (i = 0; i < count;)
{
char buffer[256], *buf = buffer;
buf += sprintf(buf, "%08lx ", i);
do { buf += sprintf(buf, " %02x", (BYTE)report_buf[i] ); }
while (++i % 16 && i < count);
TRACE("%s\n", buffer);
}
}
count = impl->usages_count;
memset( impl->usages_buf, 0, count * sizeof(*impl->usages_buf) );
status = HidP_GetUsagesEx( HidP_Input, 0, impl->usages_buf, &count,