forked from snowkit/linc_sdl
-
Notifications
You must be signed in to change notification settings - Fork 2
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
665 changed files
with
13,227 additions
and
3,425 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-2016 Sam Lantinga <[email protected]> | ||
Copyright (C) 1997-2017 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-2016 Sam Lantinga <[email protected]> | ||
Copyright (C) 1997-2017 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-2016 Sam Lantinga <[email protected]> | ||
Copyright (C) 1997-2017 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 | ||
|
@@ -149,18 +149,21 @@ void _ReadWriteBarrier(void); | |
* For more information on these semantics, take a look at the blog post: | ||
* http://preshing.com/20120913/acquire-and-release-semantics | ||
*/ | ||
extern DECLSPEC void SDLCALL SDL_MemoryBarrierReleaseFunction(void); | ||
extern DECLSPEC void SDLCALL SDL_MemoryBarrierAcquireFunction(void); | ||
|
||
#if defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__)) | ||
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("lwsync" : : : "memory") | ||
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("lwsync" : : : "memory") | ||
#elif defined(__GNUC__) && defined(__arm__) | ||
#if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7EM__) || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7S__) | ||
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("dmb ish" : : : "memory") | ||
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("dmb ish" : : : "memory") | ||
#elif defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) | ||
#elif defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_5TE__) | ||
#ifdef __thumb__ | ||
/* The mcr instruction isn't available in thumb mode, use real functions */ | ||
extern DECLSPEC void SDLCALL SDL_MemoryBarrierRelease(); | ||
extern DECLSPEC void SDLCALL SDL_MemoryBarrierAcquire(); | ||
#define SDL_MemoryBarrierRelease() SDL_MemoryBarrierReleaseFunction() | ||
#define SDL_MemoryBarrierAcquire() SDL_MemoryBarrierAcquireFunction() | ||
#else | ||
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5" : : "r"(0) : "memory") | ||
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5" : : "r"(0) : "memory") | ||
|
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-2016 Sam Lantinga <[email protected]> | ||
Copyright (C) 1997-2017 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 | ||
|
@@ -171,7 +171,7 @@ typedef struct SDL_AudioSpec | |
SDL_AudioFormat format; /**< Audio data format */ | ||
Uint8 channels; /**< Number of channels: 1 mono, 2 stereo */ | ||
Uint8 silence; /**< Audio buffer silence value (calculated) */ | ||
Uint16 samples; /**< Audio buffer size in samples (power of 2) */ | ||
Uint16 samples; /**< Audio buffer size in sample FRAMES (total samples divided by channel count) */ | ||
Uint16 padding; /**< Necessary for some compile environments */ | ||
Uint32 size; /**< Audio buffer size in bytes (calculated) */ | ||
SDL_AudioCallback callback; /**< Callback that feeds the audio device (NULL to use SDL_QueueAudio()). */ | ||
|
@@ -185,6 +185,12 @@ typedef void (SDLCALL * SDL_AudioFilter) (struct SDL_AudioCVT * cvt, | |
|
||
/** | ||
* A structure to hold a set of audio conversion filters and buffers. | ||
* | ||
* Note that various parts of the conversion pipeline can take advantage | ||
* of SIMD operations (like SSE2, for example). SDL_AudioCVT doesn't require | ||
* you to pass it aligned data, but can possibly run much faster if you | ||
* set both its (buf) field to a pointer that is aligned to 16 bytes, and its | ||
* (len) field to something that's a multiple of 16, if possible. | ||
*/ | ||
#ifdef __GNUC__ | ||
/* This structure is 84 bytes on 32-bit architectures, make sure GCC doesn't | ||
|
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-2016 Sam Lantinga <[email protected]> | ||
Copyright (C) 1997-2017 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-2016 Sam Lantinga <[email protected]> | ||
Copyright (C) 1997-2017 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-2016 Sam Lantinga <[email protected]> | ||
Copyright (C) 1997-2017 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-2016 Sam Lantinga <[email protected]> | ||
Copyright (C) 1997-2017 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 | ||
|
@@ -21,6 +21,7 @@ | |
|
||
#ifndef SDL_config_android_h_ | ||
#define SDL_config_android_h_ | ||
#define SDL_config_h_ | ||
|
||
#include "SDL_platform.h" | ||
|
||
|
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-2016 Sam Lantinga <[email protected]> | ||
Copyright (C) 1997-2017 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 | ||
|
@@ -21,6 +21,7 @@ | |
|
||
#ifndef SDL_config_iphoneos_h_ | ||
#define SDL_config_iphoneos_h_ | ||
#define SDL_config_h_ | ||
|
||
#include "SDL_platform.h" | ||
|
||
|
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-2016 Sam Lantinga <[email protected]> | ||
Copyright (C) 1997-2017 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 | ||
|
@@ -21,6 +21,7 @@ | |
|
||
#ifndef SDL_config_macosx_h_ | ||
#define SDL_config_macosx_h_ | ||
#define SDL_config_h_ | ||
|
||
#include "SDL_platform.h" | ||
|
||
|
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-2016 Sam Lantinga <[email protected]> | ||
Copyright (C) 1997-2017 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 | ||
|
@@ -21,6 +21,7 @@ | |
|
||
#ifndef SDL_config_minimal_h_ | ||
#define SDL_config_minimal_h_ | ||
#define SDL_config_h_ | ||
|
||
#include "SDL_platform.h" | ||
|
||
|
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-2016 Sam Lantinga <[email protected]> | ||
Copyright (C) 1997-2017 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 | ||
|
@@ -19,7 +19,8 @@ | |
3. This notice may not be removed or altered from any source distribution. | ||
*/ | ||
|
||
#ifndef SDL_config_h_ | ||
#ifndef SDL_config_pandora_h_ | ||
#define SDL_config_pandora_h_ | ||
#define SDL_config_h_ | ||
|
||
/* This is a set of defines to configure the SDL features */ | ||
|
@@ -124,4 +125,4 @@ | |
#define SDL_VIDEO_RENDER_OGL_ES 1 | ||
#define SDL_VIDEO_OPENGL_ES 1 | ||
|
||
#endif /* SDL_config_h_ */ | ||
#endif /* SDL_config_pandora_h_ */ |
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-2016 Sam Lantinga <[email protected]> | ||
Copyright (C) 1997-2017 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 | ||
|
@@ -21,6 +21,7 @@ | |
|
||
#ifndef SDL_config_psp_h_ | ||
#define SDL_config_psp_h_ | ||
#define SDL_config_h_ | ||
|
||
#include "SDL_platform.h" | ||
|
||
|
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-2016 Sam Lantinga <[email protected]> | ||
Copyright (C) 1997-2017 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 | ||
|
@@ -21,6 +21,7 @@ | |
|
||
#ifndef SDL_config_windows_h_ | ||
#define SDL_config_windows_h_ | ||
#define SDL_config_h_ | ||
|
||
#include "SDL_platform.h" | ||
|
||
|
@@ -154,6 +155,7 @@ typedef unsigned int uintptr_t; | |
#endif | ||
|
||
/* Enable various audio drivers */ | ||
#define SDL_AUDIO_DRIVER_WASAPI 1 | ||
#define SDL_AUDIO_DRIVER_DSOUND 1 | ||
#define SDL_AUDIO_DRIVER_XAUDIO2 1 | ||
#define SDL_AUDIO_DRIVER_WINMM 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-2016 Sam Lantinga <[email protected]> | ||
Copyright (C) 1997-2017 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 | ||
|
@@ -21,6 +21,7 @@ | |
|
||
#ifndef SDL_config_winrt_h_ | ||
#define SDL_config_winrt_h_ | ||
#define SDL_config_h_ | ||
|
||
#include "SDL_platform.h" | ||
|
||
|
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-2016 Sam Lantinga <[email protected]> | ||
Copyright (C) 1997-2017 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 | ||
|
@@ -19,7 +19,8 @@ | |
3. This notice may not be removed or altered from any source distribution. | ||
*/ | ||
|
||
#ifndef SDL_config_h_ | ||
#ifndef SDL_config_wiz_h_ | ||
#define SDL_config_wiz_h_ | ||
#define SDL_config_h_ | ||
|
||
/* This is a set of defines to configure the SDL features */ | ||
|
@@ -117,4 +118,4 @@ | |
#define SDL_VIDEO_RENDER_OGL_ES 1 | ||
#define SDL_VIDEO_OPENGL_ES 1 | ||
|
||
#endif /* SDL_config_h_ */ | ||
#endif /* SDL_config_wiz_h_ */ |
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-2016 Sam Lantinga <[email protected]> | ||
Copyright (C) 1997-2017 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-2016 Sam Lantinga <[email protected]> | ||
Copyright (C) 1997-2017 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 | ||
|
@@ -61,6 +61,9 @@ | |
#ifdef __SSE2__ | ||
#include <emmintrin.h> | ||
#endif | ||
#ifdef __SSE3__ | ||
#include <pmmintrin.h> | ||
#endif | ||
#endif | ||
|
||
#include "begin_code.h" | ||
|
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-2016 Sam Lantinga <[email protected]> | ||
Copyright (C) 1997-2017 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 | ||
|
@@ -132,10 +132,7 @@ | |
*------------------------------------------------------------------------- | ||
* This precedes the return type of the function in the function prototype. | ||
*/ | ||
#if defined(NATIVE_TOOLKIT_STATIC_ANGLE) | ||
// not "dllimport" - just extern | ||
# define KHRONOS_APICALL | ||
#elif defined(_WIN32) && !defined(__SCITECH_SNAP__) | ||
#if defined(_WIN32) && !defined(__SCITECH_SNAP__) | ||
# define KHRONOS_APICALL __declspec(dllimport) | ||
#elif defined (__SYMBIAN32__) | ||
# define KHRONOS_APICALL IMPORT_C | ||
|
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-2016 Sam Lantinga <[email protected]> | ||
Copyright (C) 1997-2017 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-2016 Sam Lantinga <[email protected]> | ||
Copyright (C) 1997-2017 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-2016 Sam Lantinga <[email protected]> | ||
Copyright (C) 1997-2017 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 | ||
|
@@ -431,7 +431,7 @@ typedef struct SDL_MultiGestureEvent | |
{ | ||
Uint32 type; /**< ::SDL_MULTIGESTURE */ | ||
Uint32 timestamp; | ||
SDL_TouchID touchId; /**< The touch device index */ | ||
SDL_TouchID touchId; /**< The touch device id */ | ||
float dTheta; | ||
float dDist; | ||
float x; | ||
|
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-2016 Sam Lantinga <[email protected]> | ||
Copyright (C) 1997-2017 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.