Updated SDL 1.3 to the latest hg-5868:33245988e8a2 , video resize is not supported yet
This commit is contained in:
@@ -1,23 +1,22 @@
|
||||
/*
|
||||
SDL - Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2010 Sam Lantinga
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2011 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Sam Lantinga
|
||||
slouken@libsdl.org
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
|
||||
@@ -27,8 +26,7 @@
|
||||
|
||||
#if defined(__WIN32__) && !defined(_WIN32_WCE)
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
#include "../core/windows/SDL_windows.h"
|
||||
|
||||
/* Note this isn't thread-safe! */
|
||||
|
||||
@@ -41,12 +39,12 @@ SDL_setenv(const char *name, const char *value, int overwrite)
|
||||
{
|
||||
if (!overwrite) {
|
||||
char ch = 0;
|
||||
const size_t len = GetEnvironmentVariable(name, &ch, sizeof (ch));
|
||||
const size_t len = GetEnvironmentVariableA(name, &ch, sizeof (ch));
|
||||
if (len > 0) {
|
||||
return 0; /* asked not to overwrite existing value. */
|
||||
}
|
||||
}
|
||||
if (!SetEnvironmentVariable(name, *value ? value : NULL)) {
|
||||
if (!SetEnvironmentVariableA(name, *value ? value : NULL)) {
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
@@ -59,7 +57,7 @@ SDL_getenv(const char *name)
|
||||
size_t bufferlen;
|
||||
|
||||
bufferlen =
|
||||
GetEnvironmentVariable(name, SDL_envmem, (DWORD) SDL_envmemlen);
|
||||
GetEnvironmentVariableA(name, SDL_envmem, (DWORD) SDL_envmemlen);
|
||||
if (bufferlen == 0) {
|
||||
return NULL;
|
||||
}
|
||||
@@ -70,7 +68,7 @@ SDL_getenv(const char *name)
|
||||
}
|
||||
SDL_envmem = newmem;
|
||||
SDL_envmemlen = bufferlen;
|
||||
GetEnvironmentVariable(name, SDL_envmem, (DWORD) SDL_envmemlen);
|
||||
GetEnvironmentVariableA(name, SDL_envmem, (DWORD) SDL_envmemlen);
|
||||
}
|
||||
return SDL_envmem;
|
||||
}
|
||||
|
||||
@@ -1,23 +1,22 @@
|
||||
/*
|
||||
SDL - Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2010 Sam Lantinga
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2011 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Sam Lantinga
|
||||
slouken@libsdl.org
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
|
||||
@@ -32,8 +31,8 @@
|
||||
iconv() may or may not use const char ** for the inbuf param.
|
||||
If we get this wrong, it's just a warning, so no big deal.
|
||||
*/
|
||||
#if defined(_XGP6) || \
|
||||
defined(__GLIBC__) && ((__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2))
|
||||
#if defined(_XGP6) || defined(__APPLE__) || \
|
||||
(defined(__GLIBC__) && ((__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)))
|
||||
#define ICONV_INBUF_NONCONST
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,23 +1,22 @@
|
||||
/*
|
||||
SDL - Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2010 Sam Lantinga
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2011 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Sam Lantinga
|
||||
slouken@libsdl.org
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
|
||||
|
||||
@@ -1,23 +1,22 @@
|
||||
/*
|
||||
SDL - Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2010 Sam Lantinga
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2011 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Sam Lantinga
|
||||
slouken@libsdl.org
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
|
||||
@@ -35,9 +34,44 @@
|
||||
__declspec(selectany) int _fltused = 1;
|
||||
#endif
|
||||
|
||||
#ifdef _WIN64
|
||||
/* The optimizer on Visual Studio 2010 generates memcpy() calls */
|
||||
#if _MSC_VER == 1600 && defined(_WIN64) && !defined(_DEBUG)
|
||||
#include <intrin.h>
|
||||
|
||||
#else
|
||||
#pragma function(memcpy)
|
||||
void * memcpy ( void * destination, const void * source, size_t num )
|
||||
{
|
||||
const Uint8 *src = (const Uint8 *)source;
|
||||
Uint8 *dst = (Uint8 *)destination;
|
||||
size_t i;
|
||||
|
||||
/* All WIN64 architectures have SSE, right? */
|
||||
if (!((uintptr_t) src & 15) && !((uintptr_t) dst & 15)) {
|
||||
__m128 values[4];
|
||||
for (i = num / 64; i--;) {
|
||||
_mm_prefetch(src, _MM_HINT_NTA);
|
||||
values[0] = *(__m128 *) (src + 0);
|
||||
values[1] = *(__m128 *) (src + 16);
|
||||
values[2] = *(__m128 *) (src + 32);
|
||||
values[3] = *(__m128 *) (src + 48);
|
||||
_mm_stream_ps((float *) (dst + 0), values[0]);
|
||||
_mm_stream_ps((float *) (dst + 16), values[1]);
|
||||
_mm_stream_ps((float *) (dst + 32), values[2]);
|
||||
_mm_stream_ps((float *) (dst + 48), values[3]);
|
||||
src += 64;
|
||||
dst += 64;
|
||||
}
|
||||
num &= 63;
|
||||
}
|
||||
|
||||
while (num--) {
|
||||
*dst++ = *src++;
|
||||
}
|
||||
return destination;
|
||||
}
|
||||
#endif /* _MSC_VER == 1600 && defined(_WIN64) && !defined(_DEBUG) */
|
||||
|
||||
#ifdef _M_IX86
|
||||
|
||||
void
|
||||
__declspec(naked)
|
||||
@@ -699,7 +733,7 @@ RETZERO:
|
||||
/* *INDENT-ON* */
|
||||
}
|
||||
|
||||
#endif /* _WIN64 */
|
||||
#endif /* _M_IX86 */
|
||||
|
||||
#endif /* MSC_VER */
|
||||
|
||||
|
||||
@@ -1,23 +1,22 @@
|
||||
/*
|
||||
SDL - Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2010 Sam Lantinga
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2011 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Sam Lantinga
|
||||
slouken@libsdl.org
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
|
||||
@@ -32,9 +31,9 @@
|
||||
#define UTF8_IsLeadByte(c) ((c) >= 0xC0 && (c) <= 0xF4)
|
||||
#define UTF8_IsTrailingByte(c) ((c) >= 0x80 && (c) <= 0xBF)
|
||||
|
||||
int UTF8_TrailingBytes(unsigned char c)
|
||||
static int UTF8_TrailingBytes(unsigned char c)
|
||||
{
|
||||
if (c >= 0xC0 && c<= 0xDF)
|
||||
if (c >= 0xC0 && c <= 0xDF)
|
||||
return 1;
|
||||
else if (c >= 0xE0 && c <= 0xEF)
|
||||
return 2;
|
||||
@@ -149,7 +148,6 @@ SDL_ScanUintPtrT(const char *text, int radix, uintptr_t * valuep)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SDL_HAS_64BIT_TYPE
|
||||
#if !defined(HAVE_SSCANF) || !defined(HAVE_STRTOLL)
|
||||
static size_t
|
||||
SDL_ScanLongLong(const char *text, int radix, Sint64 * valuep)
|
||||
@@ -222,7 +220,6 @@ SDL_ScanUnsignedLongLong(const char *text, int radix, Uint64 * valuep)
|
||||
return (text - textstart);
|
||||
}
|
||||
#endif
|
||||
#endif /* SDL_HAS_64BIT_TYPE */
|
||||
|
||||
#if !defined(HAVE_SSCANF) || !defined(HAVE_STRTOD)
|
||||
static size_t
|
||||
@@ -265,31 +262,27 @@ void *
|
||||
SDL_memset(void *dst, int c, size_t len)
|
||||
{
|
||||
size_t left = (len % 4);
|
||||
if (len >= 4) {
|
||||
Uint32 value = 0;
|
||||
Uint32 *dstp = (Uint32 *) dst;
|
||||
int i;
|
||||
for (i = 0; i < 4; ++i) {
|
||||
value <<= 8;
|
||||
value |= c;
|
||||
}
|
||||
len /= 4;
|
||||
while (len--) {
|
||||
*dstp++ = value;
|
||||
}
|
||||
Uint32 *dstp4;
|
||||
Uint8 *dstp1;
|
||||
Uint32 value4 = (c | (c << 8) | (c << 16) | (c << 24));
|
||||
Uint8 value1 = (Uint8) c;
|
||||
|
||||
dstp4 = (Uint32 *) dst;
|
||||
len /= 4;
|
||||
while (len--) {
|
||||
*dstp4++ = value4;
|
||||
}
|
||||
if (left > 0) {
|
||||
Uint8 value = (Uint8) c;
|
||||
Uint8 *dstp = (Uint8 *) dst;
|
||||
switch (left) {
|
||||
case 3:
|
||||
*dstp++ = value;
|
||||
case 2:
|
||||
*dstp++ = value;
|
||||
case 1:
|
||||
*dstp++ = value;
|
||||
}
|
||||
|
||||
dstp1 = (Uint8 *) dstp4;
|
||||
switch (left) {
|
||||
case 3:
|
||||
*dstp1++ = value1;
|
||||
case 2:
|
||||
*dstp1++ = value1;
|
||||
case 1:
|
||||
*dstp1++ = value1;
|
||||
}
|
||||
|
||||
return dst;
|
||||
}
|
||||
#endif
|
||||
@@ -298,25 +291,49 @@ SDL_memset(void *dst, int c, size_t len)
|
||||
void *
|
||||
SDL_memcpy(void *dst, const void *src, size_t len)
|
||||
{
|
||||
char *srcp = (char *) src;
|
||||
char *dstp = (char *) dst;
|
||||
size_t left = (len % 4);
|
||||
Uint32 *srcp4, *dstp4;
|
||||
Uint8 *srcp1, *dstp1;
|
||||
|
||||
srcp4 = (Uint32 *) src;
|
||||
dstp4 = (Uint32 *) dst;
|
||||
len /= 4;
|
||||
while (len--) {
|
||||
*dstp++ = *srcp++;
|
||||
*dstp4++ = *srcp4++;
|
||||
}
|
||||
|
||||
srcp1 = (Uint8 *) srcp4;
|
||||
dstp1 = (Uint8 *) dstp4;
|
||||
switch (left) {
|
||||
case 3:
|
||||
*dstp1++ = *srcp1++;
|
||||
case 2:
|
||||
*dstp1++ = *srcp1++;
|
||||
case 1:
|
||||
*dstp1++ = *srcp1++;
|
||||
}
|
||||
|
||||
return dst;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef SDL_revcpy
|
||||
#ifndef SDL_memmove
|
||||
void *
|
||||
SDL_revcpy(void *dst, const void *src, size_t len)
|
||||
SDL_memmove(void *dst, const void *src, size_t len)
|
||||
{
|
||||
char *srcp = (char *) src;
|
||||
char *dstp = (char *) dst;
|
||||
srcp += len - 1;
|
||||
dstp += len - 1;
|
||||
while (len--) {
|
||||
*dstp-- = *srcp--;
|
||||
|
||||
if (src < dst) {
|
||||
srcp += len - 1;
|
||||
dstp += len - 1;
|
||||
while (len--) {
|
||||
*dstp-- = *srcp--;
|
||||
}
|
||||
} else {
|
||||
while (len--) {
|
||||
*dstp++ = *srcp++;
|
||||
}
|
||||
}
|
||||
return dst;
|
||||
}
|
||||
@@ -408,7 +425,7 @@ size_t SDL_utf8strlcpy(char *dst, const char *src, size_t dst_bytes)
|
||||
{
|
||||
size_t src_bytes = SDL_strlen(src);
|
||||
size_t bytes = SDL_min(src_bytes, dst_bytes - 1);
|
||||
int i = 0;
|
||||
size_t i = 0;
|
||||
char trailing_bytes = 0;
|
||||
if (bytes)
|
||||
{
|
||||
@@ -659,8 +676,6 @@ SDL_strtoul(const char *string, char **endp, int base)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SDL_HAS_64BIT_TYPE
|
||||
|
||||
#ifndef HAVE__I64TOA
|
||||
char *
|
||||
SDL_lltoa(Sint64 value, char *string, int radix)
|
||||
@@ -761,8 +776,6 @@ SDL_strtoull(const char *string, char **endp, int base)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* SDL_HAS_64BIT_TYPE */
|
||||
|
||||
#ifndef HAVE_STRTOD
|
||||
double
|
||||
SDL_strtod(const char *string, char **endp)
|
||||
@@ -845,8 +858,8 @@ SDL_strncasecmp(const char *str1, const char *str2, size_t maxlen)
|
||||
++str2;
|
||||
--maxlen;
|
||||
}
|
||||
a = SDL_tolower(*str1);
|
||||
b = SDL_tolower(*str2);
|
||||
a = SDL_tolower((unsigned char) *str1);
|
||||
b = SDL_tolower((unsigned char) *str2);
|
||||
return (int) ((unsigned char) a - (unsigned char) b);
|
||||
}
|
||||
#endif
|
||||
@@ -956,7 +969,6 @@ SDL_sscanf(const char *text, const char *fmt, ...)
|
||||
}
|
||||
/* Fall through to %d handling */
|
||||
case 'd':
|
||||
#ifdef SDL_HAS_64BIT_TYPE
|
||||
if (inttype == DO_LONGLONG) {
|
||||
Sint64 value;
|
||||
text += SDL_ScanLongLong(text, radix, &value);
|
||||
@@ -965,9 +977,7 @@ SDL_sscanf(const char *text, const char *fmt, ...)
|
||||
*valuep = value;
|
||||
++retval;
|
||||
}
|
||||
} else
|
||||
#endif /* SDL_HAS_64BIT_TYPE */
|
||||
{
|
||||
} else {
|
||||
long value;
|
||||
text += SDL_ScanLong(text, radix, &value);
|
||||
if (!suppress) {
|
||||
@@ -1011,7 +1021,6 @@ SDL_sscanf(const char *text, const char *fmt, ...)
|
||||
}
|
||||
/* Fall through to unsigned handling */
|
||||
case 'u':
|
||||
#ifdef SDL_HAS_64BIT_TYPE
|
||||
if (inttype == DO_LONGLONG) {
|
||||
Uint64 value;
|
||||
text += SDL_ScanUnsignedLongLong(text, radix, &value);
|
||||
@@ -1020,9 +1029,7 @@ SDL_sscanf(const char *text, const char *fmt, ...)
|
||||
*valuep = value;
|
||||
++retval;
|
||||
}
|
||||
} else
|
||||
#endif /* SDL_HAS_64BIT_TYPE */
|
||||
{
|
||||
} else {
|
||||
unsigned long value;
|
||||
text += SDL_ScanUnsignedLong(text, radix, &value);
|
||||
if (!suppress) {
|
||||
@@ -1174,7 +1181,6 @@ SDL_PrintUnsignedLong(char *text, unsigned long value, int radix,
|
||||
return size;
|
||||
}
|
||||
|
||||
#ifdef SDL_HAS_64BIT_TYPE
|
||||
static size_t
|
||||
SDL_PrintLongLong(char *text, Sint64 value, int radix, size_t maxlen)
|
||||
{
|
||||
@@ -1206,7 +1212,7 @@ SDL_PrintUnsignedLongLong(char *text, Uint64 value, int radix, size_t maxlen)
|
||||
|
||||
return size;
|
||||
}
|
||||
#endif /* SDL_HAS_64BIT_TYPE */
|
||||
|
||||
static size_t
|
||||
SDL_PrintFloat(char *text, double arg, size_t maxlen)
|
||||
{
|
||||
@@ -1323,16 +1329,10 @@ SDL_vsnprintf(char *text, size_t maxlen, const char *fmt, va_list ap)
|
||||
radix, maxlen);
|
||||
break;
|
||||
case DO_LONGLONG:
|
||||
#ifdef SDL_HAS_64BIT_TYPE
|
||||
len =
|
||||
SDL_PrintLongLong(text,
|
||||
va_arg(ap, Sint64),
|
||||
radix, maxlen);
|
||||
#else
|
||||
len =
|
||||
SDL_PrintLong(text, va_arg(ap, long),
|
||||
radix, maxlen);
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
done = SDL_TRUE;
|
||||
@@ -1372,20 +1372,11 @@ SDL_vsnprintf(char *text, size_t maxlen, const char *fmt, va_list ap)
|
||||
radix, maxlen);
|
||||
break;
|
||||
case DO_LONGLONG:
|
||||
#ifdef SDL_HAS_64BIT_TYPE
|
||||
len =
|
||||
SDL_PrintUnsignedLongLong(text,
|
||||
va_arg(ap,
|
||||
Uint64),
|
||||
radix, maxlen);
|
||||
#else
|
||||
len =
|
||||
SDL_PrintUnsignedLong(text,
|
||||
va_arg(ap,
|
||||
unsigned
|
||||
long),
|
||||
radix, maxlen);
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
if (do_lowercase) {
|
||||
|
||||
Reference in New Issue
Block a user