diff --git a/config.def.h b/config.def.h index 780d906849..1197731123 100644 --- a/config.def.h +++ b/config.def.h @@ -1413,7 +1413,14 @@ #define DEFAULT_FASTFORWARD_FRAMESKIP true /* Enable runloop for variable refresh rate screens. Force x1 speed while handling fast forward too. */ +#ifdef IOS +/* FIXME: coreaudio will cause the main thread to hang on backgrounding, causing + * a crash. the fix is to turn off audio synchronization. with that off, we need + * this on */ +#define DEFAULT_VRR_RUNLOOP_ENABLE true +#else #define DEFAULT_VRR_RUNLOOP_ENABLE false +#endif /* Run core logic one or more frames ahead then load the state back to reduce perceived input lag. */ #define DEFAULT_RUN_AHEAD_FRAMES 1 diff --git a/configuration.c b/configuration.c index c99b88bab7..1e37a8c8fd 100644 --- a/configuration.c +++ b/configuration.c @@ -1471,7 +1471,7 @@ bool config_overlay_enable_default(void) { if (g_defaults.overlay_set) return g_defaults.overlay_enable; -#if defined(RARCH_MOBILE) +#if defined(RARCH_MOBILE) && !TARGET_OS_TV return true; #else return false; diff --git a/frontend/drivers/platform_darwin.m b/frontend/drivers/platform_darwin.m index c9d135b799..cddd6e2167 100644 --- a/frontend/drivers/platform_darwin.m +++ b/frontend/drivers/platform_darwin.m @@ -721,7 +721,11 @@ static int frontend_darwin_parse_drive_list(void *data, bool load_content) if (list->size == 0) menu_entries_append(list, +#if TARGET_OS_TV + "~/Library/Caches/RetroArch", +#else "~/Documents/RetroArch", +#endif msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR), enum_idx, FILE_TYPE_DIRECTORY, 0, 0, NULL); @@ -811,6 +815,8 @@ static enum retro_language frontend_darwin_get_user_language(void) CFArrayRef langs = CFLocaleCopyPreferredLanguages(); CFStringRef langCode = CFArrayGetValueAtIndex(langs, 0); CFStringGetCString(langCode, s, sizeof(s), kCFStringEncodingUTF8); + /* iOS and OS X only support the language ID syntax consisting of a language designator and optional region or script designator. */ + string_replace_all_chars(s, '-', '_'); return retroarch_get_language_from_iso(s); } diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index 6a16485805..32b4c1f8d5 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -1980,8 +1980,11 @@ static int file_load_with_detect_core_wrapper( #if IOS char tmp_path[PATH_MAX_LENGTH]; - fill_pathname_expand_special(tmp_path, menu_path, sizeof(tmp_path)); - menu_path = tmp_path; + if (menu_path) + { + fill_pathname_expand_special(tmp_path, menu_path, sizeof(tmp_path)); + menu_path = tmp_path; + } #endif if (!string_is_empty(menu_path)) diff --git a/retroarch.c b/retroarch.c index 2d2391c977..1551e7cf77 100644 --- a/retroarch.c +++ b/retroarch.c @@ -8371,7 +8371,7 @@ enum retro_language retroarch_get_language_from_iso(const char *iso639) for (i = 0; i < ARRAY_SIZE(pairs); i++) { - if (strcasestr(iso639, pairs[i].iso639)) + if (string_starts_with_case_insensitive(iso639, pairs[i].iso639)) { lang = pairs[i].lang; break; diff --git a/runloop.c b/runloop.c index 635d245d52..a4bc004f26 100644 --- a/runloop.c +++ b/runloop.c @@ -240,7 +240,7 @@ #include "lakka.h" #endif -#if defined(HAVE_COCOATOUCH) && TARGET_OS_IOS +#if TARGET_OS_IPHONE #include "JITSupport.h" #endif @@ -3502,7 +3502,7 @@ bool runloop_environment_cb(unsigned cmd, void *data) case RETRO_ENVIRONMENT_GET_JIT_CAPABLE: { -#if defined(HAVE_COCOATOUCH) && TARGET_OS_IOS +#if TARGET_OS_IPHONE *(bool*)data = jit_available(); #else *(bool*)data = true; diff --git a/tasks/task_netplay_find_content.c b/tasks/task_netplay_find_content.c index 2bf46cbca2..43e3059af5 100644 --- a/tasks/task_netplay_find_content.c +++ b/tasks/task_netplay_find_content.c @@ -543,6 +543,11 @@ static void task_netplay_crc_scan_callback(retro_task_t *task, { const char *content_path = (state->state & STATE_RELOAD) ? data->current.content_path : data->content_paths.elems[0].data; +#if IOS + char tmp[PATH_MAX_LENGTH]; + fill_pathname_expand_special(tmp, content_path, sizeof(tmp)); + content_path = tmp; +#endif #ifdef HAVE_DYNAMIC content_ctx_info_t content_info = {0};