dinput: Assign button GUID to joystick buttons.

This commit is contained in:
Vitaliy Margolen 2008-04-12 11:33:04 -06:00 committed by Alexandre Julliard
parent 2e80f11c5e
commit b9801bba31
2 changed files with 3 additions and 1 deletions

View File

@ -471,6 +471,7 @@ static HRESULT alloc_device(REFGUID rguid, const void *jvt, IDirectInputImpl *di
for (i = 0; i < newDevice->buttons; i++)
{
memcpy(&df->rgodf[idx], &c_dfDIJoystick2.rgodf[i + 12], df->dwObjSize);
df->rgodf[idx ].pguid = &GUID_Button;
df->rgodf[idx++].dwType = DIDFT_MAKEINSTANCE(i) | DIDFT_PSHBUTTON;
}
newDevice->base.data_format.wine_df = df;

View File

@ -498,6 +498,7 @@ static JoystickImpl *alloc_device(REFGUID rguid, const void *jvt, IDirectInputIm
memcpy(&df->rgodf[idx], &c_dfDIJoystick2.rgodf[newDevice->numButtons + WINE_JOYSTICK_MAX_AXES + WINE_JOYSTICK_MAX_POVS], df->dwObjSize);
newDevice->buttons[i] = 0x80 | newDevice->numButtons;
df->rgodf[idx ].pguid = &GUID_Button;
df->rgodf[idx++].dwType = DIDFT_MAKEINSTANCE(newDevice->numButtons++) | DIDFT_PSHBUTTON;
}
df->dwNumObjs = idx;