[SDL] SDL_DisplayFormat before SDL_VideoInit

Ryan C. Gordon icculus at icculus.org
Thu Jan 4 17:31:56 PST 2007


> Yes, I know that the SDL_DisplayFormat have to be called after the SDL_VideoInit
> but I think that the user, at least, expect to have a NULL surface otherwise.

SDL doesn't spend time checking if the library is properly initialized 
in every function...it assumes you did this part right, and calls your 
attention to it by crashing when you don't.   :)

We do basic sanity checks when they make sense, and where there are 
legitimate places where such an error could occur...not calling 
SDL_Init() first isn't one of them, since it's a fundamental, easy to 
fix application issue.

--ryan.





More information about the SDL mailing list