From ca82405d5ae6dc54fa332151a9815de2770700aa Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Mon, 7 Oct 2024 12:23:24 +0100 Subject: [PATCH] snake: Add basic app metadata All SDL3 applications and games should ideally have this. Signed-off-by: Simon McVittie --- examples/game/01-snake/snake.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/game/01-snake/snake.c b/examples/game/01-snake/snake.c index 7a9e87cf4b..669d8e1ab4 100644 --- a/examples/game/01-snake/snake.c +++ b/examples/game/01-snake/snake.c @@ -283,6 +283,10 @@ SDL_AppResult SDL_AppIterate(void *appstate) SDL_AppResult SDL_AppInit(void **appstate, int argc, char *argv[]) { + if (!SDL_SetAppMetadata("Example Snake game", "1.0", "com.example.Snake")) { + return SDL_APP_FAILURE; + } + if (!SDL_Init(SDL_INIT_VIDEO)) { return SDL_APP_FAILURE; }