Archived

This topic is now archived and is closed to further replies.

SDL_Init: How to call?

This topic is 4948 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Is it bad form to call it multiple times (EDIT: With different parameters)? Or to give it no flags? [edited by - thedevdan on May 31, 2004 11:24:55 AM] [edited by - thedevdan on May 31, 2004 11:25:11 AM] [edited by - thedevdan on May 31, 2004 12:46:54 PM]

Share this post


Link to post
Share on other sites
i''m unsure about calling it multiple times without SDL_Quit each time (but i guess it could even do that automatically).

it''s perfectly fine. and its fine, as well, to call it without any parameter (means, with 0), too.

SDL_Init(0);
SDLNet_Init();
...
SDLNet_Quit();
SDL_Quit();

thats my webserver pro/epilog code. no need for anything of sdl, except the SDL_net library.. so i pass 0.

and calling init/quit several times in an app, i''ve did this as well.




If that''s not the help you''re after then you''re going to have to explain the problem better than what you have. - joanusdmentia

davepermen.net

Share this post


Link to post
Share on other sites
quote:
Original post by davepermen
i''m unsure about calling it multiple times without SDL_Quit each time (but i guess it could even do that automatically).

it''s perfectly fine. and its fine, as well, to call it without any parameter (means, with 0), too.

SDL_Init(0);
SDLNet_Init();
...
SDLNet_Quit();
SDL_Quit();

thats my webserver pro/epilog code. no need for anything of sdl, except the SDL_net library.. so i pass 0.

and calling init/quit several times in an app, i''ve did this as well.




If that''s not the help you''re after then you''re going to have to explain the problem better than what you have. - joanusdmentia

davepermen.net


Thanks! I didn''t want to build my wrapper around SDL''s initialize everything at once thing, but then I stumbled on SDL_InitSubSystem. You would still have to call SDL_Init, but I wouldn''t any flags there, and hence the question.

Share this post


Link to post
Share on other sites