delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/05/25/18:33:36

From: Shawn Hargreaves <Shawn AT talula DOT demon DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Allegro: Minor nuiscances in 2.2
Date: Sun, 25 May 1997 21:45:23 +0100
Organization: None
Distribution: world
Message-ID: <FvHyfaAjTKizEwm$@talula.demon.co.uk>
References: <5ma34v$bho AT freenet-news DOT carleton DOT ca>
NNTP-Posting-Host: talula.demon.co.uk
MIME-Version: 1.0
Lines: 35
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Paul Derbyshire writes:
>The first is that calling vsync() in text mode fails. (This seems like it
>should be expected). The problem is it fails rather unpredictably and

I'm sorry, but I don't think that really qualifies as a bug! In fact,
almost any graphics function will crash if you call it while in text
mode. The vsync() routine is vectored through a pointer in the
GFX_DRIVER structure, but when gfx_driver is NULL this will end up
referencing an address somewhere down in low memory. To be precise,
you'll be calling whatever code is pointed to by the 32 bit int at
memory address #20, which is liable to do all sorts of horrible
things...

The only graphics related functions that you can safely call from text
mode are the palette fades. I added a special case to deal with those,
because I wanted to be able to fade out the screen when starting a
program, but in the interests of efficiency I'm not going to add similar
checks to any other functions. It's up to you to make sure you are in a
suitable screen mode before you call them...

>The second, is that if you have a mouse pointer up, then exit the program
>with something like
>
>set_gfx_mode (GFX_TEXT,80,25,0,0);
>exit(0);
>
>all you get is a silent hang... or so it seems, until you blind-type
>something like MODE CO80 or EXIT.

Interesting :-)  Can I have some source that reproduces this, please?


--
Shawn Hargreaves - shawn AT talula DOT demon DOT co DOT uk - http://www.talula.demon.co.uk/
Beauty is a French phonetic corruption of a short cloth neck ornament.

- Raw text -


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