mouse: disable ps2 hwaccel by default, drop inconsitent packet start byte

front
cinap_lenrek 2011-10-07 20:19:09 +02:00
parent cfea121378
commit c00a72a02d
1 changed files with 4 additions and 3 deletions

View File

@ -104,12 +104,13 @@ ps2mouseputc(int c, int shift)
/* /*
* check byte 0 for consistency * check byte 0 for consistency
*/ */
if(nb==0 && (c&0xc8)!=0x08) if(nb==0 && (c&0xc8)!=0x08){
if(intellimouse && (c==0x00 || c==0x01 || c==0xFF)){ if(intellimouse && (c==0x00 || c==0x01 || c==0xFF)){
/* last byte of 4-byte packet */ /* last byte of 4-byte packet */
packetsize = 4; packetsize = 4;
return;
} }
return;
}
msg[nb] = c; msg[nb] = c;
if(++nb == packetsize){ if(++nb == packetsize){
@ -170,7 +171,7 @@ ps2mouse(void)
mousetype = MousePS2; mousetype = MousePS2;
packetsize = 3; packetsize = 3;
mousehwaccel = 1; mousehwaccel = 0;
} }
/* /*