Core: remove sdlew/WITH_SDL_DYNLOAD & disable SDL by default #127554
@ -483,7 +483,7 @@ option(WITH_IO_STL "Enable STL 3D file format support (*.stl)" ON)
|
||||
option(WITH_IO_GREASE_PENCIL "Enable grease-pencil file format IO (*.svg, *.pdf)" ON)
|
||||
|
||||
# Sound output
|
||||
option(WITH_SDL "Enable SDL for sound" ON)
|
||||
option(WITH_SDL "Enable SDL for sound" OFF)
|
||||
option(WITH_OPENAL "Enable OpenAL Support (http://www.openal.org)" ON)
|
||||
if(APPLE)
|
||||
option(WITH_COREAUDIO "Enable CoreAudio for audio support on macOS" ON)
|
||||
@ -501,9 +501,6 @@ if(NOT WIN32)
|
||||
else()
|
||||
set(WITH_JACK OFF)
|
||||
endif()
|
||||
if(UNIX AND NOT APPLE)
|
||||
option(WITH_SDL_DYNLOAD "Enable runtime dynamic SDL libraries loading" OFF)
|
||||
endif()
|
||||
if(UNIX AND NOT APPLE)
|
||||
option(WITH_PULSEAUDIO "Enable PulseAudio for audio support on Linux" ON)
|
||||
option(WITH_PULSEAUDIO_DYNLOAD "Enable runtime dynamic PulseAudio libraries loading" OFF)
|
||||
@ -2778,7 +2775,6 @@ if(FIRST_RUN)
|
||||
info_cfg_option(WITH_PULSEAUDIO)
|
||||
info_cfg_option(WITH_PULSEAUDIO_DYNLOAD)
|
||||
info_cfg_option(WITH_SDL)
|
||||
info_cfg_option(WITH_SDL_DYNLOAD)
|
||||
info_cfg_option(WITH_WASAPI)
|
||||
|
||||
info_cfg_text("Compression:")
|
||||
|
@ -53,7 +53,7 @@ set(WITH_POTRACE ON CACHE BOOL "" FORCE)
|
||||
set(WITH_PUGIXML ON CACHE BOOL "" FORCE)
|
||||
set(WITH_PYTHON_INSTALL ON CACHE BOOL "" FORCE)
|
||||
set(WITH_QUADRIFLOW ON CACHE BOOL "" FORCE)
|
||||
set(WITH_SDL ON CACHE BOOL "" FORCE)
|
||||
set(WITH_SDL OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_TBB ON CACHE BOOL "" FORCE)
|
||||
set(WITH_USD ON CACHE BOOL "" FORCE)
|
||||
set(WITH_MATERIALX ON CACHE BOOL "" FORCE)
|
||||
|
@ -57,7 +57,7 @@ set(WITH_POTRACE ON CACHE BOOL "" FORCE)
|
||||
set(WITH_PUGIXML ON CACHE BOOL "" FORCE)
|
||||
set(WITH_PYTHON_INSTALL ON CACHE BOOL "" FORCE)
|
||||
set(WITH_QUADRIFLOW ON CACHE BOOL "" FORCE)
|
||||
set(WITH_SDL ON CACHE BOOL "" FORCE)
|
||||
set(WITH_SDL OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_TBB ON CACHE BOOL "" FORCE)
|
||||
set(WITH_USD ON CACHE BOOL "" FORCE)
|
||||
set(WITH_MATERIALX ON CACHE BOOL "" FORCE)
|
||||
@ -82,7 +82,6 @@ if(UNIX AND NOT APPLE)
|
||||
set(WITH_X11_XF86VMODE ON CACHE BOOL "" FORCE)
|
||||
set(WITH_JACK_DYNLOAD ON CACHE BOOL "" FORCE)
|
||||
set(WITH_PULSEAUDIO_DYNLOAD ON CACHE BOOL "" FORCE)
|
||||
set(WITH_SDL_DYNLOAD ON CACHE BOOL "" FORCE)
|
||||
endif()
|
||||
if(NOT APPLE)
|
||||
set(WITH_XR_OPENXR ON CACHE BOOL "" FORCE)
|
||||
|
@ -270,26 +270,21 @@ if(WITH_OPENAL)
|
||||
endif()
|
||||
|
||||
if(WITH_SDL)
|
||||
if(WITH_SDL_DYNLOAD)
|
||||
set(SDL_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/extern/sdlew/include/SDL2")
|
||||
set(SDL_LIBRARY)
|
||||
find_package_wrapper(SDL2)
|
||||
if(SDL2_FOUND)
|
||||
# Use same names for both versions of SDL until we move to 2.x.
|
||||
set(SDL_INCLUDE_DIR "${SDL2_INCLUDE_DIR}")
|
||||
set(SDL_LIBRARY "${SDL2_LIBRARY}")
|
||||
set(SDL_FOUND "${SDL2_FOUND}")
|
||||
else()
|
||||
find_package_wrapper(SDL2)
|
||||
if(SDL2_FOUND)
|
||||
# Use same names for both versions of SDL until we move to 2.x.
|
||||
set(SDL_INCLUDE_DIR "${SDL2_INCLUDE_DIR}")
|
||||
set(SDL_LIBRARY "${SDL2_LIBRARY}")
|
||||
set(SDL_FOUND "${SDL2_FOUND}")
|
||||
else()
|
||||
find_package_wrapper(SDL)
|
||||
endif()
|
||||
mark_as_advanced(
|
||||
SDL_INCLUDE_DIR
|
||||
SDL_LIBRARY
|
||||
)
|
||||
# unset(SDLMAIN_LIBRARY CACHE)
|
||||
set_and_warn_library_found("SDL" SDL_FOUND WITH_SDL)
|
||||
find_package_wrapper(SDL)
|
||||
endif()
|
||||
mark_as_advanced(
|
||||
SDL_INCLUDE_DIR
|
||||
SDL_LIBRARY
|
||||
)
|
||||
# unset(SDLMAIN_LIBRARY CACHE)
|
||||
set_and_warn_library_found("SDL" SDL_FOUND WITH_SDL)
|
||||
endif()
|
||||
|
||||
# Codecs
|
||||
|
6
extern/CMakeLists.txt
vendored
6
extern/CMakeLists.txt
vendored
@ -85,12 +85,6 @@ if(WITH_GTESTS)
|
||||
add_subdirectory(gmock)
|
||||
endif()
|
||||
|
||||
if(WITH_SDL)
|
||||
if(WITH_SDL_DYNLOAD)
|
||||
add_subdirectory(sdlew)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_AUDASPACE AND NOT WITH_SYSTEM_AUDASPACE)
|
||||
set(AUDASPACE_CMAKE_CFG ${CMAKE_CURRENT_SOURCE_DIR}/audaspace/blender_config.cmake)
|
||||
set(LIB_SUFFIX "") # Quiet uninitialized warning.
|
||||
|
5
extern/audaspace/blender_config.cmake
vendored
5
extern/audaspace/blender_config.cmake
vendored
@ -40,11 +40,6 @@ set(NUMPY_INCLUDE_DIRS ${PYTHON_NUMPY_INCLUDE_DIRS})
|
||||
set(SDL_FOUND ${WITH_SDL})
|
||||
if(SDL_FOUND)
|
||||
set(USE_SDL2 TRUE)
|
||||
if(WITH_SDL_DYNLOAD)
|
||||
set(SDL2_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/extern/sdlew/include/SDL2")
|
||||
# Not needed, Blender's `sdlew` defines symbols.
|
||||
set(SDL2_LIBRARY "")
|
||||
endif()
|
||||
# This probably shouldn't be used, but it is.
|
||||
set(SDL_LIBRARY "${SDL2_LIBRARY}")
|
||||
endif()
|
||||
|
22
extern/sdlew/CMakeLists.txt
vendored
22
extern/sdlew/CMakeLists.txt
vendored
@ -1,22 +0,0 @@
|
||||
# SPDX-FileCopyrightText: 2006 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
set(INC
|
||||
.
|
||||
include
|
||||
)
|
||||
|
||||
set(INC_SYS
|
||||
${X11_X11_INCLUDE_PATH}
|
||||
)
|
||||
|
||||
set(SRC
|
||||
include/sdlew.h
|
||||
src/sdlew.c
|
||||
)
|
||||
|
||||
set(LIB
|
||||
)
|
||||
|
||||
blender_add_lib(extern_sdlew "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
|
5
extern/sdlew/README.blender
vendored
5
extern/sdlew/README.blender
vendored
@ -1,5 +0,0 @@
|
||||
Project: SDL Extension Wrangler
|
||||
URL: https://github.com/SDLWrangler/sdlew
|
||||
License: Apache 2.0
|
||||
Upstream version: 15edf8e
|
||||
Local modifications: None
|
73
extern/sdlew/include/SDL2/SDL.h
vendored
73
extern/sdlew/include/SDL2/SDL.h
vendored
@ -1,73 +0,0 @@
|
||||
|
||||
#ifndef _SDL_H
|
||||
#define _SDL_H
|
||||
|
||||
#include "SDL_main.h"
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_assert.h"
|
||||
#include "SDL_atomic.h"
|
||||
#include "SDL_audio.h"
|
||||
#include "SDL_clipboard.h"
|
||||
#include "SDL_cpuinfo.h"
|
||||
#include "SDL_endian.h"
|
||||
#include "SDL_error.h"
|
||||
#include "SDL_events.h"
|
||||
#include "SDL_joystick.h"
|
||||
#include "SDL_gamecontroller.h"
|
||||
#include "SDL_haptic.h"
|
||||
#include "SDL_hints.h"
|
||||
#include "SDL_loadso.h"
|
||||
#include "SDL_log.h"
|
||||
#include "SDL_messagebox.h"
|
||||
#include "SDL_mutex.h"
|
||||
#include "SDL_power.h"
|
||||
#include "SDL_render.h"
|
||||
#include "SDL_rwops.h"
|
||||
#include "SDL_system.h"
|
||||
#include "SDL_thread.h"
|
||||
#include "SDL_timer.h"
|
||||
#include "SDL_version.h"
|
||||
#include "SDL_video.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define SDL_INIT_TIMER 0x00000001
|
||||
#define SDL_INIT_AUDIO 0x00000010
|
||||
#define SDL_INIT_VIDEO 0x00000020
|
||||
#define SDL_INIT_JOYSTICK 0x00000200
|
||||
#define SDL_INIT_HAPTIC 0x00001000
|
||||
#define SDL_INIT_GAMECONTROLLER 0x00002000
|
||||
#define SDL_INIT_EVENTS 0x00004000
|
||||
#define SDL_INIT_NOPARACHUTE 0x00100000
|
||||
#define SDL_INIT_EVERYTHING ( \
|
||||
SDL_INIT_TIMER | SDL_INIT_AUDIO | SDL_INIT_VIDEO | SDL_INIT_EVENTS | \
|
||||
SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC | SDL_INIT_GAMECONTROLLER \
|
||||
)
|
||||
|
||||
typedef int SDLCALL tSDL_Init(Uint32 flags);
|
||||
|
||||
typedef int SDLCALL tSDL_InitSubSystem(Uint32 flags);
|
||||
|
||||
typedef void SDLCALL tSDL_QuitSubSystem(Uint32 flags);
|
||||
|
||||
typedef Uint32 SDLCALL tSDL_WasInit(Uint32 flags);
|
||||
|
||||
typedef void SDLCALL tSDL_Quit(void);
|
||||
|
||||
extern tSDL_Init *SDL_Init;
|
||||
extern tSDL_InitSubSystem *SDL_InitSubSystem;
|
||||
extern tSDL_QuitSubSystem *SDL_QuitSubSystem;
|
||||
extern tSDL_WasInit *SDL_WasInit;
|
||||
extern tSDL_Quit *SDL_Quit;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif
|
||||
|
140
extern/sdlew/include/SDL2/SDL_assert.h
vendored
140
extern/sdlew/include/SDL2/SDL_assert.h
vendored
@ -1,140 +0,0 @@
|
||||
|
||||
#ifndef _SDL_assert_h
|
||||
#define _SDL_assert_h
|
||||
|
||||
#include "SDL_config.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef SDL_ASSERT_LEVEL
|
||||
#ifdef SDL_DEFAULT_ASSERT_LEVEL
|
||||
#define SDL_ASSERT_LEVEL SDL_DEFAULT_ASSERT_LEVEL
|
||||
#elif defined(_DEBUG) || defined(DEBUG) || \
|
||||
(defined(__GNUC__) && !defined(__OPTIMIZE__))
|
||||
#define SDL_ASSERT_LEVEL 2
|
||||
#else
|
||||
#define SDL_ASSERT_LEVEL 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
|
||||
extern void __cdecl __debugbreak(void);
|
||||
#define SDL_TriggerBreakpoint() __debugbreak()
|
||||
#elif (defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)))
|
||||
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "int $3\n\t" )
|
||||
#elif defined(HAVE_SIGNAL_H)
|
||||
#include <signal.h>
|
||||
#define SDL_TriggerBreakpoint() raise(SIGTRAP)
|
||||
#else
|
||||
|
||||
#define SDL_TriggerBreakpoint()
|
||||
#endif
|
||||
|
||||
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
|
||||
# define SDL_FUNCTION __func__
|
||||
#elif ((__GNUC__ >= 2) || defined(_MSC_VER))
|
||||
# define SDL_FUNCTION __FUNCTION__
|
||||
#else
|
||||
# define SDL_FUNCTION "???"
|
||||
#endif
|
||||
#define SDL_FILE __FILE__
|
||||
#define SDL_LINE __LINE__
|
||||
|
||||
#define SDL_disabled_assert(condition) \
|
||||
do { (void) sizeof ((condition)); } while (0)
|
||||
|
||||
typedef enum
|
||||
{
|
||||
SDL_ASSERTION_RETRY,
|
||||
SDL_ASSERTION_BREAK,
|
||||
SDL_ASSERTION_ABORT,
|
||||
SDL_ASSERTION_IGNORE,
|
||||
SDL_ASSERTION_ALWAYS_IGNORE
|
||||
} SDL_assert_state;
|
||||
|
||||
typedef struct SDL_assert_data
|
||||
{
|
||||
int always_ignore;
|
||||
unsigned int trigger_count;
|
||||
const char *condition;
|
||||
const char *filename;
|
||||
int linenum;
|
||||
const char *function;
|
||||
const struct SDL_assert_data *next;
|
||||
} SDL_assert_data;
|
||||
|
||||
#if (SDL_ASSERT_LEVEL > 0)
|
||||
|
||||
typedef SDL_assert_state SDLCALL tSDL_ReportAssertion(SDL_assert_data *,
|
||||
const char *,
|
||||
const char *, int);
|
||||
|
||||
#define SDL_enabled_assert(condition) \
|
||||
do { \
|
||||
while ( !(condition) ) { \
|
||||
static struct SDL_assert_data assert_data = { \
|
||||
0, 0, #condition, 0, 0, 0, 0 \
|
||||
}; \
|
||||
const SDL_assert_state state = SDL_ReportAssertion(&assert_data, \
|
||||
SDL_FUNCTION, \
|
||||
SDL_FILE, \
|
||||
SDL_LINE); \
|
||||
if (state == SDL_ASSERTION_RETRY) { \
|
||||
continue; \
|
||||
} else if (state == SDL_ASSERTION_BREAK) { \
|
||||
SDL_TriggerBreakpoint(); \
|
||||
} \
|
||||
break; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#endif
|
||||
|
||||
#if SDL_ASSERT_LEVEL == 0
|
||||
# define SDL_assert(condition) SDL_disabled_assert(condition)
|
||||
# define SDL_assert_release(condition) SDL_disabled_assert(condition)
|
||||
# define SDL_assert_paranoid(condition) SDL_disabled_assert(condition)
|
||||
#elif SDL_ASSERT_LEVEL == 1
|
||||
# define SDL_assert(condition) SDL_disabled_assert(condition)
|
||||
# define SDL_assert_release(condition) SDL_enabled_assert(condition)
|
||||
# define SDL_assert_paranoid(condition) SDL_disabled_assert(condition)
|
||||
#elif SDL_ASSERT_LEVEL == 2
|
||||
# define SDL_assert(condition) SDL_enabled_assert(condition)
|
||||
# define SDL_assert_release(condition) SDL_enabled_assert(condition)
|
||||
# define SDL_assert_paranoid(condition) SDL_disabled_assert(condition)
|
||||
#elif SDL_ASSERT_LEVEL == 3
|
||||
# define SDL_assert(condition) SDL_enabled_assert(condition)
|
||||
# define SDL_assert_release(condition) SDL_enabled_assert(condition)
|
||||
# define SDL_assert_paranoid(condition) SDL_enabled_assert(condition)
|
||||
#else
|
||||
# error Unknown assertion level.
|
||||
#endif
|
||||
|
||||
typedef SDL_assert_state (SDLCALL *SDL_AssertionHandler)(
|
||||
const SDL_assert_data* data, void* userdata);
|
||||
|
||||
typedef void SDLCALL tSDL_SetAssertionHandler(
|
||||
SDL_AssertionHandler handler,
|
||||
void *userdata);
|
||||
|
||||
typedef const SDL_assert_data * SDLCALL tSDL_GetAssertionReport(void);
|
||||
|
||||
typedef void SDLCALL tSDL_ResetAssertionReport(void);
|
||||
|
||||
extern tSDL_ReportAssertion *SDL_ReportAssertion;
|
||||
extern tSDL_SetAssertionHandler *SDL_SetAssertionHandler;
|
||||
extern tSDL_GetAssertionReport *SDL_GetAssertionReport;
|
||||
extern tSDL_ResetAssertionReport *SDL_ResetAssertionReport;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif
|
||||
|
185
extern/sdlew/include/SDL2/SDL_atomic.h
vendored
185
extern/sdlew/include/SDL2/SDL_atomic.h
vendored
@ -1,185 +0,0 @@
|
||||
|
||||
#ifndef _SDL_atomic_h_
|
||||
#define _SDL_atomic_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_platform.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1500)
|
||||
#include <intrin.h>
|
||||
#define HAVE_MSC_ATOMICS 1
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef int SDL_SpinLock;
|
||||
|
||||
typedef SDL_bool SDLCALL tSDL_AtomicTryLock(SDL_SpinLock *lock);
|
||||
|
||||
typedef void SDLCALL tSDL_AtomicLock(SDL_SpinLock *lock);
|
||||
|
||||
typedef void SDLCALL tSDL_AtomicUnlock(SDL_SpinLock *lock);
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER > 1200)
|
||||
void _ReadWriteBarrier(void);
|
||||
#pragma intrinsic(_ReadWriteBarrier)
|
||||
#define SDL_CompilerBarrier() _ReadWriteBarrier()
|
||||
#elif defined(__GNUC__)
|
||||
#define SDL_CompilerBarrier() __asm__ __volatile__ ("" : : : "memory")
|
||||
#else
|
||||
#define SDL_CompilerBarrier() \
|
||||
{ SDL_SpinLock _tmp = 0; SDL_AtomicLock(&_tmp); SDL_AtomicUnlock(&_tmp); }
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__))
|
||||
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("lwsync" : : : "memory")
|
||||
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("lwsync" : : : "memory")
|
||||
#elif defined(__GNUC__) && defined(__arm__)
|
||||
#if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7EM__) || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7S__)
|
||||
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("dmb ish" : : : "memory")
|
||||
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("dmb ish" : : : "memory")
|
||||
#elif defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__)
|
||||
#ifdef __thumb__
|
||||
|
||||
typedef void SDLCALL tSDL_MemoryBarrierRelease();
|
||||
typedef void SDLCALL tSDL_MemoryBarrierAcquire();
|
||||
#else
|
||||
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5" : : "r"(0) : "memory")
|
||||
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5" : : "r"(0) : "memory")
|
||||
#endif
|
||||
#else
|
||||
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("" : : : "memory")
|
||||
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("" : : : "memory")
|
||||
#endif
|
||||
#else
|
||||
|
||||
#define SDL_MemoryBarrierRelease() SDL_CompilerBarrier()
|
||||
#define SDL_MemoryBarrierAcquire() SDL_CompilerBarrier()
|
||||
#endif
|
||||
|
||||
#if defined(SDL_ATOMIC_DISABLED) && SDL_ATOMIC_DISABLED
|
||||
#define SDL_DISABLE_ATOMIC_INLINE
|
||||
#endif
|
||||
#ifndef SDL_DISABLE_ATOMIC_INLINE
|
||||
|
||||
#ifdef HAVE_MSC_ATOMICS
|
||||
|
||||
#define SDL_AtomicSet(a, v) _InterlockedExchange((long*)&(a)->value, (v))
|
||||
#define SDL_AtomicAdd(a, v) _InterlockedExchangeAdd((long*)&(a)->value, (v))
|
||||
#define SDL_AtomicCAS(a, oldval, newval) (_InterlockedCompareExchange((long*)&(a)->value, (newval), (oldval)) == (oldval))
|
||||
#define SDL_AtomicSetPtr(a, v) _InterlockedExchangePointer((a), (v))
|
||||
#if _M_IX86
|
||||
#define SDL_AtomicCASPtr(a, oldval, newval) (_InterlockedCompareExchange((long*)(a), (long)(newval), (long)(oldval)) == (long)(oldval))
|
||||
#else
|
||||
#define SDL_AtomicCASPtr(a, oldval, newval) (_InterlockedCompareExchangePointer((a), (newval), (oldval)) == (oldval))
|
||||
#endif
|
||||
|
||||
#elif defined(__MACOSX__)
|
||||
#include <libkern/OSAtomic.h>
|
||||
|
||||
#define SDL_AtomicCAS(a, oldval, newval) OSAtomicCompareAndSwap32Barrier((oldval), (newval), &(a)->value)
|
||||
#ifdef __LP64__
|
||||
#define SDL_AtomicCASPtr(a, oldval, newval) OSAtomicCompareAndSwap64Barrier((int64_t)(oldval), (int64_t)(newval), (int64_t*)(a))
|
||||
#else
|
||||
#define SDL_AtomicCASPtr(a, oldval, newval) OSAtomicCompareAndSwap32Barrier((int32_t)(oldval), (int32_t)(newval), (int32_t*)(a))
|
||||
#endif
|
||||
|
||||
#elif defined(HAVE_GCC_ATOMICS)
|
||||
|
||||
#define SDL_AtomicSet(a, v) __sync_lock_test_and_set(&(a)->value, v)
|
||||
#define SDL_AtomicAdd(a, v) __sync_fetch_and_add(&(a)->value, v)
|
||||
#define SDL_AtomicSetPtr(a, v) __sync_lock_test_and_set(a, v)
|
||||
#define SDL_AtomicCAS(a, oldval, newval) __sync_bool_compare_and_swap(&(a)->value, oldval, newval)
|
||||
#define SDL_AtomicCASPtr(a, oldval, newval) __sync_bool_compare_and_swap(a, oldval, newval)
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef SDL_atomic_t_defined
|
||||
typedef struct { int value; } SDL_atomic_t;
|
||||
#endif
|
||||
|
||||
#ifndef SDL_AtomicCAS
|
||||
typedef SDL_bool SDLCALL tSDL_AtomicCAS(SDL_atomic_t *a, int oldval, int newval);
|
||||
#endif
|
||||
|
||||
#ifndef SDL_AtomicSet
|
||||
SDL_FORCE_INLINE int SDL_AtomicSet(SDL_atomic_t *a, int v)
|
||||
{
|
||||
int value;
|
||||
do {
|
||||
value = a->value;
|
||||
} while (!SDL_AtomicCAS(a, value, v));
|
||||
return value;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef SDL_AtomicGet
|
||||
SDL_FORCE_INLINE int SDL_AtomicGet(SDL_atomic_t *a)
|
||||
{
|
||||
int value = a->value;
|
||||
SDL_CompilerBarrier();
|
||||
return value;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef SDL_AtomicAdd
|
||||
SDL_FORCE_INLINE int SDL_AtomicAdd(SDL_atomic_t *a, int v)
|
||||
{
|
||||
int value;
|
||||
do {
|
||||
value = a->value;
|
||||
} while (!SDL_AtomicCAS(a, value, (value + v)));
|
||||
return value;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef SDL_AtomicIncRef
|
||||
#define SDL_AtomicIncRef(a) SDL_AtomicAdd(a, 1)
|
||||
#endif
|
||||
|
||||
#ifndef SDL_AtomicDecRef
|
||||
#define SDL_AtomicDecRef(a) (SDL_AtomicAdd(a, -1) == 1)
|
||||
#endif
|
||||
|
||||
#ifndef SDL_AtomicCASPtr
|
||||
typedef SDL_bool SDLCALL tSDL_AtomicCASPtr(void* *a, void *oldval, void *newval);
|
||||
#endif
|
||||
|
||||
#ifndef SDL_AtomicSetPtr
|
||||
SDL_FORCE_INLINE void* SDL_AtomicSetPtr(void* *a, void* v)
|
||||
{
|
||||
void* value;
|
||||
do {
|
||||
value = *a;
|
||||
} while (!SDL_AtomicCASPtr(a, value, v));
|
||||
return value;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef SDL_AtomicGetPtr
|
||||
SDL_FORCE_INLINE void* SDL_AtomicGetPtr(void* *a)
|
||||
{
|
||||
void* value = *a;
|
||||
SDL_CompilerBarrier();
|
||||
return value;
|
||||
}
|
||||
#endif
|
||||
|
||||
extern tSDL_AtomicTryLock *SDL_AtomicTryLock;
|
||||
extern tSDL_AtomicLock *SDL_AtomicLock;
|
||||
extern tSDL_AtomicUnlock *SDL_AtomicUnlock;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#include "close_code.h"
|
||||
|
||||
#endif
|
||||
|
222
extern/sdlew/include/SDL2/SDL_audio.h
vendored
222
extern/sdlew/include/SDL2/SDL_audio.h
vendored
@ -1,222 +0,0 @@
|
||||
|
||||
#ifndef _SDL_audio_h
|
||||
#define _SDL_audio_h
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_error.h"
|
||||
#include "SDL_endian.h"
|
||||
#include "SDL_mutex.h"
|
||||
#include "SDL_thread.h"
|
||||
#include "SDL_rwops.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef Uint16 SDL_AudioFormat;
|
||||
|
||||
#define SDL_AUDIO_MASK_BITSIZE (0xFF)
|
||||
#define SDL_AUDIO_MASK_DATATYPE (1<<8)
|
||||
#define SDL_AUDIO_MASK_ENDIAN (1<<12)
|
||||
#define SDL_AUDIO_MASK_SIGNED (1<<15)
|
||||
#define SDL_AUDIO_BITSIZE(x) (x & SDL_AUDIO_MASK_BITSIZE)
|
||||
#define SDL_AUDIO_ISFLOAT(x) (x & SDL_AUDIO_MASK_DATATYPE)
|
||||
#define SDL_AUDIO_ISBIGENDIAN(x) (x & SDL_AUDIO_MASK_ENDIAN)
|
||||
#define SDL_AUDIO_ISSIGNED(x) (x & SDL_AUDIO_MASK_SIGNED)
|
||||
#define SDL_AUDIO_ISINT(x) (!SDL_AUDIO_ISFLOAT(x))
|
||||
#define SDL_AUDIO_ISLITTLEENDIAN(x) (!SDL_AUDIO_ISBIGENDIAN(x))
|
||||
#define SDL_AUDIO_ISUNSIGNED(x) (!SDL_AUDIO_ISSIGNED(x))
|
||||
|
||||
#define AUDIO_U8 0x0008
|
||||
#define AUDIO_S8 0x8008
|
||||
#define AUDIO_U16LSB 0x0010
|
||||
#define AUDIO_S16LSB 0x8010
|
||||
#define AUDIO_U16MSB 0x1010
|
||||
#define AUDIO_S16MSB 0x9010
|
||||
#define AUDIO_U16 AUDIO_U16LSB
|
||||
#define AUDIO_S16 AUDIO_S16LSB
|
||||
|
||||
#define AUDIO_S32LSB 0x8020
|
||||
#define AUDIO_S32MSB 0x9020
|
||||
#define AUDIO_S32 AUDIO_S32LSB
|
||||
|
||||
#define AUDIO_F32LSB 0x8120
|
||||
#define AUDIO_F32MSB 0x9120
|
||||
#define AUDIO_F32 AUDIO_F32LSB
|
||||
|
||||
#if SDL_BYTEORDER == SDL_LIL_ENDIAN
|
||||
#define AUDIO_U16SYS AUDIO_U16LSB
|
||||
#define AUDIO_S16SYS AUDIO_S16LSB
|
||||
#define AUDIO_S32SYS AUDIO_S32LSB
|
||||
#define AUDIO_F32SYS AUDIO_F32LSB
|
||||
#else
|
||||
#define AUDIO_U16SYS AUDIO_U16MSB
|
||||
#define AUDIO_S16SYS AUDIO_S16MSB
|
||||
#define AUDIO_S32SYS AUDIO_S32MSB
|
||||
#define AUDIO_F32SYS AUDIO_F32MSB
|
||||
#endif
|
||||
|
||||
#define SDL_AUDIO_ALLOW_FREQUENCY_CHANGE 0x00000001
|
||||
#define SDL_AUDIO_ALLOW_FORMAT_CHANGE 0x00000002
|
||||
#define SDL_AUDIO_ALLOW_CHANNELS_CHANGE 0x00000004
|
||||
#define SDL_AUDIO_ALLOW_ANY_CHANGE (SDL_AUDIO_ALLOW_FREQUENCY_CHANGE|SDL_AUDIO_ALLOW_FORMAT_CHANGE|SDL_AUDIO_ALLOW_CHANNELS_CHANGE)
|
||||
|
||||
typedef void (SDLCALL * SDL_AudioCallback) (void *userdata, Uint8 * stream,
|
||||
int len);
|
||||
|
||||
typedef struct SDL_AudioSpec
|
||||
{
|
||||
int freq;
|
||||
SDL_AudioFormat format;
|
||||
Uint8 channels;
|
||||
Uint8 silence;
|
||||
Uint16 samples;
|
||||
Uint16 padding;
|
||||
Uint32 size;
|
||||
SDL_AudioCallback callback;
|
||||
void *userdata;
|
||||
} SDL_AudioSpec;
|
||||
|
||||
struct SDL_AudioCVT;
|
||||
typedef void (SDLCALL * SDL_AudioFilter) (struct SDL_AudioCVT * cvt,
|
||||
SDL_AudioFormat format);
|
||||
|
||||
#ifdef __GNUC__
|
||||
|
||||
#define SDL_AUDIOCVT_PACKED __attribute__((packed))
|
||||
#else
|
||||
#define SDL_AUDIOCVT_PACKED
|
||||
#endif
|
||||
|
||||
typedef struct SDL_AudioCVT
|
||||
{
|
||||
int needed;
|
||||
SDL_AudioFormat src_format;
|
||||
SDL_AudioFormat dst_format;
|
||||
double rate_incr;
|
||||
Uint8 *buf;
|
||||
int len;
|
||||
int len_cvt;
|
||||
int len_mult;
|
||||
double len_ratio;
|
||||
SDL_AudioFilter filters[10];
|
||||
int filter_index;
|
||||
} SDL_AUDIOCVT_PACKED SDL_AudioCVT;
|
||||
|
||||
typedef int SDLCALL tSDL_GetNumAudioDrivers(void);
|
||||
typedef const char * SDLCALL tSDL_GetAudioDriver(int index);
|
||||
|
||||
typedef int SDLCALL tSDL_AudioInit(const char *driver_name);
|
||||
typedef void SDLCALL tSDL_AudioQuit(void);
|
||||
|
||||
typedef const char * SDLCALL tSDL_GetCurrentAudioDriver(void);
|
||||
|
||||
typedef int SDLCALL tSDL_OpenAudio(SDL_AudioSpec * desired,
|
||||
SDL_AudioSpec * obtained);
|
||||
|
||||
typedef Uint32 SDL_AudioDeviceID;
|
||||
|
||||
typedef int SDLCALL tSDL_GetNumAudioDevices(int iscapture);
|
||||
|
||||
typedef const char * SDLCALL tSDL_GetAudioDeviceName(int index,
|
||||
int iscapture);
|
||||
|
||||
typedef SDL_AudioDeviceID SDLCALL tSDL_OpenAudioDevice(const char
|
||||
*device,
|
||||
int iscapture,
|
||||
const
|
||||
SDL_AudioSpec *
|
||||
desired,
|
||||
SDL_AudioSpec *
|
||||
obtained,
|
||||
int
|
||||
allowed_changes);
|
||||
|
||||
typedef enum
|
||||
{
|
||||
SDL_AUDIO_STOPPED = 0,
|
||||
SDL_AUDIO_PLAYING,
|
||||
SDL_AUDIO_PAUSED
|
||||
} SDL_AudioStatus;
|
||||
typedef SDL_AudioStatus SDLCALL tSDL_GetAudioStatus(void);
|
||||
|
||||
extern DECLSPEC SDL_AudioStatus SDLCALL
|
||||
SDL_GetAudioDeviceStatus(SDL_AudioDeviceID dev);
|
||||
|
||||
typedef void SDLCALL tSDL_PauseAudio(int pause_on);
|
||||
typedef void SDLCALL tSDL_PauseAudioDevice(SDL_AudioDeviceID dev,
|
||||
int pause_on);
|
||||
|
||||
typedef SDL_AudioSpec * SDLCALL tSDL_LoadWAV_RW(SDL_RWops * src,
|
||||
int freesrc,
|
||||
SDL_AudioSpec * spec,
|
||||
Uint8 ** audio_buf,
|
||||
Uint32 * audio_len);
|
||||
|
||||
#define SDL_LoadWAV(file, spec, audio_buf, audio_len) \
|
||||
SDL_LoadWAV_RW(SDL_RWFromFile(file, "rb"),1, spec,audio_buf,audio_len)
|
||||
|
||||
typedef void SDLCALL tSDL_FreeWAV(Uint8 * audio_buf);
|
||||
|
||||
typedef int SDLCALL tSDL_BuildAudioCVT(SDL_AudioCVT * cvt,
|
||||
SDL_AudioFormat src_format,
|
||||
Uint8 src_channels,
|
||||
int src_rate,
|
||||
SDL_AudioFormat dst_format,
|
||||
Uint8 dst_channels,
|
||||
int dst_rate);
|
||||
|
||||
typedef int SDLCALL tSDL_ConvertAudio(SDL_AudioCVT * cvt);
|
||||
|
||||
#define SDL_MIX_MAXVOLUME 128
|
||||
|
||||
typedef void SDLCALL tSDL_MixAudio(Uint8 * dst, const Uint8 * src,
|
||||
Uint32 len, int volume);
|
||||
|
||||
typedef void SDLCALL tSDL_MixAudioFormat(Uint8 * dst,
|
||||
const Uint8 * src,
|
||||
SDL_AudioFormat format,
|
||||
Uint32 len, int volume);
|
||||
|
||||
typedef void SDLCALL tSDL_LockAudio(void);
|
||||
typedef void SDLCALL tSDL_LockAudioDevice(SDL_AudioDeviceID dev);
|
||||
typedef void SDLCALL tSDL_UnlockAudio(void);
|
||||
typedef void SDLCALL tSDL_UnlockAudioDevice(SDL_AudioDeviceID dev);
|
||||
|
||||
typedef void SDLCALL tSDL_CloseAudio(void);
|
||||
typedef void SDLCALL tSDL_CloseAudioDevice(SDL_AudioDeviceID dev);
|
||||
|
||||
extern tSDL_GetNumAudioDrivers *SDL_GetNumAudioDrivers;
|
||||
extern tSDL_GetAudioDriver *SDL_GetAudioDriver;
|
||||
extern tSDL_AudioInit *SDL_AudioInit;
|
||||
extern tSDL_AudioQuit *SDL_AudioQuit;
|
||||
extern tSDL_GetCurrentAudioDriver *SDL_GetCurrentAudioDriver;
|
||||
extern tSDL_OpenAudio *SDL_OpenAudio;
|
||||
extern tSDL_GetNumAudioDevices *SDL_GetNumAudioDevices;
|
||||
extern tSDL_GetAudioDeviceName *SDL_GetAudioDeviceName;
|
||||
extern tSDL_OpenAudioDevice *SDL_OpenAudioDevice;
|
||||
extern tSDL_GetAudioStatus *SDL_GetAudioStatus;
|
||||
extern tSDL_PauseAudio *SDL_PauseAudio;
|
||||
extern tSDL_PauseAudioDevice *SDL_PauseAudioDevice;
|
||||
extern tSDL_LoadWAV_RW *SDL_LoadWAV_RW;
|
||||
extern tSDL_FreeWAV *SDL_FreeWAV;
|
||||
extern tSDL_BuildAudioCVT *SDL_BuildAudioCVT;
|
||||
extern tSDL_ConvertAudio *SDL_ConvertAudio;
|
||||
extern tSDL_MixAudio *SDL_MixAudio;
|
||||
extern tSDL_MixAudioFormat *SDL_MixAudioFormat;
|
||||
extern tSDL_LockAudio *SDL_LockAudio;
|
||||
extern tSDL_LockAudioDevice *SDL_LockAudioDevice;
|
||||
extern tSDL_UnlockAudio *SDL_UnlockAudio;
|
||||
extern tSDL_UnlockAudioDevice *SDL_UnlockAudioDevice;
|
||||
extern tSDL_CloseAudio *SDL_CloseAudio;
|
||||
extern tSDL_CloseAudioDevice *SDL_CloseAudioDevice;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif
|
||||
|
53
extern/sdlew/include/SDL2/SDL_bits.h
vendored
53
extern/sdlew/include/SDL2/SDL_bits.h
vendored
@ -1,53 +0,0 @@
|
||||
|
||||
#ifndef _SDL_bits_h
|
||||
#define _SDL_bits_h
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
SDL_FORCE_INLINE int
|
||||
SDL_MostSignificantBitIndex32(Uint32 x)
|
||||
{
|
||||
#if defined(__GNUC__) && __GNUC__ >= 4
|
||||
|
||||
if (x == 0) {
|
||||
return -1;
|
||||
}
|
||||
return 31 - __builtin_clz(x);
|
||||
#else
|
||||
|
||||
const Uint32 b[] = {0x2, 0xC, 0xF0, 0xFF00, 0xFFFF0000};
|
||||
const int S[] = {1, 2, 4, 8, 16};
|
||||
|
||||
int msbIndex = 0;
|
||||
int i;
|
||||
|
||||
if (x == 0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
for (i = 4; i >= 0; i--)
|
||||
{
|
||||
if (x & b[i])
|
||||
{
|
||||
x >>= S[i];
|
||||
msbIndex |= S[i];
|
||||
}
|
||||
}
|
||||
|
||||
return msbIndex;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif
|
||||
|
25
extern/sdlew/include/SDL2/SDL_blendmode.h
vendored
25
extern/sdlew/include/SDL2/SDL_blendmode.h
vendored
@ -1,25 +0,0 @@
|
||||
|
||||
#ifndef _SDL_blendmode_h
|
||||
#define _SDL_blendmode_h
|
||||
|
||||
#include "begin_code.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum
|
||||
{
|
||||
SDL_BLENDMODE_NONE = 0x00000000,
|
||||
SDL_BLENDMODE_BLEND = 0x00000001,
|
||||
SDL_BLENDMODE_ADD = 0x00000002,
|
||||
SDL_BLENDMODE_MOD = 0x00000004
|
||||
} SDL_BlendMode;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif
|
||||
|
29
extern/sdlew/include/SDL2/SDL_clipboard.h
vendored
29
extern/sdlew/include/SDL2/SDL_clipboard.h
vendored
@ -1,29 +0,0 @@
|
||||
|
||||
#ifndef _SDL_clipboard_h
|
||||
#define _SDL_clipboard_h
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef int SDLCALL tSDL_SetClipboardText(const char *text);
|
||||
|
||||
typedef char * SDLCALL tSDL_GetClipboardText(void);
|
||||
|
||||
typedef SDL_bool SDLCALL tSDL_HasClipboardText(void);
|
||||
|
||||
extern tSDL_SetClipboardText *SDL_SetClipboardText;
|
||||
extern tSDL_GetClipboardText *SDL_GetClipboardText;
|
||||
extern tSDL_HasClipboardText *SDL_HasClipboardText;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif
|
||||
|
175
extern/sdlew/include/SDL2/SDL_config.h
vendored
175
extern/sdlew/include/SDL2/SDL_config.h
vendored
@ -1,175 +0,0 @@
|
||||
|
||||
#ifndef _SDL_config_h
|
||||
#define _SDL_config_h
|
||||
|
||||
#include "SDL_platform.h"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#error You should run hg revert SDL_config.h
|
||||
#endif
|
||||
|
||||
#ifdef __LP64__
|
||||
#define SIZEOF_VOIDP 8
|
||||
#else
|
||||
#define SIZEOF_VOIDP 4
|
||||
#endif
|
||||
#define HAVE_GCC_ATOMICS 1
|
||||
|
||||
#define HAVE_PTHREAD_SPINLOCK 1
|
||||
|
||||
#define HAVE_LIBC 1
|
||||
#if HAVE_LIBC
|
||||
|
||||
#define HAVE_ALLOCA_H 1
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
#define HAVE_STDIO_H 1
|
||||
#define STDC_HEADERS 1
|
||||
#define HAVE_STDLIB_H 1
|
||||
#define HAVE_STDARG_H 1
|
||||
#define HAVE_MALLOC_H 1
|
||||
#define HAVE_MEMORY_H 1
|
||||
#define HAVE_STRING_H 1
|
||||
#define HAVE_STRINGS_H 1
|
||||
#define HAVE_INTTYPES_H 1
|
||||
#define HAVE_STDINT_H 1
|
||||
#define HAVE_CTYPE_H 1
|
||||
#define HAVE_MATH_H 1
|
||||
#define HAVE_ICONV_H 1
|
||||
#define HAVE_SIGNAL_H 1
|
||||
|
||||
#define HAVE_LIBUDEV_H 1
|
||||
#define HAVE_DBUS_DBUS_H 1
|
||||
|
||||
#define HAVE_MALLOC 1
|
||||
#define HAVE_CALLOC 1
|
||||
#define HAVE_REALLOC 1
|
||||
#define HAVE_FREE 1
|
||||
#define HAVE_ALLOCA 1
|
||||
#ifndef __WIN32__
|
||||
#define HAVE_GETENV 1
|
||||
#define HAVE_SETENV 1
|
||||
#define HAVE_PUTENV 1
|
||||
#define HAVE_UNSETENV 1
|
||||
#endif
|
||||
#define HAVE_QSORT 1
|
||||
#define HAVE_ABS 1
|
||||
#define HAVE_BCOPY 1
|
||||
#define HAVE_MEMSET 1
|
||||
#define HAVE_MEMCPY 1
|
||||
#define HAVE_MEMMOVE 1
|
||||
#define HAVE_MEMCMP 1
|
||||
#define HAVE_STRLEN 1
|
||||
|
||||
#define HAVE_STRDUP 1
|
||||
|
||||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRSTR 1
|
||||
|
||||
#define HAVE_STRTOL 1
|
||||
#define HAVE_STRTOUL 1
|
||||
|
||||
#define HAVE_STRTOLL 1
|
||||
#define HAVE_STRTOULL 1
|
||||
#define HAVE_STRTOD 1
|
||||
#define HAVE_ATOI 1
|
||||
#define HAVE_ATOF 1
|
||||
#define HAVE_STRCMP 1
|
||||
#define HAVE_STRNCMP 1
|
||||
|
||||
#define HAVE_STRCASECMP 1
|
||||
|
||||
#define HAVE_STRNCASECMP 1
|
||||
#define HAVE_SSCANF 1
|
||||
#define HAVE_SNPRINTF 1
|
||||
#define HAVE_VSNPRINTF 1
|
||||
#define HAVE_M_PI
|
||||
#define HAVE_ATAN 1
|
||||
#define HAVE_ATAN2 1
|
||||
#define HAVE_CEIL 1
|
||||
#define HAVE_COPYSIGN 1
|
||||
#define HAVE_COS 1
|
||||
#define HAVE_COSF 1
|
||||
#define HAVE_FABS 1
|
||||
#define HAVE_FLOOR 1
|
||||
#define HAVE_LOG 1
|
||||
#define HAVE_POW 1
|
||||
#define HAVE_SCALBN 1
|
||||
#define HAVE_SIN 1
|
||||
#define HAVE_SINF 1
|
||||
#define HAVE_SQRT 1
|
||||
#define HAVE_FSEEKO 1
|
||||
#define HAVE_FSEEKO64 1
|
||||
#define HAVE_SIGACTION 1
|
||||
#define HAVE_SA_SIGACTION 1
|
||||
#define HAVE_SETJMP 1
|
||||
#define HAVE_NANOSLEEP 1
|
||||
#define HAVE_SYSCONF 1
|
||||
|
||||
#define HAVE_CLOCK_GETTIME 1
|
||||
|
||||
#define HAVE_MPROTECT 1
|
||||
#define HAVE_ICONV 1
|
||||
#define HAVE_PTHREAD_SETNAME_NP 1
|
||||
|
||||
#define HAVE_SEM_TIMEDWAIT 1
|
||||
|
||||
#else
|
||||
#define HAVE_STDARG_H 1
|
||||
#define HAVE_STDDEF_H 1
|
||||
#define HAVE_STDINT_H 1
|
||||
#endif
|
||||
|
||||
#define SDL_LOADSO_DISABLED 1
|
||||
|
||||
#define SDL_AUDIO_DRIVER_ALSA 1
|
||||
|
||||
#define SDL_AUDIO_DRIVER_PULSEAUDIO 1
|
||||
|
||||
#define SDL_AUDIO_DRIVER_DISK 1
|
||||
#define SDL_AUDIO_DRIVER_DUMMY 1
|
||||
|
||||
#define SDL_AUDIO_DRIVER_OSS 1
|
||||
|
||||
#define SDL_INPUT_LINUXEV 1
|
||||
#define SDL_INPUT_TSLIB 1
|
||||
|
||||
#define SDL_JOYSTICK_LINUX 1
|
||||
|
||||
#define SDL_HAPTIC_LINUX 1
|
||||
|
||||
#define SDL_LOADSO_DLOPEN 1
|
||||
|
||||
#define SDL_THREAD_PTHREAD 1
|
||||
#define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX 1
|
||||
|
||||
#define SDL_TIMER_UNIX 1
|
||||
|
||||
#define SDL_VIDEO_DRIVER_DUMMY 1
|
||||
|
||||
#define SDL_VIDEO_DRIVER_X11 1
|
||||
|
||||
#define SDL_VIDEO_DRIVER_X11_XCURSOR 1
|
||||
#define SDL_VIDEO_DRIVER_X11_XINERAMA 1
|
||||
#define SDL_VIDEO_DRIVER_X11_XINPUT2 1
|
||||
#define SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH 1
|
||||
#define SDL_VIDEO_DRIVER_X11_XRANDR 1
|
||||
#define SDL_VIDEO_DRIVER_X11_XSCRNSAVER 1
|
||||
#define SDL_VIDEO_DRIVER_X11_XSHAPE 1
|
||||
#define SDL_VIDEO_DRIVER_X11_XVIDMODE 1
|
||||
#define SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS 1
|
||||
|
||||
#define SDL_VIDEO_DRIVER_X11_CONST_PARAM_XEXTADDDISPLAY 1
|
||||
#define SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM 1
|
||||
|
||||
#define SDL_VIDEO_RENDER_OGL 1
|
||||
|
||||
#define SDL_VIDEO_OPENGL 1
|
||||
|
||||
#define SDL_VIDEO_OPENGL_GLX 1
|
||||
|
||||
#define SDL_POWER_LINUX 1
|
||||
|
||||
#define SDL_ASSEMBLY_ROUTINES 1
|
||||
|
||||
#endif
|
86
extern/sdlew/include/SDL2/SDL_cpuinfo.h
vendored
86
extern/sdlew/include/SDL2/SDL_cpuinfo.h
vendored
@ -1,86 +0,0 @@
|
||||
|
||||
#ifndef _SDL_cpuinfo_h
|
||||
#define _SDL_cpuinfo_h
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1500)
|
||||
#include <intrin.h>
|
||||
#ifndef _WIN64
|
||||
#define __MMX__
|
||||
#define __3dNOW__
|
||||
#endif
|
||||
#define __SSE__
|
||||
#define __SSE2__
|
||||
#elif defined(__MINGW64_VERSION_MAJOR)
|
||||
#include <intrin.h>
|
||||
#else
|
||||
#ifdef __ALTIVEC__
|
||||
#if HAVE_ALTIVEC_H && !defined(__APPLE_ALTIVEC__)
|
||||
#include <altivec.h>
|
||||
#undef pixel
|
||||
#endif
|
||||
#endif
|
||||
#ifdef __MMX__
|
||||
#include <mmintrin.h>
|
||||
#endif
|
||||
#ifdef __3dNOW__
|
||||
#include <mm3dnow.h>
|
||||
#endif
|
||||
#ifdef __SSE__
|
||||
#include <xmmintrin.h>
|
||||
#endif
|
||||
#ifdef __SSE2__
|
||||
#include <emmintrin.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "begin_code.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define SDL_CACHELINE_SIZE 128
|
||||
|
||||
typedef int SDLCALL tSDL_GetCPUCount(void);
|
||||
|
||||
typedef int SDLCALL tSDL_GetCPUCacheLineSize(void);
|
||||
|
||||
typedef SDL_bool SDLCALL tSDL_HasRDTSC(void);
|
||||
|
||||
typedef SDL_bool SDLCALL tSDL_HasAltiVec(void);
|
||||
|
||||
typedef SDL_bool SDLCALL tSDL_HasMMX(void);
|
||||
|
||||
typedef SDL_bool SDLCALL tSDL_Has3DNow(void);
|
||||
|
||||
typedef SDL_bool SDLCALL tSDL_HasSSE(void);
|
||||
|
||||
typedef SDL_bool SDLCALL tSDL_HasSSE2(void);
|
||||
|
||||
typedef SDL_bool SDLCALL tSDL_HasSSE3(void);
|
||||
|
||||
typedef SDL_bool SDLCALL tSDL_HasSSE41(void);
|
||||
|
||||
typedef SDL_bool SDLCALL tSDL_HasSSE42(void);
|
||||
|
||||
extern tSDL_GetCPUCount *SDL_GetCPUCount;
|
||||
extern tSDL_GetCPUCacheLineSize *SDL_GetCPUCacheLineSize;
|
||||
extern tSDL_HasRDTSC *SDL_HasRDTSC;
|
||||
extern tSDL_HasAltiVec *SDL_HasAltiVec;
|
||||
extern tSDL_HasMMX *SDL_HasMMX;
|
||||
extern tSDL_Has3DNow *SDL_Has3DNow;
|
||||
extern tSDL_HasSSE *SDL_HasSSE;
|
||||
extern tSDL_HasSSE2 *SDL_HasSSE2;
|
||||
extern tSDL_HasSSE3 *SDL_HasSSE3;
|
||||
extern tSDL_HasSSE41 *SDL_HasSSE41;
|
||||
extern tSDL_HasSSE42 *SDL_HasSSE42;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif
|
||||
|
193
extern/sdlew/include/SDL2/SDL_endian.h
vendored
193
extern/sdlew/include/SDL2/SDL_endian.h
vendored
@ -1,193 +0,0 @@
|
||||
|
||||
#ifndef _SDL_endian_h
|
||||
#define _SDL_endian_h
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
|
||||
#define SDL_LIL_ENDIAN 1234
|
||||
#define SDL_BIG_ENDIAN 4321
|
||||
|
||||
#ifndef SDL_BYTEORDER
|
||||
#ifdef __linux__
|
||||
#include <endian.h>
|
||||
#define SDL_BYTEORDER __BYTE_ORDER
|
||||
#else
|
||||
#if defined(__hppa__) || \
|
||||
defined(__m68k__) || defined(mc68000) || defined(_M_M68K) || \
|
||||
(defined(__MIPS__) && defined(__MISPEB__)) || \
|
||||
defined(__ppc__) || defined(__POWERPC__) || defined(_M_PPC) || \
|
||||
defined(__sparc__)
|
||||
#define SDL_BYTEORDER SDL_BIG_ENDIAN
|
||||
#else
|
||||
#define SDL_BYTEORDER SDL_LIL_ENDIAN
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "begin_code.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__) && defined(__i386__) && \
|
||||
!(__GNUC__ == 2 && __GNUC_MINOR__ == 95 )
|
||||
SDL_FORCE_INLINE Uint16
|
||||
SDL_Swap16(Uint16 x)
|
||||
{
|
||||
__asm__("xchgb %b0,%h0": "=q"(x):"0"(x));
|
||||
return x;
|
||||
}
|
||||
#elif defined(__GNUC__) && defined(__x86_64__)
|
||||
SDL_FORCE_INLINE Uint16
|
||||
SDL_Swap16(Uint16 x)
|
||||
{
|
||||
__asm__("xchgb %b0,%h0": "=Q"(x):"0"(x));
|
||||
return x;
|
||||
}
|
||||
#elif defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__))
|
||||
SDL_FORCE_INLINE Uint16
|
||||
SDL_Swap16(Uint16 x)
|
||||
{
|
||||
int result;
|
||||
|
||||
__asm__("rlwimi %0,%2,8,16,23": "=&r"(result):"0"(x >> 8), "r"(x));
|
||||
return (Uint16)result;
|
||||
}
|
||||
#elif defined(__GNUC__) && (defined(__M68000__) || defined(__M68020__)) && !defined(__mcoldfire__)
|
||||
SDL_FORCE_INLINE Uint16
|
||||
SDL_Swap16(Uint16 x)
|
||||
{
|
||||
__asm__("rorw #8,%0": "=d"(x): "0"(x):"cc");
|
||||
return x;
|
||||
}
|
||||
#else
|
||||
SDL_FORCE_INLINE Uint16
|
||||
SDL_Swap16(Uint16 x)
|
||||
{
|
||||
return SDL_static_cast(Uint16, ((x << 8) | (x >> 8)));
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__) && defined(__i386__)
|
||||
SDL_FORCE_INLINE Uint32
|
||||
SDL_Swap32(Uint32 x)
|
||||
{
|
||||
__asm__("bswap %0": "=r"(x):"0"(x));
|
||||
return x;
|
||||
}
|
||||
#elif defined(__GNUC__) && defined(__x86_64__)
|
||||
SDL_FORCE_INLINE Uint32
|
||||
SDL_Swap32(Uint32 x)
|
||||
{
|
||||
__asm__("bswapl %0": "=r"(x):"0"(x));
|
||||
return x;
|
||||
}
|
||||
#elif defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__))
|
||||
SDL_FORCE_INLINE Uint32
|
||||
SDL_Swap32(Uint32 x)
|
||||
{
|
||||
Uint32 result;
|
||||
|
||||
__asm__("rlwimi %0,%2,24,16,23": "=&r"(result):"0"(x >> 24), "r"(x));
|
||||
__asm__("rlwimi %0,%2,8,8,15": "=&r"(result):"0"(result), "r"(x));
|
||||
__asm__("rlwimi %0,%2,24,0,7": "=&r"(result):"0"(result), "r"(x));
|
||||
return result;
|
||||
}
|
||||
#elif defined(__GNUC__) && (defined(__M68000__) || defined(__M68020__)) && !defined(__mcoldfire__)
|
||||
SDL_FORCE_INLINE Uint32
|
||||
SDL_Swap32(Uint32 x)
|
||||
{
|
||||
__asm__("rorw #8,%0\n\tswap %0\n\trorw #8,%0": "=d"(x): "0"(x):"cc");
|
||||
return x;
|
||||
}
|
||||
#else
|
||||
SDL_FORCE_INLINE Uint32
|
||||
SDL_Swap32(Uint32 x)
|
||||
{
|
||||
return SDL_static_cast(Uint32, ((x << 24) | ((x << 8) & 0x00FF0000) |
|
||||
((x >> 8) & 0x0000FF00) | (x >> 24)));
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__) && defined(__i386__)
|
||||
SDL_FORCE_INLINE Uint64
|
||||
SDL_Swap64(Uint64 x)
|
||||
{
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
Uint32 a, b;
|
||||
} s;
|
||||
Uint64 u;
|
||||
} v;
|
||||
v.u = x;
|
||||
__asm__("bswapl %0 ; bswapl %1 ; xchgl %0,%1": "=r"(v.s.a), "=r"(v.s.b):"0"(v.s.a),
|
||||
"1"(v.s.
|
||||
b));
|
||||
return v.u;
|
||||
}
|
||||
#elif defined(__GNUC__) && defined(__x86_64__)
|
||||
SDL_FORCE_INLINE Uint64
|
||||
SDL_Swap64(Uint64 x)
|
||||
{
|
||||
__asm__("bswapq %0": "=r"(x):"0"(x));
|
||||
return x;
|
||||
}
|
||||
#else
|
||||
SDL_FORCE_INLINE Uint64
|
||||
SDL_Swap64(Uint64 x)
|
||||
{
|
||||
Uint32 hi, lo;
|
||||
|
||||
lo = SDL_static_cast(Uint32, x & 0xFFFFFFFF);
|
||||
x >>= 32;
|
||||
hi = SDL_static_cast(Uint32, x & 0xFFFFFFFF);
|
||||
x = SDL_Swap32(lo);
|
||||
x <<= 32;
|
||||
x |= SDL_Swap32(hi);
|
||||
return (x);
|
||||
}
|
||||
#endif
|
||||
|
||||
SDL_FORCE_INLINE float
|
||||
SDL_SwapFloat(float x)
|
||||
{
|
||||
union
|
||||
{
|
||||
float f;
|
||||
Uint32 ui32;
|
||||
} swapper;
|
||||
swapper.f = x;
|
||||
swapper.ui32 = SDL_Swap32(swapper.ui32);
|
||||
return swapper.f;
|
||||
}
|
||||
|
||||
#if SDL_BYTEORDER == SDL_LIL_ENDIAN
|
||||
#define SDL_SwapLE16(X) (X)
|
||||
#define SDL_SwapLE32(X) (X)
|
||||
#define SDL_SwapLE64(X) (X)
|
||||
#define SDL_SwapFloatLE(X) (X)
|
||||
#define SDL_SwapBE16(X) SDL_Swap16(X)
|
||||
#define SDL_SwapBE32(X) SDL_Swap32(X)
|
||||
#define SDL_SwapBE64(X) SDL_Swap64(X)
|
||||
#define SDL_SwapFloatBE(X) SDL_SwapFloat(X)
|
||||
#else
|
||||
#define SDL_SwapLE16(X) SDL_Swap16(X)
|
||||
#define SDL_SwapLE32(X) SDL_Swap32(X)
|
||||
#define SDL_SwapLE64(X) SDL_Swap64(X)
|
||||
#define SDL_SwapFloatLE(X) SDL_SwapFloat(X)
|
||||
#define SDL_SwapBE16(X) (X)
|
||||
#define SDL_SwapBE32(X) (X)
|
||||
#define SDL_SwapBE64(X) (X)
|
||||
#define SDL_SwapFloatBE(X) (X)
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif
|
||||
|
43
extern/sdlew/include/SDL2/SDL_error.h
vendored
43
extern/sdlew/include/SDL2/SDL_error.h
vendored
@ -1,43 +0,0 @@
|
||||
|
||||
#ifndef _SDL_error_h
|
||||
#define _SDL_error_h
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef int SDLCALL tSDL_SetError(const char *fmt, ...);
|
||||
typedef const char * SDLCALL tSDL_GetError(void);
|
||||
typedef void SDLCALL tSDL_ClearError(void);
|
||||
|
||||
#define SDL_OutOfMemory() SDL_Error(SDL_ENOMEM)
|
||||
#define SDL_Unsupported() SDL_Error(SDL_UNSUPPORTED)
|
||||
#define SDL_InvalidParamError(param) SDL_SetError("Parameter '%s' is invalid", (param))
|
||||
typedef enum
|
||||
{
|
||||
SDL_ENOMEM,
|
||||
SDL_EFREAD,
|
||||
SDL_EFWRITE,
|
||||
SDL_EFSEEK,
|
||||
SDL_UNSUPPORTED,
|
||||
SDL_LASTERROR
|
||||
} SDL_errorcode;
|
||||
|
||||
typedef int SDLCALL tSDL_Error(SDL_errorcode |