mirror of
https://github.com/love2d/love-android.git
synced 2026-08-19 12:14:49 +02:00
Bumped SDL2 to the latest development version.
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "./SDL_internal.h"
|
||||
|
||||
#if defined(__WIN32__)
|
||||
#include "core/windows/SDL_windows.h"
|
||||
@@ -115,9 +115,11 @@ SDL_InitSubSystem(Uint32 flags)
|
||||
SDL_ClearError();
|
||||
|
||||
#if SDL_VIDEO_DRIVER_WINDOWS
|
||||
if (SDL_HelperWindowCreate() < 0) {
|
||||
return -1;
|
||||
}
|
||||
if ((flags & (SDL_INIT_HAPTIC|SDL_INIT_JOYSTICK))) {
|
||||
if (SDL_HelperWindowCreate() < 0) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !SDL_TIMERS_DISABLED
|
||||
@@ -394,8 +396,6 @@ SDL_GetPlatform()
|
||||
return "AIX";
|
||||
#elif __ANDROID__
|
||||
return "Android";
|
||||
#elif __BEOS__
|
||||
return "BeOS";
|
||||
#elif __BSDI__
|
||||
return "BSDI";
|
||||
#elif __DREAMCAST__
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "./SDL_internal.h"
|
||||
|
||||
#if defined(__WIN32__)
|
||||
#include "core/windows/SDL_windows.h"
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "./SDL_internal.h"
|
||||
|
||||
/* Simple error handling in SDL */
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "./SDL_internal.h"
|
||||
|
||||
/* This file defines a structure that carries language-independent
|
||||
error messages
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "./SDL_internal.h"
|
||||
|
||||
#include "SDL_hints.h"
|
||||
#include "SDL_error.h"
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2013 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 _SDL_internal_h
|
||||
#define _SDL_internal_h
|
||||
|
||||
#include "dynapi/SDL_dynapi.h"
|
||||
|
||||
#if SDL_DYNAMIC_API
|
||||
#include "dynapi/SDL_dynapi_overrides.h"
|
||||
/* force DECLSPEC and SDLCALL off...it's all internal symbols now.
|
||||
These will have actual #defines during SDL_dynapi.c only */
|
||||
#define DECLSPEC
|
||||
#define SDLCALL
|
||||
#endif
|
||||
|
||||
#include "SDL_config.h"
|
||||
|
||||
#endif
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "./SDL_internal.h"
|
||||
|
||||
#if defined(__WIN32__)
|
||||
#include "core/windows/SDL_windows.h"
|
||||
|
||||
@@ -18,17 +18,18 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../SDL_internal.h"
|
||||
|
||||
#include "SDL_atomic.h"
|
||||
|
||||
/* Note that we undefine the atomic operations here, in case they are
|
||||
defined as compiler intrinsics while building SDL but the library user
|
||||
doesn't have that compiler. That way we always have a working set of
|
||||
atomic operations built into the library.
|
||||
*/
|
||||
#undef SDL_AtomicCAS
|
||||
#undef SDL_AtomicCASPtr
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1500)
|
||||
#include <intrin.h>
|
||||
#define HAVE_MSC_ATOMICS 1
|
||||
#endif
|
||||
|
||||
#if defined(__MACOSX__) /* !!! FIXME: should we favor gcc atomics? */
|
||||
#include <libkern/OSAtomic.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
If any of the operations are not provided then we must emulate some
|
||||
@@ -53,6 +54,11 @@
|
||||
Contributed by Bob Pendleton, bob@pendleton.com
|
||||
*/
|
||||
|
||||
#if !defined(HAVE_MSC_ATOMICS) && !defined(HAVE_GCC_ATOMICS) && !defined(__MACOSX__)
|
||||
#define EMULATE_CAS 1
|
||||
#endif
|
||||
|
||||
#if EMULATE_CAS
|
||||
static SDL_SpinLock locks[32];
|
||||
|
||||
static SDL_INLINE void
|
||||
@@ -70,10 +76,19 @@ leaveLock(void *a)
|
||||
|
||||
SDL_AtomicUnlock(&locks[index]);
|
||||
}
|
||||
#endif
|
||||
|
||||
DECLSPEC SDL_bool SDLCALL
|
||||
|
||||
SDL_bool
|
||||
SDL_AtomicCAS(SDL_atomic_t *a, int oldval, int newval)
|
||||
{
|
||||
#ifdef HAVE_MSC_ATOMICS
|
||||
return (_InterlockedCompareExchange((long*)&a->value, (long)newval, (long)oldval) == (long)oldval);
|
||||
#elif defined(__MACOSX__) /* !!! FIXME: should we favor gcc atomics? */
|
||||
return (SDL_bool) OSAtomicCompareAndSwap32Barrier(oldval, newval, &a->value);
|
||||
#elif defined(HAVE_GCC_ATOMICS)
|
||||
return (SDL_bool) __sync_bool_compare_and_swap(&a->value, oldval, newval);
|
||||
#elif EMULATE_CAS
|
||||
SDL_bool retval = SDL_FALSE;
|
||||
|
||||
enterLock(a);
|
||||
@@ -84,11 +99,25 @@ SDL_AtomicCAS(SDL_atomic_t *a, int oldval, int newval)
|
||||
leaveLock(a);
|
||||
|
||||
return retval;
|
||||
#else
|
||||
#error Please define your platform.
|
||||
#endif
|
||||
}
|
||||
|
||||
DECLSPEC SDL_bool SDLCALL
|
||||
SDL_bool
|
||||
SDL_AtomicCASPtr(void **a, void *oldval, void *newval)
|
||||
{
|
||||
#if defined(HAVE_MSC_ATOMICS) && (_M_IX86)
|
||||
return (_InterlockedCompareExchange((long*)a, (long)newval, (long)oldval) == (long)oldval);
|
||||
#elif defined(HAVE_MSC_ATOMICS) && (!_M_IX86)
|
||||
return (_InterlockedCompareExchangePointer(a, newval, oldval) == oldval);
|
||||
#elif defined(__MACOSX__) && defined(__LP64__) /* !!! FIXME: should we favor gcc atomics? */
|
||||
return (SDL_bool) OSAtomicCompareAndSwap64Barrier((int64_t)oldval, (int64_t)newval, (int64_t*) a);
|
||||
#elif defined(__MACOSX__) && !defined(__LP64__) /* !!! FIXME: should we favor gcc atomics? */
|
||||
return (SDL_bool) OSAtomicCompareAndSwap32Barrier((int32_t)oldval, (int32_t)newval, (int32_t*) a);
|
||||
#elif defined(HAVE_GCC_ATOMICS)
|
||||
return __sync_bool_compare_and_swap(a, oldval, newval);
|
||||
#elif EMULATE_CAS
|
||||
SDL_bool retval = SDL_FALSE;
|
||||
|
||||
enterLock(a);
|
||||
@@ -99,10 +128,83 @@ SDL_AtomicCASPtr(void **a, void *oldval, void *newval)
|
||||
leaveLock(a);
|
||||
|
||||
return retval;
|
||||
#else
|
||||
#error Please define your platform.
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined(__GNUC__) && defined(__arm__) && \
|
||||
(defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__))
|
||||
int
|
||||
SDL_AtomicSet(SDL_atomic_t *a, int v)
|
||||
{
|
||||
#ifdef HAVE_MSC_ATOMICS
|
||||
return _InterlockedExchange((long*)&a->value, v);
|
||||
#elif defined(HAVE_GCC_ATOMICS)
|
||||
return __sync_lock_test_and_set(&a->value, v);
|
||||
#else
|
||||
int value;
|
||||
do {
|
||||
value = a->value;
|
||||
} while (!SDL_AtomicCAS(a, value, v));
|
||||
return value;
|
||||
#endif
|
||||
}
|
||||
|
||||
void*
|
||||
SDL_AtomicSetPtr(void **a, void *v)
|
||||
{
|
||||
#if defined(HAVE_MSC_ATOMICS) && (_M_IX86)
|
||||
return (void *) _InterlockedExchange((long *)a, (long) v);
|
||||
#elif defined(HAVE_MSC_ATOMICS) && (!_M_IX86)
|
||||
return _InterlockedExchangePointer(a, v);
|
||||
#elif defined(HAVE_GCC_ATOMICS)
|
||||
return __sync_lock_test_and_set(a, v);
|
||||
#else
|
||||
void *value;
|
||||
do {
|
||||
value = *a;
|
||||
} while (!SDL_AtomicCASPtr(a, value, v));
|
||||
return value;
|
||||
#endif
|
||||
}
|
||||
|
||||
int
|
||||
SDL_AtomicAdd(SDL_atomic_t *a, int v)
|
||||
{
|
||||
#ifdef HAVE_MSC_ATOMICS
|
||||
return _InterlockedExchangeAdd((long*)&a->value, v);
|
||||
#elif defined(HAVE_GCC_ATOMICS)
|
||||
return __sync_fetch_and_add(&a->value, v);
|
||||
#else
|
||||
int value;
|
||||
do {
|
||||
value = a->value;
|
||||
} while (!SDL_AtomicCAS(a, value, (value + v)));
|
||||
return value;
|
||||
#endif
|
||||
}
|
||||
|
||||
int
|
||||
SDL_AtomicGet(SDL_atomic_t *a)
|
||||
{
|
||||
int value;
|
||||
do {
|
||||
value = a->value;
|
||||
} while (!SDL_AtomicCAS(a, value, value));
|
||||
return value;
|
||||
}
|
||||
|
||||
void *
|
||||
SDL_AtomicGetPtr(void **a)
|
||||
{
|
||||
void *value;
|
||||
do {
|
||||
value = *a;
|
||||
} while (!SDL_AtomicCASPtr(a, value, value));
|
||||
return value;
|
||||
}
|
||||
|
||||
#ifdef __thumb__
|
||||
#if defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__)
|
||||
__asm__(
|
||||
" .align 2\n"
|
||||
" .globl _SDL_MemoryBarrierRelease\n"
|
||||
@@ -113,6 +215,7 @@ __asm__(
|
||||
" mcr p15, 0, r0, c7, c10, 5\n"
|
||||
" bx lr\n"
|
||||
);
|
||||
#endif /* __GNUC__ && __arm__ && ARMV6 */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../SDL_internal.h"
|
||||
|
||||
#ifdef __WIN32__
|
||||
#include "../core/windows/SDL_windows.h"
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../SDL_internal.h"
|
||||
|
||||
/* Allow access to a raw mixing buffer */
|
||||
|
||||
@@ -56,7 +56,7 @@ extern AudioBootStrap XAUDIO2_bootstrap;
|
||||
extern AudioBootStrap DSOUND_bootstrap;
|
||||
extern AudioBootStrap WINMM_bootstrap;
|
||||
extern AudioBootStrap PAUDIO_bootstrap;
|
||||
extern AudioBootStrap BEOSAUDIO_bootstrap;
|
||||
extern AudioBootStrap HAIKUAUDIO_bootstrap;
|
||||
extern AudioBootStrap COREAUDIO_bootstrap;
|
||||
extern AudioBootStrap SNDMGR_bootstrap;
|
||||
extern AudioBootStrap DISKAUD_bootstrap;
|
||||
@@ -113,8 +113,8 @@ static const AudioBootStrap *const bootstrap[] = {
|
||||
#if SDL_AUDIO_DRIVER_PAUDIO
|
||||
&PAUDIO_bootstrap,
|
||||
#endif
|
||||
#if SDL_AUDIO_DRIVER_BEOSAUDIO
|
||||
&BEOSAUDIO_bootstrap,
|
||||
#if SDL_AUDIO_DRIVER_HAIKU
|
||||
&HAIKUAUDIO_bootstrap,
|
||||
#endif
|
||||
#if SDL_AUDIO_DRIVER_COREAUDIO
|
||||
&COREAUDIO_bootstrap,
|
||||
@@ -722,10 +722,16 @@ SDL_GetAudioDeviceName(int index, int iscapture)
|
||||
}
|
||||
|
||||
if ((iscapture) && (current_audio.impl.OnlyHasDefaultInputDevice)) {
|
||||
if (index > 0) {
|
||||
goto no_such_device;
|
||||
}
|
||||
return DEFAULT_INPUT_DEVNAME;
|
||||
}
|
||||
|
||||
if ((!iscapture) && (current_audio.impl.OnlyHasDefaultOutputDevice)) {
|
||||
if (index > 0) {
|
||||
goto no_such_device;
|
||||
}
|
||||
return DEFAULT_OUTPUT_DEVNAME;
|
||||
}
|
||||
|
||||
@@ -1030,7 +1036,11 @@ open_audio_device(const char *devname, int iscapture,
|
||||
/* !!! FIXME: this is nasty. */
|
||||
#if defined(__WIN32__) && !defined(HAVE_LIBC)
|
||||
#undef SDL_CreateThread
|
||||
#if SDL_DYNAMIC_API
|
||||
device->thread = SDL_CreateThread_REAL(SDL_RunAudio, name, device, NULL, NULL);
|
||||
#else
|
||||
device->thread = SDL_CreateThread(SDL_RunAudio, name, device, NULL, NULL);
|
||||
#endif
|
||||
#else
|
||||
device->thread = SDL_CreateThread(SDL_RunAudio, name, device);
|
||||
#endif
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../SDL_internal.h"
|
||||
|
||||
/* Functions and variables exported from SDL_audio.c for SDL_sysaudio.c */
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../SDL_internal.h"
|
||||
|
||||
/* Functions for audio drivers to perform runtime conversion of audio format */
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../SDL_internal.h"
|
||||
|
||||
/* Get the name of the audio device we use for output */
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL.h"
|
||||
#include "SDL_config.h"
|
||||
#include "../SDL_internal.h"
|
||||
#include "SDL_sysaudio.h"
|
||||
|
||||
/* Open the audio device for playback, and don't block if busy */
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../SDL_internal.h"
|
||||
|
||||
#define SDL_AllocAudioMem SDL_malloc
|
||||
#define SDL_FreeAudioMem SDL_free
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#include "SDL_config.h"
|
||||
#include "../SDL_internal.h"
|
||||
#include "SDL_audio.h"
|
||||
#include "SDL_audio_c.h"
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../SDL_internal.h"
|
||||
|
||||
/* This provides the default mixing callback for the SDL audio routines */
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../SDL_internal.h"
|
||||
|
||||
#ifndef _SDL_sysaudio_h
|
||||
#define _SDL_sysaudio_h
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../SDL_internal.h"
|
||||
|
||||
/* Microsoft WAVE file loading routines */
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../SDL_internal.h"
|
||||
|
||||
/* WAVE files are little-endian */
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../../SDL_internal.h"
|
||||
|
||||
#if SDL_AUDIO_DRIVER_ALSA
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../../SDL_internal.h"
|
||||
|
||||
#ifndef _SDL_ALSA_audio_h
|
||||
#define _SDL_ALSA_audio_h
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../../SDL_internal.h"
|
||||
|
||||
#if SDL_AUDIO_DRIVER_ANDROID
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../../SDL_internal.h"
|
||||
|
||||
#ifndef _SDL_androidaudio_h
|
||||
#define _SDL_androidaudio_h
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../../SDL_internal.h"
|
||||
|
||||
#if SDL_AUDIO_DRIVER_ARTS
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../../SDL_internal.h"
|
||||
|
||||
#ifndef _SDL_artscaudio_h
|
||||
#define _SDL_artscaudio_h
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../../SDL_internal.h"
|
||||
|
||||
#if SDL_AUDIO_DRIVER_BSD
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../../SDL_internal.h"
|
||||
|
||||
#ifndef _SDL_bsdaudio_h
|
||||
#define _SDL_bsdaudio_h
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../../SDL_internal.h"
|
||||
#include "SDL_audio.h"
|
||||
#include "../SDL_audio_c.h"
|
||||
#include "../SDL_sysaudio.h"
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../../SDL_internal.h"
|
||||
|
||||
#ifndef _SDL_coreaudio_h
|
||||
#define _SDL_coreaudio_h
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../../SDL_internal.h"
|
||||
|
||||
#if SDL_AUDIO_DRIVER_DSOUND
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../../SDL_internal.h"
|
||||
|
||||
#ifndef _SDL_directsound_h
|
||||
#define _SDL_directsound_h
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../../SDL_internal.h"
|
||||
|
||||
#if SDL_AUDIO_DRIVER_DISK
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../../SDL_internal.h"
|
||||
|
||||
#ifndef _SDL_diskaudio_h
|
||||
#define _SDL_diskaudio_h
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../../SDL_internal.h"
|
||||
|
||||
#if SDL_AUDIO_DRIVER_OSS
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../../SDL_internal.h"
|
||||
|
||||
#ifndef _SDL_dspaudio_h
|
||||
#define _SDL_dspaudio_h
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../../SDL_internal.h"
|
||||
|
||||
/* Output audio to nowhere... */
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../../SDL_internal.h"
|
||||
|
||||
#ifndef _SDL_dummyaudio_h
|
||||
#define _SDL_dummyaudio_h
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../../SDL_internal.h"
|
||||
|
||||
#if SDL_AUDIO_DRIVER_ESD
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../../SDL_internal.h"
|
||||
|
||||
#ifndef _SDL_esdaudio_h
|
||||
#define _SDL_esdaudio_h
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../../SDL_internal.h"
|
||||
|
||||
#if SDL_AUDIO_DRIVER_FUSIONSOUND
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../../SDL_internal.h"
|
||||
|
||||
#ifndef _SDL_fsaudio_h
|
||||
#define _SDL_fsaudio_h
|
||||
|
||||
+47
-22
@@ -18,15 +18,16 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../../SDL_internal.h"
|
||||
|
||||
#if SDL_AUDIO_DRIVER_BEOSAUDIO
|
||||
#if SDL_AUDIO_DRIVER_HAIKU
|
||||
|
||||
/* Allow access to the audio stream on BeOS */
|
||||
/* Allow access to the audio stream on Haiku */
|
||||
|
||||
#include <SoundPlayer.h>
|
||||
#include <signal.h>
|
||||
|
||||
#include "../../main/beos/SDL_BeApp.h"
|
||||
#include "../../main/haiku/SDL_BeApp.h"
|
||||
|
||||
extern "C"
|
||||
{
|
||||
@@ -34,14 +35,13 @@ extern "C"
|
||||
#include "SDL_audio.h"
|
||||
#include "../SDL_audio_c.h"
|
||||
#include "../SDL_sysaudio.h"
|
||||
#include "../../thread/beos/SDL_systhread_c.h"
|
||||
#include "SDL_beaudio.h"
|
||||
#include "SDL_haikuaudio.h"
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* !!! FIXME: have the callback call the higher level to avoid code dupe. */
|
||||
/* The BeOS callback for handling the audio buffer */
|
||||
/* The Haiku callback for handling the audio buffer */
|
||||
static void
|
||||
FillSound(void *device, void *stream, size_t len,
|
||||
const media_raw_audio_format & format)
|
||||
@@ -71,7 +71,7 @@ FillSound(void *device, void *stream, size_t len,
|
||||
}
|
||||
|
||||
static void
|
||||
BEOSAUDIO_CloseDevice(_THIS)
|
||||
HAIKUAUDIO_CloseDevice(_THIS)
|
||||
{
|
||||
if (_this->hidden != NULL) {
|
||||
if (_this->hidden->audio_obj) {
|
||||
@@ -85,8 +85,33 @@ BEOSAUDIO_CloseDevice(_THIS)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static const int sig_list[] = {
|
||||
SIGHUP, SIGINT, SIGQUIT, SIGPIPE, SIGALRM, SIGTERM, SIGWINCH, 0
|
||||
};
|
||||
|
||||
static inline void
|
||||
MaskSignals(sigset_t * omask)
|
||||
{
|
||||
sigset_t mask;
|
||||
int i;
|
||||
|
||||
sigemptyset(&mask);
|
||||
for (i = 0; sig_list[i]; ++i) {
|
||||
sigaddset(&mask, sig_list[i]);
|
||||
}
|
||||
sigprocmask(SIG_BLOCK, &mask, omask);
|
||||
}
|
||||
|
||||
static inline void
|
||||
UnmaskSignals(sigset_t * omask)
|
||||
{
|
||||
sigprocmask(SIG_SETMASK, omask, NULL);
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
BEOSAUDIO_OpenDevice(_THIS, const char *devname, int iscapture)
|
||||
HAIKUAUDIO_OpenDevice(_THIS, const char *devname, int iscapture)
|
||||
{
|
||||
int valid_datatype = 0;
|
||||
media_raw_audio_format format;
|
||||
@@ -151,7 +176,7 @@ BEOSAUDIO_OpenDevice(_THIS, const char *devname, int iscapture)
|
||||
}
|
||||
|
||||
if (!valid_datatype) { /* shouldn't happen, but just in case... */
|
||||
BEOSAUDIO_CloseDevice(_this);
|
||||
HAIKUAUDIO_CloseDevice(_this);
|
||||
return SDL_SetError("Unsupported audio format");
|
||||
}
|
||||
|
||||
@@ -162,15 +187,15 @@ BEOSAUDIO_OpenDevice(_THIS, const char *devname, int iscapture)
|
||||
|
||||
/* Subscribe to the audio stream (creates a new thread) */
|
||||
sigset_t omask;
|
||||
SDL_MaskSignals(&omask);
|
||||
MaskSignals(&omask);
|
||||
_this->hidden->audio_obj = new BSoundPlayer(&format, "SDL Audio",
|
||||
FillSound, NULL, _this);
|
||||
SDL_UnmaskSignals(&omask);
|
||||
UnmaskSignals(&omask);
|
||||
|
||||
if (_this->hidden->audio_obj->Start() == B_NO_ERROR) {
|
||||
_this->hidden->audio_obj->SetHasData(true);
|
||||
} else {
|
||||
BEOSAUDIO_CloseDevice(_this);
|
||||
HAIKUAUDIO_CloseDevice(_this);
|
||||
return SDL_SetError("Unable to start Be audio");
|
||||
}
|
||||
|
||||
@@ -179,13 +204,13 @@ BEOSAUDIO_OpenDevice(_THIS, const char *devname, int iscapture)
|
||||
}
|
||||
|
||||
static void
|
||||
BEOSAUDIO_Deinitialize(void)
|
||||
HAIKUAUDIO_Deinitialize(void)
|
||||
{
|
||||
SDL_QuitBeApp();
|
||||
}
|
||||
|
||||
static int
|
||||
BEOSAUDIO_Init(SDL_AudioDriverImpl * impl)
|
||||
HAIKUAUDIO_Init(SDL_AudioDriverImpl * impl)
|
||||
{
|
||||
/* Initialize the Be Application, if it's not already started */
|
||||
if (SDL_InitBeApp() < 0) {
|
||||
@@ -193,9 +218,9 @@ BEOSAUDIO_Init(SDL_AudioDriverImpl * impl)
|
||||
}
|
||||
|
||||
/* Set the function pointers */
|
||||
impl->OpenDevice = BEOSAUDIO_OpenDevice;
|
||||
impl->CloseDevice = BEOSAUDIO_CloseDevice;
|
||||
impl->Deinitialize = BEOSAUDIO_Deinitialize;
|
||||
impl->OpenDevice = HAIKUAUDIO_OpenDevice;
|
||||
impl->CloseDevice = HAIKUAUDIO_CloseDevice;
|
||||
impl->Deinitialize = HAIKUAUDIO_Deinitialize;
|
||||
impl->ProvidesOwnCallbackThread = 1;
|
||||
impl->OnlyHasDefaultOutputDevice = 1;
|
||||
|
||||
@@ -204,12 +229,12 @@ BEOSAUDIO_Init(SDL_AudioDriverImpl * impl)
|
||||
|
||||
extern "C"
|
||||
{
|
||||
extern AudioBootStrap BEOSAUDIO_bootstrap;
|
||||
extern AudioBootStrap HAIKUAUDIO_bootstrap;
|
||||
}
|
||||
AudioBootStrap BEOSAUDIO_bootstrap = {
|
||||
"baudio", "BeOS BSoundPlayer", BEOSAUDIO_Init, 0
|
||||
AudioBootStrap HAIKUAUDIO_bootstrap = {
|
||||
"haiku", "Haiku BSoundPlayer", HAIKUAUDIO_Init, 0
|
||||
};
|
||||
|
||||
#endif /* SDL_AUDIO_DRIVER_BEOSAUDIO */
|
||||
#endif /* SDL_AUDIO_DRIVER_HAIKU */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
+1
-1
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../../SDL_internal.h"
|
||||
|
||||
#ifndef _SDL_beaudio_h
|
||||
#define _SDL_beaudio_h
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../../SDL_internal.h"
|
||||
|
||||
#if SDL_AUDIO_DRIVER_NAS
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../../SDL_internal.h"
|
||||
|
||||
#ifndef _SDL_nasaudio_h
|
||||
#define _SDL_nasaudio_h
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../../SDL_internal.h"
|
||||
|
||||
#if SDL_AUDIO_DRIVER_PAUDIO
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../../SDL_internal.h"
|
||||
|
||||
#ifndef _SDL_paudaudio_h
|
||||
#define _SDL_paudaudio_h
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
was the cleanest way to move it to 1.3. The 1.2 target was written by
|
||||
Stéphan Kochen: stephan .a.t. kochen.nl
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../../SDL_internal.h"
|
||||
|
||||
#if SDL_AUDIO_DRIVER_PULSEAUDIO
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../../SDL_internal.h"
|
||||
|
||||
#ifndef _SDL_pulseaudio_h
|
||||
#define _SDL_pulseaudio_h
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#include "SDL_config.h"
|
||||
#include "../../SDL_internal.h"
|
||||
|
||||
#if SDL_AUDIO_DRIVER_QSA
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#include "SDL_config.h"
|
||||
#include "../../SDL_internal.h"
|
||||
|
||||
#ifndef __SDL_QSA_AUDIO_H__
|
||||
#define __SDL_QSA_AUDIO_H__
|
||||
|
||||
@@ -57,7 +57,7 @@ sub outputHeader {
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#include "SDL_config.h"
|
||||
#include "../SDL_internal.h"
|
||||
#include "SDL_audio.h"
|
||||
#include "SDL_audio_c.h"
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#include "SDL_config.h"
|
||||
#include "../../SDL_internal.h"
|
||||
|
||||
#if SDL_AUDIO_DRIVER_SNDIO
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../../SDL_internal.h"
|
||||
|
||||
#ifndef _SDL_sndioaudio_h
|
||||
#define _SDL_sndioaudio_h
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../../SDL_internal.h"
|
||||
|
||||
#if SDL_AUDIO_DRIVER_SUNAUDIO
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../../SDL_internal.h"
|
||||
|
||||
#ifndef _SDL_sunaudio_h
|
||||
#define _SDL_sunaudio_h
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../../SDL_internal.h"
|
||||
|
||||
#if SDL_AUDIO_DRIVER_WINMM
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../../SDL_internal.h"
|
||||
|
||||
#ifndef _SDL_winmm_h
|
||||
#define _SDL_winmm_h
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../../SDL_internal.h"
|
||||
|
||||
#if SDL_AUDIO_DRIVER_XAUDIO2
|
||||
|
||||
@@ -32,7 +32,11 @@
|
||||
/* The configure script already did any necessary checking */
|
||||
# define SDL_XAUDIO2_HAS_SDK 1
|
||||
#else
|
||||
#include <dxsdkver.h> /* XAudio2 exists as of the March 2008 DirectX SDK */
|
||||
/* XAudio2 exists as of the March 2008 DirectX SDK
|
||||
The XAudio2 implementation available in the Windows 8 SDK targets Windows 8 and newer.
|
||||
If you want to build SDL with XAudio2 support you should install the DirectX SDK.
|
||||
*/
|
||||
#include <dxsdkver.h>
|
||||
#if (!defined(_DXSDK_BUILD_MAJOR) || (_DXSDK_BUILD_MAJOR < 1284))
|
||||
# pragma message("Your DirectX SDK is too old. Disabling XAudio2 support.")
|
||||
#else
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../../SDL_internal.h"
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_assert.h"
|
||||
#include "SDL_log.h"
|
||||
@@ -34,6 +34,7 @@
|
||||
#include "../../video/android/SDL_androidtouch.h"
|
||||
#include "../../video/android/SDL_androidvideo.h"
|
||||
#include "../../video/android/SDL_androidwindow.h"
|
||||
#include "../../joystick/android/SDL_sysjoystick_c.h"
|
||||
|
||||
#include <android/log.h>
|
||||
#include <pthread.h>
|
||||
@@ -74,6 +75,7 @@ static jmethodID midAudioInit;
|
||||
static jmethodID midAudioWriteShortBuffer;
|
||||
static jmethodID midAudioWriteByteBuffer;
|
||||
static jmethodID midAudioQuit;
|
||||
static jmethodID midPollInputDevices;
|
||||
|
||||
/* Accelerometer data storage */
|
||||
static float fLastAccelerometer[3];
|
||||
@@ -97,12 +99,10 @@ jint JNI_OnLoad(JavaVM* vm, void* reserved)
|
||||
* Create mThreadKey so we can keep track of the JNIEnv assigned to each thread
|
||||
* Refer to http://developer.android.com/guide/practices/design/jni.html for the rationale behind this
|
||||
*/
|
||||
if (pthread_key_create(&mThreadKey, Android_JNI_ThreadDestroyed)) {
|
||||
if (pthread_key_create(&mThreadKey, Android_JNI_ThreadDestroyed) != 0) {
|
||||
__android_log_print(ANDROID_LOG_ERROR, "SDL", "Error initializing pthread key");
|
||||
}
|
||||
else {
|
||||
Android_JNI_SetupThread();
|
||||
}
|
||||
Android_JNI_SetupThread();
|
||||
|
||||
return JNI_VERSION_1_4;
|
||||
}
|
||||
@@ -128,11 +128,13 @@ void SDL_Android_Init(JNIEnv* mEnv, jclass cls)
|
||||
"audioWriteByteBuffer", "([B)V");
|
||||
midAudioQuit = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass,
|
||||
"audioQuit", "()V");
|
||||
midPollInputDevices = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass,
|
||||
"pollInputDevices", "()V");
|
||||
|
||||
bHasNewData = false;
|
||||
|
||||
if(!midGetNativeSurface || !midFlipBuffers || !midAudioInit ||
|
||||
!midAudioWriteShortBuffer || !midAudioWriteByteBuffer || !midAudioQuit) {
|
||||
!midAudioWriteShortBuffer || !midAudioWriteByteBuffer || !midAudioQuit || !midPollInputDevices) {
|
||||
__android_log_print(ANDROID_LOG_WARN, "SDL", "SDL: Couldn't locate Java callbacks, check that they're named and typed correctly");
|
||||
}
|
||||
__android_log_print(ANDROID_LOG_INFO, "SDL", "SDL_Android_Init() finished!");
|
||||
@@ -146,6 +148,52 @@ void Java_org_libsdl_app_SDLActivity_onNativeResize(
|
||||
Android_SetScreenResolution(width, height, format);
|
||||
}
|
||||
|
||||
// Paddown
|
||||
int Java_org_libsdl_app_SDLActivity_onNativePadDown(
|
||||
JNIEnv* env, jclass jcls,
|
||||
jint device_id, jint keycode)
|
||||
{
|
||||
return Android_OnPadDown(device_id, keycode);
|
||||
}
|
||||
|
||||
// Padup
|
||||
int Java_org_libsdl_app_SDLActivity_onNativePadUp(
|
||||
JNIEnv* env, jclass jcls,
|
||||
jint device_id, jint keycode)
|
||||
{
|
||||
return Android_OnPadUp(device_id, keycode);
|
||||
}
|
||||
|
||||
/* Joy */
|
||||
void Java_org_libsdl_app_SDLActivity_onNativeJoy(
|
||||
JNIEnv* env, jclass jcls,
|
||||
jint device_id, jint axis, jfloat value)
|
||||
{
|
||||
Android_OnJoy(device_id, axis, value);
|
||||
}
|
||||
|
||||
|
||||
int Java_org_libsdl_app_SDLActivity_nativeAddJoystick(
|
||||
JNIEnv* env, jclass jcls,
|
||||
jint device_id, jstring device_name, jint is_accelerometer,
|
||||
jint nbuttons, jint naxes, jint nhats, jint nballs)
|
||||
{
|
||||
int retval;
|
||||
const char *name = (*env)->GetStringUTFChars(env, device_name, NULL);
|
||||
|
||||
retval = Android_AddJoystick(device_id, name, (SDL_bool) is_accelerometer, nbuttons, naxes, nhats, nballs);
|
||||
|
||||
(*env)->ReleaseStringUTFChars(env, device_name, name);
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
int Java_org_libsdl_app_SDLActivity_nativeRemoveJoystick(
|
||||
JNIEnv* env, jclass jcls, jint device_id)
|
||||
{
|
||||
return Android_RemoveJoystick(device_id);
|
||||
}
|
||||
|
||||
|
||||
/* Surface Created */
|
||||
void Java_org_libsdl_app_SDLActivity_onNativeSurfaceChanged(JNIEnv* env, jclass jcls)
|
||||
@@ -259,25 +307,33 @@ void Java_org_libsdl_app_SDLActivity_nativeLowMemory(
|
||||
void Java_org_libsdl_app_SDLActivity_nativeQuit(
|
||||
JNIEnv* env, jclass cls)
|
||||
{
|
||||
/* Discard previous events. The user should have handled state storage
|
||||
* in SDL_APP_WILLENTERBACKGROUND. After nativeQuit() is called, no
|
||||
* events other than SDL_QUIT and SDL_APP_TERMINATING should fire */
|
||||
SDL_FlushEvents(SDL_FIRSTEVENT, SDL_LASTEVENT);
|
||||
/* Inject a SDL_QUIT event */
|
||||
SDL_SendQuit();
|
||||
SDL_SendAppEvent(SDL_APP_TERMINATING);
|
||||
/* Resume the event loop so that the app can catch SDL_QUIT which
|
||||
* should now be the top event in the event queue. */
|
||||
if (!SDL_SemValue(Android_ResumeSem)) SDL_SemPost(Android_ResumeSem);
|
||||
}
|
||||
|
||||
/* Pause */
|
||||
void Java_org_libsdl_app_SDLActivity_nativePause(
|
||||
JNIEnv* env, jclass cls)
|
||||
{
|
||||
__android_log_print(ANDROID_LOG_VERBOSE, "SDL", "nativePause()");
|
||||
if (Android_Window) {
|
||||
/* Signal the pause semaphore so the event loop knows to pause and (optionally) block itself */
|
||||
if (!SDL_SemValue(Android_PauseSem)) SDL_SemPost(Android_PauseSem);
|
||||
SDL_SendWindowEvent(Android_Window, SDL_WINDOWEVENT_FOCUS_LOST, 0, 0);
|
||||
SDL_SendWindowEvent(Android_Window, SDL_WINDOWEVENT_MINIMIZED, 0, 0);
|
||||
SDL_SendAppEvent(SDL_APP_WILLENTERBACKGROUND);
|
||||
SDL_SendAppEvent(SDL_APP_DIDENTERBACKGROUND);
|
||||
|
||||
/* *After* sending the relevant events, signal the pause semaphore
|
||||
* so the event loop knows to pause and (optionally) block itself */
|
||||
if (!SDL_SemValue(Android_PauseSem)) SDL_SemPost(Android_PauseSem);
|
||||
}
|
||||
|
||||
__android_log_print(ANDROID_LOG_VERBOSE, "SDL", "nativePause()");
|
||||
SDL_SendAppEvent(SDL_APP_WILLENTERBACKGROUND);
|
||||
SDL_SendAppEvent(SDL_APP_DIDENTERBACKGROUND);
|
||||
}
|
||||
|
||||
/* Resume */
|
||||
@@ -285,17 +341,17 @@ void Java_org_libsdl_app_SDLActivity_nativeResume(
|
||||
JNIEnv* env, jclass cls)
|
||||
{
|
||||
__android_log_print(ANDROID_LOG_VERBOSE, "SDL", "nativeResume()");
|
||||
SDL_SendAppEvent(SDL_APP_WILLENTERFOREGROUND);
|
||||
SDL_SendAppEvent(SDL_APP_DIDENTERFOREGROUND);
|
||||
|
||||
if (Android_Window) {
|
||||
SDL_SendAppEvent(SDL_APP_WILLENTERFOREGROUND);
|
||||
SDL_SendAppEvent(SDL_APP_DIDENTERFOREGROUND);
|
||||
SDL_SendWindowEvent(Android_Window, SDL_WINDOWEVENT_FOCUS_GAINED, 0, 0);
|
||||
SDL_SendWindowEvent(Android_Window, SDL_WINDOWEVENT_RESTORED, 0, 0);
|
||||
/* Signal the resume semaphore so the event loop knows to resume and restore the GL Context
|
||||
* We can't restore the GL Context here because it needs to be done on the SDL main thread
|
||||
* and this function will be called from the Java thread instead.
|
||||
*/
|
||||
if (!SDL_SemValue(Android_ResumeSem)) SDL_SemPost(Android_ResumeSem);
|
||||
SDL_SendWindowEvent(Android_Window, SDL_WINDOWEVENT_FOCUS_GAINED, 0, 0);
|
||||
SDL_SendWindowEvent(Android_Window, SDL_WINDOWEVENT_RESTORED, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -421,7 +477,8 @@ SDL_bool Android_JNI_GetAccelerometerValues(float values[3])
|
||||
return retval;
|
||||
}
|
||||
|
||||
static void Android_JNI_ThreadDestroyed(void* value) {
|
||||
static void Android_JNI_ThreadDestroyed(void* value)
|
||||
{
|
||||
/* The thread is being destroyed, detach it from the Java VM and set the mThreadKey value to NULL as required */
|
||||
JNIEnv *env = (JNIEnv*) value;
|
||||
if (env != NULL) {
|
||||
@@ -430,7 +487,8 @@ static void Android_JNI_ThreadDestroyed(void* value) {
|
||||
}
|
||||
}
|
||||
|
||||
JNIEnv* Android_JNI_GetEnv(void) {
|
||||
JNIEnv* Android_JNI_GetEnv(void)
|
||||
{
|
||||
/* From http://developer.android.com/guide/practices/jni.html
|
||||
* All threads are Linux threads, scheduled by the kernel.
|
||||
* They're usually started from managed code (using Thread.start), but they can also be created elsewhere and then
|
||||
@@ -450,10 +508,6 @@ JNIEnv* Android_JNI_GetEnv(void) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return env;
|
||||
}
|
||||
|
||||
int Android_JNI_SetupThread(void) {
|
||||
/* From http://developer.android.com/guide/practices/jni.html
|
||||
* Threads attached through JNI must call DetachCurrentThread before they exit. If coding this directly is awkward,
|
||||
* in Android 2.0 (Eclair) and higher you can use pthread_key_create to define a destructor function that will be
|
||||
@@ -463,8 +517,14 @@ int Android_JNI_SetupThread(void) {
|
||||
* Note: You can call this function any number of times for the same thread, there's no harm in it
|
||||
* (except for some lost CPU cycles)
|
||||
*/
|
||||
JNIEnv *env = Android_JNI_GetEnv();
|
||||
pthread_setspecific(mThreadKey, (void*) env);
|
||||
|
||||
return env;
|
||||
}
|
||||
|
||||
int Android_JNI_SetupThread(void)
|
||||
{
|
||||
Android_JNI_GetEnv();
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -1009,7 +1069,7 @@ static jobject Android_JNI_GetSystemServiceObject(const char* name)
|
||||
mid = (*env)->GetStaticMethodID(env, mActivityClass, "getContext", "()Landroid/content/Context;");
|
||||
jobject context = (*env)->CallStaticObjectMethod(env, mActivityClass, mid);
|
||||
|
||||
mid = (*env)->GetMethodID(env, mActivityClass, "getSystemService", "(Ljava/lang/String;)Ljava/lang/Object;");
|
||||
mid = (*env)->GetMethodID(env, mActivityClass, "getSystemServiceFromUiThread", "(Ljava/lang/String;)Ljava/lang/Object;");
|
||||
jobject manager = (*env)->CallObjectMethod(env, context, mid, service);
|
||||
|
||||
(*env)->DeleteLocalRef(env, service);
|
||||
@@ -1212,6 +1272,12 @@ int Android_JNI_GetTouchDeviceIds(int **ids) {
|
||||
return number;
|
||||
}
|
||||
|
||||
void Android_JNI_PollInputDevices()
|
||||
{
|
||||
JNIEnv *env = Android_JNI_GetEnv();
|
||||
(*env)->CallStaticVoidMethod(env, mActivityClass, midPollInputDevices);
|
||||
}
|
||||
|
||||
/* sends message to be handled on the UI event dispatch thread */
|
||||
int Android_JNI_SendMessage(int command, int param)
|
||||
{
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../../SDL_internal.h"
|
||||
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
@@ -64,6 +64,10 @@ SDL_bool Android_JNI_HasClipboardText();
|
||||
|
||||
/* Power support */
|
||||
int Android_JNI_GetPowerInfo(int* plugged, int* charged, int* battery, int* seconds, int* percent);
|
||||
|
||||
/* Joystick support */
|
||||
void Android_JNI_PollInputDevices();
|
||||
|
||||
|
||||
/* Touch support */
|
||||
int Android_JNI_GetTouchDeviceIds(int **ids);
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../../SDL_internal.h"
|
||||
|
||||
#ifdef SDL_INPUT_LINUXEV
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#include "SDL_config.h"
|
||||
#include "../../SDL_internal.h"
|
||||
|
||||
#ifndef _SDL_evdev_h
|
||||
#define _SDL_evdev_h
|
||||
@@ -19,7 +19,7 @@
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#include "SDL_config.h"
|
||||
#include "../../SDL_internal.h"
|
||||
|
||||
#ifndef _SDL_udev_h
|
||||
#define _SDL_udev_h
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../../SDL_internal.h"
|
||||
|
||||
#ifdef __WIN32__
|
||||
|
||||
@@ -45,7 +45,15 @@ WIN_SetError(const char *prefix)
|
||||
HRESULT
|
||||
WIN_CoInitialize(void)
|
||||
{
|
||||
const HRESULT hr = CoInitialize(NULL);
|
||||
/* SDL handles any threading model, so initialize with the default, which
|
||||
is compatible with OLE and if that doesn't work, try multi-threaded mode.
|
||||
|
||||
If you need multi-threaded mode, call CoInitializeEx() before SDL_Init()
|
||||
*/
|
||||
HRESULT hr = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
if (hr == RPC_E_CHANGED_MODE) {
|
||||
hr = CoInitializeEx(NULL, COINIT_MULTITHREADED);
|
||||
}
|
||||
|
||||
/* S_FALSE means success, but someone else already initialized. */
|
||||
/* You still need to call CoUninitialize in this case! */
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../SDL_internal.h"
|
||||
|
||||
#if defined(__WIN32__)
|
||||
#include "../core/windows/SDL_windows.h"
|
||||
|
||||
@@ -0,0 +1,302 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2013 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.
|
||||
*/
|
||||
|
||||
#include "SDL_config.h"
|
||||
#include "SDL_dynapi.h"
|
||||
|
||||
#if SDL_DYNAMIC_API
|
||||
|
||||
#include "SDL.h"
|
||||
|
||||
/* !!! FIXME: Shouldn't these be included in SDL.h? */
|
||||
#include "SDL_shape.h"
|
||||
#include "SDL_syswm.h"
|
||||
|
||||
/* This is the version of the dynamic API. This doesn't match the SDL version
|
||||
and should not change until there's been a major revamp in API/ABI.
|
||||
So 2.0.5 adds functions over 2.0.4? This number doesn't change;
|
||||
the sizeof (jump_table) changes instead. But 2.1.0 changes how a function
|
||||
works in an incompatible way or removes a function? This number changes,
|
||||
since sizeof (jump_table) isn't sufficient anymore. It's likely
|
||||
we'll forget to bump every time we add a function, so this is the
|
||||
failsafe switch for major API change decisions. Respect it and use it
|
||||
sparingly. */
|
||||
#define SDL_DYNAPI_VERSION 1
|
||||
|
||||
static void SDL_InitDynamicAPI(void);
|
||||
|
||||
|
||||
/* BE CAREFUL CALLING ANY SDL CODE IN HERE, IT WILL BLOW UP.
|
||||
Even self-contained stuff might call SDL_Error and break everything. */
|
||||
|
||||
|
||||
/* behold, the macro salsa! */
|
||||
|
||||
/* !!! FIXME: ...disabled...until we write it. :) */
|
||||
#define DISABLE_JUMP_MAGIC 1
|
||||
|
||||
#if DISABLE_JUMP_MAGIC
|
||||
/* Can't use the macro for varargs nonsense. This is atrocious. */
|
||||
#define SDL_DYNAPI_VARARGS_LOGFN(_static, name, initcall, logname, prio) \
|
||||
_static void SDL_Log##logname##name(int category, const char *fmt, ...) { \
|
||||
va_list ap; initcall; va_start(ap, fmt); \
|
||||
jump_table.SDL_LogMessageV(category, SDL_LOG_PRIORITY_##prio, fmt, ap); \
|
||||
va_end(ap); \
|
||||
}
|
||||
|
||||
#define SDL_DYNAPI_VARARGS(_static, name, initcall) \
|
||||
_static int SDL_SetError##name(const char *fmt, ...) { \
|
||||
char buf[512]; /* !!! FIXME: dynamic allocation */ \
|
||||
va_list ap; initcall; va_start(ap, fmt); \
|
||||
jump_table.SDL_vsnprintf(buf, sizeof (buf), fmt, ap); \
|
||||
va_end(ap); \
|
||||
return jump_table.SDL_SetError("%s", buf); \
|
||||
} \
|
||||
_static int SDL_sscanf##name(const char *buf, const char *fmt, ...) { \
|
||||
int retval; va_list ap; initcall; va_start(ap, fmt); \
|
||||
retval = jump_table.SDL_vsscanf(buf, fmt, ap); \
|
||||
va_end(ap); \
|
||||
return retval; \
|
||||
} \
|
||||
_static int SDL_snprintf##name(char *buf, size_t buflen, const char *fmt, ...) { \
|
||||
int retval; va_list ap; initcall; va_start(ap, fmt); \
|
||||
retval = jump_table.SDL_vsnprintf(buf, buflen, fmt, ap); \
|
||||
va_end(ap); \
|
||||
return retval; \
|
||||
} \
|
||||
_static void SDL_Log##name(const char *fmt, ...) { \
|
||||
va_list ap; initcall; va_start(ap, fmt); \
|
||||
jump_table.SDL_LogMessageV(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO, fmt, ap); \
|
||||
va_end(ap); \
|
||||
} \
|
||||
_static void SDL_LogMessage##name(int category, SDL_LogPriority priority, const char *fmt, ...) { \
|
||||
va_list ap; initcall; va_start(ap, fmt); \
|
||||
jump_table.SDL_LogMessageV(category, priority, fmt, ap); \
|
||||
va_end(ap); \
|
||||
} \
|
||||
SDL_DYNAPI_VARARGS_LOGFN(_static, name, initcall, Verbose, VERBOSE) \
|
||||
SDL_DYNAPI_VARARGS_LOGFN(_static, name, initcall, Debug, DEBUG) \
|
||||
SDL_DYNAPI_VARARGS_LOGFN(_static, name, initcall, Info, INFO) \
|
||||
SDL_DYNAPI_VARARGS_LOGFN(_static, name, initcall, Warn, WARN) \
|
||||
SDL_DYNAPI_VARARGS_LOGFN(_static, name, initcall, Error, ERROR) \
|
||||
SDL_DYNAPI_VARARGS_LOGFN(_static, name, initcall, Critical, CRITICAL)
|
||||
#endif
|
||||
|
||||
|
||||
/* Typedefs for function pointers for jump table, and predeclare funcs */
|
||||
/* The DEFAULT funcs will init jump table and then call real function. */
|
||||
/* The REAL funcs are the actual functions, name-mangled to not clash. */
|
||||
#define SDL_DYNAPI_PROC(rc,fn,params,args,ret) \
|
||||
typedef rc (*SDL_DYNAPIFN_##fn) params; \
|
||||
static rc fn##_DEFAULT params; \
|
||||
extern rc fn##_REAL params;
|
||||
#include "SDL_dynapi_procs.h"
|
||||
#undef SDL_DYNAPI_PROC
|
||||
|
||||
/* The jump table! */
|
||||
typedef struct {
|
||||
#define SDL_DYNAPI_PROC(rc,fn,params,args,ret) SDL_DYNAPIFN_##fn fn;
|
||||
#include "SDL_dynapi_procs.h"
|
||||
#undef SDL_DYNAPI_PROC
|
||||
} SDL_DYNAPI_jump_table;
|
||||
|
||||
/* Predeclare the default functions for initializing the jump table. */
|
||||
#define SDL_DYNAPI_PROC(rc,fn,params,args,ret) static rc fn##_DEFAULT params;
|
||||
#include "SDL_dynapi_procs.h"
|
||||
#undef SDL_DYNAPI_PROC
|
||||
|
||||
/* The actual jump table. */
|
||||
static SDL_DYNAPI_jump_table jump_table = {
|
||||
#define SDL_DYNAPI_PROC(rc,fn,params,args,ret) fn##_DEFAULT,
|
||||
#include "SDL_dynapi_procs.h"
|
||||
#undef SDL_DYNAPI_PROC
|
||||
};
|
||||
|
||||
/* Default functions init the function table then call right thing. */
|
||||
#if DISABLE_JUMP_MAGIC
|
||||
#define SDL_DYNAPI_PROC(rc,fn,params,args,ret) \
|
||||
static rc fn##_DEFAULT params { \
|
||||
SDL_InitDynamicAPI(); \
|
||||
ret jump_table.fn args; \
|
||||
}
|
||||
#define SDL_DYNAPI_PROC_NO_VARARGS 1
|
||||
#include "SDL_dynapi_procs.h"
|
||||
#undef SDL_DYNAPI_PROC
|
||||
#undef SDL_DYNAPI_PROC_NO_VARARGS
|
||||
SDL_DYNAPI_VARARGS(static, _DEFAULT, SDL_InitDynamicAPI())
|
||||
#else
|
||||
/* !!! FIXME: need the jump magic. */
|
||||
#error Write me.
|
||||
#endif
|
||||
|
||||
/* Public API functions to jump into the jump table. */
|
||||
#if DISABLE_JUMP_MAGIC
|
||||
#define SDL_DYNAPI_PROC(rc,fn,params,args,ret) \
|
||||
rc fn params { ret jump_table.fn args; }
|
||||
#define SDL_DYNAPI_PROC_NO_VARARGS 1
|
||||
#include "SDL_dynapi_procs.h"
|
||||
#undef SDL_DYNAPI_PROC
|
||||
#undef SDL_DYNAPI_PROC_NO_VARARGS
|
||||
SDL_DYNAPI_VARARGS(,,)
|
||||
#else
|
||||
/* !!! FIXME: need the jump magic. */
|
||||
#error Write me.
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/* Here's the exported entry point that fills in the jump table. */
|
||||
/* Use specific types when an "int" might suffice to keep this sane. */
|
||||
typedef Sint32 (SDLCALL *SDL_DYNAPI_ENTRYFN)(Uint32 apiver, void *table, Uint32 tablesize);
|
||||
extern DECLSPEC Sint32 SDLCALL SDL_DYNAPI_entry(Uint32, void *, Uint32);
|
||||
|
||||
Sint32
|
||||
SDL_DYNAPI_entry(Uint32 apiver, void *table, Uint32 tablesize)
|
||||
{
|
||||
SDL_DYNAPI_jump_table *output_jump_table = (SDL_DYNAPI_jump_table *) table;
|
||||
|
||||
if (apiver != SDL_DYNAPI_VERSION) {
|
||||
/* !!! FIXME: can maybe handle older versions? */
|
||||
return -1; /* not compatible. */
|
||||
} else if (tablesize > sizeof (jump_table)) {
|
||||
return -1; /* newer version of SDL with functions we can't provide. */
|
||||
}
|
||||
|
||||
/* Init our jump table first. */
|
||||
#define SDL_DYNAPI_PROC(rc,fn,params,args,ret) jump_table.fn = fn##_REAL;
|
||||
#include "SDL_dynapi_procs.h"
|
||||
#undef SDL_DYNAPI_PROC
|
||||
|
||||
/* Then the external table... */
|
||||
if (output_jump_table != &jump_table) {
|
||||
jump_table.SDL_memcpy(output_jump_table, &jump_table, tablesize);
|
||||
}
|
||||
|
||||
/* Safe to call SDL functions now; jump table is initialized! */
|
||||
|
||||
return 0; /* success! */
|
||||
}
|
||||
|
||||
|
||||
/* Obviously we can't use SDL_LoadObject() to load SDL. :) */
|
||||
/* Also obviously, we never close the loaded library. */
|
||||
#if defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__)
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
#define WIN32_LEAN_AND_MEAN 1
|
||||
#endif
|
||||
#include <windows.h>
|
||||
static SDL_INLINE void *get_sdlapi_entry(const char *fname, const char *sym)
|
||||
{
|
||||
HANDLE lib = LoadLibraryA(fname);
|
||||
return lib ? GetProcAddress(lib, sym) : NULL;
|
||||
}
|
||||
|
||||
#elif defined(__HAIKU__)
|
||||
#include <os/kernel/image.h>
|
||||
static SDL_INLINE void *get_sdlapi_entry(const char *fname, const char *sym)
|
||||
{
|
||||
image_id lib = load_add_on(fname);
|
||||
void *retval = NULL;
|
||||
if ((lib < 0) || (get_image_symbol(lib, sym, B_SYMBOL_TYPE_TEXT, &retval) != B_NO_ERROR)) {
|
||||
retval = NULL;
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
#elif defined(unix) || defined(__unix__) || defined(__APPLE__)
|
||||
#include <dlfcn.h>
|
||||
static SDL_INLINE void *get_sdlapi_entry(const char *fname, const char *sym)
|
||||
{
|
||||
void *lib = dlopen(fname, RTLD_NOW | RTLD_LOCAL);
|
||||
return lib ? dlsym(lib, sym) : NULL;
|
||||
}
|
||||
#else
|
||||
#error Please define your platform.
|
||||
#endif
|
||||
|
||||
|
||||
static void
|
||||
SDL_InitDynamicAPILocked(void)
|
||||
{
|
||||
const char *libname = SDL_getenv_REAL("SDL_DYNAMIC_API");
|
||||
SDL_DYNAPI_ENTRYFN entry = SDL_DYNAPI_entry; /* funcs from here by default. */
|
||||
|
||||
if (libname) {
|
||||
entry = (SDL_DYNAPI_ENTRYFN) get_sdlapi_entry(libname, "SDL_DYNAPI_entry");
|
||||
if (!entry) {
|
||||
/* !!! FIXME: fail to startup here instead? */
|
||||
/* !!! FIXME: definitely warn user. */
|
||||
/* Just fill in the function pointers from this library. */
|
||||
entry = SDL_DYNAPI_entry;
|
||||
}
|
||||
}
|
||||
|
||||
if (entry(SDL_DYNAPI_VERSION, &jump_table, sizeof (jump_table)) < 0) {
|
||||
/* !!! FIXME: fail to startup here instead? */
|
||||
/* !!! FIXME: definitely warn user. */
|
||||
/* Just fill in the function pointers from this library. */
|
||||
if (entry != SDL_DYNAPI_entry) {
|
||||
if (!SDL_DYNAPI_entry(SDL_DYNAPI_VERSION, &jump_table, sizeof (jump_table))) {
|
||||
/* !!! FIXME: now we're screwed. Should definitely abort now. */
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* we intentionally never close the newly-loaded lib, of course. */
|
||||
}
|
||||
|
||||
static void
|
||||
SDL_InitDynamicAPI(void)
|
||||
{
|
||||
/* So the theory is that every function in the jump table defaults to
|
||||
* calling this function, and then replaces itself with a version that
|
||||
* doesn't call this function anymore. But it's possible that, in an
|
||||
* extreme corner case, you can have a second thread hit this function
|
||||
* while the jump table is being initialized by the first.
|
||||
* In this case, a spinlock is really painful compared to what spinlocks
|
||||
* _should_ be used for, but this would only happen once, and should be
|
||||
* insanely rare, as you would have to spin a thread outside of SDL (as
|
||||
* SDL_CreateThread() would also call this function before building the
|
||||
* new thread).
|
||||
*/
|
||||
static volatile SDL_bool already_initialized = SDL_FALSE;
|
||||
|
||||
/* SDL_AtomicLock calls SDL mutex functions to emulate if
|
||||
SDL_ATOMIC_DISABLED, which we can't do here, so in such a
|
||||
configuration, you're on your own. */
|
||||
#if !SDL_ATOMIC_DISABLED
|
||||
static SDL_SpinLock lock = 0;
|
||||
SDL_AtomicLock_REAL(&lock);
|
||||
#endif
|
||||
|
||||
if (!already_initialized) {
|
||||
SDL_InitDynamicAPILocked();
|
||||
already_initialized = SDL_TRUE;
|
||||
}
|
||||
|
||||
#if !SDL_ATOMIC_DISABLED
|
||||
SDL_AtomicUnlock_REAL(&lock);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif /* SDL_DYNAMIC_API */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2013 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 _SDL_dynapi_h
|
||||
#define _SDL_dynapi_h
|
||||
|
||||
/* IMPORTANT:
|
||||
This is the master switch to disabling the dynamic API. We made it so you
|
||||
have to hand-edit an internal source file in SDL to turn it off; you
|
||||
can do it if you want it badly enough, but hopefully you won't want to.
|
||||
You should understand the ramifications of turning this off: it makes it
|
||||
hard to update your SDL in the field, and impossible if you've statically
|
||||
linked SDL into your app. Understand that platforms change, and if we can't
|
||||
drop in an updated SDL, your application can definitely break some time
|
||||
in the future, even if it's fine today.
|
||||
To be sure, as new system-level video and audio APIs are introduced, an
|
||||
updated SDL can transparently take advantage of them, but your program will
|
||||
not without this feature. Think hard before turning it off.
|
||||
*/
|
||||
#ifdef SDL_DYNAMIC_API /* Tried to force it on the command line? */
|
||||
#error Nope, you have to edit this file to force this off.
|
||||
#endif
|
||||
|
||||
#if defined(__APPLE__) && TARGET_OS_IPHONE /* probably not useful on iOS. */
|
||||
#define SDL_DYNAMIC_API 0
|
||||
#else /* everyone else. */
|
||||
#define SDL_DYNAMIC_API 1
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
@@ -0,0 +1,572 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2013 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.
|
||||
*/
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
||||
/* DO NOT EDIT THIS FILE BY HAND. It is autogenerated by gendynapi.pl. */
|
||||
|
||||
#if !SDL_DYNAMIC_API
|
||||
#error You should not be here.
|
||||
#endif
|
||||
|
||||
/* so annoying. */
|
||||
#if defined(__thumb__) && (defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__))
|
||||
#define SDL_MemoryBarrierRelease SDL_MemoryBarrierRelease_REAL
|
||||
#define SDL_MemoryBarrierAcquire SDL_MemoryBarrierAcquire_REAL
|
||||
#endif
|
||||
|
||||
#define SDL_SetError SDL_SetError_REAL
|
||||
#define SDL_Log SDL_Log_REAL
|
||||
#define SDL_LogVerbose SDL_LogVerbose_REAL
|
||||
#define SDL_LogDebug SDL_LogDebug_REAL
|
||||
#define SDL_LogInfo SDL_LogInfo_REAL
|
||||
#define SDL_LogWarn SDL_LogWarn_REAL
|
||||
#define SDL_LogError SDL_LogError_REAL
|
||||
#define SDL_LogCritical SDL_LogCritical_REAL
|
||||
#define SDL_LogMessage SDL_LogMessage_REAL
|
||||
#define SDL_sscanf SDL_sscanf_REAL
|
||||
#define SDL_snprintf SDL_snprintf_REAL
|
||||
#define SDL_CreateThread SDL_CreateThread_REAL
|
||||
#define SDL_RWFromFP SDL_RWFromFP_REAL
|
||||
#define SDL_RegisterApp SDL_RegisterApp_REAL
|
||||
#define SDL_UnregisterApp SDL_UnregisterApp_REAL
|
||||
#define SDL_Direct3D9GetAdapterIndex SDL_Direct3D9GetAdapterIndex_REAL
|
||||
#define SDL_RenderGetD3D9Device SDL_RenderGetD3D9Device_REAL
|
||||
#define SDL_iPhoneSetAnimationCallback SDL_iPhoneSetAnimationCallback_REAL
|
||||
#define SDL_iPhoneSetEventPump SDL_iPhoneSetEventPump_REAL
|
||||
#define SDL_AndroidGetJNIEnv SDL_AndroidGetJNIEnv_REAL
|
||||
#define SDL_AndroidGetActivity SDL_AndroidGetActivity_REAL
|
||||
#define SDL_AndroidGetInternalStoragePath SDL_AndroidGetInternalStoragePath_REAL
|
||||
#define SDL_AndroidGetExternalStorageState SDL_AndroidGetExternalStorageState_REAL
|
||||
#define SDL_AndroidGetExternalStoragePath SDL_AndroidGetExternalStoragePath_REAL
|
||||
#define SDL_Init SDL_Init_REAL
|
||||
#define SDL_InitSubSystem SDL_InitSubSystem_REAL
|
||||
#define SDL_QuitSubSystem SDL_QuitSubSystem_REAL
|
||||
#define SDL_WasInit SDL_WasInit_REAL
|
||||
#define SDL_Quit SDL_Quit_REAL
|
||||
#define SDL_ReportAssertion SDL_ReportAssertion_REAL
|
||||
#define SDL_SetAssertionHandler SDL_SetAssertionHandler_REAL
|
||||
#define SDL_GetAssertionReport SDL_GetAssertionReport_REAL
|
||||
#define SDL_ResetAssertionReport SDL_ResetAssertionReport_REAL
|
||||
#define SDL_AtomicTryLock SDL_AtomicTryLock_REAL
|
||||
#define SDL_AtomicLock SDL_AtomicLock_REAL
|
||||
#define SDL_AtomicUnlock SDL_AtomicUnlock_REAL
|
||||
#define SDL_AtomicCAS SDL_AtomicCAS_REAL
|
||||
#define SDL_AtomicSet SDL_AtomicSet_REAL
|
||||
#define SDL_AtomicGet SDL_AtomicGet_REAL
|
||||
#define SDL_AtomicAdd SDL_AtomicAdd_REAL
|
||||
#define SDL_AtomicCASPtr SDL_AtomicCASPtr_REAL
|
||||
#define SDL_AtomicSetPtr SDL_AtomicSetPtr_REAL
|
||||
#define SDL_AtomicGetPtr SDL_AtomicGetPtr_REAL
|
||||
#define SDL_GetNumAudioDrivers SDL_GetNumAudioDrivers_REAL
|
||||
#define SDL_GetAudioDriver SDL_GetAudioDriver_REAL
|
||||
#define SDL_AudioInit SDL_AudioInit_REAL
|
||||
#define SDL_AudioQuit SDL_AudioQuit_REAL
|
||||
#define SDL_GetCurrentAudioDriver SDL_GetCurrentAudioDriver_REAL
|
||||
#define SDL_OpenAudio SDL_OpenAudio_REAL
|
||||
#define SDL_GetNumAudioDevices SDL_GetNumAudioDevices_REAL
|
||||
#define SDL_GetAudioDeviceName SDL_GetAudioDeviceName_REAL
|
||||
#define SDL_OpenAudioDevice SDL_OpenAudioDevice_REAL
|
||||
#define SDL_GetAudioStatus SDL_GetAudioStatus_REAL
|
||||
#define SDL_GetAudioDeviceStatus SDL_GetAudioDeviceStatus_REAL
|
||||
#define SDL_PauseAudio SDL_PauseAudio_REAL
|
||||
#define SDL_PauseAudioDevice SDL_PauseAudioDevice_REAL
|
||||
#define SDL_LoadWAV_RW SDL_LoadWAV_RW_REAL
|
||||
#define SDL_FreeWAV SDL_FreeWAV_REAL
|
||||
#define SDL_BuildAudioCVT SDL_BuildAudioCVT_REAL
|
||||
#define SDL_ConvertAudio SDL_ConvertAudio_REAL
|
||||
#define SDL_MixAudio SDL_MixAudio_REAL
|
||||
#define SDL_MixAudioFormat SDL_MixAudioFormat_REAL
|
||||
#define SDL_LockAudio SDL_LockAudio_REAL
|
||||
#define SDL_LockAudioDevice SDL_LockAudioDevice_REAL
|
||||
#define SDL_UnlockAudio SDL_UnlockAudio_REAL
|
||||
#define SDL_UnlockAudioDevice SDL_UnlockAudioDevice_REAL
|
||||
#define SDL_CloseAudio SDL_CloseAudio_REAL
|
||||
#define SDL_CloseAudioDevice SDL_CloseAudioDevice_REAL
|
||||
#define SDL_SetClipboardText SDL_SetClipboardText_REAL
|
||||
#define SDL_GetClipboardText SDL_GetClipboardText_REAL
|
||||
#define SDL_HasClipboardText SDL_HasClipboardText_REAL
|
||||
#define SDL_GetCPUCount SDL_GetCPUCount_REAL
|
||||
#define SDL_GetCPUCacheLineSize SDL_GetCPUCacheLineSize_REAL
|
||||
#define SDL_HasRDTSC SDL_HasRDTSC_REAL
|
||||
#define SDL_HasAltiVec SDL_HasAltiVec_REAL
|
||||
#define SDL_HasMMX SDL_HasMMX_REAL
|
||||
#define SDL_Has3DNow SDL_Has3DNow_REAL
|
||||
#define SDL_HasSSE SDL_HasSSE_REAL
|
||||
#define SDL_HasSSE2 SDL_HasSSE2_REAL
|
||||
#define SDL_HasSSE3 SDL_HasSSE3_REAL
|
||||
#define SDL_HasSSE41 SDL_HasSSE41_REAL
|
||||
#define SDL_HasSSE42 SDL_HasSSE42_REAL
|
||||
#define SDL_GetSystemRAM SDL_GetSystemRAM_REAL
|
||||
#define SDL_GetError SDL_GetError_REAL
|
||||
#define SDL_ClearError SDL_ClearError_REAL
|
||||
#define SDL_Error SDL_Error_REAL
|
||||
#define SDL_PumpEvents SDL_PumpEvents_REAL
|
||||
#define SDL_PeepEvents SDL_PeepEvents_REAL
|
||||
#define SDL_HasEvent SDL_HasEvent_REAL
|
||||
#define SDL_HasEvents SDL_HasEvents_REAL
|
||||
#define SDL_FlushEvent SDL_FlushEvent_REAL
|
||||
#define SDL_FlushEvents SDL_FlushEvents_REAL
|
||||
#define SDL_PollEvent SDL_PollEvent_REAL
|
||||
#define SDL_WaitEvent SDL_WaitEvent_REAL
|
||||
#define SDL_WaitEventTimeout SDL_WaitEventTimeout_REAL
|
||||
#define SDL_PushEvent SDL_PushEvent_REAL
|
||||
#define SDL_SetEventFilter SDL_SetEventFilter_REAL
|
||||
#define SDL_GetEventFilter SDL_GetEventFilter_REAL
|
||||
#define SDL_AddEventWatch SDL_AddEventWatch_REAL
|
||||
#define SDL_DelEventWatch SDL_DelEventWatch_REAL
|
||||
#define SDL_FilterEvents SDL_FilterEvents_REAL
|
||||
#define SDL_EventState SDL_EventState_REAL
|
||||
#define SDL_RegisterEvents SDL_RegisterEvents_REAL
|
||||
#define SDL_GetBasePath SDL_GetBasePath_REAL
|
||||
#define SDL_GetPrefPath SDL_GetPrefPath_REAL
|
||||
#define SDL_GameControllerAddMapping SDL_GameControllerAddMapping_REAL
|
||||
#define SDL_GameControllerMappingForGUID SDL_GameControllerMappingForGUID_REAL
|
||||
#define SDL_GameControllerMapping SDL_GameControllerMapping_REAL
|
||||
#define SDL_IsGameController SDL_IsGameController_REAL
|
||||
#define SDL_GameControllerNameForIndex SDL_GameControllerNameForIndex_REAL
|
||||
#define SDL_GameControllerOpen SDL_GameControllerOpen_REAL
|
||||
#define SDL_GameControllerName SDL_GameControllerName_REAL
|
||||
#define SDL_GameControllerGetAttached SDL_GameControllerGetAttached_REAL
|
||||
#define SDL_GameControllerGetJoystick SDL_GameControllerGetJoystick_REAL
|
||||
#define SDL_GameControllerEventState SDL_GameControllerEventState_REAL
|
||||
#define SDL_GameControllerUpdate SDL_GameControllerUpdate_REAL
|
||||
#define SDL_GameControllerGetAxisFromString SDL_GameControllerGetAxisFromString_REAL
|
||||
#define SDL_GameControllerGetStringForAxis SDL_GameControllerGetStringForAxis_REAL
|
||||
#define SDL_GameControllerGetBindForAxis SDL_GameControllerGetBindForAxis_REAL
|
||||
#define SDL_GameControllerGetAxis SDL_GameControllerGetAxis_REAL
|
||||
#define SDL_GameControllerGetButtonFromString SDL_GameControllerGetButtonFromString_REAL
|
||||
#define SDL_GameControllerGetStringForButton SDL_GameControllerGetStringForButton_REAL
|
||||
#define SDL_GameControllerGetBindForButton SDL_GameControllerGetBindForButton_REAL
|
||||
#define SDL_GameControllerGetButton SDL_GameControllerGetButton_REAL
|
||||
#define SDL_GameControllerClose SDL_GameControllerClose_REAL
|
||||
#define SDL_RecordGesture SDL_RecordGesture_REAL
|
||||
#define SDL_SaveAllDollarTemplates SDL_SaveAllDollarTemplates_REAL
|
||||
#define SDL_SaveDollarTemplate SDL_SaveDollarTemplate_REAL
|
||||
#define SDL_LoadDollarTemplates SDL_LoadDollarTemplates_REAL
|
||||
#define SDL_NumHaptics SDL_NumHaptics_REAL
|
||||
#define SDL_HapticName SDL_HapticName_REAL
|
||||
#define SDL_HapticOpen SDL_HapticOpen_REAL
|
||||
#define SDL_HapticOpened SDL_HapticOpened_REAL
|
||||
#define SDL_HapticIndex SDL_HapticIndex_REAL
|
||||
#define SDL_MouseIsHaptic SDL_MouseIsHaptic_REAL
|
||||
#define SDL_HapticOpenFromMouse SDL_HapticOpenFromMouse_REAL
|
||||
#define SDL_JoystickIsHaptic SDL_JoystickIsHaptic_REAL
|
||||
#define SDL_HapticOpenFromJoystick SDL_HapticOpenFromJoystick_REAL
|
||||
#define SDL_HapticClose SDL_HapticClose_REAL
|
||||
#define SDL_HapticNumEffects SDL_HapticNumEffects_REAL
|
||||
#define SDL_HapticNumEffectsPlaying SDL_HapticNumEffectsPlaying_REAL
|
||||
#define SDL_HapticQuery SDL_HapticQuery_REAL
|
||||
#define SDL_HapticNumAxes SDL_HapticNumAxes_REAL
|
||||
#define SDL_HapticEffectSupported SDL_HapticEffectSupported_REAL
|
||||
#define SDL_HapticNewEffect SDL_HapticNewEffect_REAL
|
||||
#define SDL_HapticUpdateEffect SDL_HapticUpdateEffect_REAL
|
||||
#define SDL_HapticRunEffect SDL_HapticRunEffect_REAL
|
||||
#define SDL_HapticStopEffect SDL_HapticStopEffect_REAL
|
||||
#define SDL_HapticDestroyEffect SDL_HapticDestroyEffect_REAL
|
||||
#define SDL_HapticGetEffectStatus SDL_HapticGetEffectStatus_REAL
|
||||
#define SDL_HapticSetGain SDL_HapticSetGain_REAL
|
||||
#define SDL_HapticSetAutocenter SDL_HapticSetAutocenter_REAL
|
||||
#define SDL_HapticPause SDL_HapticPause_REAL
|
||||
#define SDL_HapticUnpause SDL_HapticUnpause_REAL
|
||||
#define SDL_HapticStopAll SDL_HapticStopAll_REAL
|
||||
#define SDL_HapticRumbleSupported SDL_HapticRumbleSupported_REAL
|
||||
#define SDL_HapticRumbleInit SDL_HapticRumbleInit_REAL
|
||||
#define SDL_HapticRumblePlay SDL_HapticRumblePlay_REAL
|
||||
#define SDL_HapticRumbleStop SDL_HapticRumbleStop_REAL
|
||||
#define SDL_SetHintWithPriority SDL_SetHintWithPriority_REAL
|
||||
#define SDL_SetHint SDL_SetHint_REAL
|
||||
#define SDL_GetHint SDL_GetHint_REAL
|
||||
#define SDL_AddHintCallback SDL_AddHintCallback_REAL
|
||||
#define SDL_DelHintCallback SDL_DelHintCallback_REAL
|
||||
#define SDL_ClearHints SDL_ClearHints_REAL
|
||||
#define SDL_NumJoysticks SDL_NumJoysticks_REAL
|
||||
#define SDL_JoystickNameForIndex SDL_JoystickNameForIndex_REAL
|
||||
#define SDL_JoystickOpen SDL_JoystickOpen_REAL
|
||||
#define SDL_JoystickName SDL_JoystickName_REAL
|
||||
#define SDL_JoystickGetDeviceGUID SDL_JoystickGetDeviceGUID_REAL
|
||||
#define SDL_JoystickGetGUID SDL_JoystickGetGUID_REAL
|
||||
#define SDL_JoystickGetGUIDString SDL_JoystickGetGUIDString_REAL
|
||||
#define SDL_JoystickGetGUIDFromString SDL_JoystickGetGUIDFromString_REAL
|
||||
#define SDL_JoystickGetAttached SDL_JoystickGetAttached_REAL
|
||||
#define SDL_JoystickInstanceID SDL_JoystickInstanceID_REAL
|
||||
#define SDL_JoystickNumAxes SDL_JoystickNumAxes_REAL
|
||||
#define SDL_JoystickNumBalls SDL_JoystickNumBalls_REAL
|
||||
#define SDL_JoystickNumHats SDL_JoystickNumHats_REAL
|
||||
#define SDL_JoystickNumButtons SDL_JoystickNumButtons_REAL
|
||||
#define SDL_JoystickUpdate SDL_JoystickUpdate_REAL
|
||||
#define SDL_JoystickEventState SDL_JoystickEventState_REAL
|
||||
#define SDL_JoystickGetAxis SDL_JoystickGetAxis_REAL
|
||||
#define SDL_JoystickGetHat SDL_JoystickGetHat_REAL
|
||||
#define SDL_JoystickGetBall SDL_JoystickGetBall_REAL
|
||||
#define SDL_JoystickGetButton SDL_JoystickGetButton_REAL
|
||||
#define SDL_JoystickClose SDL_JoystickClose_REAL
|
||||
#define SDL_GetKeyboardFocus SDL_GetKeyboardFocus_REAL
|
||||
#define SDL_GetKeyboardState SDL_GetKeyboardState_REAL
|
||||
#define SDL_GetModState SDL_GetModState_REAL
|
||||
#define SDL_SetModState SDL_SetModState_REAL
|
||||
#define SDL_GetKeyFromScancode SDL_GetKeyFromScancode_REAL
|
||||
#define SDL_GetScancodeFromKey SDL_GetScancodeFromKey_REAL
|
||||
#define SDL_GetScancodeName SDL_GetScancodeName_REAL
|
||||
#define SDL_GetScancodeFromName SDL_GetScancodeFromName_REAL
|
||||
#define SDL_GetKeyName SDL_GetKeyName_REAL
|
||||
#define SDL_GetKeyFromName SDL_GetKeyFromName_REAL
|
||||
#define SDL_StartTextInput SDL_StartTextInput_REAL
|
||||
#define SDL_IsTextInputActive SDL_IsTextInputActive_REAL
|
||||
#define SDL_StopTextInput SDL_StopTextInput_REAL
|
||||
#define SDL_SetTextInputRect SDL_SetTextInputRect_REAL
|
||||
#define SDL_HasScreenKeyboardSupport SDL_HasScreenKeyboardSupport_REAL
|
||||
#define SDL_IsScreenKeyboardShown SDL_IsScreenKeyboardShown_REAL
|
||||
#define SDL_LoadObject SDL_LoadObject_REAL
|
||||
#define SDL_LoadFunction SDL_LoadFunction_REAL
|
||||
#define SDL_UnloadObject SDL_UnloadObject_REAL
|
||||
#define SDL_LogSetAllPriority SDL_LogSetAllPriority_REAL
|
||||
#define SDL_LogSetPriority SDL_LogSetPriority_REAL
|
||||
#define SDL_LogGetPriority SDL_LogGetPriority_REAL
|
||||
#define SDL_LogResetPriorities SDL_LogResetPriorities_REAL
|
||||
#define SDL_LogMessageV SDL_LogMessageV_REAL
|
||||
#define SDL_LogGetOutputFunction SDL_LogGetOutputFunction_REAL
|
||||
#define SDL_LogSetOutputFunction SDL_LogSetOutputFunction_REAL
|
||||
#define SDL_SetMainReady SDL_SetMainReady_REAL
|
||||
#define SDL_ShowMessageBox SDL_ShowMessageBox_REAL
|
||||
#define SDL_ShowSimpleMessageBox SDL_ShowSimpleMessageBox_REAL
|
||||
#define SDL_GetMouseFocus SDL_GetMouseFocus_REAL
|
||||
#define SDL_GetMouseState SDL_GetMouseState_REAL
|
||||
#define SDL_GetRelativeMouseState SDL_GetRelativeMouseState_REAL
|
||||
#define SDL_WarpMouseInWindow SDL_WarpMouseInWindow_REAL
|
||||
#define SDL_SetRelativeMouseMode SDL_SetRelativeMouseMode_REAL
|
||||
#define SDL_GetRelativeMouseMode SDL_GetRelativeMouseMode_REAL
|
||||
#define SDL_CreateCursor SDL_CreateCursor_REAL
|
||||
#define SDL_CreateColorCursor SDL_CreateColorCursor_REAL
|
||||
#define SDL_CreateSystemCursor SDL_CreateSystemCursor_REAL
|
||||
#define SDL_SetCursor SDL_SetCursor_REAL
|
||||
#define SDL_GetCursor SDL_GetCursor_REAL
|
||||
#define SDL_GetDefaultCursor SDL_GetDefaultCursor_REAL
|
||||
#define SDL_FreeCursor SDL_FreeCursor_REAL
|
||||
#define SDL_ShowCursor SDL_ShowCursor_REAL
|
||||
#define SDL_CreateMutex SDL_CreateMutex_REAL
|
||||
#define SDL_LockMutex SDL_LockMutex_REAL
|
||||
#define SDL_TryLockMutex SDL_TryLockMutex_REAL
|
||||
#define SDL_UnlockMutex SDL_UnlockMutex_REAL
|
||||
#define SDL_DestroyMutex SDL_DestroyMutex_REAL
|
||||
#define SDL_CreateSemaphore SDL_CreateSemaphore_REAL
|
||||
#define SDL_DestroySemaphore SDL_DestroySemaphore_REAL
|
||||
#define SDL_SemWait SDL_SemWait_REAL
|
||||
#define SDL_SemTryWait SDL_SemTryWait_REAL
|
||||
#define SDL_SemWaitTimeout SDL_SemWaitTimeout_REAL
|
||||
#define SDL_SemPost SDL_SemPost_REAL
|
||||
#define SDL_SemValue SDL_SemValue_REAL
|
||||
#define SDL_CreateCond SDL_CreateCond_REAL
|
||||
#define SDL_DestroyCond SDL_DestroyCond_REAL
|
||||
#define SDL_CondSignal SDL_CondSignal_REAL
|
||||
#define SDL_CondBroadcast SDL_CondBroadcast_REAL
|
||||
#define SDL_CondWait SDL_CondWait_REAL
|
||||
#define SDL_CondWaitTimeout SDL_CondWaitTimeout_REAL
|
||||
#define SDL_GetPixelFormatName SDL_GetPixelFormatName_REAL
|
||||
#define SDL_PixelFormatEnumToMasks SDL_PixelFormatEnumToMasks_REAL
|
||||
#define SDL_MasksToPixelFormatEnum SDL_MasksToPixelFormatEnum_REAL
|
||||
#define SDL_AllocFormat SDL_AllocFormat_REAL
|
||||
#define SDL_FreeFormat SDL_FreeFormat_REAL
|
||||
#define SDL_AllocPalette SDL_AllocPalette_REAL
|
||||
#define SDL_SetPixelFormatPalette SDL_SetPixelFormatPalette_REAL
|
||||
#define SDL_SetPaletteColors SDL_SetPaletteColors_REAL
|
||||
#define SDL_FreePalette SDL_FreePalette_REAL
|
||||
#define SDL_MapRGB SDL_MapRGB_REAL
|
||||
#define SDL_MapRGBA SDL_MapRGBA_REAL
|
||||
#define SDL_GetRGB SDL_GetRGB_REAL
|
||||
#define SDL_GetRGBA SDL_GetRGBA_REAL
|
||||
#define SDL_CalculateGammaRamp SDL_CalculateGammaRamp_REAL
|
||||
#define SDL_GetPlatform SDL_GetPlatform_REAL
|
||||
#define SDL_GetPowerInfo SDL_GetPowerInfo_REAL
|
||||
#define SDL_HasIntersection SDL_HasIntersection_REAL
|
||||
#define SDL_IntersectRect SDL_IntersectRect_REAL
|
||||
#define SDL_UnionRect SDL_UnionRect_REAL
|
||||
#define SDL_EnclosePoints SDL_EnclosePoints_REAL
|
||||
#define SDL_IntersectRectAndLine SDL_IntersectRectAndLine_REAL
|
||||
#define SDL_GetNumRenderDrivers SDL_GetNumRenderDrivers_REAL
|
||||
#define SDL_GetRenderDriverInfo SDL_GetRenderDriverInfo_REAL
|
||||
#define SDL_CreateWindowAndRenderer SDL_CreateWindowAndRenderer_REAL
|
||||
#define SDL_CreateRenderer SDL_CreateRenderer_REAL
|
||||
#define SDL_CreateSoftwareRenderer SDL_CreateSoftwareRenderer_REAL
|
||||
#define SDL_GetRenderer SDL_GetRenderer_REAL
|
||||
#define SDL_GetRendererInfo SDL_GetRendererInfo_REAL
|
||||
#define SDL_GetRendererOutputSize SDL_GetRendererOutputSize_REAL
|
||||
#define SDL_CreateTexture SDL_CreateTexture_REAL
|
||||
#define SDL_CreateTextureFromSurface SDL_CreateTextureFromSurface_REAL
|
||||
#define SDL_QueryTexture SDL_QueryTexture_REAL
|
||||
#define SDL_SetTextureColorMod SDL_SetTextureColorMod_REAL
|
||||
#define SDL_GetTextureColorMod SDL_GetTextureColorMod_REAL
|
||||
#define SDL_SetTextureAlphaMod SDL_SetTextureAlphaMod_REAL
|
||||
#define SDL_GetTextureAlphaMod SDL_GetTextureAlphaMod_REAL
|
||||
#define SDL_SetTextureBlendMode SDL_SetTextureBlendMode_REAL
|
||||
#define SDL_GetTextureBlendMode SDL_GetTextureBlendMode_REAL
|
||||
#define SDL_UpdateTexture SDL_UpdateTexture_REAL
|
||||
#define SDL_UpdateYUVTexture SDL_UpdateYUVTexture_REAL
|
||||
#define SDL_LockTexture SDL_LockTexture_REAL
|
||||
#define SDL_UnlockTexture SDL_UnlockTexture_REAL
|
||||
#define SDL_RenderTargetSupported SDL_RenderTargetSupported_REAL
|
||||
#define SDL_SetRenderTarget SDL_SetRenderTarget_REAL
|
||||
#define SDL_GetRenderTarget SDL_GetRenderTarget_REAL
|
||||
#define SDL_RenderSetLogicalSize SDL_RenderSetLogicalSize_REAL
|
||||
#define SDL_RenderGetLogicalSize SDL_RenderGetLogicalSize_REAL
|
||||
#define SDL_RenderSetViewport SDL_RenderSetViewport_REAL
|
||||
#define SDL_RenderGetViewport SDL_RenderGetViewport_REAL
|
||||
#define SDL_RenderSetClipRect SDL_RenderSetClipRect_REAL
|
||||
#define SDL_RenderGetClipRect SDL_RenderGetClipRect_REAL
|
||||
#define SDL_RenderSetScale SDL_RenderSetScale_REAL
|
||||
#define SDL_RenderGetScale SDL_RenderGetScale_REAL
|
||||
#define SDL_SetRenderDrawColor SDL_SetRenderDrawColor_REAL
|
||||
#define SDL_GetRenderDrawColor SDL_GetRenderDrawColor_REAL
|
||||
#define SDL_SetRenderDrawBlendMode SDL_SetRenderDrawBlendMode_REAL
|
||||
#define SDL_GetRenderDrawBlendMode SDL_GetRenderDrawBlendMode_REAL
|
||||
#define SDL_RenderClear SDL_RenderClear_REAL
|
||||
#define SDL_RenderDrawPoint SDL_RenderDrawPoint_REAL
|
||||
#define SDL_RenderDrawPoints SDL_RenderDrawPoints_REAL
|
||||
#define SDL_RenderDrawLine SDL_RenderDrawLine_REAL
|
||||
#define SDL_RenderDrawLines SDL_RenderDrawLines_REAL
|
||||
#define SDL_RenderDrawRect SDL_RenderDrawRect_REAL
|
||||
#define SDL_RenderDrawRects SDL_RenderDrawRects_REAL
|
||||
#define SDL_RenderFillRect SDL_RenderFillRect_REAL
|
||||
#define SDL_RenderFillRects SDL_RenderFillRects_REAL
|
||||
#define SDL_RenderCopy SDL_RenderCopy_REAL
|
||||
#define SDL_RenderCopyEx SDL_RenderCopyEx_REAL
|
||||
#define SDL_RenderReadPixels SDL_RenderReadPixels_REAL
|
||||
#define SDL_RenderPresent SDL_RenderPresent_REAL
|
||||
#define SDL_DestroyTexture SDL_DestroyTexture_REAL
|
||||
#define SDL_DestroyRenderer SDL_DestroyRenderer_REAL
|
||||
#define SDL_GL_BindTexture SDL_GL_BindTexture_REAL
|
||||
#define SDL_GL_UnbindTexture SDL_GL_UnbindTexture_REAL
|
||||
#define SDL_RWFromFile SDL_RWFromFile_REAL
|
||||
#define SDL_RWFromMem SDL_RWFromMem_REAL
|
||||
#define SDL_RWFromConstMem SDL_RWFromConstMem_REAL
|
||||
#define SDL_AllocRW SDL_AllocRW_REAL
|
||||
#define SDL_FreeRW SDL_FreeRW_REAL
|
||||
#define SDL_ReadU8 SDL_ReadU8_REAL
|
||||
#define SDL_ReadLE16 SDL_ReadLE16_REAL
|
||||
#define SDL_ReadBE16 SDL_ReadBE16_REAL
|
||||
#define SDL_ReadLE32 SDL_ReadLE32_REAL
|
||||
#define SDL_ReadBE32 SDL_ReadBE32_REAL
|
||||
#define SDL_ReadLE64 SDL_ReadLE64_REAL
|
||||
#define SDL_ReadBE64 SDL_ReadBE64_REAL
|
||||
#define SDL_WriteU8 SDL_WriteU8_REAL
|
||||
#define SDL_WriteLE16 SDL_WriteLE16_REAL
|
||||
#define SDL_WriteBE16 SDL_WriteBE16_REAL
|
||||
#define SDL_WriteLE32 SDL_WriteLE32_REAL
|
||||
#define SDL_WriteBE32 SDL_WriteBE32_REAL
|
||||
#define SDL_WriteLE64 SDL_WriteLE64_REAL
|
||||
#define SDL_WriteBE64 SDL_WriteBE64_REAL
|
||||
#define SDL_CreateShapedWindow SDL_CreateShapedWindow_REAL
|
||||
#define SDL_IsShapedWindow SDL_IsShapedWindow_REAL
|
||||
#define SDL_SetWindowShape SDL_SetWindowShape_REAL
|
||||
#define SDL_GetShapedWindowMode SDL_GetShapedWindowMode_REAL
|
||||
#define SDL_malloc SDL_malloc_REAL
|
||||
#define SDL_calloc SDL_calloc_REAL
|
||||
#define SDL_realloc SDL_realloc_REAL
|
||||
#define SDL_free SDL_free_REAL
|
||||
#define SDL_getenv SDL_getenv_REAL
|
||||
#define SDL_setenv SDL_setenv_REAL
|
||||
#define SDL_qsort SDL_qsort_REAL
|
||||
#define SDL_abs SDL_abs_REAL
|
||||
#define SDL_isdigit SDL_isdigit_REAL
|
||||
#define SDL_isspace SDL_isspace_REAL
|
||||
#define SDL_toupper SDL_toupper_REAL
|
||||
#define SDL_tolower SDL_tolower_REAL
|
||||
#define SDL_memset SDL_memset_REAL
|
||||
#define SDL_memcpy SDL_memcpy_REAL
|
||||
#define SDL_memmove SDL_memmove_REAL
|
||||
#define SDL_memcmp SDL_memcmp_REAL
|
||||
#define SDL_wcslen SDL_wcslen_REAL
|
||||
#define SDL_wcslcpy SDL_wcslcpy_REAL
|
||||
#define SDL_wcslcat SDL_wcslcat_REAL
|
||||
#define SDL_strlen SDL_strlen_REAL
|
||||
#define SDL_strlcpy SDL_strlcpy_REAL
|
||||
#define SDL_utf8strlcpy SDL_utf8strlcpy_REAL
|
||||
#define SDL_strlcat SDL_strlcat_REAL
|
||||
#define SDL_strdup SDL_strdup_REAL
|
||||
#define SDL_strrev SDL_strrev_REAL
|
||||
#define SDL_strupr SDL_strupr_REAL
|
||||
#define SDL_strlwr SDL_strlwr_REAL
|
||||
#define SDL_strchr SDL_strchr_REAL
|
||||
#define SDL_strrchr SDL_strrchr_REAL
|
||||
#define SDL_strstr SDL_strstr_REAL
|
||||
#define SDL_itoa SDL_itoa_REAL
|
||||
#define SDL_uitoa SDL_uitoa_REAL
|
||||
#define SDL_ltoa SDL_ltoa_REAL
|
||||
#define SDL_ultoa SDL_ultoa_REAL
|
||||
#define SDL_lltoa SDL_lltoa_REAL
|
||||
#define SDL_ulltoa SDL_ulltoa_REAL
|
||||
#define SDL_atoi SDL_atoi_REAL
|
||||
#define SDL_atof SDL_atof_REAL
|
||||
#define SDL_strtol SDL_strtol_REAL
|
||||
#define SDL_strtoul SDL_strtoul_REAL
|
||||
#define SDL_strtoll SDL_strtoll_REAL
|
||||
#define SDL_strtoull SDL_strtoull_REAL
|
||||
#define SDL_strtod SDL_strtod_REAL
|
||||
#define SDL_strcmp SDL_strcmp_REAL
|
||||
#define SDL_strncmp SDL_strncmp_REAL
|
||||
#define SDL_strcasecmp SDL_strcasecmp_REAL
|
||||
#define SDL_strncasecmp SDL_strncasecmp_REAL
|
||||
#define SDL_vsnprintf SDL_vsnprintf_REAL
|
||||
#define SDL_acos SDL_acos_REAL
|
||||
#define SDL_asin SDL_asin_REAL
|
||||
#define SDL_atan SDL_atan_REAL
|
||||
#define SDL_atan2 SDL_atan2_REAL
|
||||
#define SDL_ceil SDL_ceil_REAL
|
||||
#define SDL_copysign SDL_copysign_REAL
|
||||
#define SDL_cos SDL_cos_REAL
|
||||
#define SDL_cosf SDL_cosf_REAL
|
||||
#define SDL_fabs SDL_fabs_REAL
|
||||
#define SDL_floor SDL_floor_REAL
|
||||
#define SDL_log SDL_log_REAL
|
||||
#define SDL_pow SDL_pow_REAL
|
||||
#define SDL_scalbn SDL_scalbn_REAL
|
||||
#define SDL_sin SDL_sin_REAL
|
||||
#define SDL_sinf SDL_sinf_REAL
|
||||
#define SDL_sqrt SDL_sqrt_REAL
|
||||
#define SDL_iconv_open SDL_iconv_open_REAL
|
||||
#define SDL_iconv_close SDL_iconv_close_REAL
|
||||
#define SDL_iconv SDL_iconv_REAL
|
||||
#define SDL_iconv_string SDL_iconv_string_REAL
|
||||
#define SDL_CreateRGBSurface SDL_CreateRGBSurface_REAL
|
||||
#define SDL_CreateRGBSurfaceFrom SDL_CreateRGBSurfaceFrom_REAL
|
||||
#define SDL_FreeSurface SDL_FreeSurface_REAL
|
||||
#define SDL_SetSurfacePalette SDL_SetSurfacePalette_REAL
|
||||
#define SDL_LockSurface SDL_LockSurface_REAL
|
||||
#define SDL_UnlockSurface SDL_UnlockSurface_REAL
|
||||
#define SDL_LoadBMP_RW SDL_LoadBMP_RW_REAL
|
||||
#define SDL_SaveBMP_RW SDL_SaveBMP_RW_REAL
|
||||
#define SDL_SetSurfaceRLE SDL_SetSurfaceRLE_REAL
|
||||
#define SDL_SetColorKey SDL_SetColorKey_REAL
|
||||
#define SDL_GetColorKey SDL_GetColorKey_REAL
|
||||
#define SDL_SetSurfaceColorMod SDL_SetSurfaceColorMod_REAL
|
||||
#define SDL_GetSurfaceColorMod SDL_GetSurfaceColorMod_REAL
|
||||
#define SDL_SetSurfaceAlphaMod SDL_SetSurfaceAlphaMod_REAL
|
||||
#define SDL_GetSurfaceAlphaMod SDL_GetSurfaceAlphaMod_REAL
|
||||
#define SDL_SetSurfaceBlendMode SDL_SetSurfaceBlendMode_REAL
|
||||
#define SDL_GetSurfaceBlendMode SDL_GetSurfaceBlendMode_REAL
|
||||
#define SDL_SetClipRect SDL_SetClipRect_REAL
|
||||
#define SDL_GetClipRect SDL_GetClipRect_REAL
|
||||
#define SDL_ConvertSurface SDL_ConvertSurface_REAL
|
||||
#define SDL_ConvertSurfaceFormat SDL_ConvertSurfaceFormat_REAL
|
||||
#define SDL_ConvertPixels SDL_ConvertPixels_REAL
|
||||
#define SDL_FillRect SDL_FillRect_REAL
|
||||
#define SDL_FillRects SDL_FillRects_REAL
|
||||
#define SDL_UpperBlit SDL_UpperBlit_REAL
|
||||
#define SDL_LowerBlit SDL_LowerBlit_REAL
|
||||
#define SDL_SoftStretch SDL_SoftStretch_REAL
|
||||
#define SDL_UpperBlitScaled SDL_UpperBlitScaled_REAL
|
||||
#define SDL_LowerBlitScaled SDL_LowerBlitScaled_REAL
|
||||
#define SDL_GetWindowWMInfo SDL_GetWindowWMInfo_REAL
|
||||
#define SDL_GetThreadName SDL_GetThreadName_REAL
|
||||
#define SDL_ThreadID SDL_ThreadID_REAL
|
||||
#define SDL_GetThreadID SDL_GetThreadID_REAL
|
||||
#define SDL_SetThreadPriority SDL_SetThreadPriority_REAL
|
||||
#define SDL_WaitThread SDL_WaitThread_REAL
|
||||
#define SDL_DetachThread SDL_DetachThread_REAL
|
||||
#define SDL_TLSCreate SDL_TLSCreate_REAL
|
||||
#define SDL_TLSGet SDL_TLSGet_REAL
|
||||
#define SDL_TLSSet SDL_TLSSet_REAL
|
||||
#define SDL_GetTicks SDL_GetTicks_REAL
|
||||
#define SDL_GetPerformanceCounter SDL_GetPerformanceCounter_REAL
|
||||
#define SDL_GetPerformanceFrequency SDL_GetPerformanceFrequency_REAL
|
||||
#define SDL_Delay SDL_Delay_REAL
|
||||
#define SDL_AddTimer SDL_AddTimer_REAL
|
||||
#define SDL_RemoveTimer SDL_RemoveTimer_REAL
|
||||
#define SDL_GetNumTouchDevices SDL_GetNumTouchDevices_REAL
|
||||
#define SDL_GetTouchDevice SDL_GetTouchDevice_REAL
|
||||
#define SDL_GetNumTouchFingers SDL_GetNumTouchFingers_REAL
|
||||
#define SDL_GetTouchFinger SDL_GetTouchFinger_REAL
|
||||
#define SDL_GetVersion SDL_GetVersion_REAL
|
||||
#define SDL_GetRevision SDL_GetRevision_REAL
|
||||
#define SDL_GetRevisionNumber SDL_GetRevisionNumber_REAL
|
||||
#define SDL_GetNumVideoDrivers SDL_GetNumVideoDrivers_REAL
|
||||
#define SDL_GetVideoDriver SDL_GetVideoDriver_REAL
|
||||
#define SDL_VideoInit SDL_VideoInit_REAL
|
||||
#define SDL_VideoQuit SDL_VideoQuit_REAL
|
||||
#define SDL_GetCurrentVideoDriver SDL_GetCurrentVideoDriver_REAL
|
||||
#define SDL_GetNumVideoDisplays SDL_GetNumVideoDisplays_REAL
|
||||
#define SDL_GetDisplayName SDL_GetDisplayName_REAL
|
||||
#define SDL_GetDisplayBounds SDL_GetDisplayBounds_REAL
|
||||
#define SDL_GetNumDisplayModes SDL_GetNumDisplayModes_REAL
|
||||
#define SDL_GetDisplayMode SDL_GetDisplayMode_REAL
|
||||
#define SDL_GetDesktopDisplayMode SDL_GetDesktopDisplayMode_REAL
|
||||
#define SDL_GetCurrentDisplayMode SDL_GetCurrentDisplayMode_REAL
|
||||
#define SDL_GetClosestDisplayMode SDL_GetClosestDisplayMode_REAL
|
||||
#define SDL_GetWindowDisplayIndex SDL_GetWindowDisplayIndex_REAL
|
||||
#define SDL_SetWindowDisplayMode SDL_SetWindowDisplayMode_REAL
|
||||
#define SDL_GetWindowDisplayMode SDL_GetWindowDisplayMode_REAL
|
||||
#define SDL_GetWindowPixelFormat SDL_GetWindowPixelFormat_REAL
|
||||
#define SDL_CreateWindow SDL_CreateWindow_REAL
|
||||
#define SDL_CreateWindowFrom SDL_CreateWindowFrom_REAL
|
||||
#define SDL_GetWindowID SDL_GetWindowID_REAL
|
||||
#define SDL_GetWindowFromID SDL_GetWindowFromID_REAL
|
||||
#define SDL_GetWindowFlags SDL_GetWindowFlags_REAL
|
||||
#define SDL_SetWindowTitle SDL_SetWindowTitle_REAL
|
||||
#define SDL_GetWindowTitle SDL_GetWindowTitle_REAL
|
||||
#define SDL_SetWindowIcon SDL_SetWindowIcon_REAL
|
||||
#define SDL_SetWindowData SDL_SetWindowData_REAL
|
||||
#define SDL_GetWindowData SDL_GetWindowData_REAL
|
||||
#define SDL_SetWindowPosition SDL_SetWindowPosition_REAL
|
||||
#define SDL_GetWindowPosition SDL_GetWindowPosition_REAL
|
||||
#define SDL_SetWindowSize SDL_SetWindowSize_REAL
|
||||
#define SDL_GetWindowSize SDL_GetWindowSize_REAL
|
||||
#define SDL_SetWindowMinimumSize SDL_SetWindowMinimumSize_REAL
|
||||
#define SDL_GetWindowMinimumSize SDL_GetWindowMinimumSize_REAL
|
||||
#define SDL_SetWindowMaximumSize SDL_SetWindowMaximumSize_REAL
|
||||
#define SDL_GetWindowMaximumSize SDL_GetWindowMaximumSize_REAL
|
||||
#define SDL_SetWindowBordered SDL_SetWindowBordered_REAL
|
||||
#define SDL_ShowWindow SDL_ShowWindow_REAL
|
||||
#define SDL_HideWindow SDL_HideWindow_REAL
|
||||
#define SDL_RaiseWindow SDL_RaiseWindow_REAL
|
||||
#define SDL_MaximizeWindow SDL_MaximizeWindow_REAL
|
||||
#define SDL_MinimizeWindow SDL_MinimizeWindow_REAL
|
||||
#define SDL_RestoreWindow SDL_RestoreWindow_REAL
|
||||
#define SDL_SetWindowFullscreen SDL_SetWindowFullscreen_REAL
|
||||
#define SDL_GetWindowSurface SDL_GetWindowSurface_REAL
|
||||
#define SDL_UpdateWindowSurface SDL_UpdateWindowSurface_REAL
|
||||
#define SDL_UpdateWindowSurfaceRects SDL_UpdateWindowSurfaceRects_REAL
|
||||
#define SDL_SetWindowGrab SDL_SetWindowGrab_REAL
|
||||
#define SDL_GetWindowGrab SDL_GetWindowGrab_REAL
|
||||
#define SDL_SetWindowBrightness SDL_SetWindowBrightness_REAL
|
||||
#define SDL_GetWindowBrightness SDL_GetWindowBrightness_REAL
|
||||
#define SDL_SetWindowGammaRamp SDL_SetWindowGammaRamp_REAL
|
||||
#define SDL_GetWindowGammaRamp SDL_GetWindowGammaRamp_REAL
|
||||
#define SDL_DestroyWindow SDL_DestroyWindow_REAL
|
||||
#define SDL_IsScreenSaverEnabled SDL_IsScreenSaverEnabled_REAL
|
||||
#define SDL_EnableScreenSaver SDL_EnableScreenSaver_REAL
|
||||
#define SDL_DisableScreenSaver SDL_DisableScreenSaver_REAL
|
||||
#define SDL_GL_LoadLibrary SDL_GL_LoadLibrary_REAL
|
||||
#define SDL_GL_GetProcAddress SDL_GL_GetProcAddress_REAL
|
||||
#define SDL_GL_UnloadLibrary SDL_GL_UnloadLibrary_REAL
|
||||
#define SDL_GL_ExtensionSupported SDL_GL_ExtensionSupported_REAL
|
||||
#define SDL_GL_SetAttribute SDL_GL_SetAttribute_REAL
|
||||
#define SDL_GL_GetAttribute SDL_GL_GetAttribute_REAL
|
||||
#define SDL_GL_CreateContext SDL_GL_CreateContext_REAL
|
||||
#define SDL_GL_MakeCurrent SDL_GL_MakeCurrent_REAL
|
||||
#define SDL_GL_GetCurrentWindow SDL_GL_GetCurrentWindow_REAL
|
||||
#define SDL_GL_GetCurrentContext SDL_GL_GetCurrentContext_REAL
|
||||
#define SDL_GL_GetDrawableSize SDL_GL_GetDrawableSize_REAL
|
||||
#define SDL_GL_SetSwapInterval SDL_GL_SetSwapInterval_REAL
|
||||
#define SDL_GL_GetSwapInterval SDL_GL_GetSwapInterval_REAL
|
||||
#define SDL_GL_SwapWindow SDL_GL_SwapWindow_REAL
|
||||
#define SDL_GL_DeleteContext SDL_GL_DeleteContext_REAL
|
||||
#define SDL_vsscanf SDL_vsscanf_REAL
|
||||
#define SDL_GameControllerAddMappingsFromRW SDL_GameControllerAddMappingsFromRW_REAL
|
||||
@@ -0,0 +1,601 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2013 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.
|
||||
*/
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
||||
/*
|
||||
DO NOT EDIT THIS FILE BY HAND. It is autogenerated by gendynapi.pl.
|
||||
NEVER REARRANGE THIS FILE, THE ORDER IS ABI LAW.
|
||||
Changing this file means bumping SDL_DYNAPI_VERSION. You can safely add
|
||||
new items to the end of the file, though.
|
||||
Also, this file gets included multiple times, don't add #pragma once, etc.
|
||||
*/
|
||||
|
||||
/* direct jump magic can use these, the rest needs special code. */
|
||||
#if !SDL_DYNAPI_PROC_NO_VARARGS
|
||||
SDL_DYNAPI_PROC(int,SDL_SetError,(const char *a, ...),(a),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_Log,(const char *a, ...),(a),)
|
||||
SDL_DYNAPI_PROC(void,SDL_LogVerbose,(int a, const char *b, ...),(a,b),)
|
||||
SDL_DYNAPI_PROC(void,SDL_LogDebug,(int a, const char *b, ...),(a,b),)
|
||||
SDL_DYNAPI_PROC(void,SDL_LogInfo,(int a, const char *b, ...),(a,b),)
|
||||
SDL_DYNAPI_PROC(void,SDL_LogWarn,(int a, const char *b, ...),(a,b),)
|
||||
SDL_DYNAPI_PROC(void,SDL_LogError,(int a, const char *b, ...),(a,b),)
|
||||
SDL_DYNAPI_PROC(void,SDL_LogCritical,(int a, const char *b, ...),(a,b),)
|
||||
SDL_DYNAPI_PROC(void,SDL_LogMessage,(int a, SDL_LogPriority b, const char *c, ...),(a,b,c),)
|
||||
SDL_DYNAPI_PROC(int,SDL_sscanf,(const char *a, const char *b, ...),(a,b),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_snprintf,(char *a, size_t b, const char *c, ...),(a,b,c),return)
|
||||
#endif
|
||||
|
||||
#ifdef SDL_CreateThread
|
||||
#undef SDL_CreateThread
|
||||
#endif
|
||||
|
||||
#if defined(__WIN32__) && !defined(HAVE_LIBC)
|
||||
SDL_DYNAPI_PROC(SDL_Thread*,SDL_CreateThread,(SDL_ThreadFunction a, const char *b, void *c, pfnSDL_CurrentBeginThread d, pfnSDL_CurrentEndThread e),(a,b,c,d,e),return)
|
||||
#else
|
||||
SDL_DYNAPI_PROC(SDL_Thread*,SDL_CreateThread,(SDL_ThreadFunction a, const char *b, void *c),(a,b,c),return)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STDIO_H
|
||||
SDL_DYNAPI_PROC(SDL_RWops*,SDL_RWFromFP,(FILE *a, SDL_bool b),(a,b),return)
|
||||
#else
|
||||
SDL_DYNAPI_PROC(SDL_RWops*,SDL_RWFromFP,(void *a, SDL_bool b),(a,b),return)
|
||||
#endif
|
||||
|
||||
/* so annoying. */
|
||||
#if defined(__thumb__) && (defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__))
|
||||
SDL_DYNAPI_PROC(void,SDL_MemoryBarrierRelease,(void),(),)
|
||||
SDL_DYNAPI_PROC(void,SDL_MemoryBarrierAcquire,(void),(),)
|
||||
#endif
|
||||
|
||||
#ifdef __WIN32__
|
||||
SDL_DYNAPI_PROC(int,SDL_RegisterApp,(char *a, Uint32 b, void *c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_UnregisterApp,(void),(),)
|
||||
SDL_DYNAPI_PROC(int,SDL_Direct3D9GetAdapterIndex,(int a),(a),return)
|
||||
SDL_DYNAPI_PROC(IDirect3DDevice9*,SDL_RenderGetD3D9Device,(SDL_Renderer *a),(a),return)
|
||||
#endif
|
||||
|
||||
#if defined(__IPHONEOS__) && __IPHONEOS__
|
||||
SDL_DYNAPI_PROC(int,SDL_iPhoneSetAnimationCallback,(SDL_Window *a, int b, void c, void *d),(a,b,c,d),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_iPhoneSetEventPump,(SDL_bool a),(a),)
|
||||
#endif
|
||||
|
||||
#if defined(__ANDROID__) && __ANDROID__
|
||||
SDL_DYNAPI_PROC(void*,SDL_AndroidGetJNIEnv,(void),(),return)
|
||||
SDL_DYNAPI_PROC(void*,SDL_AndroidGetActivity,(void),(),return)
|
||||
SDL_DYNAPI_PROC(const char*,SDL_AndroidGetInternalStoragePath,(void),(),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_AndroidGetExternalStorageState,(void),(),return)
|
||||
SDL_DYNAPI_PROC(const char*,SDL_AndroidGetExternalStoragePath,(void),(),return)
|
||||
#endif
|
||||
|
||||
SDL_DYNAPI_PROC(int,SDL_Init,(Uint32 a),(a),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_InitSubSystem,(Uint32 a),(a),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_QuitSubSystem,(Uint32 a),(a),)
|
||||
SDL_DYNAPI_PROC(Uint32,SDL_WasInit,(Uint32 a),(a),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_Quit,(void),(),)
|
||||
SDL_DYNAPI_PROC(SDL_assert_state,SDL_ReportAssertion,(SDL_assert_data *a, const char *b, const char *c, int d),(a,b,c,d),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_SetAssertionHandler,(SDL_AssertionHandler a, void *b),(a,b),)
|
||||
SDL_DYNAPI_PROC(const SDL_assert_data*,SDL_GetAssertionReport,(void),(),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_ResetAssertionReport,(void),(),)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_AtomicTryLock,(SDL_SpinLock *a),(a),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_AtomicLock,(SDL_SpinLock *a),(a),)
|
||||
SDL_DYNAPI_PROC(void,SDL_AtomicUnlock,(SDL_SpinLock *a),(a),)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_AtomicCAS,(SDL_atomic_t *a, int b, int c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_AtomicSet,(SDL_atomic_t *a, int b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_AtomicGet,(SDL_atomic_t *a),(a),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_AtomicAdd,(SDL_atomic_t *a, int b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_AtomicCASPtr,(void **a, void *b, void *c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(void*,SDL_AtomicSetPtr,(void **a, void *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(void*,SDL_AtomicGetPtr,(void **a),(a),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_GetNumAudioDrivers,(void),(),return)
|
||||
SDL_DYNAPI_PROC(const char*,SDL_GetAudioDriver,(int a),(a),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_AudioInit,(const char *a),(a),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_AudioQuit,(void),(),)
|
||||
SDL_DYNAPI_PROC(const char*,SDL_GetCurrentAudioDriver,(void),(),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_OpenAudio,(SDL_AudioSpec *a, SDL_AudioSpec *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_GetNumAudioDevices,(int a),(a),return)
|
||||
SDL_DYNAPI_PROC(const char*,SDL_GetAudioDeviceName,(int a, int b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(SDL_AudioDeviceID,SDL_OpenAudioDevice,(const char *a, int b, const SDL_AudioSpec *c, SDL_AudioSpec *d, int e),(a,b,c,d,e),return)
|
||||
SDL_DYNAPI_PROC(SDL_AudioStatus,SDL_GetAudioStatus,(void),(),return)
|
||||
SDL_DYNAPI_PROC(SDL_AudioStatus,SDL_GetAudioDeviceStatus,(SDL_AudioDeviceID a),(a),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_PauseAudio,(int a),(a),)
|
||||
SDL_DYNAPI_PROC(void,SDL_PauseAudioDevice,(SDL_AudioDeviceID a, int b),(a,b),)
|
||||
SDL_DYNAPI_PROC(SDL_AudioSpec*,SDL_LoadWAV_RW,(SDL_RWops *a, int b, SDL_AudioSpec *c, Uint8 **d, Uint32 *e),(a,b,c,d,e),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_FreeWAV,(Uint8 *a),(a),)
|
||||
SDL_DYNAPI_PROC(int,SDL_BuildAudioCVT,(SDL_AudioCVT *a, SDL_AudioFormat b, Uint8 c, int d, SDL_AudioFormat e, Uint8 f, int g),(a,b,c,d,e,f,g),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_ConvertAudio,(SDL_AudioCVT *a),(a),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_MixAudio,(Uint8 *a, const Uint8 *b, Uint32 c, int d),(a,b,c,d),)
|
||||
SDL_DYNAPI_PROC(void,SDL_MixAudioFormat,(Uint8 *a, const Uint8 *b, SDL_AudioFormat c, Uint32 d, int e),(a,b,c,d,e),)
|
||||
SDL_DYNAPI_PROC(void,SDL_LockAudio,(void),(),)
|
||||
SDL_DYNAPI_PROC(void,SDL_LockAudioDevice,(SDL_AudioDeviceID a),(a),)
|
||||
SDL_DYNAPI_PROC(void,SDL_UnlockAudio,(void),(),)
|
||||
SDL_DYNAPI_PROC(void,SDL_UnlockAudioDevice,(SDL_AudioDeviceID a),(a),)
|
||||
SDL_DYNAPI_PROC(void,SDL_CloseAudio,(void),(),)
|
||||
SDL_DYNAPI_PROC(void,SDL_CloseAudioDevice,(SDL_AudioDeviceID a),(a),)
|
||||
SDL_DYNAPI_PROC(int,SDL_SetClipboardText,(const char *a),(a),return)
|
||||
SDL_DYNAPI_PROC(char*,SDL_GetClipboardText,(void),(),return)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_HasClipboardText,(void),(),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_GetCPUCount,(void),(),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_GetCPUCacheLineSize,(void),(),return)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_HasRDTSC,(void),(),return)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_HasAltiVec,(void),(),return)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_HasMMX,(void),(),return)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_Has3DNow,(void),(),return)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_HasSSE,(void),(),return)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_HasSSE2,(void),(),return)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_HasSSE3,(void),(),return)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_HasSSE41,(void),(),return)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_HasSSE42,(void),(),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_GetSystemRAM,(void),(),return)
|
||||
SDL_DYNAPI_PROC(const char*,SDL_GetError,(void),(),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_ClearError,(void),(),)
|
||||
SDL_DYNAPI_PROC(int,SDL_Error,(SDL_errorcode a),(a),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_PumpEvents,(void),(),)
|
||||
SDL_DYNAPI_PROC(int,SDL_PeepEvents,(SDL_Event *a, int b, SDL_eventaction c, Uint32 d, Uint32 e),(a,b,c,d,e),return)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_HasEvent,(Uint32 a),(a),return)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_HasEvents,(Uint32 a, Uint32 b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_FlushEvent,(Uint32 a),(a),)
|
||||
SDL_DYNAPI_PROC(void,SDL_FlushEvents,(Uint32 a, Uint32 b),(a,b),)
|
||||
SDL_DYNAPI_PROC(int,SDL_PollEvent,(SDL_Event *a),(a),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_WaitEvent,(SDL_Event *a),(a),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_WaitEventTimeout,(SDL_Event *a, int b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_PushEvent,(SDL_Event *a),(a),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_SetEventFilter,(SDL_EventFilter a, void *b),(a,b),)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_GetEventFilter,(SDL_EventFilter *a, void **b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_AddEventWatch,(SDL_EventFilter a, void *b),(a,b),)
|
||||
SDL_DYNAPI_PROC(void,SDL_DelEventWatch,(SDL_EventFilter a, void *b),(a,b),)
|
||||
SDL_DYNAPI_PROC(void,SDL_FilterEvents,(SDL_EventFilter a, void *b),(a,b),)
|
||||
SDL_DYNAPI_PROC(Uint8,SDL_EventState,(Uint32 a, int b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(Uint32,SDL_RegisterEvents,(int a),(a),return)
|
||||
SDL_DYNAPI_PROC(char*,SDL_GetBasePath,(void),(),return)
|
||||
SDL_DYNAPI_PROC(char*,SDL_GetPrefPath,(const char *a, const char *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_GameControllerAddMapping,(const char *a),(a),return)
|
||||
SDL_DYNAPI_PROC(char*,SDL_GameControllerMappingForGUID,(SDL_JoystickGUID a),(a),return)
|
||||
SDL_DYNAPI_PROC(char*,SDL_GameControllerMapping,(SDL_GameController *a),(a),return)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_IsGameController,(int a),(a),return)
|
||||
SDL_DYNAPI_PROC(const char*,SDL_GameControllerNameForIndex,(int a),(a),return)
|
||||
SDL_DYNAPI_PROC(SDL_GameController*,SDL_GameControllerOpen,(int a),(a),return)
|
||||
SDL_DYNAPI_PROC(const char*,SDL_GameControllerName,(SDL_GameController *a),(a),return)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_GameControllerGetAttached,(SDL_GameController *a),(a),return)
|
||||
SDL_DYNAPI_PROC(SDL_Joystick*,SDL_GameControllerGetJoystick,(SDL_GameController *a),(a),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_GameControllerEventState,(int a),(a),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_GameControllerUpdate,(void),(),)
|
||||
SDL_DYNAPI_PROC(SDL_GameControllerAxis,SDL_GameControllerGetAxisFromString,(const char *a),(a),return)
|
||||
SDL_DYNAPI_PROC(const char*,SDL_GameControllerGetStringForAxis,(SDL_GameControllerAxis a),(a),return)
|
||||
SDL_DYNAPI_PROC(SDL_GameControllerButtonBind,SDL_GameControllerGetBindForAxis,(SDL_GameController *a, SDL_GameControllerAxis b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(Sint16,SDL_GameControllerGetAxis,(SDL_GameController *a, SDL_GameControllerAxis b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(SDL_GameControllerButton,SDL_GameControllerGetButtonFromString,(const char *a),(a),return)
|
||||
SDL_DYNAPI_PROC(const char*,SDL_GameControllerGetStringForButton,(SDL_GameControllerButton a),(a),return)
|
||||
SDL_DYNAPI_PROC(SDL_GameControllerButtonBind,SDL_GameControllerGetBindForButton,(SDL_GameController *a, SDL_GameControllerButton b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(Uint8,SDL_GameControllerGetButton,(SDL_GameController *a, SDL_GameControllerButton b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_GameControllerClose,(SDL_GameController *a),(a),)
|
||||
SDL_DYNAPI_PROC(int,SDL_RecordGesture,(SDL_TouchID a),(a),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_SaveAllDollarTemplates,(SDL_RWops *a),(a),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_SaveDollarTemplate,(SDL_GestureID a, SDL_RWops *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_LoadDollarTemplates,(SDL_TouchID a, SDL_RWops *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_NumHaptics,(void),(),return)
|
||||
SDL_DYNAPI_PROC(const char*,SDL_HapticName,(int a),(a),return)
|
||||
SDL_DYNAPI_PROC(SDL_Haptic*,SDL_HapticOpen,(int a),(a),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_HapticOpened,(int a),(a),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_HapticIndex,(SDL_Haptic *a),(a),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_MouseIsHaptic,(void),(),return)
|
||||
SDL_DYNAPI_PROC(SDL_Haptic*,SDL_HapticOpenFromMouse,(void),(),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_JoystickIsHaptic,(SDL_Joystick *a),(a),return)
|
||||
SDL_DYNAPI_PROC(SDL_Haptic*,SDL_HapticOpenFromJoystick,(SDL_Joystick *a),(a),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_HapticClose,(SDL_Haptic *a),(a),)
|
||||
SDL_DYNAPI_PROC(int,SDL_HapticNumEffects,(SDL_Haptic *a),(a),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_HapticNumEffectsPlaying,(SDL_Haptic *a),(a),return)
|
||||
SDL_DYNAPI_PROC(unsigned int,SDL_HapticQuery,(SDL_Haptic *a),(a),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_HapticNumAxes,(SDL_Haptic *a),(a),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_HapticEffectSupported,(SDL_Haptic *a, SDL_HapticEffect *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_HapticNewEffect,(SDL_Haptic *a, SDL_HapticEffect *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_HapticUpdateEffect,(SDL_Haptic *a, int b, SDL_HapticEffect *c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_HapticRunEffect,(SDL_Haptic *a, int b, Uint32 c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_HapticStopEffect,(SDL_Haptic *a, int b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_HapticDestroyEffect,(SDL_Haptic *a, int b),(a,b),)
|
||||
SDL_DYNAPI_PROC(int,SDL_HapticGetEffectStatus,(SDL_Haptic *a, int b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_HapticSetGain,(SDL_Haptic *a, int b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_HapticSetAutocenter,(SDL_Haptic *a, int b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_HapticPause,(SDL_Haptic *a),(a),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_HapticUnpause,(SDL_Haptic *a),(a),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_HapticStopAll,(SDL_Haptic *a),(a),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_HapticRumbleSupported,(SDL_Haptic *a),(a),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_HapticRumbleInit,(SDL_Haptic *a),(a),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_HapticRumblePlay,(SDL_Haptic *a, float b, Uint32 c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_HapticRumbleStop,(SDL_Haptic *a),(a),return)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_SetHintWithPriority,(const char *a, const char *b, SDL_HintPriority c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_SetHint,(const char *a, const char *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(const char*,SDL_GetHint,(const char *a),(a),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_AddHintCallback,(const char *a, SDL_HintCallback b, void *c),(a,b,c),)
|
||||
SDL_DYNAPI_PROC(void,SDL_DelHintCallback,(const char *a, SDL_HintCallback b, void *c),(a,b,c),)
|
||||
SDL_DYNAPI_PROC(void,SDL_ClearHints,(void),(),)
|
||||
SDL_DYNAPI_PROC(int,SDL_NumJoysticks,(void),(),return)
|
||||
SDL_DYNAPI_PROC(const char*,SDL_JoystickNameForIndex,(int a),(a),return)
|
||||
SDL_DYNAPI_PROC(SDL_Joystick*,SDL_JoystickOpen,(int a),(a),return)
|
||||
SDL_DYNAPI_PROC(const char*,SDL_JoystickName,(SDL_Joystick *a),(a),return)
|
||||
SDL_DYNAPI_PROC(SDL_JoystickGUID,SDL_JoystickGetDeviceGUID,(int a),(a),return)
|
||||
SDL_DYNAPI_PROC(SDL_JoystickGUID,SDL_JoystickGetGUID,(SDL_Joystick *a),(a),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_JoystickGetGUIDString,(SDL_JoystickGUID a, char *b, int c),(a,b,c),)
|
||||
SDL_DYNAPI_PROC(SDL_JoystickGUID,SDL_JoystickGetGUIDFromString,(const char *a),(a),return)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_JoystickGetAttached,(SDL_Joystick *a),(a),return)
|
||||
SDL_DYNAPI_PROC(SDL_JoystickID,SDL_JoystickInstanceID,(SDL_Joystick *a),(a),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_JoystickNumAxes,(SDL_Joystick *a),(a),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_JoystickNumBalls,(SDL_Joystick *a),(a),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_JoystickNumHats,(SDL_Joystick *a),(a),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_JoystickNumButtons,(SDL_Joystick *a),(a),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_JoystickUpdate,(void),(),)
|
||||
SDL_DYNAPI_PROC(int,SDL_JoystickEventState,(int a),(a),return)
|
||||
SDL_DYNAPI_PROC(Sint16,SDL_JoystickGetAxis,(SDL_Joystick *a, int b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(Uint8,SDL_JoystickGetHat,(SDL_Joystick *a, int b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_JoystickGetBall,(SDL_Joystick *a, int b, int *c, int *d),(a,b,c,d),return)
|
||||
SDL_DYNAPI_PROC(Uint8,SDL_JoystickGetButton,(SDL_Joystick *a, int b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_JoystickClose,(SDL_Joystick *a),(a),)
|
||||
SDL_DYNAPI_PROC(SDL_Window*,SDL_GetKeyboardFocus,(void),(),return)
|
||||
SDL_DYNAPI_PROC(const Uint8*,SDL_GetKeyboardState,(int *a),(a),return)
|
||||
SDL_DYNAPI_PROC(SDL_Keymod,SDL_GetModState,(void),(),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_SetModState,(SDL_Keymod a),(a),)
|
||||
SDL_DYNAPI_PROC(SDL_Keycode,SDL_GetKeyFromScancode,(SDL_Scancode a),(a),return)
|
||||
SDL_DYNAPI_PROC(SDL_Scancode,SDL_GetScancodeFromKey,(SDL_Keycode a),(a),return)
|
||||
SDL_DYNAPI_PROC(const char*,SDL_GetScancodeName,(SDL_Scancode a),(a),return)
|
||||
SDL_DYNAPI_PROC(SDL_Scancode,SDL_GetScancodeFromName,(const char *a),(a),return)
|
||||
SDL_DYNAPI_PROC(const char*,SDL_GetKeyName,(SDL_Keycode a),(a),return)
|
||||
SDL_DYNAPI_PROC(SDL_Keycode,SDL_GetKeyFromName,(const char *a),(a),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_StartTextInput,(void),(),)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_IsTextInputActive,(void),(),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_StopTextInput,(void),(),)
|
||||
SDL_DYNAPI_PROC(void,SDL_SetTextInputRect,(SDL_Rect *a),(a),)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_HasScreenKeyboardSupport,(void),(),return)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_IsScreenKeyboardShown,(SDL_Window *a),(a),return)
|
||||
SDL_DYNAPI_PROC(void*,SDL_LoadObject,(const char *a),(a),return)
|
||||
SDL_DYNAPI_PROC(void*,SDL_LoadFunction,(void *a, const char *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_UnloadObject,(void *a),(a),)
|
||||
SDL_DYNAPI_PROC(void,SDL_LogSetAllPriority,(SDL_LogPriority a),(a),)
|
||||
SDL_DYNAPI_PROC(void,SDL_LogSetPriority,(int a, SDL_LogPriority b),(a,b),)
|
||||
SDL_DYNAPI_PROC(SDL_LogPriority,SDL_LogGetPriority,(int a),(a),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_LogResetPriorities,(void),(),)
|
||||
SDL_DYNAPI_PROC(void,SDL_LogMessageV,(int a, SDL_LogPriority b, const char *c, va_list d),(a,b,c,d),)
|
||||
SDL_DYNAPI_PROC(void,SDL_LogGetOutputFunction,(SDL_LogOutputFunction *a, void **b),(a,b),)
|
||||
SDL_DYNAPI_PROC(void,SDL_LogSetOutputFunction,(SDL_LogOutputFunction a, void *b),(a,b),)
|
||||
SDL_DYNAPI_PROC(void,SDL_SetMainReady,(void),(),)
|
||||
SDL_DYNAPI_PROC(int,SDL_ShowMessageBox,(const SDL_MessageBoxData *a, int *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_ShowSimpleMessageBox,(Uint32 a, const char *b, const char *c, SDL_Window *d),(a,b,c,d),return)
|
||||
SDL_DYNAPI_PROC(SDL_Window*,SDL_GetMouseFocus,(void),(),return)
|
||||
SDL_DYNAPI_PROC(Uint32,SDL_GetMouseState,(int *a, int *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(Uint32,SDL_GetRelativeMouseState,(int *a, int *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_WarpMouseInWindow,(SDL_Window *a, int b, int c),(a,b,c),)
|
||||
SDL_DYNAPI_PROC(int,SDL_SetRelativeMouseMode,(SDL_bool a),(a),return)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_GetRelativeMouseMode,(void),(),return)
|
||||
SDL_DYNAPI_PROC(SDL_Cursor*,SDL_CreateCursor,(const Uint8 *a, const Uint8 *b, int c, int d, int e, int f),(a,b,c,d,e,f),return)
|
||||
SDL_DYNAPI_PROC(SDL_Cursor*,SDL_CreateColorCursor,(SDL_Surface *a, int b, int c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(SDL_Cursor*,SDL_CreateSystemCursor,(SDL_SystemCursor a),(a),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_SetCursor,(SDL_Cursor *a),(a),)
|
||||
SDL_DYNAPI_PROC(SDL_Cursor*,SDL_GetCursor,(void),(),return)
|
||||
SDL_DYNAPI_PROC(SDL_Cursor*,SDL_GetDefaultCursor,(void),(),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_FreeCursor,(SDL_Cursor *a),(a),)
|
||||
SDL_DYNAPI_PROC(int,SDL_ShowCursor,(int a),(a),return)
|
||||
SDL_DYNAPI_PROC(SDL_mutex*,SDL_CreateMutex,(void),(),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_LockMutex,(SDL_mutex *a),(a),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_TryLockMutex,(SDL_mutex *a),(a),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_UnlockMutex,(SDL_mutex *a),(a),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_DestroyMutex,(SDL_mutex *a),(a),)
|
||||
SDL_DYNAPI_PROC(SDL_sem*,SDL_CreateSemaphore,(Uint32 a),(a),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_DestroySemaphore,(SDL_sem *a),(a),)
|
||||
SDL_DYNAPI_PROC(int,SDL_SemWait,(SDL_sem *a),(a),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_SemTryWait,(SDL_sem *a),(a),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_SemWaitTimeout,(SDL_sem *a, Uint32 b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_SemPost,(SDL_sem *a),(a),return)
|
||||
SDL_DYNAPI_PROC(Uint32,SDL_SemValue,(SDL_sem *a),(a),return)
|
||||
SDL_DYNAPI_PROC(SDL_cond*,SDL_CreateCond,(void),(),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_DestroyCond,(SDL_cond *a),(a),)
|
||||
SDL_DYNAPI_PROC(int,SDL_CondSignal,(SDL_cond *a),(a),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_CondBroadcast,(SDL_cond *a),(a),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_CondWait,(SDL_cond *a, SDL_mutex *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_CondWaitTimeout,(SDL_cond *a, SDL_mutex *b, Uint32 c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(const char*,SDL_GetPixelFormatName,(Uint32 a),(a),return)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_PixelFormatEnumToMasks,(Uint32 a, int *b, Uint32 *c, Uint32 *d, Uint32 *e, Uint32 *f),(a,b,c,d,e,f),return)
|
||||
SDL_DYNAPI_PROC(Uint32,SDL_MasksToPixelFormatEnum,(int a, Uint32 b, Uint32 c, Uint32 d, Uint32 e),(a,b,c,d,e),return)
|
||||
SDL_DYNAPI_PROC(SDL_PixelFormat*,SDL_AllocFormat,(Uint32 a),(a),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_FreeFormat,(SDL_PixelFormat *a),(a),)
|
||||
SDL_DYNAPI_PROC(SDL_Palette*,SDL_AllocPalette,(int a),(a),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_SetPixelFormatPalette,(SDL_PixelFormat *a, SDL_Palette *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_SetPaletteColors,(SDL_Palette *a, const SDL_Color *b, int c, int d),(a,b,c,d),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_FreePalette,(SDL_Palette *a),(a),)
|
||||
SDL_DYNAPI_PROC(Uint32,SDL_MapRGB,(const SDL_PixelFormat *a, Uint8 b, Uint8 c, Uint8 d),(a,b,c,d),return)
|
||||
SDL_DYNAPI_PROC(Uint32,SDL_MapRGBA,(const SDL_PixelFormat *a, Uint8 b, Uint8 c, Uint8 d, Uint8 e),(a,b,c,d,e),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_GetRGB,(Uint32 a, const SDL_PixelFormat *b, Uint8 *c, Uint8 *d, Uint8 *e),(a,b,c,d,e),)
|
||||
SDL_DYNAPI_PROC(void,SDL_GetRGBA,(Uint32 a, const SDL_PixelFormat *b, Uint8 *c, Uint8 *d, Uint8 *e, Uint8 *f),(a,b,c,d,e,f),)
|
||||
SDL_DYNAPI_PROC(void,SDL_CalculateGammaRamp,(float a, Uint16 *b),(a,b),)
|
||||
SDL_DYNAPI_PROC(const char*,SDL_GetPlatform,(void),(),return)
|
||||
SDL_DYNAPI_PROC(SDL_PowerState,SDL_GetPowerInfo,(int *a, int *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_HasIntersection,(const SDL_Rect *a, const SDL_Rect *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_IntersectRect,(const SDL_Rect *a, const SDL_Rect *b, SDL_Rect *c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_UnionRect,(const SDL_Rect *a, const SDL_Rect *b, SDL_Rect *c),(a,b,c),)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_EnclosePoints,(const SDL_Point *a, int b, const SDL_Rect *c, SDL_Rect *d),(a,b,c,d),return)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_IntersectRectAndLine,(const SDL_Rect *a, int *b, int *c, int *d, int *e),(a,b,c,d,e),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_GetNumRenderDrivers,(void),(),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_GetRenderDriverInfo,(int a, SDL_RendererInfo *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_CreateWindowAndRenderer,(int a, int b, Uint32 c, SDL_Window **d, SDL_Renderer **e),(a,b,c,d,e),return)
|
||||
SDL_DYNAPI_PROC(SDL_Renderer*,SDL_CreateRenderer,(SDL_Window *a, int b, Uint32 c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(SDL_Renderer*,SDL_CreateSoftwareRenderer,(SDL_Surface *a),(a),return)
|
||||
SDL_DYNAPI_PROC(SDL_Renderer*,SDL_GetRenderer,(SDL_Window *a),(a),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_GetRendererInfo,(SDL_Renderer *a, SDL_RendererInfo *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_GetRendererOutputSize,(SDL_Renderer *a, int *b, int *c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(SDL_Texture*,SDL_CreateTexture,(SDL_Renderer *a, Uint32 b, int c, int d, int e),(a,b,c,d,e),return)
|
||||
SDL_DYNAPI_PROC(SDL_Texture*,SDL_CreateTextureFromSurface,(SDL_Renderer *a, SDL_Surface *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_QueryTexture,(SDL_Texture *a, Uint32 *b, int *c, int *d, int *e),(a,b,c,d,e),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_SetTextureColorMod,(SDL_Texture *a, Uint8 b, Uint8 c, Uint8 d),(a,b,c,d),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_GetTextureColorMod,(SDL_Texture *a, Uint8 *b, Uint8 *c, Uint8 *d),(a,b,c,d),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_SetTextureAlphaMod,(SDL_Texture *a, Uint8 b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_GetTextureAlphaMod,(SDL_Texture *a, Uint8 *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_SetTextureBlendMode,(SDL_Texture *a, SDL_BlendMode b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_GetTextureBlendMode,(SDL_Texture *a, SDL_BlendMode *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_UpdateTexture,(SDL_Texture *a, const SDL_Rect *b, const void *c, int d),(a,b,c,d),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_UpdateYUVTexture,(SDL_Texture *a, const SDL_Rect *b, const Uint8 *c, int d, const Uint8 *e, int f, const Uint8 *g, int h),(a,b,c,d,e,f,g,h),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_LockTexture,(SDL_Texture *a, const SDL_Rect *b, void **c, int *d),(a,b,c,d),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_UnlockTexture,(SDL_Texture *a),(a),)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_RenderTargetSupported,(SDL_Renderer *a),(a),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_SetRenderTarget,(SDL_Renderer *a, SDL_Texture *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(SDL_Texture*,SDL_GetRenderTarget,(SDL_Renderer *a),(a),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_RenderSetLogicalSize,(SDL_Renderer *a, int b, int c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_RenderGetLogicalSize,(SDL_Renderer *a, int *b, int *c),(a,b,c),)
|
||||
SDL_DYNAPI_PROC(int,SDL_RenderSetViewport,(SDL_Renderer *a, const SDL_Rect *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_RenderGetViewport,(SDL_Renderer *a, SDL_Rect *b),(a,b),)
|
||||
SDL_DYNAPI_PROC(int,SDL_RenderSetClipRect,(SDL_Renderer *a, const SDL_Rect *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_RenderGetClipRect,(SDL_Renderer *a, SDL_Rect *b),(a,b),)
|
||||
SDL_DYNAPI_PROC(int,SDL_RenderSetScale,(SDL_Renderer *a, float b, float c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_RenderGetScale,(SDL_Renderer *a, float *b, float *c),(a,b,c),)
|
||||
SDL_DYNAPI_PROC(int,SDL_SetRenderDrawColor,(SDL_Renderer *a, Uint8 b, Uint8 c, Uint8 d, Uint8 e),(a,b,c,d,e),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_GetRenderDrawColor,(SDL_Renderer *a, Uint8 *b, Uint8 *c, Uint8 *d, Uint8 *e),(a,b,c,d,e),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_SetRenderDrawBlendMode,(SDL_Renderer *a, SDL_BlendMode b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_GetRenderDrawBlendMode,(SDL_Renderer *a, SDL_BlendMode *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_RenderClear,(SDL_Renderer *a),(a),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_RenderDrawPoint,(SDL_Renderer *a, int b, int c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_RenderDrawPoints,(SDL_Renderer *a, const SDL_Point *b, int c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_RenderDrawLine,(SDL_Renderer *a, int b, int c, int d, int e),(a,b,c,d,e),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_RenderDrawLines,(SDL_Renderer *a, const SDL_Point *b, int c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_RenderDrawRect,(SDL_Renderer *a, const SDL_Rect *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_RenderDrawRects,(SDL_Renderer *a, const SDL_Rect *b, int c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_RenderFillRect,(SDL_Renderer *a, const SDL_Rect *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_RenderFillRects,(SDL_Renderer *a, const SDL_Rect *b, int c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_RenderCopy,(SDL_Renderer *a, SDL_Texture *b, const SDL_Rect *c, const SDL_Rect *d),(a,b,c,d),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_RenderCopyEx,(SDL_Renderer *a, SDL_Texture *b, const SDL_Rect *c, const SDL_Rect *d, const double e, const SDL_Point *f, const SDL_RendererFlip g),(a,b,c,d,e,f,g),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_RenderReadPixels,(SDL_Renderer *a, const SDL_Rect *b, Uint32 c, void *d, int e),(a,b,c,d,e),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_RenderPresent,(SDL_Renderer *a),(a),)
|
||||
SDL_DYNAPI_PROC(void,SDL_DestroyTexture,(SDL_Texture *a),(a),)
|
||||
SDL_DYNAPI_PROC(void,SDL_DestroyRenderer,(SDL_Renderer *a),(a),)
|
||||
SDL_DYNAPI_PROC(int,SDL_GL_BindTexture,(SDL_Texture *a, float *b, float *c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_GL_UnbindTexture,(SDL_Texture *a),(a),return)
|
||||
SDL_DYNAPI_PROC(SDL_RWops*,SDL_RWFromFile,(const char *a, const char *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(SDL_RWops*,SDL_RWFromMem,(void *a, int b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(SDL_RWops*,SDL_RWFromConstMem,(const void *a, int b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(SDL_RWops*,SDL_AllocRW,(void),(),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_FreeRW,(SDL_RWops *a),(a),)
|
||||
SDL_DYNAPI_PROC(Uint8,SDL_ReadU8,(SDL_RWops *a),(a),return)
|
||||
SDL_DYNAPI_PROC(Uint16,SDL_ReadLE16,(SDL_RWops *a),(a),return)
|
||||
SDL_DYNAPI_PROC(Uint16,SDL_ReadBE16,(SDL_RWops *a),(a),return)
|
||||
SDL_DYNAPI_PROC(Uint32,SDL_ReadLE32,(SDL_RWops *a),(a),return)
|
||||
SDL_DYNAPI_PROC(Uint32,SDL_ReadBE32,(SDL_RWops *a),(a),return)
|
||||
SDL_DYNAPI_PROC(Uint64,SDL_ReadLE64,(SDL_RWops *a),(a),return)
|
||||
SDL_DYNAPI_PROC(Uint64,SDL_ReadBE64,(SDL_RWops *a),(a),return)
|
||||
SDL_DYNAPI_PROC(size_t,SDL_WriteU8,(SDL_RWops *a, Uint8 b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(size_t,SDL_WriteLE16,(SDL_RWops *a, Uint16 b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(size_t,SDL_WriteBE16,(SDL_RWops *a, Uint16 b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(size_t,SDL_WriteLE32,(SDL_RWops *a, Uint32 b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(size_t,SDL_WriteBE32,(SDL_RWops *a, Uint32 b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(size_t,SDL_WriteLE64,(SDL_RWops *a, Uint64 b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(size_t,SDL_WriteBE64,(SDL_RWops *a, Uint64 b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(SDL_Window*,SDL_CreateShapedWindow,(const char *a, unsigned int b, unsigned int c, unsigned int d, unsigned int e, Uint32 f),(a,b,c,d,e,f),return)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_IsShapedWindow,(const SDL_Window *a),(a),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_SetWindowShape,(SDL_Window *a, SDL_Surface *b, SDL_WindowShapeMode *c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_GetShapedWindowMode,(SDL_Window *a, SDL_WindowShapeMode *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(void*,SDL_malloc,(size_t a),(a),return)
|
||||
SDL_DYNAPI_PROC(void*,SDL_calloc,(size_t a, size_t b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(void*,SDL_realloc,(void *a, size_t b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_free,(void *a),(a),)
|
||||
SDL_DYNAPI_PROC(char*,SDL_getenv,(const char *a),(a),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_setenv,(const char *a, const char *b, int c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_qsort,(void *a, size_t b, size_t c, int (*d)(const void *, const void *)),(a,b,c,d),)
|
||||
SDL_DYNAPI_PROC(int,SDL_abs,(int a),(a),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_isdigit,(int a),(a),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_isspace,(int a),(a),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_toupper,(int a),(a),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_tolower,(int a),(a),return)
|
||||
SDL_DYNAPI_PROC(void*,SDL_memset,(void *a, int b, size_t c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(void*,SDL_memcpy,(void *a, const void *b, size_t c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(void*,SDL_memmove,(void *a, const void *b, size_t c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_memcmp,(const void *a, const void *b, size_t c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(size_t,SDL_wcslen,(const wchar_t *a),(a),return)
|
||||
SDL_DYNAPI_PROC(size_t,SDL_wcslcpy,(wchar_t *a, const wchar_t *b, size_t c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(size_t,SDL_wcslcat,(wchar_t *a, const wchar_t *b, size_t c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(size_t,SDL_strlen,(const char *a),(a),return)
|
||||
SDL_DYNAPI_PROC(size_t,SDL_strlcpy,(char *a, const char *b, size_t c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(size_t,SDL_utf8strlcpy,(char *a, const char *b, size_t c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(size_t,SDL_strlcat,(char *a, const char *b, size_t c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(char*,SDL_strdup,(const char *a),(a),return)
|
||||
SDL_DYNAPI_PROC(char*,SDL_strrev,(char *a),(a),return)
|
||||
SDL_DYNAPI_PROC(char*,SDL_strupr,(char *a),(a),return)
|
||||
SDL_DYNAPI_PROC(char*,SDL_strlwr,(char *a),(a),return)
|
||||
SDL_DYNAPI_PROC(char*,SDL_strchr,(const char *a, int b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(char*,SDL_strrchr,(const char *a, int b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(char*,SDL_strstr,(const char *a, const char *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(char*,SDL_itoa,(int a, char *b, int c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(char*,SDL_uitoa,(unsigned int a, char *b, int c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(char*,SDL_ltoa,(long a, char *b, int c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(char*,SDL_ultoa,(unsigned long a, char *b, int c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(char*,SDL_lltoa,(Sint64 a, char *b, int c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(char*,SDL_ulltoa,(Uint64 a, char *b, int c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_atoi,(const char *a),(a),return)
|
||||
SDL_DYNAPI_PROC(double,SDL_atof,(const char *a),(a),return)
|
||||
SDL_DYNAPI_PROC(long,SDL_strtol,(const char *a, char **b, int c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(unsigned long,SDL_strtoul,(const char *a, char **b, int c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(Sint64,SDL_strtoll,(const char *a, char **b, int c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(Uint64,SDL_strtoull,(const char *a, char **b, int c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(double,SDL_strtod,(const char *a, char **b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_strcmp,(const char *a, const char *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_strncmp,(const char *a, const char *b, size_t c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_strcasecmp,(const char *a, const char *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_strncasecmp,(const char *a, const char *b, size_t c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_vsnprintf,(char *a, size_t b, const char *c, va_list d),(a,b,c,d),return)
|
||||
SDL_DYNAPI_PROC(double,SDL_acos,(double a),(a),return)
|
||||
SDL_DYNAPI_PROC(double,SDL_asin,(double a),(a),return)
|
||||
SDL_DYNAPI_PROC(double,SDL_atan,(double a),(a),return)
|
||||
SDL_DYNAPI_PROC(double,SDL_atan2,(double a, double b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(double,SDL_ceil,(double a),(a),return)
|
||||
SDL_DYNAPI_PROC(double,SDL_copysign,(double a, double b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(double,SDL_cos,(double a),(a),return)
|
||||
SDL_DYNAPI_PROC(float,SDL_cosf,(float a),(a),return)
|
||||
SDL_DYNAPI_PROC(double,SDL_fabs,(double a),(a),return)
|
||||
SDL_DYNAPI_PROC(double,SDL_floor,(double a),(a),return)
|
||||
SDL_DYNAPI_PROC(double,SDL_log,(double a),(a),return)
|
||||
SDL_DYNAPI_PROC(double,SDL_pow,(double a, double b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(double,SDL_scalbn,(double a, int b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(double,SDL_sin,(double a),(a),return)
|
||||
SDL_DYNAPI_PROC(float,SDL_sinf,(float a),(a),return)
|
||||
SDL_DYNAPI_PROC(double,SDL_sqrt,(double a),(a),return)
|
||||
SDL_DYNAPI_PROC(SDL_iconv_t,SDL_iconv_open,(const char *a, const char *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_iconv_close,(SDL_iconv_t a),(a),return)
|
||||
SDL_DYNAPI_PROC(size_t,SDL_iconv,(SDL_iconv_t a, const char **b, size_t *c, char **d, size_t *e),(a,b,c,d,e),return)
|
||||
SDL_DYNAPI_PROC(char*,SDL_iconv_string,(const char *a, const char *b, const char *c, size_t d),(a,b,c,d),return)
|
||||
SDL_DYNAPI_PROC(SDL_Surface*,SDL_CreateRGBSurface,(Uint32 a, int b, int c, int d, Uint32 e, Uint32 f, Uint32 g, Uint32 h),(a,b,c,d,e,f,g,h),return)
|
||||
SDL_DYNAPI_PROC(SDL_Surface*,SDL_CreateRGBSurfaceFrom,(void *a, int b, int c, int d, int e, Uint32 f, Uint32 g, Uint32 h, Uint32 i),(a,b,c,d,e,f,g,h,i),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_FreeSurface,(SDL_Surface *a),(a),)
|
||||
SDL_DYNAPI_PROC(int,SDL_SetSurfacePalette,(SDL_Surface *a, SDL_Palette *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_LockSurface,(SDL_Surface *a),(a),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_UnlockSurface,(SDL_Surface *a),(a),)
|
||||
SDL_DYNAPI_PROC(SDL_Surface*,SDL_LoadBMP_RW,(SDL_RWops *a, int b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_SaveBMP_RW,(SDL_Surface *a, SDL_RWops *b, int c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_SetSurfaceRLE,(SDL_Surface *a, int b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_SetColorKey,(SDL_Surface *a, int b, Uint32 c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_GetColorKey,(SDL_Surface *a, Uint32 *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_SetSurfaceColorMod,(SDL_Surface *a, Uint8 b, Uint8 c, Uint8 d),(a,b,c,d),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_GetSurfaceColorMod,(SDL_Surface *a, Uint8 *b, Uint8 *c, Uint8 *d),(a,b,c,d),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_SetSurfaceAlphaMod,(SDL_Surface *a, Uint8 b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_GetSurfaceAlphaMod,(SDL_Surface *a, Uint8 *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_SetSurfaceBlendMode,(SDL_Surface *a, SDL_BlendMode b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_GetSurfaceBlendMode,(SDL_Surface *a, SDL_BlendMode *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_SetClipRect,(SDL_Surface *a, const SDL_Rect *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_GetClipRect,(SDL_Surface *a, SDL_Rect *b),(a,b),)
|
||||
SDL_DYNAPI_PROC(SDL_Surface*,SDL_ConvertSurface,(SDL_Surface *a, const SDL_PixelFormat *b, Uint32 c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(SDL_Surface*,SDL_ConvertSurfaceFormat,(SDL_Surface *a, Uint32 b, Uint32 c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_ConvertPixels,(int a, int b, Uint32 c, const void *d, int e, Uint32 f, void *g, int h),(a,b,c,d,e,f,g,h),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_FillRect,(SDL_Surface *a, const SDL_Rect *b, Uint32 c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_FillRects,(SDL_Surface *a, const SDL_Rect *b, int c, Uint32 d),(a,b,c,d),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_UpperBlit,(SDL_Surface *a, const SDL_Rect *b, SDL_Surface *c, SDL_Rect *d),(a,b,c,d),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_LowerBlit,(SDL_Surface *a, SDL_Rect *b, SDL_Surface *c, SDL_Rect *d),(a,b,c,d),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_SoftStretch,(SDL_Surface *a, const SDL_Rect *b, SDL_Surface *c, const SDL_Rect *d),(a,b,c,d),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_UpperBlitScaled,(SDL_Surface *a, const SDL_Rect *b, SDL_Surface *c, SDL_Rect *d),(a,b,c,d),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_LowerBlitScaled,(SDL_Surface *a, SDL_Rect *b, SDL_Surface *c, SDL_Rect *d),(a,b,c,d),return)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_GetWindowWMInfo,(SDL_Window *a, SDL_SysWMinfo *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(const char*,SDL_GetThreadName,(SDL_Thread *a),(a),return)
|
||||
SDL_DYNAPI_PROC(SDL_threadID,SDL_ThreadID,(void),(),return)
|
||||
SDL_DYNAPI_PROC(SDL_threadID,SDL_GetThreadID,(SDL_Thread *a),(a),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_SetThreadPriority,(SDL_ThreadPriority a),(a),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_WaitThread,(SDL_Thread *a, int *b),(a,b),)
|
||||
SDL_DYNAPI_PROC(void,SDL_DetachThread,(SDL_Thread *a),(a),)
|
||||
SDL_DYNAPI_PROC(SDL_TLSID,SDL_TLSCreate,(void),(),return)
|
||||
SDL_DYNAPI_PROC(void*,SDL_TLSGet,(SDL_TLSID a),(a),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_TLSSet,(SDL_TLSID a, const void *b, void (*c)(void*)),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(Uint32,SDL_GetTicks,(void),(),return)
|
||||
SDL_DYNAPI_PROC(Uint64,SDL_GetPerformanceCounter,(void),(),return)
|
||||
SDL_DYNAPI_PROC(Uint64,SDL_GetPerformanceFrequency,(void),(),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_Delay,(Uint32 a),(a),)
|
||||
SDL_DYNAPI_PROC(SDL_TimerID,SDL_AddTimer,(Uint32 a, SDL_TimerCallback b, void *c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_RemoveTimer,(SDL_TimerID a),(a),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_GetNumTouchDevices,(void),(),return)
|
||||
SDL_DYNAPI_PROC(SDL_TouchID,SDL_GetTouchDevice,(int a),(a),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_GetNumTouchFingers,(SDL_TouchID a),(a),return)
|
||||
SDL_DYNAPI_PROC(SDL_Finger*,SDL_GetTouchFinger,(SDL_TouchID a, int b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_GetVersion,(SDL_version *a),(a),)
|
||||
SDL_DYNAPI_PROC(const char*,SDL_GetRevision,(void),(),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_GetRevisionNumber,(void),(),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_GetNumVideoDrivers,(void),(),return)
|
||||
SDL_DYNAPI_PROC(const char*,SDL_GetVideoDriver,(int a),(a),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_VideoInit,(const char *a),(a),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_VideoQuit,(void),(),)
|
||||
SDL_DYNAPI_PROC(const char*,SDL_GetCurrentVideoDriver,(void),(),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_GetNumVideoDisplays,(void),(),return)
|
||||
SDL_DYNAPI_PROC(const char*,SDL_GetDisplayName,(int a),(a),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_GetDisplayBounds,(int a, SDL_Rect *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_GetNumDisplayModes,(int a),(a),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_GetDisplayMode,(int a, int b, SDL_DisplayMode *c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_GetDesktopDisplayMode,(int a, SDL_DisplayMode *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_GetCurrentDisplayMode,(int a, SDL_DisplayMode *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(SDL_DisplayMode*,SDL_GetClosestDisplayMode,(int a, const SDL_DisplayMode *b, SDL_DisplayMode *c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_GetWindowDisplayIndex,(SDL_Window *a),(a),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_SetWindowDisplayMode,(SDL_Window *a, const SDL_DisplayMode *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_GetWindowDisplayMode,(SDL_Window *a, SDL_DisplayMode *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(Uint32,SDL_GetWindowPixelFormat,(SDL_Window *a),(a),return)
|
||||
SDL_DYNAPI_PROC(SDL_Window*,SDL_CreateWindow,(const char *a, int b, int c, int d, int e, Uint32 f),(a,b,c,d,e,f),return)
|
||||
SDL_DYNAPI_PROC(SDL_Window*,SDL_CreateWindowFrom,(const void *a),(a),return)
|
||||
SDL_DYNAPI_PROC(Uint32,SDL_GetWindowID,(SDL_Window *a),(a),return)
|
||||
SDL_DYNAPI_PROC(SDL_Window*,SDL_GetWindowFromID,(Uint32 a),(a),return)
|
||||
SDL_DYNAPI_PROC(Uint32,SDL_GetWindowFlags,(SDL_Window *a),(a),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_SetWindowTitle,(SDL_Window *a, const char *b),(a,b),)
|
||||
SDL_DYNAPI_PROC(const char*,SDL_GetWindowTitle,(SDL_Window *a),(a),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_SetWindowIcon,(SDL_Window *a, SDL_Surface *b),(a,b),)
|
||||
SDL_DYNAPI_PROC(void*,SDL_SetWindowData,(SDL_Window *a, const char *b, void *c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(void*,SDL_GetWindowData,(SDL_Window *a, const char *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_SetWindowPosition,(SDL_Window *a, int b, int c),(a,b,c),)
|
||||
SDL_DYNAPI_PROC(void,SDL_GetWindowPosition,(SDL_Window *a, int *b, int *c),(a,b,c),)
|
||||
SDL_DYNAPI_PROC(void,SDL_SetWindowSize,(SDL_Window *a, int b, int c),(a,b,c),)
|
||||
SDL_DYNAPI_PROC(void,SDL_GetWindowSize,(SDL_Window *a, int *b, int *c),(a,b,c),)
|
||||
SDL_DYNAPI_PROC(void,SDL_SetWindowMinimumSize,(SDL_Window *a, int b, int c),(a,b,c),)
|
||||
SDL_DYNAPI_PROC(void,SDL_GetWindowMinimumSize,(SDL_Window *a, int *b, int *c),(a,b,c),)
|
||||
SDL_DYNAPI_PROC(void,SDL_SetWindowMaximumSize,(SDL_Window *a, int b, int c),(a,b,c),)
|
||||
SDL_DYNAPI_PROC(void,SDL_GetWindowMaximumSize,(SDL_Window *a, int *b, int *c),(a,b,c),)
|
||||
SDL_DYNAPI_PROC(void,SDL_SetWindowBordered,(SDL_Window *a, SDL_bool b),(a,b),)
|
||||
SDL_DYNAPI_PROC(void,SDL_ShowWindow,(SDL_Window *a),(a),)
|
||||
SDL_DYNAPI_PROC(void,SDL_HideWindow,(SDL_Window *a),(a),)
|
||||
SDL_DYNAPI_PROC(void,SDL_RaiseWindow,(SDL_Window *a),(a),)
|
||||
SDL_DYNAPI_PROC(void,SDL_MaximizeWindow,(SDL_Window *a),(a),)
|
||||
SDL_DYNAPI_PROC(void,SDL_MinimizeWindow,(SDL_Window *a),(a),)
|
||||
SDL_DYNAPI_PROC(void,SDL_RestoreWindow,(SDL_Window *a),(a),)
|
||||
SDL_DYNAPI_PROC(int,SDL_SetWindowFullscreen,(SDL_Window *a, Uint32 b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(SDL_Surface*,SDL_GetWindowSurface,(SDL_Window *a),(a),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_UpdateWindowSurface,(SDL_Window *a),(a),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_UpdateWindowSurfaceRects,(SDL_Window *a, const SDL_Rect *b, int c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_SetWindowGrab,(SDL_Window *a, SDL_bool b),(a,b),)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_GetWindowGrab,(SDL_Window *a),(a),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_SetWindowBrightness,(SDL_Window *a, float b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(float,SDL_GetWindowBrightness,(SDL_Window *a),(a),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_SetWindowGammaRamp,(SDL_Window *a, const Uint16 *b, const Uint16 *c, const Uint16 *d),(a,b,c,d),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_GetWindowGammaRamp,(SDL_Window *a, Uint16 *b, Uint16 *c, Uint16 *d),(a,b,c,d),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_DestroyWindow,(SDL_Window *a),(a),)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_IsScreenSaverEnabled,(void),(),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_EnableScreenSaver,(void),(),)
|
||||
SDL_DYNAPI_PROC(void,SDL_DisableScreenSaver,(void),(),)
|
||||
SDL_DYNAPI_PROC(int,SDL_GL_LoadLibrary,(const char *a),(a),return)
|
||||
SDL_DYNAPI_PROC(void*,SDL_GL_GetProcAddress,(const char *a),(a),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_GL_UnloadLibrary,(void),(),)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_GL_ExtensionSupported,(const char *a),(a),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_GL_SetAttribute,(SDL_GLattr a, int b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_GL_GetAttribute,(SDL_GLattr a, int *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(SDL_GLContext,SDL_GL_CreateContext,(SDL_Window *a),(a),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_GL_MakeCurrent,(SDL_Window *a, SDL_GLContext b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(SDL_Window*,SDL_GL_GetCurrentWindow,(void),(),return)
|
||||
SDL_DYNAPI_PROC(SDL_GLContext,SDL_GL_GetCurrentContext,(void),(),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_GL_GetDrawableSize,(SDL_Window *a, int *b, int *c),(a,b,c),)
|
||||
SDL_DYNAPI_PROC(int,SDL_GL_SetSwapInterval,(int a),(a),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_GL_GetSwapInterval,(void),(),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_GL_SwapWindow,(SDL_Window *a),(a),)
|
||||
SDL_DYNAPI_PROC(void,SDL_GL_DeleteContext,(SDL_GLContext a),(a),)
|
||||
SDL_DYNAPI_PROC(int,SDL_vsscanf,(const char *a, const char *b, va_list c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_GameControllerAddMappingsFromRW,(SDL_RWops *a, int b),(a,b),return)
|
||||
Executable
+141
@@ -0,0 +1,141 @@
|
||||
#!/usr/bin/perl -w
|
||||
|
||||
# Simple DirectMedia Layer
|
||||
# Copyright (C) 1997-2013 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.
|
||||
|
||||
# WHAT IS THIS?
|
||||
# When you add a public API to SDL, please run this script, make sure the
|
||||
# output looks sane (hg diff, it adds to existing files), and commit it.
|
||||
# It keeps the dynamic API jump table operating correctly.
|
||||
|
||||
# If you wanted this to be readable, you shouldn't have used perl.
|
||||
|
||||
use warnings;
|
||||
use strict;
|
||||
use File::Basename;
|
||||
|
||||
chdir(dirname(__FILE__) . '/../..');
|
||||
my $sdl_dynapi_procs_h = "src/dynapi/SDL_dynapi_procs.h";
|
||||
my $sdl_dynapi_overrides_h = "src/dynapi/SDL_dynapi_overrides.h";
|
||||
|
||||
my %existing = ();
|
||||
if (-f $sdl_dynapi_procs_h) {
|
||||
open(SDL_DYNAPI_PROCS_H, '<', $sdl_dynapi_procs_h) or die("Can't open $sdl_dynapi_procs_h: $!\n");
|
||||
while (<SDL_DYNAPI_PROCS_H>) {
|
||||
if (/\ASDL_DYNAPI_PROC\(.*?,(.*?),/) {
|
||||
$existing{$1} = 1;
|
||||
}
|
||||
}
|
||||
close(SDL_DYNAPI_PROCS_H)
|
||||
}
|
||||
|
||||
open(SDL_DYNAPI_PROCS_H, '>>', $sdl_dynapi_procs_h) or die("Can't open $sdl_dynapi_procs_h: $!\n");
|
||||
open(SDL_DYNAPI_OVERRIDES_H, '>>', $sdl_dynapi_overrides_h) or die("Can't open $sdl_dynapi_overrides_h: $!\n");
|
||||
|
||||
opendir(HEADERS, 'include') or die("Can't open include dir: $!\n");
|
||||
while (readdir(HEADERS)) {
|
||||
next if not /\.h\Z/;
|
||||
my $header = "include/$_";
|
||||
open(HEADER, '<', $header) or die("Can't open $header: $!\n");
|
||||
while (<HEADER>) {
|
||||
chomp;
|
||||
next if not /\A\s*extern\s+DECLSPEC/;
|
||||
my $decl = "$_ ";
|
||||
if (not $decl =~ /\)\s*;/) {
|
||||
while (<HEADER>) {
|
||||
chomp;
|
||||
s/\A\s+//;
|
||||
s/\s+\Z//;
|
||||
$decl .= "$_ ";
|
||||
last if /\)\s*;/;
|
||||
}
|
||||
}
|
||||
|
||||
$decl =~ s/\s+\Z//;
|
||||
#print("DECL: [$decl]\n");
|
||||
|
||||
if ($decl =~ /\A\s*extern\s+DECLSPEC\s+(const\s+|)(unsigned\s+|)(.*?)\s*(\*?)\s*SDLCALL\s+(.*?)\s*\((.*?)\);/) {
|
||||
my $rc = "$1$2$3$4";
|
||||
my $fn = $5;
|
||||
|
||||
next if $existing{$fn}; # already slotted into the jump table.
|
||||
|
||||
my @params = split(',', $6);
|
||||
|
||||
#print("rc == '$rc', fn == '$fn', params == '$params'\n");
|
||||
|
||||
my $retstr = ($rc eq 'void') ? '' : 'return';
|
||||
my $paramstr = '(';
|
||||
my $argstr = '(';
|
||||
my $i = 0;
|
||||
foreach (@params) {
|
||||
my $str = $_;
|
||||
$str =~ s/\A\s+//;
|
||||
$str =~ s/\s+\Z//;
|
||||
#print("1PARAM: $str\n");
|
||||
if ($str eq 'void') {
|
||||
$paramstr .= 'void';
|
||||
} elsif ($str eq '...') {
|
||||
if ($i > 0) {
|
||||
$paramstr .= ', ';
|
||||
}
|
||||
$paramstr .= $str;
|
||||
} elsif ($str =~ /\A\s*((const\s+|)(unsigned\s+|)([a-zA-Z0-9_]*)\s*([\*\s]*))\s*(.*?)\Z/) {
|
||||
#print("PARSED: [$1], [$2], [$3], [$4], [$5]\n");
|
||||
my $type = $1;
|
||||
my $var = $6;
|
||||
$type =~ s/\A\s+//;
|
||||
$type =~ s/\s+\Z//;
|
||||
$var =~ s/\A\s+//;
|
||||
$var =~ s/\s+\Z//;
|
||||
$type =~ s/\s*\*\Z/*/g;
|
||||
$type =~ s/\s*(\*+)\Z/ $1/;
|
||||
#print("SPLIT: ($type, $var)\n");
|
||||
my $name = chr(ord('a') + $i);
|
||||
if ($i > 0) {
|
||||
$paramstr .= ', ';
|
||||
$argstr .= ',';
|
||||
}
|
||||
my $spc = ($type =~ /\*\Z/) ? '' : ' ';
|
||||
$paramstr .= "$type$spc$name";
|
||||
$argstr .= "$name";
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
|
||||
$paramstr = '(void' if ($i == 0); # Just to make this consistent.
|
||||
|
||||
$paramstr .= ')';
|
||||
$argstr .= ')';
|
||||
|
||||
print("NEW: $decl\n");
|
||||
print SDL_DYNAPI_PROCS_H "SDL_DYNAPI_PROC($rc,$fn,$paramstr,$argstr,$retstr)\n";
|
||||
print SDL_DYNAPI_OVERRIDES_H "#define $fn ${fn}_REAL\n";
|
||||
} else {
|
||||
print("Failed to parse decl [$decl]!\n");
|
||||
}
|
||||
}
|
||||
close(HEADER);
|
||||
}
|
||||
closedir(HEADERS);
|
||||
|
||||
close(SDL_DYNAPI_PROCS_H);
|
||||
close(SDL_DYNAPI_OVERRIDES_H);
|
||||
|
||||
# vi: set ts=4 sw=4 expandtab:
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../SDL_internal.h"
|
||||
|
||||
/* Clipboard event handling code for SDL */
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../SDL_internal.h"
|
||||
|
||||
#ifndef _SDL_clipboardevents_c_h
|
||||
#define _SDL_clipboardevents_c_h
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../SDL_internal.h"
|
||||
|
||||
/* Drag and drop event handling code for SDL */
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../SDL_internal.h"
|
||||
|
||||
#ifndef _SDL_dropevents_c_h
|
||||
#define _SDL_dropevents_c_h
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../SDL_internal.h"
|
||||
|
||||
/* General event handling code for SDL */
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../SDL_internal.h"
|
||||
|
||||
/* Useful functions and variables from SDL_events.c */
|
||||
#include "SDL_events.h"
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#include "SDL_config.h"
|
||||
#include "../SDL_internal.h"
|
||||
|
||||
/* General mouse handling code for SDL */
|
||||
|
||||
@@ -116,15 +116,14 @@ static unsigned long SDL_HashDollar(SDL_FloatPoint* points)
|
||||
}
|
||||
|
||||
|
||||
static int SaveTemplate(SDL_DollarTemplate *templ, SDL_RWops * src)
|
||||
static int SaveTemplate(SDL_DollarTemplate *templ, SDL_RWops *dst)
|
||||
{
|
||||
if (src == NULL) return 0;
|
||||
|
||||
if (dst == NULL) return 0;
|
||||
|
||||
/* No Longer storing the Hash, rehash on load */
|
||||
/* if(SDL_RWops.write(src,&(templ->hash),sizeof(templ->hash),1) != 1) return 0; */
|
||||
/* if (SDL_RWops.write(dst, &(templ->hash), sizeof(templ->hash), 1) != 1) return 0; */
|
||||
|
||||
if (SDL_RWwrite(src,templ->path,
|
||||
if (SDL_RWwrite(dst, templ->path,
|
||||
sizeof(templ->path[0]),DOLLARNPOINTS) != DOLLARNPOINTS)
|
||||
return 0;
|
||||
|
||||
@@ -132,26 +131,26 @@ static int SaveTemplate(SDL_DollarTemplate *templ, SDL_RWops * src)
|
||||
}
|
||||
|
||||
|
||||
int SDL_SaveAllDollarTemplates(SDL_RWops *src)
|
||||
int SDL_SaveAllDollarTemplates(SDL_RWops *dst)
|
||||
{
|
||||
int i,j,rtrn = 0;
|
||||
for (i = 0; i < SDL_numGestureTouches; i++) {
|
||||
SDL_GestureTouch* touch = &SDL_gestureTouch[i];
|
||||
for (j = 0; j < touch->numDollarTemplates; j++) {
|
||||
rtrn += SaveTemplate(&touch->dollarTemplate[i],src);
|
||||
rtrn += SaveTemplate(&touch->dollarTemplate[i], dst);
|
||||
}
|
||||
}
|
||||
return rtrn;
|
||||
}
|
||||
|
||||
int SDL_SaveDollarTemplate(SDL_GestureID gestureId, SDL_RWops *src)
|
||||
int SDL_SaveDollarTemplate(SDL_GestureID gestureId, SDL_RWops *dst)
|
||||
{
|
||||
int i,j;
|
||||
for (i = 0; i < SDL_numGestureTouches; i++) {
|
||||
SDL_GestureTouch* touch = &SDL_gestureTouch[i];
|
||||
for (j = 0; j < touch->numDollarTemplates; j++) {
|
||||
if (touch->dollarTemplate[i].hash == gestureId) {
|
||||
return SaveTemplate(&touch->dollarTemplate[i],src);
|
||||
return SaveTemplate(&touch->dollarTemplate[i], dst);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -198,10 +197,8 @@ static int SDL_AddDollarGesture(SDL_GestureTouch* inTouch, SDL_FloatPoint* path)
|
||||
}
|
||||
/* Use the index of the last one added. */
|
||||
return index;
|
||||
} else {
|
||||
return SDL_AddDollarGesture_one(inTouch, path);
|
||||
}
|
||||
return -1;
|
||||
return SDL_AddDollarGesture_one(inTouch, path);
|
||||
}
|
||||
|
||||
int SDL_LoadDollarTemplates(SDL_TouchID touchId, SDL_RWops *src)
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../SDL_internal.h"
|
||||
|
||||
#ifndef _SDL_gesture_c_h
|
||||
#define _SDL_gesture_c_h
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../SDL_internal.h"
|
||||
|
||||
/* General keyboard handling code for SDL */
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../SDL_internal.h"
|
||||
|
||||
#ifndef _SDL_keyboard_c_h
|
||||
#define _SDL_keyboard_c_h
|
||||
|
||||
@@ -18,11 +18,13 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../SDL_internal.h"
|
||||
|
||||
/* General mouse handling code for SDL */
|
||||
|
||||
#include "SDL_assert.h"
|
||||
#include "SDL_hints.h"
|
||||
#include "SDL_timer.h"
|
||||
#include "SDL_events.h"
|
||||
#include "SDL_events_c.h"
|
||||
#include "default_cursor.h"
|
||||
@@ -32,6 +34,8 @@
|
||||
|
||||
/* The mouse state */
|
||||
static SDL_Mouse SDL_mouse;
|
||||
static Uint32 SDL_double_click_time = 500;
|
||||
static int SDL_double_click_radius = 1;
|
||||
|
||||
static int
|
||||
SDL_PrivateSendMouseMotion(SDL_Window * window, SDL_MouseID mouseID, int relative, int x, int y);
|
||||
@@ -64,6 +68,12 @@ SDL_GetMouse(void)
|
||||
return &SDL_mouse;
|
||||
}
|
||||
|
||||
void
|
||||
SDL_SetDoubleClickTime(Uint32 interval)
|
||||
{
|
||||
SDL_double_click_time = interval;
|
||||
}
|
||||
|
||||
SDL_Window *
|
||||
SDL_GetMouseFocus(void)
|
||||
{
|
||||
@@ -196,12 +206,24 @@ SDL_PrivateSendMouseMotion(SDL_Window * window, SDL_MouseID mouseID, int relativ
|
||||
int yrel;
|
||||
int x_max = 0, y_max = 0;
|
||||
|
||||
/* relative motion is calculated regarding the system cursor last position */
|
||||
if (mouse->relative_mode_warp) {
|
||||
int center_x = 0, center_y = 0;
|
||||
SDL_GetWindowSize(window, ¢er_x, ¢er_y);
|
||||
center_x /= 2;
|
||||
center_y /= 2;
|
||||
if (x == center_x && y == center_y) {
|
||||
mouse->last_x = center_x;
|
||||
mouse->last_y = center_y;
|
||||
return 0;
|
||||
}
|
||||
SDL_WarpMouseInWindow(window, center_x, center_y);
|
||||
}
|
||||
|
||||
if (relative) {
|
||||
xrel = x;
|
||||
yrel = y;
|
||||
x = (mouse->last_x + x);
|
||||
y = (mouse->last_y + y);
|
||||
x = (mouse->last_x + xrel);
|
||||
y = (mouse->last_y + yrel);
|
||||
} else {
|
||||
xrel = x - mouse->last_x;
|
||||
yrel = y - mouse->last_y;
|
||||
@@ -216,7 +238,7 @@ SDL_PrivateSendMouseMotion(SDL_Window * window, SDL_MouseID mouseID, int relativ
|
||||
}
|
||||
|
||||
/* Update internal mouse coordinates */
|
||||
if (mouse->relative_mode == SDL_FALSE) {
|
||||
if (!mouse->relative_mode) {
|
||||
mouse->x = x;
|
||||
mouse->y = y;
|
||||
} else {
|
||||
@@ -272,6 +294,23 @@ SDL_PrivateSendMouseMotion(SDL_Window * window, SDL_MouseID mouseID, int relativ
|
||||
return posted;
|
||||
}
|
||||
|
||||
static SDL_MouseClickState *GetMouseClickState(SDL_Mouse *mouse, Uint8 button)
|
||||
{
|
||||
if (button >= mouse->num_clickstates) {
|
||||
int i, count = button + 1;
|
||||
mouse->clickstate = (SDL_MouseClickState *)SDL_realloc(mouse->clickstate, count * sizeof(*mouse->clickstate));
|
||||
if (!mouse->clickstate) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
for (i = mouse->num_clickstates; i < count; ++i) {
|
||||
SDL_zero(mouse->clickstate[i]);
|
||||
}
|
||||
mouse->num_clickstates = count;
|
||||
}
|
||||
return &mouse->clickstate[button];
|
||||
}
|
||||
|
||||
int
|
||||
SDL_SendMouseButton(SDL_Window * window, SDL_MouseID mouseID, Uint8 state, Uint8 button)
|
||||
{
|
||||
@@ -279,6 +318,8 @@ SDL_SendMouseButton(SDL_Window * window, SDL_MouseID mouseID, Uint8 state, Uint8
|
||||
int posted;
|
||||
Uint32 type;
|
||||
Uint32 buttonstate = mouse->buttonstate;
|
||||
SDL_MouseClickState *clickstate = GetMouseClickState(mouse, button);
|
||||
Uint8 click_count;
|
||||
|
||||
/* Figure out which event to perform */
|
||||
switch (state) {
|
||||
@@ -306,6 +347,27 @@ SDL_SendMouseButton(SDL_Window * window, SDL_MouseID mouseID, Uint8 state, Uint8
|
||||
}
|
||||
mouse->buttonstate = buttonstate;
|
||||
|
||||
if (clickstate) {
|
||||
if (state == SDL_PRESSED) {
|
||||
Uint32 now = SDL_GetTicks();
|
||||
|
||||
if (SDL_TICKS_PASSED(now, clickstate->last_timestamp + SDL_double_click_time) ||
|
||||
SDL_abs(mouse->x - clickstate->last_x) > SDL_double_click_radius ||
|
||||
SDL_abs(mouse->y - clickstate->last_y) > SDL_double_click_radius) {
|
||||
clickstate->click_count = 0;
|
||||
}
|
||||
clickstate->last_timestamp = now;
|
||||
clickstate->last_x = mouse->x;
|
||||
clickstate->last_y = mouse->y;
|
||||
if (clickstate->click_count < 255) {
|
||||
++clickstate->click_count;
|
||||
}
|
||||
}
|
||||
click_count = clickstate->click_count;
|
||||
} else {
|
||||
click_count = 1;
|
||||
}
|
||||
|
||||
/* Post the event, if desired */
|
||||
posted = 0;
|
||||
if (SDL_GetEventState(type) == SDL_ENABLE) {
|
||||
@@ -315,6 +377,7 @@ SDL_SendMouseButton(SDL_Window * window, SDL_MouseID mouseID, Uint8 state, Uint8
|
||||
event.button.which = mouseID;
|
||||
event.button.state = state;
|
||||
event.button.button = button;
|
||||
event.button.clicks = click_count;
|
||||
event.button.x = mouse->x;
|
||||
event.button.y = mouse->y;
|
||||
posted = (SDL_PushEvent(&event) > 0);
|
||||
@@ -362,6 +425,7 @@ SDL_MouseQuit(void)
|
||||
SDL_Cursor *cursor, *next;
|
||||
SDL_Mouse *mouse = SDL_GetMouse();
|
||||
|
||||
SDL_SetRelativeMouseMode(SDL_FALSE);
|
||||
SDL_ShowCursor(1);
|
||||
|
||||
cursor = mouse->cursors;
|
||||
@@ -375,6 +439,10 @@ SDL_MouseQuit(void)
|
||||
mouse->FreeCursor(mouse->def_cursor);
|
||||
}
|
||||
|
||||
if (mouse->clickstate) {
|
||||
SDL_free(mouse->clickstate);
|
||||
}
|
||||
|
||||
SDL_zerop(mouse);
|
||||
}
|
||||
|
||||
@@ -426,21 +494,36 @@ SDL_WarpMouseInWindow(SDL_Window * window, int x, int y)
|
||||
}
|
||||
}
|
||||
|
||||
static SDL_bool
|
||||
ShouldUseRelativeModeWarp(SDL_Mouse *mouse)
|
||||
{
|
||||
const char *hint;
|
||||
|
||||
if (!mouse->SetRelativeMouseMode) {
|
||||
return SDL_TRUE;
|
||||
}
|
||||
|
||||
hint = SDL_GetHint(SDL_HINT_MOUSE_RELATIVE_MODE_WARP);
|
||||
if (hint) {
|
||||
if (*hint == '0') {
|
||||
return SDL_FALSE;
|
||||
} else {
|
||||
return SDL_TRUE;
|
||||
}
|
||||
}
|
||||
return SDL_FALSE;
|
||||
}
|
||||
|
||||
int
|
||||
SDL_SetRelativeMouseMode(SDL_bool enabled)
|
||||
{
|
||||
SDL_Mouse *mouse = SDL_GetMouse();
|
||||
SDL_Window *focusWindow = SDL_GetKeyboardFocus();
|
||||
int original_x = mouse->x, original_y = mouse->y;
|
||||
|
||||
if (enabled == mouse->relative_mode) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!mouse->SetRelativeMouseMode) {
|
||||
return SDL_Unsupported();
|
||||
}
|
||||
|
||||
if (enabled && focusWindow) {
|
||||
/* Center it in the focused window to prevent clicks from going through
|
||||
* to background windows.
|
||||
@@ -449,23 +532,26 @@ SDL_SetRelativeMouseMode(SDL_bool enabled)
|
||||
SDL_WarpMouseInWindow(focusWindow, focusWindow->w/2, focusWindow->h/2);
|
||||
}
|
||||
|
||||
if (mouse->SetRelativeMouseMode(enabled) < 0) {
|
||||
/* Set the relative mode */
|
||||
if (!enabled && mouse->relative_mode_warp) {
|
||||
mouse->relative_mode_warp = SDL_FALSE;
|
||||
} else if (enabled && ShouldUseRelativeModeWarp(mouse)) {
|
||||
mouse->relative_mode_warp = SDL_TRUE;
|
||||
} else if (mouse->SetRelativeMouseMode(enabled) < 0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Set the relative mode */
|
||||
mouse->relative_mode = enabled;
|
||||
|
||||
if (enabled) {
|
||||
/* Save the expected mouse position */
|
||||
mouse->original_x = original_x;
|
||||
mouse->original_y = original_y;
|
||||
} else if (mouse->focus) {
|
||||
/* Restore the expected mouse position */
|
||||
SDL_WarpMouseInWindow(mouse->focus, mouse->original_x, mouse->original_y);
|
||||
if (mouse->focus) {
|
||||
SDL_UpdateWindowGrab(mouse->focus);
|
||||
|
||||
/* Put the cursor back to where the application expects it */
|
||||
if (!enabled) {
|
||||
SDL_WarpMouseInWindow(mouse->focus, mouse->x, mouse->y);
|
||||
}
|
||||
}
|
||||
|
||||
/* Flush pending mouse motion */
|
||||
/* Flush pending mouse motion - ideally we would pump events, but that's not always safe */
|
||||
SDL_FlushEvent(SDL_MOUSEMOTION);
|
||||
|
||||
/* Update cursor visibility */
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../SDL_internal.h"
|
||||
|
||||
#ifndef _SDL_mouse_c_h
|
||||
#define _SDL_mouse_c_h
|
||||
@@ -33,6 +33,13 @@ struct SDL_Cursor
|
||||
void *driverdata;
|
||||
};
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int last_x, last_y;
|
||||
Uint32 last_timestamp;
|
||||
Uint8 click_count;
|
||||
} SDL_MouseClickState;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
/* Create a cursor from a surface */
|
||||
@@ -66,8 +73,11 @@ typedef struct
|
||||
int last_x, last_y; /* the last reported x and y coordinates */
|
||||
Uint32 buttonstate;
|
||||
SDL_bool relative_mode;
|
||||
/* the x and y coordinates when relative mode was activated */
|
||||
int original_x, original_y;
|
||||
SDL_bool relative_mode_warp;
|
||||
|
||||
/* Data for double-click tracking */
|
||||
int num_clickstates;
|
||||
SDL_MouseClickState *clickstate;
|
||||
|
||||
SDL_Cursor *cursors;
|
||||
SDL_Cursor *def_cursor;
|
||||
@@ -85,6 +95,9 @@ extern int SDL_MouseInit(void);
|
||||
/* Get the mouse state structure */
|
||||
SDL_Mouse *SDL_GetMouse(void);
|
||||
|
||||
/* Set the default double-click interval */
|
||||
extern void SDL_SetDoubleClickTime(Uint32 interval);
|
||||
|
||||
/* Set the default mouse cursor */
|
||||
extern void SDL_SetDefaultCursor(SDL_Cursor * cursor);
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../SDL_internal.h"
|
||||
|
||||
/* General quit handling code for SDL */
|
||||
|
||||
|
||||
@@ -18,14 +18,14 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../SDL_internal.h"
|
||||
|
||||
#include "../video/SDL_sysvideo.h"
|
||||
|
||||
/* Useful functions and variables from SDL_sysevents.c */
|
||||
|
||||
#if defined(__BEOS__) || defined(__HAIKU__)
|
||||
/* The Be and Haiku event loops run in a separate thread */
|
||||
#if defined(__HAIKU__)
|
||||
/* The Haiku event loops run in a separate thread */
|
||||
#define MUST_THREAD_EVENTS
|
||||
#endif
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../SDL_internal.h"
|
||||
|
||||
/* General touch handling code for SDL */
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../SDL_internal.h"
|
||||
#include "../../include/SDL_touch.h"
|
||||
|
||||
#ifndef _SDL_touch_c_h
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../SDL_internal.h"
|
||||
|
||||
/* Window event handling code for SDL */
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../SDL_internal.h"
|
||||
|
||||
#ifndef _SDL_windowevents_c_h
|
||||
#define _SDL_windowevents_c_h
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
/* Need this so Linux systems define fseek64o, ftell64o and off64_t */
|
||||
#define _LARGEFILE64_SOURCE
|
||||
#include "SDL_config.h"
|
||||
#include "../SDL_internal.h"
|
||||
|
||||
#if defined(__WIN32__)
|
||||
#include "../core/windows/SDL_windows.h"
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../../SDL_internal.h"
|
||||
|
||||
#ifdef SDL_FILESYSTEM_COCOA
|
||||
|
||||
@@ -77,7 +77,7 @@ SDL_GetPrefPath(const char *org, const char *app)
|
||||
NSString *str = [array objectAtIndex:0];
|
||||
const char *base = [str fileSystemRepresentation];
|
||||
if (base) {
|
||||
const size_t len = SDL_strlen(base) + SDL_strlen(app) + 4;
|
||||
const size_t len = SDL_strlen(base) + SDL_strlen(org) + SDL_strlen(app) + 4;
|
||||
retval = (char *) SDL_malloc(len);
|
||||
if (retval == NULL) {
|
||||
SDL_OutOfMemory();
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../../SDL_internal.h"
|
||||
|
||||
#ifdef SDL_FILESYSTEM_DUMMY
|
||||
|
||||
|
||||
+4
-4
@@ -18,9 +18,9 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../../SDL_internal.h"
|
||||
|
||||
#ifdef SDL_FILESYSTEM_BEOS
|
||||
#ifdef SDL_FILESYSTEM_HAIKU
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
/* System dependent filesystem routines */
|
||||
@@ -82,12 +82,12 @@ SDL_GetPrefPath(const char *org, const char *app)
|
||||
SDL_OutOfMemory();
|
||||
} else {
|
||||
SDL_snprintf(retval, len, "%s%s%s/%s/", home, append, org, app);
|
||||
create_directory(retval, 0700); // BeOS api: creates missing dirs
|
||||
create_directory(retval, 0700); // Haiku api: creates missing dirs
|
||||
}
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
#endif /* SDL_FILESYSTEM_BEOS */
|
||||
#endif /* SDL_FILESYSTEM_HAIKU */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../../SDL_internal.h"
|
||||
|
||||
#ifdef SDL_FILESYSTEM_UNIX
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../../SDL_internal.h"
|
||||
|
||||
#ifdef SDL_FILESYSTEM_WINDOWS
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../SDL_internal.h"
|
||||
|
||||
#include "SDL_syshaptic.h"
|
||||
#include "SDL_haptic_c.h"
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#include "SDL_config.h"
|
||||
#include "../SDL_internal.h"
|
||||
|
||||
#include "SDL_haptic.h"
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../../SDL_internal.h"
|
||||
|
||||
#ifdef SDL_HAPTIC_IOKIT
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
#include "../../SDL_internal.h"
|
||||
|
||||
#if defined(SDL_HAPTIC_DUMMY) || defined(SDL_HAPTIC_DISABLED)
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user