I have a problem (parachute deploys) when I do the following and I’m not
sure why.
I create the primary surface. Create an additianal surface using
SDL_CreateRGBSurface. Use SDL_FillRect on the additional surface.
This works fine when in Fullscreen mode, but in windowed mode it deploys
the parachute. I’m running under Win2000 with vc++. The following is the
code I am referring too. The parachute is deployed when I try to FillRect.
I thought I would reply back so others can learn from my mistakes.
I figured out what the problem was. I had a macro called SCREENBPP defined
to be 0. I used this in my call to SDL_SetVideoMode(). This is fine since
I was also specifying SDL_ANYFORMAT for the surface type. So, SDL just
figured out what the best match would be.
The problem was that I was also using this macro in my call to
SDL_CreateRGBSurface(). In this function you cann’t specify SDL_ANYFORMAT.
So, it created a surface with bits per pixel being something other then a
legal value. So, when I tried to draw to the surface SDL deployed the
parachute. Hope this helps others to avoid this problem in the future.--------- Original message --------
From: kylotan@kylotan.eidosnet.co.uk (Kylotan)
To: “sdl at libsdl.org”
Subject: Re: [SDL] SDL_CreateRGBSurface in windowed mode
Date: 02-12-03 06:32