[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] pygame crashing after a few seconds



Emmanuel Kanter wrote:

Lenard Lindstrom wrote:
Though I am unfamiliar with the book I can still make on suggestion. Try setting the SDL_VIDEODRIVER environment variable to windib before running any examples. From the dos prompt:

set SDL_VIDEODRIVER=windib

Lenard

for my complete confusion, this worked.
where can I read more about it, so I'll understand what I just did?

Thanks!
Emi
By default Pygame 1.8.1 uses DirectX graphics for Windows XP and earlier. What you did was disable the DirectX driver. The windib driver uses regular screen device bitmap operations instead. The SDL developers have known of DirectX problems for several years now, so made windib the default. But Pygame 1.8.1 overrides that for better performance on older computers. It sets SDL_VIDEODRIVER to directx at startup, unless the environment variable has already a value. I only guessed this may be the problem since I have just finished debugging a DirectX problem with the F10 function key. The information on this is scattered. Some postings are on the Pygame mailing list. Some are in the SDL mailing list: http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org . There is also an SVN log message in the SDL repository explaining the switch to windib because of DirectDraw and DirectInput problems. Finally, an unofficial list of SDL, and therefore Pygame, environment variables can be found here: http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org .

--
Lenard Lindstrom
<len-l@xxxxxxxxx>