SDL_GetVideoInfo absolutely no acceleration

I compiled SDL 1.2.11 with OpenWatcom 1.6 as a static lib. I am working under
Win XP, with DirectX 9.00 installed.

Every thing looks ok. When I ask SDL_GetVideoInfo() for hardware acceleration
support always get no acceleration and 0 (zero) video memory. I tried in varios
ATIs and NVidia(s) with same results. My previous implementations with
DirectDraw found hardware acceleration.

I called SDL_GetVideoInfo() after SDL initialization but before setting a
video mode .

Any hint ?

Thanks,

Armando

Every thing looks ok. When I ask SDL_GetVideoInfo() for hardware acceleration
support always get no acceleration and 0 (zero) video memory. I tried in varios
ATIs and NVidia(s) with same results. My previous implementations with
DirectDraw found hardware acceleration.

As of SDL 1.2.10 or so, SDL doesn’t use DirectDraw by default, since
it’s quickly becoming a legacy API that too-often causes system crashes.
For 2D video, it uses the “windib” interfaces by default…depending on
what your program is doing, this make be a performance hit, but it
helped immensely with stability across a lot of flakey Windows boxes.

You can force SDL to use its DirectDraw renderer by setting the
environment variable SDL_VIDEODRIVER=directx before calling SDL_Init. No
other code changes are needed.

<usual_rant>
But consider using OpenGL instead, even for 2D games.
</usual_rant>

–ryan.

Thanks Ryan, Setting the environment variable, as you said, it uses hardware
acceleration. Works Ok with my applications, no crashes so far. I will test
several PCs configurations to see what happen.

Armando