[SDL] Hide ouput of the SDL_SetVideoMode

Ken Phillis dandel at gmail.com
Mon Jul 3 19:00:15 PDT 2006


it probobly would have, but it was an example on how to initialize an
SDL surface in wxWidgets, and not a tutorial on how to use the
wxWidgets Client Drawing features.

anyways some extra tweaks on that would have done a lot more ( because
i have also had to do some things to that to create a pause/play
system which complicated the setup a lot )
On 7/3/06, Ryan C. Gordon <icculus at icculus.org> wrote:
> SDL_SetVideoMode(0, 0, 0, SDL_SWSURFACE);
>
> with...
>
> SDL_VideoInit("dummy",SDL_SWSURFACE);

I think Sam is adding (or already added) something like this for SDL
1.3, so you can enumerate and select a specific video driver.

Naturally, there's a difference between SDL_Init and SDL_SetVideoMode,
even in 1.2 ...

> but it's a very unorthodox and unusual method, and i would prefer to
> instead call a function like...
>
> void* SDL_SDL_VideoRun();
>
> which automatically initializes the drivers such that it won't fail.

Can't you just call SDL_CreateRGBSurface() without calling
SDL_SetVideoMode()? Maybe it's illegal, but I think it should work as
long as SDL_Init() succeeded. (I think...)  This could be handy for
getting access to, say, the surface format converters, even if you don't
specifically plan to use SDL to blit to the screen.

--ryan.




More information about the SDL mailing list