Compatibility function to initialize the SDL library.
int SDL_InitSubSystem(Uint32 flags);
flags | any of the flags used by SDL_Init(); see SDL_Init for details. |
Returns 0 on success or a negative error code on failure; call SDL_GetError() for more information.
This function and SDL_Init() are interchangeable.
This function is available since SDL 3.0.0.
/* Separating Joystick and Video initialization. */
SDL_Init(SDL_INIT_VIDEO);
"A Window",
SDL_Window* window = SDL_CreateWindow(640, 480,
SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED,
SDL_WINDOW_FULLSCREEN);0);
SDL_Renderer* renderer = SDL_CreateRenderer(window, NULL,
/* Do Some Video stuff */
/* Initialize the joystick subsystem */
SDL_InitSubSystem(SDL_INIT_JOYSTICK);
/* Do some stuff with video and joystick */
/* Shut them both down */
SDL_Quit();