init: Log '<unspecified>' not '(null)' if the app name isn't set.

Reference PR #11103.
This commit is contained in:
Ryan C. Gordon
2024-10-08 14:30:28 -04:00
parent fb8244d6d9
commit cba77834f2

View File

@@ -265,7 +265,7 @@ void SDL_InitMainThread(void)
const char *value;
value = SDL_GetAppMetadataProperty(SDL_PROP_APP_METADATA_NAME_STRING);
SDL_LogInfo(SDL_LOG_CATEGORY_SYSTEM, "App name: %s", value);
SDL_LogInfo(SDL_LOG_CATEGORY_SYSTEM, "App name: %s", value ? value : "<unspecified>");
value = SDL_GetAppMetadataProperty(SDL_PROP_APP_METADATA_VERSION_STRING);
SDL_LogInfo(SDL_LOG_CATEGORY_SYSTEM, "App version: %s", value ? value : "<unspecified>");
value = SDL_GetAppMetadataProperty(SDL_PROP_APP_METADATA_IDENTIFIER_STRING);