mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-24 00:20:01 +00:00
Improve some log formatting on iOS/tvOS
This commit is contained in:
parent
b899f61c1f
commit
544d78d7b7
@ -60,6 +60,12 @@
|
||||
ReferencedContainer = "container:RetroArch_iOS13.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<CommandLineArguments>
|
||||
<CommandLineArgument
|
||||
argument = "-_UIConstraintBasedLayoutLogUnsatisfiable NO"
|
||||
isEnabled = "YES">
|
||||
</CommandLineArgument>
|
||||
</CommandLineArguments>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
|
@ -60,6 +60,12 @@
|
||||
ReferencedContainer = "container:RetroArch_iOS13.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<CommandLineArguments>
|
||||
<CommandLineArgument
|
||||
argument = "-_UIConstraintBasedLayoutLogUnsatisfiable NO"
|
||||
isEnabled = "YES">
|
||||
</CommandLineArgument>
|
||||
</CommandLineArguments>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
|
12
verbosity.c
12
verbosity.c
@ -24,12 +24,17 @@
|
||||
|
||||
#ifdef __MACH__
|
||||
#include <TargetConditionals.h>
|
||||
#include <Availability.h>
|
||||
#if TARGET_IPHONE_SIMULATOR
|
||||
#include <stdio.h>
|
||||
#else
|
||||
#if __IPHONE_OS_VERSION_MIN_REQUIRED > __IPHONE_10_0 || __TV_OS_VERSION_MIN_REQUIRED > __TVOS_10_0
|
||||
#include <os/log.h>
|
||||
#else
|
||||
#include <asl.h>
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
@ -282,6 +287,11 @@ void RARCH_LOG_V(const char *tag, const char *fmt, va_list ap)
|
||||
#if TARGET_OS_IPHONE
|
||||
#if TARGET_IPHONE_SIMULATOR
|
||||
vprintf(fmt, ap);
|
||||
#elif __IPHONE_OS_VERSION_MIN_REQUIRED > __IPHONE_10_0 || __TV_OS_VERSION_MIN_REQUIRED > __TVOS_10_0
|
||||
int sz = vsnprintf(NULL, 0, fmt, ap) + 1;
|
||||
char buffer[sz];
|
||||
vsnprintf(buffer, sz, fmt, ap);
|
||||
os_log(OS_LOG_DEFAULT, "%s %s", tag_v, buffer);
|
||||
#else
|
||||
static aslclient asl_client;
|
||||
static int asl_initialized = 0;
|
||||
@ -304,12 +314,14 @@ void RARCH_LOG_V(const char *tag, const char *fmt, va_list ap)
|
||||
#if defined(HAVE_LIBNX)
|
||||
mutexLock(&g_verbosity->mtx);
|
||||
#endif
|
||||
#if !TARGET_OS_TV
|
||||
if (fp)
|
||||
{
|
||||
fprintf(fp, "%s ", tag_v);
|
||||
vfprintf(fp, fmt, ap);
|
||||
fflush(fp);
|
||||
}
|
||||
#endif
|
||||
#if defined(HAVE_LIBNX)
|
||||
mutexUnlock(&g_verbosity->mtx);
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user