dinput: Make EnumDevices and GetObjectInfo consistent about GUIDs.
guidInstance should be the same from both places.
This commit is contained in:
parent
90d3163aba
commit
fc4f1607a6
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -41,6 +41,7 @@ typedef struct JoystickGenericImpl
|
|||
DIDEVCAPS devcaps;
|
||||
DIJOYSTATE2 js; /* wine data */
|
||||
GUID guidProduct;
|
||||
GUID guidInstance;
|
||||
char *name;
|
||||
|
||||
joy_polldev_handler *joy_polldev;
|
||||
|
|
Loading…
Reference in New Issue