winex11.drv: Fixed XInput2 errors with mislabeled mice axis. (try 2)

Christopher Cope ccope3 at utk.edu
Sat May 4 02:55:06 CDT 2013


Can someone provide some follow up on this? There is a problem with the current code. The way I fixed it allows the end user to set the mode with xinput. That seems preferable to having to apply a patch to wine if the mouse in use doesn't work.

Christopher Cope <ccope3 at utk.edu> wrote:

>The way I set it was to enable with the original labels or absolute
>label with relative mode. My mouse has absolute labels, but with
>relative mode set. My mouse won't work correctly without this patch.
>Relative and absolute mode can be set relatively easily.
>
>Alexandre Julliard <julliard at winehq.org> wrote:
>
>>Christopher Cope <ccope3 at utk.edu> writes:
>>
>>> @@ -286,8 +286,10 @@ static void enable_xinput2(void)
>>>                     class->number, class->min, class->max,
>>class->resolution, class->mode,
>>>                     XGetAtomName( data->display, class->label ));
>>>              if (class->label == x11drv_atom( Rel_X ) ||
>class->label
>>== x11drv_atom( Rel_Y )) count++;
>>> -            /* workaround for drivers that don't provide labels */
>>> -            if (!class->label && class->number <= 1 && class->mode
>>== XIModeRelative) count++;
>>> +            /* workaround for drivers that don't provide correct
>>labels */
>>> +            if (((!class->label && class->number <= 1) ||
>>class->label == x11drv_atom( Abs_X ) ||
>>> +                class->label == x11drv_atom( Abs_Y ))
>>> +                && class->mode == XIModeRelative) count++;
>>
>>The whole point of testing labels was because some platforms don't set
>>the relative mode correctly, so this is going to break them again.
>>
>>-- 
>>Alexandre Julliard
>>julliard at winehq.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20130504/234dad99/attachment.html>


More information about the wine-devel mailing list