[PATCH] Fix Bug in DeadZone calculation
Vitaliy Margolen
wine-devel at kievinfo.com
Wed Aug 15 07:50:07 CDT 2007
Artur Szymiec wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Vitaliy Margolen napisał(a):
>> Artur Szymiec wrote:
>>> Here is attached patch
>>> for joystick_linuxinput.c where bug in dead zone
>>> calculation make joystick unusable. After correction
>>> tested in two games and works properly.
>>>
>>> Best Regards
>>> Artur Szymiec
>>>
>> Thanks for spotting the problem. Unfortunately your patch has few
>> problems too. I'll sending a better patch.
>>
>> Vitaliy.
>>
> Thanks for reviewing the patch.
> Could you please explain to me what's wrong with this patch.
> What kind of problems do you mean ?
>
You calculating center wrong:
> + ret = (props->lMax-props->lMin)/2;
This won't work for min=1000 max=2000.
Vitaliy.
More information about the wine-devel
mailing list