Skip to content

Commit

Permalink
iOS 9 build fix (#16980)
Browse files Browse the repository at this point in the history
  • Loading branch information
warmenhoven authored Sep 8, 2024
1 parent d60d320 commit 0d6b249
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions playlist.c
Original file line number Diff line number Diff line change
Expand Up @@ -1144,6 +1144,7 @@ void playlist_resolve_path(enum playlist_file_mode mode,
{
#ifdef HAVE_COCOATOUCH
char tmp[PATH_MAX_LENGTH];
int _len = 0;

if (mode == PLAYLIST_LOAD)
{
Expand All @@ -1159,16 +1160,16 @@ void playlist_resolve_path(enum playlist_file_mode mode,
path[string_index_last_occurance(path, '.')] = '\0';
if (string_ends_with(path, "_ios"))
path[string_index_last_occurance(path, '_')] = '\0';
strlcpy(tmp, ":/Frameworks/", STRLEN_CONST(":/Frameworks/") + 1);
strlcpy(tmp + STRLEN_CONST(":/Frameworks/"), path + STRLEN_CONST(":/modules/"), sizeof(tmp) - STRLEN_CONST(":/Frameworks/"));
_len += strlcpy(tmp + _len, ":/Frameworks/", STRLEN_CONST(":/Frameworks/") + 1);
_len += strlcpy(tmp + _len, path + STRLEN_CONST(":/modules/"), sizeof(tmp) - _len);
/* iOS framework names, to quote Apple:
* "must contain only alphanumerics, dots, hyphens and must not end with a dot."
*
* Since core names include underscore, which is not allowed, but not dot,
* which is, we change underscore to dot.
*/
string_replace_all_chars(tmp, '_', '.');
strlcat(tmp, ".framework", sizeof(tmp));
strlcpy(tmp + _len, ".framework", sizeof(tmp));
fill_pathname_expand_special(path, tmp, len);
}
else
Expand Down
2 changes: 1 addition & 1 deletion ui/drivers/cocoa/cocoa_common.m
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ -(void)viewDidLoad {
hideKeyboardSwipe.delegate = self;
[self.view addGestureRecognizer:hideKeyboardSwipe];
#endif
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000
#if defined(HAVE_IOS_TOUCHMOUSE) || defined(HAVE_IOS_CUSTOMKEYBOARDS)
if (@available(iOS 13, *))
[self setupHelperBar];
#endif
Expand Down

0 comments on commit 0d6b249

Please sign in to comment.