delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/05/25/16:48:34

From: ao950 AT FreeNet DOT Carleton DOT CA (Paul Derbyshire)
Newsgroups: comp.os.msdos.djgpp
Subject: Allegro: Minor nuiscances in 2.2
Date: 25 May 1997 19:15:43 GMT
Organization: The National Capital FreeNet
Message-ID: <5ma34v$bho@freenet-news.carleton.ca>
Reply-To: ao950 AT FreeNet DOT Carleton DOT CA (Paul Derbyshire)
NNTP-Posting-Host: freenet5.carleton.ca
Lines: 33
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp


I have spotted two minor "nuisances" in Allegro 2.2.
(These led to a lot of hair-pulling trying to track down obscure bugs they
caused in my code.)

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
spectacularly, sometimes spewing a SIGSEGV, sometimes branching into
never-never-land (this causes weirdness like SIGINV and even hangs). Seems
to me it should trap for being called in text mode and silently return
without doing anything. (If you want to know how the hell I wound up
calling vsync in GFX_TEXT, my video code was supposed to set a graphics
mode and if it couldn't, it was supposed to scream and die to DOS, but
instead it silently failed...)

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.
It seems the screen mode or palette gets fudged up, unless you
show_mouse(NULL) first. The solution: add a warning in the docs, or make
set_gfx_mode kill the mouse pointer if GFX_TEXT is specified.

--
    .*.  Where feelings are concerned, answers are rarely simple [GeneDeWeese]
 -()  <  When I go to the theater, I always go straight to the "bag and mix"
    `*'  bulk candy section...because variety is the spice of life... [me]
Paul Derbyshire ao950 AT freenet DOT carleton DOT ca, http://chat.carleton.ca/~pderbysh

- Raw text -


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