mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-13 15:44:36 +00:00
Updates SDL to version 2.0.4, which makes it compatible with VS2015.
This commit is contained in:
parent
7b52fed504
commit
b63ef177f4
924 changed files with 79241 additions and 39934 deletions
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
|
@ -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;
|
||||
|
||||
|
|
@ -373,9 +371,9 @@ SDL_LogOutput(void *userdata, int category, SDL_LogPriority priority,
|
|||
if (consoleAttached == 1) {
|
||||
if (!WriteConsole(stderrHandle, tstr, lstrlen(tstr), &charsWritten, NULL)) {
|
||||
OutputDebugString(TEXT("Error calling WriteConsole\r\n"));
|
||||
}
|
||||
if (charsWritten == ERROR_NOT_ENOUGH_MEMORY) {
|
||||
OutputDebugString(TEXT("Insufficient heap memory to write message\r\n"));
|
||||
if (GetLastError() == ERROR_NOT_ENOUGH_MEMORY) {
|
||||
OutputDebugString(TEXT("Insufficient heap memory to write message\r\n"));
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif /* ifndef __WINRT__ */
|
||||
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue