www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/08/29/19:38:52

Xref: news2.mv.net comp.os.msdos.djgpp:8040
From: "Mike Marcelais" <michmarc AT microsoft DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Allegro and Win95 time-slicing problem ?
Date: 29 Aug 1996 18:27:13 GMT
Organization: Microsoft Corporation
Lines: 40
Message-ID: <01bb95d8$5e3ab180$ba27379d@michmarc2>
References: <1996Aug29 DOT 185755 AT uctvms DOT uct DOT ac DOT za>
NNTP-Posting-Host: 157.55.39.186
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp


stwand07 AT uctvms DOT uct DOT ac DOT za wrote in article
<1996Aug29 DOT 185755 AT uctvms DOT uct DOT ac DOT za>...
| Hi all
| 
| I have just noticed a really weird bug with Allegro and Win95. I wonder who
is
| to blame ? (probably Microsoft...)  I have a simulation of ants, which runs
| fine in 320x200 in the background under Win95. If I use 640x400 or 640x480
| (SVGA resolutions), the program works fine _except_ that it "freezes" in
| background mode.
| 
| If I Alt-Tab back to Win95 and return minutes or hours later to my sim., it
is
| in the same state as before I Alt-Tab'ed. Why should higher screen
resolutions
| make Win95 not time-slice properly ?
| 
| (Incidentally, I cannot run SVGA in a window, it must be full screen. But
| that's to be expected...)

My guess?  Windows cannot maintain an offscreen SVGA video area, so when a
request comes in to Windows to draw onto an SVGA screen that someone program
owns that isn't in the foreground, Windows pauses until the screen is in the
foreground.  Hence, your simulation runs until it tries to draw on the
graphics screen which causes the program to halt until it returns to the
foreground.

solution: Draw to an offscreen buffer and not the screen.


-- 
+------------------------+----------------------+
| Mike Marcelais         | Excel Developer and  |
| michmarc AT microsoft DOT com | Magic Rules Guru     |
+------------------------+----------------------+
| Opinions expressed in this post are mine, and |
| do not necessarily reflect those of Microsoft |
+--= Moonstone Dragon =---------------= UDIC =--+

- Raw text -


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