I want to do some background work if window is minimized or not active but how can I detect if the window is active or not in SDL?
SDL_GetWindowFlags() & check for the SDL_WINDOW_MINIMIZED/SDL_WINDOW_INPUT_FOCUS/SDL_WINDOW_MOUSE_FOCUS flags.
SDL_GetWindowFlags()
SDL_WINDOW_MINIMIZED
SDL_WINDOW_INPUT_FOCUS
SDL_WINDOW_MOUSE_FOCUS