Initialization
To initialize SDL: if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_CDROM) < 0) { fprintf(stderr, "Error: %s\n", SDL_GetError()); exit(1); } When you're done: SDL_Quit();
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_CDROM) < 0) { fprintf(stderr, "Error: %s\n", SDL_GetError()); exit(1); }
SDL_Quit();