Simple problem

Hello all,

I’ve just compiled my first program, which currently does nothing more than
init SDL, and create a video surface then wait for the Quit event. I’m just
trying to learn SDL, so I figured small bites would be good.

When I run the program, it exits out with the following error:

Unable to set video mode: DDraw created surface with wrong pitch

I’m running Win95 w/ a 3dfx Vodoo3 3000, DX7.0a. I tried upgrading my
drivers, but they wouldn’t install.

The line I’m using to create the window is

// Create a window
screen = SDL_SetVideoMode(350, 350, 16, SDL_SWSURFACE);

The only thing I can think might be wrong is trying to give it 350x350 as
dimensions. Am I right to set the window size this way?

Thanks,
Lonnie Ezell

// Create a window
screen = SDL_SetVideoMode(350, 350, 16, SDL_SWSURFACE);

The only thing I can think might be wrong is trying to give it 350x350 as
dimensions. Am I right to set the window size this way?

This is a current limitation of the DirectX driver which will be addressed
at some point. In the meantime, set a width divisible by 4.

See ya!
-Sam Lantinga, Lead Programmer, Loki Entertainment Software