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.

(cherry picked from commit a49ba90257)
This commit is contained in:
Ryan C. Gordon 2026-05-26 15:26:31 -04:00
parent 2621d7aab2
commit 58c2de8e25
No known key found for this signature in database
GPG key ID: FA148B892AB48044

View file

@ -173,7 +173,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";
}