[AD] fourth mouse button under windows

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Is there any reason why the fourth mouse button is ignored? According to the the MSDN doc I read, the structure that is currently being used (I forget the name) has:

DIMOFS_BUTTON0
DIMOFS_BUTTON1
DIMOFS_BUTTON2
DIMOFS_BUTTON3

I've included a copy/paste patch that adds it. I tested under MinGW32 and the "minimalist DX7 headers", and it worked fine.

It looked like buttons 5-8 were part of some extended structure that Allegro doesn't use, but I didn't really look into that.

--
Matthew Leverton - matthew@xxxxxxxxxx
http://www.allegro.cc
--- wmouse-old.c	Sat Apr 19 09:06:48 2003
+++ wmouse.c	Thu Apr 24 18:27:20 2003
@@ -515,6 +515,16 @@
 		  else
 		     _mouse_b &= ~4;
 		  break;
+		  
+	       case DIMOFS_BUTTON3:
+		  if (data & 0x80) {
+		     if (_mouse_on)
+			_mouse_b |= 8;
+		  }
+		  else
+		     _mouse_b &= ~8;
+		  break;
+		  		  
 	    }
 	 }
 


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/