Initialization

I have a question regarding SDL’s initialization procedures. I
know this isn’t very likely, but can I init different subsystems at
different times ? Example, instead of using (error checking
supressed for clarity):

SDL_Init(SDL_INIT_AUDIO | SDL_INIT_VIDEO);

could I use:

SDL_Init(SDL_INIT_AUDIO);
// some code ...
SDL_Init(SDL_INIT_VIDEO);

is it possible ?---

[]s, Andrei de A. Formiga
andrei at elogica.com.br
andrei at dee.ufpb.br
@Andrei_de_A_Formiga

I have a question regarding SDL’s initialization procedures. I
know this isn’t very likely, but can I init different subsystems at
different times ? Example, instead of using (error checking
supressed for clarity):

SDL_Init(SDL_INIT_AUDIO | SDL_INIT_VIDEO);

could I use:

SDL_Init(SDL_INIT_AUDIO);
// some code …
SDL_Init(SDL_INIT_VIDEO);

is it possible ?

Yup, that’s fine. :slight_smile:

-Sam Lantinga				(slouken at devolution.com)

Lead Programmer, Loki Entertainment Software–
“Any sufficiently advanced bug is indistinguishable from a feature”
– Rich Kulawiec