[SDL] SDL 1.2.12 MinGW crashes due to GDI autoselction

Ronald Lamprecht R.Lamprecht at T-Online.de
Wed Aug 8 12:49:13 PDT 2007


Hi,

Bill Kendrick wrote:
> On Tue, Aug 07, 2007 at 10:35:04PM +0200, Ronald Lamprecht wrote:
>> Forcing SDL to select the DirectX driver within our app via:
>>
>> #ifdef WIN32
>>      SDL_putenv("SDL_VIDEODRIVER=directx");
>> #endif
>>
>> is a workaround. But are there any reasons for the diver selection change?
> 
> Tux Paint had _numerous_ issues running fullscreen on various Windows
> systems when Direct X was used. [1]  For previous releases, we suggested people
> change their Windows env. variable to use WinDib instead of Direct X for SDL.
> 
> I guess people here decided the issue was 'big enough' that SDL, by default,
> should use GDI, to avoid these issues.

Looking at src/video/video.c for SDL 1.2.12 as well as 1.2.11 we have:

> static VideoBootStrap *bootstrap[] = {
> [...]
> #if SDL_VIDEO_DRIVER_WINDIB
> 	&WINDIB_bootstrap,
> #endif
> #if SDL_VIDEO_DRIVER_DDRAW
> 	&DIRECTX_bootstrap,
> #endif

If this defines the auto selection priorities then nothing has changed.

BTW how is it possible to determine the driver selected by SDL?

If both SDL versions do prefer the GDI then Enigma did run with GDI 
perfectly in 1.2.11 but crashes within SDL_SetGamma() in 1.2.12 !

You can download Enigma 1.01, exchange the SDL.dll and test and debug 
the modified GDI driver. I did test and check on XP and Vista.

Greets,

Ronald



More information about the SDL mailing list