Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » Allegro/Vista requires Basic Mode

Credits go to Matthew Leverton and spellcaster for helping out!
This thread is locked; no one can reply to it. rss feed Print
Allegro/Vista requires Basic Mode
aadfo824
Member #7,265
May 2006

Whenever I run my allegro programs, I get a message that tells me its incompatible with Aero and must switch to basic. Does anybody know the reason for this or how it can be fixed?

I'm using Allegro 4.2.1 and whatever the newest VC++ Express 2005 is called. I'm also using FMODEx, but I doubt that has anything to do with it.

Here's my graphics initialization :

set_color_depth(32);
set_gfx_mode(MODE, WIDTH, HEIGHT, 0, 0);


where:

#define MODE GFX_AUTODETECT_WINDOWED/**/
#define WIDTH 640
#define HEIGHT 480

Matthew Leverton
Supreme Loser
January 1999
avatar

If you use a DX window with a different color depth than the desktop, it must shut down Aero.

spellcaster
Member #1,493
September 2001
avatar

Or in other words:
Use set_color_depth(get_desktop_color_depth()) to avoid this. You might want to check first if the color depth is acceptable, though.

--
There are no stupid questions, but there are a lot of inquisitive idiots.

aadfo824
Member #7,265
May 2006

Yes, that worked perfectly. Thank you.

By acceptable, I assume you mean acceptable for the application, ie. checking that its not 8 bit if my bitmaps are 24 bit? I mean, the desktop color depth has got to be acceptable for the PC if the desktop's using it.

spellcaster
Member #1,493
September 2001
avatar

Yep, I meant ok for your application. If you require an alpha channel (for example) you might run into a problem if the desktop runs in 15 bits.

--
There are no stupid questions, but there are a lot of inquisitive idiots.

Kris Asick
Member #1,424
July 2001

Question: What if your program uses 8-bit colour? Will that still shut down Aero?

This is good to know so that my future games don't interfere with how Vista does things.

--- Kris Asick (Gemini)
--- http://www.pixelships.com

--- Kris Asick (Gemini)
--- http://www.pixelships.com

Matt Smith
Member #783
November 2000

"so that my future games don't interfere with how Vista does things"

That's terrifically sporting of you old chap :) A less generous person would suggest that it's Vista interfering with your games.

Kris Asick
Member #1,424
July 2001

Well, you know what they say. If you can't beat 'em... ;)

Besides, I'd rather my games work than make something that doesn't work and blame someone else. That would just be counterproductive and stupid. In fact, I find it very humorous when a programmer blames Windows for doing something new which messes up their program because I think to myself, "Geeze, those people wouldn't last very long programming for video game consoles... every three to five years you have to learn to write for a whole new system..."

--- Kris Asick (Gemini)
--- http://www.pixelships.com

--- Kris Asick (Gemini)
--- http://www.pixelships.com

Thomas Fjellstrom
Member #476
June 2000
avatar

Quote:

Besides, I'd rather my games work than make something that doesn't work and blame someone else.

Right. Thats Microsoft's job. :P

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Roberto
Member #7,391
June 2006
avatar

Excuse me, but... Will I have to do the desktop pixel depth test if my game runs in fullscreen mode? ???

Matthew Leverton
Supreme Loser
January 1999
avatar

No. Going full screen requires exclusive access to the card, so it doesn't matter what depth you use.

Go to: