dinput: Make EnumDevices and GetObjectInfo consistent about GUIDs.

guidInstance should be the same from both places.
This commit is contained in:
Vitaliy Margolen 2009-04-19 20:33:22 -06:00 committed by Alexandre Julliard
parent 90d3163aba
commit fc4f1607a6
4 changed files with 7 additions and 2 deletions

View File

@ -332,7 +332,7 @@ HRESULT WINAPI JoystickAGenericImpl_GetDeviceInfo(
}
/* Return joystick */
pdidi->guidInstance = GUID_Joystick;
pdidi->guidInstance = This->guidInstance;
pdidi->guidProduct = This->guidProduct;
/* we only support traditional joysticks for now */
pdidi->dwDevType = This->devcaps.dwDevType;
@ -365,7 +365,7 @@ HRESULT WINAPI JoystickWGenericImpl_GetDeviceInfo(
}
/* Return joystick */
pdidi->guidInstance = GUID_Joystick;
pdidi->guidInstance = This->guidInstance;
pdidi->guidProduct = This->guidProduct;
/* we only support traditional joysticks for now */
pdidi->dwDevType = This->devcaps.dwDevType;

View File

@ -379,6 +379,8 @@ static HRESULT alloc_device(REFGUID rguid, const void *jvt, IDirectInputImpl *di
return DIERR_DEVICENOTREG;
}
newDevice->generic.guidInstance = DInput_Wine_Joystick_GUID;
newDevice->generic.guidInstance.Data3 = index;
newDevice->generic.guidProduct = DInput_Wine_Joystick_GUID;
newDevice->generic.joy_polldev = joy_polldev;

View File

@ -650,6 +650,8 @@ static HRESULT alloc_device(REFGUID rguid, const void *jvt, IDirectInputImpl *di
newDevice->id = index;
newDevice->generic.guidInstance = DInput_Wine_OsX_Joystick_GUID;
newDevice->generic.guidInstance.Data3 = index;
newDevice->generic.guidProduct = DInput_Wine_OsX_Joystick_GUID;
newDevice->generic.joy_polldev = poll_osx_device_state;

View File

@ -41,6 +41,7 @@ typedef struct JoystickGenericImpl
DIDEVCAPS devcaps;
DIJOYSTATE2 js; /* wine data */
GUID guidProduct;
GUID guidInstance;
char *name;
joy_polldev_handler *joy_polldev;