delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/11/13/15:30:26

From: "DeHackEd" <notgiven AT out DOT com>
Newsgroups: comp.os.msdos.djgpp
References: <72hrem$ged$1 AT nnrp1 DOT dejanews DOT com>
Subject: Re: 640x480 mode distorts when switching to and from apps in Windows
Lines: 40
X-Newsreader: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Message-ID: <ky%22.46$04.38995@tundra.ops.attcanada.net>
Date: Fri, 13 Nov 1998 19:14:24 GMT
NNTP-Posting-Host: 142.194.222.185
NNTP-Posting-Date: Fri, 13 Nov 1998 19:14:24 GMT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Windows. It does this. There is nothing you can really do except use a simpler
graphics mode (320x200 8bit comes to mind) but that is not an excuse personally.

If it truely becomes a problem, you may want to try something as a shortcut key.
If you don't use F12, make is so pressing it causes the graphics mode to reset
and redraw the screen and re-set the palette. Just blit to a memory bitmap,
re-call set_gfx_mode and blit it back. That should do it, but I havn't
personally tried it.

BITMAP *temp = create_bitmap(SCREEN_W, SCREEN_H);
PALLETE pal;

getpalette(pal); // remove if you use hi/true colour

blit(screen, temp,0,0,0,0,SCREEN_W, SCREEN_H);
set_gfx_mode(GFX_AUTODETECT, SCREEN_W, SCREEN_H, 0, 0);
blit (temp, screen,0,0,0,0, SCREEN_W, SCREEN_H);
destroy_bitmap(temp);

--
"DeHackEd"

My Email address in the header is fake (spammers). Email me at this address:

http://www.geocities.com/cgi-bin/homestead/mail.pl?dehacked
jack DOT stinchcombe AT usa DOT net wrote in message <72hrem$ged$1 AT nnrp1 DOT dejanews DOT com>...
>When using a 640x480 mode (I use Allegro to switch to this screen mode) in a
>DOS box in Windows, if I switch to another program that is running (using
>Alt+Tab, or similar), and switch back, the display beacomes a bit distorted -
>it stays in 640x480 mode, but size of the display on the monitor is
>different, becoming taller, most often resulting in some of it being off the
>edge of the screen.
>
>Is there any way detecting when or if this has happened? Or of preventing this
>from happening? (example code would be nice)
>
>-----------== Posted via Deja News, The Discussion Network ==----------
>http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own


- Raw text -


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