Skip to content

Commit 9795fd2

Browse files
Merge pull request #17999 from libretro/warmenhoven/pr/apple-bundle-id
2 parents fec832a + 631f318 commit 9795fd2

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed

intl/msg_hash_us.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -658,6 +658,10 @@ MSG_HASH(
658658
MENU_ENUM_LABEL_VALUE_JIT_AVAILABLE,
659659
"JIT Available"
660660
)
661+
MSG_HASH(
662+
MENU_ENUM_LABEL_VALUE_BUNDLE_IDENTIFIER,
663+
"Bundle Identifier"
664+
)
661665
MSG_HASH(
662666
MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_FRONTEND_IDENTIFIER,
663667
"Frontend Identifier"

menu/menu_displaylist.c

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1934,6 +1934,28 @@ static unsigned menu_displaylist_parse_system_info(file_list_t *list)
19341934
count++;
19351935
}
19361936
#endif
1937+
#ifdef __APPLE__
1938+
{
1939+
CFBundleRef mainBundle = CFBundleGetMainBundle();
1940+
if (mainBundle)
1941+
{
1942+
CFStringRef bundleIdentifier = CFBundleGetIdentifier(mainBundle);
1943+
if (bundleIdentifier)
1944+
{
1945+
size_t _len = strlcpy(entry,
1946+
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_BUNDLE_IDENTIFIER),
1947+
sizeof(entry));
1948+
Boolean result = CFStringGetCString(bundleIdentifier, entry + _len, sizeof(entry) - _len, kCFStringEncodingUTF8);
1949+
if (result) {
1950+
if (menu_entries_append(list, entry, "",
1951+
MENU_ENUM_LABEL_SYSTEM_INFO_ENTRY, MENU_SETTINGS_CORE_INFO_NONE,
1952+
0, 0, NULL))
1953+
count++;
1954+
}
1955+
}
1956+
}
1957+
}
1958+
#endif
19371959

19381960
/* Input devices */
19391961
{

msg_hash.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -877,6 +877,7 @@ enum msg_hash_enums
877877
MENU_LABEL(CPU_CORES),
878878
MENU_LABEL(CPU_ARCHITECTURE),
879879
MENU_LABEL(JIT_AVAILABLE),
880+
MENU_LABEL(BUNDLE_IDENTIFIER),
880881

881882
/* Input */
882883

0 commit comments

Comments
 (0)