diff options
author | Ryan C. Gordon <icculus@icculus.org> | 2011-08-29 13:17:07 -0400 |
---|---|---|
committer | Ryan C. Gordon <icculus@icculus.org> | 2011-08-29 13:17:07 -0400 |
commit | afdc683db8fe981741e358f3300a831844fc6b4c (patch) | |
tree | 1269855e842727751487b7f99402ae0e482ba958 /include | |
parent | d7674ee0ab6ca396f0b99fed0d951b3babd16608 (diff) | |
parent | 52bfd8fc81a6bea3fec0f8795013628482bae5c1 (diff) |
Automated merge with https://bitbucket.org/Markusk/sdl-gsoc
Diffstat (limited to 'include')
-rw-r--r-- | include/SDL_assert.h | 6 | ||||
-rw-r--r-- | include/SDL_atomic.h | 2 | ||||
-rw-r--r-- | include/SDL_config.h.in | 5 | ||||
-rw-r--r-- | include/SDL_config_iphoneos.h | 2 | ||||
-rw-r--r-- | include/SDL_config_windows.h | 3 | ||||
-rw-r--r-- | include/SDL_hints.h | 25 | ||||
-rw-r--r-- | include/SDL_opengl.h | 9 | ||||
-rw-r--r-- | include/SDL_platform.h | 9 | ||||
-rw-r--r-- | include/SDL_quit.h | 2 | ||||
-rw-r--r-- | include/SDL_rwops.h | 17 |
10 files changed, 62 insertions, 18 deletions
diff --git a/include/SDL_assert.h b/include/SDL_assert.h index d55e2441..19331232 100644 --- a/include/SDL_assert.h +++ b/include/SDL_assert.h @@ -53,7 +53,7 @@ assert can have unique static variables associated with it. /* Don't include intrin.h here because it contains C++ code */ extern void __cdecl __debugbreak(void); #define SDL_TriggerBreakpoint() __debugbreak() -#elif (defined(__GNUC__) && ((__i386__) || (__x86_64__))) +#elif (defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))) #define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "int $3\n\t" ) #elif defined(HAVE_SIGNAL_H) #include <signal.h> @@ -63,7 +63,7 @@ extern void __cdecl __debugbreak(void); #define SDL_TriggerBreakpoint() #endif -#if (__STDC_VERSION__ >= 199901L) /* C99 supports __func__ as a standard. */ +#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 supports __func__ as a standard. */ # define SDL_FUNCTION __func__ #elif ((__GNUC__ >= 2) || defined(_MSC_VER)) # define SDL_FUNCTION __FUNCTION__ @@ -99,7 +99,7 @@ typedef enum SDL_ASSERTION_BREAK, /**< Make the debugger trigger a breakpoint. */ SDL_ASSERTION_ABORT, /**< Terminate the program. */ SDL_ASSERTION_IGNORE, /**< Ignore the assert. */ - SDL_ASSERTION_ALWAYS_IGNORE, /**< Ignore the assert from now on. */ + SDL_ASSERTION_ALWAYS_IGNORE /**< Ignore the assert from now on. */ } SDL_assert_state; typedef struct SDL_assert_data diff --git a/include/SDL_atomic.h b/include/SDL_atomic.h index 5c6eadb5..6a6a73f5 100644 --- a/include/SDL_atomic.h +++ b/include/SDL_atomic.h @@ -140,7 +140,7 @@ void _ReadWriteBarrier(void); /* Platform specific optimized versions of the atomic functions, * you can disable these by defining SDL_DISABLE_ATOMIC_INLINE */ -#if SDL_ATOMIC_DISABLED +#if defined(SDL_ATOMIC_DISABLED) && SDL_ATOMIC_DISABLED #define SDL_DISABLE_ATOMIC_INLINE #endif #ifndef SDL_DISABLE_ATOMIC_INLINE diff --git a/include/SDL_config.h.in b/include/SDL_config.h.in index b5bb3e1b..14167fdd 100644 --- a/include/SDL_config.h.in +++ b/include/SDL_config.h.in @@ -45,6 +45,7 @@ #undef SIZEOF_VOIDP #undef HAVE_GCC_ATOMICS #undef HAVE_GCC_SYNC_LOCK_TEST_AND_SET +#undef HAVE_PTHREAD_SPINLOCK /* Comment this if you want to build without any C library requirements */ #undef HAVE_LIBC @@ -138,6 +139,7 @@ #undef HAVE_SINF #undef HAVE_SQRT #undef HAVE_SIGACTION +#undef HAVE_SA_SIGACTION #undef HAVE_SETJMP #undef HAVE_NANOSLEEP #undef HAVE_SYSCONF @@ -182,6 +184,7 @@ #undef SDL_AUDIO_DRIVER_COREAUDIO #undef SDL_AUDIO_DRIVER_DISK #undef SDL_AUDIO_DRIVER_DUMMY +#undef SDL_AUDIO_DRIVER_XAUDIO2 #undef SDL_AUDIO_DRIVER_DSOUND #undef SDL_AUDIO_DRIVER_ESD #undef SDL_AUDIO_DRIVER_ESD_DYNAMIC @@ -193,7 +196,7 @@ #undef SDL_AUDIO_DRIVER_PAUDIO #undef SDL_AUDIO_DRIVER_QSA #undef SDL_AUDIO_DRIVER_SUNAUDIO -#undef SDL_AUDIO_DRIVER_WINWAVEOUT +#undef SDL_AUDIO_DRIVER_WINMM #undef SDL_AUDIO_DRIVER_FUSIONSOUND #undef SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC diff --git a/include/SDL_config_iphoneos.h b/include/SDL_config_iphoneos.h index 07d6c183..e6a1dea9 100644 --- a/include/SDL_config_iphoneos.h +++ b/include/SDL_config_iphoneos.h @@ -104,7 +104,7 @@ #define HAVE_SYSCTLBYNAME 1 /* enable iPhone version of Core Audio driver */ -#define SDL_AUDIO_DRIVER_COREAUDIOIPHONE 1 +#define SDL_AUDIO_DRIVER_COREAUDIO 1 /* Enable the dummy audio driver (src/audio/dummy/\*.c) */ #define SDL_AUDIO_DRIVER_DUMMY 1 diff --git a/include/SDL_config_windows.h b/include/SDL_config_windows.h index b844b2a8..b980f0d1 100644 --- a/include/SDL_config_windows.h +++ b/include/SDL_config_windows.h @@ -145,8 +145,9 @@ typedef unsigned int uintptr_t; /* Enable various audio drivers */ #ifndef _WIN32_WCE #define SDL_AUDIO_DRIVER_DSOUND 1 +#define SDL_AUDIO_DRIVER_XAUDIO2 1 #endif -#define SDL_AUDIO_DRIVER_WINWAVEOUT 1 +#define SDL_AUDIO_DRIVER_WINMM 1 #define SDL_AUDIO_DRIVER_DISK 1 #define SDL_AUDIO_DRIVER_DUMMY 1 diff --git a/include/SDL_hints.h b/include/SDL_hints.h index ed76ce53..64323917 100644 --- a/include/SDL_hints.h +++ b/include/SDL_hints.h @@ -118,6 +118,31 @@ extern "C" { * By default SDL does not sync screen surface updates with vertical refresh. */ #define SDL_HINT_RENDER_VSYNC "SDL_RENDER_VSYNC" + +/** + * \brief A variable controlling whether the idle timer is disabled on iOS. + * + * When an iOS app does not receive touches for some time, the screen is + * dimmed automatically. For games where the accelerometer is the only input + * this is problematic. This functionality can be disabled by setting this + * hint. + * + * This variable can be set to the following values: + * "0" - Enable idle timer + * "1" - Disable idle timer + */ +#define SDL_HINT_IDLE_TIMER_DISABLED "SDL_IOS_IDLE_TIMER_DISABLED" + +/** + * \brief A variable controlling which orientations are allowed on iOS. + * + * In some circumstances it is necessary to be able to explicitly control + * which UI orientations are allowed. + * + * This variable is a space delimited list of the following values: + * "LandscapeLeft", "LandscapeRight", "Portrait" "PortraitUpsideDown" + */ +#define SDL_HINT_ORIENTATIONS "SDL_IOS_ORIENTATIONS" /** diff --git a/include/SDL_opengl.h b/include/SDL_opengl.h index c0db8263..0e5ed0fd 100644 --- a/include/SDL_opengl.h +++ b/include/SDL_opengl.h @@ -5105,9 +5105,14 @@ typedef char GLchar; #ifndef GL_VERSION_1_5 /* GL types for handling large vertex buffer objects */ +#if defined(__APPLE__) +typedef long GLintptr; +typedef long GLsizeiptr; +#else typedef ptrdiff_t GLintptr; typedef ptrdiff_t GLsizeiptr; #endif +#endif #ifndef GL_ARB_vertex_buffer_object /* GL types for handling large vertex buffer objects */ @@ -5118,8 +5123,12 @@ typedef ptrdiff_t GLsizeiptrARB; #ifndef GL_ARB_shader_objects /* GL types for program/shader text and shader object handles */ typedef char GLcharARB; +#if defined(__APPLE__) +typedef void *GLhandleARB; +#else typedef unsigned int GLhandleARB; #endif +#endif /* GL type for "half" precision (s10e5) float data in host memory */ #ifndef GL_ARB_half_float_pixel diff --git a/include/SDL_platform.h b/include/SDL_platform.h index 9e7a33b0..ec29b06b 100644 --- a/include/SDL_platform.h +++ b/include/SDL_platform.h @@ -74,15 +74,6 @@ /* lets us know what version of Mac OS X we're compiling on */ #include "AvailabilityMacros.h" #include "TargetConditionals.h" -#ifndef MAC_OS_X_VERSION_10_4 -#define MAC_OS_X_VERSION_10_4 1040 -#endif -#ifndef MAC_OS_X_VERSION_10_5 -#define MAC_OS_X_VERSION_10_5 1050 -#endif -#ifndef MAC_OS_X_VERSION_10_6 -#define MAC_OS_X_VERSION_10_6 1060 -#endif #if TARGET_OS_IPHONE /* if compiling for iPhone */ #undef __IPHONEOS__ diff --git a/include/SDL_quit.h b/include/SDL_quit.h index ef885702..d6f11a80 100644 --- a/include/SDL_quit.h +++ b/include/SDL_quit.h @@ -53,6 +53,6 @@ /* There are no functions directly affecting the quit event */ #define SDL_QuitRequested() \ - (SDL_PumpEvents(), SDL_PeepEvents(NULL,0,SDL_PEEKEVENT,SDL_QUIT,SDL_QUIT)) + (SDL_PumpEvents(), (SDL_PeepEvents(NULL,0,SDL_PEEKEVENT,SDL_QUIT,SDL_QUIT) > 0)) #endif /* _SDL_quit_h */ diff --git a/include/SDL_rwops.h b/include/SDL_rwops.h index f2a8d4f1..48824f43 100644 --- a/include/SDL_rwops.h +++ b/include/SDL_rwops.h @@ -82,7 +82,21 @@ typedef struct SDL_RWops Uint32 type; union { -#ifdef __WIN32__ +#if defined(ANDROID) + struct + { + void *fileName; + void *fileNameRef; + void *inputStream; + void *inputStreamRef; + void *skipMethod; + void *readableByteChannel; + void *readableByteChannelRef; + void *readMethod; + long position; + int size; + } androidio; +#elif defined(__WIN32__) struct { SDL_bool append; @@ -95,6 +109,7 @@ typedef struct SDL_RWops } buffer; } windowsio; #endif + #ifdef HAVE_STDIO_H struct { |