delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/08/11/14:03:07

From: wisher AT ms6 DOT hinet DOT net (Wisher)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Allegro - Mouse Problems
Date: Fri, 08 Aug 1997 03:13:25 GMT
Organization: The Wisher
Lines: 60
Message-ID: <33ea8cf0.36291792@netnews.hinet.net>
References: <01bca110$a1ac3ee0$234747c3 AT 486> <33e90e00 DOT 362572 AT netnews DOT hinet DOT net> <01bca373$0e1bca00$1a4747c3 AT 486>
NNTP-Posting-Host: h190.s154.ts.hinet.net
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

<"Ingo Ruhnke" <ruhnke AT owl-online DOT de>>:
>> Is your mouse a Logitech one?
>
>Yes, it is a Logitech Mouseman.
>I discoverd now that the mouse is under MS-DOS 7 fast enough, only under
>Win95 it gets too slow. So, I think it's more a Win95 problem, then an
>Allegro.

According to Shawn Hargreaves and other kind helping hands, the
'Logitech driver' causes the problem. And because it's the only driver
that acts this way, Shawn said he would work on something more
important for now.

If you don't need very precise mouse position feedback, (e.g. just
want a normal-speed mouse to use grabber.exe), here is a DIRTY fix:

(In Allegro home directory, find these 2 files:)
File 1: src\djgpp\mouse.c (Backup old one of course!!)
  Outside all the functions: 
    Add this line:
       int MOUSE_ADJUST = 1; // non-Logitech mouse needs '8'!
  In function 'mouseint': 
    mouse_x = r->x.cx / 8; // replace both '8' with 'MOUSE_ADJUST'
    mouse_y = r->x.dx / 8;
  In function 'position_mouse':
    r.x.cx = x * 8; // replace both '8' with 'MOUSE_ADJUST'
    r.x.dx = y * 8;
  In function 'set_mouse_range':
    r.x.cx = x1 * 8; // replace these '8' with 'MOUSE_ADJUST'
    r.x.dx = x2 * 8;
    ...
    r.x.cx = y1 * 8;
    r.x.dx = y2 * 8;
    ...
    mouse_x = r.x.cx / 8;
    mouse_y = r.x.dx / 8;

File2: allegro.h 
  Add this line:
    extern int MOUSE_ADJUST;

Rebuild Allegro by 'make'.

That's all. Now try 'tools\grabber.exe' and see the difference.

The worst of this fix is that the mouse would move in 2, 4 or 8
increments  in 'SVGA modes'. When you need the slow but precise mouse
movements, set MOUSE_ADJUST to '8' before you call the
'install_mouse'. 

A better solution should also detect the 'Logitech driver' in
'install_mouse' function and make the adjustment automatically.
According to some documents, just check that whether the memory INT33
points to plus 3 bytes is "LOGITECH" would do. Too bad I am not
familiar enough with djgpp to do that : (

I did this fix in a try-and-error way(!), hope this would help a litte
bit.

Any suggestion about how to complete the fix?

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019