snake: Add basic app metadata

All SDL3 applications and games should ideally have this.

Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
Simon McVittie
2024-10-07 12:23:24 +01:00
committed by Ryan C. Gordon
parent 6ae5666acf
commit ca82405d5a

View File

@@ -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;
}