Fix PS/2 MouseMan+ protocol. We have been looking at a wrong place
for the sign bit for roller movement!
This commit is contained in:
parent
c8eab8c863
commit
53f4c06394
@ -20,7 +20,7 @@
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: psm.c,v 1.9 1999/05/09 13:00:43 phk Exp $
|
||||
* $Id: psm.c,v 1.10 1999/05/30 16:52:47 phk Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -1838,7 +1838,7 @@ psmintr(void *arg)
|
||||
if ((c & ~MOUSE_PS2_BUTTONS) == 0xc8) {
|
||||
/* the extended data packet encodes button and wheel events */
|
||||
x = y = 0;
|
||||
z = (sc->ipacket[1] & MOUSE_PS2PLUS_ZNEG)
|
||||
z = (sc->ipacket[2] & MOUSE_PS2PLUS_ZNEG)
|
||||
? (sc->ipacket[2] & 0x0f) - 16 : (sc->ipacket[2] & 0x0f);
|
||||
ms.button |= (sc->ipacket[2] & MOUSE_PS2PLUS_BUTTON4DOWN)
|
||||
? MOUSE_BUTTON4DOWN : 0;
|
||||
|
@ -20,7 +20,7 @@
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: psm.c,v 1.9 1999/05/09 13:00:43 phk Exp $
|
||||
* $Id: psm.c,v 1.10 1999/05/30 16:52:47 phk Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -1838,7 +1838,7 @@ psmintr(void *arg)
|
||||
if ((c & ~MOUSE_PS2_BUTTONS) == 0xc8) {
|
||||
/* the extended data packet encodes button and wheel events */
|
||||
x = y = 0;
|
||||
z = (sc->ipacket[1] & MOUSE_PS2PLUS_ZNEG)
|
||||
z = (sc->ipacket[2] & MOUSE_PS2PLUS_ZNEG)
|
||||
? (sc->ipacket[2] & 0x0f) - 16 : (sc->ipacket[2] & 0x0f);
|
||||
ms.button |= (sc->ipacket[2] & MOUSE_PS2PLUS_BUTTON4DOWN)
|
||||
? MOUSE_BUTTON4DOWN : 0;
|
||||
|
@ -46,7 +46,7 @@
|
||||
|
||||
#ifndef lint
|
||||
static const char rcsid[] =
|
||||
"$Id: moused.c,v 1.25 1999/02/28 09:18:57 yokota Exp $";
|
||||
"$Id: moused.c,v 1.26 1999/03/01 04:47:37 gpalmer Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <err.h>
|
||||
@ -1507,7 +1507,7 @@ r_protocol(u_char rBuf, mousestatus_t *act)
|
||||
if ((pBuf[0] & ~MOUSE_PS2_BUTTONS) == 0xc8) {
|
||||
/* the extended data packet encodes button and wheel events */
|
||||
act->dx = act->dy = 0;
|
||||
act->dz = (pBuf[1] & MOUSE_PS2PLUS_ZNEG)
|
||||
act->dz = (pBuf[2] & MOUSE_PS2PLUS_ZNEG)
|
||||
? (pBuf[2] & 0x0f) - 16 : (pBuf[2] & 0x0f);
|
||||
act->button |= ((pBuf[2] & MOUSE_PS2PLUS_BUTTON4DOWN)
|
||||
? MOUSE_BUTTON4DOWN : 0);
|
||||
|
Loading…
Reference in New Issue
Block a user