mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 10:40:46 +00:00
SDL 2.0.3 (plus a MinGW build fix that didn't make 2.0.3) for Windows builds.
git-svn-id: https://svn.eduke32.com/eduke32@4400 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
69d04171c0
commit
833fe67826
69 changed files with 3346 additions and 206 deletions
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -120,7 +120,16 @@ typedef struct SDL_assert_data
|
||||||
/* Never call this directly. Use the SDL_assert* macros. */
|
/* Never call this directly. Use the SDL_assert* macros. */
|
||||||
extern DECLSPEC SDL_assert_state SDLCALL SDL_ReportAssertion(SDL_assert_data *,
|
extern DECLSPEC SDL_assert_state SDLCALL SDL_ReportAssertion(SDL_assert_data *,
|
||||||
const char *,
|
const char *,
|
||||||
const char *, int);
|
const char *, int)
|
||||||
|
#if defined(__clang__)
|
||||||
|
#if __has_feature(attribute_analyzer_noreturn)
|
||||||
|
/* this tells Clang's static analysis that we're a custom assert function,
|
||||||
|
and that the analyzer should assume the condition was always true past this
|
||||||
|
SDL_assert test. */
|
||||||
|
__attribute__((analyzer_noreturn))
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
;
|
||||||
|
|
||||||
/* the do {} while(0) avoids dangling else problems:
|
/* the do {} while(0) avoids dangling else problems:
|
||||||
if (x) SDL_assert(y); else blah();
|
if (x) SDL_assert(y); else blah();
|
||||||
|
@ -202,6 +211,35 @@ extern DECLSPEC void SDLCALL SDL_SetAssertionHandler(
|
||||||
SDL_AssertionHandler handler,
|
SDL_AssertionHandler handler,
|
||||||
void *userdata);
|
void *userdata);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Get the default assertion handler.
|
||||||
|
*
|
||||||
|
* This returns the function pointer that is called by default when an
|
||||||
|
* assertion is triggered. This is an internal function provided by SDL,
|
||||||
|
* that is used for assertions when SDL_SetAssertionHandler() hasn't been
|
||||||
|
* used to provide a different function.
|
||||||
|
*
|
||||||
|
* \return The default SDL_AssertionHandler that is called when an assert triggers.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_AssertionHandler SDLCALL SDL_GetDefaultAssertionHandler(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Get the current assertion handler.
|
||||||
|
*
|
||||||
|
* This returns the function pointer that is called when an assertion is
|
||||||
|
* triggered. This is either the value last passed to
|
||||||
|
* SDL_SetAssertionHandler(), or if no application-specified function is
|
||||||
|
* set, is equivalent to calling SDL_GetDefaultAssertionHandler().
|
||||||
|
*
|
||||||
|
* \param puserdata Pointer to a void*, which will store the "userdata"
|
||||||
|
* pointer that was passed to SDL_SetAssertionHandler().
|
||||||
|
* This value will always be NULL for the default handler.
|
||||||
|
* If you don't care about this data, it is safe to pass
|
||||||
|
* a NULL pointer to this function to ignore it.
|
||||||
|
* \return The SDL_AssertionHandler that is called when an assert triggers.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_AssertionHandler SDLCALL SDL_GetAssertionHandler(void **puserdata);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Get a list of all assertion failures.
|
* \brief Get a list of all assertion failures.
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -64,13 +64,6 @@
|
||||||
|
|
||||||
#include "begin_code.h"
|
#include "begin_code.h"
|
||||||
|
|
||||||
/* Need to do this here because intrin.h has C++ code in it */
|
|
||||||
/* Visual Studio 2005 has a bug where intrin.h conflicts with winnt.h */
|
|
||||||
#if defined(_MSC_VER) && (_MSC_VER >= 1500)
|
|
||||||
#include <intrin.h>
|
|
||||||
#define HAVE_MSC_ATOMICS 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Set up for C function definitions, even when using C++ */
|
/* Set up for C function definitions, even when using C++ */
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
@ -181,57 +174,11 @@ extern DECLSPEC void SDLCALL SDL_MemoryBarrierAcquire();
|
||||||
#define SDL_MemoryBarrierAcquire() SDL_CompilerBarrier()
|
#define SDL_MemoryBarrierAcquire() SDL_CompilerBarrier()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Platform specific optimized versions of the atomic functions,
|
|
||||||
* you can disable these by defining SDL_DISABLE_ATOMIC_INLINE
|
|
||||||
*/
|
|
||||||
#if defined(SDL_ATOMIC_DISABLED) && SDL_ATOMIC_DISABLED
|
|
||||||
#define SDL_DISABLE_ATOMIC_INLINE
|
|
||||||
#endif
|
|
||||||
#ifndef SDL_DISABLE_ATOMIC_INLINE
|
|
||||||
|
|
||||||
#ifdef HAVE_MSC_ATOMICS
|
|
||||||
|
|
||||||
#define SDL_AtomicSet(a, v) _InterlockedExchange((long*)&(a)->value, (v))
|
|
||||||
#define SDL_AtomicAdd(a, v) _InterlockedExchangeAdd((long*)&(a)->value, (v))
|
|
||||||
#define SDL_AtomicCAS(a, oldval, newval) (_InterlockedCompareExchange((long*)&(a)->value, (newval), (oldval)) == (oldval))
|
|
||||||
#define SDL_AtomicSetPtr(a, v) _InterlockedExchangePointer((a), (v))
|
|
||||||
#if _M_IX86
|
|
||||||
#define SDL_AtomicCASPtr(a, oldval, newval) (_InterlockedCompareExchange((long*)(a), (long)(newval), (long)(oldval)) == (long)(oldval))
|
|
||||||
#else
|
|
||||||
#define SDL_AtomicCASPtr(a, oldval, newval) (_InterlockedCompareExchangePointer((a), (newval), (oldval)) == (oldval))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#elif defined(__MACOSX__)
|
|
||||||
#include <libkern/OSAtomic.h>
|
|
||||||
|
|
||||||
#define SDL_AtomicCAS(a, oldval, newval) OSAtomicCompareAndSwap32Barrier((oldval), (newval), &(a)->value)
|
|
||||||
#ifdef __LP64__
|
|
||||||
#define SDL_AtomicCASPtr(a, oldval, newval) OSAtomicCompareAndSwap64Barrier((int64_t)(oldval), (int64_t)(newval), (int64_t*)(a))
|
|
||||||
#else
|
|
||||||
#define SDL_AtomicCASPtr(a, oldval, newval) OSAtomicCompareAndSwap32Barrier((int32_t)(oldval), (int32_t)(newval), (int32_t*)(a))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#elif defined(HAVE_GCC_ATOMICS)
|
|
||||||
|
|
||||||
#define SDL_AtomicSet(a, v) __sync_lock_test_and_set(&(a)->value, v)
|
|
||||||
#define SDL_AtomicAdd(a, v) __sync_fetch_and_add(&(a)->value, v)
|
|
||||||
#define SDL_AtomicSetPtr(a, v) __sync_lock_test_and_set(a, v)
|
|
||||||
#define SDL_AtomicCAS(a, oldval, newval) __sync_bool_compare_and_swap(&(a)->value, oldval, newval)
|
|
||||||
#define SDL_AtomicCASPtr(a, oldval, newval) __sync_bool_compare_and_swap(a, oldval, newval)
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* !SDL_DISABLE_ATOMIC_INLINE */
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief A type representing an atomic integer value. It is a struct
|
* \brief A type representing an atomic integer value. It is a struct
|
||||||
* so people don't accidentally use numeric operations on it.
|
* so people don't accidentally use numeric operations on it.
|
||||||
*/
|
*/
|
||||||
#ifndef SDL_atomic_t_defined
|
|
||||||
typedef struct { int value; } SDL_atomic_t;
|
typedef struct { int value; } SDL_atomic_t;
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Set an atomic variable to a new value if it is currently an old value.
|
* \brief Set an atomic variable to a new value if it is currently an old value.
|
||||||
|
@ -240,37 +187,19 @@ typedef struct { int value; } SDL_atomic_t;
|
||||||
*
|
*
|
||||||
* \note If you don't know what this function is for, you shouldn't use it!
|
* \note If you don't know what this function is for, you shouldn't use it!
|
||||||
*/
|
*/
|
||||||
#ifndef SDL_AtomicCAS
|
|
||||||
extern DECLSPEC SDL_bool SDLCALL SDL_AtomicCAS(SDL_atomic_t *a, int oldval, int newval);
|
extern DECLSPEC SDL_bool SDLCALL SDL_AtomicCAS(SDL_atomic_t *a, int oldval, int newval);
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Set an atomic variable to a value.
|
* \brief Set an atomic variable to a value.
|
||||||
*
|
*
|
||||||
* \return The previous value of the atomic variable.
|
* \return The previous value of the atomic variable.
|
||||||
*/
|
*/
|
||||||
#ifndef SDL_AtomicSet
|
extern DECLSPEC int SDLCALL SDL_AtomicSet(SDL_atomic_t *a, int v);
|
||||||
SDL_FORCE_INLINE int SDL_AtomicSet(SDL_atomic_t *a, int v)
|
|
||||||
{
|
|
||||||
int value;
|
|
||||||
do {
|
|
||||||
value = a->value;
|
|
||||||
} while (!SDL_AtomicCAS(a, value, v));
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Get the value of an atomic variable
|
* \brief Get the value of an atomic variable
|
||||||
*/
|
*/
|
||||||
#ifndef SDL_AtomicGet
|
extern DECLSPEC int SDLCALL SDL_AtomicGet(SDL_atomic_t *a);
|
||||||
SDL_FORCE_INLINE int SDL_AtomicGet(SDL_atomic_t *a)
|
|
||||||
{
|
|
||||||
int value = a->value;
|
|
||||||
SDL_CompilerBarrier();
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Add to an atomic variable.
|
* \brief Add to an atomic variable.
|
||||||
|
@ -279,16 +208,7 @@ SDL_FORCE_INLINE int SDL_AtomicGet(SDL_atomic_t *a)
|
||||||
*
|
*
|
||||||
* \note This same style can be used for any number operation
|
* \note This same style can be used for any number operation
|
||||||
*/
|
*/
|
||||||
#ifndef SDL_AtomicAdd
|
extern DECLSPEC int SDLCALL SDL_AtomicAdd(SDL_atomic_t *a, int v);
|
||||||
SDL_FORCE_INLINE int SDL_AtomicAdd(SDL_atomic_t *a, int v)
|
|
||||||
{
|
|
||||||
int value;
|
|
||||||
do {
|
|
||||||
value = a->value;
|
|
||||||
} while (!SDL_AtomicCAS(a, value, (value + v)));
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Increment an atomic variable used as a reference count.
|
* \brief Increment an atomic variable used as a reference count.
|
||||||
|
@ -314,38 +234,19 @@ SDL_FORCE_INLINE int SDL_AtomicAdd(SDL_atomic_t *a, int v)
|
||||||
*
|
*
|
||||||
* \note If you don't know what this function is for, you shouldn't use it!
|
* \note If you don't know what this function is for, you shouldn't use it!
|
||||||
*/
|
*/
|
||||||
#ifndef SDL_AtomicCASPtr
|
extern DECLSPEC SDL_bool SDLCALL SDL_AtomicCASPtr(void **a, void *oldval, void *newval);
|
||||||
extern DECLSPEC SDL_bool SDLCALL SDL_AtomicCASPtr(void* *a, void *oldval, void *newval);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Set a pointer to a value atomically.
|
* \brief Set a pointer to a value atomically.
|
||||||
*
|
*
|
||||||
* \return The previous value of the pointer.
|
* \return The previous value of the pointer.
|
||||||
*/
|
*/
|
||||||
#ifndef SDL_AtomicSetPtr
|
extern DECLSPEC void* SDLCALL SDL_AtomicSetPtr(void **a, void* v);
|
||||||
SDL_FORCE_INLINE void* SDL_AtomicSetPtr(void* *a, void* v)
|
|
||||||
{
|
|
||||||
void* value;
|
|
||||||
do {
|
|
||||||
value = *a;
|
|
||||||
} while (!SDL_AtomicCASPtr(a, value, v));
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Get the value of a pointer atomically.
|
* \brief Get the value of a pointer atomically.
|
||||||
*/
|
*/
|
||||||
#ifndef SDL_AtomicGetPtr
|
extern DECLSPEC void* SDLCALL SDL_AtomicGetPtr(void **a);
|
||||||
SDL_FORCE_INLINE void* SDL_AtomicGetPtr(void* *a)
|
|
||||||
{
|
|
||||||
void* value = *a;
|
|
||||||
SDL_CompilerBarrier();
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/* Ends C function definitions when using C++ */
|
/* Ends C function definitions when using C++ */
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -118,6 +118,8 @@ typedef unsigned int uintptr_t;
|
||||||
#define HAVE__STRNICMP 1
|
#define HAVE__STRNICMP 1
|
||||||
#define HAVE_ATAN 1
|
#define HAVE_ATAN 1
|
||||||
#define HAVE_ATAN2 1
|
#define HAVE_ATAN2 1
|
||||||
|
#define HAVE_ACOS 1
|
||||||
|
#define HAVE_ASIN 1
|
||||||
#define HAVE_CEIL 1
|
#define HAVE_CEIL 1
|
||||||
#define HAVE_COS 1
|
#define HAVE_COS 1
|
||||||
#define HAVE_COSF 1
|
#define HAVE_COSF 1
|
||||||
|
@ -130,7 +132,7 @@ typedef unsigned int uintptr_t;
|
||||||
#define HAVE_SQRT 1
|
#define HAVE_SQRT 1
|
||||||
#if _MSC_VER >= 1800
|
#if _MSC_VER >= 1800
|
||||||
#define HAVE_STRTOLL 1
|
#define HAVE_STRTOLL 1
|
||||||
#define HAVE_SSCANF 1
|
#define HAVE_VSSCANF 1
|
||||||
#define HAVE_COPYSIGN 1
|
#define HAVE_COPYSIGN 1
|
||||||
#define HAVE_SCALBN 1
|
#define HAVE_SCALBN 1
|
||||||
#endif
|
#endif
|
||||||
|
@ -169,6 +171,9 @@ typedef unsigned int uintptr_t;
|
||||||
#ifndef SDL_VIDEO_RENDER_D3D
|
#ifndef SDL_VIDEO_RENDER_D3D
|
||||||
#define SDL_VIDEO_RENDER_D3D 1
|
#define SDL_VIDEO_RENDER_D3D 1
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef SDL_VIDEO_RENDER_D3D11
|
||||||
|
#define SDL_VIDEO_RENDER_D3D11 0
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Enable OpenGL support */
|
/* Enable OpenGL support */
|
||||||
#ifndef SDL_VIDEO_OPENGL
|
#ifndef SDL_VIDEO_OPENGL
|
||||||
|
@ -180,6 +185,16 @@ typedef unsigned int uintptr_t;
|
||||||
#ifndef SDL_VIDEO_RENDER_OGL
|
#ifndef SDL_VIDEO_RENDER_OGL
|
||||||
#define SDL_VIDEO_RENDER_OGL 1
|
#define SDL_VIDEO_RENDER_OGL 1
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef SDL_VIDEO_RENDER_OGL_ES2
|
||||||
|
#define SDL_VIDEO_RENDER_OGL_ES2 1
|
||||||
|
#endif
|
||||||
|
#ifndef SDL_VIDEO_OPENGL_ES2
|
||||||
|
#define SDL_VIDEO_OPENGL_ES2 1
|
||||||
|
#endif
|
||||||
|
#ifndef SDL_VIDEO_OPENGL_EGL
|
||||||
|
#define SDL_VIDEO_OPENGL_EGL 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Enable system power support */
|
/* Enable system power support */
|
||||||
#define SDL_POWER_WINDOWS 1
|
#define SDL_POWER_WINDOWS 1
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -32,7 +32,7 @@
|
||||||
|
|
||||||
/* Need to do this here because intrin.h has C++ code in it */
|
/* Need to do this here because intrin.h has C++ code in it */
|
||||||
/* Visual Studio 2005 has a bug where intrin.h conflicts with winnt.h */
|
/* Visual Studio 2005 has a bug where intrin.h conflicts with winnt.h */
|
||||||
#if defined(_MSC_VER) && (_MSC_VER >= 1500)
|
#if defined(_MSC_VER) && (_MSC_VER >= 1500) && (defined(_M_IX86) || defined(_M_X64))
|
||||||
#include <intrin.h>
|
#include <intrin.h>
|
||||||
#ifndef _WIN64
|
#ifndef _WIN64
|
||||||
#define __MMX__
|
#define __MMX__
|
||||||
|
@ -134,6 +134,11 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE41(void);
|
||||||
*/
|
*/
|
||||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE42(void);
|
extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE42(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function returns true if the CPU has AVX features.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function returns the amount of RAM configured in the system, in MB.
|
* This function returns the amount of RAM configured in the system, in MB.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -134,6 +134,9 @@ typedef enum
|
||||||
/* Drag and drop events */
|
/* Drag and drop events */
|
||||||
SDL_DROPFILE = 0x1000, /**< The system requests a file open */
|
SDL_DROPFILE = 0x1000, /**< The system requests a file open */
|
||||||
|
|
||||||
|
/* Render events */
|
||||||
|
SDL_RENDER_TARGETS_RESET = 0x2000, /**< The render targets have been reset */
|
||||||
|
|
||||||
/** Events ::SDL_USEREVENT through ::SDL_LASTEVENT are for your use,
|
/** Events ::SDL_USEREVENT through ::SDL_LASTEVENT are for your use,
|
||||||
* and should be allocated with SDL_RegisterEvents()
|
* and should be allocated with SDL_RegisterEvents()
|
||||||
*/
|
*/
|
||||||
|
@ -239,8 +242,8 @@ typedef struct SDL_MouseButtonEvent
|
||||||
Uint32 which; /**< The mouse instance id, or SDL_TOUCH_MOUSEID */
|
Uint32 which; /**< The mouse instance id, or SDL_TOUCH_MOUSEID */
|
||||||
Uint8 button; /**< The mouse button index */
|
Uint8 button; /**< The mouse button index */
|
||||||
Uint8 state; /**< ::SDL_PRESSED or ::SDL_RELEASED */
|
Uint8 state; /**< ::SDL_PRESSED or ::SDL_RELEASED */
|
||||||
|
Uint8 clicks; /**< 1 for single-click, 2 for double-click, etc. */
|
||||||
Uint8 padding1;
|
Uint8 padding1;
|
||||||
Uint8 padding2;
|
|
||||||
Sint32 x; /**< X coordinate, relative to window */
|
Sint32 x; /**< X coordinate, relative to window */
|
||||||
Sint32 y; /**< Y coordinate, relative to window */
|
Sint32 y; /**< Y coordinate, relative to window */
|
||||||
} SDL_MouseButtonEvent;
|
} SDL_MouseButtonEvent;
|
||||||
|
@ -254,8 +257,8 @@ typedef struct SDL_MouseWheelEvent
|
||||||
Uint32 timestamp;
|
Uint32 timestamp;
|
||||||
Uint32 windowID; /**< The window with mouse focus, if any */
|
Uint32 windowID; /**< The window with mouse focus, if any */
|
||||||
Uint32 which; /**< The mouse instance id, or SDL_TOUCH_MOUSEID */
|
Uint32 which; /**< The mouse instance id, or SDL_TOUCH_MOUSEID */
|
||||||
Sint32 x; /**< The amount scrolled horizontally */
|
Sint32 x; /**< The amount scrolled horizontally, positive to the right and negative to the left */
|
||||||
Sint32 y; /**< The amount scrolled vertically */
|
Sint32 y; /**< The amount scrolled vertically, positive away from the user and negative toward the user */
|
||||||
} SDL_MouseWheelEvent;
|
} SDL_MouseWheelEvent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -30,6 +30,7 @@
|
||||||
|
|
||||||
#include "SDL_stdinc.h"
|
#include "SDL_stdinc.h"
|
||||||
#include "SDL_error.h"
|
#include "SDL_error.h"
|
||||||
|
#include "SDL_rwops.h"
|
||||||
#include "SDL_joystick.h"
|
#include "SDL_joystick.h"
|
||||||
|
|
||||||
#include "begin_code.h"
|
#include "begin_code.h"
|
||||||
|
@ -108,6 +109,23 @@ typedef struct SDL_GameControllerButtonBind
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Load a set of mappings from a seekable SDL data stream (memory or file), filtered by the current SDL_GetPlatform()
|
||||||
|
* A community sourced database of controllers is available at https://raw.github.com/gabomdq/SDL_GameControllerDB/master/gamecontrollerdb.txt
|
||||||
|
*
|
||||||
|
* If \c freerw is non-zero, the stream will be closed after being read.
|
||||||
|
*
|
||||||
|
* \return number of mappings added, -1 on error
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_GameControllerAddMappingsFromRW( SDL_RWops * rw, int freerw );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Load a set of mappings from a file, filtered by the current SDL_GetPlatform()
|
||||||
|
*
|
||||||
|
* Convenience macro.
|
||||||
|
*/
|
||||||
|
#define SDL_GameControllerAddMappingsFromFile(file) SDL_GameControllerAddMappingsFromRW(SDL_RWFromFile(file, "rb"), 1)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add or update an existing mapping configuration
|
* Add or update an existing mapping configuration
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -58,14 +58,14 @@ extern DECLSPEC int SDLCALL SDL_RecordGesture(SDL_TouchID touchId);
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
extern DECLSPEC int SDLCALL SDL_SaveAllDollarTemplates(SDL_RWops *src);
|
extern DECLSPEC int SDLCALL SDL_SaveAllDollarTemplates(SDL_RWops *dst);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Save a currently loaded Dollar Gesture template
|
* \brief Save a currently loaded Dollar Gesture template
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
extern DECLSPEC int SDLCALL SDL_SaveDollarTemplate(SDL_GestureID gestureId,SDL_RWops *src);
|
extern DECLSPEC int SDLCALL SDL_SaveDollarTemplate(SDL_GestureID gestureId,SDL_RWops *dst);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -105,6 +105,19 @@ extern "C" {
|
||||||
*/
|
*/
|
||||||
#define SDL_HINT_RENDER_DIRECT3D_THREADSAFE "SDL_RENDER_DIRECT3D_THREADSAFE"
|
#define SDL_HINT_RENDER_DIRECT3D_THREADSAFE "SDL_RENDER_DIRECT3D_THREADSAFE"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief A variable controlling whether to enable Direct3D 11+'s Debug Layer.
|
||||||
|
*
|
||||||
|
* This variable does not have any effect on the Direct3D 9 based renderer.
|
||||||
|
*
|
||||||
|
* This variable can be set to the following values:
|
||||||
|
* "0" - Disable Debug Layer use
|
||||||
|
* "1" - Enable Debug Layer use
|
||||||
|
*
|
||||||
|
* By default, SDL does not use Direct3D Debug Layer.
|
||||||
|
*/
|
||||||
|
#define SDL_HINT_RENDER_DIRECT3D11_DEBUG "SDL_HINT_RENDER_DIRECT3D11_DEBUG"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief A variable controlling the scaling quality
|
* \brief A variable controlling the scaling quality
|
||||||
*
|
*
|
||||||
|
@ -128,6 +141,17 @@ extern "C" {
|
||||||
*/
|
*/
|
||||||
#define SDL_HINT_RENDER_VSYNC "SDL_RENDER_VSYNC"
|
#define SDL_HINT_RENDER_VSYNC "SDL_RENDER_VSYNC"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief A variable controlling whether the screensaver is enabled.
|
||||||
|
*
|
||||||
|
* This variable can be set to the following values:
|
||||||
|
* "0" - Disable screensaver
|
||||||
|
* "1" - Enable screensaver
|
||||||
|
*
|
||||||
|
* By default SDL will disable the screensaver.
|
||||||
|
*/
|
||||||
|
#define SDL_HINT_VIDEO_ALLOW_SCREENSAVER "SDL_VIDEO_ALLOW_SCREENSAVER"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief A variable controlling whether the X11 VidMode extension should be used.
|
* \brief A variable controlling whether the X11 VidMode extension should be used.
|
||||||
*
|
*
|
||||||
|
@ -173,12 +197,22 @@ extern "C" {
|
||||||
#define SDL_HINT_GRAB_KEYBOARD "SDL_GRAB_KEYBOARD"
|
#define SDL_HINT_GRAB_KEYBOARD "SDL_GRAB_KEYBOARD"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Minimize your SDL_Window if it loses key focus when in Fullscreen mode. Defaults to true.
|
* \brief A variable controlling whether relative mouse mode is implemented using mouse warping
|
||||||
|
*
|
||||||
|
* This variable can be set to the following values:
|
||||||
|
* "0" - Relative mouse mode uses raw input
|
||||||
|
* "1" - Relative mouse mode uses mouse warping
|
||||||
|
*
|
||||||
|
* By default SDL will use raw input for relative mouse mode
|
||||||
|
*/
|
||||||
|
#define SDL_HINT_MOUSE_RELATIVE_MODE_WARP "SDL_MOUSE_RELATIVE_MODE_WARP"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Minimize your SDL_Window if it loses key focus when in fullscreen mode. Defaults to true.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#define SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS "SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS"
|
#define SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS "SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS"
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief A variable controlling whether the idle timer is disabled on iOS.
|
* \brief A variable controlling whether the idle timer is disabled on iOS.
|
||||||
*
|
*
|
||||||
|
@ -203,14 +237,24 @@ extern "C" {
|
||||||
* "LandscapeLeft", "LandscapeRight", "Portrait" "PortraitUpsideDown"
|
* "LandscapeLeft", "LandscapeRight", "Portrait" "PortraitUpsideDown"
|
||||||
*/
|
*/
|
||||||
#define SDL_HINT_ORIENTATIONS "SDL_IOS_ORIENTATIONS"
|
#define SDL_HINT_ORIENTATIONS "SDL_IOS_ORIENTATIONS"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief A variable controlling whether an Android built-in accelerometer should be
|
||||||
|
* listed as a joystick device, rather than listing actual joysticks only.
|
||||||
|
*
|
||||||
|
* This variable can be set to the following values:
|
||||||
|
* "0" - List only real joysticks and accept input from them
|
||||||
|
* "1" - List real joysticks along with the accelerometer as if it were a 3 axis joystick (the default).
|
||||||
|
*/
|
||||||
|
#define SDL_HINT_ACCELEROMETER_AS_JOYSTICK "SDL_ACCELEROMETER_AS_JOYSTICK"
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief A variable that lets you disable the detection and use of Xinput gamepad devices
|
* \brief A variable that lets you disable the detection and use of Xinput gamepad devices
|
||||||
*
|
*
|
||||||
* The variable can be set to the following values:
|
* The variable can be set to the following values:
|
||||||
* "0" - Disable XInput timer (only uses direct input)
|
* "0" - Disable XInput detection (only uses direct input)
|
||||||
* "1" - Enable XInput timer (the default)
|
* "1" - Enable XInput detection (the default)
|
||||||
*/
|
*/
|
||||||
#define SDL_HINT_XINPUT_ENABLED "SDL_XINPUT_ENABLED"
|
#define SDL_HINT_XINPUT_ENABLED "SDL_XINPUT_ENABLED"
|
||||||
|
|
||||||
|
@ -233,7 +277,7 @@ extern "C" {
|
||||||
* "0" - Disable joystick & gamecontroller input events when the
|
* "0" - Disable joystick & gamecontroller input events when the
|
||||||
* application is in the background.
|
* application is in the background.
|
||||||
* "1" - Enable joystick & gamecontroller input events when the
|
* "1" - Enable joystick & gamecontroller input events when the
|
||||||
* application is in the backgroumd.
|
* application is in the background.
|
||||||
*
|
*
|
||||||
* The default value is "0". This hint may be set at any time.
|
* The default value is "0". This hint may be set at any time.
|
||||||
*/
|
*/
|
||||||
|
@ -273,6 +317,124 @@ extern "C" {
|
||||||
*/
|
*/
|
||||||
#define SDL_HINT_VIDEO_HIGHDPI_DISABLED "SDL_VIDEO_HIGHDPI_DISABLED"
|
#define SDL_HINT_VIDEO_HIGHDPI_DISABLED "SDL_VIDEO_HIGHDPI_DISABLED"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief A variable that determines whether ctrl+click should generate a right-click event on Mac
|
||||||
|
*
|
||||||
|
* If present, holding ctrl while left clicking will generate a right click
|
||||||
|
* event when on Mac.
|
||||||
|
*/
|
||||||
|
#define SDL_HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK "SDL_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief A variable specifying which shader compiler to preload when using the Chrome ANGLE binaries
|
||||||
|
*
|
||||||
|
* SDL has EGL and OpenGL ES2 support on Windows via the ANGLE project. It
|
||||||
|
* can use two different sets of binaries, those compiled by the user from source
|
||||||
|
* or those provided by the Chrome browser. In the later case, these binaries require
|
||||||
|
* that SDL loads a DLL providing the shader compiler.
|
||||||
|
*
|
||||||
|
* This variable can be set to the following values:
|
||||||
|
* "d3dcompiler_46.dll" - default, best for Vista or later.
|
||||||
|
* "d3dcompiler_43.dll" - for XP support.
|
||||||
|
* "none" - do not load any library, useful if you compiled ANGLE from source and included the compiler in your binaries.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#define SDL_HINT_VIDEO_WIN_D3DCOMPILER "SDL_VIDEO_WIN_D3DCOMPILER"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief A variable that is the address of another SDL_Window* (as a hex string formatted with "%p").
|
||||||
|
*
|
||||||
|
* If this hint is set before SDL_CreateWindowFrom() and the SDL_Window* it is set to has
|
||||||
|
* SDL_WINDOW_OPENGL set (and running on WGL only, currently), then two things will occur on the newly
|
||||||
|
* created SDL_Window:
|
||||||
|
*
|
||||||
|
* 1. Its pixel format will be set to the same pixel format as this SDL_Window. This is
|
||||||
|
* needed for example when sharing an OpenGL context across multiple windows.
|
||||||
|
*
|
||||||
|
* 2. The flag SDL_WINDOW_OPENGL will be set on the new window so it can be used for
|
||||||
|
* OpenGL rendering.
|
||||||
|
*
|
||||||
|
* This variable can be set to the following values:
|
||||||
|
* The address (as a string "%p") of the SDL_Window* that new windows created with SDL_CreateWindowFrom() should
|
||||||
|
* share a pixel format with.
|
||||||
|
*/
|
||||||
|
#define SDL_HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT "SDL_VIDEO_WINDOW_SHARE_PIXEL_FORMAT"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* \brief A URL to a WinRT app's privacy policy
|
||||||
|
*
|
||||||
|
* All network-enabled WinRT apps must make a privacy policy available to its
|
||||||
|
* users. On Windows 8, 8.1, and RT, Microsoft mandates that this policy be
|
||||||
|
* be available in the Windows Settings charm, as accessed from within the app.
|
||||||
|
* SDL provides code to add a URL-based link there, which can point to the app's
|
||||||
|
* privacy policy.
|
||||||
|
*
|
||||||
|
* To setup a URL to an app's privacy policy, set SDL_HINT_WINRT_PRIVACY_POLICY_URL
|
||||||
|
* before calling any SDL_Init functions. The contents of the hint should
|
||||||
|
* be a valid URL. For example, "http://www.example.com".
|
||||||
|
*
|
||||||
|
* The default value is "", which will prevent SDL from adding a privacy policy
|
||||||
|
* link to the Settings charm. This hint should only be set during app init.
|
||||||
|
*
|
||||||
|
* The label text of an app's "Privacy Policy" link may be customized via another
|
||||||
|
* hint, SDL_HINT_WINRT_PRIVACY_POLICY_LABEL.
|
||||||
|
*
|
||||||
|
* Please note that on Windows Phone, Microsoft does not provide standard UI
|
||||||
|
* for displaying a privacy policy link, and as such, SDL_HINT_WINRT_PRIVACY_POLICY_URL
|
||||||
|
* will not get used on that platform. Network-enabled phone apps should display
|
||||||
|
* their privacy policy through some other, in-app means.
|
||||||
|
*/
|
||||||
|
#define SDL_HINT_WINRT_PRIVACY_POLICY_URL "SDL_HINT_WINRT_PRIVACY_POLICY_URL"
|
||||||
|
|
||||||
|
/** \brief Label text for a WinRT app's privacy policy link
|
||||||
|
*
|
||||||
|
* Network-enabled WinRT apps must include a privacy policy. On Windows 8, 8.1, and RT,
|
||||||
|
* Microsoft mandates that this policy be available via the Windows Settings charm.
|
||||||
|
* SDL provides code to add a link there, with it's label text being set via the
|
||||||
|
* optional hint, SDL_HINT_WINRT_PRIVACY_POLICY_LABEL.
|
||||||
|
*
|
||||||
|
* Please note that a privacy policy's contents are not set via this hint. A separate
|
||||||
|
* hint, SDL_HINT_WINRT_PRIVACY_POLICY_URL, is used to link to the actual text of the
|
||||||
|
* policy.
|
||||||
|
*
|
||||||
|
* The contents of this hint should be encoded as a UTF8 string.
|
||||||
|
*
|
||||||
|
* The default value is "Privacy Policy". This hint should only be set during app
|
||||||
|
* initialization, preferably before any calls to SDL_Init.
|
||||||
|
*
|
||||||
|
* For additional information on linking to a privacy policy, see the documentation for
|
||||||
|
* SDL_HINT_WINRT_PRIVACY_POLICY_URL.
|
||||||
|
*/
|
||||||
|
#define SDL_HINT_WINRT_PRIVACY_POLICY_LABEL "SDL_HINT_WINRT_PRIVACY_POLICY_LABEL"
|
||||||
|
|
||||||
|
/** \brief If set to 1, back button press events on Windows Phone 8+ will be marked as handled.
|
||||||
|
*
|
||||||
|
* TODO, WinRT: document SDL_HINT_WINRT_HANDLE_BACK_BUTTON need and use
|
||||||
|
* For now, more details on why this is needed can be found at the
|
||||||
|
* beginning of the following web page:
|
||||||
|
* http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj247550(v=vs.105).aspx
|
||||||
|
*/
|
||||||
|
#define SDL_HINT_WINRT_HANDLE_BACK_BUTTON "SDL_HINT_WINRT_HANDLE_BACK_BUTTON"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief A variable that dictates policy for fullscreen Spaces on Mac OS X.
|
||||||
|
*
|
||||||
|
* This hint only applies to Mac OS X.
|
||||||
|
*
|
||||||
|
* The variable can be set to the following values:
|
||||||
|
* "0" - Disable Spaces support (FULLSCREEN_DESKTOP won't use them and
|
||||||
|
* SDL_WINDOW_RESIZABLE windows won't offer the "fullscreen"
|
||||||
|
* button on their titlebars).
|
||||||
|
* "1" - Enable Spaces support (FULLSCREEN_DESKTOP will use them and
|
||||||
|
* SDL_WINDOW_RESIZABLE windows will offer the "fullscreen"
|
||||||
|
* button on their titlebars.
|
||||||
|
*
|
||||||
|
* The default value is "1". Spaces are disabled regardless of this hint if
|
||||||
|
* the OS isn't at least Mac OS X Lion (10.7). This hint must be set before
|
||||||
|
* any windows are created.
|
||||||
|
*/
|
||||||
|
#define SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES "SDL_VIDEO_MAC_FULLSCREEN_SPACES"
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief An enumeration of hint priorities
|
* \brief An enumeration of hint priorities
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -115,7 +115,7 @@ extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetGUID(SDL_Joystick * joys
|
||||||
* Return a string representation for this guid. pszGUID must point to at least 33 bytes
|
* Return a string representation for this guid. pszGUID must point to at least 33 bytes
|
||||||
* (32 for the string plus a NULL terminator).
|
* (32 for the string plus a NULL terminator).
|
||||||
*/
|
*/
|
||||||
extern DECLSPEC void SDL_JoystickGetGUIDString(SDL_JoystickGUID guid, char *pszGUID, int cbGUID);
|
extern DECLSPEC void SDLCALL SDL_JoystickGetGUIDString(SDL_JoystickGUID guid, char *pszGUID, int cbGUID);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* convert a string into a joystick formatted guid
|
* convert a string into a joystick formatted guid
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -39,6 +39,18 @@
|
||||||
*/
|
*/
|
||||||
#define SDL_MAIN_AVAILABLE
|
#define SDL_MAIN_AVAILABLE
|
||||||
|
|
||||||
|
#elif defined(__WINRT__)
|
||||||
|
/* On WinRT, SDL provides a main function that initializes CoreApplication,
|
||||||
|
creating an instance of IFrameworkView in the process.
|
||||||
|
|
||||||
|
Please note that #include'ing SDL_main.h is not enough to get a main()
|
||||||
|
function working. In non-XAML apps, the file,
|
||||||
|
src/main/winrt/SDL_WinRT_main_NonXAML.cpp, or a copy of it, must be compiled
|
||||||
|
into the app itself. In XAML apps, the function, SDL_WinRTRunApp must be
|
||||||
|
called, with a pointer to the Direct3D-hosted XAML control passed in.
|
||||||
|
*/
|
||||||
|
#define SDL_MAIN_NEEDED
|
||||||
|
|
||||||
#elif defined(__IPHONEOS__)
|
#elif defined(__IPHONEOS__)
|
||||||
/* On iOS SDL provides a main function that creates an application delegate
|
/* On iOS SDL provides a main function that creates an application delegate
|
||||||
and starts the iOS application run loop.
|
and starts the iOS application run loop.
|
||||||
|
@ -101,7 +113,7 @@ extern "C" {
|
||||||
* Calling this yourself without knowing what you're doing can cause
|
* Calling this yourself without knowing what you're doing can cause
|
||||||
* crashes and hard to diagnose problems with your application.
|
* crashes and hard to diagnose problems with your application.
|
||||||
*/
|
*/
|
||||||
extern DECLSPEC void SDL_SetMainReady(void);
|
extern DECLSPEC void SDLCALL SDL_SetMainReady(void);
|
||||||
|
|
||||||
#ifdef __WIN32__
|
#ifdef __WIN32__
|
||||||
|
|
||||||
|
@ -115,6 +127,24 @@ extern DECLSPEC void SDLCALL SDL_UnregisterApp(void);
|
||||||
#endif /* __WIN32__ */
|
#endif /* __WIN32__ */
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __WINRT__
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Initializes and launches an SDL/WinRT application.
|
||||||
|
*
|
||||||
|
* \param mainFunction The SDL app's C-style main().
|
||||||
|
* \param xamlBackgroundPanel An optional, XAML-based, background panel.
|
||||||
|
* For Non-XAML apps, this value must be set to NULL. For XAML apps,
|
||||||
|
* pass in a pointer to a SwapChainBackgroundPanel, casted to an
|
||||||
|
* IInspectable (via reinterpret_cast).
|
||||||
|
* \ret 0 on success, -1 on failure. On failure, use SDL_GetError to retrieve more
|
||||||
|
* information on the failure.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_WinRTRunApp(int (*mainFunction)(int, char **), void * xamlBackgroundPanel);
|
||||||
|
|
||||||
|
#endif /* __WINRT__ */
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,3 +1,23 @@
|
||||||
|
/*
|
||||||
|
Simple DirectMedia Layer
|
||||||
|
Copyright (C) 1997-2014 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
|
||||||
|
arising from the use of this software.
|
||||||
|
|
||||||
|
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:
|
||||||
|
|
||||||
|
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.
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef _SDLname_h_
|
#ifndef _SDLname_h_
|
||||||
#define _SDLname_h_
|
#define _SDLname_h_
|
||||||
|
@ -9,3 +29,5 @@
|
||||||
#define SDL_NAME(X) SDL_##X
|
#define SDL_NAME(X) SDL_##X
|
||||||
|
|
||||||
#endif /* _SDLname_h_ */
|
#endif /* _SDLname_h_ */
|
||||||
|
|
||||||
|
/* vi: set ts=4 sw=4 expandtab: */
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -28,6 +28,8 @@
|
||||||
#ifndef _SDL_pixels_h
|
#ifndef _SDL_pixels_h
|
||||||
#define _SDL_pixels_h
|
#define _SDL_pixels_h
|
||||||
|
|
||||||
|
#include "SDL_stdinc.h"
|
||||||
|
|
||||||
#include "begin_code.h"
|
#include "begin_code.h"
|
||||||
/* Set up for C function definitions, even when using C++ */
|
/* Set up for C function definitions, even when using C++ */
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -32,10 +32,6 @@
|
||||||
#undef __AIX__
|
#undef __AIX__
|
||||||
#define __AIX__ 1
|
#define __AIX__ 1
|
||||||
#endif
|
#endif
|
||||||
#if defined(__BEOS__)
|
|
||||||
#undef __BEOS__
|
|
||||||
#define __BEOS__ 1
|
|
||||||
#endif
|
|
||||||
#if defined(__HAIKU__)
|
#if defined(__HAIKU__)
|
||||||
#undef __HAIKU__
|
#undef __HAIKU__
|
||||||
#define __HAIKU__ 1
|
#define __HAIKU__ 1
|
||||||
|
@ -64,7 +60,7 @@
|
||||||
#undef __LINUX__
|
#undef __LINUX__
|
||||||
#define __LINUX__ 1
|
#define __LINUX__ 1
|
||||||
#endif
|
#endif
|
||||||
#if defined(ANDROID)
|
#if defined(ANDROID) || defined(__ANDROID__)
|
||||||
#undef __ANDROID__
|
#undef __ANDROID__
|
||||||
#undef __LINUX__ /* do we need to do this? */
|
#undef __LINUX__ /* do we need to do this? */
|
||||||
#define __ANDROID__ 1
|
#define __ANDROID__ 1
|
||||||
|
@ -86,9 +82,6 @@
|
||||||
#if MAC_OS_X_VERSION_MIN_REQUIRED < 1050
|
#if MAC_OS_X_VERSION_MIN_REQUIRED < 1050
|
||||||
# error SDL for Mac OS X only supports deploying on 10.5 and above.
|
# error SDL for Mac OS X only supports deploying on 10.5 and above.
|
||||||
#endif /* MAC_OS_X_VERSION_MIN_REQUIRED < 1050 */
|
#endif /* MAC_OS_X_VERSION_MIN_REQUIRED < 1050 */
|
||||||
#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
|
|
||||||
# error SDL for Mac OS X must be built with a 10.6 SDK or above.
|
|
||||||
#endif /* MAC_OS_X_VERSION_MAX_ALLOWED < 1060 */
|
|
||||||
#endif /* TARGET_OS_IPHONE */
|
#endif /* TARGET_OS_IPHONE */
|
||||||
#endif /* defined(__APPLE__) */
|
#endif /* defined(__APPLE__) */
|
||||||
|
|
||||||
|
@ -120,10 +113,26 @@
|
||||||
#undef __SOLARIS__
|
#undef __SOLARIS__
|
||||||
#define __SOLARIS__ 1
|
#define __SOLARIS__ 1
|
||||||
#endif
|
#endif
|
||||||
#if defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__)
|
|
||||||
|
#if defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__) || defined(__MINGW32__)
|
||||||
|
/* Try to find out if we're compiling for WinRT or non-WinRT */
|
||||||
|
/* If _USING_V110_SDK71_ is defined it means we are using the v110_xp or v120_xp toolset. */
|
||||||
|
#if (defined(_MSC_VER) && (_MSC_VER >= 1700) && !_USING_V110_SDK71_) /* _MSC_VER==1700 for MSVC 2012 */
|
||||||
|
#include <winapifamily.h>
|
||||||
|
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
|
||||||
#undef __WINDOWS__
|
#undef __WINDOWS__
|
||||||
#define __WINDOWS__ 1
|
#define __WINDOWS__ 1
|
||||||
|
/* See if we're compiling for WinRT: */
|
||||||
|
#elif WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
|
||||||
|
#undef __WINRT__
|
||||||
|
#define __WINRT__ 1
|
||||||
#endif
|
#endif
|
||||||
|
#else
|
||||||
|
#undef __WINDOWS__
|
||||||
|
#define __WINDOWS__ 1
|
||||||
|
#endif /* _MSC_VER < 1700 */
|
||||||
|
#endif /* defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__) */
|
||||||
|
|
||||||
#if defined(__WINDOWS__)
|
#if defined(__WINDOWS__)
|
||||||
#undef __WIN32__
|
#undef __WIN32__
|
||||||
#define __WIN32__ 1
|
#define __WIN32__ 1
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -596,7 +596,7 @@ extern DECLSPEC void SDLCALL SDL_RenderGetScale(SDL_Renderer * renderer,
|
||||||
*
|
*
|
||||||
* \return 0 on success, or -1 on error
|
* \return 0 on success, or -1 on error
|
||||||
*/
|
*/
|
||||||
extern DECLSPEC int SDL_SetRenderDrawColor(SDL_Renderer * renderer,
|
extern DECLSPEC int SDLCALL SDL_SetRenderDrawColor(SDL_Renderer * renderer,
|
||||||
Uint8 r, Uint8 g, Uint8 b,
|
Uint8 r, Uint8 g, Uint8 b,
|
||||||
Uint8 a);
|
Uint8 a);
|
||||||
|
|
||||||
|
@ -612,7 +612,7 @@ extern DECLSPEC int SDL_SetRenderDrawColor(SDL_Renderer * renderer,
|
||||||
*
|
*
|
||||||
* \return 0 on success, or -1 on error
|
* \return 0 on success, or -1 on error
|
||||||
*/
|
*/
|
||||||
extern DECLSPEC int SDL_GetRenderDrawColor(SDL_Renderer * renderer,
|
extern DECLSPEC int SDLCALL SDL_GetRenderDrawColor(SDL_Renderer * renderer,
|
||||||
Uint8 * r, Uint8 * g, Uint8 * b,
|
Uint8 * r, Uint8 * g, Uint8 * b,
|
||||||
Uint8 * a);
|
Uint8 * a);
|
||||||
|
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
#define SDL_REVISION "hg-7890:c031abe0b287"
|
#define SDL_REVISION "hg-8628:b558f99d48f0"
|
||||||
#define SDL_REVISION_NUMBER 7890
|
#define SDL_REVISION_NUMBER 8628
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -71,8 +71,18 @@
|
||||||
# include <ctype.h>
|
# include <ctype.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_MATH_H
|
#ifdef HAVE_MATH_H
|
||||||
|
# if defined(__WINRT__)
|
||||||
|
/* Defining _USE_MATH_DEFINES is required to get M_PI to be defined on
|
||||||
|
WinRT. See http://msdn.microsoft.com/en-us/library/4hwaceh6.aspx
|
||||||
|
for more information.
|
||||||
|
*/
|
||||||
|
# define _USE_MATH_DEFINES
|
||||||
|
# endif
|
||||||
# include <math.h>
|
# include <math.h>
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef HAVE_FLOAT_H
|
||||||
|
# include <float.h>
|
||||||
|
#endif
|
||||||
#if defined(HAVE_ICONV) && defined(HAVE_ICONV_H)
|
#if defined(HAVE_ICONV) && defined(HAVE_ICONV_H)
|
||||||
# include <iconv.h>
|
# include <iconv.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -255,7 +265,7 @@ extern DECLSPEC void *SDLCALL SDL_memset(void *dst, int c, size_t len);
|
||||||
#define SDL_zerop(x) SDL_memset((x), 0, sizeof(*(x)))
|
#define SDL_zerop(x) SDL_memset((x), 0, sizeof(*(x)))
|
||||||
|
|
||||||
/* Note that memset() is a byte assignment and this is a 32-bit assignment, so they're not directly equivalent. */
|
/* Note that memset() is a byte assignment and this is a 32-bit assignment, so they're not directly equivalent. */
|
||||||
SDL_FORCE_INLINE void SDL_memset4(void *dst, int val, size_t dwords)
|
SDL_FORCE_INLINE void SDL_memset4(void *dst, Uint32 val, size_t dwords)
|
||||||
{
|
{
|
||||||
#if defined(__GNUC__) && defined(i386)
|
#if defined(__GNUC__) && defined(i386)
|
||||||
int u0, u1, u2;
|
int u0, u1, u2;
|
||||||
|
@ -331,6 +341,7 @@ extern DECLSPEC int SDLCALL SDL_strcasecmp(const char *str1, const char *str2);
|
||||||
extern DECLSPEC int SDLCALL SDL_strncasecmp(const char *str1, const char *str2, size_t len);
|
extern DECLSPEC int SDLCALL SDL_strncasecmp(const char *str1, const char *str2, size_t len);
|
||||||
|
|
||||||
extern DECLSPEC int SDLCALL SDL_sscanf(const char *text, const char *fmt, ...);
|
extern DECLSPEC int SDLCALL SDL_sscanf(const char *text, const char *fmt, ...);
|
||||||
|
extern DECLSPEC int SDLCALL SDL_vsscanf(const char *text, const char *fmt, va_list ap);
|
||||||
extern DECLSPEC int SDLCALL SDL_snprintf(char *text, size_t maxlen, const char *fmt, ...);
|
extern DECLSPEC int SDLCALL SDL_snprintf(char *text, size_t maxlen, const char *fmt, ...);
|
||||||
extern DECLSPEC int SDLCALL SDL_vsnprintf(char *text, size_t maxlen, const char *fmt, va_list ap);
|
extern DECLSPEC int SDLCALL SDL_vsnprintf(char *text, size_t maxlen, const char *fmt, va_list ap);
|
||||||
|
|
||||||
|
@ -340,6 +351,8 @@ extern DECLSPEC int SDLCALL SDL_vsnprintf(char *text, size_t maxlen, const char
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
extern DECLSPEC double SDLCALL SDL_acos(double x);
|
||||||
|
extern DECLSPEC double SDLCALL SDL_asin(double x);
|
||||||
extern DECLSPEC double SDLCALL SDL_atan(double x);
|
extern DECLSPEC double SDLCALL SDL_atan(double x);
|
||||||
extern DECLSPEC double SDLCALL SDL_atan2(double x, double y);
|
extern DECLSPEC double SDLCALL SDL_atan2(double x, double y);
|
||||||
extern DECLSPEC double SDLCALL SDL_ceil(double x);
|
extern DECLSPEC double SDLCALL SDL_ceil(double x);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -55,6 +55,12 @@ extern DECLSPEC int SDLCALL SDL_Direct3D9GetAdapterIndex( int displayIndex );
|
||||||
typedef struct IDirect3DDevice9 IDirect3DDevice9;
|
typedef struct IDirect3DDevice9 IDirect3DDevice9;
|
||||||
extern DECLSPEC IDirect3DDevice9* SDLCALL SDL_RenderGetD3D9Device(SDL_Renderer * renderer);
|
extern DECLSPEC IDirect3DDevice9* SDLCALL SDL_RenderGetD3D9Device(SDL_Renderer * renderer);
|
||||||
|
|
||||||
|
/* Returns the DXGI Adapter and Output indices for the specified display index.
|
||||||
|
These can be passed to EnumAdapters and EnumOutputs respectively to get the objects
|
||||||
|
required to create a DX10 or DX11 device and swap chain.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void SDLCALL SDL_DXGIGetOutputInfo( int displayIndex, int *adapterIndex, int *outputIndex );
|
||||||
|
|
||||||
#endif /* __WIN32__ */
|
#endif /* __WIN32__ */
|
||||||
|
|
||||||
|
|
||||||
|
@ -110,6 +116,70 @@ extern DECLSPEC const char * SDLCALL SDL_AndroidGetExternalStoragePath();
|
||||||
|
|
||||||
#endif /* __ANDROID__ */
|
#endif /* __ANDROID__ */
|
||||||
|
|
||||||
|
/* Platform specific functions for WinRT */
|
||||||
|
#if defined(__WINRT__) && __WINRT__
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief WinRT / Windows Phone path types
|
||||||
|
*/
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
/** \brief The installed app's root directory.
|
||||||
|
Files here are likely to be read-only. */
|
||||||
|
SDL_WINRT_PATH_INSTALLED_LOCATION,
|
||||||
|
|
||||||
|
/** \brief The app's local data store. Files may be written here */
|
||||||
|
SDL_WINRT_PATH_LOCAL_FOLDER,
|
||||||
|
|
||||||
|
/** \brief The app's roaming data store. Unsupported on Windows Phone.
|
||||||
|
Files written here may be copied to other machines via a network
|
||||||
|
connection.
|
||||||
|
*/
|
||||||
|
SDL_WINRT_PATH_ROAMING_FOLDER,
|
||||||
|
|
||||||
|
/** \brief The app's temporary data store. Unsupported on Windows Phone.
|
||||||
|
Files written here may be deleted at any time. */
|
||||||
|
SDL_WINRT_PATH_TEMP_FOLDER
|
||||||
|
} SDL_WinRT_Path;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Retrieves a WinRT defined path on the local file system
|
||||||
|
*
|
||||||
|
* \note Documentation on most app-specific path types on WinRT
|
||||||
|
* can be found on MSDN, at the URL:
|
||||||
|
* http://msdn.microsoft.com/en-us/library/windows/apps/hh464917.aspx
|
||||||
|
*
|
||||||
|
* \param pathType The type of path to retrieve.
|
||||||
|
* \ret A UCS-2 string (16-bit, wide-char) containing the path, or NULL
|
||||||
|
* if the path is not available for any reason. Not all paths are
|
||||||
|
* available on all versions of Windows. This is especially true on
|
||||||
|
* Windows Phone. Check the documentation for the given
|
||||||
|
* SDL_WinRT_Path for more information on which path types are
|
||||||
|
* supported where.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC const wchar_t * SDLCALL SDL_WinRTGetFSPathUNICODE(SDL_WinRT_Path pathType);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Retrieves a WinRT defined path on the local file system
|
||||||
|
*
|
||||||
|
* \note Documentation on most app-specific path types on WinRT
|
||||||
|
* can be found on MSDN, at the URL:
|
||||||
|
* http://msdn.microsoft.com/en-us/library/windows/apps/hh464917.aspx
|
||||||
|
*
|
||||||
|
* \param pathType The type of path to retrieve.
|
||||||
|
* \ret A UTF-8 string (8-bit, multi-byte) containing the path, or NULL
|
||||||
|
* if the path is not available for any reason. Not all paths are
|
||||||
|
* available on all versions of Windows. This is especially true on
|
||||||
|
* Windows Phone. Check the documentation for the given
|
||||||
|
* SDL_WinRT_Path for more information on which path types are
|
||||||
|
* supported where.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC const char * SDLCALL SDL_WinRTGetFSPathUTF8(SDL_WinRT_Path pathType);
|
||||||
|
|
||||||
|
#endif /* __WINRT__ */
|
||||||
|
|
||||||
|
|
||||||
/* Ends C function definitions when using C++ */
|
/* Ends C function definitions when using C++ */
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -56,6 +56,10 @@ struct SDL_SysWMinfo;
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(SDL_VIDEO_DRIVER_WINRT)
|
||||||
|
#include <Inspectable.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
/* This is the structure for custom window manager events */
|
/* This is the structure for custom window manager events */
|
||||||
#if defined(SDL_VIDEO_DRIVER_X11)
|
#if defined(SDL_VIDEO_DRIVER_X11)
|
||||||
#if defined(__APPLE__) && defined(__MACH__)
|
#if defined(__APPLE__) && defined(__MACH__)
|
||||||
|
@ -90,9 +94,15 @@ typedef struct _NSWindow NSWindow;
|
||||||
#include <UIKit/UIKit.h>
|
#include <UIKit/UIKit.h>
|
||||||
#else
|
#else
|
||||||
typedef struct _UIWindow UIWindow;
|
typedef struct _UIWindow UIWindow;
|
||||||
|
typedef struct _UIViewController UIViewController;
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(SDL_VIDEO_DRIVER_MIR)
|
||||||
|
#include <mir_toolkit/mir_client_library.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* These are the various supported windowing subsystems
|
* These are the various supported windowing subsystems
|
||||||
*/
|
*/
|
||||||
|
@ -104,6 +114,9 @@ typedef enum
|
||||||
SDL_SYSWM_DIRECTFB,
|
SDL_SYSWM_DIRECTFB,
|
||||||
SDL_SYSWM_COCOA,
|
SDL_SYSWM_COCOA,
|
||||||
SDL_SYSWM_UIKIT,
|
SDL_SYSWM_UIKIT,
|
||||||
|
SDL_SYSWM_WAYLAND,
|
||||||
|
SDL_SYSWM_MIR,
|
||||||
|
SDL_SYSWM_WINRT,
|
||||||
} SDL_SYSWM_TYPE;
|
} SDL_SYSWM_TYPE;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -168,6 +181,12 @@ struct SDL_SysWMinfo
|
||||||
HWND window; /**< The window handle */
|
HWND window; /**< The window handle */
|
||||||
} win;
|
} win;
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(SDL_VIDEO_DRIVER_WINRT)
|
||||||
|
struct
|
||||||
|
{
|
||||||
|
IInspectable * window; /**< The WinRT CoreWindow */
|
||||||
|
} winrt;
|
||||||
|
#endif
|
||||||
#if defined(SDL_VIDEO_DRIVER_X11)
|
#if defined(SDL_VIDEO_DRIVER_X11)
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
|
@ -195,6 +214,22 @@ struct SDL_SysWMinfo
|
||||||
UIWindow *window; /* The UIKit window */
|
UIWindow *window; /* The UIKit window */
|
||||||
} uikit;
|
} uikit;
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(SDL_VIDEO_DRIVER_WAYLAND)
|
||||||
|
struct
|
||||||
|
{
|
||||||
|
struct wl_display *display; /**< Wayland display */
|
||||||
|
struct wl_surface *surface; /**< Wayland surface */
|
||||||
|
struct wl_shell_surface *shell_surface; /**< Wayland shell_surface (window manager handle) */
|
||||||
|
} wl;
|
||||||
|
#endif
|
||||||
|
#if defined(SDL_VIDEO_DRIVER_MIR)
|
||||||
|
struct
|
||||||
|
{
|
||||||
|
MirConnection *connection; /**< Mir display server connection */
|
||||||
|
MirSurface *surface; /**< Mir surface */
|
||||||
|
} mir;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Can't have an empty union */
|
/* Can't have an empty union */
|
||||||
int dummy;
|
int dummy;
|
||||||
} info;
|
} info;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -82,6 +82,7 @@ typedef struct
|
||||||
Uint32 render_flags;
|
Uint32 render_flags;
|
||||||
SDL_bool skip_renderer;
|
SDL_bool skip_renderer;
|
||||||
SDL_Renderer **renderers;
|
SDL_Renderer **renderers;
|
||||||
|
SDL_Texture **targets;
|
||||||
|
|
||||||
/* Audio info */
|
/* Audio info */
|
||||||
const char *audiodriver;
|
const char *audiodriver;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -38,6 +38,20 @@ extern "C" {
|
||||||
|
|
||||||
/* Function prototypes */
|
/* Function prototypes */
|
||||||
|
|
||||||
|
#define FONT_CHARACTER_SIZE 8
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Draw a string in the currently set font.
|
||||||
|
*
|
||||||
|
* \param renderer The renderer to draw on.
|
||||||
|
* \param x The X coordinate of the upper left corner of the character.
|
||||||
|
* \param y The Y coordinate of the upper left corner of the character.
|
||||||
|
* \param c The character to draw.
|
||||||
|
*
|
||||||
|
* \returns Returns 0 on success, -1 on failure.
|
||||||
|
*/
|
||||||
|
int SDLTest_DrawCharacter( SDL_Renderer *renderer, int x, int y, char c );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Draw a string in the currently set font.
|
* \brief Draw a string in the currently set font.
|
||||||
*
|
*
|
||||||
|
@ -48,7 +62,7 @@ extern "C" {
|
||||||
*
|
*
|
||||||
* \returns Returns 0 on success, -1 on failure.
|
* \returns Returns 0 on success, -1 on failure.
|
||||||
*/
|
*/
|
||||||
int SDLTest_DrawString(SDL_Renderer * renderer, int x, int y, const char *s);
|
int SDLTest_DrawString( SDL_Renderer * renderer, int x, int y, const char *s );
|
||||||
|
|
||||||
|
|
||||||
/* Ends C function definitions when using C++ */
|
/* Ends C function definitions when using C++ */
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -111,7 +111,12 @@ SDL_CreateThread(SDL_ThreadFunction fn, const char *name, void *data,
|
||||||
/**
|
/**
|
||||||
* Create a thread.
|
* Create a thread.
|
||||||
*/
|
*/
|
||||||
|
#if defined(SDL_CreateThread) && SDL_DYNAMIC_API
|
||||||
|
#undef SDL_CreateThread
|
||||||
|
#define SDL_CreateThread(fn, name, data) SDL_CreateThread_REAL(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthreadex, (pfnSDL_CurrentEndThread)_endthreadex)
|
||||||
|
#else
|
||||||
#define SDL_CreateThread(fn, name, data) SDL_CreateThread(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthreadex, (pfnSDL_CurrentEndThread)_endthreadex)
|
#define SDL_CreateThread(fn, name, data) SDL_CreateThread(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthreadex, (pfnSDL_CurrentEndThread)_endthreadex)
|
||||||
|
#endif
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
@ -119,7 +124,7 @@ SDL_CreateThread(SDL_ThreadFunction fn, const char *name, void *data,
|
||||||
* Create a thread.
|
* Create a thread.
|
||||||
*
|
*
|
||||||
* Thread naming is a little complicated: Most systems have very small
|
* Thread naming is a little complicated: Most systems have very small
|
||||||
* limits for the string length (BeOS has 32 bytes, Linux currently has 16,
|
* limits for the string length (Haiku has 32 bytes, Linux currently has 16,
|
||||||
* Visual C++ 6.0 has nine!), and possibly other arbitrary rules. You'll
|
* Visual C++ 6.0 has nine!), and possibly other arbitrary rules. You'll
|
||||||
* have to see what happens with your system's debugger. The name should be
|
* have to see what happens with your system's debugger. The name should be
|
||||||
* UTF-8 (but using the naming limits of C identifiers is a better bet).
|
* UTF-8 (but using the naming limits of C identifiers is a better bet).
|
||||||
|
@ -165,13 +170,53 @@ extern DECLSPEC SDL_threadID SDLCALL SDL_GetThreadID(SDL_Thread * thread);
|
||||||
extern DECLSPEC int SDLCALL SDL_SetThreadPriority(SDL_ThreadPriority priority);
|
extern DECLSPEC int SDLCALL SDL_SetThreadPriority(SDL_ThreadPriority priority);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Wait for a thread to finish.
|
* Wait for a thread to finish. Threads that haven't been detached will
|
||||||
|
* remain (as a "zombie") until this function cleans them up. Not doing so
|
||||||
|
* is a resource leak.
|
||||||
|
*
|
||||||
|
* Once a thread has been cleaned up through this function, the SDL_Thread
|
||||||
|
* that references it becomes invalid and should not be referenced again.
|
||||||
|
* As such, only one thread may call SDL_WaitThread() on another.
|
||||||
*
|
*
|
||||||
* The return code for the thread function is placed in the area
|
* The return code for the thread function is placed in the area
|
||||||
* pointed to by \c status, if \c status is not NULL.
|
* pointed to by \c status, if \c status is not NULL.
|
||||||
|
*
|
||||||
|
* You may not wait on a thread that has been used in a call to
|
||||||
|
* SDL_DetachThread(). Use either that function or this one, but not
|
||||||
|
* both, or behavior is undefined.
|
||||||
|
*
|
||||||
|
* It is safe to pass NULL to this function; it is a no-op.
|
||||||
*/
|
*/
|
||||||
extern DECLSPEC void SDLCALL SDL_WaitThread(SDL_Thread * thread, int *status);
|
extern DECLSPEC void SDLCALL SDL_WaitThread(SDL_Thread * thread, int *status);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A thread may be "detached" to signify that it should not remain until
|
||||||
|
* another thread has called SDL_WaitThread() on it. Detaching a thread
|
||||||
|
* is useful for long-running threads that nothing needs to synchronize
|
||||||
|
* with or further manage. When a detached thread is done, it simply
|
||||||
|
* goes away.
|
||||||
|
*
|
||||||
|
* There is no way to recover the return code of a detached thread. If you
|
||||||
|
* need this, don't detach the thread and instead use SDL_WaitThread().
|
||||||
|
*
|
||||||
|
* Once a thread is detached, you should usually assume the SDL_Thread isn't
|
||||||
|
* safe to reference again, as it will become invalid immediately upon
|
||||||
|
* the detached thread's exit, instead of remaining until someone has called
|
||||||
|
* SDL_WaitThread() to finally clean it up. As such, don't detach the same
|
||||||
|
* thread more than once.
|
||||||
|
*
|
||||||
|
* If a thread has already exited when passed to SDL_DetachThread(), it will
|
||||||
|
* stop waiting for a call to SDL_WaitThread() and clean up immediately.
|
||||||
|
* It is not safe to detach a thread that might be used with SDL_WaitThread().
|
||||||
|
*
|
||||||
|
* You may not call SDL_WaitThread() on a thread that has been detached.
|
||||||
|
* Use either that function or this one, but not both, or behavior is
|
||||||
|
* undefined.
|
||||||
|
*
|
||||||
|
* It is safe to pass NULL to this function; it is a no-op.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void SDLCALL SDL_DetachThread(SDL_Thread * thread);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Create an identifier that is globally visible to all threads but refers to data that is thread-specific.
|
* \brief Create an identifier that is globally visible to all threads but refers to data that is thread-specific.
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -59,7 +59,7 @@ typedef struct SDL_version
|
||||||
*/
|
*/
|
||||||
#define SDL_MAJOR_VERSION 2
|
#define SDL_MAJOR_VERSION 2
|
||||||
#define SDL_MINOR_VERSION 0
|
#define SDL_MINOR_VERSION 0
|
||||||
#define SDL_PATCHLEVEL 1
|
#define SDL_PATCHLEVEL 3
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Macro to determine SDL version program was compiled against.
|
* \brief Macro to determine SDL version program was compiled against.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -865,6 +865,11 @@ extern DECLSPEC void SDLCALL SDL_GL_UnloadLibrary(void);
|
||||||
extern DECLSPEC SDL_bool SDLCALL SDL_GL_ExtensionSupported(const char
|
extern DECLSPEC SDL_bool SDLCALL SDL_GL_ExtensionSupported(const char
|
||||||
*extension);
|
*extension);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Reset all previously set OpenGL context attributes to their default values
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void SDLCALL SDL_GL_ResetAttributes(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Set an OpenGL window attribute before window creation.
|
* \brief Set an OpenGL window attribute before window creation.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -43,7 +43,7 @@
|
||||||
|
|
||||||
/* Some compilers use a special export keyword */
|
/* Some compilers use a special export keyword */
|
||||||
#ifndef DECLSPEC
|
#ifndef DECLSPEC
|
||||||
# if defined(__WIN32__)
|
# if defined(__WIN32__) || defined(__WINRT__)
|
||||||
# ifdef __BORLANDC__
|
# ifdef __BORLANDC__
|
||||||
# ifdef BUILD_SDL
|
# ifdef BUILD_SDL
|
||||||
# define DECLSPEC
|
# define DECLSPEC
|
||||||
|
@ -66,7 +66,7 @@
|
||||||
|
|
||||||
/* By default SDL uses the C calling convention */
|
/* By default SDL uses the C calling convention */
|
||||||
#ifndef SDLCALL
|
#ifndef SDLCALL
|
||||||
#if defined(__WIN32__) && !defined(__GNUC__)
|
#if (defined(__WIN32__) || defined(__WINRT__)) && !defined(__GNUC__)
|
||||||
#define SDLCALL __cdecl
|
#define SDLCALL __cdecl
|
||||||
#else
|
#else
|
||||||
#define SDLCALL
|
#define SDLCALL
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1 +1 @@
|
||||||
s_buildRev = "rXXXX";
|
rXXXX
|
||||||
|
|
Loading…
Reference in a new issue