Re: [PATCH] Fix Bug in DeadZone calculation

2007-08-15 Thread Vitaliy Margolen
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

Re: [PATCH] Fix Bug in DeadZone calculation

2007-08-15 Thread Kuba Ober
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. Thanks for spotting the problem. Unfortunately your patch has few problems too. I'll sending a

Re: [PATCH] Fix Bug in DeadZone calculation

2007-08-15 Thread Artur Szymiec
-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

Re: [PATCH] Fix Bug in DeadZone calculation

2007-08-15 Thread Kuba Ober
On Wednesday 15 August 2007, Andrew Talbot wrote: Kuba Ober wrote: You calculating center wrong: + ret = (props-lMax-props-lMin)/2; This won't work for min=1000 max=2000. But it does. Maybe you meant if min/max were switched? In such case ret = (props-lMax-props-lMin)/2; if

Re: [PATCH] Fix Bug in DeadZone calculation

2007-08-15 Thread Andrew Talbot
Kuba Ober wrote: You calculating center wrong: + ret = (props-lMax-props-lMin)/2; This won't work for min=1000 max=2000. But it does. Maybe you meant if min/max were switched? In such case ret = (props-lMax-props-lMin)/2; if (props-lMax props-lMin) ret = -ret; Cheers, Kuba If

Re: [PATCH] Fix Bug in DeadZone calculation

2007-08-14 Thread Vitaliy Margolen
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