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

dinput: Trace formats in (Build|Set)ActionMap and EnumDevicesBySemantics.

parent 8e63f68f
......@@ -1815,7 +1815,7 @@ static HRESULT WINAPI dinput_device_BuildActionMap( IDirectInputDevice8W *iface,
BOOL load_success = FALSE;
BOOL *mapped;
FIXME( "iface %p, format %p, username %s, flags %#lx stub!\n", iface, format,
TRACE( "iface %p, format %p, username %s, flags %#lx\n", iface, format,
debugstr_w(username), flags );
if (!format) return DIERR_INVALIDPARAM;
......@@ -1825,6 +1825,16 @@ static HRESULT WINAPI dinput_device_BuildActionMap( IDirectInputDevice8W *iface,
if (format->dwNumActions * 4 != format->dwDataSize)
return DIERR_INVALIDPARAM;
TRACE( "format guid %s, genre %#lx, name %s\n", debugstr_guid(&format->guidActionMap),
format->dwGenre, debugstr_w(format->tszActionMap) );
for (i = 0; i < format->dwNumActions; i++)
{
DIACTIONW *action = format->rgoAction + i;
TRACE( " %lu: app_data %#Ix, semantic %#lx, flags %#lx, instance %s, obj_id %#lx, how %#lx, name %s\n",
i, action->uAppData, action->dwSemantic, action->dwFlags, debugstr_guid(&action->guidInstance),
action->dwObjID, action->dwHow, debugstr_w(action->lptszActionName) );
}
action_end = format->rgoAction + format->dwNumActions;
for (action = format->rgoAction; action < action_end; action++)
{
......@@ -1968,12 +1978,22 @@ static HRESULT WINAPI dinput_device_SetActionMap( IDirectInputDevice8W *iface, D
int i, index;
HRESULT hr;
FIXME( "iface %p, format %p, username %s, flags %#lx stub!\n", iface, format,
TRACE( "iface %p, format %p, username %s, flags %#lx\n", iface, format,
debugstr_w(username), flags );
if (!format) return DIERR_INVALIDPARAM;
if (flags != DIDSAM_DEFAULT && flags != DIDSAM_FORCESAVE && flags != DIDSAM_NOUSER) return DIERR_INVALIDPARAM;
TRACE( "format guid %s, genre %#lx, name %s\n", debugstr_guid(&format->guidActionMap),
format->dwGenre, debugstr_w(format->tszActionMap) );
for (i = 0; i < format->dwNumActions; i++)
{
DIACTIONW *action = format->rgoAction + i;
TRACE( " %u: app_data %#Ix, semantic %#lx, flags %#lx, instance %s, obj_id %#lx, how %#lx, name %s\n",
i, action->uAppData, action->dwSemantic, action->dwFlags, debugstr_guid(&action->guidInstance),
action->dwObjID, action->dwHow, debugstr_w(action->lptszActionName) );
}
if (!(data_format.rgodf = malloc( sizeof(DIOBJECTDATAFORMAT) * format->dwNumActions ))) return DIERR_OUTOFMEMORY;
data_format.dwDataSize = format->dwDataSize;
......
......@@ -519,6 +519,18 @@ static HRESULT WINAPI dinput8_EnumDevicesBySemantics( IDirectInput8W *iface, con
FIXME( "iface %p, username %s, action_format %p, callback %p, context %p, flags %#lx stub!\n",
iface, debugstr_w(username), action_format, callback, context, flags );
if (!action_format) return DIERR_INVALIDPARAM;
TRACE( "format guid %s, genre %#lx, name %s\n", debugstr_guid(&action_format->guidActionMap),
action_format->dwGenre, debugstr_w(action_format->tszActionMap) );
for (i = 0; i < action_format->dwNumActions; i++)
{
DIACTIONW *action = action_format->rgoAction + i;
TRACE( " %u: app_data %#Ix, semantic %#lx, flags %#lx, instance %s, obj_id %#lx, how %#lx, name %s\n",
i, action->uAppData, action->dwSemantic, action->dwFlags, debugstr_guid(&action->guidInstance),
action->dwObjID, action->dwHow, debugstr_w(action->lptszActionName) );
}
didevi.dwSize = sizeof(didevi);
hr = IDirectInput8_EnumDevices( &impl->IDirectInput8W_iface, DI8DEVCLASS_GAMECTRL,
......
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