• Hans de Goede's avatar
    Input: alps - only set fields that are actually present · a839cd57
    Hans de Goede authored
    Pinnacle / Rushmore packets contain either position info, or bitmap info,
    never both. So far we've in essence been storing garbage in the position /
    bitmap fields of the fields struct when decoding a bitmap / pos packet.
    
    We've been relying on the following sequence to get away with this:
    
    1) Decode bitmap packet
    2) Process bitmap packet
    3) Decode position packet
    4) Use position / button info
    
    This patch allows us to change this sequence, which will allow using the
    position info when processing the bitmap for more accurate results.
    Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
    Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
    a839cd57
alps.c 80.8 KB