On Wed, May 7, 2014 at 2:29 PM, Jason Gerecke <killert...@gmail.com> wrote:
> The touchstrip values are already stored in oldStrip[XY], and appear to
> also be stored in oldTilt[XY] as a quirk of history. The value of oldTilt[XY]
> itself is only read in wcmSendNonPadEvents (which is not called for the pad
> device for obvious reasons ;)). At this point in time, there is absolutely
> no reason to store a second copy of the strip values in oldTilt[XY].
>
> Signed-off-by: Jason Gerecke <killert...@gmail.com>

Nice cleanup, especially the third one!

Reviewed-by: Ping Cheng <pi...@wacom.com> for the whole set.

Ping

> ---
>  src/wcmCommon.c | 15 ++-------------
>  1 file changed, 2 insertions(+), 13 deletions(-)
>
> diff --git a/src/wcmCommon.c b/src/wcmCommon.c
> index 7f78d0c..d27ad6d 100644
> --- a/src/wcmCommon.c
> +++ b/src/wcmCommon.c
> @@ -488,27 +488,16 @@ static void wcmUpdateOldState(const InputInfoPtr pInfo,
>                               const WacomDeviceState *ds)
>  {
>         const WacomDevicePtr priv = (WacomDevicePtr) pInfo->private;
> -       int tx, ty;
>
>         priv->oldWheel = ds->abswheel;
>         priv->oldWheel2 = ds->abswheel2;
>         priv->oldButtons = ds->buttons;
>
> -       if (IsPad(priv))
> -       {
> -               tx = ds->stripx;
> -               ty = ds->stripy;
> -       } else
> -       {
> -               tx = ds->tiltx;
> -               ty = ds->tilty;
> -       }
> -
>         priv->oldX = priv->currentX;
>         priv->oldY = priv->currentY;
>         priv->oldZ = ds->pressure;
> -       priv->oldTiltX = tx;
> -       priv->oldTiltY = ty;
> +       priv->oldTiltX = ds->tiltx;
> +       priv->oldTiltY = ds->tilty;
>         priv->oldStripX = ds->stripx;
>         priv->oldStripY = ds->stripy;
>         priv->oldRot = ds->rotation;
> --
> 1.9.2
>
>
> ------------------------------------------------------------------------------
> Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
> &#149; 3 signs your SCM is hindering your productivity
> &#149; Requirements for releasing software faster
> &#149; Expert tips and advice for migrating your SCM now
> http://p.sf.net/sfu/perforce
> _______________________________________________
> Linuxwacom-devel mailing list
> Linuxwacom-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
&#149; 3 signs your SCM is hindering your productivity
&#149; Requirements for releasing software faster
&#149; Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
_______________________________________________
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to