SDL Library Documentation
Prev |  | Next

# Chapter 5. General

Before SDL can be used in a program it must be initialized with `SDL_Init`. `SDL_Init` initializes all the subsystems that the user requests (video, audio, joystick, timers and/or cdrom). Once SDL is initialized with `SDL_Init` subsystems can be shut down and initialized as needed using `SDL_InitSubSystem` and `SDL_QuitSubSystem`.

SDL must also be shut down before the program exits to make sure it cleans up correctly. Calling `SDL_Quit` shuts down all subsystems and frees any resources allocated to SDL.

Prev | Home | Next
SDL Reference | Up | SDL_Init