www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/02/22/07:11:35

Message-ID: <8D53104ECD0CD211AF4000A0C9D60AE357934B@probe-2.acclaim-euro.net>
From: Shawn Hargreaves <ShawnH AT Probe DOT co DOT uk>
To: djgpp AT delorie DOT com
Subject: Re: Mouse in SVGA Mode
Date: Mon, 22 Feb 1999 12:09:40 -0000
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.0.1460.8)
Reply-To: djgpp AT delorie DOT com

John Hosick writes:
> How do you get a mouse to work in SVGA mode? the mouse show 
> function does not work as it does in Mode13h. 

Do you mean the int 0x33 function #1 show mouse call? It's actually
not a good idea to use that in _any_ graphics mode: most drivers
do support standard VGA modes like 13h, and a small minority can 
even handle SVGA resolutions, but there are some that will get
extremely confused in anything other than text modes, so it's better
not to rely on the driver for any pointer display at all.

The solution is a little bit hairy. You can get the int 0x33 driver
to trigger a callback whenever the mouse moves, which you can hook,
but you need to use DPMI functions to create a real mode callback
around this. You can't actually draw your pointer from the callback,
though, because in my experience it is very unstable if you call 
drawing routines (in particular the VESA bank switching stuff) from
this context. So you have to hook the timer interrupt as well, use
the mouse driver callback to set some flags, and do the display
stuff from your timer handler.

See the Allegro file src/djgpp/mouse.c for a working implementation.


	Shawn Hargreaves.

- Raw text -


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