From 003cfb364a672027f34b48aa2593c43cc53ba2e7 Mon Sep 17 00:00:00 2001 From: William McBrine Date: Fri, 17 Nov 2006 03:39:15 +0000 Subject: [PATCH] Oops.. moves always showed up as button 1. Apart from that, to my surprise, this was not only much simpler than the other ports, but even works better in some respects (notice what happens when you press a mouse button while holding another). No click events reported, though. --- dos/pdckbd.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/dos/pdckbd.c b/dos/pdckbd.c index e804ebbe..76db6d90 100644 --- a/dos/pdckbd.c +++ b/dos/pdckbd.c @@ -19,7 +19,7 @@ #include "pdcdos.h" -RCSID("$Id: pdckbd.c,v 1.52 2006/11/17 03:21:01 wmcbrine Exp $"); +RCSID("$Id: pdckbd.c,v 1.53 2006/11/17 03:39:15 wmcbrine Exp $"); /************************************************************************ * Table for key code translation of function keys in keypad mode * @@ -232,13 +232,16 @@ int PDC_get_bios_key(void) /* moves always flag the button as changed */ - if (((regs.W.bx & 1) ^ (old_ms.W.bx & 1)) || moved) + if (((regs.W.bx & 1) ^ (old_ms.W.bx & 1)) || + (pdc_mouse_status.button[0] == BUTTON_MOVED)) pdc_mouse_status.changes |= 1; - if (((regs.W.bx & 4) ^ (old_ms.W.bx & 4)) || moved) + if (((regs.W.bx & 4) ^ (old_ms.W.bx & 4)) || + (pdc_mouse_status.button[1] == BUTTON_MOVED)) pdc_mouse_status.changes |= 2; - if (((regs.W.bx & 2) ^ (old_ms.W.bx & 2)) || moved) + if (((regs.W.bx & 2) ^ (old_ms.W.bx & 2)) || + (pdc_mouse_status.button[2] == BUTTON_MOVED)) pdc_mouse_status.changes |= 4; pdc_mouse_status.x = regs.W.cx >> 3;