-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
649 changed files
with
10,837 additions
and
5,253 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
Simple DirectMedia Layer | ||
Copyright (C) 1997-2014 Sam Lantinga <[email protected]> | ||
Copyright (C) 1997-2015 Sam Lantinga <[email protected]> | ||
This software is provided 'as-is', without any express or implied | ||
warranty. In no event will the authors be held liable for any damages | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
Simple DirectMedia Layer | ||
Copyright (C) 1997-2014 Sam Lantinga <[email protected]> | ||
Copyright (C) 1997-2015 Sam Lantinga <[email protected]> | ||
This software is provided 'as-is', without any express or implied | ||
warranty. In no event will the authors be held liable for any damages | ||
|
@@ -86,8 +86,10 @@ This also solves the problem of... | |
disable assertions. | ||
*/ | ||
|
||
/* "while (0,0)" fools Microsoft's compiler's /W4 warning level into thinking | ||
this condition isn't constant. And looks like an owl's face! */ | ||
#ifdef _MSC_VER /* stupid /W4 warnings. */ | ||
#define SDL_NULL_WHILE_LOOP_CONDITION (-1 == __LINE__) | ||
#define SDL_NULL_WHILE_LOOP_CONDITION (0,0) | ||
#else | ||
#define SDL_NULL_WHILE_LOOP_CONDITION (0) | ||
#endif | ||
|
@@ -102,23 +104,23 @@ typedef enum | |
SDL_ASSERTION_ABORT, /**< Terminate the program. */ | ||
SDL_ASSERTION_IGNORE, /**< Ignore the assert. */ | ||
SDL_ASSERTION_ALWAYS_IGNORE /**< Ignore the assert from now on. */ | ||
} SDL_assert_state; | ||
} SDL_AssertState; | ||
|
||
typedef struct SDL_assert_data | ||
typedef struct SDL_AssertData | ||
{ | ||
int always_ignore; | ||
unsigned int trigger_count; | ||
const char *condition; | ||
const char *filename; | ||
int linenum; | ||
const char *function; | ||
const struct SDL_assert_data *next; | ||
} SDL_assert_data; | ||
const struct SDL_AssertData *next; | ||
} SDL_AssertData; | ||
|
||
#if (SDL_ASSERT_LEVEL > 0) | ||
|
||
/* Never call this directly. Use the SDL_assert* macros. */ | ||
extern DECLSPEC SDL_assert_state SDLCALL SDL_ReportAssertion(SDL_assert_data *, | ||
extern DECLSPEC SDL_AssertState SDLCALL SDL_ReportAssertion(SDL_AssertData *, | ||
const char *, | ||
const char *, int) | ||
#if defined(__clang__) | ||
|
@@ -141,10 +143,10 @@ extern DECLSPEC SDL_assert_state SDLCALL SDL_ReportAssertion(SDL_assert_data *, | |
#define SDL_enabled_assert(condition) \ | ||
do { \ | ||
while ( !(condition) ) { \ | ||
static struct SDL_assert_data sdl_assert_data = { \ | ||
static struct SDL_AssertData sdl_assert_data = { \ | ||
0, 0, #condition, 0, 0, 0, 0 \ | ||
}; \ | ||
const SDL_assert_state sdl_assert_state = SDL_ReportAssertion(&sdl_assert_data, SDL_FUNCTION, SDL_FILE, SDL_LINE); \ | ||
const SDL_AssertState sdl_assert_state = SDL_ReportAssertion(&sdl_assert_data, SDL_FUNCTION, SDL_FILE, SDL_LINE); \ | ||
if (sdl_assert_state == SDL_ASSERTION_RETRY) { \ | ||
continue; /* go again. */ \ | ||
} else if (sdl_assert_state == SDL_ASSERTION_BREAK) { \ | ||
|
@@ -181,8 +183,8 @@ extern DECLSPEC SDL_assert_state SDLCALL SDL_ReportAssertion(SDL_assert_data *, | |
#define SDL_assert_always(condition) SDL_enabled_assert(condition) | ||
|
||
|
||
typedef SDL_assert_state (SDLCALL *SDL_AssertionHandler)( | ||
const SDL_assert_data* data, void* userdata); | ||
typedef SDL_AssertState (SDLCALL *SDL_AssertionHandler)( | ||
const SDL_AssertData* data, void* userdata); | ||
|
||
/** | ||
* \brief Set an application-defined assertion handler. | ||
|
@@ -199,7 +201,7 @@ typedef SDL_assert_state (SDLCALL *SDL_AssertionHandler)( | |
* | ||
* This callback is NOT reset to SDL's internal handler upon SDL_Quit()! | ||
* | ||
* \return SDL_assert_state value of how to handle the assertion failure. | ||
* \return SDL_AssertState value of how to handle the assertion failure. | ||
* | ||
* \param handler Callback function, called when an assertion fails. | ||
* \param userdata A pointer passed to the callback as-is. | ||
|
@@ -246,7 +248,7 @@ extern DECLSPEC SDL_AssertionHandler SDLCALL SDL_GetAssertionHandler(void **puse | |
* The proper way to examine this data looks something like this: | ||
* | ||
* <code> | ||
* const SDL_assert_data *item = SDL_GetAssertionReport(); | ||
* const SDL_AssertData *item = SDL_GetAssertionReport(); | ||
* while (item) { | ||
* printf("'%s', %s (%s:%d), triggered %u times, always ignore: %s.\n", | ||
* item->condition, item->function, item->filename, | ||
|
@@ -259,7 +261,7 @@ extern DECLSPEC SDL_AssertionHandler SDLCALL SDL_GetAssertionHandler(void **puse | |
* \return List of all assertions. | ||
* \sa SDL_ResetAssertionReport | ||
*/ | ||
extern DECLSPEC const SDL_assert_data * SDLCALL SDL_GetAssertionReport(void); | ||
extern DECLSPEC const SDL_AssertData * SDLCALL SDL_GetAssertionReport(void); | ||
|
||
/** | ||
* \brief Reset the list of all assertion failures. | ||
|
@@ -270,6 +272,12 @@ extern DECLSPEC const SDL_assert_data * SDLCALL SDL_GetAssertionReport(void); | |
*/ | ||
extern DECLSPEC void SDLCALL SDL_ResetAssertionReport(void); | ||
|
||
|
||
/* these had wrong naming conventions until 2.0.4. Please update your app! */ | ||
#define SDL_assert_state SDL_AssertState | ||
#define SDL_assert_data SDL_AssertData | ||
|
||
|
||
/* Ends C function definitions when using C++ */ | ||
#ifdef __cplusplus | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
Simple DirectMedia Layer | ||
Copyright (C) 1997-2014 Sam Lantinga <[email protected]> | ||
Copyright (C) 1997-2015 Sam Lantinga <[email protected]> | ||
This software is provided 'as-is', without any express or implied | ||
warranty. In no event will the authors be held liable for any damages | ||
|
@@ -122,7 +122,7 @@ extern DECLSPEC void SDLCALL SDL_AtomicUnlock(SDL_SpinLock *lock); | |
void _ReadWriteBarrier(void); | ||
#pragma intrinsic(_ReadWriteBarrier) | ||
#define SDL_CompilerBarrier() _ReadWriteBarrier() | ||
#elif defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x5120)) | ||
#elif (defined(__GNUC__) && !defined(__EMSCRIPTEN__)) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x5120)) | ||
/* This is correct for all CPUs when using GCC or Solaris Studio 12.1+. */ | ||
#define SDL_CompilerBarrier() __asm__ __volatile__ ("" : : : "memory") | ||
#else | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
Simple DirectMedia Layer | ||
Copyright (C) 1997-2014 Sam Lantinga <[email protected]> | ||
Copyright (C) 1997-2015 Sam Lantinga <[email protected]> | ||
This software is provided 'as-is', without any express or implied | ||
warranty. In no event will the authors be held liable for any damages | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
Simple DirectMedia Layer | ||
Copyright (C) 1997-2014 Sam Lantinga <[email protected]> | ||
Copyright (C) 1997-2015 Sam Lantinga <[email protected]> | ||
This software is provided 'as-is', without any express or implied | ||
warranty. In no event will the authors be held liable for any damages | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
Simple DirectMedia Layer | ||
Copyright (C) 1997-2014 Sam Lantinga <[email protected]> | ||
Copyright (C) 1997-2015 Sam Lantinga <[email protected]> | ||
This software is provided 'as-is', without any express or implied | ||
warranty. In no event will the authors be held liable for any damages | ||
|
@@ -58,6 +58,6 @@ typedef enum | |
#endif | ||
#include "close_code.h" | ||
|
||
#endif /* _SDL_video_h */ | ||
#endif /* _SDL_blendmode_h */ | ||
|
||
/* vi: set ts=4 sw=4 expandtab: */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
Simple DirectMedia Layer | ||
Copyright (C) 1997-2014 Sam Lantinga <[email protected]> | ||
Copyright (C) 1997-2015 Sam Lantinga <[email protected]> | ||
This software is provided 'as-is', without any express or implied | ||
warranty. In no event will the authors be held liable for any damages | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
Simple DirectMedia Layer | ||
Copyright (C) 1997-2014 Sam Lantinga <[email protected]> | ||
Copyright (C) 1997-2015 Sam Lantinga <[email protected]> | ||
This software is provided 'as-is', without any express or implied | ||
warranty. In no event will the authors be held liable for any damages | ||
|
@@ -43,7 +43,6 @@ | |
#define HAVE_STDINT_H 1 | ||
#define HAVE_CTYPE_H 1 | ||
#define HAVE_MATH_H 1 | ||
#define HAVE_SIGNAL_H 1 | ||
|
||
/* C library functions */ | ||
#define HAVE_MALLOC 1 | ||
|
@@ -76,7 +75,6 @@ | |
#define HAVE_STRTOULL 1 | ||
#define HAVE_STRTOD 1 | ||
#define HAVE_ATOI 1 | ||
#define HAVE_ATOF 1 | ||
#define HAVE_STRCMP 1 | ||
#define HAVE_STRNCMP 1 | ||
#define HAVE_STRCASECMP 1 | ||
|
@@ -103,10 +101,10 @@ | |
#define HAVE_SQRTF 1 | ||
#define HAVE_TAN 1 | ||
#define HAVE_TANF 1 | ||
#define HAVE_SIGACTION 1 | ||
#define HAVE_SETJMP 1 | ||
#define HAVE_NANOSLEEP 1 | ||
#define HAVE_SYSCONF 1 | ||
#define HAVE_CLOCK_GETTIME 1 | ||
|
||
#define SIZEOF_VOIDP 4 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
Simple DirectMedia Layer | ||
Copyright (C) 1997-2014 Sam Lantinga <[email protected]> | ||
Copyright (C) 1997-2015 Sam Lantinga <[email protected]> | ||
This software is provided 'as-is', without any express or implied | ||
warranty. In no event will the authors be held liable for any damages | ||
|
@@ -145,6 +145,9 @@ | |
/* enable iPhone keyboard support */ | ||
#define SDL_IPHONE_KEYBOARD 1 | ||
|
||
/* enable iOS extended launch screen */ | ||
#define SDL_IPHONE_LAUNCHSCREEN 1 | ||
|
||
/* enable joystick subsystem */ | ||
#define SDL_JOYSTICK_DISABLED 0 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
Simple DirectMedia Layer | ||
Copyright (C) 1997-2014 Sam Lantinga <[email protected]> | ||
Copyright (C) 1997-2015 Sam Lantinga <[email protected]> | ||
This software is provided 'as-is', without any express or implied | ||
warranty. In no event will the authors be held liable for any damages | ||
|
@@ -139,6 +139,7 @@ | |
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR "/usr/X11R6/lib/libXrandr.2.dylib" | ||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS "/usr/X11R6/lib/libXss.1.dylib" | ||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE "/usr/X11R6/lib/libXxf86vm.1.dylib" | ||
#define SDL_VIDEO_DRIVER_X11_XDBE 1 | ||
#define SDL_VIDEO_DRIVER_X11_XINERAMA 1 | ||
#define SDL_VIDEO_DRIVER_X11_XRANDR 1 | ||
#define SDL_VIDEO_DRIVER_X11_XSCRNSAVER 1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
Simple DirectMedia Layer | ||
Copyright (C) 1997-2014 Sam Lantinga <[email protected]> | ||
Copyright (C) 1997-2015 Sam Lantinga <[email protected]> | ||
This software is provided 'as-is', without any express or implied | ||
warranty. In no event will the authors be held liable for any damages | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
Simple DirectMedia Layer | ||
Copyright (C) 1997-2014 Sam Lantinga <[email protected]> | ||
Copyright (C) 1997-2015 Sam Lantinga <[email protected]> | ||
This software is provided 'as-is', without any express or implied | ||
warranty. In no event will the authors be held liable for any damages | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
Simple DirectMedia Layer | ||
Copyright (C) 1997-2014 Sam Lantinga <[email protected]> | ||
Copyright (C) 1997-2015 Sam Lantinga <[email protected]> | ||
This software is provided 'as-is', without any express or implied | ||
warranty. In no event will the authors be held liable for any damages | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
Simple DirectMedia Layer | ||
Copyright (C) 1997-2014 Sam Lantinga <[email protected]> | ||
Copyright (C) 1997-2015 Sam Lantinga <[email protected]> | ||
This software is provided 'as-is', without any express or implied | ||
warranty. In no event will the authors be held liable for any damages | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
Simple DirectMedia Layer | ||
Copyright (C) 1997-2012 Sam Lantinga <[email protected]> | ||
Copyright (C) 1997-2015 Sam Lantinga <[email protected]> | ||
This software is provided 'as-is', without any express or implied | ||
warranty. In no event will the authors be held liable for any damages | ||
|
@@ -173,10 +173,8 @@ typedef unsigned int uintptr_t; | |
#define SDL_VIDEO_DRIVER_DUMMY 1 | ||
|
||
/* Enable OpenGL ES 2.0 (via a modified ANGLE library) */ | ||
#if WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP /* TODO, WinRT: try adding OpenGL ES 2 support for Windows Phone 8 */ | ||
#define SDL_VIDEO_OPENGL_ES2 1 | ||
#define SDL_VIDEO_OPENGL_EGL 1 | ||
#endif | ||
|
||
/* Enable appropriate renderer(s) */ | ||
#define SDL_VIDEO_RENDER_D3D11 1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
Simple DirectMedia Layer | ||
Copyright (C) 1997-2014 Sam Lantinga <[email protected]> | ||
Copyright (C) 1997-2015 Sam Lantinga <[email protected]> | ||
This software is provided 'as-is', without any express or implied | ||
warranty. In no event will the authors be held liable for any damages | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
Simple DirectMedia Layer | ||
Copyright (C) 1997-2014 Sam Lantinga <[email protected]> | ||
Copyright (C) 1997-2015 Sam Lantinga <[email protected]> | ||
This software is provided 'as-is', without any express or implied | ||
warranty. In no event will the authors be held liable for any damages | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
Simple DirectMedia Layer | ||
Copyright (C) 1997-2014 Sam Lantinga <[email protected]> | ||
Copyright (C) 1997-2015 Sam Lantinga <[email protected]> | ||
This software is provided 'as-is', without any express or implied | ||
warranty. In no event will the authors be held liable for any damages | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
Simple DirectMedia Layer | ||
Copyright (C) 1997-2014 Sam Lantinga <[email protected]> | ||
Copyright (C) 1997-2015 Sam Lantinga <[email protected]> | ||
This software is provided 'as-is', without any express or implied | ||
warranty. In no event will the authors be held liable for any damages | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
Simple DirectMedia Layer | ||
Copyright (C) 1997-2014 Sam Lantinga <[email protected]> | ||
Copyright (C) 1997-2015 Sam Lantinga <[email protected]> | ||
This software is provided 'as-is', without any express or implied | ||
warranty. In no event will the authors be held liable for any damages | ||
|
@@ -42,7 +42,7 @@ | |
#ifdef __linux__ | ||
#include <endian.h> | ||
#define SDL_BYTEORDER __BYTE_ORDER | ||
#else /* __linux __ */ | ||
#else /* __linux__ */ | ||
#if defined(__hppa__) || \ | ||
defined(__m68k__) || defined(mc68000) || defined(_M_M68K) || \ | ||
(defined(__MIPS__) && defined(__MISPEB__)) || \ | ||
|
@@ -52,7 +52,7 @@ | |
#else | ||
#define SDL_BYTEORDER SDL_LIL_ENDIAN | ||
#endif | ||
#endif /* __linux __ */ | ||
#endif /* __linux__ */ | ||
#endif /* !SDL_BYTEORDER */ | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
Simple DirectMedia Layer | ||
Copyright (C) 1997-2014 Sam Lantinga <[email protected]> | ||
Copyright (C) 1997-2015 Sam Lantinga <[email protected]> | ||
This software is provided 'as-is', without any express or implied | ||
warranty. In no event will the authors be held liable for any damages | ||
|
Oops, something went wrong.