(verbosity.c) Cleanups

This commit is contained in:
twinaphex 2019-08-15 12:43:59 +02:00
parent df8a024b82
commit 498c1b8538

View File

@ -184,7 +184,6 @@ void RARCH_LOG_V(const char *tag, const char *fmt, va_list ap)
asl_free(msg);
#endif
#elif defined(_XBOX1)
{
/* FIXME: Using arbitrary string as fmt argument is unsafe. */
char msg_new[256];
char buffer[256];
@ -196,9 +195,7 @@ void RARCH_LOG_V(const char *tag, const char *fmt, va_list ap)
fmt);
wvsprintf(buffer, msg_new, ap);
OutputDebugStringA(buffer);
}
#elif defined(ANDROID)
{
int prio = ANDROID_LOG_INFO;
if (tag)
{
@ -218,16 +215,10 @@ void RARCH_LOG_V(const char *tag, const char *fmt, va_list ap)
file_path_str(FILE_PATH_PROGRAM_NAME),
fmt,
ap);
}
#else
{
FILE *fp = (FILE*)log_file_fp;
#if defined(HAVE_QT) || defined(__WINRT__)
char buffer[256];
#endif
FILE *fp = (FILE*)retro_main_log_file();
#if defined(HAVE_QT) || defined(__WINRT__)
buffer[0] = '\0';
vsnprintf(buffer, sizeof(buffer), fmt, ap);
@ -260,7 +251,6 @@ void RARCH_LOG_V(const char *tag, const char *fmt, va_list ap)
#endif
#endif
}
#endif
}
@ -301,7 +291,7 @@ void RARCH_LOG(const char *fmt, ...)
{
va_list ap;
if (!verbosity_is_enabled())
if (!main_verbosity)
return;
va_start(ap, fmt);
@ -321,7 +311,7 @@ void RARCH_WARN(const char *fmt, ...)
{
va_list ap;
if (!verbosity_is_enabled())
if (!main_verbosity)
return;
va_start(ap, fmt);
@ -333,7 +323,7 @@ void RARCH_ERR(const char *fmt, ...)
{
va_list ap;
if (!verbosity_is_enabled())
if (!main_verbosity)
return;
va_start(ap, fmt);