Index: [thread] [date] [subject] [author]
  From: Andrew Apted <ajapted@netspace.net.au>
  To  : ggi-develop@eskimo.com
  Date: Fri, 7 May 1999 15:22:07 +1000

Re: MouseMan protocoll optimisation

Christoph Egger writes:

>  I know, the damned MouseMan protocoll has 3/4 bytes packets. The extra
>  byte is only there if the middle button is active.
>  
>  You can optimize the MouseMan protocoll like this:
>  
>  Getting the extra byte as a packet with magic numbers in it.
>  And then switch to 4-byte mode.
>  
>  The magic numbers are:
>  
>  #define MOUSE_EXTRA_MAGIC_1 0xAA
>  #define MOUSE_EXTRA_MAGIC_2 0x55
>  
>  An implementation could be:
>  
>          if (buf[1] == MOUSE_EXTRA_MAGIC_1 && buf[2] == MOUSE_EXTRA_MAGIC_2)
>          {
>                  /* got unexpected fourth byte => switch to 4-byte mode*/
>  
>  	}
>  	else
>  	{
>  		/* the normal 3-byte mode */
>  
>  	} // if

Nope, you lost me there.  IIRC, that's how gpm handled it, but I don't
see the relevance to LibGII/LibGGI.  Is there something wrong with the
algorithm used in libgii/input/mouse/packetparse.c's parse_mman() ?

Cheers,
___________________________________________________
                                               \  /
  Andrew Apted   <ajapted@netspace.net.au>      \/
 

Index: [thread] [date] [subject] [author]