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_AppResult - Return values for optional main callbacks.

Availability

       This enum is available since SDL 3.2.0.

Simple Directmedia Layer                           SDL 3.2.20                               SDL_AppResult(3type)

Description

       Returning  SDL_APP_SUCCESS  or  SDL_APP_FAILURE  from  SDL_AppInit,  SDL_AppEvent, or SDL_AppIterate will
       terminate the program and report success/failure to the operating system. What that  means  is  platform-
       dependent.  On Unix, for example, on success, the process error code will be zero, and on failure it will
       be 1. This interface doesn't allow you to return specific exit codes, just whether  there  was  an  error
       generally or not.

       Returning SDL_APP_CONTINUE from these functions will let the app continue to run.

       See Main callbacks in SDL3 ⟨https://
       wiki.www:lenstrwww:splitstr:nwww:splitstr:r[char46]libsdl.www:lenstrwww:splitstr:nwww:splitstr:r[char46]org/
       SDL3/README/main-functions#main-callbacks-in-sdl3⟩
        for complete details.

Name

       SDL_AppResult - Return values for optional main callbacks.

Synopsis

#include<SDL3/SDL_init.h>typedefenumSDL_AppResult{SDL_APP_CONTINUE,/**<Valuethatrequeststhattheappcontinuefromthemaincallbacks.*/SDL_APP_SUCCESS,/**<Valuethatrequeststerminationwithsuccessfromthemaincallbacks.*/SDL_APP_FAILURE/**<Valuethatrequeststerminationwitherrorfromthemaincallbacks.*/}SDL_AppResult;

See Also