Commit 4a203393 authored by Lucas Fialho Zawacki's avatar Lucas Fialho Zawacki Committed by Alexandre Julliard

dinput: In BuildActionMap, don't assign objects to actions mapped by an user.

parent d175c152
......@@ -605,6 +605,9 @@ HRESULT _build_action_map(LPDIRECTINPUTDEVICE8W iface, LPDIACTIONFORMATW lpdiaf,
for (i=0; i < lpdiaf->dwNumActions; i++)
{
/* Don't touch an user configured action */
if (lpdiaf->rgoAction[i].dwHow == DIAH_USERCONFIG) continue;
if ((lpdiaf->rgoAction[i].dwSemantic & devMask) == devMask)
{
DWORD obj_id = semantic_to_obj_id(This, lpdiaf->rgoAction[i].dwSemantic);
......
......@@ -445,6 +445,9 @@ HRESULT WINAPI JoystickWGenericImpl_BuildActionMap(LPDIRECTINPUTDEVICE8W iface,
DWORD type = 0x000000ff & (lpdiaf->rgoAction[i].dwSemantic >> 8);
DWORD genre = 0xff000000 & lpdiaf->rgoAction[i].dwSemantic;
/* Don't touch an user configured action */
if (lpdiaf->rgoAction[i].dwHow == DIAH_USERCONFIG) continue;
/* Only consider actions of the right genre */
if (lpdiaf->dwGenre != genre && genre != DIGENRE_ANY) continue;
......
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