logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

SDL_AppQuit - App-implemented deinit entry point for SDL_MAIN_USE_CALLBACKS

Availability

       This function is available since SDL 3.2.0.

Description

       Apps implement this function when using

       SDL_MAIN_USE_CALLBACKS . If using a standard "main" function, you should not supply this.

       This function is called once by SDL before terminating the program.

       This function will be called no matter what, even if

       SDL_AppInit
        requests termination.

       This  function  should  not go into an infinite mainloop; it should deinitialize any resources necessary,
       perform whatever shutdown activities, and return.

       You do not need to call SDL_Quit () in this function, as SDL will call it after this function returns and
       before the process terminates, but it is safe to do so.

       The appstate parameter is an optional pointer provided by the app during

       SDL_AppInit (). If the app never provided a pointer, this will be NULL. This function call  is  the  last
       time this pointer will be provided, so any resources to it should be cleaned up here.

       This function is called by SDL on the main thread.

Function Parameters

appstate
              an optional pointer, provided by the app in SDL_AppInit .

       result the result code that terminated the app (success or failure).

Header File

       Defined in SDL3/SDL_main.h

Name

       SDL_AppQuit - App-implemented deinit entry point for SDL_MAIN_USE_CALLBACKS
        apps.

See Also

(3), SDL_AppInit(3)

Simple Directmedia Layer                           SDL 3.2.10                                     SDL_AppQuit(3)

Synopsis

#include"SDL3/SDL.h"voidSDL_AppQuit(void*appstate,SDL_AppResultresult);

Thread Safety

SDL_AppEvent  ()  may  get  called  concurrently with this function if other threads that push events are
       still active.

See Also