Index: [thread] [date] [subject] [author]
  From: Christoph Egger <Christoph_Egger@t-online.de>
  To  : ggi-develop@eskimo.com
  Date: Fri, 7 May 1999 14:47:25 +0200 (MEST)

Re: MouseMan protocoll optimisation

On Fri, 7 May 1999, Andrew Apted wrote:

> 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() ?
> 

No! Just a thought to optimize it!

Christoph Egger
E-Mail: Christoph_Egger@t-online.de

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