dinput: In BuildActionMap, don't assign objects to actions mapped by an user.
This commit is contained in:
parent
d175c1526f
commit
4a20339346
|
@ -605,6 +605,9 @@ HRESULT _build_action_map(LPDIRECTINPUTDEVICE8W iface, LPDIACTIONFORMATW lpdiaf,
|
||||||
|
|
||||||
for (i=0; i < lpdiaf->dwNumActions; i++)
|
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)
|
if ((lpdiaf->rgoAction[i].dwSemantic & devMask) == devMask)
|
||||||
{
|
{
|
||||||
DWORD obj_id = semantic_to_obj_id(This, lpdiaf->rgoAction[i].dwSemantic);
|
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 type = 0x000000ff & (lpdiaf->rgoAction[i].dwSemantic >> 8);
|
||||||
DWORD genre = 0xff000000 & lpdiaf->rgoAction[i].dwSemantic;
|
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 */
|
/* Only consider actions of the right genre */
|
||||||
if (lpdiaf->dwGenre != genre && genre != DIGENRE_ANY) continue;
|
if (lpdiaf->dwGenre != genre && genre != DIGENRE_ANY) continue;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue