Commit 5b648e7e authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

dinput: Reset action map mapping before loading the registry mapping.

parent b95c8205
......@@ -1850,6 +1850,8 @@ static HRESULT WINAPI dinput_device_BuildActionMap( IDirectInputDevice8W *iface,
!IsEqualCLSID( &action->guidInstance, &impl->guid )) continue;
if (action->dwFlags & DIA_APPMAPPED) action->dwHow = DIAH_APPREQUESTED;
else action->dwHow = 0;
if (action->dwHow == DIAH_APPREQUESTED || action->dwHow == DIAH_USERCONFIG) continue;
if (!(action->dwFlags & DIA_APPNOMAP)) action->guidInstance = GUID_NULL;
}
/* Unless asked the contrary by these flags, try to load a previous mapping */
......@@ -1861,17 +1863,6 @@ static HRESULT WINAPI dinput_device_BuildActionMap( IDirectInputDevice8W *iface,
load_mapping_settings( impl, format, username_buf );
}
action_end = format->rgoAction + format->dwNumActions;
for (action = format->rgoAction; action < action_end; action++)
{
if (action->dwHow == DIAH_APPREQUESTED || action->dwHow == DIAH_USERCONFIG) continue;
if (flags == DIDBAM_PRESERVE && !IsEqualCLSID( &action->guidInstance, &GUID_NULL ) &&
!IsEqualCLSID( &action->guidInstance, &impl->guid )) continue;
if (action->dwFlags & DIA_APPNOMAP) continue;
action->guidInstance = GUID_NULL;
action->dwHow = 0;
}
if (!(mapped = calloc( impl->device_format.dwNumObjs, sizeof(*mapped) ))) return DIERR_OUTOFMEMORY;
action_end = format->rgoAction + format->dwNumActions;
......
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