From: mert0407 AT sable DOT ox DOT ac DOT uk (George Foot) Newsgroups: comp.os.msdos.djgpp Subject: Re: Allegro + Logitech Mouse Date: 10 Jul 1997 22:09:30 GMT Organization: Oxford University, England Lines: 36 Message-ID: <5q3miq$rff@news.ox.ac.uk> References: <33c48a38 DOT 10454261 AT netnews DOT hinet DOT net> NNTP-Posting-Host: sable.ox.ac.uk To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Wisher (wisher AT ms6 DOT hinet DOT net) wrote: : I have seen articles mentioned that Logitech is slow with Allegro, and : it really is. : How can I get over this problem so the user can use whatever mouse : they own (without any adjustments from them)? I'm not sure there is a sensible way without replacing most of Allegro's mouse functions. You could simply multiply the coordinates by a constant and plot your own pointer, which would lower the effective resolution of the mouse's motion. Ideally, though, you would call the driver direct to find out how far the mouse had moved since last time you asked. This is function 11 I think, and returns X-change and Y-change in CX and DX respectively (they are signed shorts). It's measured in mickeys, which are the smallest detectable mouse movement amounts. You would add these results to your mouse X and Y coordinate variables, clip to the size you want, and scale onto the screen to plot the cursor. The problem with the logitech drivers is that they don't allow you to specify the sensitivity, I think; using the mickey technique you handle that sort of thing yourself. Having done this, you could still use Allegro's mouse_b to check the button states. The disadvantage here is of course that you must manually poll the mouse and plot the pointer; the way Allegro normally does it has the mouse's position variables updated automatically whenever the mouse moves, and the cursor is also moved automatically. Using mickeys and your own motion-tracking routines does have other subtle advantages too; you have a lot more control over things, when the mouse leaves the screen you know by how much it did, it enables you to use mouse control in the same way as Quake and Doom, etc etc. This is all in Allegro Vivace, which may be finished by next Christmas if we're lucky ;) -- George Foot Merton College, Oxford