delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/05/14/03:14:32

Xref: news2.mv.net comp.os.msdos.djgpp:3820
From: Shawn Hargreaves <slh100 AT york DOT ac DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: mouse problem in allegro
Date: Mon, 13 May 1996 19:56:24 +0100
Organization: The University of York, UK
Lines: 29
Message-ID: <Pine.SGI.3.91.960513193715.13006A-100000@tower.york.ac.uk>
NNTP-Posting-Host: tower.york.ac.uk
Mime-Version: 1.0
To: 004277a AT dragon DOT acadiau DOT ca
In-Reply-To: <3196d340.0@131.162.2.91>
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

On 13 May 1996, Hafiz Awang Pon wrote:

> I wrote the program below to learn how to use the mouse routine in allegro:
[...]
> the thing is that this program works under the dos box in windows but 
> not in msdos. the problem is that it's not displaying the correct x 
> and y coords. any ideas why this is happening?

Two reasons. A bug in my code, and a bug in your code. My bug is to do 
with initialising the mouse while in text mode, which will be fixed in 
the next release of Allegro (probably later this week, as soon as I 
finish writing up the docs). Your bug is trying to use the mouse in text 
mode in the first place: I didn't expect people to do this, and probably 
make all sorts of assumptions that will screw things up.

If you add:

	set_gfx_mode(GFX_VGA, 320, 200, 0, 0);

after allegro_init() but before install_mouse(), the problem should go away.


/*
 *	Shawn Hargreaves.        Why is 'phonetic' spelt with a ph?
 *	Check out Allegro and FED on http://www.york.ac.uk/~slh100/
 */



- Raw text -


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