apple: bundle identifier in Information menu

This commit is contained in:
Eric Warmenhoven 2025-03-13 14:38:18 -04:00
parent a21643b7fa
commit 631f318e28
3 changed files with 27 additions and 0 deletions

View File

@ -658,6 +658,10 @@ MSG_HASH(
MENU_ENUM_LABEL_VALUE_JIT_AVAILABLE,
"JIT Available"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_BUNDLE_IDENTIFIER,
"Bundle Identifier"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_FRONTEND_IDENTIFIER,
"Frontend Identifier"

View File

@ -1931,6 +1931,28 @@ static unsigned menu_displaylist_parse_system_info(file_list_t *list)
count++;
}
#endif
#ifdef __APPLE__
{
CFBundleRef mainBundle = CFBundleGetMainBundle();
if (mainBundle)
{
CFStringRef bundleIdentifier = CFBundleGetIdentifier(mainBundle);
if (bundleIdentifier)
{
size_t _len = strlcpy(entry,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_BUNDLE_IDENTIFIER),
sizeof(entry));
Boolean result = CFStringGetCString(bundleIdentifier, entry + _len, sizeof(entry) - _len, kCFStringEncodingUTF8);
if (result) {
if (menu_entries_append(list, entry, "",
MENU_ENUM_LABEL_SYSTEM_INFO_ENTRY, MENU_SETTINGS_CORE_INFO_NONE,
0, 0, NULL))
count++;
}
}
}
}
#endif
/* Input devices */
{

View File

@ -877,6 +877,7 @@ enum msg_hash_enums
MENU_LABEL(CPU_CORES),
MENU_LABEL(CPU_ARCHITECTURE),
MENU_LABEL(JIT_AVAILABLE),
MENU_LABEL(BUNDLE_IDENTIFIER),
/* Input */