delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/02/08/11:35:52

From: "Alexei A. Frounze" <dummy_addressee AT hotmail DOT com>
Newsgroups: alt.games.programming,comp.os.msdos.djgpp
Subject: Re: Setting graphics modes in Win2k
Date: Thu, 8 Feb 2001 09:35:49 -0500
Lines: 66
Message-ID: <95uaq3$ikc3f$1@ID-57378.news.dfncis.de>
References: <t851ba7dbs3g5f AT corp DOT supernews DOT co DOT uk>
NNTP-Posting-Host: pppa78-resalerochester2-5r7150.dialinx.net (4.54.46.11)
X-Trace: fu-berlin.de 981642885 19542127 4.54.46.11 (16 [57378])
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

I can be wrong, but win2k is much like winNT. winNT never had support for
SVGA/VESA modes for DOS box. It only had standard VGA. Correct me, if I'm
wrong.

--
Alexei A. Frounze
alexfru [AT] chat [DOT] ru
frounze [AT] ece [DOT] rochester [DOT] edu
http://alexfru.chat.ru
http://members.xoom.com/alexfru/
http://welcome.to/pmode/

"Jimbo" <rpgfreak AT lineone DOT net> wrote in message
news:t851ba7dbs3g5f AT corp DOT supernews DOT co DOT uk...
> Does anyone know what is going on? I am trying to set the graphics mode in
> Allegro and it won't open the screen on Windows 2000. Any ideas anyone?!
>
> Code follows:
>
> --------------------------------------------------------------------
> int cscreen::init(int sw_, int sh_, int depth_)
> {
>    sw = sw_;
>    sh = sh_;
>
>    // set the screen mode... first try the specified depth
>    set_color_depth(depth_);
>
>    if (set_gfx_mode(GFX_AUTODETECT, sw, sh, 0, 0) != 0) {
>       // cannot set specified depth... find best depth
>       set_color_depth(32);
>       if (set_gfx_mode(GFX_AUTODETECT, sw, sh, 0, 0) != 0) {
>          set_color_depth(24);
>          if (set_gfx_mode(GFX_AUTODETECT, sw, sh, 0, 0) != 0) {
>             set_color_depth(16);
>             if (set_gfx_mode(GFX_AUTODETECT, sw, sh, 0, 0) != 0) {
>                set_color_depth(15);
>                if (set_gfx_mode(GFX_AUTODETECT, sw, sh, 0, 0) != 0) {
>                   set_color_depth(8);
>                   if (set_gfx_mode(GFX_AUTODETECT, sw, sh, 0, 0) != 0)
>                      return 4;
>                }
>             }
>          }
>       }
>    }
>
>    PALETTE pal;
>
>    // in case this is a 256 colour mode, generate a nice palette
>    generate_332_palette(pal);
>    set_palette(pal);
>
>    clear_to_color(screen, makecol(0, 0, 0));
>
> }
> --------------------------------------------------------------------
>
> The program returns 4 and outputs "cannot set graphics mode".
>
> Thanks in advance,
> Jamie.
>
>


- Raw text -


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