[PATCH] Xinput: Use floats for ConstantDeceleration and AdaptiveDeceleration
Peter Hutterer
peter.hutterer at who-t.net
Sun Nov 16 20:15:23 PST 2008
On Fri, Nov 14, 2008 at 02:08:24PM -0800, Keith Packard wrote:
> These values need not be constrained to integer values.
>
> Signed-off-by: Keith Packard <keithp at keithp.com>
> ---
> hw/xfree86/common/xf86Xinput.c | 8 ++++----
> 1 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
> index f028a25..c785c45 100644
> --- a/hw/xfree86/common/xf86Xinput.c
> +++ b/hw/xfree86/common/xf86Xinput.c
> @@ -130,16 +130,16 @@ ProcessVelocityConfiguration(char* devname, pointer list, DeviceVelocityPtr s){
> xf86Msg(X_CONFIG, "%s: (accel) filter stage %i: %.2f ms\n",
> devname, i, 1.0f / (s->filters[i].rdecay));
>
> - tempf = xf86SetIntOption(list, "ConstantDeceleration", 1);
> - if(tempf > 1.0){
> + tempf = xf86SetRealOption(list, "ConstantDeceleration", 1.0);
> + if(tempf != 1.0){
> xf86Msg(X_CONFIG, "%s: (accel) constant deceleration by %.1f\n",
> devname, tempf);
> s->const_acceleration = 1.0 / tempf; /* set reciprocal deceleration
> alias acceleration */
> }
>
> - tempf = xf86SetIntOption(list, "AdaptiveDeceleration", 1);
> - if(tempf > 1.0){
> + tempf = xf86SetRealOption(list, "AdaptiveDeceleration", 1.0);
> + if(tempf != 1.0){
> xf86Msg(X_CONFIG, "%s: (accel) adaptive deceleration by %.1f\n",
> devname, tempf);
> s->min_acceleration = 1.0 / tempf; /* set minimum acceleration */
Signed-off-by: Peter Hutterer <peter.hutterer at redhat.com>
Cheers,
Peter
More information about the xorg
mailing list