delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/10/25/01:28:07

From: mad14 AT cc DOT keele DOT ac DOT uk (G.W. Owen)
Newsgroups: comp.os.msdos.djgpp
Subject: allegro oddity
Date: 21 Oct 1996 14:22:02 GMT
Lines: 24
Distribution: world
Message-ID: <54g0ua$l79@gerry.cc.keele.ac.uk>
NNTP-Posting-Host: potter.cc.keele.ac.uk
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

I was playing around with an the allegro library yesterday, and accidentally
entered this code...

int main(void)
{

[various declarations...]

set_mouse_sprite(NULL);
allegro_init()

[code to display mouse, set graphics mode etc]

}

Well, despite the 'set_mouse_sprite' call coming before the 'allegro_ init'
call it compiled and ran OK under Windows 3.11, but gave a segmentation
fault under DOS (w/CWSDPMI).  Obviously, calling 'set_mouse_sprite' after
allegro_init worked fine, so I don't need a fix, I just wondered why it
happened.
-- 
G W Owen.		<G DOT W DOT Owen AT keele DOT ac DOT uk>
These opinions are mine.

- Raw text -


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