diff --git a/apple/common/main.m b/apple/common/main.m index 0a23f247db..88623c2775 100644 --- a/apple/common/main.m +++ b/apple/common/main.m @@ -39,11 +39,14 @@ void apple_run_core(NSString* core, const char* file) if (!apple_is_running) { #ifndef OSX - char basedir[256]; - fill_pathname_basedir(basedir, file, sizeof(basedir)); - if (file && access(basedir, R_OK | W_OK | X_OK)) - apple_display_alert(@"The directory containing the selected file has limited permissions. This may " - "prevent zipped content from loading, and will cause some cores to not function.", 0); + if (core && file) + { + char basedir[256]; + fill_pathname_basedir(basedir, file, sizeof(basedir)); + if (access(basedir, R_OK | W_OK | X_OK)) + apple_display_alert(@"The directory containing the selected file has limited permissions. This may " + "prevent zipped content from loading, and will cause some cores to not function.", 0); + } #endif [apple_platform loadingCore:core withFile:file]; diff --git a/apple/iOS/platform.m b/apple/iOS/platform.m index 33c77f9976..b31d521d53 100644 --- a/apple/iOS/platform.m +++ b/apple/iOS/platform.m @@ -61,13 +61,6 @@ const void* apple_get_frontend_settings(void) if (settings[0].type == ST_NONE) { - const char* btoptions = "none|icade|keyboard"; - - if (is_ios_7()) - btoptions = "none|icade"; - else if (btstack_try_load()) - btoptions = "none|icade|keyboard|btstack"; - settings[0] = setting_data_group_setting(ST_GROUP, "Frontend Settings"); settings[1] = setting_data_group_setting(ST_SUB_GROUP, "Frontend"); settings[2] = setting_data_bool_setting("ios_use_file_log", "Enable File Logging", diff --git a/logger/ios_logger_override.h b/logger/ios_logger_override.h index 469d1f876a..83a01dec9d 100644 --- a/logger/ios_logger_override.h +++ b/logger/ios_logger_override.h @@ -25,7 +25,7 @@ static inline void RARCH_LOG_V(const char *tag, const char *fmt, va_list ap) aslmsg msg = asl_new(ASL_TYPE_MSG); asl_set(msg, ASL_KEY_READ_UID, "-1"); if (tag) - asl_log(NULL, msg, ASL_LEVEL_NOTICE, tag); + asl_log(NULL, msg, ASL_LEVEL_NOTICE, "%s", tag); asl_vlog(NULL, msg, ASL_LEVEL_NOTICE, fmt, ap); asl_free(msg); } @@ -40,15 +40,7 @@ static inline void RARCH_LOG(const char *fmt, ...) static inline void RARCH_LOG_OUTPUT_V(const char *tag, const char *fmt, va_list ap) { - va_list ap; - va_start(ap, fmt); - aslmsg msg = asl_new(ASL_TYPE_MSG); - asl_set(msg, ASL_KEY_READ_UID, "-1"); - if (tag) - asl_log(NULL, msg, ASL_LEVEL_NOTICE, tag); - asl_vlog(NULL, msg, ASL_LEVEL_NOTICE, fmt, ap); - asl_free(msg); - va_end(ap); + RARCH_LOG_V(tag, fmt, ap); } static inline void RARCH_LOG_OUTPUT(const char *fmt, ...) @@ -59,17 +51,9 @@ static inline void RARCH_LOG_OUTPUT(const char *fmt, ...) va_end(ap); } -static inline void RARCH_WARN_V(const char *tag, const char *fmt, ...) +static inline void RARCH_WARN_V(const char *tag, const char *fmt, va_list ap) { - va_list ap; - va_start(ap, fmt); - aslmsg msg = asl_new(ASL_TYPE_MSG); - asl_set(msg, ASL_KEY_READ_UID, "-1"); - if (tag) - asl_log(NULL, msg, ASL_LEVEL_NOTICE, tag); - asl_vlog(NULL, msg, ASL_LEVEL_NOTICE, fmt, ap); - asl_free(msg); - va_end(ap); + RARCH_LOG_V(tag, fmt, ap); } static inline void RARCH_WARN(const char *fmt, ...) @@ -80,17 +64,9 @@ static inline void RARCH_WARN(const char *fmt, ...) va_end(ap); } -static inline void RARCH_ERR_V(const char *tag, const char *fmt, ...) +static inline void RARCH_ERR_V(const char *tag, const char *fmt, va_list ap) { - va_list ap; - va_start(ap, fmt); - aslmsg msg = asl_new(ASL_TYPE_MSG); - asl_set(msg, ASL_KEY_READ_UID, "-1"); - if (tag) - asl_log(NULL, msg, ASL_LEVEL_NOTICE, tag); - asl_vlog(NULL, msg, ASL_LEVEL_NOTICE, fmt, ap); - asl_free(msg); - va_end(ap); + RARCH_LOG_V(tag, fmt, ap); } static inline void RARCH_ERR(const char *fmt, ...)