metadata: SDL_GetAppMetadataProperty() now uses SDL_GetExeName().

(for SDL_PROP_APP_METADATA_NAME_STRING if unset. If SDL_GetExeName() returns
NULL, it'll fallback to good ol' "SDL Application", as usual.)

Fixes #15692.
This commit is contained in:
Ryan C. Gordon
2026-05-26 15:26:31 -04:00
parent 7d29ce8e31
commit a49ba90257

View File

@@ -169,7 +169,10 @@ const char *SDL_GetAppMetadataProperty(const char *name)
}
if (!value || !*value) {
if (SDL_strcmp(name, SDL_PROP_APP_METADATA_NAME_STRING) == 0) {
value = "SDL Application";
value = SDL_GetExeName();
if (!value) {
value = "SDL Application";
}
} else if (SDL_strcmp(name, SDL_PROP_APP_METADATA_TYPE_STRING) == 0) {
value = "application";
}