Module: wine Branch: master Commit: fc4f1607a6928e7fa36140bf6c753a69e96f92b6 URL: http://source.winehq.org/git/wine.git/?a=commit;h=fc4f1607a6928e7fa36140bf6c...
Author: Vitaliy Margolen wine-patches@kievinfo.com Date: Sun Apr 19 20:33:22 2009 -0600
dinput: Make EnumDevices and GetObjectInfo consistent about GUIDs.
guidInstance should be the same from both places.
---
dlls/dinput/joystick.c | 4 ++-- dlls/dinput/joystick_linux.c | 2 ++ dlls/dinput/joystick_osx.c | 2 ++ dlls/dinput/joystick_private.h | 1 + 4 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/dlls/dinput/joystick.c b/dlls/dinput/joystick.c index 6e7e7ef..fbf05ec 100644 --- a/dlls/dinput/joystick.c +++ b/dlls/dinput/joystick.c @@ -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; diff --git a/dlls/dinput/joystick_linux.c b/dlls/dinput/joystick_linux.c index afabebe..fcf1552 100644 --- a/dlls/dinput/joystick_linux.c +++ b/dlls/dinput/joystick_linux.c @@ -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;
diff --git a/dlls/dinput/joystick_osx.c b/dlls/dinput/joystick_osx.c index d5a5f17..7305bb9 100644 --- a/dlls/dinput/joystick_osx.c +++ b/dlls/dinput/joystick_osx.c @@ -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;
diff --git a/dlls/dinput/joystick_private.h b/dlls/dinput/joystick_private.h index b61406f..803e0dd 100644 --- a/dlls/dinput/joystick_private.h +++ b/dlls/dinput/joystick_private.h @@ -41,6 +41,7 @@ typedef struct JoystickGenericImpl DIDEVCAPS devcaps; DIJOYSTATE2 js; /* wine data */ GUID guidProduct; + GUID guidInstance; char *name;
joy_polldev_handler *joy_polldev;