Added SDL 1c0f6952e65e.

This commit is contained in:
rude
2015-03-15 15:47:43 +01:00
parent 4d04ac181e
commit 6a2aff6450
1109 changed files with 160136 additions and 33995 deletions
+12 -11
View File
@@ -26,6 +26,7 @@
/* Simple log messages in SDL */
#include "SDL_error.h"
#include "SDL_log.h"
#if HAVE_STDIO_H
@@ -41,9 +42,6 @@
#define DEFAULT_APPLICATION_PRIORITY SDL_LOG_PRIORITY_INFO
#define DEFAULT_TEST_PRIORITY SDL_LOG_PRIORITY_VERBOSE
/* Forward definition of error function */
extern int SDL_SetError(const char *fmt, ...);
typedef struct SDL_LogLevel
{
int category;
@@ -172,7 +170,7 @@ SDL_LogResetPriorities(void)
}
void
SDL_Log(const char *fmt, ...)
SDL_Log(SDL_PRINTF_FORMAT_STRING const char *fmt, ...)
{
va_list ap;
@@ -182,7 +180,7 @@ SDL_Log(const char *fmt, ...)
}
void
SDL_LogVerbose(int category, const char *fmt, ...)
SDL_LogVerbose(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...)
{
va_list ap;
@@ -192,7 +190,7 @@ SDL_LogVerbose(int category, const char *fmt, ...)
}
void
SDL_LogDebug(int category, const char *fmt, ...)
SDL_LogDebug(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...)
{
va_list ap;
@@ -202,7 +200,7 @@ SDL_LogDebug(int category, const char *fmt, ...)
}
void
SDL_LogInfo(int category, const char *fmt, ...)
SDL_LogInfo(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...)
{
va_list ap;
@@ -212,7 +210,7 @@ SDL_LogInfo(int category, const char *fmt, ...)
}
void
SDL_LogWarn(int category, const char *fmt, ...)
SDL_LogWarn(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...)
{
va_list ap;
@@ -222,7 +220,7 @@ SDL_LogWarn(int category, const char *fmt, ...)
}
void
SDL_LogError(int category, const char *fmt, ...)
SDL_LogError(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...)
{
va_list ap;
@@ -232,7 +230,7 @@ SDL_LogError(int category, const char *fmt, ...)
}
void
SDL_LogCritical(int category, const char *fmt, ...)
SDL_LogCritical(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...)
{
va_list ap;
@@ -242,7 +240,7 @@ SDL_LogCritical(int category, const char *fmt, ...)
}
void
SDL_LogMessage(int category, SDL_LogPriority priority, const char *fmt, ...)
SDL_LogMessage(int category, SDL_LogPriority priority, SDL_PRINTF_FORMAT_STRING const char *fmt, ...)
{
va_list ap;
@@ -415,6 +413,9 @@ SDL_LogOutput(void *userdata, int category, SDL_LogPriority priority,
#endif
#if HAVE_STDIO_H
fprintf(stderr, "%s: %s\n", SDL_priority_prefixes[priority], message);
#if __NACL__
fflush(stderr);
#endif
#endif
}