ManyMouseBlitzMax Forums/BlitzMax Programming/ManyMouse
| There doesn't seem to have been much in the way of interfaces for using ManyMouse - which as the name suggests, allows you to use more than one mouse in a program - hence this post.|
I've got a small C interface up and running for use in BlitzMax, as well as using the original routines for initialising the interface.
First, the test program :
Const MANYMOUSE_EVENT_ABSMOTION:Int = 0
Function ManyMouse_DeviceName:Byte Ptr(index:Int)
Print "Number Of Mice:"+numMice
For loop=0 To numMice-1
'Print "Mouse Name : "+ManyMouse_DeviceName(loop)
While Not KeyHit(KEY_ESCAPE)
DrawText "Mouse "+device+" absolute motion ",0,0
DrawText "Mouse "+device+" relative motion ",0,32
DrawText "A Button has been pressed ("+device+"/"+item+")",0,64
DrawText "Scroll wheel on mouse "+device,0,128
Local temp:Byte Ptr
And the C interface program :
* Created by Nicholas Kingsley on 31/03/2008.
* Copyright 2008 __MyCompanyName__. All rights reserved.
#define TRUE 1
#define FALSE 0
ManyMouse works on Windows and Mac (Intel and should work on PPC). It should also work on Linux, but I haven't tried it yet.
ManyMouse itself can only be retrieved using SVN (unfortunately), but is availiable at http://icculus.org/manymouse/
| this is awesome, I was looking for this very thing not too long ago! |
| Nice one. This was discussed here a few times, but nothing much came of it. |
| I have found a slight modification for the Mac is needed to get the system working, otherwise multiple mice come out as device 0.|
In manymouse.c, the ordering of the mouse drivers needs changing to :
format_code('static const ManyMouseDriver **mice_drivers =
Whether its due to any of the mice working in PPC mode or something, I dont know - but this order works correct.
| Hm, pretty neat!|
Couldn't get it compile originally, until I moved the manymouse folders to the same drive as Blitzmax and MinGW themselves. (?)