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

Corentin Rossignon corossig at gmail.com
Sun Jul 24 05:15:49 CDT 2016


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.




More information about the wine-devel mailing list