[PATCH] dinput : use vendor and product ids to generate product GUID like it's done on Windows

Bruno Jesus 00cpxxx at gmail.com
Thu Jul 21 20:06:50 CDT 2016


On Thu, Jul 21, 2016 at 7:08 PM, Corentin Rossignon <corossig at gmail.com> wrote:
> Signed-off-by: Corentin Rossignon <corossig at gmail.com>
> ---
>  dlls/dinput/joystick_linuxinput.c | 16 ++++++++++++++--
>  1 file changed, 14 insertions(+), 2 deletions(-)
>
> diff --git a/dlls/dinput/joystick_linuxinput.c b/dlls/dinput/joystick_linuxinput.c
> index 86f12d0..e5172b6 100644
> --- a/dlls/dinput/joystick_linuxinput.c
> +++ b/dlls/dinput/joystick_linuxinput.c
> @@ -321,13 +321,19 @@ static void find_joydevs(void)
>  static void fill_joystick_dideviceinstanceA(LPDIDEVICEINSTANCEA lpddi, DWORD version, int id)
>  {
>      DWORD dwSize = lpddi->dwSize;
> +    // Data1 is concatenation of productid and vendorid, Data4 seems constant
> +    GUID product_guid = { ((joydevs[id].product_id)<<16)+joydevs[id].vendor_id,
> +                          0x0000,
> +                          0x0000,
> +                          {0x00, 0x00, 0x50, 0x49, 0x44, 0x56, 0x49, 0x44} };
> +

Hi, I'm not familiar with direct input code but I can say that //
comments are not allowed, please use /* */ and send a try 2. Is there
any easy way to test this patch? Like a simple app that displays such
information so I can help testing in Windows and Wine?



More information about the wine-devel mailing list