Andrew Riedi : dinput: DPRINTF -> TRACE.
Alexandre Julliard
julliard at winehq.org
Wed Dec 12 09:29:19 CST 2007
Module: wine
Branch: master
Commit: e0740a7a60f60c8f292f3aa68fffe468680d4082
URL: http://source.winehq.org/git/wine.git/?a=commit;h=e0740a7a60f60c8f292f3aa68fffe468680d4082
Author: Andrew Riedi <andrewriedi at gmail.com>
Date: Tue Dec 11 23:48:31 2007 -0800
dinput: DPRINTF -> TRACE.
---
dlls/dinput/device.c | 40 +++++++++++++++++---------------------
dlls/dinput/dinput_main.c | 4 +-
dlls/dinput/effect_linuxinput.c | 14 ++++++------
3 files changed, 27 insertions(+), 31 deletions(-)
diff --git a/dlls/dinput/device.c b/dlls/dinput/device.c
index 5127aa9..d1e6ac8 100644
--- a/dlls/dinput/device.c
+++ b/dlls/dinput/device.c
@@ -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,51 +92,47 @@ 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",
- ((diph->dwHow == DIPH_DEVICE) ? "DIPH_DEVICE" :
- ((diph->dwHow == DIPH_BYOFFSET) ? "DIPH_BYOFFSET" :
- ((diph->dwHow == DIPH_BYID)) ? "DIPH_BYID" : "unknown")));
+ 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")));
}
}
void _dump_OBJECTINSTANCEA(const DIDEVICEOBJECTINSTANCEA *ddoi) {
- if (TRACE_ON(dinput)) {
- DPRINTF(" - enumerating : %s ('%s') - %2d - 0x%08x - %s\n",
- debugstr_guid(&ddoi->guidType), _dump_dinput_GUID(&ddoi->guidType), ddoi->dwOfs, ddoi->dwType, ddoi->tszName);
- }
+ 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",
- debugstr_guid(&ddoi->guidType), _dump_dinput_GUID(&ddoi->guidType), ddoi->dwOfs, ddoi->dwType, debugstr_w(ddoi->tszName));
- }
+ 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 */
diff --git a/dlls/dinput/dinput_main.c b/dlls/dinput/dinput_main.c
index 2e12bc1..c3d41fd 100644
--- a/dlls/dinput/dinput_main.c
+++ b/dlls/dinput/dinput_main.c
@@ -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);
}
}
diff --git a/dlls/dinput/effect_linuxinput.c b/dlls/dinput/effect_linuxinput.c
index 37af31f..6cc5ad2 100644
--- a/dlls/dinput/effect_linuxinput.c
+++ b/dlls/dinput/effect_linuxinput.c
@@ -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);
More information about the wine-cvs
mailing list