dinput: DPRINTF -> TRACE.

This commit is contained in:
Andrew Riedi 2007-12-11 23:48:31 -08:00 committed by Alexandre Julliard
parent 19888da21d
commit e0740a7a60
3 changed files with 27 additions and 31 deletions

View File

@ -61,8 +61,8 @@ void _dump_cooperativelevel_DI(DWORD dwFlags) {
};
for (i = 0; i < (sizeof(flags) / sizeof(flags[0])); i++)
if (flags[i].mask & dwFlags)
DPRINTF("%s ",flags[i].name);
DPRINTF("\n");
TRACE("%s ",flags[i].name);
TRACE("\n");
}
}
@ -92,33 +92,33 @@ void _dump_EnumObjects_flags(DWORD dwFlags) {
};
type = (dwFlags & 0xFF0000FF);
instance = ((dwFlags >> 8) & 0xFFFF);
DPRINTF("Type:");
TRACE("Type:");
if (type == DIDFT_ALL) {
DPRINTF(" DIDFT_ALL");
TRACE(" DIDFT_ALL");
} else {
for (i = 0; i < (sizeof(flags) / sizeof(flags[0])); i++) {
if (flags[i].mask & type) {
type &= ~flags[i].mask;
DPRINTF(" %s",flags[i].name);
TRACE(" %s",flags[i].name);
}
}
if (type) {
DPRINTF(" (unhandled: %08x)", type);
TRACE(" (unhandled: %08x)", type);
}
}
DPRINTF(" / Instance: ");
TRACE(" / Instance: ");
if (instance == ((DIDFT_ANYINSTANCE >> 8) & 0xFFFF)) {
DPRINTF("DIDFT_ANYINSTANCE");
TRACE("DIDFT_ANYINSTANCE");
} else {
DPRINTF("%3d", instance);
TRACE("%3d", instance);
}
}
}
void _dump_DIPROPHEADER(LPCDIPROPHEADER diph) {
if (TRACE_ON(dinput)) {
DPRINTF(" - dwObj = 0x%08x\n", diph->dwObj);
DPRINTF(" - dwHow = %s\n",
TRACE(" - dwObj = 0x%08x\n", diph->dwObj);
TRACE(" - dwHow = %s\n",
((diph->dwHow == DIPH_DEVICE) ? "DIPH_DEVICE" :
((diph->dwHow == DIPH_BYOFFSET) ? "DIPH_BYOFFSET" :
((diph->dwHow == DIPH_BYID)) ? "DIPH_BYID" : "unknown")));
@ -126,17 +126,13 @@ void _dump_DIPROPHEADER(LPCDIPROPHEADER diph) {
}
void _dump_OBJECTINSTANCEA(const DIDEVICEOBJECTINSTANCEA *ddoi) {
if (TRACE_ON(dinput)) {
DPRINTF(" - enumerating : %s ('%s') - %2d - 0x%08x - %s\n",
TRACE(" - enumerating : %s ('%s') - %2d - 0x%08x - %s\n",
debugstr_guid(&ddoi->guidType), _dump_dinput_GUID(&ddoi->guidType), ddoi->dwOfs, ddoi->dwType, ddoi->tszName);
}
}
void _dump_OBJECTINSTANCEW(const DIDEVICEOBJECTINSTANCEW *ddoi) {
if (TRACE_ON(dinput)) {
DPRINTF(" - enumerating : %s ('%s'), - %2d - 0x%08x - %s\n",
TRACE(" - enumerating : %s ('%s'), - %2d - 0x%08x - %s\n",
debugstr_guid(&ddoi->guidType), _dump_dinput_GUID(&ddoi->guidType), ddoi->dwOfs, ddoi->dwType, debugstr_w(ddoi->tszName));
}
}
/* This function is a helper to convert a GUID into any possible DInput GUID out there */

View File

@ -199,12 +199,12 @@ static void _dump_EnumDevices_dwFlags(DWORD dwFlags) {
#undef FE
};
if (dwFlags == 0) {
DPRINTF("DIEDFL_ALLDEVICES");
TRACE("DIEDFL_ALLDEVICES");
return;
}
for (i = 0; i < (sizeof(flags) / sizeof(flags[0])); i++)
if (flags[i].mask & dwFlags)
DPRINTF("%s ",flags[i].name);
TRACE("%s ",flags[i].name);
}
}

View File

@ -113,8 +113,8 @@ static void _dump_DIEFFECT_flags(DWORD dwFlags)
};
for (i = 0; i < (sizeof(flags) / sizeof(flags[0])); i++)
if (flags[i].mask & dwFlags)
DPRINTF("%s ", flags[i].name);
DPRINTF("\n");
TRACE("%s ", flags[i].name);
TRACE("\n");
}
}
@ -160,11 +160,11 @@ static void _dump_DICUSTOMFORCE(LPCDICUSTOMFORCE frc)
if (frc->cSamples % frc->cChannels != 0)
WARN("Custom force has a non-integral samples-per-channel count!\n");
if (TRACE_ON(dinput)) {
DPRINTF("Custom force data (time aligned, axes in order):\n");
TRACE("Custom force data (time aligned, axes in order):\n");
for (i = 1; i <= frc->cSamples; ++i) {
DPRINTF("%d ", frc->rglForceData[i]);
TRACE("%d ", frc->rglForceData[i]);
if (i % frc->cChannels == 0)
DPRINTF("\n");
TRACE("\n");
}
}
}
@ -194,8 +194,8 @@ static void _dump_DIEFFECT(LPCDIEFFECT eff, REFGUID guid)
if (TRACE_ON(dinput)) {
TRACE(" ");
for (i = 0; i < eff->cAxes; ++i)
DPRINTF("%d ", eff->rgdwAxes[i]);
DPRINTF("\n");
TRACE("%d ", eff->rgdwAxes[i]);
TRACE("\n");
}
TRACE(" - rglDirection: %p\n", eff->rglDirection);
TRACE(" - lpEnvelope: %p\n", eff->lpEnvelope);