dinput: Make _dump_cooperativelevel_DI() and _dump_EnumDevices_dwFlags() more self-contained.

This commit is contained in:
Francois Gouget 2007-12-18 10:01:51 +01:00 committed by Alexandre Julliard
parent 745bd4f233
commit 96d6a25fa1
2 changed files with 5 additions and 3 deletions

View File

@ -59,6 +59,7 @@ void _dump_cooperativelevel_DI(DWORD dwFlags) {
FE(DISCL_NOWINKEY) FE(DISCL_NOWINKEY)
#undef FE #undef FE
}; };
TRACE(" cooperative level : ");
for (i = 0; i < (sizeof(flags) / sizeof(flags[0])); i++) for (i = 0; i < (sizeof(flags) / sizeof(flags[0])); i++)
if (flags[i].mask & dwFlags) if (flags[i].mask & dwFlags)
TRACE("%s ",flags[i].name); TRACE("%s ",flags[i].name);
@ -675,7 +676,6 @@ HRESULT WINAPI IDirectInputDevice2AImpl_SetCooperativeLevel(
IDirectInputDevice2AImpl *This = (IDirectInputDevice2AImpl *)iface; IDirectInputDevice2AImpl *This = (IDirectInputDevice2AImpl *)iface;
TRACE("(%p) %p,0x%08x\n", This, hwnd, dwflags); TRACE("(%p) %p,0x%08x\n", This, hwnd, dwflags);
TRACE(" cooperative level : ");
_dump_cooperativelevel_DI(dwflags); _dump_cooperativelevel_DI(dwflags);
if ((dwflags & (DISCL_EXCLUSIVE | DISCL_NONEXCLUSIVE)) == 0 || if ((dwflags & (DISCL_EXCLUSIVE | DISCL_NONEXCLUSIVE)) == 0 ||

View File

@ -198,6 +198,7 @@ static void _dump_EnumDevices_dwFlags(DWORD dwFlags) {
FE(DIEDFL_INCLUDEPHANTOMS) FE(DIEDFL_INCLUDEPHANTOMS)
#undef FE #undef FE
}; };
TRACE(" flags: ");
if (dwFlags == 0) { if (dwFlags == 0) {
TRACE("DIEDFL_ALLDEVICES"); TRACE("DIEDFL_ALLDEVICES");
return; return;
@ -206,6 +207,7 @@ static void _dump_EnumDevices_dwFlags(DWORD dwFlags) {
if (flags[i].mask & dwFlags) if (flags[i].mask & dwFlags)
TRACE("%s ",flags[i].name); TRACE("%s ",flags[i].name);
} }
TRACE("\n");
} }
/****************************************************************************** /******************************************************************************
@ -222,7 +224,7 @@ static HRESULT WINAPI IDirectInputAImpl_EnumDevices(
TRACE("(this=%p,0x%04x '%s',%p,%p,%04x)\n", TRACE("(this=%p,0x%04x '%s',%p,%p,%04x)\n",
This, dwDevType, _dump_DIDEVTYPE_value(dwDevType), This, dwDevType, _dump_DIDEVTYPE_value(dwDevType),
lpCallback, pvRef, dwFlags); lpCallback, pvRef, dwFlags);
TRACE(" flags: "); _dump_EnumDevices_dwFlags(dwFlags); TRACE("\n"); _dump_EnumDevices_dwFlags(dwFlags);
for (i = 0; i < NB_DINPUT_DEVICES; i++) { for (i = 0; i < NB_DINPUT_DEVICES; i++) {
if (!dinput_devices[i]->enum_deviceA) continue; if (!dinput_devices[i]->enum_deviceA) continue;
@ -252,7 +254,7 @@ static HRESULT WINAPI IDirectInputWImpl_EnumDevices(
TRACE("(this=%p,0x%04x '%s',%p,%p,%04x)\n", TRACE("(this=%p,0x%04x '%s',%p,%p,%04x)\n",
This, dwDevType, _dump_DIDEVTYPE_value(dwDevType), This, dwDevType, _dump_DIDEVTYPE_value(dwDevType),
lpCallback, pvRef, dwFlags); lpCallback, pvRef, dwFlags);
TRACE(" flags: "); _dump_EnumDevices_dwFlags(dwFlags); TRACE("\n"); _dump_EnumDevices_dwFlags(dwFlags);
for (i = 0; i < NB_DINPUT_DEVICES; i++) { for (i = 0; i < NB_DINPUT_DEVICES; i++) {
if (!dinput_devices[i]->enum_deviceW) continue; if (!dinput_devices[i]->enum_deviceW) continue;