[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pygame] Intermittent crashes caused by surfaces?



Michael Benfield wrote:
> ok well I took out the if(SDL_WasInit(SDL_INIT_VIDEO)) check and recompiled
> pygame. the code runs fine without ballooning even without the pygame.init(). 
> Does anyone know if that check is necessary for some reason?

Hmm, I'll have to "retest" this. I believe there is a big problem dealing
with hardware surfaces without SDL_INIT_VIDEO. With straight software based
surfaces I'm sure it's just a call to free() to get rid of the surface.

Come to think of it, you can probably call just about any SDL function on a
software surface without the video initialized. I think I'll make a special
case for the actual deleting of Surfaces. I don't really care if someone
can't call fill() or get_at() while pygame video is not initialized. But
deleting surfaces is kind of useful. :]

I'll have to dig through the SDL code to see what looks safe for calling
SDL_FreeSurface without having the video initialized.


____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org