[PATCH 2/2] DInput : Use vendor and product ids to generate product GUID like it's done on Windows

DavidL david.dljunk at gmail.com
Thu Jul 28 04:08:18 CDT 2016


I'm not really familiar with the intricacies of the guid generation ... but
looking at the Mac dinput code ... should a similar patch be applied there?

Cheers,
David

On Sun, Jul 24, 2016 at 3:15 AM, Corentin Rossignon <corossig at gmail.com>
wrote:

> Done, thanks for taking some times and helping me doing a proper patch.
>
>
>
> On 07/24/2016 12:03 AM, Bruno Jesus wrote:
>
>> On Sat, Jul 23, 2016 at 8:01 AM, Corentin Rossignon <corossig at gmail.com>
>> wrote:
>>
>>> Signed-off-by: Corentin Rossignon <corossig at gmail.com>
>>> ---
>>>   dlls/dinput/joystick_linux.c      | 34
>>> +++++++++++++++++++++++++++++++---
>>>   dlls/dinput/joystick_linuxinput.c | 27 +++++++++++++++++++++++++--
>>>   2 files changed, 56 insertions(+), 5 deletions(-)
>>>
>> Formatting problem:
>>
>> bruno at Note:~/programs/wine$ git apply dinput2
>> dinput2:31: trailing whitespace.
>> /*
>> dinput2:35: trailing whitespace.
>>   *  Data4 seems to be a constant.
>> dinput2:104: trailing whitespace.
>> /*
>> dinput2:108: trailing whitespace.
>>   *  Data4 seems to be a constant.
>> warning: 4 lines add whitespace errors.
>>
>> diff --git a/dlls/dinput/joystick_linux.c b/dlls/dinput/joystick_linux.c
>>> index 90b7280..f8499ca 100644
>>> --- a/dlls/dinput/joystick_linux.c
>>> +++ b/dlls/dinput/joystick_linux.c
>>> @@ -77,6 +77,7 @@ struct JoyDev
>>>   {
>>>       char device[MAX_PATH];
>>>       char name[MAX_PATH];
>>> +    GUID guid_product;
>>>
>>>       BYTE axis_count;
>>>       BYTE button_count;
>>> @@ -122,6 +123,21 @@ static const GUID DInput_Wine_Joystick_GUID = { /*
>>> 9e573ed9-7734-11d2-8d4a-23903
>>>     {0x8d, 0x4a, 0x23, 0x90, 0x3f, 0xb6, 0xbd, 0xf7}
>>>   };
>>>
>>> +
>>> +/*
>>> + * Construct the GUID in the same way of Windows doing this.
>>> + *  Data1 is concatenation of productid and vendorid.
>>> + *  Data2 and Data3 are NULL.
>>> + *  Data4 seems to be a constant.
>>> + */
>>> +static const GUID DInput_Wine_Joystick_Constant_Part_GUID = {
>>> +  0x000000000,
>>> +  0x0000,
>>> +  0x0000,
>>> +  {0x00, 0x00, 0x50, 0x49, 0x44, 0x56, 0x49, 0x44}
>>> +};
>>> +
>>> +
>>>
>> Please remove all double blank lines in your changes in order to be
>> more compatible with the surrounding code style.
>>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20160728/dbc09beb/attachment.html>


More information about the wine-devel mailing list