mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-19 20:24:49 +00:00
commit
ee9f3b74ec
|
|
@ -20,7 +20,7 @@ LOCAL_SRC_FILES := \
|
|||
$(wildcard $(LOCAL_PATH)/src/audio/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/audio/android/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/audio/dummy/*.c) \
|
||||
$(LOCAL_PATH)/src/atomic/SDL_atomic.c \
|
||||
$(LOCAL_PATH)/src/atomic/SDL_atomic.c.arm \
|
||||
$(LOCAL_PATH)/src/atomic/SDL_spinlock.c.arm \
|
||||
$(wildcard $(LOCAL_PATH)/src/core/android/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/cpuinfo/*.c) \
|
||||
|
|
@ -28,9 +28,10 @@ LOCAL_SRC_FILES := \
|
|||
$(wildcard $(LOCAL_PATH)/src/events/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/file/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/haptic/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/haptic/dummy/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/haptic/android/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/joystick/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/joystick/android/*.c) \
|
||||
$(LOCAL_PATH)/src/joystick/steam/SDL_steamcontroller.c \
|
||||
$(wildcard $(LOCAL_PATH)/src/loadso/dlopen/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/power/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/power/android/*.c) \
|
||||
|
|
@ -44,11 +45,14 @@ LOCAL_SRC_FILES := \
|
|||
$(wildcard $(LOCAL_PATH)/src/timer/unix/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/video/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/video/android/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/video/yuv2rgb/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/test/*.c))
|
||||
|
||||
LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES
|
||||
LOCAL_LDLIBS := -ldl -lGLESv1_CM -lGLESv2 -llog -landroid
|
||||
|
||||
cmd-strip :=
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
|
||||
###########################
|
||||
|
|
@ -61,9 +65,25 @@ LOCAL_MODULE := SDL2_static
|
|||
|
||||
LOCAL_MODULE_FILENAME := libSDL2
|
||||
|
||||
LOCAL_SRC_FILES += $(subst $(LOCAL_PATH)/,,$(LOCAL_PATH)/src/main/android/SDL_android_main.c)
|
||||
|
||||
LOCAL_LDLIBS :=
|
||||
LOCAL_EXPORT_LDLIBS := -Wl,--undefined=Java_org_libsdl_app_SDLActivity_nativeInit -ldl -lGLESv1_CM -lGLESv2 -llog -landroid
|
||||
LOCAL_EXPORT_LDLIBS := -ldl -lGLESv1_CM -lGLESv2 -llog -landroid
|
||||
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
|
||||
###########################
|
||||
#
|
||||
# SDL main static library
|
||||
#
|
||||
###########################
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
|
||||
|
||||
LOCAL_MODULE := SDL2_main
|
||||
|
||||
LOCAL_MODULE_FILENAME := libSDL2main
|
||||
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -7,9 +7,9 @@ You may report bugs there, and search to see if a given issue has already
|
|||
been reported, discussed, and maybe even fixed.
|
||||
|
||||
|
||||
You may also find help on the SDL mailing list. Subscription information:
|
||||
You may also find help at the SDL forums/mailing list:
|
||||
|
||||
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
|
||||
https://discourse.libsdl.org/
|
||||
|
||||
Bug reports are welcome here, but we really appreciate if you use Bugzilla, as
|
||||
bugs discussed on the mailing list may be forgotten or missed.
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
|
|||
message(FATAL_ERROR "Prevented in-tree built. Please create a build directory outside of the SDL source code and call cmake from there")
|
||||
endif()
|
||||
|
||||
cmake_minimum_required(VERSION 2.8.5)
|
||||
cmake_minimum_required(VERSION 2.8.11)
|
||||
project(SDL2 C)
|
||||
|
||||
# !!! FIXME: this should probably do "MACOSX_RPATH ON" as a target property
|
||||
|
|
@ -20,6 +20,7 @@ include(CheckLibraryExists)
|
|||
include(CheckIncludeFiles)
|
||||
include(CheckIncludeFile)
|
||||
include(CheckSymbolExists)
|
||||
include(CheckCSourceCompiles)
|
||||
include(CheckCSourceRuns)
|
||||
include(CheckCCompilerFlag)
|
||||
include(CheckTypeSize)
|
||||
|
|
@ -41,11 +42,17 @@ include(${SDL2_SOURCE_DIR}/cmake/sdlchecks.cmake)
|
|||
# set SDL_BINARY_AGE and SDL_INTERFACE_AGE to 0.
|
||||
set(SDL_MAJOR_VERSION 2)
|
||||
set(SDL_MINOR_VERSION 0)
|
||||
set(SDL_MICRO_VERSION 5)
|
||||
set(SDL_INTERFACE_AGE 1)
|
||||
set(SDL_BINARY_AGE 5)
|
||||
set(SDL_MICRO_VERSION 8)
|
||||
set(SDL_INTERFACE_AGE 0)
|
||||
set(SDL_BINARY_AGE 8)
|
||||
set(SDL_VERSION "${SDL_MAJOR_VERSION}.${SDL_MINOR_VERSION}.${SDL_MICRO_VERSION}")
|
||||
|
||||
# Set defaults preventing destination file conflicts
|
||||
set(SDL_CMAKE_DEBUG_POSTFIX "d"
|
||||
CACHE STRING "Name suffix for debug builds")
|
||||
|
||||
mark_as_advanced(CMAKE_IMPORT_LIBRARY_SUFFIX SDL_CMAKE_DEBUG_POSTFIX)
|
||||
|
||||
# Calculate a libtool-like version number
|
||||
math(EXPR LT_CURRENT "${SDL_MICRO_VERSION} - ${SDL_INTERFACE_AGE}")
|
||||
math(EXPR LT_AGE "${SDL_BINARY_AGE} - ${SDL_INTERFACE_AGE}")
|
||||
|
|
@ -137,7 +144,9 @@ endif()
|
|||
|
||||
# Default option knobs
|
||||
if(APPLE OR ARCH_64)
|
||||
set(OPT_DEF_SSEMATH ON)
|
||||
if(NOT "${CMAKE_OSX_ARCHITECTURES}" MATCHES "arm")
|
||||
set(OPT_DEF_SSEMATH ON)
|
||||
endif()
|
||||
endif()
|
||||
if(UNIX OR MINGW OR MSYS)
|
||||
set(OPT_DEF_LIBC ON)
|
||||
|
|
@ -157,6 +166,10 @@ else()
|
|||
set(OPT_DEF_ASM FALSE)
|
||||
endif()
|
||||
|
||||
if(USE_GCC OR USE_CLANG)
|
||||
set(OPT_DEF_GCC_ATOMICS ON)
|
||||
endif()
|
||||
|
||||
# Default flags, if not set otherwise
|
||||
if("$ENV{CFLAGS}" STREQUAL "")
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "")
|
||||
|
|
@ -220,6 +233,11 @@ endif()
|
|||
add_definitions(-DUSING_GENERATED_CONFIG_H)
|
||||
# General includes
|
||||
include_directories(${SDL2_BINARY_DIR}/include ${SDL2_SOURCE_DIR}/include)
|
||||
if(USE_GCC OR USE_CLANG)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -idirafter ${SDL2_SOURCE_DIR}/src/video/khronos")
|
||||
else()
|
||||
include_directories(${SDL2_SOURCE_DIR}/src/video/khronos)
|
||||
endif()
|
||||
|
||||
# All these ENABLED_BY_DEFAULT vars will default to ON if not specified, so
|
||||
# you only need to have a platform override them if they are disabling.
|
||||
|
|
@ -255,20 +273,19 @@ endforeach()
|
|||
option_string(ASSERTIONS "Enable internal sanity checks (auto/disabled/release/enabled/paranoid)" "auto")
|
||||
#set_option(DEPENDENCY_TRACKING "Use gcc -MMD -MT dependency tracking" ON)
|
||||
set_option(LIBC "Use the system C library" ${OPT_DEF_LIBC})
|
||||
set_option(GCC_ATOMICS "Use gcc builtin atomics" ${USE_GCC})
|
||||
set_option(GCC_ATOMICS "Use gcc builtin atomics" ${OPT_DEF_GCC_ATOMICS})
|
||||
set_option(ASSEMBLY "Enable assembly routines" ${OPT_DEF_ASM})
|
||||
set_option(SSEMATH "Allow GCC to use SSE floating point math" ${OPT_DEF_SSEMATH})
|
||||
set_option(MMX "Use MMX assembly routines" ${OPT_DEF_ASM})
|
||||
set_option(3DNOW "Use 3Dnow! MMX assembly routines" ${OPT_DEF_ASM})
|
||||
set_option(SSE "Use SSE assembly routines" ${OPT_DEF_ASM})
|
||||
set_option(SSE2 "Use SSE2 assembly routines" ${OPT_DEF_SSEMATH})
|
||||
set_option(SSE3 "Use SSE3 assembly routines" ${OPT_DEF_SSEMATH})
|
||||
set_option(ALTIVEC "Use Altivec assembly routines" ${OPT_DEF_ASM})
|
||||
set_option(DISKAUDIO "Support the disk writer audio driver" ON)
|
||||
set_option(DUMMYAUDIO "Support the dummy audio driver" ON)
|
||||
set_option(VIDEO_DIRECTFB "Use DirectFB video driver" OFF)
|
||||
dep_option(DIRECTFB_SHARED "Dynamically load directfb support" ON "VIDEO_DIRECTFB" OFF)
|
||||
set_option(FUSIONSOUND "Use FusionSound audio driver" OFF)
|
||||
dep_option(FUSIONSOUND_SHARED "Dynamically load fusionsound audio support" ON "FUSIONSOUND" OFF)
|
||||
set_option(VIDEO_DUMMY "Use dummy video driver" ON)
|
||||
set_option(VIDEO_OPENGL "Include OpenGL support" ON)
|
||||
set_option(VIDEO_OPENGLES "Include OpenGL ES support" ON)
|
||||
|
|
@ -278,6 +295,8 @@ set_option(SDL_DLOPEN "Use dlopen for shared object loading" ${SDL_DLOP
|
|||
set_option(OSS "Support the OSS audio API" ${UNIX_SYS})
|
||||
set_option(ALSA "Support the ALSA audio API" ${UNIX_SYS})
|
||||
dep_option(ALSA_SHARED "Dynamically load ALSA audio support" ON "ALSA" OFF)
|
||||
set_option(JACK "Support the JACK audio API" ${UNIX_SYS})
|
||||
dep_option(JACK_SHARED "Dynamically load JACK audio support" ON "JACK" OFF)
|
||||
set_option(ESD "Support the Enlightened Sound Daemon" ${UNIX_SYS})
|
||||
dep_option(ESD_SHARED "Dynamically load ESD audio support" ON "ESD" OFF)
|
||||
set_option(PULSEAUDIO "Use PulseAudio" ${UNIX_SYS})
|
||||
|
|
@ -287,6 +306,10 @@ dep_option(ARTS_SHARED "Dynamically load aRts audio support" ON "ARTS" O
|
|||
set_option(NAS "Support the NAS audio API" ${UNIX_SYS})
|
||||
set_option(NAS_SHARED "Dynamically load NAS audio API" ${UNIX_SYS})
|
||||
set_option(SNDIO "Support the sndio audio API" ${UNIX_SYS})
|
||||
set_option(FUSIONSOUND "Use FusionSound audio driver" OFF)
|
||||
dep_option(FUSIONSOUND_SHARED "Dynamically load fusionsound audio support" ON "FUSIONSOUND" OFF)
|
||||
set_option(LIBSAMPLERATE "Use libsamplerate for audio rate conversion" ${UNIX_SYS})
|
||||
dep_option(LIBSAMPLERATE_SHARED "Dynamically load libsamplerate" ON "LIBSAMPLERATE" OFF)
|
||||
set_option(RPATH "Use an rpath when linking SDL" ${UNIX_SYS})
|
||||
set_option(CLOCK_GETTIME "Use clock_gettime() instead of gettimeofday()" OFF)
|
||||
set_option(INPUT_TSLIB "Use the Touchscreen library for input" ${UNIX_SYS})
|
||||
|
|
@ -307,6 +330,9 @@ set_option(VIDEO_COCOA "Use Cocoa video driver" ${APPLE})
|
|||
set_option(DIRECTX "Use DirectX for Windows audio/video" ${WINDOWS})
|
||||
set_option(RENDER_D3D "Enable the Direct3D render driver" ${WINDOWS})
|
||||
set_option(VIDEO_VIVANTE "Use Vivante EGL video driver" ${UNIX_SYS})
|
||||
dep_option(VIDEO_VULKAN "Enable Vulkan support" ON "ANDROID OR APPLE OR LINUX OR WINDOWS" OFF)
|
||||
set_option(VIDEO_KMSDRM "Use KMS DRM video driver" ${UNIX_SYS})
|
||||
dep_option(KMSDRM_SHARED "Dynamically load KMS DRM support" ON "VIDEO_KMSDRM" OFF)
|
||||
|
||||
# TODO: We should (should we?) respect cmake's ${BUILD_SHARED_LIBS} flag here
|
||||
# The options below are for compatibility to configure's default behaviour.
|
||||
|
|
@ -314,6 +340,7 @@ set(SDL_SHARED ${SDL_SHARED_ENABLED_BY_DEFAULT} CACHE BOOL "Build a shared versi
|
|||
set(SDL_STATIC ON CACHE BOOL "Build a static version of the library")
|
||||
|
||||
dep_option(SDL_STATIC_PIC "Static version of the library should be built with Position Independent Code" OFF "SDL_STATIC" OFF)
|
||||
set_option(SDL_TEST "Build the test directory" OFF)
|
||||
|
||||
# General source files
|
||||
file(GLOB SOURCE_FILES
|
||||
|
|
@ -330,7 +357,8 @@ file(GLOB SOURCE_FILES
|
|||
${SDL2_SOURCE_DIR}/src/stdlib/*.c
|
||||
${SDL2_SOURCE_DIR}/src/thread/*.c
|
||||
${SDL2_SOURCE_DIR}/src/timer/*.c
|
||||
${SDL2_SOURCE_DIR}/src/video/*.c)
|
||||
${SDL2_SOURCE_DIR}/src/video/*.c
|
||||
${SDL2_SOURCE_DIR}/src/video/yuv2rgb/*.c)
|
||||
|
||||
|
||||
if(ASSERTIONS STREQUAL "auto")
|
||||
|
|
@ -414,11 +442,15 @@ if(USE_GCC OR USE_CLANG)
|
|||
list(APPEND EXTRA_CFLAGS "-Wshadow")
|
||||
endif()
|
||||
|
||||
set(CMAKE_REQUIRED_FLAGS "-Wl,--no-undefined")
|
||||
check_c_compiler_flag("" HAVE_NO_UNDEFINED)
|
||||
set(CMAKE_REQUIRED_FLAGS ${ORIG_CMAKE_REQUIRED_FLAGS})
|
||||
if(HAVE_NO_UNDEFINED)
|
||||
list(APPEND EXTRA_LDFLAGS "-Wl,--no-undefined")
|
||||
if(APPLE)
|
||||
list(APPEND EXTRA_LDFLAGS "-Wl,-undefined,error")
|
||||
else()
|
||||
set(CMAKE_REQUIRED_FLAGS "-Wl,--no-undefined")
|
||||
check_c_compiler_flag("" HAVE_NO_UNDEFINED)
|
||||
set(CMAKE_REQUIRED_FLAGS ${ORIG_CMAKE_REQUIRED_FLAGS})
|
||||
if(HAVE_NO_UNDEFINED)
|
||||
list(APPEND EXTRA_LDFLAGS "-Wl,--no-undefined")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
|
@ -514,15 +546,43 @@ if(ASSEMBLY)
|
|||
set(CMAKE_REQUIRED_FLAGS ${ORIG_CMAKE_REQUIRED_FLAGS})
|
||||
endif()
|
||||
|
||||
if(SSEMATH)
|
||||
if(SSE OR SSE2)
|
||||
if(SSE3)
|
||||
set(CMAKE_REQUIRED_FLAGS "-msse3")
|
||||
check_c_source_compiles("
|
||||
#ifdef __MINGW32__
|
||||
#include <_mingw.h>
|
||||
#ifdef __MINGW64_VERSION_MAJOR
|
||||
#include <intrin.h>
|
||||
#else
|
||||
#include <pmmintrin.h>
|
||||
#endif
|
||||
#else
|
||||
#include <pmmintrin.h>
|
||||
#endif
|
||||
#ifndef __SSE3__
|
||||
#error Assembler CPP flag not enabled
|
||||
#endif
|
||||
int main(int argc, char **argv) { }" HAVE_SSE3)
|
||||
if(HAVE_SSE3)
|
||||
list(APPEND EXTRA_CFLAGS "-msse3")
|
||||
endif()
|
||||
set(CMAKE_REQUIRED_FLAGS ${ORIG_CMAKE_REQUIRED_FLAGS})
|
||||
endif()
|
||||
|
||||
if(NOT SSEMATH)
|
||||
if(SSE OR SSE2 OR SSE3)
|
||||
if(USE_GCC)
|
||||
list(APPEND EXTRA_CFLAGS "-mfpmath=387")
|
||||
check_c_compiler_flag(-mfpmath=387 HAVE_FP_387)
|
||||
if(HAVE_FP_387)
|
||||
list(APPEND EXTRA_CFLAGS "-mfpmath=387")
|
||||
endif()
|
||||
endif()
|
||||
set(HAVE_SSEMATH TRUE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
check_include_file("immintrin.h" HAVE_IMMINTRIN_H)
|
||||
|
||||
if(ALTIVEC)
|
||||
set(CMAKE_REQUIRED_FLAGS "-maltivec")
|
||||
check_c_source_compiles("
|
||||
|
|
@ -555,12 +615,13 @@ if(ASSEMBLY)
|
|||
endif()
|
||||
set(HAVE_SSE TRUE)
|
||||
set(HAVE_SSE2 TRUE)
|
||||
set(HAVE_SSE3 TRUE)
|
||||
set(SDL_ASSEMBLY_ROUTINES 1)
|
||||
endif()
|
||||
# TODO:
|
||||
#else()
|
||||
# if(USE_GCC OR USE_CLANG)
|
||||
# list(APPEND EXTRA_CFLAGS "-mno-sse" "-mno-sse2" "-mno-mmx")
|
||||
# list(APPEND EXTRA_CFLAGS "-mno-sse" "-mno-sse2" "-mno-sse3" "-mno-mmx")
|
||||
# endif()
|
||||
endif()
|
||||
|
||||
|
|
@ -569,7 +630,7 @@ endif()
|
|||
if(LIBC)
|
||||
if(WINDOWS AND NOT MINGW)
|
||||
set(HAVE_LIBC TRUE)
|
||||
foreach(_HEADER stdio.h string.h ctype.h math.h)
|
||||
foreach(_HEADER stdio.h string.h wchar.h ctype.h math.h limits.h)
|
||||
string(TOUPPER "HAVE_${_HEADER}" _UPPER)
|
||||
string(REPLACE "." "_" _HAVE_H ${_UPPER})
|
||||
set(${_HAVE_H} 1)
|
||||
|
|
@ -577,10 +638,13 @@ if(LIBC)
|
|||
set(HAVE_SIGNAL_H 1)
|
||||
foreach(_FN
|
||||
malloc calloc realloc free qsort abs memset memcpy memmove memcmp
|
||||
wcslen wcscmp
|
||||
strlen _strrev _strupr _strlwr strchr strrchr strstr itoa _ltoa
|
||||
_ultoa strtol strtoul strtoll strtod atoi atof strcmp strncmp
|
||||
_stricmp _strnicmp sscanf atan atan2 acos asin ceil copysign cos
|
||||
cosf fabs floor log pow scalbn sin sinf sqrt sqrtf tan tanf)
|
||||
_stricmp _strnicmp sscanf
|
||||
acos acosf asin asinf atan atanf atan2 atan2f ceil ceilf
|
||||
copysign copysignf cos cosf fabs fabsf floor floorf fmod fmodf
|
||||
log logf log10 log10f pow powf scalbn scalbnf sin sinf sqrt sqrtf tan tanf)
|
||||
string(TOUPPER ${_FN} _UPPER)
|
||||
set(HAVE_${_UPPER} 1)
|
||||
endforeach()
|
||||
|
|
@ -594,8 +658,8 @@ if(LIBC)
|
|||
set(HAVE_LIBC TRUE)
|
||||
check_include_file(sys/types.h HAVE_SYS_TYPES_H)
|
||||
foreach(_HEADER
|
||||
stdio.h stdlib.h stddef.h stdarg.h malloc.h memory.h string.h
|
||||
strings.h inttypes.h stdint.h ctype.h math.h iconv.h signal.h)
|
||||
stdio.h stdlib.h stddef.h stdarg.h malloc.h memory.h string.h limits.h
|
||||
strings.h wchar.h inttypes.h stdint.h ctype.h math.h iconv.h signal.h libunwind.h)
|
||||
string(TOUPPER "HAVE_${_HEADER}" _UPPER)
|
||||
string(REPLACE "." "_" _HAVE_H ${_UPPER})
|
||||
check_include_file("${_HEADER}" ${_HAVE_H})
|
||||
|
|
@ -611,11 +675,11 @@ if(LIBC)
|
|||
foreach(_FN
|
||||
strtod malloc calloc realloc free getenv setenv putenv unsetenv
|
||||
qsort abs bcopy memset memcpy memmove memcmp strlen strlcpy strlcat
|
||||
strdup _strrev _strupr _strlwr strchr strrchr strstr itoa _ltoa
|
||||
_strrev _strupr _strlwr strchr strrchr strstr itoa _ltoa
|
||||
_uitoa _ultoa strtol strtoul _i64toa _ui64toa strtoll strtoull
|
||||
atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp
|
||||
vsscanf vsnprintf fseeko fseeko64 sigaction setjmp
|
||||
nanosleep sysconf sysctlbyname
|
||||
vsscanf vsnprintf fopen64 fseeko fseeko64 sigaction setjmp
|
||||
nanosleep sysconf sysctlbyname getauxval poll
|
||||
)
|
||||
string(TOUPPER ${_FN} _UPPER)
|
||||
set(_HAVEVAR "HAVE_${_UPPER}")
|
||||
|
|
@ -725,8 +789,19 @@ endif()
|
|||
if(ANDROID)
|
||||
file(GLOB ANDROID_CORE_SOURCES ${SDL2_SOURCE_DIR}/src/core/android/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${ANDROID_CORE_SOURCES})
|
||||
|
||||
# SDL_spinlock.c Needs to be compiled in ARM mode.
|
||||
# There seems to be no better way currently to set the ARM mode.
|
||||
# see: https://issuetracker.google.com/issues/62264618
|
||||
# Another option would be to set ARM mode to all compiled files
|
||||
check_c_compiler_flag(-marm HAVE_ARM_MODE)
|
||||
if(HAVE_ARM_MODE)
|
||||
set_source_files_properties(${SDL2_SOURCE_DIR}/src/atomic/SDL_spinlock.c PROPERTIES COMPILE_FLAGS -marm)
|
||||
endif()
|
||||
|
||||
file(GLOB ANDROID_MAIN_SOURCES ${SDL2_SOURCE_DIR}/src/main/android/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${ANDROID_MAIN_SOURCES})
|
||||
set(SDLMAIN_SOURCES ${SDLMAIN_SOURCES} ${ANDROID_MAIN_SOURCES})
|
||||
|
||||
if(SDL_AUDIO)
|
||||
set(SDL_AUDIO_DRIVER_ANDROID 1)
|
||||
file(GLOB ANDROID_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/android/*.c)
|
||||
|
|
@ -739,33 +814,78 @@ if(ANDROID)
|
|||
set(SOURCE_FILES ${SOURCE_FILES} ${ANDROID_FILESYSTEM_SOURCES})
|
||||
set(HAVE_SDL_FILESYSTEM TRUE)
|
||||
endif()
|
||||
if(SDL_HAPTIC)
|
||||
set(SDL_HAPTIC_ANDROID 1)
|
||||
file(GLOB ANDROID_HAPTIC_SOURCES ${SDL2_SOURCE_DIR}/src/haptic/android/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${ANDROID_HAPTIC_SOURCES})
|
||||
set(HAVE_SDL_HAPTIC TRUE)
|
||||
endif()
|
||||
if(SDL_JOYSTICK)
|
||||
set(SDL_JOYSTICK_ANDROID 1)
|
||||
file(GLOB ANDROID_JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/android/*.c)
|
||||
file(GLOB ANDROID_JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/android/*.c ${SDL2_SOURCE_DIR}/src/joystick/steam/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${ANDROID_JOYSTICK_SOURCES})
|
||||
set(HAVE_SDL_JOYSTICK TRUE)
|
||||
endif()
|
||||
if(SDL_LOADSO)
|
||||
set(SDL_LOADSO_DLOPEN 1)
|
||||
file(GLOB LOADSO_SOURCES ${SDL2_SOURCE_DIR}/src/loadso/dlopen/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${LOADSO_SOURCES})
|
||||
set(HAVE_SDL_LOADSO TRUE)
|
||||
endif()
|
||||
if(SDL_POWER)
|
||||
set(SDL_POWER_ANDROID 1)
|
||||
file(GLOB ANDROID_POWER_SOURCES ${SDL2_SOURCE_DIR}/src/power/android/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${ANDROID_POWER_SOURCES})
|
||||
set(HAVE_SDL_POWER TRUE)
|
||||
endif()
|
||||
if(SDL_TIMERS)
|
||||
set(SDL_TIMER_UNIX 1)
|
||||
file(GLOB TIMER_SOURCES ${SDL2_SOURCE_DIR}/src/timer/unix/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${TIMER_SOURCES})
|
||||
set(HAVE_SDL_TIMERS TRUE)
|
||||
endif()
|
||||
if(SDL_VIDEO)
|
||||
set(SDL_VIDEO_DRIVER_ANDROID 1)
|
||||
file(GLOB ANDROID_VIDEO_SOURCES ${SDL2_SOURCE_DIR}/src/video/android/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${ANDROID_VIDEO_SOURCES})
|
||||
set(HAVE_SDL_VIDEO TRUE)
|
||||
|
||||
# Core stuff
|
||||
find_library(ANDROID_DL_LIBRARY dl)
|
||||
find_library(ANDROID_LOG_LIBRARY log)
|
||||
find_library(ANDROID_LIBRARY_LIBRARY android)
|
||||
list(APPEND EXTRA_LIBS ${ANDROID_DL_LIBRARY} ${ANDROID_LOG_LIBRARY} ${ANDROID_LIBRARY_LIBRARY})
|
||||
add_definitions(-DGL_GLEXT_PROTOTYPES)
|
||||
|
||||
#enable gles
|
||||
if(VIDEO_OPENGLES)
|
||||
set(SDL_VIDEO_OPENGL_EGL 1)
|
||||
set(HAVE_VIDEO_OPENGLES TRUE)
|
||||
set(SDL_VIDEO_OPENGL_ES2 1)
|
||||
set(SDL_VIDEO_RENDER_OGL_ES2 1)
|
||||
|
||||
find_library(OpenGLES1_LIBRARY GLESv1_CM)
|
||||
find_library(OpenGLES2_LIBRARY GLESv2)
|
||||
list(APPEND EXTRA_LIBS ${OpenGLES1_LIBRARY} ${OpenGLES2_LIBRARY})
|
||||
endif()
|
||||
|
||||
CHECK_C_SOURCE_COMPILES("
|
||||
#if defined(__ARM_ARCH) && __ARM_ARCH < 7
|
||||
#error Vulkan doesn't work on this configuration
|
||||
#endif
|
||||
int main()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
" VULKAN_PASSED_ANDROID_CHECKS)
|
||||
if(NOT VULKAN_PASSED_ANDROID_CHECKS)
|
||||
set(VIDEO_VULKAN OFF)
|
||||
message(STATUS "Vulkan doesn't work on this configuration")
|
||||
endif()
|
||||
endif()
|
||||
list(APPEND EXTRA_LDFLAGS "-Wl,--undefined=Java_org_libsdl_app_SDLActivity_nativeInit")
|
||||
|
||||
CheckPTHREAD()
|
||||
|
||||
endif()
|
||||
|
||||
# Platform-specific options and settings
|
||||
|
|
@ -821,17 +941,17 @@ if(EMSCRIPTEN)
|
|||
set(SDL_VIDEO_RENDER_OGL_ES2 1)
|
||||
endif()
|
||||
endif()
|
||||
elseif(UNIX AND NOT APPLE)
|
||||
elseif(UNIX AND NOT APPLE AND NOT ANDROID)
|
||||
if(SDL_AUDIO)
|
||||
if(SYSV5 OR SOLARIS OR HPUX)
|
||||
set(SDL_AUDIO_DRIVER_SUNAUDIO 1)
|
||||
file(GLOB SUN_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/sun/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${SUN_AUDIO_SOURCES})
|
||||
set(HAVE_SDL_AUDIO TRUE)
|
||||
elseif(NETBSD OR OPENBSD)
|
||||
set(SDL_AUDIO_DRIVER_BSD 1)
|
||||
file(GLOB BSD_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/bsd/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${BSD_AUDIO_SOURCES})
|
||||
elseif(NETBSD)
|
||||
set(SDL_AUDIO_DRIVER_NETBSD 1)
|
||||
file(GLOB NETBSD_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/netbsd/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${NETBSD_AUDIO_SOURCES})
|
||||
set(HAVE_SDL_AUDIO TRUE)
|
||||
elseif(AIX)
|
||||
set(SDL_AUDIO_DRIVER_PAUDIO 1)
|
||||
|
|
@ -841,12 +961,14 @@ elseif(UNIX AND NOT APPLE)
|
|||
endif()
|
||||
CheckOSS()
|
||||
CheckALSA()
|
||||
CheckJACK()
|
||||
CheckPulseAudio()
|
||||
CheckESD()
|
||||
CheckARTS()
|
||||
CheckNAS()
|
||||
CheckSNDIO()
|
||||
CheckFusionSound()
|
||||
CheckLibSampleRate()
|
||||
endif()
|
||||
|
||||
if(SDL_VIDEO)
|
||||
|
|
@ -859,6 +981,12 @@ elseif(UNIX AND NOT APPLE)
|
|||
CheckOpenGLESX11()
|
||||
CheckWayland()
|
||||
CheckVivante()
|
||||
CheckKMSDRM()
|
||||
endif()
|
||||
|
||||
if(UNIX)
|
||||
file(GLOB CORE_UNIX_SOURCES ${SDL2_SOURCE_DIR}/src/core/unix/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${CORE_UNIX_SOURCES})
|
||||
endif()
|
||||
|
||||
if(LINUX)
|
||||
|
|
@ -880,8 +1008,8 @@ elseif(UNIX AND NOT APPLE)
|
|||
ioctl(0, KDGKBENT, &kbe);
|
||||
}" HAVE_INPUT_KD)
|
||||
|
||||
file(GLOB CORE_SOURCES ${SDL2_SOURCE_DIR}/src/core/linux/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${CORE_SOURCES})
|
||||
file(GLOB CORE_LINUX_SOURCES ${SDL2_SOURCE_DIR}/src/core/linux/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${CORE_LINUX_SOURCES})
|
||||
|
||||
if(HAVE_INPUT_EVENTS)
|
||||
set(SDL_INPUT_LINUXEV 1)
|
||||
|
|
@ -917,7 +1045,6 @@ elseif(UNIX AND NOT APPLE)
|
|||
endif()
|
||||
|
||||
check_include_file("fcitx/frontend.h" HAVE_FCITX_FRONTEND_H)
|
||||
|
||||
endif()
|
||||
|
||||
if(INPUT_TSLIB)
|
||||
|
|
@ -934,7 +1061,7 @@ elseif(UNIX AND NOT APPLE)
|
|||
CheckUSBHID() # seems to be BSD specific - limit the test to BSD only?
|
||||
if(LINUX AND NOT ANDROID)
|
||||
set(SDL_JOYSTICK_LINUX 1)
|
||||
file(GLOB JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/linux/*.c)
|
||||
file(GLOB JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/linux/*.c ${SDL2_SOURCE_DIR}/src/joystick/steam/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${JOYSTICK_SOURCES})
|
||||
set(HAVE_SDL_JOYSTICK TRUE)
|
||||
endif()
|
||||
|
|
@ -1013,9 +1140,9 @@ elseif(WINDOWS)
|
|||
|
||||
if(MSVC)
|
||||
# Prevent codegen that would use the VC runtime libraries.
|
||||
add_definitions(/GS-)
|
||||
set_property(DIRECTORY . APPEND PROPERTY COMPILE_OPTIONS "/GS-")
|
||||
if(NOT ARCH_64)
|
||||
add_definitions(/arch:SSE)
|
||||
set_property(DIRECTORY . APPEND PROPERTY COMPILE_OPTIONS "/arch:SSE")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
|
@ -1037,6 +1164,16 @@ elseif(WINDOWS)
|
|||
#include <windows.h>
|
||||
#include <xinput.h>
|
||||
int main(int argc, char **argv) { }" HAVE_XINPUT_H)
|
||||
check_c_source_compiles("
|
||||
#include <windows.h>
|
||||
#include <xinput.h>
|
||||
XINPUT_GAMEPAD_EX x1;
|
||||
int main(int argc, char **argv) { }" HAVE_XINPUT_GAMEPAD_EX)
|
||||
check_c_source_compiles("
|
||||
#include <windows.h>
|
||||
#include <xinput.h>
|
||||
XINPUT_STATE_EX s1;
|
||||
int main(int argc, char **argv) { }" HAVE_XINPUT_STATE_EX)
|
||||
else()
|
||||
check_include_file(xinput.h HAVE_XINPUT_H)
|
||||
endif()
|
||||
|
|
@ -1046,9 +1183,10 @@ elseif(WINDOWS)
|
|||
check_include_file(ddraw.h HAVE_DDRAW_H)
|
||||
check_include_file(dsound.h HAVE_DSOUND_H)
|
||||
check_include_file(dinput.h HAVE_DINPUT_H)
|
||||
check_include_file(xaudio2.h HAVE_XAUDIO2_H)
|
||||
check_include_file(mmdeviceapi.h HAVE_MMDEVICEAPI_H)
|
||||
check_include_file(audioclient.h HAVE_AUDIOCLIENT_H)
|
||||
check_include_file(dxgi.h HAVE_DXGI_H)
|
||||
if(HAVE_D3D_H OR HAVE_D3D11_H OR HAVE_DDRAW_H OR HAVE_DSOUND_H OR HAVE_DINPUT_H OR HAVE_XAUDIO2_H)
|
||||
if(HAVE_D3D_H OR HAVE_D3D11_H OR HAVE_DDRAW_H OR HAVE_DSOUND_H OR HAVE_DINPUT_H)
|
||||
set(HAVE_DIRECTX TRUE)
|
||||
if(NOT CMAKE_COMPILER_IS_MINGW AND NOT USE_WINSDK_DIRECTX)
|
||||
# TODO: change $ENV{DXSDL_DIR} to get the path from the include checks
|
||||
|
|
@ -1071,10 +1209,10 @@ elseif(WINDOWS)
|
|||
set(SOURCE_FILES ${SOURCE_FILES} ${DSOUND_AUDIO_SOURCES})
|
||||
endif()
|
||||
|
||||
if(HAVE_XAUDIO2_H)
|
||||
set(SDL_AUDIO_DRIVER_XAUDIO2 1)
|
||||
file(GLOB XAUDIO2_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/xaudio2/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${XAUDIO2_AUDIO_SOURCES})
|
||||
if(HAVE_AUDIOCLIENT_H AND HAVE_MMDEVICEAPI_H)
|
||||
set(SDL_AUDIO_DRIVER_WASAPI 1)
|
||||
file(GLOB WASAPI_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/wasapi/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${WASAPI_AUDIO_SOURCES})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
|
@ -1166,6 +1304,11 @@ elseif(WINDOWS)
|
|||
if(HAVE_DINPUT_H)
|
||||
set(SDL_JOYSTICK_DINPUT 1)
|
||||
list(APPEND EXTRA_LIBS dinput8)
|
||||
if(CMAKE_COMPILER_IS_MINGW)
|
||||
list(APPEND EXTRA_LIBS dxerr8)
|
||||
elseif (NOT USE_WINSDK_DIRECTX)
|
||||
list(APPEND EXTRA_LIBS dxerr)
|
||||
endif()
|
||||
endif()
|
||||
if(HAVE_XINPUT_H)
|
||||
set(SDL_JOYSTICK_XINPUT 1)
|
||||
|
|
@ -1202,15 +1345,25 @@ elseif(WINDOWS)
|
|||
list(APPEND SDL_LIBS "-lmingw32" "-lSDL2main" "-mwindows")
|
||||
endif()
|
||||
elseif(APPLE)
|
||||
# TODO: rework this for proper MacOS X, iOS and Darwin support
|
||||
# TODO: rework this all for proper MacOS X, iOS and Darwin support
|
||||
|
||||
# We always need these libs on macOS at the moment.
|
||||
# !!! FIXME: we need Carbon for some very old API calls in
|
||||
# !!! FIXME: src/video/cocoa/SDL_cocoakeyboard.c, but we should figure out
|
||||
# !!! FIXME: how to dump those.
|
||||
if(NOT IOS)
|
||||
set(SDL_FRAMEWORK_COCOA 1)
|
||||
set(SDL_FRAMEWORK_CARBON 1)
|
||||
endif()
|
||||
|
||||
# Requires the darwin file implementation
|
||||
if(SDL_FILE)
|
||||
file(GLOB EXTRA_SOURCES ${SDL2_SOURCE_DIR}/src/file/cocoa/*.m)
|
||||
set(SOURCE_FILES ${EXTRA_SOURCES} ${SOURCE_FILES})
|
||||
# !!! FIXME: modern CMake doesn't need "LANGUAGE C" for Objective-C.
|
||||
set_source_files_properties(${EXTRA_SOURCES} PROPERTIES LANGUAGE C)
|
||||
set(HAVE_SDL_FILE TRUE)
|
||||
set(SDL_FRAMEWORK_COCOA 1)
|
||||
# !!! FIXME: why is COREVIDEO inside this if() block?
|
||||
set(SDL_FRAMEWORK_COREVIDEO 1)
|
||||
else()
|
||||
message_error("SDL_FILE must be enabled to build on MacOS X")
|
||||
|
|
@ -1219,6 +1372,8 @@ elseif(APPLE)
|
|||
if(SDL_AUDIO)
|
||||
set(SDL_AUDIO_DRIVER_COREAUDIO 1)
|
||||
file(GLOB AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/coreaudio/*.m)
|
||||
# !!! FIXME: modern CMake doesn't need "LANGUAGE C" for Objective-C.
|
||||
set_source_files_properties(${AUDIO_SOURCES} PROPERTIES LANGUAGE C)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${AUDIO_SOURCES})
|
||||
set(HAVE_SDL_AUDIO TRUE)
|
||||
set(SDL_FRAMEWORK_COREAUDIO 1)
|
||||
|
|
@ -1228,7 +1383,7 @@ elseif(APPLE)
|
|||
if(SDL_JOYSTICK)
|
||||
set(SDL_JOYSTICK_IOKIT 1)
|
||||
if (IOS)
|
||||
file(GLOB JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/iphoneos/*.m)
|
||||
file(GLOB JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/iphoneos/*.m ${SDL2_SOURCE_DIR}/src/joystick/steam/*.c)
|
||||
else()
|
||||
file(GLOB JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/darwin/*.c)
|
||||
endif()
|
||||
|
|
@ -1241,7 +1396,7 @@ elseif(APPLE)
|
|||
if(SDL_HAPTIC)
|
||||
set(SDL_HAPTIC_IOKIT 1)
|
||||
if (IOS)
|
||||
file(GLOB POWER_SOURCES ${SDL2_SOURCE_DIR}/src/power/dummy/*.c)
|
||||
file(GLOB HAPTIC_SOURCES ${SDL2_SOURCE_DIR}/src/haptic/dummy/*.c)
|
||||
set(SDL_HAPTIC_DUMMY 1)
|
||||
else()
|
||||
file(GLOB HAPTIC_SOURCES ${SDL2_SOURCE_DIR}/src/haptic/darwin/*.c)
|
||||
|
|
@ -1264,7 +1419,6 @@ elseif(APPLE)
|
|||
endif()
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${POWER_SOURCES})
|
||||
set(HAVE_SDL_POWER TRUE)
|
||||
set(SDL_FRAMEWORK_CARBON 1)
|
||||
set(SDL_FRAMEWORK_IOKIT 1)
|
||||
endif()
|
||||
|
||||
|
|
@ -1278,6 +1432,7 @@ elseif(APPLE)
|
|||
if(SDL_FILESYSTEM)
|
||||
set(SDL_FILESYSTEM_COCOA 1)
|
||||
file(GLOB FILESYSTEM_SOURCES ${SDL2_SOURCE_DIR}/src/filesystem/cocoa/*.m)
|
||||
# !!! FIXME: modern CMake doesn't need "LANGUAGE C" for Objective-C.
|
||||
set_source_files_properties(${FILESYSTEM_SOURCES} PROPERTIES LANGUAGE C)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${FILESYSTEM_SOURCES})
|
||||
set(HAVE_SDL_FILESYSTEM TRUE)
|
||||
|
|
@ -1327,6 +1482,13 @@ elseif(APPLE)
|
|||
set(SDL_VIDEO_RENDER_OGL 1)
|
||||
set(HAVE_VIDEO_OPENGL TRUE)
|
||||
endif()
|
||||
|
||||
if(VIDEO_OPENGLES)
|
||||
set(SDL_VIDEO_OPENGL_EGL 1)
|
||||
set(SDL_VIDEO_OPENGL_ES2 1)
|
||||
set(SDL_VIDEO_RENDER_OGL_ES2 1)
|
||||
set(HAVE_VIDEO_OPENGLES TRUE)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
|
@ -1363,6 +1525,10 @@ elseif(HAIKU)
|
|||
CheckPTHREAD()
|
||||
endif()
|
||||
|
||||
if(VIDEO_VULKAN)
|
||||
set(SDL_VIDEO_VULKAN 1)
|
||||
endif()
|
||||
|
||||
# Dummies
|
||||
# configure.in does it differently:
|
||||
# if not have X
|
||||
|
|
@ -1529,11 +1695,17 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
|
|||
|
||||
# Always build SDLmain
|
||||
add_library(SDL2main STATIC ${SDLMAIN_SOURCES})
|
||||
target_include_directories(SDL2main PUBLIC $<INSTALL_INTERFACE:include>)
|
||||
set(_INSTALL_LIBS "SDL2main")
|
||||
if (NOT ANDROID)
|
||||
set_target_properties(SDL2main PROPERTIES DEBUG_POSTFIX ${SDL_CMAKE_DEBUG_POSTFIX})
|
||||
endif()
|
||||
|
||||
if(SDL_SHARED)
|
||||
add_library(SDL2 SHARED ${SOURCE_FILES} ${VERSION_SOURCES})
|
||||
if(UNIX)
|
||||
if(APPLE)
|
||||
set_target_properties(SDL2 PROPERTIES MACOSX_RPATH 1)
|
||||
elseif(UNIX AND NOT ANDROID)
|
||||
set_target_properties(SDL2 PROPERTIES
|
||||
VERSION ${LT_VERSION}
|
||||
SOVERSION ${LT_REVISION}
|
||||
|
|
@ -1544,7 +1716,7 @@ if(SDL_SHARED)
|
|||
SOVERSION ${LT_REVISION}
|
||||
OUTPUT_NAME "SDL2")
|
||||
endif()
|
||||
if(MSVC)
|
||||
if(MSVC AND NOT LIBC)
|
||||
# Don't try to link with the default set of libraries.
|
||||
set_target_properties(SDL2 PROPERTIES LINK_FLAGS_RELEASE "/NODEFAULTLIB")
|
||||
set_target_properties(SDL2 PROPERTIES LINK_FLAGS_DEBUG "/NODEFAULTLIB")
|
||||
|
|
@ -1552,14 +1724,24 @@ if(SDL_SHARED)
|
|||
endif()
|
||||
set(_INSTALL_LIBS "SDL2" ${_INSTALL_LIBS})
|
||||
target_link_libraries(SDL2 ${EXTRA_LIBS} ${EXTRA_LDFLAGS})
|
||||
target_include_directories(SDL2 PUBLIC $<INSTALL_INTERFACE:include>)
|
||||
if (NOT ANDROID)
|
||||
set_target_properties(SDL2 PROPERTIES DEBUG_POSTFIX ${SDL_CMAKE_DEBUG_POSTFIX})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(SDL_STATIC)
|
||||
set (BUILD_SHARED_LIBS FALSE)
|
||||
add_library(SDL2-static STATIC ${SOURCE_FILES})
|
||||
set_target_properties(SDL2-static PROPERTIES OUTPUT_NAME "SDL2")
|
||||
if (NOT SDL_SHARED OR NOT WIN32)
|
||||
set_target_properties(SDL2-static PROPERTIES OUTPUT_NAME "SDL2")
|
||||
# Note: Apparently, OUTPUT_NAME must really be unique; even when
|
||||
# CMAKE_IMPORT_LIBRARY_SUFFIX or the like are given. Otherwise
|
||||
# the static build may race with the import lib and one will get
|
||||
# clobbered, when the suffix is realized via subsequent rename.
|
||||
endif()
|
||||
set_target_properties(SDL2-static PROPERTIES POSITION_INDEPENDENT_CODE ${SDL_STATIC_PIC})
|
||||
if(MSVC)
|
||||
if(MSVC AND NOT LIBC)
|
||||
set_target_properties(SDL2-static PROPERTIES LINK_FLAGS_RELEASE "/NODEFAULTLIB")
|
||||
set_target_properties(SDL2-static PROPERTIES LINK_FLAGS_DEBUG "/NODEFAULTLIB")
|
||||
set_target_properties(SDL2-static PROPERTIES STATIC_LIBRARY_FLAGS "/NODEFAULTLIB")
|
||||
|
|
@ -1568,14 +1750,55 @@ if(SDL_STATIC)
|
|||
# libraries - do we need to consider this?
|
||||
set(_INSTALL_LIBS "SDL2-static" ${_INSTALL_LIBS})
|
||||
target_link_libraries(SDL2-static ${EXTRA_LIBS} ${EXTRA_LDFLAGS})
|
||||
target_include_directories(SDL2-static PUBLIC $<INSTALL_INTERFACE:include>)
|
||||
if (NOT ANDROID)
|
||||
set_target_properties(SDL2-static PROPERTIES DEBUG_POSTFIX ${SDL_CMAKE_DEBUG_POSTFIX})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
##### Tests #####
|
||||
|
||||
if(SDL_TEST)
|
||||
file(GLOB TEST_SOURCES ${SDL2_SOURCE_DIR}/src/test/*.c)
|
||||
add_library(SDL2_test STATIC ${TEST_SOURCES})
|
||||
|
||||
add_subdirectory(test)
|
||||
endif()
|
||||
|
||||
##### Installation targets #####
|
||||
install(TARGETS ${_INSTALL_LIBS}
|
||||
install(TARGETS ${_INSTALL_LIBS} EXPORT SDL2Targets
|
||||
LIBRARY DESTINATION "lib${LIB_SUFFIX}"
|
||||
ARCHIVE DESTINATION "lib${LIB_SUFFIX}"
|
||||
RUNTIME DESTINATION bin)
|
||||
|
||||
##### Export files #####
|
||||
if (APPLE)
|
||||
set(PKG_PREFIX "SDL2.framework/Resources")
|
||||
elseif (WINDOWS)
|
||||
set(PKG_PREFIX "cmake")
|
||||
else ()
|
||||
set(PKG_PREFIX "lib/cmake/SDL2")
|
||||
endif ()
|
||||
|
||||
include(CMakePackageConfigHelpers)
|
||||
write_basic_package_version_file("${CMAKE_BINARY_DIR}/SDL2ConfigVersion.cmake"
|
||||
VERSION ${SDL_VERSION}
|
||||
COMPATIBILITY AnyNewerVersion
|
||||
)
|
||||
|
||||
install(EXPORT SDL2Targets
|
||||
FILE SDL2Targets.cmake
|
||||
NAMESPACE SDL2::
|
||||
DESTINATION ${PKG_PREFIX}
|
||||
)
|
||||
install(
|
||||
FILES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/SDL2Config.cmake
|
||||
${CMAKE_BINARY_DIR}/SDL2ConfigVersion.cmake
|
||||
DESTINATION ${PKG_PREFIX}
|
||||
COMPONENT Devel
|
||||
)
|
||||
|
||||
file(GLOB INCLUDE_FILES ${SDL2_SOURCE_DIR}/include/*.h)
|
||||
file(GLOB BIN_INCLUDE_FILES ${SDL2_BINARY_DIR}/include/*.h)
|
||||
foreach(_FNAME ${BIN_INCLUDE_FILES})
|
||||
|
|
@ -1592,10 +1815,12 @@ if(NOT (WINDOWS OR CYGWIN))
|
|||
else()
|
||||
set(SOEXT "so")
|
||||
endif()
|
||||
install(CODE "
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink
|
||||
\"libSDL2-2.0.${SOEXT}\" \"libSDL2.${SOEXT}\")")
|
||||
install(FILES ${SDL2_BINARY_DIR}/libSDL2.${SOEXT} DESTINATION "lib${LIB_SUFFIX}")
|
||||
if(NOT ANDROID)
|
||||
install(CODE "
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink
|
||||
\"libSDL2-2.0.${SOEXT}\" \"libSDL2.${SOEXT}\")")
|
||||
install(FILES ${SDL2_BINARY_DIR}/libSDL2.${SOEXT} DESTINATION "lib${LIB_SUFFIX}")
|
||||
endif()
|
||||
endif()
|
||||
if(FREEBSD)
|
||||
# FreeBSD uses ${PREFIX}/libdata/pkgconfig
|
||||
|
|
@ -1611,10 +1836,12 @@ endif()
|
|||
|
||||
##### Uninstall target #####
|
||||
|
||||
configure_file(
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
|
||||
IMMEDIATE @ONLY)
|
||||
if(NOT TARGET uninstall)
|
||||
configure_file(
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
|
||||
IMMEDIATE @ONLY)
|
||||
|
||||
add_custom_target(uninstall
|
||||
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
|
||||
add_custom_target(uninstall
|
||||
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 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
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ To compile and install SDL:
|
|||
* Read VisualC.html
|
||||
|
||||
Windows with gcc, either native or cross-compiling:
|
||||
* Read the FAQ at http://wiki.libsdl.org/moin.fcg/FAQWindows
|
||||
* Read the FAQ at https://wiki.libsdl.org/moin.fcg/FAQWindows
|
||||
* Run './configure; make; make install'
|
||||
|
||||
Mac OS X with Xcode:
|
||||
|
|
@ -27,14 +27,14 @@ To compile and install SDL:
|
|||
* Read docs/README-cmake.md
|
||||
|
||||
2. Look at the example programs in ./test, and check out the online
|
||||
documentation at http://wiki.libsdl.org/
|
||||
documentation at https://wiki.libsdl.org/
|
||||
|
||||
3. Join the SDL developer mailing list by sending E-mail to
|
||||
sdl-request@libsdl.org
|
||||
and put "subscribe" in the subject of the message.
|
||||
|
||||
Or alternatively you can use the web interface:
|
||||
http://www.libsdl.org/mailing-list.php
|
||||
https://www.libsdl.org/mailing-list.php
|
||||
|
||||
That's it!
|
||||
Sam Lantinga <slouken@libsdl.org>
|
||||
|
|
|
|||
|
|
@ -36,15 +36,15 @@ GEN_HEADERS = @GEN_HEADERS@
|
|||
GEN_OBJECTS = @GEN_OBJECTS@
|
||||
VERSION_OBJECTS = @VERSION_OBJECTS@
|
||||
|
||||
SDLMAIN_TARGET = libSDL2main.a
|
||||
SDLMAIN_TARGET = libSDL2main.la
|
||||
SDLMAIN_OBJECTS = @SDLMAIN_OBJECTS@
|
||||
|
||||
SDLTEST_TARGET = libSDL2_test.a
|
||||
SDLTEST_TARGET = libSDL2_test.la
|
||||
SDLTEST_OBJECTS = @SDLTEST_OBJECTS@
|
||||
|
||||
WAYLAND_SCANNER = @WAYLAND_SCANNER@
|
||||
|
||||
SRC_DIST = *.txt acinclude Android.mk autogen.sh android-project build-scripts cmake cmake_uninstall.cmake.in configure configure.in debian docs include Makefile.* sdl2-config.cmake.in sdl2-config.in sdl2.m4 sdl2.pc.in SDL2.spec.in src test VisualC.html VisualC VisualC-WinRT Xcode Xcode-iOS
|
||||
SRC_DIST = *.txt acinclude Android.mk autogen.sh android-project build-scripts cmake cmake_uninstall.cmake.in configure configure.in debian docs include Makefile.* sdl2-config.cmake.in sdl2-config.in sdl2.m4 sdl2.pc.in SDL2.spec.in SDL2Config.cmake src test VisualC.html VisualC VisualC-WinRT Xcode Xcode-iOS
|
||||
GEN_DIST = SDL2.spec
|
||||
|
||||
ifneq ($V,1)
|
||||
|
|
@ -112,6 +112,7 @@ HDRS = \
|
|||
SDL_types.h \
|
||||
SDL_version.h \
|
||||
SDL_video.h \
|
||||
SDL_vulkan.h \
|
||||
begin_code.h \
|
||||
close_code.h
|
||||
|
||||
|
|
@ -121,14 +122,12 @@ LT_AGE = @LT_AGE@
|
|||
LT_CURRENT = @LT_CURRENT@
|
||||
LT_RELEASE = @LT_RELEASE@
|
||||
LT_REVISION = @LT_REVISION@
|
||||
LT_LDFLAGS = -no-undefined -rpath $(DESTDIR)$(libdir) -release $(LT_RELEASE) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
|
||||
LT_LDFLAGS = -no-undefined -rpath $(libdir) -release $(LT_RELEASE) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
|
||||
|
||||
all: $(srcdir)/configure Makefile $(objects) $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET) $(objects)/$(SDLTEST_TARGET)
|
||||
|
||||
$(srcdir)/configure: $(srcdir)/configure.in
|
||||
@echo "Warning, configure.in is out of date"
|
||||
#(cd $(srcdir) && sh autogen.sh && sh configure)
|
||||
@sleep 3
|
||||
@echo "Warning, configure is out of date, please re-run autogen.sh"
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in
|
||||
$(SHELL) config.status $@
|
||||
|
|
@ -147,12 +146,10 @@ $(objects)/$(TARGET): $(GEN_HEADERS) $(GEN_OBJECTS) $(OBJECTS) $(VERSION_OBJECTS
|
|||
$(RUN_CMD_LTLINK)$(LIBTOOL) --tag=CC --mode=link $(CC) -o $@ $(OBJECTS) $(GEN_OBJECTS) $(VERSION_OBJECTS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS)
|
||||
|
||||
$(objects)/$(SDLMAIN_TARGET): $(SDLMAIN_OBJECTS)
|
||||
$(RUN_CMD_AR)$(AR) cru $@ $(SDLMAIN_OBJECTS)
|
||||
$(RUN_CMD_RANLIB)$(RANLIB) $@
|
||||
$(RUN_CMD_LTLINK)$(LIBTOOL) --tag=CC --mode=link $(CC) -static -o $@ $(SDLMAIN_OBJECTS) -rpath $(libdir)
|
||||
|
||||
$(objects)/$(SDLTEST_TARGET): $(SDLTEST_OBJECTS)
|
||||
$(RUN_CMD_AR)$(AR) cru $@ $(SDLTEST_OBJECTS)
|
||||
$(RUN_CMD_RANLIB)$(RANLIB) $@
|
||||
$(RUN_CMD_LTLINK)$(LIBTOOL) --tag=CC --mode=link $(CC) -static -o $@ $(SDLTEST_OBJECTS) -rpath $(libdir)
|
||||
|
||||
install: all install-bin install-hdrs install-lib install-data
|
||||
install-bin:
|
||||
|
|
@ -173,10 +170,8 @@ install-hdrs: update-revision
|
|||
install-lib: $(objects) $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET) $(objects)/$(SDLTEST_TARGET)
|
||||
$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)
|
||||
$(LIBTOOL) --mode=install $(INSTALL) $(objects)/$(TARGET) $(DESTDIR)$(libdir)/$(TARGET)
|
||||
$(INSTALL) -m 644 $(objects)/$(SDLMAIN_TARGET) $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET)
|
||||
$(RANLIB) $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET)
|
||||
$(INSTALL) -m 644 $(objects)/$(SDLTEST_TARGET) $(DESTDIR)$(libdir)/$(SDLTEST_TARGET)
|
||||
$(RANLIB) $(DESTDIR)$(libdir)/$(SDLTEST_TARGET)
|
||||
$(LIBTOOL) --mode=install $(INSTALL) $(objects)/$(SDLMAIN_TARGET) $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET)
|
||||
$(LIBTOOL) --mode=install $(INSTALL) $(objects)/$(SDLTEST_TARGET) $(DESTDIR)$(libdir)/$(SDLTEST_TARGET)
|
||||
install-data:
|
||||
$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(datadir)/aclocal
|
||||
$(INSTALL) -m 644 $(srcdir)/sdl2.m4 $(DESTDIR)$(datadir)/aclocal/sdl2.m4
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ STRIP = arm-none-linux-gnueabi-strip
|
|||
|
||||
CFLAGS = -O3 -march=armv7-a -mcpu=cortex-a8 -mtune=cortex-a8 -mfloat-abi=softfp \
|
||||
-mfpu=neon -ftree-vectorize -ffast-math -fomit-frame-pointer -fno-strict-aliasing -fsingle-precision-constant \
|
||||
-I./include -I$(PNDSDK)/usr/include -DSDL_REVISION=0
|
||||
-I./include -I$(PNDSDK)/usr/include
|
||||
|
||||
TARGET = libSDL.a
|
||||
|
||||
|
|
@ -25,7 +25,7 @@ SOURCES = ./src/*.c ./src/audio/*.c ./src/cpuinfo/*.c ./src/events/*.c \
|
|||
|
||||
OBJECTS = $(shell echo $(SOURCES) | sed -e 's,\.c,\.o,g')
|
||||
|
||||
CONFIG_H = $(shell cp include/SDL_config_pandora.h include/SDL_config.h && touch include/SDL_revision.h)
|
||||
CONFIG_H = $(shell cp include/SDL_config_pandora.h include/SDL_config.h)
|
||||
|
||||
all: $(TARGET)
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ designed to make it easy to write multi-media software, such as games
|
|||
and emulators.
|
||||
|
||||
The Simple DirectMedia Layer library source code is available from:
|
||||
http://www.libsdl.org/
|
||||
https://www.libsdl.org/
|
||||
|
||||
This library is distributed under the terms of the zlib license:
|
||||
http://www.zlib.net/zlib_license.html
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
Version 2.0
|
||||
|
||||
---
|
||||
http://www.libsdl.org/
|
||||
https://www.libsdl.org/
|
||||
|
||||
Simple DirectMedia Layer is a cross-platform development library designed
|
||||
to provide low level access to audio, keyboard, mouse, joystick, and graphics
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
Summary: Simple DirectMedia Layer
|
||||
Name: SDL2
|
||||
Version: 2.0.5
|
||||
Version: 2.0.8
|
||||
Release: 2
|
||||
Source: http://www.libsdl.org/release/%{name}-%{version}.tar.gz
|
||||
URL: http://www.libsdl.org/
|
||||
|
|
|
|||
1
Engine/lib/sdl/SDL2Config.cmake
Normal file
1
Engine/lib/sdl/SDL2Config.cmake
Normal file
|
|
@ -0,0 +1 @@
|
|||
include("${CMAKE_CURRENT_LIST_DIR}/SDL2Targets.cmake")
|
||||
|
|
@ -1,6 +1,137 @@
|
|||
|
||||
This is a list of major changes in SDL's version history.
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
2.0.8:
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
General:
|
||||
* Added SDL_fmod() and SDL_log10()
|
||||
* Each of the SDL math functions now has the corresponding float version
|
||||
* Added SDL_SetYUVConversionMode() and SDL_GetYUVConversionMode() to control the formula used when converting to and from YUV colorspace. The options are JPEG, BT.601, and BT.709
|
||||
|
||||
Windows:
|
||||
* Implemented WASAPI support on Windows UWP and removed the deprecated XAudio2 implementation
|
||||
* Added resampling support on WASAPI on Windows 7 and above
|
||||
|
||||
Windows UWP:
|
||||
* Added SDL_WinRTGetDeviceFamily() to find out what type of device your application is running on
|
||||
|
||||
Mac OS X:
|
||||
* Added support for the Vulkan SDK for Mac:
|
||||
https://www.lunarg.com/lunarg-releases-vulkan-sdk-1-0-69-0-for-mac/
|
||||
* Added support for OpenGL ES using ANGLE when it's available
|
||||
|
||||
Mac OS X / iOS / tvOS:
|
||||
* Added a Metal 2D render implementation
|
||||
* Added SDL_RenderGetMetalLayer() and SDL_RenderGetMetalCommandEncoder() to insert your own drawing into SDL rendering when using the Metal implementation
|
||||
|
||||
iOS:
|
||||
* Added the hint SDL_HINT_IOS_HIDE_HOME_INDICATOR to control whether the home indicator bar on iPhone X should be hidden. This defaults to dimming the indicator for fullscreen applications and showing the indicator for windowed applications.
|
||||
|
||||
iOS / Android:
|
||||
* Added the hint SDL_HINT_RETURN_KEY_HIDES_IME to control whether the return key on the software keyboard should hide the keyboard or send a key event (the default)
|
||||
|
||||
Android:
|
||||
* SDL now supports building with Android Studio and Gradle by default, and the old Ant project is available in android-project-ant
|
||||
* SDL now requires the API 19 SDK to build, but can still target devices down to API 14 (Android 4.0.1)
|
||||
* Added SDL_IsAndroidTV() to tell whether the application is running on Android TV
|
||||
|
||||
Android / tvOS:
|
||||
* Added the hint SDL_HINT_TV_REMOTE_AS_JOYSTICK to control whether TV remotes should be listed as joystick devices (the default) or send keyboard events.
|
||||
|
||||
Linux:
|
||||
* Added the hint SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR to control whether the X server should skip the compositor for the SDL application. This defaults to "1"
|
||||
* Added the hint SDL_HINT_VIDEO_DOUBLE_BUFFER to control whether the Raspberry Pi and KMSDRM video drivers should use double or triple buffering (the default)
|
||||
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
2.0.7:
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
General:
|
||||
* Added audio stream conversion functions:
|
||||
SDL_NewAudioStream
|
||||
SDL_AudioStreamPut
|
||||
SDL_AudioStreamGet
|
||||
SDL_AudioStreamAvailable
|
||||
SDL_AudioStreamFlush
|
||||
SDL_AudioStreamClear
|
||||
SDL_FreeAudioStream
|
||||
* Added functions to query and set the SDL memory allocation functions:
|
||||
SDL_GetMemoryFunctions()
|
||||
SDL_SetMemoryFunctions()
|
||||
SDL_GetNumAllocations()
|
||||
* Added locking functions for multi-threaded access to the joystick and game controller APIs:
|
||||
SDL_LockJoysticks()
|
||||
SDL_UnlockJoysticks()
|
||||
* The following functions are now thread-safe:
|
||||
SDL_SetEventFilter()
|
||||
SDL_GetEventFilter()
|
||||
SDL_AddEventWatch()
|
||||
SDL_DelEventWatch()
|
||||
|
||||
|
||||
General:
|
||||
---------------------------------------------------------------------------
|
||||
2.0.6:
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
General:
|
||||
* Added cross-platform Vulkan graphics support in SDL_vulkan.h
|
||||
SDL_Vulkan_LoadLibrary()
|
||||
SDL_Vulkan_GetVkGetInstanceProcAddr()
|
||||
SDL_Vulkan_GetInstanceExtensions()
|
||||
SDL_Vulkan_CreateSurface()
|
||||
SDL_Vulkan_GetDrawableSize()
|
||||
SDL_Vulkan_UnloadLibrary()
|
||||
This is all the platform-specific code you need to bring up Vulkan on all SDL platforms. You can look at an example in test/testvulkan.c
|
||||
* Added SDL_ComposeCustomBlendMode() to create custom blend modes for 2D rendering
|
||||
* Added SDL_HasNEON() which returns whether the CPU has NEON instruction support
|
||||
* Added support for many game controllers, including the Nintendo Switch Pro Controller
|
||||
* Added support for inverted axes and separate axis directions in game controller mappings
|
||||
* Added functions to return information about a joystick before it's opened:
|
||||
SDL_JoystickGetDeviceVendor()
|
||||
SDL_JoystickGetDeviceProduct()
|
||||
SDL_JoystickGetDeviceProductVersion()
|
||||
SDL_JoystickGetDeviceType()
|
||||
SDL_JoystickGetDeviceInstanceID()
|
||||
* Added functions to return information about an open joystick:
|
||||
SDL_JoystickGetVendor()
|
||||
SDL_JoystickGetProduct()
|
||||
SDL_JoystickGetProductVersion()
|
||||
SDL_JoystickGetType()
|
||||
SDL_JoystickGetAxisInitialState()
|
||||
* Added functions to return information about an open game controller:
|
||||
SDL_GameControllerGetVendor()
|
||||
SDL_GameControllerGetProduct()
|
||||
SDL_GameControllerGetProductVersion()
|
||||
* Added SDL_GameControllerNumMappings() and SDL_GameControllerMappingForIndex() to be able to enumerate the built-in game controller mappings
|
||||
* Added SDL_LoadFile() and SDL_LoadFile_RW() to load a file into memory
|
||||
* Added SDL_DuplicateSurface() to make a copy of a surface
|
||||
* Added an experimental JACK audio driver
|
||||
* Implemented non-power-of-two audio resampling, optionally using libsamplerate to perform the resampling
|
||||
* Added the hint SDL_HINT_AUDIO_RESAMPLING_MODE to control the quality of resampling
|
||||
* Added the hint SDL_HINT_RENDER_LOGICAL_SIZE_MODE to control the scaling policy for SDL_RenderSetLogicalSize():
|
||||
"0" or "letterbox" - Uses letterbox/sidebars to fit the entire rendering on screen (the default)
|
||||
"1" or "overscan" - Will zoom the rendering so it fills the entire screen, allowing edges to be drawn offscreen
|
||||
* Added the hints SDL_HINT_MOUSE_NORMAL_SPEED_SCALE and SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE to scale the mouse speed when being read from raw mouse input
|
||||
* Added the hint SDL_HINT_TOUCH_MOUSE_EVENTS to control whether SDL will synthesize mouse events from touch events
|
||||
|
||||
Windows:
|
||||
* The new default audio driver on Windows is WASAPI and supports hot-plugging devices and changing the default audio device
|
||||
* The old XAudio2 audio driver is deprecated and will be removed in the next release
|
||||
* Added hints SDL_HINT_WINDOWS_INTRESOURCE_ICON and SDL_HINT_WINDOWS_INTRESOURCE_ICON_SMALL to specify a custom icon resource ID for SDL windows
|
||||
* The hint SDL_HINT_WINDOWS_DISABLE_THREAD_NAMING is now on by default for compatibility with .NET languages and various Windows debuggers
|
||||
* Updated the GUID format for game controller mappings, older mappings will be automatically converted on load
|
||||
* Implemented the SDL_WINDOW_ALWAYS_ON_TOP flag on Windows
|
||||
|
||||
Linux:
|
||||
* Added an experimental KMS/DRM video driver for embedded development
|
||||
|
||||
iOS:
|
||||
* Added a hint SDL_HINT_AUDIO_CATEGORY to control the audio category, determining whether the phone mute switch affects the audio
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
2.0.5:
|
||||
---------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -1,28 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>http://www.libsdl.org</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string></string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>Simple DirectMedia Layer</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>2.0.5</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>SDLX</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>2.0.5</string>
|
||||
</dict>
|
||||
</plist>
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,15 +0,0 @@
|
|||
Title SDL 2.0.0
|
||||
Version 1
|
||||
Description SDL Library for Mac OS X (http://www.libsdl.org)
|
||||
DefaultLocation /Library/Frameworks
|
||||
Diskname (null)
|
||||
DeleteWarning
|
||||
NeedsAuthorization NO
|
||||
DisableStop NO
|
||||
UseUserMask NO
|
||||
Application NO
|
||||
Relocatable YES
|
||||
Required NO
|
||||
InstallOnly NO
|
||||
RequiresReboot NO
|
||||
InstallFat NO
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2016 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.
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
The Simple DirectMedia Layer (SDL for short) is a cross-platform
|
||||
library designed to make it easy to write multi-media software,
|
||||
such as games and emulators.
|
||||
|
||||
The Simple DirectMedia Layer library source code is available from:
|
||||
http://www.libsdl.org/
|
||||
|
||||
This library is distributed under the terms of the zlib license:
|
||||
http://zlib.net/zlib_license.html
|
||||
|
||||
|
||||
This packages contains the SDL framework for OS X.
|
||||
Conforming with Apple guidelines, this framework
|
||||
contains both the SDL runtime component and development header files.
|
||||
|
||||
|
||||
To Install:
|
||||
Copy the SDL2.framework to /Library/Frameworks
|
||||
|
||||
You may alternatively install it in <Your home directory>/Library/Frameworks
|
||||
if your access privileges are not high enough.
|
||||
|
||||
|
||||
Additional References:
|
||||
|
||||
- Screencast tutorials for getting started with OpenSceneGraph/Mac OS X are
|
||||
available at:
|
||||
http://www.openscenegraph.org/projects/osg/wiki/Support/Tutorials/MacOSXTips
|
||||
Though these are OpenSceneGraph centric, the same exact concepts apply to
|
||||
SDL, thus the videos are recommended for everybody getting started with
|
||||
developing on Mac OS X. (You can skim over the PlugIns stuff since SDL
|
||||
doesn't have any PlugIns to worry about.)
|
||||
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load diff
|
|
@ -1,35 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleDocumentTypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Alternate</string>
|
||||
<key>LSItemContentTypes</key>
|
||||
<array>
|
||||
<string>public.data</string>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.libsdl.test-dropfile</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>10.6</string>
|
||||
</dict>
|
||||
</plist>
|
||||
File diff suppressed because it is too large
Load diff
5
Engine/lib/sdl/acinclude/libtool.m4
vendored
5
Engine/lib/sdl/acinclude/libtool.m4
vendored
|
|
@ -1347,7 +1347,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
|
|||
x86_64-*linux*)
|
||||
LD="${LD-ld} -m elf_x86_64"
|
||||
;;
|
||||
ppc*-*linux*|powerpc*-*linux*)
|
||||
powerpc64le-*linux*)
|
||||
LD="${LD-ld} -m elf64lppc"
|
||||
;;
|
||||
powerpc64-*linux*)
|
||||
LD="${LD-ld} -m elf64ppc"
|
||||
;;
|
||||
s390*-*linux*|s390*-*tpf*)
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ echo "This may take a while ..."
|
|||
|
||||
srcdir=`dirname $0`
|
||||
test -z "$srcdir" && srcdir=.
|
||||
pushd $srcdir
|
||||
cd "$srcdir"
|
||||
|
||||
# Regenerate configuration files
|
||||
cat acinclude/* >aclocal.m4
|
||||
|
|
@ -19,7 +19,5 @@ if test x$found = xfalse; then
|
|||
fi
|
||||
(cd test; sh autogen.sh)
|
||||
|
||||
popd
|
||||
|
||||
# Run configure for this platform
|
||||
echo "Now you are ready to run ./configure"
|
||||
|
|
|
|||
|
|
@ -25,46 +25,21 @@ if [ -z "$1" ] || [ -z "$SOURCES" ]; then
|
|||
echo "Usage: androidbuild.sh com.yourcompany.yourapp < sources.list"
|
||||
echo "Usage: androidbuild.sh com.yourcompany.yourapp source1.c source2.c ...sourceN.c"
|
||||
echo "To copy SDL source instead of symlinking: COPYSOURCE=1 androidbuild.sh ... "
|
||||
echo "You can pass additional arguments to ndk-build with the NDKARGS variable: NDKARGS=\"-s\" androidbuild.sh ..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
|
||||
SDLPATH="$( cd "$(dirname "$0")/.." ; pwd -P )"
|
||||
|
||||
NDKBUILD=`which ndk-build`
|
||||
if [ -z "$NDKBUILD" ];then
|
||||
echo "Could not find the ndk-build utility, install Android's NDK and add it to the path"
|
||||
if [ -z "$ANDROID_HOME" ];then
|
||||
echo "Please set the ANDROID_HOME directory to the path of the Android SDK"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
ANDROID=`which android`
|
||||
if [ -z "$ANDROID" ];then
|
||||
echo "Could not find the android utility, install Android's SDK and add it to the path"
|
||||
if [ ! -d "$ANDROID_HOME/ndk-bundle" -a -z "$ANDROID_NDK_HOME" ]; then
|
||||
echo "Please set the ANDROID_NDK_HOME directory to the path of the Android NDK"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
ANT=`which ant`
|
||||
|
||||
if [ -z "$ANT" ];then
|
||||
echo "Could not find the ant utility, install Android's SDK and add it to the path"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
NCPUS="1"
|
||||
case "$OSTYPE" in
|
||||
darwin*)
|
||||
NCPU=`sysctl -n hw.ncpu`
|
||||
;;
|
||||
linux*)
|
||||
if [ -n `which nproc` ]; then
|
||||
NCPUS=`nproc`
|
||||
fi
|
||||
;;
|
||||
*);;
|
||||
esac
|
||||
|
||||
APP="$1"
|
||||
APPARR=(${APP//./ })
|
||||
BUILDPATH="$SDLPATH/build/$APP"
|
||||
|
|
@ -77,27 +52,28 @@ mkdir -p $BUILDPATH
|
|||
cp -r $SDLPATH/android-project/* $BUILDPATH
|
||||
|
||||
# Copy SDL sources
|
||||
mkdir -p $BUILDPATH/jni/SDL
|
||||
mkdir -p $BUILDPATH/app/jni/SDL
|
||||
if [ -z "$COPYSOURCE" ]; then
|
||||
ln -s $SDLPATH/src $BUILDPATH/jni/SDL
|
||||
ln -s $SDLPATH/include $BUILDPATH/jni/SDL
|
||||
ln -s $SDLPATH/src $BUILDPATH/app/jni/SDL
|
||||
ln -s $SDLPATH/include $BUILDPATH/app/jni/SDL
|
||||
else
|
||||
cp -r $SDLPATH/src $BUILDPATH/jni/SDL
|
||||
cp -r $SDLPATH/include $BUILDPATH/jni/SDL
|
||||
cp -r $SDLPATH/src $BUILDPATH/app/jni/SDL
|
||||
cp -r $SDLPATH/include $BUILDPATH/app/jni/SDL
|
||||
fi
|
||||
|
||||
cp -r $SDLPATH/Android.mk $BUILDPATH/jni/SDL
|
||||
sed -i -e "s|YourSourceHere.c|$MKSOURCES|g" $BUILDPATH/jni/src/Android.mk
|
||||
sed -i -e "s|org\.libsdl\.app|$APP|g" $BUILDPATH/AndroidManifest.xml
|
||||
cp -r $SDLPATH/Android.mk $BUILDPATH/app/jni/SDL
|
||||
sed -i -e "s|YourSourceHere.c|$MKSOURCES|g" $BUILDPATH/app/jni/src/Android.mk
|
||||
sed -i -e "s|org\.libsdl\.app|$APP|g" $BUILDPATH/app/build.gradle
|
||||
sed -i -e "s|org\.libsdl\.app|$APP|g" $BUILDPATH/app/src/main/AndroidManifest.xml
|
||||
|
||||
# Copy user sources
|
||||
for src in "${SOURCES[@]}"
|
||||
do
|
||||
cp $src $BUILDPATH/jni/src
|
||||
cp $src $BUILDPATH/app/jni/src
|
||||
done
|
||||
|
||||
# Create an inherited Activity
|
||||
cd $BUILDPATH/src
|
||||
cd $BUILDPATH/app/src/main/java
|
||||
for folder in "${APPARR[@]}"
|
||||
do
|
||||
mkdir -p $folder
|
||||
|
|
@ -105,31 +81,20 @@ do
|
|||
done
|
||||
|
||||
ACTIVITY="${folder}Activity"
|
||||
sed -i -e "s|SDLActivity|$ACTIVITY|g" $BUILDPATH/AndroidManifest.xml
|
||||
sed -i -e "s|SDLActivity|$APP|g" $BUILDPATH/build.xml
|
||||
sed -i -e "s|\"SDLActivity\"|\"$ACTIVITY\"|g" $BUILDPATH/app/src/main/AndroidManifest.xml
|
||||
|
||||
# Fill in a default Activity
|
||||
echo "package $APP;" > "$ACTIVITY.java"
|
||||
echo "import org.libsdl.app.SDLActivity;" >> "$ACTIVITY.java"
|
||||
echo "public class $ACTIVITY extends SDLActivity {}" >> "$ACTIVITY.java"
|
||||
cat >"$ACTIVITY.java" <<__EOF__
|
||||
package $APP;
|
||||
|
||||
import org.libsdl.app.SDLActivity;
|
||||
|
||||
public class $ACTIVITY extends SDLActivity
|
||||
{
|
||||
}
|
||||
__EOF__
|
||||
|
||||
# Update project and build
|
||||
cd $BUILDPATH
|
||||
$ANDROID update project --path $BUILDPATH
|
||||
$NDKBUILD -j $NCPUS $NDKARGS
|
||||
$ANT debug
|
||||
|
||||
cd $CURDIR
|
||||
|
||||
APK="$BUILDPATH/bin/$APP-debug.apk"
|
||||
|
||||
if [ -f "$APK" ]; then
|
||||
echo "Your APK is ready at $APK"
|
||||
echo "To install to your device: "
|
||||
echo "cd $BUILDPATH"
|
||||
echo "ant debug install"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "There was an error building the APK"
|
||||
exit 1
|
||||
echo "To build and install to a device for testing, run the following:"
|
||||
echo "cd $BUILDPATH"
|
||||
echo "./gradlew installDebug"
|
||||
|
|
|
|||
74
Engine/lib/sdl/build-scripts/androidbuildlibs.sh
Executable file
74
Engine/lib/sdl/build-scripts/androidbuildlibs.sh
Executable file
|
|
@ -0,0 +1,74 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Build the Android libraries without needing a project
|
||||
# (AndroidManifest.xml, jni/{Application,Android}.mk, etc.)
|
||||
#
|
||||
# Usage: androidbuildlibs.sh [arg for ndk-build ...]"
|
||||
#
|
||||
# Useful NDK arguments:
|
||||
#
|
||||
# NDK_DEBUG=1 - build debug version
|
||||
# NDK_LIBS_OUT=<dest> - specify alternate destination for installable
|
||||
# modules.
|
||||
#
|
||||
# Note that SDLmain is not an installable module (.so) so libSDLmain.a
|
||||
# can be found in $obj/local/<abi> along with the unstripped libSDL.so.
|
||||
#
|
||||
|
||||
|
||||
# Android.mk is in srcdir
|
||||
srcdir=`dirname $0`/..
|
||||
srcdir=`cd $srcdir && pwd`
|
||||
cd $srcdir
|
||||
|
||||
|
||||
#
|
||||
# Create the build directories
|
||||
#
|
||||
|
||||
build=build
|
||||
buildandroid=$build/android
|
||||
obj=
|
||||
lib=
|
||||
ndk_args=
|
||||
|
||||
# Allow an external caller to specify locations.
|
||||
for arg in $*
|
||||
do
|
||||
if [ "${arg:0:8}" == "NDK_OUT=" ]; then
|
||||
obj=${arg#NDK_OUT=}
|
||||
elif [ "${arg:0:13}" == "NDK_LIBS_OUT=" ]; then
|
||||
lib=${arg#NDK_LIBS_OUT=}
|
||||
else
|
||||
ndk_args="$ndk_args $arg"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -z $obj ]; then
|
||||
obj=$buildandroid/obj
|
||||
fi
|
||||
if [ -z $lib ]; then
|
||||
lib=$buildandroid/lib
|
||||
fi
|
||||
|
||||
for dir in $build $buildandroid $obj $lib; do
|
||||
if test -d $dir; then
|
||||
:
|
||||
else
|
||||
mkdir $dir || exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
# APP_* variables set in the environment here will not be seen by the
|
||||
# ndk-build makefile segments that use them, e.g., default-application.mk.
|
||||
# For consistency, pass all values on the command line.
|
||||
ndk-build \
|
||||
NDK_PROJECT_PATH=null \
|
||||
NDK_OUT=$obj \
|
||||
NDK_LIBS_OUT=$lib \
|
||||
APP_BUILD_SCRIPT=Android.mk \
|
||||
APP_ABI="armeabi-v7a arm64-v8a x86 x86_64" \
|
||||
APP_PLATFORM=android-14 \
|
||||
APP_MODULES="SDL2 SDL2_main" \
|
||||
$ndk_args
|
||||
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
FINALDIR="$1"
|
||||
|
||||
CHECKERDIR="/usr/local/checker-276"
|
||||
CHECKERDIR="/usr/local/checker-279"
|
||||
if [ ! -d "$CHECKERDIR" ]; then
|
||||
echo "$CHECKERDIR not found. Trying /usr/share/clang ..." 1>&2
|
||||
CHECKERDIR="/usr/share/clang/scan-build"
|
||||
|
|
@ -46,6 +46,10 @@ fi
|
|||
|
||||
echo "\$MAKE is '$MAKE'"
|
||||
|
||||
# Unset $MAKE so submakes don't use it.
|
||||
MAKECOMMAND="$MAKE"
|
||||
unset MAKE
|
||||
|
||||
set -x
|
||||
set -e
|
||||
|
||||
|
|
@ -60,17 +64,23 @@ fi
|
|||
mkdir checker-buildbot
|
||||
cd checker-buildbot
|
||||
|
||||
# We turn off deprecated declarations, because we don't care about these warnings during static analysis.
|
||||
# The -Wno-liblto is new since our checker-279 upgrade, I think; checker otherwise warns "libLTO.dylib relative to clang installed dir not found"
|
||||
|
||||
# You might want to do this for CMake-backed builds instead...
|
||||
PATH="$CHECKERDIR:$PATH" scan-build -o analysis cmake -DCMAKE_BUILD_TYPE=Debug -DASSERTIONS=enabled ..
|
||||
PATH="$CHECKERDIR/bin:$PATH" scan-build -o analysis cmake -Wno-dev -DSDL_STATIC=OFF -DCMAKE_BUILD_TYPE=Debug -DASSERTIONS=enabled -DCMAKE_C_FLAGS="-Wno-deprecated-declarations" -DCMAKE_SHARED_LINKER_FLAGS="-Wno-liblto" ..
|
||||
|
||||
# ...or run configure without the scan-build wrapper...
|
||||
#CC="$CHECKERDIR/libexec/ccc-analyzer" CFLAGS="-O0" ../configure --enable-assertions=enabled
|
||||
|
||||
# ...but this works for our buildbots just fine (EXCEPT ON LATEST MAC OS X).
|
||||
#CFLAGS="-O0" PATH="$CHECKERDIR:$PATH" scan-build -o analysis ../configure --enable-assertions=enabled
|
||||
#CC="$CHECKERDIR/libexec/ccc-analyzer" CFLAGS="-O0 -Wno-deprecated-declarations" LDFLAGS="-Wno-liblto" ../configure --enable-assertions=enabled
|
||||
|
||||
rm -rf analysis
|
||||
PATH="$CHECKERDIR:$PATH" scan-build -o analysis $MAKE
|
||||
PATH="$CHECKERDIR/bin:$PATH" scan-build -o analysis $MAKECOMMAND
|
||||
|
||||
if [ `ls -A analysis |wc -l` == 0 ] ; then
|
||||
mkdir analysis/zarro
|
||||
echo '<html><head><title>Zarro boogs</title></head><body>Static analysis: no issues to report.</body></html>' >analysis/zarro/index.html
|
||||
fi
|
||||
|
||||
mv analysis/* ../analysis
|
||||
rmdir analysis # Make sure this is empty.
|
||||
cd ..
|
||||
|
|
|
|||
514
Engine/lib/sdl/build-scripts/config.guess
vendored
514
Engine/lib/sdl/build-scripts/config.guess
vendored
|
|
@ -1,14 +1,12 @@
|
|||
#! /bin/sh
|
||||
# Attempt to guess a canonical system name.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
|
||||
# 2011, 2012 Free Software Foundation, Inc.
|
||||
# Copyright 1992-2017 Free Software Foundation, Inc.
|
||||
|
||||
timestamp='2012-08-14'
|
||||
timestamp='2017-08-08'
|
||||
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
|
|
@ -22,19 +20,17 @@ timestamp='2012-08-14'
|
|||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
|
||||
# Originally written by Per Bothner. Please send patches (context
|
||||
# diff format) to <config-patches@gnu.org> and include a ChangeLog
|
||||
# entry.
|
||||
# the same distribution terms that you use for the rest of that
|
||||
# program. This Exception is an additional permission under section 7
|
||||
# of the GNU General Public License, version 3 ("GPLv3").
|
||||
#
|
||||
# This script attempts to guess a canonical system name similar to
|
||||
# config.sub. If it succeeds, it prints the system name on stdout, and
|
||||
# exits with 0. Otherwise, it exits with 1.
|
||||
# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
|
||||
#
|
||||
# You can get the latest version of this script from:
|
||||
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
|
||||
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
|
||||
#
|
||||
# Please send patches to <config-patches@gnu.org>.
|
||||
|
||||
|
||||
me=`echo "$0" | sed -e 's,.*/,,'`
|
||||
|
||||
|
|
@ -54,9 +50,7 @@ version="\
|
|||
GNU config.guess ($timestamp)
|
||||
|
||||
Originally written by Per Bothner.
|
||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
|
||||
Free Software Foundation, Inc.
|
||||
Copyright 1992-2017 Free Software Foundation, Inc.
|
||||
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||
|
|
@ -138,6 +132,27 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
|
|||
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
|
||||
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
|
||||
|
||||
case "${UNAME_SYSTEM}" in
|
||||
Linux|GNU|GNU/*)
|
||||
# If the system lacks a compiler, then just pick glibc.
|
||||
# We could probably try harder.
|
||||
LIBC=gnu
|
||||
|
||||
eval $set_cc_for_build
|
||||
cat <<-EOF > $dummy.c
|
||||
#include <features.h>
|
||||
#if defined(__UCLIBC__)
|
||||
LIBC=uclibc
|
||||
#elif defined(__dietlibc__)
|
||||
LIBC=dietlibc
|
||||
#else
|
||||
LIBC=gnu
|
||||
#endif
|
||||
EOF
|
||||
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
|
||||
;;
|
||||
esac
|
||||
|
||||
# Note: order is significant - the case branches are not exclusive.
|
||||
|
||||
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
|
|
@ -153,19 +168,29 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
|||
# Note: NetBSD doesn't particularly care about the vendor
|
||||
# portion of the name. We always set it to "unknown".
|
||||
sysctl="sysctl -n hw.machine_arch"
|
||||
UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
|
||||
/usr/sbin/$sysctl 2>/dev/null || echo unknown)`
|
||||
UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
|
||||
/sbin/$sysctl 2>/dev/null || \
|
||||
/usr/sbin/$sysctl 2>/dev/null || \
|
||||
echo unknown)`
|
||||
case "${UNAME_MACHINE_ARCH}" in
|
||||
armeb) machine=armeb-unknown ;;
|
||||
arm*) machine=arm-unknown ;;
|
||||
sh3el) machine=shl-unknown ;;
|
||||
sh3eb) machine=sh-unknown ;;
|
||||
sh5el) machine=sh5le-unknown ;;
|
||||
earmv*)
|
||||
arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
|
||||
endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'`
|
||||
machine=${arch}${endian}-unknown
|
||||
;;
|
||||
*) machine=${UNAME_MACHINE_ARCH}-unknown ;;
|
||||
esac
|
||||
# The Operating System including object format, if it has switched
|
||||
# to ELF recently, or will in the future.
|
||||
# to ELF recently (or will in the future) and ABI.
|
||||
case "${UNAME_MACHINE_ARCH}" in
|
||||
earm*)
|
||||
os=netbsdelf
|
||||
;;
|
||||
arm*|i386|m68k|ns32k|sh3*|sparc|vax)
|
||||
eval $set_cc_for_build
|
||||
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
|
||||
|
|
@ -182,6 +207,13 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
|||
os=netbsd
|
||||
;;
|
||||
esac
|
||||
# Determine ABI tags.
|
||||
case "${UNAME_MACHINE_ARCH}" in
|
||||
earm*)
|
||||
expr='s/^earmv[0-9]/-eabi/;s/eb$//'
|
||||
abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"`
|
||||
;;
|
||||
esac
|
||||
# The OS release
|
||||
# Debian GNU/NetBSD machines have a different userland, and
|
||||
# thus, need a distinct triplet. However, they do not need
|
||||
|
|
@ -192,13 +224,13 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
|||
release='-gnu'
|
||||
;;
|
||||
*)
|
||||
release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
|
||||
release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2`
|
||||
;;
|
||||
esac
|
||||
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
|
||||
# contains redundant information, the shorter form:
|
||||
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
|
||||
echo "${machine}-${os}${release}"
|
||||
echo "${machine}-${os}${release}${abi}"
|
||||
exit ;;
|
||||
*:Bitrig:*:*)
|
||||
UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
|
||||
|
|
@ -208,6 +240,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
|||
UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
|
||||
echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
|
||||
exit ;;
|
||||
*:LibertyBSD:*:*)
|
||||
UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
|
||||
echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE}
|
||||
exit ;;
|
||||
*:ekkoBSD:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
|
||||
exit ;;
|
||||
|
|
@ -220,6 +256,12 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
|||
*:MirBSD:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
|
||||
exit ;;
|
||||
*:Sortix:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-sortix
|
||||
exit ;;
|
||||
*:Redox:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-redox
|
||||
exit ;;
|
||||
alpha:OSF1:*:*)
|
||||
case $UNAME_RELEASE in
|
||||
*4.0)
|
||||
|
|
@ -236,42 +278,42 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
|||
ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
|
||||
case "$ALPHA_CPU_TYPE" in
|
||||
"EV4 (21064)")
|
||||
UNAME_MACHINE="alpha" ;;
|
||||
UNAME_MACHINE=alpha ;;
|
||||
"EV4.5 (21064)")
|
||||
UNAME_MACHINE="alpha" ;;
|
||||
UNAME_MACHINE=alpha ;;
|
||||
"LCA4 (21066/21068)")
|
||||
UNAME_MACHINE="alpha" ;;
|
||||
UNAME_MACHINE=alpha ;;
|
||||
"EV5 (21164)")
|
||||
UNAME_MACHINE="alphaev5" ;;
|
||||
UNAME_MACHINE=alphaev5 ;;
|
||||
"EV5.6 (21164A)")
|
||||
UNAME_MACHINE="alphaev56" ;;
|
||||
UNAME_MACHINE=alphaev56 ;;
|
||||
"EV5.6 (21164PC)")
|
||||
UNAME_MACHINE="alphapca56" ;;
|
||||
UNAME_MACHINE=alphapca56 ;;
|
||||
"EV5.7 (21164PC)")
|
||||
UNAME_MACHINE="alphapca57" ;;
|
||||
UNAME_MACHINE=alphapca57 ;;
|
||||
"EV6 (21264)")
|
||||
UNAME_MACHINE="alphaev6" ;;
|
||||
UNAME_MACHINE=alphaev6 ;;
|
||||
"EV6.7 (21264A)")
|
||||
UNAME_MACHINE="alphaev67" ;;
|
||||
UNAME_MACHINE=alphaev67 ;;
|
||||
"EV6.8CB (21264C)")
|
||||
UNAME_MACHINE="alphaev68" ;;
|
||||
UNAME_MACHINE=alphaev68 ;;
|
||||
"EV6.8AL (21264B)")
|
||||
UNAME_MACHINE="alphaev68" ;;
|
||||
UNAME_MACHINE=alphaev68 ;;
|
||||
"EV6.8CX (21264D)")
|
||||
UNAME_MACHINE="alphaev68" ;;
|
||||
UNAME_MACHINE=alphaev68 ;;
|
||||
"EV6.9A (21264/EV69A)")
|
||||
UNAME_MACHINE="alphaev69" ;;
|
||||
UNAME_MACHINE=alphaev69 ;;
|
||||
"EV7 (21364)")
|
||||
UNAME_MACHINE="alphaev7" ;;
|
||||
UNAME_MACHINE=alphaev7 ;;
|
||||
"EV7.9 (21364A)")
|
||||
UNAME_MACHINE="alphaev79" ;;
|
||||
UNAME_MACHINE=alphaev79 ;;
|
||||
esac
|
||||
# A Pn.n version is a patched version.
|
||||
# A Vn.n version is a released version.
|
||||
# A Tn.n version is a released field test version.
|
||||
# A Xn.n version is an unreleased experimental baselevel.
|
||||
# 1.2 uses "1.2" for uname -r.
|
||||
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
||||
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
|
||||
# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
|
||||
exitcode=$?
|
||||
trap '' 0
|
||||
|
|
@ -306,7 +348,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
|||
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
|
||||
echo arm-acorn-riscix${UNAME_RELEASE}
|
||||
exit ;;
|
||||
arm:riscos:*:*|arm:RISCOS:*:*)
|
||||
arm*:riscos:*:*|arm*:RISCOS:*:*)
|
||||
echo arm-unknown-riscos
|
||||
exit ;;
|
||||
SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
|
||||
|
|
@ -344,16 +386,16 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
|||
exit ;;
|
||||
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
|
||||
eval $set_cc_for_build
|
||||
SUN_ARCH="i386"
|
||||
SUN_ARCH=i386
|
||||
# If there is a compiler, see if it is configured for 64-bit objects.
|
||||
# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
|
||||
# This test works for both compilers.
|
||||
if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
|
||||
if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
|
||||
if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
|
||||
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
|
||||
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
|
||||
grep IS_64BIT_ARCH >/dev/null
|
||||
then
|
||||
SUN_ARCH="x86_64"
|
||||
SUN_ARCH=x86_64
|
||||
fi
|
||||
fi
|
||||
echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
||||
|
|
@ -378,7 +420,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
|||
exit ;;
|
||||
sun*:*:4.2BSD:*)
|
||||
UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
|
||||
test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
|
||||
test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3
|
||||
case "`/bin/arch`" in
|
||||
sun3)
|
||||
echo m68k-sun-sunos${UNAME_RELEASE}
|
||||
|
|
@ -564,8 +606,9 @@ EOF
|
|||
else
|
||||
IBM_ARCH=powerpc
|
||||
fi
|
||||
if [ -x /usr/bin/oslevel ] ; then
|
||||
IBM_REV=`/usr/bin/oslevel`
|
||||
if [ -x /usr/bin/lslpp ] ; then
|
||||
IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
|
||||
awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
|
||||
else
|
||||
IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
|
||||
fi
|
||||
|
|
@ -602,13 +645,13 @@ EOF
|
|||
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
|
||||
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
|
||||
case "${sc_cpu_version}" in
|
||||
523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
|
||||
528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
|
||||
523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
|
||||
528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
|
||||
532) # CPU_PA_RISC2_0
|
||||
case "${sc_kernel_bits}" in
|
||||
32) HP_ARCH="hppa2.0n" ;;
|
||||
64) HP_ARCH="hppa2.0w" ;;
|
||||
'') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
|
||||
32) HP_ARCH=hppa2.0n ;;
|
||||
64) HP_ARCH=hppa2.0w ;;
|
||||
'') HP_ARCH=hppa2.0 ;; # HP-UX 10.20
|
||||
esac ;;
|
||||
esac
|
||||
fi
|
||||
|
|
@ -647,11 +690,11 @@ EOF
|
|||
exit (0);
|
||||
}
|
||||
EOF
|
||||
(CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
|
||||
(CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
|
||||
test -z "$HP_ARCH" && HP_ARCH=hppa
|
||||
fi ;;
|
||||
esac
|
||||
if [ ${HP_ARCH} = "hppa2.0w" ]
|
||||
if [ ${HP_ARCH} = hppa2.0w ]
|
||||
then
|
||||
eval $set_cc_for_build
|
||||
|
||||
|
|
@ -664,12 +707,12 @@ EOF
|
|||
# $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
|
||||
# => hppa64-hp-hpux11.23
|
||||
|
||||
if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
|
||||
if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
|
||||
grep -q __LP64__
|
||||
then
|
||||
HP_ARCH="hppa2.0w"
|
||||
HP_ARCH=hppa2.0w
|
||||
else
|
||||
HP_ARCH="hppa64"
|
||||
HP_ARCH=hppa64
|
||||
fi
|
||||
fi
|
||||
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
|
||||
|
|
@ -774,14 +817,14 @@ EOF
|
|||
echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
||||
exit ;;
|
||||
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
|
||||
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
||||
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
|
||||
FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
|
||||
FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
|
||||
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
|
||||
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
|
||||
exit ;;
|
||||
5000:UNIX_System_V:4.*:*)
|
||||
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
|
||||
FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
|
||||
FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
|
||||
FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
|
||||
echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
|
||||
exit ;;
|
||||
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
|
||||
|
|
@ -797,10 +840,11 @@ EOF
|
|||
UNAME_PROCESSOR=`/usr/bin/uname -p`
|
||||
case ${UNAME_PROCESSOR} in
|
||||
amd64)
|
||||
echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
|
||||
*)
|
||||
echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
|
||||
UNAME_PROCESSOR=x86_64 ;;
|
||||
i386)
|
||||
UNAME_PROCESSOR=i586 ;;
|
||||
esac
|
||||
echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
|
||||
exit ;;
|
||||
i*:CYGWIN*:*)
|
||||
echo ${UNAME_MACHINE}-pc-cygwin
|
||||
|
|
@ -811,7 +855,7 @@ EOF
|
|||
*:MINGW*:*)
|
||||
echo ${UNAME_MACHINE}-pc-mingw32
|
||||
exit ;;
|
||||
i*:MSYS*:*)
|
||||
*:MSYS*:*)
|
||||
echo ${UNAME_MACHINE}-pc-msys
|
||||
exit ;;
|
||||
i*:windows32*:*)
|
||||
|
|
@ -859,21 +903,21 @@ EOF
|
|||
exit ;;
|
||||
*:GNU:*:*)
|
||||
# the GNU system
|
||||
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
|
||||
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
|
||||
exit ;;
|
||||
*:GNU/*:*:*)
|
||||
# other systems with GNU libc and userland
|
||||
echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
|
||||
echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
|
||||
exit ;;
|
||||
i*86:Minix:*:*)
|
||||
echo ${UNAME_MACHINE}-pc-minix
|
||||
exit ;;
|
||||
aarch64:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
aarch64_be:Linux:*:*)
|
||||
UNAME_MACHINE=aarch64_be
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
alpha:Linux:*:*)
|
||||
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
|
||||
|
|
@ -886,64 +930,60 @@ EOF
|
|||
EV68*) UNAME_MACHINE=alphaev68 ;;
|
||||
esac
|
||||
objdump --private-headers /bin/sh | grep -q ld.so.1
|
||||
if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
|
||||
if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
arc:Linux:*:* | arceb:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
arm*:Linux:*:*)
|
||||
eval $set_cc_for_build
|
||||
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
|
||||
| grep -q __ARM_EABI__
|
||||
then
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
else
|
||||
case `sed -n '/^Hardware/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
|
||||
BCM2708) MANUFACTURER=raspberry;;
|
||||
BCM2709) MANUFACTURER=raspberry;;
|
||||
*) MANUFACTURER=unknown;;
|
||||
esac
|
||||
if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
|
||||
| grep -q __ARM_PCS_VFP
|
||||
then
|
||||
echo ${UNAME_MACHINE}-${MANUFACTURER}-linux-gnueabi
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
|
||||
else
|
||||
echo ${UNAME_MACHINE}-${MANUFACTURER}-linux-gnueabihf
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
|
||||
fi
|
||||
fi
|
||||
exit ;;
|
||||
avr32*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
cris:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-axis-linux-gnu
|
||||
echo ${UNAME_MACHINE}-axis-linux-${LIBC}
|
||||
exit ;;
|
||||
crisv32:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-axis-linux-gnu
|
||||
echo ${UNAME_MACHINE}-axis-linux-${LIBC}
|
||||
exit ;;
|
||||
e2k:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
frv:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
hexagon:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
i*86:Linux:*:*)
|
||||
LIBC=gnu
|
||||
eval $set_cc_for_build
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
#ifdef __dietlibc__
|
||||
LIBC=dietlibc
|
||||
#endif
|
||||
EOF
|
||||
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
|
||||
echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
|
||||
echo ${UNAME_MACHINE}-pc-linux-${LIBC}
|
||||
exit ;;
|
||||
ia64:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
k1om:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
m32r*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
m68*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
mips:Linux:*:* | mips64:Linux:*:*)
|
||||
eval $set_cc_for_build
|
||||
|
|
@ -962,54 +1002,69 @@ EOF
|
|||
#endif
|
||||
EOF
|
||||
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
|
||||
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
|
||||
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
|
||||
;;
|
||||
or32:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
mips64el:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
openrisc*:Linux:*:*)
|
||||
echo or1k-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
or32:Linux:*:* | or1k*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
padre:Linux:*:*)
|
||||
echo sparc-unknown-linux-gnu
|
||||
echo sparc-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
parisc64:Linux:*:* | hppa64:Linux:*:*)
|
||||
echo hppa64-unknown-linux-gnu
|
||||
echo hppa64-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
parisc:Linux:*:* | hppa:Linux:*:*)
|
||||
# Look for CPU level
|
||||
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
|
||||
PA7*) echo hppa1.1-unknown-linux-gnu ;;
|
||||
PA8*) echo hppa2.0-unknown-linux-gnu ;;
|
||||
*) echo hppa-unknown-linux-gnu ;;
|
||||
PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
|
||||
PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
|
||||
*) echo hppa-unknown-linux-${LIBC} ;;
|
||||
esac
|
||||
exit ;;
|
||||
ppc64:Linux:*:*)
|
||||
echo powerpc64-unknown-linux-gnu
|
||||
echo powerpc64-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
ppc:Linux:*:*)
|
||||
echo powerpc-unknown-linux-gnu
|
||||
echo powerpc-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
ppc64le:Linux:*:*)
|
||||
echo powerpc64le-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
ppcle:Linux:*:*)
|
||||
echo powerpcle-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
riscv32:Linux:*:* | riscv64:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
s390:Linux:*:* | s390x:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-ibm-linux
|
||||
echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
|
||||
exit ;;
|
||||
sh64*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
sh*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
sparc:Linux:*:* | sparc64:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
tile*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
vax:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-dec-linux-gnu
|
||||
echo ${UNAME_MACHINE}-dec-linux-${LIBC}
|
||||
exit ;;
|
||||
x86_64:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
echo ${UNAME_MACHINE}-pc-linux-${LIBC}
|
||||
exit ;;
|
||||
xtensa*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
i*86:DYNIX/ptx:4*:*)
|
||||
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
|
||||
|
|
@ -1085,7 +1140,7 @@ EOF
|
|||
# uname -m prints for DJGPP always 'pc', but it prints nothing about
|
||||
# the processor, so we play safe by assuming i586.
|
||||
# Note: whatever this is, it MUST be the same as what config.sub
|
||||
# prints for the "djgpp" host, or else GDB configury will decide that
|
||||
# prints for the "djgpp" host, or else GDB configure will decide that
|
||||
# this is a cross-build.
|
||||
echo i586-pc-msdosdjgpp
|
||||
exit ;;
|
||||
|
|
@ -1234,6 +1289,9 @@ EOF
|
|||
SX-8R:SUPER-UX:*:*)
|
||||
echo sx8r-nec-superux${UNAME_RELEASE}
|
||||
exit ;;
|
||||
SX-ACE:SUPER-UX:*:*)
|
||||
echo sxace-nec-superux${UNAME_RELEASE}
|
||||
exit ;;
|
||||
Power*:Rhapsody:*:*)
|
||||
echo powerpc-apple-rhapsody${UNAME_RELEASE}
|
||||
exit ;;
|
||||
|
|
@ -1242,24 +1300,43 @@ EOF
|
|||
exit ;;
|
||||
*:Darwin:*:*)
|
||||
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
|
||||
case $UNAME_PROCESSOR in
|
||||
i386)
|
||||
eval $set_cc_for_build
|
||||
if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
|
||||
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
|
||||
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
|
||||
grep IS_64BIT_ARCH >/dev/null
|
||||
then
|
||||
UNAME_PROCESSOR="x86_64"
|
||||
fi
|
||||
fi ;;
|
||||
unknown) UNAME_PROCESSOR=powerpc ;;
|
||||
esac
|
||||
eval $set_cc_for_build
|
||||
if test "$UNAME_PROCESSOR" = unknown ; then
|
||||
UNAME_PROCESSOR=powerpc
|
||||
fi
|
||||
if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
|
||||
if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
|
||||
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
|
||||
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
|
||||
grep IS_64BIT_ARCH >/dev/null
|
||||
then
|
||||
case $UNAME_PROCESSOR in
|
||||
i386) UNAME_PROCESSOR=x86_64 ;;
|
||||
powerpc) UNAME_PROCESSOR=powerpc64 ;;
|
||||
esac
|
||||
fi
|
||||
# On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
|
||||
if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
|
||||
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
|
||||
grep IS_PPC >/dev/null
|
||||
then
|
||||
UNAME_PROCESSOR=powerpc
|
||||
fi
|
||||
fi
|
||||
elif test "$UNAME_PROCESSOR" = i386 ; then
|
||||
# Avoid executing cc on OS X 10.9, as it ships with a stub
|
||||
# that puts up a graphical alert prompting to install
|
||||
# developer tools. Any system running Mac OS X 10.7 or
|
||||
# later (Darwin 11 and later) is required to have a 64-bit
|
||||
# processor. This is not true of the ARM version of Darwin
|
||||
# that Apple uses in portable devices.
|
||||
UNAME_PROCESSOR=x86_64
|
||||
fi
|
||||
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
|
||||
exit ;;
|
||||
*:procnto*:*:* | *:QNX:[0123456789]*:*)
|
||||
UNAME_PROCESSOR=`uname -p`
|
||||
if test "$UNAME_PROCESSOR" = "x86"; then
|
||||
if test "$UNAME_PROCESSOR" = x86; then
|
||||
UNAME_PROCESSOR=i386
|
||||
UNAME_MACHINE=pc
|
||||
fi
|
||||
|
|
@ -1268,15 +1345,18 @@ EOF
|
|||
*:QNX:*:4*)
|
||||
echo i386-pc-qnx
|
||||
exit ;;
|
||||
NEO-?:NONSTOP_KERNEL:*:*)
|
||||
NEO-*:NONSTOP_KERNEL:*:*)
|
||||
echo neo-tandem-nsk${UNAME_RELEASE}
|
||||
exit ;;
|
||||
NSE-*:NONSTOP_KERNEL:*:*)
|
||||
echo nse-tandem-nsk${UNAME_RELEASE}
|
||||
exit ;;
|
||||
NSR-?:NONSTOP_KERNEL:*:*)
|
||||
NSR-*:NONSTOP_KERNEL:*:*)
|
||||
echo nsr-tandem-nsk${UNAME_RELEASE}
|
||||
exit ;;
|
||||
NSX-*:NONSTOP_KERNEL:*:*)
|
||||
echo nsx-tandem-nsk${UNAME_RELEASE}
|
||||
exit ;;
|
||||
*:NonStop-UX:*:*)
|
||||
echo mips-compaq-nonstopux
|
||||
exit ;;
|
||||
|
|
@ -1290,7 +1370,7 @@ EOF
|
|||
# "uname -m" is not consistent, so use $cputype instead. 386
|
||||
# is converted to i386 for consistency with other x86
|
||||
# operating systems.
|
||||
if test "$cputype" = "386"; then
|
||||
if test "$cputype" = 386; then
|
||||
UNAME_MACHINE=i386
|
||||
else
|
||||
UNAME_MACHINE="$cputype"
|
||||
|
|
@ -1332,7 +1412,7 @@ EOF
|
|||
echo i386-pc-xenix
|
||||
exit ;;
|
||||
i*86:skyos:*:*)
|
||||
echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
|
||||
echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'`
|
||||
exit ;;
|
||||
i*86:rdos:*:*)
|
||||
echo ${UNAME_MACHINE}-pc-rdos
|
||||
|
|
@ -1343,171 +1423,25 @@ EOF
|
|||
x86_64:VMkernel:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-esx
|
||||
exit ;;
|
||||
amd64:Isilon\ OneFS:*:*)
|
||||
echo x86_64-unknown-onefs
|
||||
exit ;;
|
||||
esac
|
||||
|
||||
eval $set_cc_for_build
|
||||
cat >$dummy.c <<EOF
|
||||
#ifdef _SEQUENT_
|
||||
# include <sys/types.h>
|
||||
# include <sys/utsname.h>
|
||||
#endif
|
||||
main ()
|
||||
{
|
||||
#if defined (sony)
|
||||
#if defined (MIPSEB)
|
||||
/* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
|
||||
I don't know.... */
|
||||
printf ("mips-sony-bsd\n"); exit (0);
|
||||
#else
|
||||
#include <sys/param.h>
|
||||
printf ("m68k-sony-newsos%s\n",
|
||||
#ifdef NEWSOS4
|
||||
"4"
|
||||
#else
|
||||
""
|
||||
#endif
|
||||
); exit (0);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined (__arm) && defined (__acorn) && defined (__unix)
|
||||
printf ("arm-acorn-riscix\n"); exit (0);
|
||||
#endif
|
||||
|
||||
#if defined (hp300) && !defined (hpux)
|
||||
printf ("m68k-hp-bsd\n"); exit (0);
|
||||
#endif
|
||||
|
||||
#if defined (NeXT)
|
||||
#if !defined (__ARCHITECTURE__)
|
||||
#define __ARCHITECTURE__ "m68k"
|
||||
#endif
|
||||
int version;
|
||||
version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
|
||||
if (version < 4)
|
||||
printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
|
||||
else
|
||||
printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
|
||||
exit (0);
|
||||
#endif
|
||||
|
||||
#if defined (MULTIMAX) || defined (n16)
|
||||
#if defined (UMAXV)
|
||||
printf ("ns32k-encore-sysv\n"); exit (0);
|
||||
#else
|
||||
#if defined (CMU)
|
||||
printf ("ns32k-encore-mach\n"); exit (0);
|
||||
#else
|
||||
printf ("ns32k-encore-bsd\n"); exit (0);
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined (__386BSD__)
|
||||
printf ("i386-pc-bsd\n"); exit (0);
|
||||
#endif
|
||||
|
||||
#if defined (sequent)
|
||||
#if defined (i386)
|
||||
printf ("i386-sequent-dynix\n"); exit (0);
|
||||
#endif
|
||||
#if defined (ns32000)
|
||||
printf ("ns32k-sequent-dynix\n"); exit (0);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined (_SEQUENT_)
|
||||
struct utsname un;
|
||||
|
||||
uname(&un);
|
||||
|
||||
if (strncmp(un.version, "V2", 2) == 0) {
|
||||
printf ("i386-sequent-ptx2\n"); exit (0);
|
||||
}
|
||||
if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
|
||||
printf ("i386-sequent-ptx1\n"); exit (0);
|
||||
}
|
||||
printf ("i386-sequent-ptx\n"); exit (0);
|
||||
|
||||
#endif
|
||||
|
||||
#if defined (vax)
|
||||
# if !defined (ultrix)
|
||||
# include <sys/param.h>
|
||||
# if defined (BSD)
|
||||
# if BSD == 43
|
||||
printf ("vax-dec-bsd4.3\n"); exit (0);
|
||||
# else
|
||||
# if BSD == 199006
|
||||
printf ("vax-dec-bsd4.3reno\n"); exit (0);
|
||||
# else
|
||||
printf ("vax-dec-bsd\n"); exit (0);
|
||||
# endif
|
||||
# endif
|
||||
# else
|
||||
printf ("vax-dec-bsd\n"); exit (0);
|
||||
# endif
|
||||
# else
|
||||
printf ("vax-dec-ultrix\n"); exit (0);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined (alliant) && defined (i860)
|
||||
printf ("i860-alliant-bsd\n"); exit (0);
|
||||
#endif
|
||||
|
||||
exit (1);
|
||||
}
|
||||
EOF
|
||||
|
||||
$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
|
||||
{ echo "$SYSTEM_NAME"; exit; }
|
||||
|
||||
# Apollos put the system type in the environment.
|
||||
|
||||
test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
|
||||
|
||||
# Convex versions that predate uname can use getsysinfo(1)
|
||||
|
||||
if [ -x /usr/convex/getsysinfo ]
|
||||
then
|
||||
case `getsysinfo -f cpu_type` in
|
||||
c1*)
|
||||
echo c1-convex-bsd
|
||||
exit ;;
|
||||
c2*)
|
||||
if getsysinfo -f scalar_acc
|
||||
then echo c32-convex-bsd
|
||||
else echo c2-convex-bsd
|
||||
fi
|
||||
exit ;;
|
||||
c34*)
|
||||
echo c34-convex-bsd
|
||||
exit ;;
|
||||
c38*)
|
||||
echo c38-convex-bsd
|
||||
exit ;;
|
||||
c4*)
|
||||
echo c4-convex-bsd
|
||||
exit ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
cat >&2 <<EOF
|
||||
$0: unable to guess system type
|
||||
|
||||
This script, last modified $timestamp, has failed to recognize
|
||||
the operating system you are using. It is advised that you
|
||||
download the most up to date version of the config scripts from
|
||||
This script (version $timestamp), has failed to recognize the
|
||||
operating system you are using. If your script is old, overwrite *all*
|
||||
copies of config.guess and config.sub with the latest versions from:
|
||||
|
||||
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
|
||||
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
|
||||
and
|
||||
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
|
||||
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
|
||||
|
||||
If the version you run ($0) is already up to date, please
|
||||
send the following data and any information you think might be
|
||||
pertinent to <config-patches@gnu.org> in order to provide the needed
|
||||
information to handle your system.
|
||||
If $0 has already been updated, send the following data and any
|
||||
information you think might be pertinent to config-patches@gnu.org to
|
||||
provide the necessary information to handle your system.
|
||||
|
||||
config.guess timestamp = $timestamp
|
||||
|
||||
|
|
|
|||
177
Engine/lib/sdl/build-scripts/config.sub
vendored
177
Engine/lib/sdl/build-scripts/config.sub
vendored
|
|
@ -1,24 +1,18 @@
|
|||
#! /bin/sh
|
||||
# Configuration validation subroutine script.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
|
||||
# 2011, 2012 Free Software Foundation, Inc.
|
||||
# Copyright 1992-2017 Free Software Foundation, Inc.
|
||||
|
||||
timestamp='2012-08-18'
|
||||
timestamp='2017-04-02'
|
||||
|
||||
# This file is (in principle) common to ALL GNU software.
|
||||
# The presence of a machine in this file suggests that SOME GNU software
|
||||
# can handle that machine. It does not imply ALL GNU software can.
|
||||
#
|
||||
# This file is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
|
|
@ -26,11 +20,12 @@ timestamp='2012-08-18'
|
|||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
# the same distribution terms that you use for the rest of that
|
||||
# program. This Exception is an additional permission under section 7
|
||||
# of the GNU General Public License, version 3 ("GPLv3").
|
||||
|
||||
|
||||
# Please send patches to <config-patches@gnu.org>. Submit a context
|
||||
# diff and a properly formatted GNU ChangeLog entry.
|
||||
# Please send patches to <config-patches@gnu.org>.
|
||||
#
|
||||
# Configuration subroutine to validate and canonicalize a configuration type.
|
||||
# Supply the specified configuration type as an argument.
|
||||
|
|
@ -38,7 +33,7 @@ timestamp='2012-08-18'
|
|||
# Otherwise, we print the canonical config type on stdout and succeed.
|
||||
|
||||
# You can get the latest version of this script from:
|
||||
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
|
||||
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
|
||||
|
||||
# This file is supposed to be the same for all GNU packages
|
||||
# and recognize all the CPU types, system types and aliases
|
||||
|
|
@ -58,8 +53,7 @@ timestamp='2012-08-18'
|
|||
me=`echo "$0" | sed -e 's,.*/,,'`
|
||||
|
||||
usage="\
|
||||
Usage: $0 [OPTION] CPU-MFR-OPSYS
|
||||
$0 [OPTION] ALIAS
|
||||
Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
|
||||
|
||||
Canonicalize a configuration name.
|
||||
|
||||
|
|
@ -73,9 +67,7 @@ Report bugs and patches to <config-patches@gnu.org>."
|
|||
version="\
|
||||
GNU config.sub ($timestamp)
|
||||
|
||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
|
||||
Free Software Foundation, Inc.
|
||||
Copyright 1992-2017 Free Software Foundation, Inc.
|
||||
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||
|
|
@ -124,8 +116,8 @@ maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
|
|||
case $maybe_os in
|
||||
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
|
||||
linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
|
||||
knetbsd*-gnu* | netbsd*-gnu* | \
|
||||
kopensolaris*-gnu* | \
|
||||
knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
|
||||
kopensolaris*-gnu* | cloudabi*-eabi* | \
|
||||
storm-chaos* | os2-emx* | rtmk-nova*)
|
||||
os=-$maybe_os
|
||||
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
|
||||
|
|
@ -156,7 +148,7 @@ case $os in
|
|||
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
|
||||
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
|
||||
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
|
||||
-apple | -axis | -knuth | -cray | -microblaze)
|
||||
-apple | -axis | -knuth | -cray | -microblaze*)
|
||||
os=
|
||||
basic_machine=$1
|
||||
;;
|
||||
|
|
@ -259,21 +251,25 @@ case $basic_machine in
|
|||
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
|
||||
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
|
||||
| am33_2.0 \
|
||||
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
|
||||
| be32 | be64 \
|
||||
| arc | arceb \
|
||||
| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
|
||||
| avr | avr32 \
|
||||
| ba \
|
||||
| be32 | be64 \
|
||||
| bfin \
|
||||
| c4x | clipper \
|
||||
| c4x | c8051 | clipper \
|
||||
| d10v | d30v | dlx | dsp16xx \
|
||||
| epiphany \
|
||||
| fido | fr30 | frv \
|
||||
| e2k | epiphany \
|
||||
| fido | fr30 | frv | ft32 \
|
||||
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
|
||||
| hexagon \
|
||||
| i370 | i860 | i960 | ia64 \
|
||||
| i370 | i860 | i960 | ia16 | ia64 \
|
||||
| ip2k | iq2000 \
|
||||
| k1om \
|
||||
| le32 | le64 \
|
||||
| lm32 \
|
||||
| m32c | m32r | m32rle | m68000 | m68k | m88k \
|
||||
| maxq | mb | microblaze | mcore | mep | metag \
|
||||
| maxq | mb | microblaze | microblazeel | mcore | mep | metag \
|
||||
| mips | mipsbe | mipseb | mipsel | mipsle \
|
||||
| mips16 \
|
||||
| mips64 | mips64el \
|
||||
|
|
@ -287,26 +283,30 @@ case $basic_machine in
|
|||
| mips64vr5900 | mips64vr5900el \
|
||||
| mipsisa32 | mipsisa32el \
|
||||
| mipsisa32r2 | mipsisa32r2el \
|
||||
| mipsisa32r6 | mipsisa32r6el \
|
||||
| mipsisa64 | mipsisa64el \
|
||||
| mipsisa64r2 | mipsisa64r2el \
|
||||
| mipsisa64r6 | mipsisa64r6el \
|
||||
| mipsisa64sb1 | mipsisa64sb1el \
|
||||
| mipsisa64sr71k | mipsisa64sr71kel \
|
||||
| mipsr5900 | mipsr5900el \
|
||||
| mipstx39 | mipstx39el \
|
||||
| mn10200 | mn10300 \
|
||||
| moxie \
|
||||
| mt \
|
||||
| msp430 \
|
||||
| nds32 | nds32le | nds32be \
|
||||
| nios | nios2 \
|
||||
| nios | nios2 | nios2eb | nios2el \
|
||||
| ns16k | ns32k \
|
||||
| open8 \
|
||||
| or32 \
|
||||
| open8 | or1k | or1knd | or32 \
|
||||
| pdp10 | pdp11 | pj | pjl \
|
||||
| powerpc | powerpc64 | powerpc64le | powerpcle \
|
||||
| pru \
|
||||
| pyramid \
|
||||
| riscv32 | riscv64 \
|
||||
| rl78 | rx \
|
||||
| score \
|
||||
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
|
||||
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
|
||||
| sh64 | sh64le \
|
||||
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
|
||||
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
|
||||
|
|
@ -314,6 +314,8 @@ case $basic_machine in
|
|||
| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
|
||||
| ubicom32 \
|
||||
| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
|
||||
| visium \
|
||||
| wasm32 \
|
||||
| we32k \
|
||||
| x86 | xc16x | xstormy16 | xtensa \
|
||||
| z8k | z80)
|
||||
|
|
@ -328,7 +330,10 @@ case $basic_machine in
|
|||
c6x)
|
||||
basic_machine=tic6x-unknown
|
||||
;;
|
||||
m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
|
||||
leon|leon[3-9])
|
||||
basic_machine=sparc-$basic_machine
|
||||
;;
|
||||
m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
|
||||
basic_machine=$basic_machine-unknown
|
||||
os=-none
|
||||
;;
|
||||
|
|
@ -383,26 +388,29 @@ case $basic_machine in
|
|||
| aarch64-* | aarch64_be-* \
|
||||
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
|
||||
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
|
||||
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
|
||||
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
|
||||
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
|
||||
| avr-* | avr32-* \
|
||||
| ba-* \
|
||||
| be32-* | be64-* \
|
||||
| bfin-* | bs2000-* \
|
||||
| c[123]* | c30-* | [cjt]90-* | c4x-* \
|
||||
| clipper-* | craynv-* | cydra-* \
|
||||
| c8051-* | clipper-* | craynv-* | cydra-* \
|
||||
| d10v-* | d30v-* | dlx-* \
|
||||
| elxsi-* \
|
||||
| e2k-* | elxsi-* \
|
||||
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
|
||||
| h8300-* | h8500-* \
|
||||
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
|
||||
| hexagon-* \
|
||||
| i*86-* | i860-* | i960-* | ia64-* \
|
||||
| i*86-* | i860-* | i960-* | ia16-* | ia64-* \
|
||||
| ip2k-* | iq2000-* \
|
||||
| k1om-* \
|
||||
| le32-* | le64-* \
|
||||
| lm32-* \
|
||||
| m32c-* | m32r-* | m32rle-* \
|
||||
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
|
||||
| m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
|
||||
| m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
|
||||
| microblaze-* | microblazeel-* \
|
||||
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
|
||||
| mips16-* \
|
||||
| mips64-* | mips64el-* \
|
||||
|
|
@ -416,28 +424,34 @@ case $basic_machine in
|
|||
| mips64vr5900-* | mips64vr5900el-* \
|
||||
| mipsisa32-* | mipsisa32el-* \
|
||||
| mipsisa32r2-* | mipsisa32r2el-* \
|
||||
| mipsisa32r6-* | mipsisa32r6el-* \
|
||||
| mipsisa64-* | mipsisa64el-* \
|
||||
| mipsisa64r2-* | mipsisa64r2el-* \
|
||||
| mipsisa64r6-* | mipsisa64r6el-* \
|
||||
| mipsisa64sb1-* | mipsisa64sb1el-* \
|
||||
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
|
||||
| mipsr5900-* | mipsr5900el-* \
|
||||
| mipstx39-* | mipstx39el-* \
|
||||
| mmix-* \
|
||||
| mt-* \
|
||||
| msp430-* \
|
||||
| nds32-* | nds32le-* | nds32be-* \
|
||||
| nios-* | nios2-* \
|
||||
| nios-* | nios2-* | nios2eb-* | nios2el-* \
|
||||
| none-* | np1-* | ns16k-* | ns32k-* \
|
||||
| open8-* \
|
||||
| or1k*-* \
|
||||
| orion-* \
|
||||
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
|
||||
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
|
||||
| pru-* \
|
||||
| pyramid-* \
|
||||
| riscv32-* | riscv64-* \
|
||||
| rl78-* | romp-* | rs6000-* | rx-* \
|
||||
| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
|
||||
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
|
||||
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
|
||||
| sparclite-* \
|
||||
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
|
||||
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \
|
||||
| tahoe-* \
|
||||
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
|
||||
| tile*-* \
|
||||
|
|
@ -445,6 +459,8 @@ case $basic_machine in
|
|||
| ubicom32-* \
|
||||
| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
|
||||
| vax-* \
|
||||
| visium-* \
|
||||
| wasm32-* \
|
||||
| we32k-* \
|
||||
| x86-* | x86_64-* | xc16x-* | xps100-* \
|
||||
| xstormy16-* | xtensa*-* \
|
||||
|
|
@ -521,6 +537,9 @@ case $basic_machine in
|
|||
basic_machine=i386-pc
|
||||
os=-aros
|
||||
;;
|
||||
asmjs)
|
||||
basic_machine=asmjs-unknown
|
||||
;;
|
||||
aux)
|
||||
basic_machine=m68k-apple
|
||||
os=-aux
|
||||
|
|
@ -641,6 +660,14 @@ case $basic_machine in
|
|||
basic_machine=m68k-bull
|
||||
os=-sysv3
|
||||
;;
|
||||
e500v[12])
|
||||
basic_machine=powerpc-unknown
|
||||
os=$os"spe"
|
||||
;;
|
||||
e500v[12]-*)
|
||||
basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
os=$os"spe"
|
||||
;;
|
||||
ebmon29k)
|
||||
basic_machine=a29k-amd
|
||||
os=-ebmon
|
||||
|
|
@ -782,6 +809,9 @@ case $basic_machine in
|
|||
basic_machine=m68k-isi
|
||||
os=-sysv
|
||||
;;
|
||||
leon-*|leon[3-9]-*)
|
||||
basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`
|
||||
;;
|
||||
m68knommu)
|
||||
basic_machine=m68k-unknown
|
||||
os=-linux
|
||||
|
|
@ -801,7 +831,7 @@ case $basic_machine in
|
|||
basic_machine=ns32k-utek
|
||||
os=-sysv
|
||||
;;
|
||||
microblaze)
|
||||
microblaze*)
|
||||
basic_machine=microblaze-xilinx
|
||||
;;
|
||||
mingw64)
|
||||
|
|
@ -809,7 +839,7 @@ case $basic_machine in
|
|||
os=-mingw64
|
||||
;;
|
||||
mingw32)
|
||||
basic_machine=i386-pc
|
||||
basic_machine=i686-pc
|
||||
os=-mingw32
|
||||
;;
|
||||
mingw32ce)
|
||||
|
|
@ -837,6 +867,10 @@ case $basic_machine in
|
|||
basic_machine=powerpc-unknown
|
||||
os=-morphos
|
||||
;;
|
||||
moxiebox)
|
||||
basic_machine=moxie-unknown
|
||||
os=-moxiebox
|
||||
;;
|
||||
msdos)
|
||||
basic_machine=i386-pc
|
||||
os=-msdos
|
||||
|
|
@ -845,7 +879,7 @@ case $basic_machine in
|
|||
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
|
||||
;;
|
||||
msys)
|
||||
basic_machine=i386-pc
|
||||
basic_machine=i686-pc
|
||||
os=-msys
|
||||
;;
|
||||
mvs)
|
||||
|
|
@ -933,6 +967,9 @@ case $basic_machine in
|
|||
nsr-tandem)
|
||||
basic_machine=nsr-tandem
|
||||
;;
|
||||
nsx-tandem)
|
||||
basic_machine=nsx-tandem
|
||||
;;
|
||||
op50n-* | op60c-*)
|
||||
basic_machine=hppa1.1-oki
|
||||
os=-proelf
|
||||
|
|
@ -1017,7 +1054,7 @@ case $basic_machine in
|
|||
ppc-* | ppcbe-*)
|
||||
basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
ppcle | powerpclittle | ppc-le | powerpc-little)
|
||||
ppcle | powerpclittle)
|
||||
basic_machine=powerpcle-unknown
|
||||
;;
|
||||
ppcle-* | powerpclittle-*)
|
||||
|
|
@ -1027,7 +1064,7 @@ case $basic_machine in
|
|||
;;
|
||||
ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
ppc64le | powerpc64little | ppc64-le | powerpc64-little)
|
||||
ppc64le | powerpc64little)
|
||||
basic_machine=powerpc64le-unknown
|
||||
;;
|
||||
ppc64le-* | powerpc64little-*)
|
||||
|
|
@ -1040,7 +1077,11 @@ case $basic_machine in
|
|||
basic_machine=i586-unknown
|
||||
os=-pw32
|
||||
;;
|
||||
rdos)
|
||||
rdos | rdos64)
|
||||
basic_machine=x86_64-pc
|
||||
os=-rdos
|
||||
;;
|
||||
rdos32)
|
||||
basic_machine=i386-pc
|
||||
os=-rdos
|
||||
;;
|
||||
|
|
@ -1224,6 +1265,9 @@ case $basic_machine in
|
|||
basic_machine=a29k-wrs
|
||||
os=-vxworks
|
||||
;;
|
||||
wasm32)
|
||||
basic_machine=wasm32-unknown
|
||||
;;
|
||||
w65*)
|
||||
basic_machine=w65-wdc
|
||||
os=-none
|
||||
|
|
@ -1367,29 +1411,30 @@ case $os in
|
|||
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
|
||||
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
|
||||
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
|
||||
| -sym* | -kopensolaris* \
|
||||
| -sym* | -kopensolaris* | -plan9* \
|
||||
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
|
||||
| -aos* | -aros* \
|
||||
| -aos* | -aros* | -cloudabi* | -sortix* \
|
||||
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
|
||||
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
|
||||
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
|
||||
| -bitrig* | -openbsd* | -solidbsd* \
|
||||
| -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \
|
||||
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
|
||||
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
|
||||
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
|
||||
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
|
||||
| -chorusos* | -chorusrdb* | -cegcc* \
|
||||
| -chorusos* | -chorusrdb* | -cegcc* | -glidix* \
|
||||
| -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
|
||||
| -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
|
||||
| -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
|
||||
| -linux-newlib* | -linux-musl* | -linux-uclibc* \
|
||||
| -uxpv* | -beos* | -mpeix* | -udk* \
|
||||
| -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
|
||||
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
|
||||
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
|
||||
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
|
||||
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
|
||||
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
|
||||
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
|
||||
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
|
||||
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
|
||||
| -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox*)
|
||||
# Remember, each alternative MUST END IN *, to match a version number.
|
||||
;;
|
||||
-qnx*)
|
||||
|
|
@ -1437,6 +1482,9 @@ case $os in
|
|||
-os400*)
|
||||
os=-os400
|
||||
;;
|
||||
-cegcc*)
|
||||
os=-cegcc
|
||||
;;
|
||||
-wince*)
|
||||
os=-wince
|
||||
;;
|
||||
|
|
@ -1519,9 +1567,6 @@ case $os in
|
|||
-aros*)
|
||||
os=-aros
|
||||
;;
|
||||
-kaos*)
|
||||
os=-kaos
|
||||
;;
|
||||
-zvmoe)
|
||||
os=-zvmoe
|
||||
;;
|
||||
|
|
@ -1534,6 +1579,8 @@ case $os in
|
|||
-pnacl*)
|
||||
os=-pnacl
|
||||
;;
|
||||
-ios)
|
||||
;;
|
||||
-emscripten*)
|
||||
;;
|
||||
-none)
|
||||
|
|
@ -1576,6 +1623,9 @@ case $basic_machine in
|
|||
c4x-* | tic4x-*)
|
||||
os=-coff
|
||||
;;
|
||||
c8051-*)
|
||||
os=-elf
|
||||
;;
|
||||
hexagon-*)
|
||||
os=-elf
|
||||
;;
|
||||
|
|
@ -1628,6 +1678,9 @@ case $basic_machine in
|
|||
sparc-* | *-sun)
|
||||
os=-sunos4.1.1
|
||||
;;
|
||||
pru-*)
|
||||
os=-elf
|
||||
;;
|
||||
*-be)
|
||||
os=-beos
|
||||
;;
|
||||
|
|
|
|||
72
Engine/lib/sdl/build-scripts/config.sub.patch
Normal file
72
Engine/lib/sdl/build-scripts/config.sub.patch
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
--- config.sub.orig 2017-09-09 08:01:02.139023205 -0700
|
||||
+++ config.sub 2017-09-09 07:59:35.798264474 -0700
|
||||
@@ -364,6 +364,19 @@
|
||||
i*86 | x86_64)
|
||||
basic_machine=$basic_machine-pc
|
||||
;;
|
||||
+ nacl64*)
|
||||
+ basic_machine=x86_64-pc
|
||||
+ os=-nacl
|
||||
+ ;;
|
||||
+ nacl*)
|
||||
+ basic_machine=i686-pc
|
||||
+ os=-nacl
|
||||
+ ;;
|
||||
+ pnacl*)
|
||||
+ # le32-unknown-pnacl comes from http://www.chromium.org/nativeclient/pnacl/stability-of-the-pnacl-bitcode-abi
|
||||
+ basic_machine=le32-unknown
|
||||
+ os=-pnacl
|
||||
+ ;;
|
||||
# Object if more than one company name word.
|
||||
*-*-*)
|
||||
echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
|
||||
@@ -877,6 +890,10 @@
|
||||
basic_machine=le32-unknown
|
||||
os=-nacl
|
||||
;;
|
||||
+ pnacl)
|
||||
+ basic_machine=le32-unknown
|
||||
+ os=-pnacl
|
||||
+ ;;
|
||||
ncr3000)
|
||||
basic_machine=i486-ncr
|
||||
os=-sysv4
|
||||
@@ -1429,6 +1446,12 @@
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
+ -nacl*)
|
||||
+ os=-nacl
|
||||
+ ;;
|
||||
+ -pnacl*)
|
||||
+ os=-pnacl
|
||||
+ ;;
|
||||
-nto-qnx*)
|
||||
;;
|
||||
-nto*)
|
||||
@@ -1459,6 +1482,9 @@
|
||||
-os400*)
|
||||
os=-os400
|
||||
;;
|
||||
+ -cegcc*)
|
||||
+ os=-cegcc
|
||||
+ ;;
|
||||
-wince*)
|
||||
os=-wince
|
||||
;;
|
||||
@@ -1548,9 +1574,15 @@
|
||||
os=-dicos
|
||||
;;
|
||||
-nacl*)
|
||||
+ os=-nacl
|
||||
+ ;;
|
||||
+ -pnacl*)
|
||||
+ os=-pnacl
|
||||
;;
|
||||
-ios)
|
||||
;;
|
||||
+ -emscripten*)
|
||||
+ ;;
|
||||
-none)
|
||||
;;
|
||||
*)
|
||||
|
|
@ -1,9 +1,13 @@
|
|||
#!/bin/bash
|
||||
|
||||
SDKDIR="/emsdk_portable"
|
||||
if [ -z "$SDKDIR" ]; then
|
||||
SDKDIR="/emsdk_portable"
|
||||
fi
|
||||
|
||||
ENVSCRIPT="$SDKDIR/emsdk_env.sh"
|
||||
if [ ! -f "$ENVSCRIPT" ]; then
|
||||
echo "ERROR: This script expects the Emscripten SDK to be in '$SDKDIR'." 1>&2
|
||||
echo "ERROR: Set the \$SDKDIR environment variable to override this." 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
|
@ -51,7 +55,7 @@ mkdir buildbot
|
|||
pushd buildbot
|
||||
|
||||
echo "Configuring..."
|
||||
emconfigure ../configure --host=asmjs-unknown-emscripten --disable-assembly --disable-threads --enable-cpuinfo=false CFLAGS="-O2 -Wno-warn-absolute-paths -Wdeclaration-after-statement -Werror=declaration-after-statement" --prefix="$PWD/emscripten-sdl2-installed" || exit $?
|
||||
emconfigure ../configure --host=asmjs-unknown-emscripten --disable-assembly --disable-threads --disable-cpuinfo CFLAGS="-O2 -Wno-warn-absolute-paths -Wdeclaration-after-statement -Werror=declaration-after-statement" --prefix="$PWD/emscripten-sdl2-installed" || exit $?
|
||||
|
||||
echo "Building..."
|
||||
emmake $MAKE || exit $?
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Build a fat binary for iOS
|
||||
# Based on fatbuild.sh and code from the Ignifuga Game Engine
|
||||
|
||||
# Number of CPUs (for make -j)
|
||||
NCPU=`sysctl -n hw.ncpu`
|
||||
|
|
@ -9,269 +8,181 @@ if test x$NJOB = x; then
|
|||
NJOB=$NCPU
|
||||
fi
|
||||
|
||||
# SDK path
|
||||
XCODE_PATH=`xcode-select --print-path`
|
||||
if [ -z "$XCODE_PATH" ]; then
|
||||
echo "Could not find XCode location (use xcode-select -switch to set the correct path)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
prepare_environment() {
|
||||
ARCH=$1
|
||||
|
||||
if test x$SDK_VERSION = x; then
|
||||
export SDK_VERSION=`xcodebuild -showsdks | grep iphoneos | sed "s|.*iphoneos||"`
|
||||
if [ -z "$XCODE_PATH" ]; then
|
||||
echo "Could not find a valid iOS SDK"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
case $ARCH in
|
||||
armv6)
|
||||
DEV_PATH="$XCODE_PATH/Platforms/iPhoneOS.platform/Developer"
|
||||
SDK_PATH="$DEV_PATH/SDKs/iPhoneOS$SDK_VERSION.sdk"
|
||||
;;
|
||||
armv7)
|
||||
DEV_PATH="$XCODE_PATH/Platforms/iPhoneOS.platform/Developer"
|
||||
SDK_PATH="$DEV_PATH/SDKs/iPhoneOS$SDK_VERSION.sdk"
|
||||
;;
|
||||
i386)
|
||||
DEV_PATH="$XCODE_PATH/Platforms/iPhoneSimulator.platform/Developer"
|
||||
SDK_PATH="$DEV_PATH/SDKs/iPhoneSimulator$SDK_VERSION.sdk"
|
||||
;;
|
||||
*)
|
||||
echo "Unknown Architecture $ARCH"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ ! -d "$SDK_PATH" ]; then
|
||||
echo "Could not find iOS SDK at $SDK_PATH"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test x$MIN_OS_VERSION = x; then
|
||||
export MIN_OS_VERSION="3.0"
|
||||
fi
|
||||
|
||||
# Environment flags
|
||||
CFLAGS="-g -O2 -pipe -no-cpp-precomp -isysroot $SDK_PATH \
|
||||
-miphoneos-version-min=$MIN_OS_VERSION -I$SDK_PATH/usr/include/"
|
||||
LDFLAGS="-L$SDK_PATH/usr/lib/ -isysroot $SDK_PATH \
|
||||
-miphoneos-version-min=$MIN_OS_VERSION -static-libgcc"
|
||||
export CXXFLAGS="$CFLAGS"
|
||||
export CXXCPP="$DEV_PATH/usr/bin/llvm-cpp-4.2"
|
||||
export CPP="$CXXCPP"
|
||||
export CXX="$DEV_PATH/usr/bin/llvm-g++-4.2"
|
||||
export CC="$DEV_PATH/usr/bin/llvm-gcc-4.2"
|
||||
export LD="$DEV_PATH/usr/bin/ld"
|
||||
export AR="$DEV_PATH/usr/bin/ar"
|
||||
export AS="$DEV_PATH/usr/bin/ls"
|
||||
export NM="$DEV_PATH/usr/bin/nm"
|
||||
export RANLIB="$DEV_PATH/usr/bin/ranlib"
|
||||
export STRIP="$DEV_PATH/usr/bin/strip"
|
||||
|
||||
# We dynamically load X11, so using the system X11 headers is fine.
|
||||
CONFIG_FLAGS="--disable-shared --enable-static"
|
||||
|
||||
case $ARCH in
|
||||
armv6)
|
||||
export CONFIG_FLAGS="$CONFIG_FLAGS --host=armv6-apple-darwin"
|
||||
export CFLAGS="$CFLAGS -arch armv6"
|
||||
export LDFLAGS="$LDFLAGS -arch armv6"
|
||||
;;
|
||||
armv7)
|
||||
export CONFIG_FLAGS="$CONFIG_FLAGS --host=armv7-apple-darwin"
|
||||
export CFLAGS="$CFLAGS -arch armv7"
|
||||
export LDFLAGS="$LDFLAGS -arch armv7"
|
||||
;;
|
||||
i386)
|
||||
export CONFIG_FLAGS="$CONFIG_FLAGS --host=i386-apple-darwin"
|
||||
export CFLAGS="$CFLAGS -arch i386"
|
||||
export LDFLAGS="$LDFLAGS -arch i386"
|
||||
;;
|
||||
*)
|
||||
echo "Unknown Architecture $ARCH"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
prepare_environment "armv6"
|
||||
echo "Building with iOS SDK v$SDK_VERSION for iOS >= $MIN_OS_VERSION"
|
||||
|
||||
#
|
||||
# Find the configure script
|
||||
#
|
||||
srcdir=`dirname $0`/..
|
||||
srcdir=`cd $srcdir && pwd`
|
||||
auxdir=$srcdir/build-scripts
|
||||
cd $srcdir
|
||||
|
||||
#
|
||||
# Figure out which phase to build:
|
||||
# all,
|
||||
# configure, configure-armv6, configure-armv7, configure-i386
|
||||
# make, make-armv6, make-armv7, make-i386, merge
|
||||
# clean
|
||||
if test x"$1" = x; then
|
||||
phase=all
|
||||
SRC_DIR=$(cd `dirname $0`/..; pwd)
|
||||
if [ "$PWD" = "$SRC_DIR" ]; then
|
||||
PREFIX=$SRC_DIR/ios-build
|
||||
mkdir $PREFIX
|
||||
else
|
||||
phase="$1"
|
||||
fi
|
||||
case $phase in
|
||||
all)
|
||||
configure_armv6="yes"
|
||||
configure_armv7="yes"
|
||||
configure_i386="yes"
|
||||
make_armv6="yes"
|
||||
make_armv7="yes"
|
||||
make_i386="yes"
|
||||
merge="yes"
|
||||
;;
|
||||
configure)
|
||||
configure_armv6="yes"
|
||||
configure_armv7="yes"
|
||||
configure_i386="yes"
|
||||
;;
|
||||
configure-armv6)
|
||||
configure_armv6="yes"
|
||||
;;
|
||||
configure-armv7)
|
||||
configure_armv7="yes"
|
||||
;;
|
||||
configure-i386)
|
||||
configure_i386="yes"
|
||||
;;
|
||||
make)
|
||||
make_armv6="yes"
|
||||
make_armv7="yes"
|
||||
make_i386="yes"
|
||||
merge="yes"
|
||||
;;
|
||||
make-armv6)
|
||||
make_armv6="yes"
|
||||
;;
|
||||
make-armv7)
|
||||
make_armv7="yes"
|
||||
;;
|
||||
make-i386)
|
||||
make_i386="yes"
|
||||
;;
|
||||
merge)
|
||||
merge="yes"
|
||||
;;
|
||||
clean)
|
||||
clean_armv6="yes"
|
||||
clean_armv7="yes"
|
||||
clean_i386="yes"
|
||||
;;
|
||||
clean-armv6)
|
||||
clean_armv6="yes"
|
||||
;;
|
||||
clean-armv7)
|
||||
clean_armv7="yes"
|
||||
;;
|
||||
clean-i386)
|
||||
clean_i386="yes"
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 [all|configure[-armv6|-armv7|-i386]|make[-armv6|-armv7|-i386]|merge|clean[-armv6|-armv7|-i386]]"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
#
|
||||
# Create the build directories
|
||||
#
|
||||
for dir in build build/armv6 build/armv7 build/i386; do
|
||||
if test -d $dir; then
|
||||
:
|
||||
else
|
||||
mkdir $dir || exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
#
|
||||
# Build the armv6 binary
|
||||
#
|
||||
prepare_environment "armv6"
|
||||
if test x$configure_armv6 = xyes; then
|
||||
(cd build/armv6 && \
|
||||
sh ../../configure $CONFIG_FLAGS CC="$CC" CXX="$CXX" CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS") || exit 2
|
||||
# configure is not yet fully ready for iOS, some manual patching is required
|
||||
cp include/* build/armv6/include
|
||||
cp include/SDL_config_iphoneos.h build/armv6/include/SDL_config.h || exit 2
|
||||
sed -i "" -e "s|^EXTRA_CFLAGS.*|EXTRA_CFLAGS=-I./include|g" build/armv6/Makefile || exit 2
|
||||
sed -i "" -e "s|^EXTRA_LDFLAGS.*|EXTRA_LDFLAGS=-lm|g" build/armv6/Makefile || exit 2
|
||||
fi
|
||||
if test x$make_armv6 = xyes; then
|
||||
(cd build/armv6 && make -j$NJOB) || exit 3
|
||||
fi
|
||||
#
|
||||
# Build the armv7 binary
|
||||
#
|
||||
prepare_environment "armv7"
|
||||
if test x$configure_armv7 = xyes; then
|
||||
(cd build/armv7 && \
|
||||
sh ../../configure $CONFIG_FLAGS CC="$CC" CXX="$CXX" CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS") || exit 2
|
||||
# configure is not yet fully ready for iOS, some manual patching is required
|
||||
cp include/* build/armv7/include
|
||||
cp include/SDL_config_iphoneos.h build/armv7/include/SDL_config.h || exit 2
|
||||
sed -i "" -e "s|^EXTRA_CFLAGS.*|EXTRA_CFLAGS=-I./include|g" build/armv7/Makefile || exit 2
|
||||
sed -i "" -e "s|^EXTRA_LDFLAGS.*|EXTRA_LDFLAGS=-lm|g" build/armv7/Makefile || exit 2
|
||||
fi
|
||||
if test x$make_armv7 = xyes; then
|
||||
(cd build/armv7 && make -j$NJOB) || exit 3
|
||||
fi
|
||||
#
|
||||
# Build the i386 binary
|
||||
#
|
||||
prepare_environment "i386"
|
||||
if test x$configure_i386 = xyes; then
|
||||
(cd build/i386 && \
|
||||
sh ../../configure $CONFIG_FLAGS CC="$CC" CXX="$CXX" CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS") || exit 2
|
||||
# configure is not yet fully ready for iOS, some manual patching is required
|
||||
cp include/* build/i386/include
|
||||
cp include/SDL_config_iphoneos.h build/i386/include/SDL_config.h || exit 2
|
||||
sed -i "" -e "s|^EXTRA_CFLAGS.*|EXTRA_CFLAGS=-I./include|g" build/i386/Makefile || exit 2
|
||||
sed -i "" -e "s|^EXTRA_LDFLAGS.*|EXTRA_LDFLAGS=-lm|g" build/i386/Makefile || exit 2
|
||||
fi
|
||||
if test x$make_i386 = xyes; then
|
||||
(cd build/i386 && make -j$NJOB) || exit 3
|
||||
PREFIX=$PWD
|
||||
fi
|
||||
|
||||
#
|
||||
# Combine into fat binary
|
||||
#
|
||||
if test x$merge = xyes; then
|
||||
output=ios/lib
|
||||
sh $auxdir/mkinstalldirs build/$output
|
||||
cd build
|
||||
target=`find . -mindepth 4 -maxdepth 4 -type f -name '*.dylib' | head -1 | sed 's|.*/||'`
|
||||
(lipo -create -o $output/libSDL2.a armv6/build/.libs/libSDL2.a armv7/build/.libs/libSDL2.a i386/build/.libs/libSDL2.a &&
|
||||
lipo -create -o $output/libSDL2main.a armv6/build/libSDL2main.a armv7/build/libSDL2main.a i386/build/libSDL2main.a &&
|
||||
cp -r armv6/include ios
|
||||
echo "Build complete!" &&
|
||||
echo "Files can be found under the build/ios directory.") || exit 4
|
||||
cd ..
|
||||
BUILD_I386_IOSSIM=YES
|
||||
BUILD_X86_64_IOSSIM=YES
|
||||
|
||||
BUILD_IOS_ARMV7=YES
|
||||
BUILD_IOS_ARMV7S=YES
|
||||
BUILD_IOS_ARM64=YES
|
||||
|
||||
# 13.4.0 - Mavericks
|
||||
# 14.0.0 - Yosemite
|
||||
# 15.0.0 - El Capitan
|
||||
DARWIN=darwin15.0.0
|
||||
|
||||
XCODEDIR=`xcode-select --print-path`
|
||||
IOS_SDK_VERSION=`xcrun --sdk iphoneos --show-sdk-version`
|
||||
MIN_SDK_VERSION=6.0
|
||||
|
||||
IPHONEOS_PLATFORM=`xcrun --sdk iphoneos --show-sdk-platform-path`
|
||||
IPHONEOS_SYSROOT=`xcrun --sdk iphoneos --show-sdk-path`
|
||||
|
||||
IPHONESIMULATOR_PLATFORM=`xcrun --sdk iphonesimulator --show-sdk-platform-path`
|
||||
IPHONESIMULATOR_SYSROOT=`xcrun --sdk iphonesimulator --show-sdk-path`
|
||||
|
||||
# Uncomment if you want to see more information about each invocation
|
||||
# of clang as the builds proceed.
|
||||
# CLANG_VERBOSE="--verbose"
|
||||
|
||||
CC=clang
|
||||
CXX=clang
|
||||
|
||||
SILENCED_WARNINGS="-Wno-unused-local-typedef -Wno-unused-function"
|
||||
|
||||
CFLAGS="${CLANG_VERBOSE} ${SILENCED_WARNINGS} -DNDEBUG -g -O0 -pipe -fPIC -fobjc-arc"
|
||||
|
||||
echo "PREFIX ..................... ${PREFIX}"
|
||||
echo "BUILD_MACOSX_X86_64 ........ ${BUILD_MACOSX_X86_64}"
|
||||
echo "BUILD_I386_IOSSIM .......... ${BUILD_I386_IOSSIM}"
|
||||
echo "BUILD_X86_64_IOSSIM ........ ${BUILD_X86_64_IOSSIM}"
|
||||
echo "BUILD_IOS_ARMV7 ............ ${BUILD_IOS_ARMV7}"
|
||||
echo "BUILD_IOS_ARMV7S ........... ${BUILD_IOS_ARMV7S}"
|
||||
echo "BUILD_IOS_ARM64 ............ ${BUILD_IOS_ARM64}"
|
||||
echo "DARWIN ..................... ${DARWIN}"
|
||||
echo "XCODEDIR ................... ${XCODEDIR}"
|
||||
echo "IOS_SDK_VERSION ............ ${IOS_SDK_VERSION}"
|
||||
echo "MIN_SDK_VERSION ............ ${MIN_SDK_VERSION}"
|
||||
echo "IPHONEOS_PLATFORM .......... ${IPHONEOS_PLATFORM}"
|
||||
echo "IPHONEOS_SYSROOT ........... ${IPHONEOS_SYSROOT}"
|
||||
echo "IPHONESIMULATOR_PLATFORM ... ${IPHONESIMULATOR_PLATFORM}"
|
||||
echo "IPHONESIMULATOR_SYSROOT .... ${IPHONESIMULATOR_SYSROOT}"
|
||||
echo "CC ......................... ${CC}"
|
||||
echo "CFLAGS ..................... ${CFLAGS}"
|
||||
echo "CXX ........................ ${CXX}"
|
||||
echo "CXXFLAGS ................... ${CXXFLAGS}"
|
||||
echo "LDFLAGS .................... ${LDFLAGS}"
|
||||
|
||||
###################################################################
|
||||
# This section contains the build commands for each of the
|
||||
# architectures that will be included in the universal binaries.
|
||||
###################################################################
|
||||
|
||||
echo "$(tput setaf 2)"
|
||||
echo "###########################"
|
||||
echo "# i386 for iPhone Simulator"
|
||||
echo "###########################"
|
||||
echo "$(tput sgr0)"
|
||||
|
||||
if [ "${BUILD_I386_IOSSIM}" == "YES" ]
|
||||
then
|
||||
(
|
||||
cd ${PREFIX}
|
||||
make clean
|
||||
../configure --build=x86_64-apple-${DARWIN} --host=i386-ios-${DARWIN} --disable-shared --prefix=${PREFIX}/platform/i386-sim "CC=${CC}" "CFLAGS=${CFLAGS} -mios-simulator-version-min=${MIN_SDK_VERSION} -arch i386 -isysroot ${IPHONESIMULATOR_SYSROOT}" "CXX=${CXX}" "CXXFLAGS=${CXXFLAGS} -mios-simulator-version-min=${MIN_SDK_VERSION} -arch i386 -isysroot ${IPHONESIMULATOR_SYSROOT}" LDFLAGS="-arch i386 -mios-simulator-version-min=${MIN_SDK_VERSION} ${LDFLAGS} -L${IPHONESIMULATOR_SYSROOT}/usr/lib/ -L${IPHONESIMULATOR_SYSROOT}/usr/lib/system" || exit 2
|
||||
cp $SRC_DIR/include/SDL_config_iphoneos.h include/SDL_config.h
|
||||
make -j10 || exit 3
|
||||
make install
|
||||
) || exit $?
|
||||
fi
|
||||
|
||||
#
|
||||
# Clean up
|
||||
#
|
||||
do_clean()
|
||||
{
|
||||
echo $*
|
||||
$* || exit 6
|
||||
}
|
||||
if test x$clean_armv6 = xyes; then
|
||||
do_clean rm -r build/armv6
|
||||
echo "$(tput setaf 2)"
|
||||
echo "#############################"
|
||||
echo "# x86_64 for iPhone Simulator"
|
||||
echo "#############################"
|
||||
echo "$(tput sgr0)"
|
||||
|
||||
if [ "${BUILD_X86_64_IOSSIM}" == "YES" ]
|
||||
then
|
||||
(
|
||||
cd ${PREFIX}
|
||||
make clean
|
||||
../configure --build=x86_64-apple-${DARWIN} --host=x86_64-ios-${DARWIN} --disable-shared --prefix=${PREFIX}/platform/x86_64-sim "CC=${CC}" "CFLAGS=${CFLAGS} -mios-simulator-version-min=${MIN_SDK_VERSION} -arch x86_64 -isysroot ${IPHONESIMULATOR_SYSROOT}" "CXX=${CXX}" "CXXFLAGS=${CXXFLAGS} -mios-simulator-version-min=${MIN_SDK_VERSION} -arch x86_64 -isysroot ${IPHONESIMULATOR_SYSROOT}" LDFLAGS="-arch x86_64 -mios-simulator-version-min=${MIN_SDK_VERSION} ${LDFLAGS} -L${IPHONESIMULATOR_SYSROOT}/usr/lib/ -L${IPHONESIMULATOR_SYSROOT}/usr/lib/system" || exit 2
|
||||
cp $SRC_DIR/include/SDL_config_iphoneos.h include/SDL_config.h
|
||||
make -j$NJOB || exit 3
|
||||
make install
|
||||
) || exit $?
|
||||
fi
|
||||
if test x$clean_armv7 = xyes; then
|
||||
do_clean rm -r build/armv7
|
||||
|
||||
echo "$(tput setaf 2)"
|
||||
echo "##################"
|
||||
echo "# armv7 for iPhone"
|
||||
echo "##################"
|
||||
echo "$(tput sgr0)"
|
||||
|
||||
if [ "${BUILD_IOS_ARMV7}" == "YES" ]
|
||||
then
|
||||
(
|
||||
cd ${PREFIX}
|
||||
make clean
|
||||
../configure --build=x86_64-apple-${DARWIN} --host=armv7-ios-${DARWIN} --disable-shared --prefix=${PREFIX}/platform/armv7-ios "CC=${CC}" "CFLAGS=${CFLAGS} -miphoneos-version-min=${MIN_SDK_VERSION} -arch armv7 -isysroot ${IPHONEOS_SYSROOT}" "CXX=${CXX}" "CXXFLAGS=${CXXFLAGS} -arch armv7 -isysroot ${IPHONEOS_SYSROOT}" LDFLAGS="-arch armv7 -miphoneos-version-min=${MIN_SDK_VERSION} ${LDFLAGS}" || exit 2
|
||||
cp $SRC_DIR/include/SDL_config_iphoneos.h include/SDL_config.h
|
||||
make -j$NJOB || exit 3
|
||||
make install
|
||||
) || exit $?
|
||||
fi
|
||||
if test x$clean_i386 = xyes; then
|
||||
do_clean rm -r build/i386
|
||||
|
||||
echo "$(tput setaf 2)"
|
||||
echo "###################"
|
||||
echo "# armv7s for iPhone"
|
||||
echo "###################"
|
||||
echo "$(tput sgr0)"
|
||||
|
||||
if [ "${BUILD_IOS_ARMV7S}" == "YES" ]
|
||||
then
|
||||
(
|
||||
cd ${PREFIX}
|
||||
make clean
|
||||
../configure --build=x86_64-apple-${DARWIN} --host=armv7s-ios-${DARWIN} --disable-shared --prefix=${PREFIX}/platform/armv7s-ios "CC=${CC}" "CFLAGS=${CFLAGS} -miphoneos-version-min=${MIN_SDK_VERSION} -arch armv7s -isysroot ${IPHONEOS_SYSROOT}" "CXX=${CXX}" "CXXFLAGS=${CXXFLAGS} -miphoneos-version-min=${MIN_SDK_VERSION} -arch armv7s -isysroot ${IPHONEOS_SYSROOT}" LDFLAGS="-arch armv7s -miphoneos-version-min=${MIN_SDK_VERSION} ${LDFLAGS}" || exit 2
|
||||
cp $SRC_DIR/include/SDL_config_iphoneos.h include/SDL_config.h
|
||||
make -j$NJOB || exit 3
|
||||
make install
|
||||
) || exit $?
|
||||
fi
|
||||
|
||||
echo "$(tput setaf 2)"
|
||||
echo "##################"
|
||||
echo "# arm64 for iPhone"
|
||||
echo "##################"
|
||||
echo "$(tput sgr0)"
|
||||
|
||||
if [ "${BUILD_IOS_ARM64}" == "YES" ]
|
||||
then
|
||||
(
|
||||
cd ${PREFIX}
|
||||
make clean
|
||||
../configure --build=x86_64-apple-${DARWIN} --host=arm-ios-${DARWIN} --disable-shared --prefix=${PREFIX}/platform/arm64-ios "CC=${CC}" "CFLAGS=${CFLAGS} -miphoneos-version-min=${MIN_SDK_VERSION} -arch arm64 -isysroot ${IPHONEOS_SYSROOT}" "CXX=${CXX}" "CXXFLAGS=${CXXFLAGS} -miphoneos-version-min=${MIN_SDK_VERSION} -arch arm64 -isysroot ${IPHONEOS_SYSROOT}" LDFLAGS="-arch arm64 -miphoneos-version-min=${MIN_SDK_VERSION} ${LDFLAGS}" || exit 2
|
||||
cp $SRC_DIR/include/SDL_config_iphoneos.h include/SDL_config.h
|
||||
make -j$NJOB || exit 3
|
||||
make install
|
||||
) || exit $?
|
||||
fi
|
||||
|
||||
echo "$(tput setaf 2)"
|
||||
echo "###################################################################"
|
||||
echo "# Create Universal Libraries and Finalize the packaging"
|
||||
echo "###################################################################"
|
||||
echo "$(tput sgr0)"
|
||||
|
||||
(
|
||||
cd ${PREFIX}/platform
|
||||
mkdir -p universal
|
||||
lipo x86_64-sim/lib/libSDL2.a i386-sim/lib/libSDL2.a arm64-ios/lib/libSDL2.a armv7s-ios/lib/libSDL2.a armv7-ios/lib/libSDL2.a -create -output universal/libSDL2.a
|
||||
)
|
||||
|
||||
(
|
||||
cd ${PREFIX}
|
||||
mkdir -p lib
|
||||
cp -r platform/universal/* lib
|
||||
#rm -rf platform
|
||||
lipo -info lib/libSDL2.a
|
||||
)
|
||||
|
||||
echo Done!
|
||||
|
|
|
|||
|
|
@ -189,7 +189,7 @@ func_basename ()
|
|||
# to NONDIR_REPLACEMENT.
|
||||
# value returned in "$func_dirname_result"
|
||||
# basename: Compute filename of FILE.
|
||||
# value retuned in "$func_basename_result"
|
||||
# value returned in "$func_basename_result"
|
||||
# Implementation must be kept synchronized with func_dirname
|
||||
# and func_basename. For efficiency, we do not delegate to
|
||||
# those functions but instead duplicate the functionality here.
|
||||
|
|
@ -3276,7 +3276,7 @@ extern \"C\" {
|
|||
|
||||
/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
|
||||
#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
|
||||
/* DATA imports from DLLs on WIN32 con't be const, because runtime
|
||||
/* DATA imports from DLLs on WIN32 can't be const, because runtime
|
||||
relocations are performed -- see ld's documentation on pseudo-relocs. */
|
||||
# define LT_DLSYM_CONST
|
||||
#elif defined(__osf__)
|
||||
|
|
@ -4394,7 +4394,7 @@ EOF
|
|||
{
|
||||
/* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
|
||||
namespace, but it is not one of the ones we know about and
|
||||
have already dealt with, above (inluding dump-script), then
|
||||
have already dealt with, above (including dump-script), then
|
||||
report an error. Otherwise, targets might begin to believe
|
||||
they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
|
||||
namespace. The first time any user complains about this, we'll
|
||||
|
|
|
|||
|
|
@ -3,7 +3,11 @@
|
|||
# This is the script buildbot.libsdl.org uses to cross-compile SDL2 from
|
||||
# amd64 Linux to NaCl.
|
||||
|
||||
export NACL_SDK_ROOT="/nacl_sdk/pepper_35"
|
||||
# PLEASE NOTE that we have reports that SDL built with pepper_49 (current
|
||||
# stable release as of November 10th, 2016) is broken. Please retest
|
||||
# when something newer becomes stable and then decide if this was SDL's
|
||||
# bug or NaCl's bug. --ryan.
|
||||
export NACL_SDK_ROOT="/nacl_sdk/pepper_47"
|
||||
|
||||
TARBALL="$1"
|
||||
if [ -z $1 ]; then
|
||||
|
|
|
|||
|
|
@ -2,8 +2,7 @@
|
|||
|
||||
find . -type f -exec grep -Il "Copyright" {} \; \
|
||||
| grep -v \.hg \
|
||||
| while read i; \
|
||||
| while read file; \
|
||||
do \
|
||||
LC_ALL=C sed -ie "s/\(.*Copyright.*\)[0-9]\{4\}\( *Sam Lantinga\)/\1`date +%Y`\2/" "$i"; \
|
||||
rm "${i}e"; \
|
||||
LC_ALL=C sed -b -i "s/\(.*Copyright.*\)[0-9]\{4\}\( *Sam Lantinga\)/\1`date +%Y`\2/" "$file"; \
|
||||
done
|
||||
|
|
|
|||
|
|
@ -3,11 +3,16 @@ rem just a helper batch file for collecting up files and zipping them.
|
|||
rem usage: windows-buildbot-zipper.bat <zipfilename>
|
||||
rem must be run from root of SDL source tree.
|
||||
|
||||
IF EXIST VisualC\Win32\Release GOTO okaydir
|
||||
IF EXIST VisualC\Win32\Release GOTO okaywin32dir
|
||||
echo Please run from root of source tree after doing a Release build.
|
||||
GOTO done
|
||||
|
||||
:okaydir
|
||||
:okaywin32dir
|
||||
IF EXIST VisualC\x64\Release GOTO okaydirs
|
||||
echo Please run from root of source tree after doing a Release build.
|
||||
GOTO done
|
||||
|
||||
:okaydirs
|
||||
erase /q /f /s zipper
|
||||
IF EXIST zipper GOTO zippermade
|
||||
mkdir zipper
|
||||
|
|
@ -18,10 +23,14 @@ cd SDL
|
|||
mkdir include
|
||||
mkdir lib
|
||||
mkdir lib\win32
|
||||
mkdir lib\win64
|
||||
copy ..\..\include\*.h include\
|
||||
copy ..\..\VisualC\Win32\Release\SDL2.dll lib\win32\
|
||||
copy ..\..\VisualC\Win32\Release\SDL2.lib lib\win32\
|
||||
copy ..\..\VisualC\Win32\Release\SDL2main.lib lib\win32\
|
||||
copy ..\..\VisualC\x64\Release\SDL2.dll lib\win64\
|
||||
copy ..\..\VisualC\x64\Release\SDL2.lib lib\win64\
|
||||
copy ..\..\VisualC\x64\Release\SDL2main.lib lib\win64\
|
||||
cd ..
|
||||
zip -9r ..\%1 SDL
|
||||
cd ..
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
#
|
||||
|
||||
# Base version of SDL, used for packaging purposes
|
||||
$SDLVersion = "2.0.4"
|
||||
$SDLVersion = "2.0.7"
|
||||
|
||||
# Gets the .bat file that sets up an MSBuild environment, given one of
|
||||
# Visual Studio's, "PlatformToolset"s.
|
||||
|
|
@ -211,18 +211,26 @@ function Build-SDL-WinRT-Variant
|
|||
$DidAnyDLLBuildFail = $false
|
||||
$DidAnyNugetBuildFail = $false
|
||||
|
||||
# Ryan disabled WP8.0, because it doesn't appear to have mmdeviceapi.h that SDL_wasapi needs.
|
||||
# My assumption is that no one will miss this, but send patches otherwise! --ryan.
|
||||
# Build for Windows Phone 8.0, via VC++ 2012:
|
||||
if ( ! (Build-SDL-WinRT-Variant "SDL" "v110_wp80" "ARM")) { $DidAnyDLLBuildFail = $true }
|
||||
if ( ! (Build-SDL-WinRT-Variant "SDL" "v110_wp80" "Win32")) { $DidAnyDLLBuildFail = $true }
|
||||
#if ( ! (Build-SDL-WinRT-Variant "SDL" "v110_wp80" "ARM")) { $DidAnyDLLBuildFail = $true }
|
||||
#if ( ! (Build-SDL-WinRT-Variant "SDL" "v110_wp80" "Win32")) { $DidAnyDLLBuildFail = $true }
|
||||
|
||||
# Build for Windows Phone 8.1, via VC++ 2013:
|
||||
if ( ! (Build-SDL-WinRT-Variant "SDL" "v120_wp81" "ARM")) { $DidAnyDLLBuildFail = $true }
|
||||
if ( ! (Build-SDL-WinRT-Variant "SDL" "v120_wp81" "Win32")) { $DidAnyDLLBuildFail = $true }
|
||||
|
||||
# Build for Windows 8.0 and Windows RT 8.0, via VC++ 2012:
|
||||
if ( ! (Build-SDL-WinRT-Variant "SDL" "v110" "ARM")) { $DidAnyDLLBuildFail = $true }
|
||||
if ( ! (Build-SDL-WinRT-Variant "SDL" "v110" "Win32")) { $DidAnyDLLBuildFail = $true }
|
||||
if ( ! (Build-SDL-WinRT-Variant "SDL" "v110" "x64")) { $DidAnyDLLBuildFail = $true }
|
||||
#
|
||||
# Win 8.0 auto-building was disabled on 2017-Feb-25, by David Ludwig <dludwig@pobox.com>.
|
||||
# Steam's OS-usage surveys indicate that Windows 8.0 use is pretty much nil, plus
|
||||
# Microsoft hasn't supported Windows 8.0 development for a few years now.
|
||||
# The commented-out lines below may still work on some systems, though.
|
||||
#
|
||||
#if ( ! (Build-SDL-WinRT-Variant "SDL" "v110" "ARM")) { $DidAnyDLLBuildFail = $true }
|
||||
#if ( ! (Build-SDL-WinRT-Variant "SDL" "v110" "Win32")) { $DidAnyDLLBuildFail = $true }
|
||||
#if ( ! (Build-SDL-WinRT-Variant "SDL" "v110" "x64")) { $DidAnyDLLBuildFail = $true }
|
||||
|
||||
# Build for Windows 8.1 and Windows RT 8.1, via VC++ 2013:
|
||||
if ( ! (Build-SDL-WinRT-Variant "SDL" "v120" "ARM")) { $DidAnyDLLBuildFail = $true }
|
||||
|
|
|
|||
|
|
@ -158,6 +158,36 @@ macro(CheckPulseAudio)
|
|||
endif()
|
||||
endmacro()
|
||||
|
||||
# Requires:
|
||||
# - PkgCheckModules
|
||||
# Optional:
|
||||
# - JACK_SHARED opt
|
||||
# - HAVE_DLOPEN opt
|
||||
macro(CheckJACK)
|
||||
if(JACK)
|
||||
pkg_check_modules(PKG_JACK jack)
|
||||
if(PKG_JACK_FOUND)
|
||||
set(HAVE_JACK TRUE)
|
||||
file(GLOB JACK_SOURCES ${SDL2_SOURCE_DIR}/src/audio/jack/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${JACK_SOURCES})
|
||||
set(SDL_AUDIO_DRIVER_JACK 1)
|
||||
list(APPEND EXTRA_CFLAGS ${PKG_JACK_CFLAGS})
|
||||
if(JACK_SHARED)
|
||||
if(NOT HAVE_DLOPEN)
|
||||
message_warn("You must have SDL_LoadObject() support for dynamic JACK audio loading")
|
||||
else()
|
||||
FindLibraryAndSONAME("jack")
|
||||
set(SDL_AUDIO_DRIVER_JACK_DYNAMIC "\"${JACK_LIB_SONAME}\"")
|
||||
set(HAVE_JACK_SHARED TRUE)
|
||||
endif()
|
||||
else()
|
||||
list(APPEND EXTRA_LDFLAGS ${PKG_JACK_LDFLAGS})
|
||||
endif()
|
||||
set(HAVE_SDL_AUDIO TRUE)
|
||||
endif()
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
# Requires:
|
||||
# - PkgCheckModules
|
||||
# Optional:
|
||||
|
|
@ -315,6 +345,31 @@ macro(CheckFusionSound)
|
|||
endif()
|
||||
endmacro()
|
||||
|
||||
# Requires:
|
||||
# - LIBSAMPLERATE
|
||||
# Optional:
|
||||
# - LIBSAMPLERATE_SHARED opt
|
||||
# - HAVE_DLOPEN opt
|
||||
macro(CheckLibSampleRate)
|
||||
if(LIBSAMPLERATE)
|
||||
check_include_file(samplerate.h HAVE_LIBSAMPLERATE_H)
|
||||
if(HAVE_LIBSAMPLERATE_H)
|
||||
set(HAVE_LIBSAMPLERATE TRUE)
|
||||
if(LIBSAMPLERATE_SHARED)
|
||||
if(NOT HAVE_DLOPEN)
|
||||
message_warn("You must have SDL_LoadObject() support for dynamic libsamplerate loading")
|
||||
else()
|
||||
FindLibraryAndSONAME("samplerate")
|
||||
set(SDL_LIBSAMPLERATE_DYNAMIC "\"${SAMPLERATE_LIB_SONAME}\"")
|
||||
set(HAVE_LIBSAMPLERATE_SHARED TRUE)
|
||||
endif()
|
||||
else()
|
||||
list(APPEND EXTRA_LDFLAGS -lsamplerate)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
# Requires:
|
||||
# - n/a
|
||||
# Optional:
|
||||
|
|
@ -508,7 +563,7 @@ endmacro()
|
|||
macro(CheckMir)
|
||||
if(VIDEO_MIR)
|
||||
find_library(MIR_LIB mirclient mircommon egl)
|
||||
pkg_check_modules(MIR_TOOLKIT mirclient mircommon)
|
||||
pkg_check_modules(MIR_TOOLKIT mirclient>=0.26 mircommon)
|
||||
pkg_check_modules(EGL egl)
|
||||
pkg_check_modules(XKB xkbcommon)
|
||||
|
||||
|
|
@ -520,7 +575,7 @@ macro(CheckMir)
|
|||
set(SOURCE_FILES ${SOURCE_FILES} ${MIR_SOURCES})
|
||||
set(SDL_VIDEO_DRIVER_MIR 1)
|
||||
|
||||
list(APPEND EXTRA_CFLAGS ${MIR_TOOLKIT_CFLAGS} ${EGL_CLFAGS} ${XKB_CLFLAGS})
|
||||
list(APPEND EXTRA_CFLAGS ${MIR_TOOLKIT_CFLAGS} ${EGL_CFLAGS} ${XKB_CFLAGS})
|
||||
|
||||
if(MIR_SHARED)
|
||||
if(NOT HAVE_DLOPEN)
|
||||
|
|
@ -557,7 +612,7 @@ macro(WaylandProtocolGen _SCANNER _XML _PROTL)
|
|||
ARGS code "${_XML}" "${_WAYLAND_PROT_C_CODE}"
|
||||
)
|
||||
|
||||
set(SOURCE_FILES ${SOURCE_FILES} "${CMAKE_CURRENT_BINARY_DIR}/wayland-generated-protocols/${_PROTL}-protocol.c")
|
||||
set(SOURCE_FILES ${SOURCE_FILES} "${_WAYLAND_PROT_C_CODE}")
|
||||
endmacro()
|
||||
|
||||
# Requires:
|
||||
|
|
@ -632,7 +687,7 @@ macro(CheckWayland)
|
|||
|
||||
WaylandProtocolGen("${WAYLAND_SCANNER}" "${WAYLAND_CORE_PROTOCOL_DIR}/wayland.xml" "wayland")
|
||||
|
||||
foreach(_PROTL relative-pointer-unstable-v1 pointer-constraints-unstable-v1)
|
||||
foreach(_PROTL relative-pointer-unstable-v1 pointer-constraints-unstable-v1 xdg-shell-unstable-v6)
|
||||
string(REGEX REPLACE "\\-unstable\\-.*$" "" PROTSUBDIR ${_PROTL})
|
||||
WaylandProtocolGen("${WAYLAND_SCANNER}" "${WAYLAND_PROTOCOLS_DIR}/unstable/${PROTSUBDIR}/${_PROTL}.xml" "${_PROTL}")
|
||||
endforeach()
|
||||
|
|
@ -803,7 +858,10 @@ endmacro()
|
|||
# PTHREAD_LIBS
|
||||
macro(CheckPTHREAD)
|
||||
if(PTHREADS)
|
||||
if(LINUX)
|
||||
if(ANDROID)
|
||||
# the android libc provides built-in support for pthreads, so no
|
||||
# additional linking or compile flags are necessary
|
||||
elseif(LINUX)
|
||||
set(PTHREAD_CFLAGS "-D_REENTRANT")
|
||||
set(PTHREAD_LDFLAGS "-pthread")
|
||||
elseif(BSDI)
|
||||
|
|
@ -878,7 +936,7 @@ macro(CheckPTHREAD)
|
|||
#include <pthread.h>
|
||||
int main(int argc, char **argv) {
|
||||
pthread_mutexattr_t attr;
|
||||
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
|
||||
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE_NP);
|
||||
return 0;
|
||||
}" HAVE_RECURSIVE_MUTEXES_NP)
|
||||
if(HAVE_RECURSIVE_MUTEXES_NP)
|
||||
|
|
@ -907,7 +965,6 @@ macro(CheckPTHREAD)
|
|||
int main(int argc, char** argv) { return 0; }" HAVE_PTHREAD_NP_H)
|
||||
check_function_exists(pthread_setname_np HAVE_PTHREAD_SETNAME_NP)
|
||||
check_function_exists(pthread_set_name_np HAVE_PTHREAD_SET_NAME_NP)
|
||||
set(CMAKE_REQUIRED_FLAGS "${ORIG_CMAKE_REQUIRED_FLAGS}")
|
||||
|
||||
set(SOURCE_FILES ${SOURCE_FILES}
|
||||
${SDL2_SOURCE_DIR}/src/thread/pthread/SDL_systhread.c
|
||||
|
|
@ -924,6 +981,7 @@ macro(CheckPTHREAD)
|
|||
endif()
|
||||
set(HAVE_SDL_THREADS TRUE)
|
||||
endif()
|
||||
set(CMAKE_REQUIRED_FLAGS "${ORIG_CMAKE_REQUIRED_FLAGS}")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
|
|
@ -1071,15 +1129,19 @@ endmacro()
|
|||
# - n/a
|
||||
macro(CheckRPI)
|
||||
if(VIDEO_RPI)
|
||||
set(VIDEO_RPI_INCLUDE_DIRS "/opt/vc/include" "/opt/vc/include/interface/vcos/pthreads" "/opt/vc/include/interface/vmcs_host/linux/" )
|
||||
set(VIDEO_RPI_LIBRARY_DIRS "/opt/vc/lib" )
|
||||
set(VIDEO_RPI_LIBS bcm_host )
|
||||
pkg_check_modules(VIDEO_RPI bcm_host brcmegl)
|
||||
if (NOT VIDEO_RPI_FOUND)
|
||||
set(VIDEO_RPI_INCLUDE_DIRS "/opt/vc/include" "/opt/vc/include/interface/vcos/pthreads" "/opt/vc/include/interface/vmcs_host/linux/" )
|
||||
set(VIDEO_RPI_LIBRARY_DIRS "/opt/vc/lib" )
|
||||
set(VIDEO_RPI_LIBRARIES bcm_host )
|
||||
set(VIDEO_RPI_LDFLAGS "-Wl,-rpath,/opt/vc/lib")
|
||||
endif()
|
||||
listtostr(VIDEO_RPI_INCLUDE_DIRS VIDEO_RPI_INCLUDE_FLAGS "-I")
|
||||
listtostr(VIDEO_RPI_LIBRARY_DIRS VIDEO_RPI_LIBRARY_FLAGS "-L")
|
||||
|
||||
set(ORIG_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
|
||||
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} ${VIDEO_RPI_INCLUDE_FLAGS} ${VIDEO_RPI_LIBRARY_FLAGS}")
|
||||
set(CMAKE_REQUIRED_LIBRARIES "${VIDEO_RPI_LIBS}")
|
||||
set(CMAKE_REQUIRED_LIBRARIES "${VIDEO_RPI_LIBRARIES}")
|
||||
check_c_source_compiles("
|
||||
#include <bcm_host.h>
|
||||
int main(int argc, char **argv) {}" HAVE_VIDEO_RPI)
|
||||
|
|
@ -1091,8 +1153,52 @@ macro(CheckRPI)
|
|||
set(SDL_VIDEO_DRIVER_RPI 1)
|
||||
file(GLOB VIDEO_RPI_SOURCES ${SDL2_SOURCE_DIR}/src/video/raspberry/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${VIDEO_RPI_SOURCES})
|
||||
list(APPEND EXTRA_LIBS ${VIDEO_RPI_LIBS})
|
||||
list(APPEND EXTRA_LIBS ${VIDEO_RPI_LIBRARIES})
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${VIDEO_RPI_INCLUDE_FLAGS} ${VIDEO_RPI_LIBRARY_FLAGS}")
|
||||
list(APPEND EXTRA_LDFLAGS ${VIDEO_RPI_LDFLAGS})
|
||||
endif(SDL_VIDEO AND HAVE_VIDEO_RPI)
|
||||
endif(VIDEO_RPI)
|
||||
endmacro(CheckRPI)
|
||||
|
||||
# Requires:
|
||||
# - EGL
|
||||
# - PkgCheckModules
|
||||
# Optional:
|
||||
# - KMSDRM_SHARED opt
|
||||
# - HAVE_DLOPEN opt
|
||||
macro(CheckKMSDRM)
|
||||
if(VIDEO_KMSDRM)
|
||||
pkg_check_modules(KMSDRM libdrm gbm egl)
|
||||
if(KMSDRM_FOUND)
|
||||
link_directories(
|
||||
${KMSDRM_LIBRARY_DIRS}
|
||||
)
|
||||
include_directories(
|
||||
${KMSDRM_INCLUDE_DIRS}
|
||||
)
|
||||
set(HAVE_VIDEO_KMSDRM TRUE)
|
||||
set(HAVE_SDL_VIDEO TRUE)
|
||||
|
||||
file(GLOB KMSDRM_SOURCES ${SDL2_SOURCE_DIR}/src/video/kmsdrm/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${KMSDRM_SOURCES})
|
||||
|
||||
list(APPEND EXTRA_CFLAGS ${KMSDRM_CFLAGS})
|
||||
|
||||
set(SDL_VIDEO_DRIVER_KMSDRM 1)
|
||||
|
||||
if(KMSDRM_SHARED)
|
||||
if(NOT HAVE_DLOPEN)
|
||||
message_warn("You must have SDL_LoadObject() support for dynamic KMS/DRM loading")
|
||||
else()
|
||||
FindLibraryAndSONAME(drm)
|
||||
FindLibraryAndSONAME(gbm)
|
||||
set(SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC "\"${DRM_LIB_SONAME}\"")
|
||||
set(SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC_GBM "\"${GBM_LIB_SONAME}\"")
|
||||
set(HAVE_KMSDRM_SHARED TRUE)
|
||||
endif()
|
||||
else()
|
||||
set(EXTRA_LIBS ${KMSDRM_LIBRARIES} ${EXTRA_LIBS})
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endmacro()
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
if (NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
|
||||
message(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"")
|
||||
endif(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
|
||||
if (NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt")
|
||||
message(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_BINARY_DIR@/install_manifest.txt\"")
|
||||
endif(NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt")
|
||||
|
||||
file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
|
||||
file(READ "@CMAKE_BINARY_DIR@/install_manifest.txt" files)
|
||||
string(REGEX REPLACE "\n" ";" files "${files}")
|
||||
foreach (file ${files})
|
||||
message(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"")
|
||||
|
|
|
|||
1191
Engine/lib/sdl/configure
vendored
1191
Engine/lib/sdl/configure
vendored
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -1,3 +1,27 @@
|
|||
libsdl2 (2.0.8) UNRELEASED; urgency=low
|
||||
|
||||
* Updated SDL to version 2.0.8
|
||||
|
||||
-- Sam Lantinga <slouken@libsdl.org> Sat, 4 Nov 2017 21:21:53 -0800
|
||||
|
||||
libsdl2 (2.0.7) UNRELEASED; urgency=low
|
||||
|
||||
* Updated SDL to version 2.0.7
|
||||
|
||||
-- Sam Lantinga <slouken@libsdl.org> Thu, 12 Oct 2017 08:01:16 -0800
|
||||
|
||||
libsdl2 (2.0.6) UNRELEASED; urgency=low
|
||||
|
||||
* Updated SDL to version 2.0.6
|
||||
|
||||
-- Sam Lantinga <slouken@libsdl.org> Sat, 9 Sep 2017 07:29:36 -0800
|
||||
|
||||
libsdl2 (2.0.5) UNRELEASED; urgency=low
|
||||
|
||||
* Updated SDL to version 2.0.5
|
||||
|
||||
-- Sam Lantinga <slouken@libsdl.org> Mon, 28 Nov 2016 07:32:52 -0800
|
||||
|
||||
libsdl2 (2.0.4) UNRELEASED; urgency=low
|
||||
|
||||
* Updated SDL to version 2.0.4
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ Standards-Version: 3.9.3
|
|||
Build-Depends: debhelper (>= 9),
|
||||
dh-autoreconf,
|
||||
dpkg-dev (>= 1.16.1~),
|
||||
fcitx-libs-dev [linux-any],
|
||||
libasound2-dev [linux-any],
|
||||
libgl1-mesa-dev,
|
||||
libpulse-dev,
|
||||
|
|
@ -26,7 +27,6 @@ Build-Depends: debhelper (>= 9),
|
|||
libxinerama-dev,
|
||||
libxrandr-dev,
|
||||
libxss-dev,
|
||||
libxt-dev,
|
||||
libxxf86vm-dev
|
||||
Homepage: http://www.libsdl.org/
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Upstream-Contact: Sam Lantinga <slouken@libsdl.org>
|
|||
Source: http://www.libsdl.org/
|
||||
|
||||
Files: *
|
||||
Copyright: 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright: 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
License: zlib/libpng
|
||||
|
||||
Files: src/libm/*
|
||||
|
|
@ -12,7 +12,7 @@ Copyright: 1993 by Sun Microsystems, Inc. All rights reserved.
|
|||
License: SunPro
|
||||
|
||||
Files: src/main/windows/SDL_windows_main.c
|
||||
Copyright: 2016 Sam Lantinga
|
||||
Copyright: 2018 Sam Lantinga
|
||||
License: PublicDomain_Sam_Lantinga
|
||||
Comment: SDL_main.c, placed in the public domain by Sam Lantinga 4/13/98
|
||||
|
||||
|
|
@ -32,7 +32,7 @@ Copyright: 1995 Erik Corry
|
|||
License: BrownUn_UnCalifornia_ErikCorry
|
||||
|
||||
Files: src/test/SDL_test_md5.c
|
||||
Copyright: 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright: 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
1990 RSA Data Security, Inc.
|
||||
License: zlib/libpng and RSA_Data_Security
|
||||
|
||||
|
|
@ -46,12 +46,12 @@ Copyright: 1994-2003 The XFree86 Project, Inc.
|
|||
License: MIT/X11
|
||||
|
||||
Files: test/testhaptic.c
|
||||
Copyright: 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright: 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
2008 Edgar Simo Serra
|
||||
License: BSD_3_clause
|
||||
|
||||
Files: test/testrumble.c
|
||||
Copyright: 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright: 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
2011 Edgar Simo Serra
|
||||
License: BSD_3_clause
|
||||
|
||||
|
|
@ -169,7 +169,7 @@ License: BSD_3_clause
|
|||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
Comment:
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 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
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
usr/bin/sdl2-config
|
||||
usr/include/SDL2
|
||||
usr/lib/*/libSDL2*.so
|
||||
usr/lib/*/libSDL2.a
|
||||
usr/lib/*/libSDL2main.a
|
||||
usr/lib/*/libSDL2_test.a
|
||||
usr/lib/*/*.a
|
||||
usr/lib/*/*.la
|
||||
usr/lib/*/*.so
|
||||
usr/lib/*/pkgconfig/sdl2.pc
|
||||
usr/lib/*/cmake/SDL2/sdl2-config.cmake
|
||||
usr/share/aclocal/sdl2.m4
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 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
|
||||
|
|
@ -26,8 +26,8 @@
|
|||
*/
|
||||
|
||||
|
||||
#ifndef _SDL_H
|
||||
#define _SDL_H
|
||||
#ifndef SDL_h_
|
||||
#define SDL_h_
|
||||
|
||||
#include "SDL_main.h"
|
||||
#include "SDL_stdinc.h"
|
||||
|
|
@ -40,10 +40,10 @@
|
|||
#include "SDL_error.h"
|
||||
#include "SDL_events.h"
|
||||
#include "SDL_filesystem.h"
|
||||
#include "SDL_joystick.h"
|
||||
#include "SDL_gamecontroller.h"
|
||||
#include "SDL_haptic.h"
|
||||
#include "SDL_hints.h"
|
||||
#include "SDL_joystick.h"
|
||||
#include "SDL_loadso.h"
|
||||
#include "SDL_log.h"
|
||||
#include "SDL_messagebox.h"
|
||||
|
|
@ -51,6 +51,7 @@
|
|||
#include "SDL_power.h"
|
||||
#include "SDL_render.h"
|
||||
#include "SDL_rwops.h"
|
||||
#include "SDL_shape.h"
|
||||
#include "SDL_system.h"
|
||||
#include "SDL_thread.h"
|
||||
#include "SDL_timer.h"
|
||||
|
|
@ -127,6 +128,6 @@ extern DECLSPEC void SDLCALL SDL_Quit(void);
|
|||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_H */
|
||||
#endif /* SDL_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 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
|
||||
|
|
@ -19,8 +19,8 @@
|
|||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_assert_h
|
||||
#define _SDL_assert_h
|
||||
#ifndef SDL_assert_h_
|
||||
#define SDL_assert_h_
|
||||
|
||||
#include "SDL_config.h"
|
||||
|
||||
|
|
@ -51,9 +51,11 @@ assert can have unique static variables associated with it.
|
|||
/* Don't include intrin.h here because it contains C++ code */
|
||||
extern void __cdecl __debugbreak(void);
|
||||
#define SDL_TriggerBreakpoint() __debugbreak()
|
||||
#elif (!defined(__NACL__) && defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)))
|
||||
#elif ( (!defined(__NACL__)) && ((defined(__GNUC__) || defined(__clang__)) && (defined(__i386__) || defined(__x86_64__))) )
|
||||
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "int $3\n\t" )
|
||||
#elif defined(HAVE_SIGNAL_H)
|
||||
#elif defined(__386__) && defined(__WATCOMC__)
|
||||
#define SDL_TriggerBreakpoint() { _asm { int 0x03 } }
|
||||
#elif defined(HAVE_SIGNAL_H) && !defined(__WATCOMC__)
|
||||
#include <signal.h>
|
||||
#define SDL_TriggerBreakpoint() raise(SIGTRAP)
|
||||
#else
|
||||
|
|
@ -63,7 +65,7 @@ assert can have unique static variables associated with it.
|
|||
|
||||
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 supports __func__ as a standard. */
|
||||
# define SDL_FUNCTION __func__
|
||||
#elif ((__GNUC__ >= 2) || defined(_MSC_VER))
|
||||
#elif ((__GNUC__ >= 2) || defined(_MSC_VER) || defined (__WATCOMC__))
|
||||
# define SDL_FUNCTION __FUNCTION__
|
||||
#else
|
||||
# define SDL_FUNCTION "???"
|
||||
|
|
@ -201,7 +203,7 @@ typedef SDL_AssertState (SDLCALL *SDL_AssertionHandler)(
|
|||
*
|
||||
* This callback is NOT reset to SDL's internal handler upon SDL_Quit()!
|
||||
*
|
||||
* \return SDL_AssertState value of how to handle the assertion failure.
|
||||
* Return SDL_AssertState value of how to handle the assertion failure.
|
||||
*
|
||||
* \param handler Callback function, called when an assertion fails.
|
||||
* \param userdata A pointer passed to the callback as-is.
|
||||
|
|
@ -250,7 +252,7 @@ extern DECLSPEC SDL_AssertionHandler SDLCALL SDL_GetAssertionHandler(void **puse
|
|||
* <code>
|
||||
* const SDL_AssertData *item = SDL_GetAssertionReport();
|
||||
* while (item) {
|
||||
* printf("'%s', %s (%s:%d), triggered %u times, always ignore: %s.\n",
|
||||
* printf("'%s', %s (%s:%d), triggered %u times, always ignore: %s.\\n",
|
||||
* item->condition, item->function, item->filename,
|
||||
* item->linenum, item->trigger_count,
|
||||
* item->always_ignore ? "yes" : "no");
|
||||
|
|
@ -284,6 +286,6 @@ extern DECLSPEC void SDLCALL SDL_ResetAssertionReport(void);
|
|||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_assert_h */
|
||||
#endif /* SDL_assert_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 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
|
||||
|
|
@ -56,8 +56,8 @@
|
|||
* All of the atomic operations that modify memory are full memory barriers.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_atomic_h_
|
||||
#define _SDL_atomic_h_
|
||||
#ifndef SDL_atomic_h_
|
||||
#define SDL_atomic_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_platform.h"
|
||||
|
|
@ -118,13 +118,16 @@ extern DECLSPEC void SDLCALL SDL_AtomicUnlock(SDL_SpinLock *lock);
|
|||
* The compiler barrier prevents the compiler from reordering
|
||||
* reads and writes to globally visible variables across the call.
|
||||
*/
|
||||
#if defined(_MSC_VER) && (_MSC_VER > 1200)
|
||||
#if defined(_MSC_VER) && (_MSC_VER > 1200) && !defined(__clang__)
|
||||
void _ReadWriteBarrier(void);
|
||||
#pragma intrinsic(_ReadWriteBarrier)
|
||||
#define SDL_CompilerBarrier() _ReadWriteBarrier()
|
||||
#elif (defined(__GNUC__) && !defined(__EMSCRIPTEN__)) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x5120))
|
||||
/* This is correct for all CPUs when using GCC or Solaris Studio 12.1+. */
|
||||
#define SDL_CompilerBarrier() __asm__ __volatile__ ("" : : : "memory")
|
||||
#elif defined(__WATCOMC__)
|
||||
extern _inline void SDL_CompilerBarrier (void);
|
||||
#pragma aux SDL_CompilerBarrier = "" parm [] modify exact [];
|
||||
#else
|
||||
#define SDL_CompilerBarrier() \
|
||||
{ SDL_SpinLock _tmp = 0; SDL_AtomicLock(&_tmp); SDL_AtomicUnlock(&_tmp); }
|
||||
|
|
@ -149,18 +152,24 @@ void _ReadWriteBarrier(void);
|
|||
* For more information on these semantics, take a look at the blog post:
|
||||
* http://preshing.com/20120913/acquire-and-release-semantics
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_MemoryBarrierReleaseFunction(void);
|
||||
extern DECLSPEC void SDLCALL SDL_MemoryBarrierAcquireFunction(void);
|
||||
|
||||
#if defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__))
|
||||
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("lwsync" : : : "memory")
|
||||
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("lwsync" : : : "memory")
|
||||
#elif defined(__GNUC__) && defined(__aarch64__)
|
||||
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("dmb ish" : : : "memory")
|
||||
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("dmb ish" : : : "memory")
|
||||
#elif defined(__GNUC__) && defined(__arm__)
|
||||
#if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7EM__) || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7S__)
|
||||
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("dmb ish" : : : "memory")
|
||||
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("dmb ish" : : : "memory")
|
||||
#elif defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__)
|
||||
#elif defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_5TE__)
|
||||
#ifdef __thumb__
|
||||
/* The mcr instruction isn't available in thumb mode, use real functions */
|
||||
extern DECLSPEC void SDLCALL SDL_MemoryBarrierRelease();
|
||||
extern DECLSPEC void SDLCALL SDL_MemoryBarrierAcquire();
|
||||
#define SDL_MemoryBarrierRelease() SDL_MemoryBarrierReleaseFunction()
|
||||
#define SDL_MemoryBarrierAcquire() SDL_MemoryBarrierAcquireFunction()
|
||||
#else
|
||||
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5" : : "r"(0) : "memory")
|
||||
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5" : : "r"(0) : "memory")
|
||||
|
|
@ -263,6 +272,6 @@ extern DECLSPEC void* SDLCALL SDL_AtomicGetPtr(void **a);
|
|||
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_atomic_h_ */
|
||||
#endif /* SDL_atomic_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 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
|
||||
|
|
@ -25,8 +25,8 @@
|
|||
* Access to the raw audio mixing buffer for the SDL library.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_audio_h
|
||||
#define _SDL_audio_h
|
||||
#ifndef SDL_audio_h_
|
||||
#define SDL_audio_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_error.h"
|
||||
|
|
@ -164,6 +164,15 @@ typedef void (SDLCALL * SDL_AudioCallback) (void *userdata, Uint8 * stream,
|
|||
|
||||
/**
|
||||
* The calculated values in this structure are calculated by SDL_OpenAudio().
|
||||
*
|
||||
* For multi-channel audio, the default SDL channel mapping is:
|
||||
* 2: FL FR (stereo)
|
||||
* 3: FL FR LFE (2.1 surround)
|
||||
* 4: FL FR BL BR (quad)
|
||||
* 5: FL FR FC BL BR (quad + center)
|
||||
* 6: FL FR FC LFE SL SR (5.1 surround - last two can also be BL BR)
|
||||
* 7: FL FR FC LFE BC SL SR (6.1 surround)
|
||||
* 8: FL FR FC LFE BL BR SL SR (7.1 surround)
|
||||
*/
|
||||
typedef struct SDL_AudioSpec
|
||||
{
|
||||
|
|
@ -171,7 +180,7 @@ typedef struct SDL_AudioSpec
|
|||
SDL_AudioFormat format; /**< Audio data format */
|
||||
Uint8 channels; /**< Number of channels: 1 mono, 2 stereo */
|
||||
Uint8 silence; /**< Audio buffer silence value (calculated) */
|
||||
Uint16 samples; /**< Audio buffer size in samples (power of 2) */
|
||||
Uint16 samples; /**< Audio buffer size in sample FRAMES (total samples divided by channel count) */
|
||||
Uint16 padding; /**< Necessary for some compile environments */
|
||||
Uint32 size; /**< Audio buffer size in bytes (calculated) */
|
||||
SDL_AudioCallback callback; /**< Callback that feeds the audio device (NULL to use SDL_QueueAudio()). */
|
||||
|
|
@ -184,7 +193,23 @@ typedef void (SDLCALL * SDL_AudioFilter) (struct SDL_AudioCVT * cvt,
|
|||
SDL_AudioFormat format);
|
||||
|
||||
/**
|
||||
* A structure to hold a set of audio conversion filters and buffers.
|
||||
* \brief Upper limit of filters in SDL_AudioCVT
|
||||
*
|
||||
* The maximum number of SDL_AudioFilter functions in SDL_AudioCVT is
|
||||
* currently limited to 9. The SDL_AudioCVT.filters array has 10 pointers,
|
||||
* one of which is the terminating NULL pointer.
|
||||
*/
|
||||
#define SDL_AUDIOCVT_MAX_FILTERS 9
|
||||
|
||||
/**
|
||||
* \struct SDL_AudioCVT
|
||||
* \brief A structure to hold a set of audio conversion filters and buffers.
|
||||
*
|
||||
* Note that various parts of the conversion pipeline can take advantage
|
||||
* of SIMD operations (like SSE2, for example). SDL_AudioCVT doesn't require
|
||||
* you to pass it aligned data, but can possibly run much faster if you
|
||||
* set both its (buf) field to a pointer that is aligned to 16 bytes, and its
|
||||
* (len) field to something that's a multiple of 16, if possible.
|
||||
*/
|
||||
#ifdef __GNUC__
|
||||
/* This structure is 84 bytes on 32-bit architectures, make sure GCC doesn't
|
||||
|
|
@ -208,7 +233,7 @@ typedef struct SDL_AudioCVT
|
|||
int len_cvt; /**< Length of converted audio buffer */
|
||||
int len_mult; /**< buffer must be len*len_mult big */
|
||||
double len_ratio; /**< Given len, final size is len*len_ratio */
|
||||
SDL_AudioFilter filters[10]; /**< Filter list */
|
||||
SDL_AudioFilter filters[SDL_AUDIOCVT_MAX_FILTERS + 1]; /**< NULL-terminated list of filter functions */
|
||||
int filter_index; /**< Current audio conversion function */
|
||||
} SDL_AUDIOCVT_PACKED SDL_AudioCVT;
|
||||
|
||||
|
|
@ -434,10 +459,10 @@ extern DECLSPEC void SDLCALL SDL_FreeWAV(Uint8 * audio_buf);
|
|||
* This function takes a source format and rate and a destination format
|
||||
* and rate, and initializes the \c cvt structure with information needed
|
||||
* by SDL_ConvertAudio() to convert a buffer of audio data from one format
|
||||
* to the other.
|
||||
* to the other. An unsupported format causes an error and -1 will be returned.
|
||||
*
|
||||
* \return -1 if the format conversion is not supported, 0 if there's
|
||||
* no conversion needed, or 1 if the audio filter is set up.
|
||||
* \return 0 if no conversion is needed, 1 if the audio filter is set up,
|
||||
* or -1 on error.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_BuildAudioCVT(SDL_AudioCVT * cvt,
|
||||
SDL_AudioFormat src_format,
|
||||
|
|
@ -456,9 +481,137 @@ extern DECLSPEC int SDLCALL SDL_BuildAudioCVT(SDL_AudioCVT * cvt,
|
|||
* The data conversion may expand the size of the audio data, so the buffer
|
||||
* \c cvt->buf should be allocated after the \c cvt structure is initialized by
|
||||
* SDL_BuildAudioCVT(), and should be \c cvt->len*cvt->len_mult bytes long.
|
||||
*
|
||||
* \return 0 on success or -1 if \c cvt->buf is NULL.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_ConvertAudio(SDL_AudioCVT * cvt);
|
||||
|
||||
/* SDL_AudioStream is a new audio conversion interface.
|
||||
The benefits vs SDL_AudioCVT:
|
||||
- it can handle resampling data in chunks without generating
|
||||
artifacts, when it doesn't have the complete buffer available.
|
||||
- it can handle incoming data in any variable size.
|
||||
- You push data as you have it, and pull it when you need it
|
||||
*/
|
||||
/* this is opaque to the outside world. */
|
||||
struct _SDL_AudioStream;
|
||||
typedef struct _SDL_AudioStream SDL_AudioStream;
|
||||
|
||||
/**
|
||||
* Create a new audio stream
|
||||
*
|
||||
* \param src_format The format of the source audio
|
||||
* \param src_channels The number of channels of the source audio
|
||||
* \param src_rate The sampling rate of the source audio
|
||||
* \param dst_format The format of the desired audio output
|
||||
* \param dst_channels The number of channels of the desired audio output
|
||||
* \param dst_rate The sampling rate of the desired audio output
|
||||
* \return 0 on success, or -1 on error.
|
||||
*
|
||||
* \sa SDL_AudioStreamPut
|
||||
* \sa SDL_AudioStreamGet
|
||||
* \sa SDL_AudioStreamAvailable
|
||||
* \sa SDL_AudioStreamFlush
|
||||
* \sa SDL_AudioStreamClear
|
||||
* \sa SDL_FreeAudioStream
|
||||
*/
|
||||
extern DECLSPEC SDL_AudioStream * SDLCALL SDL_NewAudioStream(const SDL_AudioFormat src_format,
|
||||
const Uint8 src_channels,
|
||||
const int src_rate,
|
||||
const SDL_AudioFormat dst_format,
|
||||
const Uint8 dst_channels,
|
||||
const int dst_rate);
|
||||
|
||||
/**
|
||||
* Add data to be converted/resampled to the stream
|
||||
*
|
||||
* \param stream The stream the audio data is being added to
|
||||
* \param buf A pointer to the audio data to add
|
||||
* \param len The number of bytes to write to the stream
|
||||
* \return 0 on success, or -1 on error.
|
||||
*
|
||||
* \sa SDL_NewAudioStream
|
||||
* \sa SDL_AudioStreamGet
|
||||
* \sa SDL_AudioStreamAvailable
|
||||
* \sa SDL_AudioStreamFlush
|
||||
* \sa SDL_AudioStreamClear
|
||||
* \sa SDL_FreeAudioStream
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_AudioStreamPut(SDL_AudioStream *stream, const void *buf, int len);
|
||||
|
||||
/**
|
||||
* Get converted/resampled data from the stream
|
||||
*
|
||||
* \param stream The stream the audio is being requested from
|
||||
* \param buf A buffer to fill with audio data
|
||||
* \param len The maximum number of bytes to fill
|
||||
* \return The number of bytes read from the stream, or -1 on error
|
||||
*
|
||||
* \sa SDL_NewAudioStream
|
||||
* \sa SDL_AudioStreamPut
|
||||
* \sa SDL_AudioStreamAvailable
|
||||
* \sa SDL_AudioStreamFlush
|
||||
* \sa SDL_AudioStreamClear
|
||||
* \sa SDL_FreeAudioStream
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_AudioStreamGet(SDL_AudioStream *stream, void *buf, int len);
|
||||
|
||||
/**
|
||||
* Get the number of converted/resampled bytes available. The stream may be
|
||||
* buffering data behind the scenes until it has enough to resample
|
||||
* correctly, so this number might be lower than what you expect, or even
|
||||
* be zero. Add more data or flush the stream if you need the data now.
|
||||
*
|
||||
* \sa SDL_NewAudioStream
|
||||
* \sa SDL_AudioStreamPut
|
||||
* \sa SDL_AudioStreamGet
|
||||
* \sa SDL_AudioStreamFlush
|
||||
* \sa SDL_AudioStreamClear
|
||||
* \sa SDL_FreeAudioStream
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_AudioStreamAvailable(SDL_AudioStream *stream);
|
||||
|
||||
/**
|
||||
* Tell the stream that you're done sending data, and anything being buffered
|
||||
* should be converted/resampled and made available immediately.
|
||||
*
|
||||
* It is legal to add more data to a stream after flushing, but there will
|
||||
* be audio gaps in the output. Generally this is intended to signal the
|
||||
* end of input, so the complete output becomes available.
|
||||
*
|
||||
* \sa SDL_NewAudioStream
|
||||
* \sa SDL_AudioStreamPut
|
||||
* \sa SDL_AudioStreamGet
|
||||
* \sa SDL_AudioStreamAvailable
|
||||
* \sa SDL_AudioStreamClear
|
||||
* \sa SDL_FreeAudioStream
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_AudioStreamFlush(SDL_AudioStream *stream);
|
||||
|
||||
/**
|
||||
* Clear any pending data in the stream without converting it
|
||||
*
|
||||
* \sa SDL_NewAudioStream
|
||||
* \sa SDL_AudioStreamPut
|
||||
* \sa SDL_AudioStreamGet
|
||||
* \sa SDL_AudioStreamAvailable
|
||||
* \sa SDL_AudioStreamFlush
|
||||
* \sa SDL_FreeAudioStream
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_AudioStreamClear(SDL_AudioStream *stream);
|
||||
|
||||
/**
|
||||
* Free an audio stream
|
||||
*
|
||||
* \sa SDL_NewAudioStream
|
||||
* \sa SDL_AudioStreamPut
|
||||
* \sa SDL_AudioStreamGet
|
||||
* \sa SDL_AudioStreamAvailable
|
||||
* \sa SDL_AudioStreamFlush
|
||||
* \sa SDL_AudioStreamClear
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_FreeAudioStream(SDL_AudioStream *stream);
|
||||
|
||||
#define SDL_MIX_MAXVOLUME 128
|
||||
/**
|
||||
* This takes two audio buffers of the playing audio format and mixes
|
||||
|
|
@ -514,7 +667,7 @@ extern DECLSPEC void SDLCALL SDL_MixAudioFormat(Uint8 * dst,
|
|||
* \param dev The device ID to which we will queue audio.
|
||||
* \param data The data to queue to the device for later playback.
|
||||
* \param len The number of bytes (not samples!) to which (data) points.
|
||||
* \return zero on success, -1 on error.
|
||||
* \return 0 on success, or -1 on error.
|
||||
*
|
||||
* \sa SDL_GetQueuedAudioSize
|
||||
* \sa SDL_ClearQueuedAudio
|
||||
|
|
@ -667,6 +820,6 @@ extern DECLSPEC void SDLCALL SDL_CloseAudioDevice(SDL_AudioDeviceID dev);
|
|||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_audio_h */
|
||||
#endif /* SDL_audio_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 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
|
||||
|
|
@ -25,8 +25,8 @@
|
|||
* Functions for fiddling with bits and bitmasks.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_bits_h
|
||||
#define _SDL_bits_h
|
||||
#ifndef SDL_bits_h_
|
||||
#define SDL_bits_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
|
||||
|
|
@ -47,10 +47,20 @@ extern "C" {
|
|||
*
|
||||
* \return Index of the most significant bit, or -1 if the value is 0.
|
||||
*/
|
||||
#if defined(__WATCOMC__) && defined(__386__)
|
||||
extern _inline int _SDL_clz_watcom (Uint32);
|
||||
#pragma aux _SDL_clz_watcom = \
|
||||
"bsr eax, eax" \
|
||||
"xor eax, 31" \
|
||||
parm [eax] nomemory \
|
||||
value [eax] \
|
||||
modify exact [eax] nomemory;
|
||||
#endif
|
||||
|
||||
SDL_FORCE_INLINE int
|
||||
SDL_MostSignificantBitIndex32(Uint32 x)
|
||||
{
|
||||
#if defined(__GNUC__) && __GNUC__ >= 4
|
||||
#if defined(__GNUC__) && (__GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
|
||||
/* Count Leading Zeroes builtin in GCC.
|
||||
* http://gcc.gnu.org/onlinedocs/gcc-4.3.4/gcc/Other-Builtins.html
|
||||
*/
|
||||
|
|
@ -58,6 +68,11 @@ SDL_MostSignificantBitIndex32(Uint32 x)
|
|||
return -1;
|
||||
}
|
||||
return 31 - __builtin_clz(x);
|
||||
#elif defined(__WATCOMC__) && defined(__386__)
|
||||
if (x == 0) {
|
||||
return -1;
|
||||
}
|
||||
return 31 - _SDL_clz_watcom(x);
|
||||
#else
|
||||
/* Based off of Bit Twiddling Hacks by Sean Eron Anderson
|
||||
* <seander@cs.stanford.edu>, released in the public domain.
|
||||
|
|
@ -92,6 +107,6 @@ SDL_MostSignificantBitIndex32(Uint32 x)
|
|||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_bits_h */
|
||||
#endif /* SDL_bits_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 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
|
||||
|
|
@ -25,8 +25,8 @@
|
|||
* Header file declaring the SDL_BlendMode enumeration
|
||||
*/
|
||||
|
||||
#ifndef _SDL_blendmode_h
|
||||
#define _SDL_blendmode_h
|
||||
#ifndef SDL_blendmode_h_
|
||||
#define SDL_blendmode_h_
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
|
|
@ -47,17 +47,74 @@ typedef enum
|
|||
SDL_BLENDMODE_ADD = 0x00000002, /**< additive blending
|
||||
dstRGB = (srcRGB * srcA) + dstRGB
|
||||
dstA = dstA */
|
||||
SDL_BLENDMODE_MOD = 0x00000004 /**< color modulate
|
||||
SDL_BLENDMODE_MOD = 0x00000004, /**< color modulate
|
||||
dstRGB = srcRGB * dstRGB
|
||||
dstA = dstA */
|
||||
SDL_BLENDMODE_INVALID = 0x7FFFFFFF
|
||||
|
||||
/* Additional custom blend modes can be returned by SDL_ComposeCustomBlendMode() */
|
||||
|
||||
} SDL_BlendMode;
|
||||
|
||||
/**
|
||||
* \brief The blend operation used when combining source and destination pixel components
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
SDL_BLENDOPERATION_ADD = 0x1, /**< dst + src: supported by all renderers */
|
||||
SDL_BLENDOPERATION_SUBTRACT = 0x2, /**< dst - src : supported by D3D9, D3D11, OpenGL, OpenGLES */
|
||||
SDL_BLENDOPERATION_REV_SUBTRACT = 0x3, /**< src - dst : supported by D3D9, D3D11, OpenGL, OpenGLES */
|
||||
SDL_BLENDOPERATION_MINIMUM = 0x4, /**< min(dst, src) : supported by D3D11 */
|
||||
SDL_BLENDOPERATION_MAXIMUM = 0x5 /**< max(dst, src) : supported by D3D11 */
|
||||
|
||||
} SDL_BlendOperation;
|
||||
|
||||
/**
|
||||
* \brief The normalized factor used to multiply pixel components
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
SDL_BLENDFACTOR_ZERO = 0x1, /**< 0, 0, 0, 0 */
|
||||
SDL_BLENDFACTOR_ONE = 0x2, /**< 1, 1, 1, 1 */
|
||||
SDL_BLENDFACTOR_SRC_COLOR = 0x3, /**< srcR, srcG, srcB, srcA */
|
||||
SDL_BLENDFACTOR_ONE_MINUS_SRC_COLOR = 0x4, /**< 1-srcR, 1-srcG, 1-srcB, 1-srcA */
|
||||
SDL_BLENDFACTOR_SRC_ALPHA = 0x5, /**< srcA, srcA, srcA, srcA */
|
||||
SDL_BLENDFACTOR_ONE_MINUS_SRC_ALPHA = 0x6, /**< 1-srcA, 1-srcA, 1-srcA, 1-srcA */
|
||||
SDL_BLENDFACTOR_DST_COLOR = 0x7, /**< dstR, dstG, dstB, dstA */
|
||||
SDL_BLENDFACTOR_ONE_MINUS_DST_COLOR = 0x8, /**< 1-dstR, 1-dstG, 1-dstB, 1-dstA */
|
||||
SDL_BLENDFACTOR_DST_ALPHA = 0x9, /**< dstA, dstA, dstA, dstA */
|
||||
SDL_BLENDFACTOR_ONE_MINUS_DST_ALPHA = 0xA /**< 1-dstA, 1-dstA, 1-dstA, 1-dstA */
|
||||
|
||||
} SDL_BlendFactor;
|
||||
|
||||
/**
|
||||
* \brief Create a custom blend mode, which may or may not be supported by a given renderer
|
||||
*
|
||||
* \param srcColorFactor
|
||||
* \param dstColorFactor
|
||||
* \param colorOperation
|
||||
* \param srcAlphaFactor
|
||||
* \param dstAlphaFactor
|
||||
* \param alphaOperation
|
||||
*
|
||||
* The result of the blend mode operation will be:
|
||||
* dstRGB = dstRGB * dstColorFactor colorOperation srcRGB * srcColorFactor
|
||||
* and
|
||||
* dstA = dstA * dstAlphaFactor alphaOperation srcA * srcAlphaFactor
|
||||
*/
|
||||
extern DECLSPEC SDL_BlendMode SDLCALL SDL_ComposeCustomBlendMode(SDL_BlendFactor srcColorFactor,
|
||||
SDL_BlendFactor dstColorFactor,
|
||||
SDL_BlendOperation colorOperation,
|
||||
SDL_BlendFactor srcAlphaFactor,
|
||||
SDL_BlendFactor dstAlphaFactor,
|
||||
SDL_BlendOperation alphaOperation);
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_blendmode_h */
|
||||
#endif /* SDL_blendmode_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 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
|
||||
|
|
@ -25,8 +25,8 @@
|
|||
* Include file for SDL clipboard handling
|
||||
*/
|
||||
|
||||
#ifndef _SDL_clipboard_h
|
||||
#define _SDL_clipboard_h
|
||||
#ifndef SDL_clipboard_h_
|
||||
#define SDL_clipboard_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
|
||||
|
|
@ -66,6 +66,6 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasClipboardText(void);
|
|||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_clipboard_h */
|
||||
#endif /* SDL_clipboard_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 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
|
||||
|
|
@ -19,8 +19,8 @@
|
|||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_config_h
|
||||
#define _SDL_config_h
|
||||
#ifndef SDL_config_h_
|
||||
#define SDL_config_h_
|
||||
|
||||
#include "SDL_platform.h"
|
||||
|
||||
|
|
@ -29,9 +29,7 @@
|
|||
*/
|
||||
|
||||
/* Add any platform that doesn't build using the configure system. */
|
||||
#ifdef USING_PREMAKE_CONFIG_H
|
||||
#include "SDL_config_premake.h"
|
||||
#elif defined(__WIN32__)
|
||||
#if defined(__WIN32__)
|
||||
#include "SDL_config_windows.h"
|
||||
#elif defined(__WINRT__)
|
||||
#include "SDL_config_winrt.h"
|
||||
|
|
@ -52,4 +50,4 @@
|
|||
#error Wrong SDL_config.h, check your include path?
|
||||
#endif
|
||||
|
||||
#endif /* _SDL_config_h */
|
||||
#endif /* SDL_config_h_ */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 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
|
||||
|
|
@ -19,8 +19,8 @@
|
|||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_config_h
|
||||
#define _SDL_config_h
|
||||
#ifndef SDL_config_h_
|
||||
#define SDL_config_h_
|
||||
|
||||
/**
|
||||
* \file SDL_config.h.in
|
||||
|
|
@ -47,42 +47,32 @@
|
|||
#cmakedefine HAVE_GCC_ATOMICS @HAVE_GCC_ATOMICS@
|
||||
#cmakedefine HAVE_GCC_SYNC_LOCK_TEST_AND_SET @HAVE_GCC_SYNC_LOCK_TEST_AND_SET@
|
||||
|
||||
#cmakedefine HAVE_D3D_H @HAVE_D3D_H@
|
||||
#cmakedefine HAVE_D3D11_H @HAVE_D3D11_H@
|
||||
#cmakedefine HAVE_DDRAW_H @HAVE_DDRAW_H@
|
||||
#cmakedefine HAVE_DSOUND_H @HAVE_DSOUND_H@
|
||||
#cmakedefine HAVE_DINPUT_H @HAVE_DINPUT_H@
|
||||
#cmakedefine HAVE_XAUDIO2_H @HAVE_XAUDIO2_H@
|
||||
#cmakedefine HAVE_XINPUT_H @HAVE_XINPUT_H@
|
||||
#cmakedefine HAVE_DXGI_H @HAVE_DXGI_H@
|
||||
|
||||
/* Comment this if you want to build without any C library requirements */
|
||||
#cmakedefine HAVE_LIBC 1
|
||||
#if HAVE_LIBC
|
||||
|
||||
/* Useful headers */
|
||||
#cmakedefine HAVE_ALLOCA_H 1
|
||||
#cmakedefine HAVE_SYS_TYPES_H 1
|
||||
#cmakedefine HAVE_STDIO_H 1
|
||||
#cmakedefine STDC_HEADERS 1
|
||||
#cmakedefine HAVE_STDLIB_H 1
|
||||
#cmakedefine HAVE_STDARG_H 1
|
||||
#cmakedefine HAVE_MALLOC_H 1
|
||||
#cmakedefine HAVE_MEMORY_H 1
|
||||
#cmakedefine HAVE_STRING_H 1
|
||||
#cmakedefine HAVE_STRINGS_H 1
|
||||
#cmakedefine HAVE_INTTYPES_H 1
|
||||
#cmakedefine HAVE_STDINT_H 1
|
||||
#cmakedefine HAVE_ALLOCA_H 1
|
||||
#cmakedefine HAVE_CTYPE_H 1
|
||||
#cmakedefine HAVE_MATH_H 1
|
||||
#cmakedefine HAVE_FLOAT_H 1
|
||||
#cmakedefine HAVE_ICONV_H 1
|
||||
#cmakedefine HAVE_INTTYPES_H 1
|
||||
#cmakedefine HAVE_LIMITS_H 1
|
||||
#cmakedefine HAVE_MALLOC_H 1
|
||||
#cmakedefine HAVE_MATH_H 1
|
||||
#cmakedefine HAVE_MEMORY_H 1
|
||||
#cmakedefine HAVE_SIGNAL_H 1
|
||||
#cmakedefine HAVE_ALTIVEC_H 1
|
||||
#cmakedefine HAVE_STDARG_H 1
|
||||
#cmakedefine HAVE_STDINT_H 1
|
||||
#cmakedefine HAVE_STDIO_H 1
|
||||
#cmakedefine HAVE_STDLIB_H 1
|
||||
#cmakedefine HAVE_STRINGS_H 1
|
||||
#cmakedefine HAVE_STRING_H 1
|
||||
#cmakedefine HAVE_SYS_TYPES_H 1
|
||||
#cmakedefine HAVE_WCHAR_H 1
|
||||
#cmakedefine HAVE_PTHREAD_NP_H 1
|
||||
#cmakedefine HAVE_LIBUDEV_H 1
|
||||
#cmakedefine HAVE_DBUS_DBUS_H 1
|
||||
#cmakedefine HAVE_IBUS_IBUS_H 1
|
||||
#cmakedefine HAVE_FCITX_FRONTEND_H 1
|
||||
#cmakedefine HAVE_LIBUNWIND_H 1
|
||||
|
||||
/* C library functions */
|
||||
#cmakedefine HAVE_MALLOC 1
|
||||
|
|
@ -103,10 +93,13 @@
|
|||
#cmakedefine HAVE_MEMCPY 1
|
||||
#cmakedefine HAVE_MEMMOVE 1
|
||||
#cmakedefine HAVE_MEMCMP 1
|
||||
#cmakedefine HAVE_WCSLEN 1
|
||||
#cmakedefine HAVE_WCSLCPY 1
|
||||
#cmakedefine HAVE_WCSLCAT 1
|
||||
#cmakedefine HAVE_WCSCMP 1
|
||||
#cmakedefine HAVE_STRLEN 1
|
||||
#cmakedefine HAVE_STRLCPY 1
|
||||
#cmakedefine HAVE_STRLCAT 1
|
||||
#cmakedefine HAVE_STRDUP 1
|
||||
#cmakedefine HAVE__STRREV 1
|
||||
#cmakedefine HAVE__STRUPR 1
|
||||
#cmakedefine HAVE__STRLWR 1
|
||||
|
|
@ -137,25 +130,41 @@
|
|||
#cmakedefine HAVE_VSSCANF 1
|
||||
#cmakedefine HAVE_VSNPRINTF 1
|
||||
#cmakedefine HAVE_M_PI 1
|
||||
#cmakedefine HAVE_ATAN 1
|
||||
#cmakedefine HAVE_ATAN2 1
|
||||
#cmakedefine HAVE_ACOS 1
|
||||
#cmakedefine HAVE_ACOSF 1
|
||||
#cmakedefine HAVE_ASIN 1
|
||||
#cmakedefine HAVE_ASINF 1
|
||||
#cmakedefine HAVE_ATAN 1
|
||||
#cmakedefine HAVE_ATANF 1
|
||||
#cmakedefine HAVE_ATAN2 1
|
||||
#cmakedefine HAVE_ATAN2F 1
|
||||
#cmakedefine HAVE_CEIL 1
|
||||
#cmakedefine HAVE_CEILF 1
|
||||
#cmakedefine HAVE_COPYSIGN 1
|
||||
#cmakedefine HAVE_COPYSIGNF 1
|
||||
#cmakedefine HAVE_COS 1
|
||||
#cmakedefine HAVE_COSF 1
|
||||
#cmakedefine HAVE_FABS 1
|
||||
#cmakedefine HAVE_FABSF 1
|
||||
#cmakedefine HAVE_FLOOR 1
|
||||
#cmakedefine HAVE_FLOORF 1
|
||||
#cmakedefine HAVE_FMOD 1
|
||||
#cmakedefine HAVE_FMODF 1
|
||||
#cmakedefine HAVE_LOG 1
|
||||
#cmakedefine HAVE_LOGF 1
|
||||
#cmakedefine HAVE_LOG10 1
|
||||
#cmakedefine HAVE_LOG10F 1
|
||||
#cmakedefine HAVE_POW 1
|
||||
#cmakedefine HAVE_POWF 1
|
||||
#cmakedefine HAVE_SCALBN 1
|
||||
#cmakedefine HAVE_SCALBNF 1
|
||||
#cmakedefine HAVE_SIN 1
|
||||
#cmakedefine HAVE_SINF 1
|
||||
#cmakedefine HAVE_SQRT 1
|
||||
#cmakedefine HAVE_SQRTF 1
|
||||
#cmakedefine HAVE_TAN 1
|
||||
#cmakedefine HAVE_TANF 1
|
||||
#cmakedefine HAVE_FOPEN64 1
|
||||
#cmakedefine HAVE_FSEEKO 1
|
||||
#cmakedefine HAVE_FSEEKO64 1
|
||||
#cmakedefine HAVE_SIGACTION 1
|
||||
|
|
@ -171,14 +180,36 @@
|
|||
#cmakedefine HAVE_PTHREAD_SETNAME_NP 1
|
||||
#cmakedefine HAVE_PTHREAD_SET_NAME_NP 1
|
||||
#cmakedefine HAVE_SEM_TIMEDWAIT 1
|
||||
#cmakedefine HAVE_GETAUXVAL 1
|
||||
#cmakedefine HAVE_POLL 1
|
||||
|
||||
#elif __WIN32__
|
||||
#cmakedefine HAVE_STDARG_H 1
|
||||
#cmakedefine HAVE_STDDEF_H 1
|
||||
#cmakedefine HAVE_FLOAT_H 1
|
||||
#else
|
||||
/* We may need some replacement for stdarg.h here */
|
||||
#include <stdarg.h>
|
||||
#endif /* HAVE_LIBC */
|
||||
|
||||
#cmakedefine HAVE_ALTIVEC_H 1
|
||||
#cmakedefine HAVE_DBUS_DBUS_H 1
|
||||
#cmakedefine HAVE_FCITX_FRONTEND_H 1
|
||||
#cmakedefine HAVE_IBUS_IBUS_H 1
|
||||
#cmakedefine HAVE_IMMINTRIN_H 1
|
||||
#cmakedefine HAVE_LIBSAMPLERATE_H 1
|
||||
#cmakedefine HAVE_LIBUDEV_H 1
|
||||
|
||||
#cmakedefine HAVE_D3D_H @HAVE_D3D_H@
|
||||
#cmakedefine HAVE_D3D11_H @HAVE_D3D11_H@
|
||||
#cmakedefine HAVE_DDRAW_H @HAVE_DDRAW_H@
|
||||
#cmakedefine HAVE_DSOUND_H @HAVE_DSOUND_H@
|
||||
#cmakedefine HAVE_DINPUT_H @HAVE_DINPUT_H@
|
||||
#cmakedefine HAVE_XINPUT_H @HAVE_XINPUT_H@
|
||||
#cmakedefine HAVE_DXGI_H @HAVE_DXGI_H@
|
||||
#cmakedefine HAVE_XINPUT_GAMEPAD_EX @HAVE_XINPUT_GAMEPAD_EX@
|
||||
#cmakedefine HAVE_XINPUT_STATE_EX @HAVE_XINPUT_STATE_EX@
|
||||
|
||||
/* SDL internal assertion support */
|
||||
#cmakedefine SDL_DEFAULT_ASSERT_LEVEL @SDL_DEFAULT_ASSERT_LEVEL@
|
||||
|
||||
|
|
@ -199,35 +230,37 @@
|
|||
#cmakedefine SDL_FILESYSTEM_DISABLED @SDL_FILESYSTEM_DISABLED@
|
||||
|
||||
/* Enable various audio drivers */
|
||||
#cmakedefine SDL_AUDIO_DRIVER_ANDROID @SDL_AUDIO_DRIVER_ANDROID@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_ALSA @SDL_AUDIO_DRIVER_ALSA@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_ALSA_DYNAMIC @SDL_AUDIO_DRIVER_ALSA_DYNAMIC@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_ANDROID @SDL_AUDIO_DRIVER_ANDROID@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_ARTS @SDL_AUDIO_DRIVER_ARTS@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_ARTS_DYNAMIC @SDL_AUDIO_DRIVER_ARTS_DYNAMIC@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_PULSEAUDIO @SDL_AUDIO_DRIVER_PULSEAUDIO@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC @SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_HAIKU @SDL_AUDIO_DRIVER_HAIKU@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_BSD @SDL_AUDIO_DRIVER_BSD@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_COREAUDIO @SDL_AUDIO_DRIVER_COREAUDIO@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_DISK @SDL_AUDIO_DRIVER_DISK@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_DUMMY @SDL_AUDIO_DRIVER_DUMMY@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_XAUDIO2 @SDL_AUDIO_DRIVER_XAUDIO2@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_DSOUND @SDL_AUDIO_DRIVER_DSOUND@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_DUMMY @SDL_AUDIO_DRIVER_DUMMY@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_EMSCRIPTEN @SDL_AUDIO_DRIVER_EMSCRIPTEN@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_ESD @SDL_AUDIO_DRIVER_ESD@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_ESD_DYNAMIC @SDL_AUDIO_DRIVER_ESD_DYNAMIC@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_FUSIONSOUND @SDL_AUDIO_DRIVER_FUSIONSOUND@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC @SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_HAIKU @SDL_AUDIO_DRIVER_HAIKU@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_JACK @SDL_AUDIO_DRIVER_JACK@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_JACK_DYNAMIC @SDL_AUDIO_DRIVER_JACK_DYNAMIC@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_NAS @SDL_AUDIO_DRIVER_NAS@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_NAS_DYNAMIC @SDL_AUDIO_DRIVER_NAS_DYNAMIC@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_SNDIO @SDL_AUDIO_DRIVER_SNDIO@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_SNDIO_DYNAMIC @SDL_AUDIO_DRIVER_SNDIO_DYNAMIC@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_NETBSD @SDL_AUDIO_DRIVER_NETBSD@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_OSS @SDL_AUDIO_DRIVER_OSS@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_OSS_SOUNDCARD_H @SDL_AUDIO_DRIVER_OSS_SOUNDCARD_H@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_PAUDIO @SDL_AUDIO_DRIVER_PAUDIO@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_PULSEAUDIO @SDL_AUDIO_DRIVER_PULSEAUDIO@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC @SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_QSA @SDL_AUDIO_DRIVER_QSA@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_SNDIO @SDL_AUDIO_DRIVER_SNDIO@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_SNDIO_DYNAMIC @SDL_AUDIO_DRIVER_SNDIO_DYNAMIC@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_SUNAUDIO @SDL_AUDIO_DRIVER_SUNAUDIO@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_WASAPI @SDL_AUDIO_DRIVER_WASAPI@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_WINMM @SDL_AUDIO_DRIVER_WINMM@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_FUSIONSOUND @SDL_AUDIO_DRIVER_FUSIONSOUND@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC @SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_EMSCRIPTEN @SDL_AUDIO_DRIVER_EMSCRIPTEN@
|
||||
|
||||
/* Enable various input drivers */
|
||||
#cmakedefine SDL_INPUT_LINUXEV @SDL_INPUT_LINUXEV@
|
||||
|
|
@ -250,9 +283,9 @@
|
|||
#cmakedefine SDL_HAPTIC_IOKIT @SDL_HAPTIC_IOKIT@
|
||||
#cmakedefine SDL_HAPTIC_DINPUT @SDL_HAPTIC_DINPUT@
|
||||
#cmakedefine SDL_HAPTIC_XINPUT @SDL_HAPTIC_XINPUT@
|
||||
#cmakedefine SDL_HAPTIC_ANDROID @SDL_HAPTIC_ANDROID@
|
||||
|
||||
/* Enable various shared object loading systems */
|
||||
#cmakedefine SDL_LOADSO_HAIKU @SDL_LOADSO_HAIKU@
|
||||
#cmakedefine SDL_LOADSO_DLOPEN @SDL_LOADSO_DLOPEN@
|
||||
#cmakedefine SDL_LOADSO_DUMMY @SDL_LOADSO_DUMMY@
|
||||
#cmakedefine SDL_LOADSO_LDG @SDL_LOADSO_LDG@
|
||||
|
|
@ -284,6 +317,10 @@
|
|||
#cmakedefine SDL_VIDEO_DRIVER_VIVANTE @SDL_VIDEO_DRIVER_VIVANTE@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_VIVANTE_VDK @SDL_VIDEO_DRIVER_VIVANTE_VDK@
|
||||
|
||||
#cmakedefine SDL_VIDEO_DRIVER_KMSDRM @SDL_VIDEO_DRIVER_KMSDRM@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC @SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC_GBM @SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC_GBM@
|
||||
|
||||
#cmakedefine SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH @SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC @SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_EGL @SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_EGL@
|
||||
|
|
@ -322,6 +359,7 @@
|
|||
#cmakedefine SDL_VIDEO_RENDER_OGL_ES @SDL_VIDEO_RENDER_OGL_ES@
|
||||
#cmakedefine SDL_VIDEO_RENDER_OGL_ES2 @SDL_VIDEO_RENDER_OGL_ES2@
|
||||
#cmakedefine SDL_VIDEO_RENDER_DIRECTFB @SDL_VIDEO_RENDER_DIRECTFB@
|
||||
#cmakedefine SDL_VIDEO_RENDER_METAL @SDL_VIDEO_RENDER_METAL@
|
||||
|
||||
/* Enable OpenGL support */
|
||||
#cmakedefine SDL_VIDEO_OPENGL @SDL_VIDEO_OPENGL@
|
||||
|
|
@ -335,6 +373,9 @@
|
|||
#cmakedefine SDL_VIDEO_OPENGL_OSMESA @SDL_VIDEO_OPENGL_OSMESA@
|
||||
#cmakedefine SDL_VIDEO_OPENGL_OSMESA_DYNAMIC @SDL_VIDEO_OPENGL_OSMESA_DYNAMIC@
|
||||
|
||||
/* Enable Vulkan support */
|
||||
#cmakedefine SDL_VIDEO_VULKAN @SDL_VIDEO_VULKAN@
|
||||
|
||||
/* Enable system power support */
|
||||
#cmakedefine SDL_POWER_ANDROID @SDL_POWER_ANDROID@
|
||||
#cmakedefine SDL_POWER_LINUX @SDL_POWER_LINUX@
|
||||
|
|
@ -357,6 +398,8 @@
|
|||
#cmakedefine SDL_ASSEMBLY_ROUTINES @SDL_ASSEMBLY_ROUTINES@
|
||||
#cmakedefine SDL_ALTIVEC_BLITTERS @SDL_ALTIVEC_BLITTERS@
|
||||
|
||||
/* Enable dynamic libsamplerate support */
|
||||
#cmakedefine SDL_LIBSAMPLERATE_DYNAMIC @SDL_LIBSAMPLERATE_DYNAMIC@
|
||||
|
||||
/* Platform specific definitions */
|
||||
#if !defined(__WIN32__)
|
||||
|
|
@ -418,4 +461,4 @@ typedef unsigned int uintptr_t;
|
|||
# endif /* !_STDINT_H_ && !HAVE_STDINT_H */
|
||||
#endif /* __WIN32__ */
|
||||
|
||||
#endif /* _SDL_config_h */
|
||||
#endif /* SDL_config_h_ */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 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
|
||||
|
|
@ -19,8 +19,8 @@
|
|||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_config_h
|
||||
#define _SDL_config_h
|
||||
#ifndef SDL_config_h_
|
||||
#define SDL_config_h_
|
||||
|
||||
/**
|
||||
* \file SDL_config.h.in
|
||||
|
|
@ -50,39 +50,32 @@
|
|||
#undef HAVE_GCC_ATOMICS
|
||||
#undef HAVE_GCC_SYNC_LOCK_TEST_AND_SET
|
||||
|
||||
#undef HAVE_DDRAW_H
|
||||
#undef HAVE_DINPUT_H
|
||||
#undef HAVE_DSOUND_H
|
||||
#undef HAVE_DXGI_H
|
||||
#undef HAVE_XINPUT_H
|
||||
|
||||
/* Comment this if you want to build without any C library requirements */
|
||||
#undef HAVE_LIBC
|
||||
#if HAVE_LIBC
|
||||
|
||||
/* Useful headers */
|
||||
#undef HAVE_ALLOCA_H
|
||||
#undef HAVE_SYS_TYPES_H
|
||||
#undef HAVE_STDIO_H
|
||||
#undef STDC_HEADERS
|
||||
#undef HAVE_STDLIB_H
|
||||
#undef HAVE_STDARG_H
|
||||
#undef HAVE_MALLOC_H
|
||||
#undef HAVE_MEMORY_H
|
||||
#undef HAVE_STRING_H
|
||||
#undef HAVE_STRINGS_H
|
||||
#undef HAVE_INTTYPES_H
|
||||
#undef HAVE_STDINT_H
|
||||
#undef HAVE_ALLOCA_H
|
||||
#undef HAVE_CTYPE_H
|
||||
#undef HAVE_MATH_H
|
||||
#undef HAVE_FLOAT_H
|
||||
#undef HAVE_ICONV_H
|
||||
#undef HAVE_INTTYPES_H
|
||||
#undef HAVE_LIMITS_H
|
||||
#undef HAVE_MALLOC_H
|
||||
#undef HAVE_MATH_H
|
||||
#undef HAVE_MEMORY_H
|
||||
#undef HAVE_SIGNAL_H
|
||||
#undef HAVE_ALTIVEC_H
|
||||
#undef HAVE_STDARG_H
|
||||
#undef HAVE_STDINT_H
|
||||
#undef HAVE_STDIO_H
|
||||
#undef HAVE_STDLIB_H
|
||||
#undef HAVE_STRINGS_H
|
||||
#undef HAVE_STRING_H
|
||||
#undef HAVE_SYS_TYPES_H
|
||||
#undef HAVE_WCHAR_H
|
||||
#undef HAVE_PTHREAD_NP_H
|
||||
#undef HAVE_LIBUDEV_H
|
||||
#undef HAVE_DBUS_DBUS_H
|
||||
#undef HAVE_IBUS_IBUS_H
|
||||
#undef HAVE_FCITX_FRONTEND_H
|
||||
#undef HAVE_LIBUNWIND_H
|
||||
|
||||
/* C library functions */
|
||||
#undef HAVE_MALLOC
|
||||
|
|
@ -103,10 +96,13 @@
|
|||
#undef HAVE_MEMCPY
|
||||
#undef HAVE_MEMMOVE
|
||||
#undef HAVE_MEMCMP
|
||||
#undef HAVE_WCSLEN
|
||||
#undef HAVE_WCSLCPY
|
||||
#undef HAVE_WCSLCAT
|
||||
#undef HAVE_WCSCMP
|
||||
#undef HAVE_STRLEN
|
||||
#undef HAVE_STRLCPY
|
||||
#undef HAVE_STRLCAT
|
||||
#undef HAVE_STRDUP
|
||||
#undef HAVE__STRREV
|
||||
#undef HAVE__STRUPR
|
||||
#undef HAVE__STRLWR
|
||||
|
|
@ -139,25 +135,41 @@
|
|||
#undef HAVE_SNPRINTF
|
||||
#undef HAVE_VSNPRINTF
|
||||
#undef HAVE_M_PI
|
||||
#undef HAVE_ATAN
|
||||
#undef HAVE_ATAN2
|
||||
#undef HAVE_ACOS
|
||||
#undef HAVE_ACOSF
|
||||
#undef HAVE_ASIN
|
||||
#undef HAVE_ASINF
|
||||
#undef HAVE_ATAN
|
||||
#undef HAVE_ATANF
|
||||
#undef HAVE_ATAN2
|
||||
#undef HAVE_ATAN2F
|
||||
#undef HAVE_CEIL
|
||||
#undef HAVE_CEILF
|
||||
#undef HAVE_COPYSIGN
|
||||
#undef HAVE_COPYSIGNF
|
||||
#undef HAVE_COS
|
||||
#undef HAVE_COSF
|
||||
#undef HAVE_FABS
|
||||
#undef HAVE_FABSF
|
||||
#undef HAVE_FLOOR
|
||||
#undef HAVE_FLOORF
|
||||
#undef HAVE_FMOD
|
||||
#undef HAVE_FMODF
|
||||
#undef HAVE_LOG
|
||||
#undef HAVE_LOGF
|
||||
#undef HAVE_LOG10
|
||||
#undef HAVE_LOG10F
|
||||
#undef HAVE_POW
|
||||
#undef HAVE_POWF
|
||||
#undef HAVE_SCALBN
|
||||
#undef HAVE_SCALBNF
|
||||
#undef HAVE_SIN
|
||||
#undef HAVE_SINF
|
||||
#undef HAVE_SQRT
|
||||
#undef HAVE_SQRTF
|
||||
#undef HAVE_TAN
|
||||
#undef HAVE_TANF
|
||||
#undef HAVE_FOPEN64
|
||||
#undef HAVE_FSEEKO
|
||||
#undef HAVE_FSEEKO64
|
||||
#undef HAVE_SIGACTION
|
||||
|
|
@ -173,6 +185,8 @@
|
|||
#undef HAVE_PTHREAD_SETNAME_NP
|
||||
#undef HAVE_PTHREAD_SET_NAME_NP
|
||||
#undef HAVE_SEM_TIMEDWAIT
|
||||
#undef HAVE_GETAUXVAL
|
||||
#undef HAVE_POLL
|
||||
|
||||
#else
|
||||
#define HAVE_STDARG_H 1
|
||||
|
|
@ -180,6 +194,22 @@
|
|||
#define HAVE_STDINT_H 1
|
||||
#endif /* HAVE_LIBC */
|
||||
|
||||
#undef HAVE_ALTIVEC_H
|
||||
#undef HAVE_DBUS_DBUS_H
|
||||
#undef HAVE_FCITX_FRONTEND_H
|
||||
#undef HAVE_IBUS_IBUS_H
|
||||
#undef HAVE_IMMINTRIN_H
|
||||
#undef HAVE_LIBSAMPLERATE_H
|
||||
#undef HAVE_LIBUDEV_H
|
||||
|
||||
#undef HAVE_DDRAW_H
|
||||
#undef HAVE_DINPUT_H
|
||||
#undef HAVE_DSOUND_H
|
||||
#undef HAVE_DXGI_H
|
||||
#undef HAVE_XINPUT_H
|
||||
#undef HAVE_XINPUT_GAMEPAD_EX
|
||||
#undef HAVE_XINPUT_STATE_EX
|
||||
|
||||
/* SDL internal assertion support */
|
||||
#undef SDL_DEFAULT_ASSERT_LEVEL
|
||||
|
||||
|
|
@ -202,34 +232,36 @@
|
|||
/* Enable various audio drivers */
|
||||
#undef SDL_AUDIO_DRIVER_ALSA
|
||||
#undef SDL_AUDIO_DRIVER_ALSA_DYNAMIC
|
||||
#undef SDL_AUDIO_DRIVER_ANDROID
|
||||
#undef SDL_AUDIO_DRIVER_ARTS
|
||||
#undef SDL_AUDIO_DRIVER_ARTS_DYNAMIC
|
||||
#undef SDL_AUDIO_DRIVER_PULSEAUDIO
|
||||
#undef SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC
|
||||
#undef SDL_AUDIO_DRIVER_HAIKU
|
||||
#undef SDL_AUDIO_DRIVER_BSD
|
||||
#undef SDL_AUDIO_DRIVER_COREAUDIO
|
||||
#undef SDL_AUDIO_DRIVER_DISK
|
||||
#undef SDL_AUDIO_DRIVER_DUMMY
|
||||
#undef SDL_AUDIO_DRIVER_ANDROID
|
||||
#undef SDL_AUDIO_DRIVER_XAUDIO2
|
||||
#undef SDL_AUDIO_DRIVER_DSOUND
|
||||
#undef SDL_AUDIO_DRIVER_DUMMY
|
||||
#undef SDL_AUDIO_DRIVER_EMSCRIPTEN
|
||||
#undef SDL_AUDIO_DRIVER_ESD
|
||||
#undef SDL_AUDIO_DRIVER_ESD_DYNAMIC
|
||||
#undef SDL_AUDIO_DRIVER_FUSIONSOUND
|
||||
#undef SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC
|
||||
#undef SDL_AUDIO_DRIVER_HAIKU
|
||||
#undef SDL_AUDIO_DRIVER_JACK
|
||||
#undef SDL_AUDIO_DRIVER_JACK_DYNAMIC
|
||||
#undef SDL_AUDIO_DRIVER_NACL
|
||||
#undef SDL_AUDIO_DRIVER_NAS
|
||||
#undef SDL_AUDIO_DRIVER_NAS_DYNAMIC
|
||||
#undef SDL_AUDIO_DRIVER_SNDIO
|
||||
#undef SDL_AUDIO_DRIVER_SNDIO_DYNAMIC
|
||||
#undef SDL_AUDIO_DRIVER_NETBSD
|
||||
#undef SDL_AUDIO_DRIVER_OSS
|
||||
#undef SDL_AUDIO_DRIVER_OSS_SOUNDCARD_H
|
||||
#undef SDL_AUDIO_DRIVER_PAUDIO
|
||||
#undef SDL_AUDIO_DRIVER_PULSEAUDIO
|
||||
#undef SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC
|
||||
#undef SDL_AUDIO_DRIVER_QSA
|
||||
#undef SDL_AUDIO_DRIVER_SNDIO
|
||||
#undef SDL_AUDIO_DRIVER_SNDIO_DYNAMIC
|
||||
#undef SDL_AUDIO_DRIVER_SUNAUDIO
|
||||
#undef SDL_AUDIO_DRIVER_WASAPI
|
||||
#undef SDL_AUDIO_DRIVER_WINMM
|
||||
#undef SDL_AUDIO_DRIVER_FUSIONSOUND
|
||||
#undef SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC
|
||||
#undef SDL_AUDIO_DRIVER_EMSCRIPTEN
|
||||
|
||||
/* Enable various input drivers */
|
||||
#undef SDL_INPUT_LINUXEV
|
||||
|
|
@ -247,13 +279,13 @@
|
|||
#undef SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H
|
||||
#undef SDL_JOYSTICK_EMSCRIPTEN
|
||||
#undef SDL_HAPTIC_DUMMY
|
||||
#undef SDL_HAPTIC_ANDROID
|
||||
#undef SDL_HAPTIC_LINUX
|
||||
#undef SDL_HAPTIC_IOKIT
|
||||
#undef SDL_HAPTIC_DINPUT
|
||||
#undef SDL_HAPTIC_XINPUT
|
||||
|
||||
/* Enable various shared object loading systems */
|
||||
#undef SDL_LOADSO_HAIKU
|
||||
#undef SDL_LOADSO_DLOPEN
|
||||
#undef SDL_LOADSO_DUMMY
|
||||
#undef SDL_LOADSO_LDG
|
||||
|
|
@ -289,6 +321,9 @@
|
|||
#undef SDL_VIDEO_DRIVER_MIR_DYNAMIC_XKBCOMMON
|
||||
#undef SDL_VIDEO_DRIVER_X11
|
||||
#undef SDL_VIDEO_DRIVER_RPI
|
||||
#undef SDL_VIDEO_DRIVER_KMSDRM
|
||||
#undef SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC
|
||||
#undef SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC_GBM
|
||||
#undef SDL_VIDEO_DRIVER_ANDROID
|
||||
#undef SDL_VIDEO_DRIVER_EMSCRIPTEN
|
||||
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC
|
||||
|
|
@ -314,6 +349,7 @@
|
|||
#undef SDL_VIDEO_DRIVER_NACL
|
||||
#undef SDL_VIDEO_DRIVER_VIVANTE
|
||||
#undef SDL_VIDEO_DRIVER_VIVANTE_VDK
|
||||
#undef SDL_VIDEO_DRIVER_QNX
|
||||
|
||||
#undef SDL_VIDEO_RENDER_D3D
|
||||
#undef SDL_VIDEO_RENDER_D3D11
|
||||
|
|
@ -321,6 +357,7 @@
|
|||
#undef SDL_VIDEO_RENDER_OGL_ES
|
||||
#undef SDL_VIDEO_RENDER_OGL_ES2
|
||||
#undef SDL_VIDEO_RENDER_DIRECTFB
|
||||
#undef SDL_VIDEO_RENDER_METAL
|
||||
|
||||
/* Enable OpenGL support */
|
||||
#undef SDL_VIDEO_OPENGL
|
||||
|
|
@ -334,6 +371,9 @@
|
|||
#undef SDL_VIDEO_OPENGL_OSMESA
|
||||
#undef SDL_VIDEO_OPENGL_OSMESA_DYNAMIC
|
||||
|
||||
/* Enable Vulkan support */
|
||||
#undef SDL_VIDEO_VULKAN
|
||||
|
||||
/* Enable system power support */
|
||||
#undef SDL_POWER_LINUX
|
||||
#undef SDL_POWER_WINDOWS
|
||||
|
|
@ -360,4 +400,10 @@
|
|||
/* Enable ime support */
|
||||
#undef SDL_USE_IME
|
||||
|
||||
#endif /* _SDL_config_h */
|
||||
/* Enable dynamic udev support */
|
||||
#undef SDL_UDEV_DYNAMIC
|
||||
|
||||
/* Enable dynamic libsamplerate support */
|
||||
#undef SDL_LIBSAMPLERATE_DYNAMIC
|
||||
|
||||
#endif /* SDL_config_h_ */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 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
|
||||
|
|
@ -19,8 +19,9 @@
|
|||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_config_android_h
|
||||
#define _SDL_config_android_h
|
||||
#ifndef SDL_config_android_h_
|
||||
#define SDL_config_android_h_
|
||||
#define SDL_config_h_
|
||||
|
||||
#include "SDL_platform.h"
|
||||
|
||||
|
|
@ -34,16 +35,17 @@
|
|||
|
||||
#define HAVE_GCC_ATOMICS 1
|
||||
|
||||
#define HAVE_ALLOCA_H 1
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
#define HAVE_STDIO_H 1
|
||||
#define STDC_HEADERS 1
|
||||
#define HAVE_STRING_H 1
|
||||
#define HAVE_INTTYPES_H 1
|
||||
#define HAVE_STDINT_H 1
|
||||
#define HAVE_ALLOCA_H 1
|
||||
#define HAVE_CTYPE_H 1
|
||||
#define HAVE_INTTYPES_H 1
|
||||
#define HAVE_LIMITS_H 1
|
||||
#define HAVE_MATH_H 1
|
||||
#define HAVE_SIGNAL_H 1
|
||||
#define HAVE_STDINT_H 1
|
||||
#define HAVE_STDIO_H 1
|
||||
#define HAVE_STRING_H 1
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
|
||||
/* C library functions */
|
||||
#define HAVE_MALLOC 1
|
||||
|
|
@ -66,7 +68,6 @@
|
|||
#define HAVE_STRLEN 1
|
||||
#define HAVE_STRLCPY 1
|
||||
#define HAVE_STRLCAT 1
|
||||
#define HAVE_STRDUP 1
|
||||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRSTR 1
|
||||
|
|
@ -83,20 +84,34 @@
|
|||
#define HAVE_STRNCASECMP 1
|
||||
#define HAVE_VSSCANF 1
|
||||
#define HAVE_VSNPRINTF 1
|
||||
#define HAVE_M_PI 1
|
||||
#define HAVE_ACOS 1
|
||||
#define HAVE_ACOSF 1
|
||||
#define HAVE_ASIN 1
|
||||
#define HAVE_ASINF 1
|
||||
#define HAVE_ATAN 1
|
||||
#define HAVE_ATANF 1
|
||||
#define HAVE_ATAN2 1
|
||||
#define HAVE_ACOS 1
|
||||
#define HAVE_ASIN 1
|
||||
#define HAVE_ATAN2F 1
|
||||
#define HAVE_CEIL 1
|
||||
#define HAVE_CEILF 1
|
||||
#define HAVE_COPYSIGN 1
|
||||
#define HAVE_COPYSIGNF 1
|
||||
#define HAVE_COS 1
|
||||
#define HAVE_COSF 1
|
||||
#define HAVE_FABS 1
|
||||
#define HAVE_FABSF 1
|
||||
#define HAVE_FLOOR 1
|
||||
#define HAVE_FLOORF 1
|
||||
#define HAVE_FMOD 1
|
||||
#define HAVE_FMODF 1
|
||||
#define HAVE_LOG 1
|
||||
#define HAVE_LOGF 1
|
||||
#define HAVE_LOG10 1
|
||||
#define HAVE_LOG10F 1
|
||||
#define HAVE_POW 1
|
||||
#define HAVE_POWF 1
|
||||
#define HAVE_SCALBN 1
|
||||
#define HAVE_SCALBNF 1
|
||||
#define HAVE_SIN 1
|
||||
#define HAVE_SINF 1
|
||||
#define HAVE_SQRT 1
|
||||
|
|
@ -107,7 +122,7 @@
|
|||
#define HAVE_SETJMP 1
|
||||
#define HAVE_NANOSLEEP 1
|
||||
#define HAVE_SYSCONF 1
|
||||
#define HAVE_CLOCK_GETTIME 1
|
||||
#define HAVE_CLOCK_GETTIME 1
|
||||
|
||||
#define SIZEOF_VOIDP 4
|
||||
|
||||
|
|
@ -117,7 +132,7 @@
|
|||
|
||||
/* Enable various input drivers */
|
||||
#define SDL_JOYSTICK_ANDROID 1
|
||||
#define SDL_HAPTIC_DUMMY 1
|
||||
#define SDL_HAPTIC_ANDROID 1
|
||||
|
||||
/* Enable various shared object loading systems */
|
||||
#define SDL_LOADSO_DLOPEN 1
|
||||
|
|
@ -139,10 +154,18 @@
|
|||
#define SDL_VIDEO_RENDER_OGL_ES 1
|
||||
#define SDL_VIDEO_RENDER_OGL_ES2 1
|
||||
|
||||
/* Enable Vulkan support */
|
||||
/* Android does not support Vulkan in native code using the "armeabi" ABI. */
|
||||
#if defined(__ARM_ARCH) && __ARM_ARCH < 7
|
||||
#define SDL_VIDEO_VULKAN 0
|
||||
#else
|
||||
#define SDL_VIDEO_VULKAN 1
|
||||
#endif
|
||||
|
||||
/* Enable system power support */
|
||||
#define SDL_POWER_ANDROID 1
|
||||
|
||||
/* Enable the filesystem driver */
|
||||
#define SDL_FILESYSTEM_ANDROID 1
|
||||
|
||||
#endif /* _SDL_config_android_h */
|
||||
#endif /* SDL_config_android_h_ */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 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
|
||||
|
|
@ -19,8 +19,9 @@
|
|||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_config_iphoneos_h
|
||||
#define _SDL_config_iphoneos_h
|
||||
#ifndef SDL_config_iphoneos_h_
|
||||
#define SDL_config_iphoneos_h_
|
||||
#define SDL_config_h_
|
||||
|
||||
#include "SDL_platform.h"
|
||||
|
||||
|
|
@ -32,16 +33,19 @@
|
|||
|
||||
#define HAVE_GCC_ATOMICS 1
|
||||
|
||||
#define HAVE_ALLOCA_H 1
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
#define HAVE_STDIO_H 1
|
||||
#define STDC_HEADERS 1
|
||||
#define HAVE_STRING_H 1
|
||||
#define HAVE_INTTYPES_H 1
|
||||
#define HAVE_STDINT_H 1
|
||||
#define HAVE_ALLOCA_H 1
|
||||
#define HAVE_CTYPE_H 1
|
||||
#define HAVE_INTTYPES_H 1
|
||||
#define HAVE_LIMITS_H 1
|
||||
#define HAVE_MATH_H 1
|
||||
#define HAVE_SIGNAL_H 1
|
||||
#define HAVE_STDINT_H 1
|
||||
#define HAVE_STDIO_H 1
|
||||
#define HAVE_STRING_H 1
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
/* The libunwind functions are only available on x86 */
|
||||
/* #undef HAVE_LIBUNWIND_H */
|
||||
|
||||
/* C library functions */
|
||||
#define HAVE_MALLOC 1
|
||||
|
|
@ -64,7 +68,6 @@
|
|||
#define HAVE_STRLEN 1
|
||||
#define HAVE_STRLCPY 1
|
||||
#define HAVE_STRLCAT 1
|
||||
#define HAVE_STRDUP 1
|
||||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRSTR 1
|
||||
|
|
@ -82,19 +85,34 @@
|
|||
#define HAVE_VSSCANF 1
|
||||
#define HAVE_VSNPRINTF 1
|
||||
#define HAVE_M_PI 1
|
||||
#define HAVE_ACOS 1
|
||||
#define HAVE_ACOSF 1
|
||||
#define HAVE_ASIN 1
|
||||
#define HAVE_ASINF 1
|
||||
#define HAVE_ATAN 1
|
||||
#define HAVE_ATANF 1
|
||||
#define HAVE_ATAN2 1
|
||||
#define HAVE_ACOS 1
|
||||
#define HAVE_ASIN 1
|
||||
#define HAVE_ATAN2F 1
|
||||
#define HAVE_CEIL 1
|
||||
#define HAVE_CEILF 1
|
||||
#define HAVE_COPYSIGN 1
|
||||
#define HAVE_COPYSIGNF 1
|
||||
#define HAVE_COS 1
|
||||
#define HAVE_COSF 1
|
||||
#define HAVE_FABS 1
|
||||
#define HAVE_FABSF 1
|
||||
#define HAVE_FLOOR 1
|
||||
#define HAVE_FLOORF 1
|
||||
#define HAVE_FMOD 1
|
||||
#define HAVE_FMODF 1
|
||||
#define HAVE_LOG 1
|
||||
#define HAVE_LOGF 1
|
||||
#define HAVE_LOG10 1
|
||||
#define HAVE_LOG10F 1
|
||||
#define HAVE_POW 1
|
||||
#define HAVE_POWF 1
|
||||
#define HAVE_SCALBN 1
|
||||
#define HAVE_SCALBNF 1
|
||||
#define HAVE_SIN 1
|
||||
#define HAVE_SINF 1
|
||||
#define HAVE_SQRT 1
|
||||
|
|
@ -132,12 +150,27 @@
|
|||
#define SDL_VIDEO_DRIVER_UIKIT 1
|
||||
#define SDL_VIDEO_DRIVER_DUMMY 1
|
||||
|
||||
/* enable OpenGL ES */
|
||||
/* Enable OpenGL ES */
|
||||
#define SDL_VIDEO_OPENGL_ES2 1
|
||||
#define SDL_VIDEO_OPENGL_ES 1
|
||||
#define SDL_VIDEO_RENDER_OGL_ES 1
|
||||
#define SDL_VIDEO_RENDER_OGL_ES2 1
|
||||
|
||||
/* Metal supported on 64-bit devices running iOS 8.0 and tvOS 9.0 and newer */
|
||||
#if !TARGET_OS_SIMULATOR && !TARGET_CPU_ARM && ((__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 90000))
|
||||
#define SDL_PLATFORM_SUPPORTS_METAL 1
|
||||
#else
|
||||
#define SDL_PLATFORM_SUPPORTS_METAL 0
|
||||
#endif
|
||||
|
||||
#if SDL_PLATFORM_SUPPORTS_METAL
|
||||
#define SDL_VIDEO_RENDER_METAL 1
|
||||
#endif
|
||||
|
||||
#if SDL_PLATFORM_SUPPORTS_METAL
|
||||
#define SDL_VIDEO_VULKAN 1
|
||||
#endif
|
||||
|
||||
/* Enable system power support */
|
||||
#define SDL_POWER_UIKIT 1
|
||||
|
||||
|
|
@ -155,4 +188,4 @@
|
|||
/* enable filesystem support */
|
||||
#define SDL_FILESYSTEM_COCOA 1
|
||||
|
||||
#endif /* _SDL_config_iphoneos_h */
|
||||
#endif /* SDL_config_iphoneos_h_ */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 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
|
||||
|
|
@ -19,8 +19,9 @@
|
|||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_config_macosx_h
|
||||
#define _SDL_config_macosx_h
|
||||
#ifndef SDL_config_macosx_h_
|
||||
#define SDL_config_macosx_h_
|
||||
#define SDL_config_h_
|
||||
|
||||
#include "SDL_platform.h"
|
||||
|
||||
|
|
@ -36,16 +37,19 @@
|
|||
#endif
|
||||
|
||||
/* Useful headers */
|
||||
#define HAVE_ALLOCA_H 1
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
#define HAVE_STDIO_H 1
|
||||
#define STDC_HEADERS 1
|
||||
#define HAVE_STRING_H 1
|
||||
#define HAVE_INTTYPES_H 1
|
||||
#define HAVE_STDINT_H 1
|
||||
#define HAVE_ALLOCA_H 1
|
||||
#define HAVE_CTYPE_H 1
|
||||
#define HAVE_FLOAT_H 1
|
||||
#define HAVE_INTTYPES_H 1
|
||||
#define HAVE_LIMITS_H 1
|
||||
#define HAVE_MATH_H 1
|
||||
#define HAVE_SIGNAL_H 1
|
||||
#define HAVE_STDINT_H 1
|
||||
#define HAVE_STDIO_H 1
|
||||
#define HAVE_STRING_H 1
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
#define HAVE_LIBUNWIND_H 1
|
||||
|
||||
/* C library functions */
|
||||
#define HAVE_MALLOC 1
|
||||
|
|
@ -67,7 +71,6 @@
|
|||
#define HAVE_STRLEN 1
|
||||
#define HAVE_STRLCPY 1
|
||||
#define HAVE_STRLCAT 1
|
||||
#define HAVE_STRDUP 1
|
||||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRSTR 1
|
||||
|
|
@ -84,15 +87,35 @@
|
|||
#define HAVE_STRNCASECMP 1
|
||||
#define HAVE_VSSCANF 1
|
||||
#define HAVE_VSNPRINTF 1
|
||||
#define HAVE_M_PI 1
|
||||
#define HAVE_ACOS 1
|
||||
#define HAVE_ACOSF 1
|
||||
#define HAVE_ASIN 1
|
||||
#define HAVE_ASINF 1
|
||||
#define HAVE_ATAN 1
|
||||
#define HAVE_ATANF 1
|
||||
#define HAVE_ATAN2 1
|
||||
#define HAVE_ATAN2F 1
|
||||
#define HAVE_CEIL 1
|
||||
#define HAVE_CEILF 1
|
||||
#define HAVE_COPYSIGN 1
|
||||
#define HAVE_COPYSIGNF 1
|
||||
#define HAVE_COS 1
|
||||
#define HAVE_COSF 1
|
||||
#define HAVE_FABS 1
|
||||
#define HAVE_FABSF 1
|
||||
#define HAVE_FLOOR 1
|
||||
#define HAVE_FLOORF 1
|
||||
#define HAVE_FMOD 1
|
||||
#define HAVE_FMODF 1
|
||||
#define HAVE_LOG 1
|
||||
#define HAVE_LOGF 1
|
||||
#define HAVE_LOG10 1
|
||||
#define HAVE_LOG10F 1
|
||||
#define HAVE_POW 1
|
||||
#define HAVE_POWF 1
|
||||
#define HAVE_SCALBN 1
|
||||
#define HAVE_SCALBNF 1
|
||||
#define HAVE_SIN 1
|
||||
#define HAVE_SINF 1
|
||||
#define HAVE_SQRT 1
|
||||
|
|
@ -104,10 +127,6 @@
|
|||
#define HAVE_NANOSLEEP 1
|
||||
#define HAVE_SYSCONF 1
|
||||
#define HAVE_SYSCTLBYNAME 1
|
||||
#define HAVE_ATAN 1
|
||||
#define HAVE_ATAN2 1
|
||||
#define HAVE_ACOS 1
|
||||
#define HAVE_ASIN 1
|
||||
|
||||
/* Enable various audio drivers */
|
||||
#define SDL_AUDIO_DRIVER_COREAUDIO 1
|
||||
|
|
@ -162,10 +181,29 @@
|
|||
#define SDL_VIDEO_RENDER_OGL 1
|
||||
#endif
|
||||
|
||||
#ifndef SDL_VIDEO_RENDER_OGL_ES2
|
||||
#define SDL_VIDEO_RENDER_OGL_ES2 1
|
||||
#endif
|
||||
|
||||
#ifndef SDL_VIDEO_RENDER_METAL
|
||||
/* Metal only supported on 64-bit architectures with 10.11+ */
|
||||
#if TARGET_CPU_X86_64 && (MAC_OS_X_VERSION_MAX_ALLOWED >= 101100)
|
||||
#define SDL_VIDEO_RENDER_METAL 1
|
||||
#else
|
||||
#define SDL_VIDEO_RENDER_METAL 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Enable OpenGL support */
|
||||
#ifndef SDL_VIDEO_OPENGL
|
||||
#define SDL_VIDEO_OPENGL 1
|
||||
#endif
|
||||
#ifndef SDL_VIDEO_OPENGL_ES2
|
||||
#define SDL_VIDEO_OPENGL_ES2 1
|
||||
#endif
|
||||
#ifndef SDL_VIDEO_OPENGL_EGL
|
||||
#define SDL_VIDEO_OPENGL_EGL 1
|
||||
#endif
|
||||
#ifndef SDL_VIDEO_OPENGL_CGL
|
||||
#define SDL_VIDEO_OPENGL_CGL 1
|
||||
#endif
|
||||
|
|
@ -173,6 +211,14 @@
|
|||
#define SDL_VIDEO_OPENGL_GLX 1
|
||||
#endif
|
||||
|
||||
/* Enable Vulkan support */
|
||||
/* Metal/MoltenVK/Vulkan only supported on 64-bit architectures with 10.11+ */
|
||||
#if TARGET_CPU_X86_64 && (MAC_OS_X_VERSION_MAX_ALLOWED >= 101100)
|
||||
#define SDL_VIDEO_VULKAN 1
|
||||
#else
|
||||
#define SDL_VIDEO_VULKAN 0
|
||||
#endif
|
||||
|
||||
/* Enable system power support */
|
||||
#define SDL_POWER_MACOSX 1
|
||||
|
||||
|
|
@ -185,4 +231,4 @@
|
|||
#define SDL_ALTIVEC_BLITTERS 1
|
||||
#endif
|
||||
|
||||
#endif /* _SDL_config_macosx_h */
|
||||
#endif /* SDL_config_macosx_h_ */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 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
|
||||
|
|
@ -19,8 +19,9 @@
|
|||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_config_minimal_h
|
||||
#define _SDL_config_minimal_h
|
||||
#ifndef SDL_config_minimal_h_
|
||||
#define SDL_config_minimal_h_
|
||||
#define SDL_config_h_
|
||||
|
||||
#include "SDL_platform.h"
|
||||
|
||||
|
|
@ -78,4 +79,4 @@ typedef unsigned long uintptr_t;
|
|||
/* Enable the dummy filesystem driver (src/filesystem/dummy/\*.c) */
|
||||
#define SDL_FILESYSTEM_DUMMY 1
|
||||
|
||||
#endif /* _SDL_config_minimal_h */
|
||||
#endif /* SDL_config_minimal_h_ */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 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
|
||||
|
|
@ -19,8 +19,9 @@
|
|||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_config_h
|
||||
#define _SDL_config_h
|
||||
#ifndef SDL_config_pandora_h_
|
||||
#define SDL_config_pandora_h_
|
||||
#define SDL_config_h_
|
||||
|
||||
/* This is a set of defines to configure the SDL features */
|
||||
|
||||
|
|
@ -35,22 +36,24 @@
|
|||
|
||||
#define SDL_BYTEORDER 1234
|
||||
|
||||
#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_ALLOCA_H 1
|
||||
#define HAVE_CTYPE_H 1
|
||||
#define HAVE_MATH_H 1
|
||||
#define HAVE_ICONV_H 1
|
||||
#define HAVE_INTTYPES_H 1
|
||||
#define HAVE_LIMITS_H 1
|
||||
#define HAVE_MALLOC_H 1
|
||||
#define HAVE_MATH_H 1
|
||||
#define HAVE_MEMORY_H 1
|
||||
#define HAVE_SIGNAL_H 1
|
||||
#define HAVE_STDARG_H 1
|
||||
#define HAVE_STDINT_H 1
|
||||
#define HAVE_STDIO_H 1
|
||||
#define HAVE_STDLIB_H 1
|
||||
#define HAVE_STRINGS_H 1
|
||||
#define HAVE_STRING_H 1
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
|
||||
#define HAVE_MALLOC 1
|
||||
#define HAVE_CALLOC 1
|
||||
#define HAVE_REALLOC 1
|
||||
|
|
@ -67,7 +70,6 @@
|
|||
#define HAVE_MEMCPY 1
|
||||
#define HAVE_MEMMOVE 1
|
||||
#define HAVE_STRLEN 1
|
||||
#define HAVE_STRDUP 1
|
||||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRSTR 1
|
||||
|
|
@ -91,6 +93,7 @@
|
|||
#define HAVE_FABS 1
|
||||
#define HAVE_FLOOR 1
|
||||
#define HAVE_LOG 1
|
||||
#define HAVE_LOG10 1
|
||||
#define HAVE_SCALBN 1
|
||||
#define HAVE_SIN 1
|
||||
#define HAVE_SINF 1
|
||||
|
|
@ -124,4 +127,4 @@
|
|||
#define SDL_VIDEO_RENDER_OGL_ES 1
|
||||
#define SDL_VIDEO_OPENGL_ES 1
|
||||
|
||||
#endif /* _SDL_config_h */
|
||||
#endif /* SDL_config_pandora_h_ */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 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
|
||||
|
|
@ -19,8 +19,9 @@
|
|||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_config_psp_h
|
||||
#define _SDL_config_psp_h
|
||||
#ifndef SDL_config_psp_h_
|
||||
#define SDL_config_psp_h_
|
||||
#define SDL_config_h_
|
||||
|
||||
#include "SDL_platform.h"
|
||||
|
||||
|
|
@ -32,16 +33,17 @@
|
|||
|
||||
#define HAVE_GCC_ATOMICS 1
|
||||
|
||||
#define HAVE_ALLOCA_H 1
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
#define HAVE_STDIO_H 1
|
||||
#define STDC_HEADERS 1
|
||||
#define HAVE_STRING_H 1
|
||||
#define HAVE_INTTYPES_H 1
|
||||
#define HAVE_STDINT_H 1
|
||||
#define HAVE_ALLOCA_H 1
|
||||
#define HAVE_CTYPE_H 1
|
||||
#define HAVE_INTTYPES_H 1
|
||||
#define HAVE_LIMITS_H 1
|
||||
#define HAVE_MATH_H 1
|
||||
#define HAVE_SIGNAL_H 1
|
||||
#define HAVE_STDINT_H 1
|
||||
#define HAVE_STDIO_H 1
|
||||
#define HAVE_STRING_H 1
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
|
||||
/* C library functions */
|
||||
#define HAVE_MALLOC 1
|
||||
|
|
@ -64,7 +66,6 @@
|
|||
#define HAVE_STRLEN 1
|
||||
#define HAVE_STRLCPY 1
|
||||
#define HAVE_STRLCAT 1
|
||||
#define HAVE_STRDUP 1
|
||||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRSTR 1
|
||||
|
|
@ -82,19 +83,34 @@
|
|||
#define HAVE_VSSCANF 1
|
||||
#define HAVE_VSNPRINTF 1
|
||||
#define HAVE_M_PI 1
|
||||
#define HAVE_ACOS 1
|
||||
#define HAVE_ACOSF 1
|
||||
#define HAVE_ASIN 1
|
||||
#define HAVE_ASINF 1
|
||||
#define HAVE_ATAN 1
|
||||
#define HAVE_ATANF 1
|
||||
#define HAVE_ATAN2 1
|
||||
#define HAVE_ACOS 1
|
||||
#define HAVE_ASIN 1
|
||||
#define HAVE_ATAN2F 1
|
||||
#define HAVE_CEIL 1
|
||||
#define HAVE_CEILF 1
|
||||
#define HAVE_COPYSIGN 1
|
||||
#define HAVE_COPYSIGNF 1
|
||||
#define HAVE_COS 1
|
||||
#define HAVE_COSF 1
|
||||
#define HAVE_FABS 1
|
||||
#define HAVE_FABSF 1
|
||||
#define HAVE_FLOOR 1
|
||||
#define HAVE_FLOORF 1
|
||||
#define HAVE_FMOD 1
|
||||
#define HAVE_FMODF 1
|
||||
#define HAVE_LOG 1
|
||||
#define HAVE_LOGF 1
|
||||
#define HAVE_LOG10 1
|
||||
#define HAVE_LOG10F 1
|
||||
#define HAVE_POW 1
|
||||
#define HAVE_POWF 1
|
||||
#define HAVE_SCALBN 1
|
||||
#define HAVE_SCALBNF 1
|
||||
#define HAVE_SIN 1
|
||||
#define HAVE_SINF 1
|
||||
#define HAVE_SQRT 1
|
||||
|
|
@ -140,4 +156,4 @@
|
|||
#define SDL_LOADSO_DISABLED 1
|
||||
|
||||
|
||||
#endif /* _SDL_config_psp_h */
|
||||
#endif /* SDL_config_psp_h_ */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 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
|
||||
|
|
@ -19,8 +19,9 @@
|
|||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_config_windows_h
|
||||
#define _SDL_config_windows_h
|
||||
#ifndef SDL_config_windows_h_
|
||||
#define SDL_config_windows_h_
|
||||
#define SDL_config_h_
|
||||
|
||||
#include "SDL_platform.h"
|
||||
|
||||
|
|
@ -85,12 +86,14 @@ typedef unsigned int uintptr_t;
|
|||
/* This is disabled by default to avoid C runtime dependencies and manifest requirements */
|
||||
#ifdef HAVE_LIBC
|
||||
/* Useful headers */
|
||||
#define HAVE_STDIO_H 1
|
||||
#define STDC_HEADERS 1
|
||||
#define HAVE_STRING_H 1
|
||||
#define HAVE_CTYPE_H 1
|
||||
#define HAVE_FLOAT_H 1
|
||||
#define HAVE_LIMITS_H 1
|
||||
#define HAVE_MATH_H 1
|
||||
#define HAVE_SIGNAL_H 1
|
||||
#define HAVE_STDIO_H 1
|
||||
#define HAVE_STRING_H 1
|
||||
|
||||
/* C library functions */
|
||||
#define HAVE_MALLOC 1
|
||||
|
|
@ -106,13 +109,15 @@ typedef unsigned int uintptr_t;
|
|||
#define HAVE_MEMCMP 1
|
||||
#define HAVE_STRLEN 1
|
||||
#define HAVE__STRREV 1
|
||||
#define HAVE__STRUPR 1
|
||||
#define HAVE__STRLWR 1
|
||||
/* These functions have security warnings, so we won't use them */
|
||||
/* #undef HAVE__STRUPR */
|
||||
/* #undef HAVE__STRLWR */
|
||||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRSTR 1
|
||||
#define HAVE__LTOA 1
|
||||
#define HAVE__ULTOA 1
|
||||
/* These functions have security warnings, so we won't use them */
|
||||
/* #undef HAVE__LTOA */
|
||||
/* #undef HAVE__ULTOA */
|
||||
#define HAVE_STRTOL 1
|
||||
#define HAVE_STRTOUL 1
|
||||
#define HAVE_STRTOD 1
|
||||
|
|
@ -122,28 +127,48 @@ typedef unsigned int uintptr_t;
|
|||
#define HAVE_STRNCMP 1
|
||||
#define HAVE__STRICMP 1
|
||||
#define HAVE__STRNICMP 1
|
||||
#define HAVE_ATAN 1
|
||||
#define HAVE_ATAN2 1
|
||||
#define HAVE_ACOS 1
|
||||
#define HAVE_ASIN 1
|
||||
#define HAVE_CEIL 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_SIN 1
|
||||
#define HAVE_SINF 1
|
||||
#define HAVE_SQRT 1
|
||||
#define HAVE_SQRTF 1
|
||||
#define HAVE_TAN 1
|
||||
#define HAVE_TANF 1
|
||||
#define HAVE_ACOS 1
|
||||
#define HAVE_ACOSF 1
|
||||
#define HAVE_ASIN 1
|
||||
#define HAVE_ASINF 1
|
||||
#define HAVE_ATAN 1
|
||||
#define HAVE_ATANF 1
|
||||
#define HAVE_ATAN2 1
|
||||
#define HAVE_ATAN2F 1
|
||||
#define HAVE_CEILF 1
|
||||
#define HAVE__COPYSIGN 1
|
||||
#define HAVE_COS 1
|
||||
#define HAVE_COSF 1
|
||||
#define HAVE_FABS 1
|
||||
#define HAVE_FABSF 1
|
||||
#define HAVE_FLOOR 1
|
||||
#define HAVE_FLOORF 1
|
||||
#define HAVE_FMOD 1
|
||||
#define HAVE_FMODF 1
|
||||
#define HAVE_LOG 1
|
||||
#define HAVE_LOGF 1
|
||||
#define HAVE_LOG10 1
|
||||
#define HAVE_LOG10F 1
|
||||
#define HAVE_POW 1
|
||||
#define HAVE_POWF 1
|
||||
#define HAVE_SIN 1
|
||||
#define HAVE_SINF 1
|
||||
#define HAVE_SQRT 1
|
||||
#define HAVE_SQRTF 1
|
||||
#define HAVE_TAN 1
|
||||
#define HAVE_TANF 1
|
||||
#if defined(_MSC_VER)
|
||||
/* These functions were added with the VC++ 2013 C runtime library */
|
||||
#if _MSC_VER >= 1800
|
||||
#define HAVE_STRTOLL 1
|
||||
#define HAVE_VSSCANF 1
|
||||
#define HAVE_COPYSIGN 1
|
||||
#define HAVE_SCALBN 1
|
||||
#define HAVE_SCALBNF 1
|
||||
#endif
|
||||
/* This function is available with at least the VC++ 2008 C runtime library */
|
||||
#if _MSC_VER >= 1400
|
||||
#define HAVE__FSEEKI64 1
|
||||
#endif
|
||||
#endif
|
||||
#if !defined(_MSC_VER) || defined(_USE_MATH_DEFINES)
|
||||
#define HAVE_M_PI 1
|
||||
|
|
@ -154,8 +179,8 @@ typedef unsigned int uintptr_t;
|
|||
#endif
|
||||
|
||||
/* Enable various audio drivers */
|
||||
#define SDL_AUDIO_DRIVER_WASAPI 1
|
||||
#define SDL_AUDIO_DRIVER_DSOUND 1
|
||||
#define SDL_AUDIO_DRIVER_XAUDIO2 1
|
||||
#define SDL_AUDIO_DRIVER_WINMM 1
|
||||
#define SDL_AUDIO_DRIVER_DISK 1
|
||||
#define SDL_AUDIO_DRIVER_DUMMY 1
|
||||
|
|
@ -183,7 +208,7 @@ typedef unsigned int uintptr_t;
|
|||
#define SDL_VIDEO_RENDER_D3D 1
|
||||
#endif
|
||||
#ifndef SDL_VIDEO_RENDER_D3D11
|
||||
#define SDL_VIDEO_RENDER_D3D11 0
|
||||
#define SDL_VIDEO_RENDER_D3D11 0
|
||||
#endif
|
||||
|
||||
/* Enable OpenGL support */
|
||||
|
|
@ -206,6 +231,8 @@ typedef unsigned int uintptr_t;
|
|||
#define SDL_VIDEO_OPENGL_EGL 1
|
||||
#endif
|
||||
|
||||
/* Enable Vulkan support */
|
||||
#define SDL_VIDEO_VULKAN 1
|
||||
|
||||
/* Enable system power support */
|
||||
#define SDL_POWER_WINDOWS 1
|
||||
|
|
@ -218,4 +245,4 @@ typedef unsigned int uintptr_t;
|
|||
#define SDL_ASSEMBLY_ROUTINES 1
|
||||
#endif
|
||||
|
||||
#endif /* _SDL_config_windows_h */
|
||||
#endif /* SDL_config_windows_h_ */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 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
|
||||
|
|
@ -19,8 +19,9 @@
|
|||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_config_winrt_h
|
||||
#define _SDL_config_winrt_h
|
||||
#ifndef SDL_config_winrt_h_
|
||||
#define SDL_config_winrt_h_
|
||||
#define SDL_config_h_
|
||||
|
||||
#include "SDL_platform.h"
|
||||
|
||||
|
|
@ -43,7 +44,7 @@
|
|||
|
||||
#if !defined(_STDINT_H_) && (!defined(HAVE_STDINT_H) || !_HAVE_STDINT_H)
|
||||
#if defined(__GNUC__) || defined(__DMC__) || defined(__WATCOMC__)
|
||||
#define HAVE_STDINT_H 1
|
||||
#define HAVE_STDINT_H 1
|
||||
#elif defined(_MSC_VER)
|
||||
typedef signed __int8 int8_t;
|
||||
typedef unsigned __int8 uint8_t;
|
||||
|
|
@ -97,13 +98,14 @@ typedef unsigned int uintptr_t;
|
|||
#define HAVE_XINPUT_H 1
|
||||
#endif
|
||||
#define HAVE_LIBC 1
|
||||
#define HAVE_STDIO_H 1
|
||||
#define STDC_HEADERS 1
|
||||
#define HAVE_STRING_H 1
|
||||
#define HAVE_CTYPE_H 1
|
||||
#define HAVE_MATH_H 1
|
||||
#define HAVE_FLOAT_H 1
|
||||
#define HAVE_LIMITS_H 1
|
||||
#define HAVE_MATH_H 1
|
||||
#define HAVE_SIGNAL_H 1
|
||||
#define HAVE_STDIO_H 1
|
||||
#define HAVE_STRING_H 1
|
||||
|
||||
/* C library functions */
|
||||
#define HAVE_MALLOC 1
|
||||
|
|
@ -120,13 +122,13 @@ typedef unsigned int uintptr_t;
|
|||
#define HAVE_STRLEN 1
|
||||
#define HAVE__STRREV 1
|
||||
#define HAVE__STRUPR 1
|
||||
//#define HAVE__STRLWR 1 // TODO, WinRT: consider using _strlwr_s instead
|
||||
//#define HAVE__STRLWR 1 // TODO, WinRT: consider using _strlwr_s instead
|
||||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRSTR 1
|
||||
//#define HAVE_ITOA 1 // TODO, WinRT: consider using _itoa_s instead
|
||||
//#define HAVE__LTOA 1 // TODO, WinRT: consider using _ltoa_s instead
|
||||
//#define HAVE__ULTOA 1 // TODO, WinRT: consider using _ultoa_s instead
|
||||
//#define HAVE__LTOA 1 // TODO, WinRT: consider using _ltoa_s instead
|
||||
//#define HAVE__ULTOA 1 // TODO, WinRT: consider using _ultoa_s instead
|
||||
#define HAVE_STRTOL 1
|
||||
#define HAVE_STRTOUL 1
|
||||
//#define HAVE_STRTOLL 1
|
||||
|
|
@ -138,44 +140,58 @@ typedef unsigned int uintptr_t;
|
|||
#define HAVE__STRICMP 1
|
||||
#define HAVE__STRNICMP 1
|
||||
#define HAVE_VSNPRINTF 1
|
||||
//#define HAVE_SSCANF 1 // TODO, WinRT: consider using sscanf_s instead
|
||||
//#define HAVE_SSCANF 1 // TODO, WinRT: consider using sscanf_s instead
|
||||
#define HAVE_M_PI 1
|
||||
#define HAVE_ATAN 1
|
||||
#define HAVE_ATAN2 1
|
||||
#define HAVE_CEIL 1
|
||||
#define HAVE_ACOS 1
|
||||
#define HAVE_ACOSF 1
|
||||
#define HAVE_ASIN 1
|
||||
#define HAVE_ASINF 1
|
||||
#define HAVE_ATAN 1
|
||||
#define HAVE_ATANF 1
|
||||
#define HAVE_ATAN2 1
|
||||
#define HAVE_ATAN2F 1
|
||||
#define HAVE_CEIL 1
|
||||
#define HAVE_CEILF 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_COS 1
|
||||
#define HAVE_COSF 1
|
||||
#define HAVE_FABS 1
|
||||
#define HAVE_FABSF 1
|
||||
#define HAVE_FLOOR 1
|
||||
#define HAVE_FLOORF 1
|
||||
#define HAVE_FMOD 1
|
||||
#define HAVE_FMODF 1
|
||||
#define HAVE_LOG 1
|
||||
#define HAVE_LOGF 1
|
||||
#define HAVE_LOG10 1
|
||||
#define HAVE_LOG10F 1
|
||||
#define HAVE_POW 1
|
||||
#define HAVE_POWF 1
|
||||
#define HAVE__SCALB 1
|
||||
#define HAVE_SIN 1
|
||||
#define HAVE_SINF 1
|
||||
#define HAVE_SQRT 1
|
||||
#define HAVE_SQRTF 1
|
||||
#define HAVE_TAN 1
|
||||
#define HAVE_TANF 1
|
||||
#define HAVE_SIN 1
|
||||
#define HAVE_SINF 1
|
||||
#define HAVE_SQRT 1
|
||||
#define HAVE_SQRTF 1
|
||||
#define HAVE_TAN 1
|
||||
#define HAVE_TANF 1
|
||||
#define HAVE__FSEEKI64 1
|
||||
|
||||
/* Enable various audio drivers */
|
||||
#define SDL_AUDIO_DRIVER_XAUDIO2 1
|
||||
#define SDL_AUDIO_DRIVER_DISK 1
|
||||
#define SDL_AUDIO_DRIVER_DUMMY 1
|
||||
#define SDL_AUDIO_DRIVER_WASAPI 1
|
||||
#define SDL_AUDIO_DRIVER_DISK 1
|
||||
#define SDL_AUDIO_DRIVER_DUMMY 1
|
||||
|
||||
/* Enable various input drivers */
|
||||
#if WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP
|
||||
#define SDL_JOYSTICK_DISABLED 1
|
||||
#define SDL_HAPTIC_DISABLED 1
|
||||
#define SDL_HAPTIC_DISABLED 1
|
||||
#else
|
||||
#define SDL_JOYSTICK_XINPUT 1
|
||||
#define SDL_HAPTIC_XINPUT 1
|
||||
#endif
|
||||
|
||||
/* Enable various shared object loading systems */
|
||||
#define SDL_LOADSO_WINDOWS 1
|
||||
#define SDL_LOADSO_WINDOWS 1
|
||||
|
||||
/* Enable various threading systems */
|
||||
#if (NTDDI_VERSION >= NTDDI_WINBLUE)
|
||||
|
|
@ -186,10 +202,10 @@ typedef unsigned int uintptr_t;
|
|||
#endif
|
||||
|
||||
/* Enable various timer systems */
|
||||
#define SDL_TIMER_WINDOWS 1
|
||||
#define SDL_TIMER_WINDOWS 1
|
||||
|
||||
/* Enable various video drivers */
|
||||
#define SDL_VIDEO_DRIVER_WINRT 1
|
||||
#define SDL_VIDEO_DRIVER_WINRT 1
|
||||
#define SDL_VIDEO_DRIVER_DUMMY 1
|
||||
|
||||
/* Enable OpenGL ES 2.0 (via a modified ANGLE library) */
|
||||
|
|
@ -208,7 +224,7 @@ typedef unsigned int uintptr_t;
|
|||
|
||||
/* Enable assembly routines (Win64 doesn't have inline asm) */
|
||||
#ifndef _WIN64
|
||||
#define SDL_ASSEMBLY_ROUTINES 1
|
||||
#define SDL_ASSEMBLY_ROUTINES 1
|
||||
#endif
|
||||
|
||||
#endif /* _SDL_config_winrt_h */
|
||||
#endif /* SDL_config_winrt_h_ */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 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
|
||||
|
|
@ -19,8 +19,9 @@
|
|||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_config_h
|
||||
#define _SDL_config_h
|
||||
#ifndef SDL_config_wiz_h_
|
||||
#define SDL_config_wiz_h_
|
||||
#define SDL_config_h_
|
||||
|
||||
/* This is a set of defines to configure the SDL features */
|
||||
|
||||
|
|
@ -29,22 +30,24 @@
|
|||
|
||||
#define SDL_BYTEORDER 1234
|
||||
|
||||
#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_ALLOCA_H 1
|
||||
#define HAVE_CTYPE_H 1
|
||||
#define HAVE_MATH_H 1
|
||||
#define HAVE_ICONV_H 1
|
||||
#define HAVE_INTTYPES_H 1
|
||||
#define HAVE_LIMITS_H 1
|
||||
#define HAVE_MALLOC_H 1
|
||||
#define HAVE_MATH_H 1
|
||||
#define HAVE_MEMORY_H 1
|
||||
#define HAVE_SIGNAL_H 1
|
||||
#define HAVE_STDARG_H 1
|
||||
#define HAVE_STDINT_H 1
|
||||
#define HAVE_STDIO_H 1
|
||||
#define HAVE_STDLIB_H 1
|
||||
#define HAVE_STRINGS_H 1
|
||||
#define HAVE_STRING_H 1
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
|
||||
#define HAVE_MALLOC 1
|
||||
#define HAVE_CALLOC 1
|
||||
#define HAVE_REALLOC 1
|
||||
|
|
@ -61,7 +64,6 @@
|
|||
#define HAVE_MEMCPY 1
|
||||
#define HAVE_MEMMOVE 1
|
||||
#define HAVE_STRLEN 1
|
||||
#define HAVE_STRDUP 1
|
||||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRSTR 1
|
||||
|
|
@ -78,20 +80,40 @@
|
|||
#define HAVE_VSSCANF 1
|
||||
#define HAVE_VSNPRINTF 1
|
||||
#define HAVE_M_PI 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_ACOS 1
|
||||
#define HAVE_ACOSF 1
|
||||
#define HAVE_ASIN 1
|
||||
#define HAVE_ASINF 1
|
||||
#define HAVE_ATAN 1
|
||||
#define HAVE_ATANF 1
|
||||
#define HAVE_ATAN2 1
|
||||
#define HAVE_ATAN2F 1
|
||||
#define HAVE_CEIL 1
|
||||
#define HAVE_CEILF 1
|
||||
#define HAVE_COPYSIGN 1
|
||||
#define HAVE_COPYSIGNF 1
|
||||
#define HAVE_COS 1
|
||||
#define HAVE_COSF 1
|
||||
#define HAVE_FABS 1
|
||||
#define HAVE_FABSF 1
|
||||
#define HAVE_FLOOR 1
|
||||
#define HAVE_FLOORF 1
|
||||
#define HAVE_FMOD 1
|
||||
#define HAVE_FMODF 1
|
||||
#define HAVE_LOG 1
|
||||
#define HAVE_LOGF 1
|
||||
#define HAVE_LOG10 1
|
||||
#define HAVE_LOG10F 1
|
||||
#define HAVE_POW 1
|
||||
#define HAVE_POWF 1
|
||||
#define HAVE_SCALBN 1
|
||||
#define HAVE_SIN 1
|
||||
#define HAVE_SINF 1
|
||||
#define HAVE_SQRT 1
|
||||
#define HAVE_SQRTF 1
|
||||
#define HAVE_TAN 1
|
||||
#define HAVE_TANF 1
|
||||
#define HAVE_SCALBNF 1
|
||||
#define HAVE_SIN 1
|
||||
#define HAVE_SINF 1
|
||||
#define HAVE_SQRT 1
|
||||
#define HAVE_SQRTF 1
|
||||
#define HAVE_TAN 1
|
||||
#define HAVE_TANF 1
|
||||
#define HAVE_SIGACTION 1
|
||||
#define HAVE_SETJMP 1
|
||||
#define HAVE_NANOSLEEP 1
|
||||
|
|
@ -117,4 +139,4 @@
|
|||
#define SDL_VIDEO_RENDER_OGL_ES 1
|
||||
#define SDL_VIDEO_OPENGL_ES 1
|
||||
|
||||
#endif /* _SDL_config_h */
|
||||
#endif /* SDL_config_wiz_h_ */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 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
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 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
|
||||
|
|
@ -25,14 +25,20 @@
|
|||
* CPU feature detection for SDL.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_cpuinfo_h
|
||||
#define _SDL_cpuinfo_h
|
||||
#ifndef SDL_cpuinfo_h_
|
||||
#define SDL_cpuinfo_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
|
||||
/* Need to do this here because intrin.h has C++ code in it */
|
||||
/* Visual Studio 2005 has a bug where intrin.h conflicts with winnt.h */
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1500) && (defined(_M_IX86) || defined(_M_X64))
|
||||
#ifdef __clang__
|
||||
/* Many of the intrinsics SDL uses are not implemented by clang with Visual Studio */
|
||||
#undef __MMX__
|
||||
#undef __SSE__
|
||||
#undef __SSE2__
|
||||
#else
|
||||
#include <intrin.h>
|
||||
#ifndef _WIN64
|
||||
#define __MMX__
|
||||
|
|
@ -40,28 +46,37 @@
|
|||
#endif
|
||||
#define __SSE__
|
||||
#define __SSE2__
|
||||
#endif /* __clang__ */
|
||||
#elif defined(__MINGW64_VERSION_MAJOR)
|
||||
#include <intrin.h>
|
||||
#else
|
||||
#ifdef __ALTIVEC__
|
||||
#if HAVE_ALTIVEC_H && !defined(__APPLE_ALTIVEC__)
|
||||
#if HAVE_ALTIVEC_H && !defined(__APPLE_ALTIVEC__) && !defined(SDL_DISABLE_ALTIVEC_H)
|
||||
#include <altivec.h>
|
||||
#undef pixel
|
||||
#undef bool
|
||||
#endif
|
||||
#endif
|
||||
#ifdef __MMX__
|
||||
#include <mmintrin.h>
|
||||
#endif
|
||||
#ifdef __3dNOW__
|
||||
#if defined(__3dNOW__) && !defined(SDL_DISABLE_MM3DNOW_H)
|
||||
#include <mm3dnow.h>
|
||||
#endif
|
||||
#ifdef __SSE__
|
||||
#if HAVE_IMMINTRIN_H && !defined(SDL_DISABLE_IMMINTRIN_H)
|
||||
#include <immintrin.h>
|
||||
#else
|
||||
#if defined(__MMX__) && !defined(SDL_DISABLE_MMINTRIN_H)
|
||||
#include <mmintrin.h>
|
||||
#endif
|
||||
#if defined(__SSE__) && !defined(SDL_DISABLE_XMMINTRIN_H)
|
||||
#include <xmmintrin.h>
|
||||
#endif
|
||||
#ifdef __SSE2__
|
||||
#if defined(__SSE2__) && !defined(SDL_DISABLE_EMMINTRIN_H)
|
||||
#include <emmintrin.h>
|
||||
#endif
|
||||
#if defined(__SSE3__) && !defined(SDL_DISABLE_PMMINTRIN_H)
|
||||
#include <pmmintrin.h>
|
||||
#endif
|
||||
#endif /* HAVE_IMMINTRIN_H */
|
||||
#endif /* compiler version */
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
|
|
@ -144,6 +159,11 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX(void);
|
|||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX2(void);
|
||||
|
||||
/**
|
||||
* This function returns true if the CPU has NEON (ARM SIMD) features.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasNEON(void);
|
||||
|
||||
/**
|
||||
* This function returns the amount of RAM configured in the system, in MB.
|
||||
*/
|
||||
|
|
@ -156,6 +176,6 @@ extern DECLSPEC int SDLCALL SDL_GetSystemRAM(void);
|
|||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_cpuinfo_h */
|
||||
#endif /* SDL_cpuinfo_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 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
|
||||
|
|
@ -24,7 +24,7 @@
|
|||
*
|
||||
* This is a simple file to encapsulate the EGL API headers.
|
||||
*/
|
||||
#ifndef _MSC_VER
|
||||
#if !defined(_MSC_VER) && !defined(__ANDROID__)
|
||||
|
||||
#include <EGL/egl.h>
|
||||
#include <EGL/eglext.h>
|
||||
|
|
@ -132,7 +132,7 @@
|
|||
*-------------------------------------------------------------------------
|
||||
* This precedes the return type of the function in the function prototype.
|
||||
*/
|
||||
#if defined(_WIN32) && !defined(__SCITECH_SNAP__)
|
||||
#if defined(_WIN32) && !defined(__SCITECH_SNAP__) && !defined(SDL_VIDEO_STATIC_ANGLE)
|
||||
# define KHRONOS_APICALL __declspec(dllimport)
|
||||
#elif defined (__SYMBIAN32__)
|
||||
# define KHRONOS_APICALL IMPORT_C
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 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
|
||||
|
|
@ -25,8 +25,8 @@
|
|||
* Functions for reading and writing endian-specific values
|
||||
*/
|
||||
|
||||
#ifndef _SDL_endian_h
|
||||
#define _SDL_endian_h
|
||||
#ifndef SDL_endian_h_
|
||||
#define SDL_endian_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
|
||||
|
|
@ -96,6 +96,12 @@ SDL_Swap16(Uint16 x)
|
|||
__asm__("rorw #8,%0": "=d"(x): "0"(x):"cc");
|
||||
return x;
|
||||
}
|
||||
#elif defined(__WATCOMC__) && defined(__386__)
|
||||
extern _inline Uint16 SDL_Swap16(Uint16);
|
||||
#pragma aux SDL_Swap16 = \
|
||||
"xchg al, ah" \
|
||||
parm [ax] \
|
||||
modify [ax];
|
||||
#else
|
||||
SDL_FORCE_INLINE Uint16
|
||||
SDL_Swap16(Uint16 x)
|
||||
|
|
@ -136,6 +142,21 @@ SDL_Swap32(Uint32 x)
|
|||
__asm__("rorw #8,%0\n\tswap %0\n\trorw #8,%0": "=d"(x): "0"(x):"cc");
|
||||
return x;
|
||||
}
|
||||
#elif defined(__WATCOMC__) && defined(__386__)
|
||||
extern _inline Uint32 SDL_Swap32(Uint32);
|
||||
#ifndef __SW_3 /* 486+ */
|
||||
#pragma aux SDL_Swap32 = \
|
||||
"bswap eax" \
|
||||
parm [eax] \
|
||||
modify [eax];
|
||||
#else /* 386-only */
|
||||
#pragma aux SDL_Swap32 = \
|
||||
"xchg al, ah" \
|
||||
"ror eax, 16" \
|
||||
"xchg al, ah" \
|
||||
parm [eax] \
|
||||
modify [eax];
|
||||
#endif
|
||||
#else
|
||||
SDL_FORCE_INLINE Uint32
|
||||
SDL_Swap32(Uint32 x)
|
||||
|
|
@ -234,6 +255,6 @@ SDL_SwapFloat(float x)
|
|||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_endian_h */
|
||||
#endif /* SDL_endian_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 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
|
||||
|
|
@ -25,8 +25,8 @@
|
|||
* Simple error message routines for SDL.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_error_h
|
||||
#define _SDL_error_h
|
||||
#ifndef SDL_error_h_
|
||||
#define SDL_error_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
|
||||
|
|
@ -71,6 +71,6 @@ extern DECLSPEC int SDLCALL SDL_Error(SDL_errorcode code);
|
|||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_error_h */
|
||||
#endif /* SDL_error_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 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
|
||||
|
|
@ -25,8 +25,8 @@
|
|||
* Include file for SDL event handling.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_events_h
|
||||
#define _SDL_events_h
|
||||
#ifndef SDL_events_h_
|
||||
#define SDL_events_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_error.h"
|
||||
|
|
@ -165,7 +165,7 @@ typedef enum
|
|||
typedef struct SDL_CommonEvent
|
||||
{
|
||||
Uint32 type;
|
||||
Uint32 timestamp;
|
||||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
} SDL_CommonEvent;
|
||||
|
||||
/**
|
||||
|
|
@ -174,7 +174,7 @@ typedef struct SDL_CommonEvent
|
|||
typedef struct SDL_WindowEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_WINDOWEVENT */
|
||||
Uint32 timestamp;
|
||||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
Uint32 windowID; /**< The associated window */
|
||||
Uint8 event; /**< ::SDL_WindowEventID */
|
||||
Uint8 padding1;
|
||||
|
|
@ -190,7 +190,7 @@ typedef struct SDL_WindowEvent
|
|||
typedef struct SDL_KeyboardEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_KEYDOWN or ::SDL_KEYUP */
|
||||
Uint32 timestamp;
|
||||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
Uint32 windowID; /**< The window with keyboard focus, if any */
|
||||
Uint8 state; /**< ::SDL_PRESSED or ::SDL_RELEASED */
|
||||
Uint8 repeat; /**< Non-zero if this is a key repeat */
|
||||
|
|
@ -206,7 +206,7 @@ typedef struct SDL_KeyboardEvent
|
|||
typedef struct SDL_TextEditingEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_TEXTEDITING */
|
||||
Uint32 timestamp;
|
||||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
Uint32 windowID; /**< The window with keyboard focus, if any */
|
||||
char text[SDL_TEXTEDITINGEVENT_TEXT_SIZE]; /**< The editing text */
|
||||
Sint32 start; /**< The start cursor of selected editing text */
|
||||
|
|
@ -221,7 +221,7 @@ typedef struct SDL_TextEditingEvent
|
|||
typedef struct SDL_TextInputEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_TEXTINPUT */
|
||||
Uint32 timestamp;
|
||||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
Uint32 windowID; /**< The window with keyboard focus, if any */
|
||||
char text[SDL_TEXTINPUTEVENT_TEXT_SIZE]; /**< The input text */
|
||||
} SDL_TextInputEvent;
|
||||
|
|
@ -232,7 +232,7 @@ typedef struct SDL_TextInputEvent
|
|||
typedef struct SDL_MouseMotionEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_MOUSEMOTION */
|
||||
Uint32 timestamp;
|
||||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
Uint32 windowID; /**< The window with mouse focus, if any */
|
||||
Uint32 which; /**< The mouse instance id, or SDL_TOUCH_MOUSEID */
|
||||
Uint32 state; /**< The current button state */
|
||||
|
|
@ -248,7 +248,7 @@ typedef struct SDL_MouseMotionEvent
|
|||
typedef struct SDL_MouseButtonEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_MOUSEBUTTONDOWN or ::SDL_MOUSEBUTTONUP */
|
||||
Uint32 timestamp;
|
||||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
Uint32 windowID; /**< The window with mouse focus, if any */
|
||||
Uint32 which; /**< The mouse instance id, or SDL_TOUCH_MOUSEID */
|
||||
Uint8 button; /**< The mouse button index */
|
||||
|
|
@ -265,7 +265,7 @@ typedef struct SDL_MouseButtonEvent
|
|||
typedef struct SDL_MouseWheelEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_MOUSEWHEEL */
|
||||
Uint32 timestamp;
|
||||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
Uint32 windowID; /**< The window with mouse focus, if any */
|
||||
Uint32 which; /**< The mouse instance id, or SDL_TOUCH_MOUSEID */
|
||||
Sint32 x; /**< The amount scrolled horizontally, positive to the right and negative to the left */
|
||||
|
|
@ -279,7 +279,7 @@ typedef struct SDL_MouseWheelEvent
|
|||
typedef struct SDL_JoyAxisEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_JOYAXISMOTION */
|
||||
Uint32 timestamp;
|
||||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
SDL_JoystickID which; /**< The joystick instance id */
|
||||
Uint8 axis; /**< The joystick axis index */
|
||||
Uint8 padding1;
|
||||
|
|
@ -295,7 +295,7 @@ typedef struct SDL_JoyAxisEvent
|
|||
typedef struct SDL_JoyBallEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_JOYBALLMOTION */
|
||||
Uint32 timestamp;
|
||||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
SDL_JoystickID which; /**< The joystick instance id */
|
||||
Uint8 ball; /**< The joystick trackball index */
|
||||
Uint8 padding1;
|
||||
|
|
@ -311,7 +311,7 @@ typedef struct SDL_JoyBallEvent
|
|||
typedef struct SDL_JoyHatEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_JOYHATMOTION */
|
||||
Uint32 timestamp;
|
||||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
SDL_JoystickID which; /**< The joystick instance id */
|
||||
Uint8 hat; /**< The joystick hat index */
|
||||
Uint8 value; /**< The hat position value.
|
||||
|
|
@ -331,7 +331,7 @@ typedef struct SDL_JoyHatEvent
|
|||
typedef struct SDL_JoyButtonEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_JOYBUTTONDOWN or ::SDL_JOYBUTTONUP */
|
||||
Uint32 timestamp;
|
||||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
SDL_JoystickID which; /**< The joystick instance id */
|
||||
Uint8 button; /**< The joystick button index */
|
||||
Uint8 state; /**< ::SDL_PRESSED or ::SDL_RELEASED */
|
||||
|
|
@ -345,7 +345,7 @@ typedef struct SDL_JoyButtonEvent
|
|||
typedef struct SDL_JoyDeviceEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_JOYDEVICEADDED or ::SDL_JOYDEVICEREMOVED */
|
||||
Uint32 timestamp;
|
||||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
Sint32 which; /**< The joystick device index for the ADDED event, instance id for the REMOVED event */
|
||||
} SDL_JoyDeviceEvent;
|
||||
|
||||
|
|
@ -356,7 +356,7 @@ typedef struct SDL_JoyDeviceEvent
|
|||
typedef struct SDL_ControllerAxisEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_CONTROLLERAXISMOTION */
|
||||
Uint32 timestamp;
|
||||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
SDL_JoystickID which; /**< The joystick instance id */
|
||||
Uint8 axis; /**< The controller axis (SDL_GameControllerAxis) */
|
||||
Uint8 padding1;
|
||||
|
|
@ -373,7 +373,7 @@ typedef struct SDL_ControllerAxisEvent
|
|||
typedef struct SDL_ControllerButtonEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_CONTROLLERBUTTONDOWN or ::SDL_CONTROLLERBUTTONUP */
|
||||
Uint32 timestamp;
|
||||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
SDL_JoystickID which; /**< The joystick instance id */
|
||||
Uint8 button; /**< The controller button (SDL_GameControllerButton) */
|
||||
Uint8 state; /**< ::SDL_PRESSED or ::SDL_RELEASED */
|
||||
|
|
@ -388,7 +388,7 @@ typedef struct SDL_ControllerButtonEvent
|
|||
typedef struct SDL_ControllerDeviceEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_CONTROLLERDEVICEADDED, ::SDL_CONTROLLERDEVICEREMOVED, or ::SDL_CONTROLLERDEVICEREMAPPED */
|
||||
Uint32 timestamp;
|
||||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
Sint32 which; /**< The joystick device index for the ADDED event, instance id for the REMOVED or REMAPPED event */
|
||||
} SDL_ControllerDeviceEvent;
|
||||
|
||||
|
|
@ -398,7 +398,7 @@ typedef struct SDL_ControllerDeviceEvent
|
|||
typedef struct SDL_AudioDeviceEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_AUDIODEVICEADDED, or ::SDL_AUDIODEVICEREMOVED */
|
||||
Uint32 timestamp;
|
||||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
Uint32 which; /**< The audio device index for the ADDED event (valid until next SDL_GetNumAudioDevices() call), SDL_AudioDeviceID for the REMOVED event */
|
||||
Uint8 iscapture; /**< zero if an output device, non-zero if a capture device. */
|
||||
Uint8 padding1;
|
||||
|
|
@ -413,7 +413,7 @@ typedef struct SDL_AudioDeviceEvent
|
|||
typedef struct SDL_TouchFingerEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_FINGERMOTION or ::SDL_FINGERDOWN or ::SDL_FINGERUP */
|
||||
Uint32 timestamp;
|
||||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
SDL_TouchID touchId; /**< The touch device id */
|
||||
SDL_FingerID fingerId;
|
||||
float x; /**< Normalized in the range 0...1 */
|
||||
|
|
@ -430,8 +430,8 @@ typedef struct SDL_TouchFingerEvent
|
|||
typedef struct SDL_MultiGestureEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_MULTIGESTURE */
|
||||
Uint32 timestamp;
|
||||
SDL_TouchID touchId; /**< The touch device index */
|
||||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
SDL_TouchID touchId; /**< The touch device id */
|
||||
float dTheta;
|
||||
float dDist;
|
||||
float x;
|
||||
|
|
@ -447,7 +447,7 @@ typedef struct SDL_MultiGestureEvent
|
|||
typedef struct SDL_DollarGestureEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_DOLLARGESTURE or ::SDL_DOLLARRECORD */
|
||||
Uint32 timestamp;
|
||||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
SDL_TouchID touchId; /**< The touch device id */
|
||||
SDL_GestureID gestureId;
|
||||
Uint32 numFingers;
|
||||
|
|
@ -465,7 +465,7 @@ typedef struct SDL_DollarGestureEvent
|
|||
typedef struct SDL_DropEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_DROPBEGIN or ::SDL_DROPFILE or ::SDL_DROPTEXT or ::SDL_DROPCOMPLETE */
|
||||
Uint32 timestamp;
|
||||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
char *file; /**< The file name, which should be freed with SDL_free(), is NULL on begin/complete */
|
||||
Uint32 windowID; /**< The window that was dropped on, if any */
|
||||
} SDL_DropEvent;
|
||||
|
|
@ -477,7 +477,7 @@ typedef struct SDL_DropEvent
|
|||
typedef struct SDL_QuitEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_QUIT */
|
||||
Uint32 timestamp;
|
||||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
} SDL_QuitEvent;
|
||||
|
||||
/**
|
||||
|
|
@ -486,7 +486,7 @@ typedef struct SDL_QuitEvent
|
|||
typedef struct SDL_OSEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_QUIT */
|
||||
Uint32 timestamp;
|
||||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
} SDL_OSEvent;
|
||||
|
||||
/**
|
||||
|
|
@ -495,7 +495,7 @@ typedef struct SDL_OSEvent
|
|||
typedef struct SDL_UserEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_USEREVENT through ::SDL_LASTEVENT-1 */
|
||||
Uint32 timestamp;
|
||||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
Uint32 windowID; /**< The associated window if any */
|
||||
Sint32 code; /**< User defined event code */
|
||||
void *data1; /**< User defined data pointer */
|
||||
|
|
@ -515,7 +515,7 @@ typedef struct SDL_SysWMmsg SDL_SysWMmsg;
|
|||
typedef struct SDL_SysWMEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_SYSWMEVENT */
|
||||
Uint32 timestamp;
|
||||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
SDL_SysWMmsg *msg; /**< driver dependent data, defined in SDL_syswm.h */
|
||||
} SDL_SysWMEvent;
|
||||
|
||||
|
|
@ -724,7 +724,7 @@ extern DECLSPEC void SDLCALL SDL_FilterEvents(SDL_EventFilter filter,
|
|||
/**
|
||||
* This function allows you to set the state of processing certain events.
|
||||
* - If \c state is set to ::SDL_IGNORE, that event will be automatically
|
||||
* dropped from the event queue and will not event be filtered.
|
||||
* dropped from the event queue and will not be filtered.
|
||||
* - If \c state is set to ::SDL_ENABLE, that event will be processed
|
||||
* normally.
|
||||
* - If \c state is set to ::SDL_QUERY, SDL_EventState() will return the
|
||||
|
|
@ -749,6 +749,6 @@ extern DECLSPEC Uint32 SDLCALL SDL_RegisterEvents(int numevents);
|
|||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_events_h */
|
||||
#endif /* SDL_events_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 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
|
||||
|
|
@ -25,8 +25,8 @@
|
|||
* \brief Include file for filesystem SDL API functions
|
||||
*/
|
||||
|
||||
#ifndef _SDL_filesystem_h
|
||||
#define _SDL_filesystem_h
|
||||
#ifndef SDL_filesystem_h_
|
||||
#define SDL_filesystem_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
|
||||
|
|
@ -131,6 +131,6 @@ extern DECLSPEC char *SDLCALL SDL_GetPrefPath(const char *org, const char *app);
|
|||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_filesystem_h */
|
||||
#endif /* SDL_filesystem_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 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
|
||||
|
|
@ -25,8 +25,8 @@
|
|||
* Include file for SDL game controller event handling
|
||||
*/
|
||||
|
||||
#ifndef _SDL_gamecontroller_h
|
||||
#define _SDL_gamecontroller_h
|
||||
#ifndef SDL_gamecontroller_h_
|
||||
#define SDL_gamecontroller_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_error.h"
|
||||
|
|
@ -51,7 +51,9 @@ extern "C" {
|
|||
* SDL_Init(): SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS
|
||||
*/
|
||||
|
||||
/* The gamecontroller structure used to identify an SDL game controller */
|
||||
/**
|
||||
* The gamecontroller structure used to identify an SDL game controller
|
||||
*/
|
||||
struct _SDL_GameController;
|
||||
typedef struct _SDL_GameController SDL_GameController;
|
||||
|
||||
|
|
@ -87,8 +89,8 @@ typedef struct SDL_GameControllerButtonBind
|
|||
* To count the number of game controllers in the system for the following:
|
||||
* int nJoysticks = SDL_NumJoysticks();
|
||||
* int nGameControllers = 0;
|
||||
* for ( int i = 0; i < nJoysticks; i++ ) {
|
||||
* if ( SDL_IsGameController(i) ) {
|
||||
* for (int i = 0; i < nJoysticks; i++) {
|
||||
* if (SDL_IsGameController(i)) {
|
||||
* nGameControllers++;
|
||||
* }
|
||||
* }
|
||||
|
|
@ -105,7 +107,7 @@ typedef struct SDL_GameControllerButtonBind
|
|||
* Buttons can be used as a controller axis and vice versa.
|
||||
*
|
||||
* This string shows an example of a valid mapping for a controller
|
||||
* "341a3608000000000000504944564944,Afterglow PS3 Controller,a:b1,b:b2,y:b3,x:b0,start:b9,guide:b12,back:b8,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftshoulder:b4,rightshoulder:b5,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7",
|
||||
* "03000000341a00003608000000000000,PS3 Controller,a:b1,b:b2,y:b3,x:b0,start:b9,guide:b12,back:b8,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftshoulder:b4,rightshoulder:b5,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7",
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
@ -117,7 +119,7 @@ typedef struct SDL_GameControllerButtonBind
|
|||
*
|
||||
* \return number of mappings added, -1 on error
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GameControllerAddMappingsFromRW( SDL_RWops * rw, int freerw );
|
||||
extern DECLSPEC int SDLCALL SDL_GameControllerAddMappingsFromRW(SDL_RWops * rw, int freerw);
|
||||
|
||||
/**
|
||||
* Load a set of mappings from a file, filtered by the current SDL_GetPlatform()
|
||||
|
|
@ -131,28 +133,41 @@ extern DECLSPEC int SDLCALL SDL_GameControllerAddMappingsFromRW( SDL_RWops * rw,
|
|||
*
|
||||
* \return 1 if mapping is added, 0 if updated, -1 on error
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GameControllerAddMapping( const char* mappingString );
|
||||
extern DECLSPEC int SDLCALL SDL_GameControllerAddMapping(const char* mappingString);
|
||||
|
||||
/**
|
||||
* Get the number of mappings installed
|
||||
*
|
||||
* \return the number of mappings
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GameControllerNumMappings(void);
|
||||
|
||||
/**
|
||||
* Get the mapping at a particular index.
|
||||
*
|
||||
* \return the mapping string. Must be freed with SDL_free(). Returns NULL if the index is out of range.
|
||||
*/
|
||||
extern DECLSPEC char * SDLCALL SDL_GameControllerMappingForIndex(int mapping_index);
|
||||
|
||||
/**
|
||||
* Get a mapping string for a GUID
|
||||
*
|
||||
* \return the mapping string. Must be freed with SDL_free(). Returns NULL if no mapping is available
|
||||
*/
|
||||
extern DECLSPEC char * SDLCALL SDL_GameControllerMappingForGUID( SDL_JoystickGUID guid );
|
||||
extern DECLSPEC char * SDLCALL SDL_GameControllerMappingForGUID(SDL_JoystickGUID guid);
|
||||
|
||||
/**
|
||||
* Get a mapping string for an open GameController
|
||||
*
|
||||
* \return the mapping string. Must be freed with SDL_free(). Returns NULL if no mapping is available
|
||||
*/
|
||||
extern DECLSPEC char * SDLCALL SDL_GameControllerMapping( SDL_GameController * gamecontroller );
|
||||
extern DECLSPEC char * SDLCALL SDL_GameControllerMapping(SDL_GameController * gamecontroller);
|
||||
|
||||
/**
|
||||
* Is the joystick on this index supported by the game controller interface?
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_IsGameController(int joystick_index);
|
||||
|
||||
|
||||
/**
|
||||
* Get the implementation dependent name of a game controller.
|
||||
* This can be called before any controllers are opened.
|
||||
|
|
@ -181,6 +196,24 @@ extern DECLSPEC SDL_GameController *SDLCALL SDL_GameControllerFromInstanceID(SDL
|
|||
*/
|
||||
extern DECLSPEC const char *SDLCALL SDL_GameControllerName(SDL_GameController *gamecontroller);
|
||||
|
||||
/**
|
||||
* Get the USB vendor ID of an opened controller, if available.
|
||||
* If the vendor ID isn't available this function returns 0.
|
||||
*/
|
||||
extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetVendor(SDL_GameController * gamecontroller);
|
||||
|
||||
/**
|
||||
* Get the USB product ID of an opened controller, if available.
|
||||
* If the product ID isn't available this function returns 0.
|
||||
*/
|
||||
extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetProduct(SDL_GameController * gamecontroller);
|
||||
|
||||
/**
|
||||
* Get the product version of an opened controller, if available.
|
||||
* If the product version isn't available this function returns 0.
|
||||
*/
|
||||
extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetProductVersion(SDL_GameController * gamecontroller);
|
||||
|
||||
/**
|
||||
* Returns SDL_TRUE if the controller has been opened and currently connected,
|
||||
* or SDL_FALSE if it has not.
|
||||
|
|
@ -214,6 +247,12 @@ extern DECLSPEC void SDLCALL SDL_GameControllerUpdate(void);
|
|||
|
||||
/**
|
||||
* The list of axes available from a controller
|
||||
*
|
||||
* Thumbstick axis values range from SDL_JOYSTICK_AXIS_MIN to SDL_JOYSTICK_AXIS_MAX,
|
||||
* and are centered within ~8000 of zero, though advanced UI will allow users to set
|
||||
* or autodetect the dead zone, which varies between controllers.
|
||||
*
|
||||
* Trigger axis values range from 0 to SDL_JOYSTICK_AXIS_MAX.
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
|
|
@ -318,6 +357,6 @@ extern DECLSPEC void SDLCALL SDL_GameControllerClose(SDL_GameController *gamecon
|
|||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_gamecontroller_h */
|
||||
#endif /* SDL_gamecontroller_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 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
|
||||
|
|
@ -25,8 +25,8 @@
|
|||
* Include file for SDL gesture event handling.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_gesture_h
|
||||
#define _SDL_gesture_h
|
||||
#ifndef SDL_gesture_h_
|
||||
#define SDL_gesture_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_error.h"
|
||||
|
|
@ -82,6 +82,6 @@ extern DECLSPEC int SDLCALL SDL_LoadDollarTemplates(SDL_TouchID touchId, SDL_RWo
|
|||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_gesture_h */
|
||||
#endif /* SDL_gesture_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 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
|
||||
|
|
@ -22,12 +22,12 @@
|
|||
/**
|
||||
* \file SDL_haptic.h
|
||||
*
|
||||
* \brief The SDL Haptic subsystem allows you to control haptic (force feedback)
|
||||
* \brief The SDL haptic subsystem allows you to control haptic (force feedback)
|
||||
* devices.
|
||||
*
|
||||
* The basic usage is as follows:
|
||||
* - Initialize the Subsystem (::SDL_INIT_HAPTIC).
|
||||
* - Open a Haptic Device.
|
||||
* - Initialize the subsystem (::SDL_INIT_HAPTIC).
|
||||
* - Open a haptic device.
|
||||
* - SDL_HapticOpen() to open from index.
|
||||
* - SDL_HapticOpenFromJoystick() to open from an existing joystick.
|
||||
* - Create an effect (::SDL_HapticEffect).
|
||||
|
|
@ -104,8 +104,8 @@
|
|||
* \endcode
|
||||
*/
|
||||
|
||||
#ifndef _SDL_haptic_h
|
||||
#define _SDL_haptic_h
|
||||
#ifndef SDL_haptic_h_
|
||||
#define SDL_haptic_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_error.h"
|
||||
|
|
@ -282,7 +282,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
|
|||
/**
|
||||
* \brief Device can be queried for effect status.
|
||||
*
|
||||
* Device can be queried for effect status.
|
||||
* Device supports querying effect status.
|
||||
*
|
||||
* \sa SDL_HapticGetEffectStatus
|
||||
*/
|
||||
|
|
@ -291,6 +291,8 @@ typedef struct _SDL_Haptic SDL_Haptic;
|
|||
/**
|
||||
* \brief Device can be paused.
|
||||
*
|
||||
* Devices supports being paused.
|
||||
*
|
||||
* \sa SDL_HapticPause
|
||||
* \sa SDL_HapticUnpause
|
||||
*/
|
||||
|
|
@ -444,7 +446,7 @@ typedef struct SDL_HapticDirection
|
|||
/**
|
||||
* \brief A structure containing a template for a Constant effect.
|
||||
*
|
||||
* The struct is exclusive to the ::SDL_HAPTIC_CONSTANT effect.
|
||||
* This struct is exclusively for the ::SDL_HAPTIC_CONSTANT effect.
|
||||
*
|
||||
* A constant effect applies a constant force in the specified direction
|
||||
* to the joystick.
|
||||
|
|
@ -676,6 +678,8 @@ typedef struct SDL_HapticLeftRight
|
|||
/**
|
||||
* \brief A structure containing a template for the ::SDL_HAPTIC_CUSTOM effect.
|
||||
*
|
||||
* This struct is exclusively for the ::SDL_HAPTIC_CUSTOM effect.
|
||||
*
|
||||
* A custom force feedback effect is much like a periodic effect, where the
|
||||
* application can define its exact shape. You will have to allocate the
|
||||
* data yourself. Data should consist of channels * samples Uint16 samples.
|
||||
|
|
@ -804,7 +808,7 @@ typedef union SDL_HapticEffect
|
|||
extern DECLSPEC int SDLCALL SDL_NumHaptics(void);
|
||||
|
||||
/**
|
||||
* \brief Get the implementation dependent name of a Haptic device.
|
||||
* \brief Get the implementation dependent name of a haptic device.
|
||||
*
|
||||
* This can be called before any joysticks are opened.
|
||||
* If no name can be found, this function returns NULL.
|
||||
|
|
@ -817,9 +821,9 @@ extern DECLSPEC int SDLCALL SDL_NumHaptics(void);
|
|||
extern DECLSPEC const char *SDLCALL SDL_HapticName(int device_index);
|
||||
|
||||
/**
|
||||
* \brief Opens a Haptic device for usage.
|
||||
* \brief Opens a haptic device for use.
|
||||
*
|
||||
* The index passed as an argument refers to the N'th Haptic device on this
|
||||
* The index passed as an argument refers to the N'th haptic device on this
|
||||
* system.
|
||||
*
|
||||
* When opening a haptic device, its gain will be set to maximum and
|
||||
|
|
@ -885,15 +889,15 @@ extern DECLSPEC SDL_Haptic *SDLCALL SDL_HapticOpenFromMouse(void);
|
|||
* \brief Checks to see if a joystick has haptic features.
|
||||
*
|
||||
* \param joystick Joystick to test for haptic capabilities.
|
||||
* \return 1 if the joystick is haptic, 0 if it isn't
|
||||
* or -1 if an error ocurred.
|
||||
* \return SDL_TRUE if the joystick is haptic, SDL_FALSE if it isn't
|
||||
* or -1 if an error occurred.
|
||||
*
|
||||
* \sa SDL_HapticOpenFromJoystick
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickIsHaptic(SDL_Joystick * joystick);
|
||||
|
||||
/**
|
||||
* \brief Opens a Haptic device for usage from a Joystick device.
|
||||
* \brief Opens a haptic device for use from a joystick device.
|
||||
*
|
||||
* You must still close the haptic device separately. It will not be closed
|
||||
* with the joystick.
|
||||
|
|
@ -913,7 +917,7 @@ extern DECLSPEC SDL_Haptic *SDLCALL SDL_HapticOpenFromJoystick(SDL_Joystick *
|
|||
joystick);
|
||||
|
||||
/**
|
||||
* \brief Closes a Haptic device previously opened with SDL_HapticOpen().
|
||||
* \brief Closes a haptic device previously opened with SDL_HapticOpen().
|
||||
*
|
||||
* \param haptic Haptic device to close.
|
||||
*/
|
||||
|
|
@ -957,7 +961,7 @@ extern DECLSPEC int SDLCALL SDL_HapticNumEffectsPlaying(SDL_Haptic * haptic);
|
|||
* Example:
|
||||
* \code
|
||||
* if (SDL_HapticQuery(haptic) & SDL_HAPTIC_CONSTANT) {
|
||||
* printf("We have constant haptic effect!");
|
||||
* printf("We have constant haptic effect!\n");
|
||||
* }
|
||||
* \endcode
|
||||
*
|
||||
|
|
@ -996,7 +1000,7 @@ extern DECLSPEC int SDLCALL SDL_HapticEffectSupported(SDL_Haptic * haptic,
|
|||
*
|
||||
* \param haptic Haptic device to create the effect on.
|
||||
* \param effect Properties of the effect to create.
|
||||
* \return The id of the effect on success or -1 on error.
|
||||
* \return The identifier of the effect on success or -1 on error.
|
||||
*
|
||||
* \sa SDL_HapticUpdateEffect
|
||||
* \sa SDL_HapticRunEffect
|
||||
|
|
@ -1008,13 +1012,13 @@ extern DECLSPEC int SDLCALL SDL_HapticNewEffect(SDL_Haptic * haptic,
|
|||
/**
|
||||
* \brief Updates the properties of an effect.
|
||||
*
|
||||
* Can be used dynamically, although behaviour when dynamically changing
|
||||
* Can be used dynamically, although behavior when dynamically changing
|
||||
* direction may be strange. Specifically the effect may reupload itself
|
||||
* and start playing from the start. You cannot change the type either when
|
||||
* running SDL_HapticUpdateEffect().
|
||||
*
|
||||
* \param haptic Haptic device that has the effect.
|
||||
* \param effect Effect to update.
|
||||
* \param effect Identifier of the effect to update.
|
||||
* \param data New effect properties to use.
|
||||
* \return 0 on success or -1 on error.
|
||||
*
|
||||
|
|
@ -1218,6 +1222,6 @@ extern DECLSPEC int SDLCALL SDL_HapticRumbleStop(SDL_Haptic * haptic);
|
|||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_haptic_h */
|
||||
#endif /* SDL_haptic_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 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
|
||||
|
|
@ -36,8 +36,8 @@
|
|||
* to how they would like the library to work.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_hints_h
|
||||
#define _SDL_hints_h
|
||||
#ifndef SDL_hints_h_
|
||||
#define SDL_hints_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
|
||||
|
|
@ -76,6 +76,7 @@ extern "C" {
|
|||
* "opengl"
|
||||
* "opengles2"
|
||||
* "opengles"
|
||||
* "metal"
|
||||
* "software"
|
||||
*
|
||||
* The default varies by platform, but it's the first one in the list that
|
||||
|
|
@ -118,6 +119,17 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_RENDER_DIRECT3D11_DEBUG "SDL_RENDER_DIRECT3D11_DEBUG"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling the scaling policy for SDL_RenderSetLogicalSize.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" or "letterbox" - Uses letterbox/sidebars to fit the entire rendering on screen
|
||||
* "1" or "overscan" - Will zoom the rendering so it fills the entire screen, allowing edges to be drawn offscreen
|
||||
*
|
||||
* By default letterbox is used
|
||||
*/
|
||||
#define SDL_HINT_RENDER_LOGICAL_SIZE_MODE "SDL_RENDER_LOGICAL_SIZE_MODE"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling the scaling quality
|
||||
*
|
||||
|
|
@ -199,6 +211,18 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_VIDEO_X11_NET_WM_PING "SDL_VIDEO_X11_NET_WM_PING"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the X11 _NET_WM_BYPASS_COMPOSITOR hint should be used.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - Disable _NET_WM_BYPASS_COMPOSITOR
|
||||
* "1" - Enable _NET_WM_BYPASS_COMPOSITOR
|
||||
*
|
||||
* By default SDL will use _NET_WM_BYPASS_COMPOSITOR
|
||||
*
|
||||
*/
|
||||
#define SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR "SDL_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the window frame and title bar are interactive when the cursor is hidden
|
||||
*
|
||||
|
|
@ -210,6 +234,12 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN "SDL_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN"
|
||||
|
||||
/**
|
||||
* \brief A variable to specify custom icon resource id from RC file on Windows platform
|
||||
*/
|
||||
#define SDL_HINT_WINDOWS_INTRESOURCE_ICON "SDL_WINDOWS_INTRESOURCE_ICON"
|
||||
#define SDL_HINT_WINDOWS_INTRESOURCE_ICON_SMALL "SDL_WINDOWS_INTRESOURCE_ICON_SMALL"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the windows message loop is processed by SDL
|
||||
*
|
||||
|
|
@ -232,6 +262,16 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_GRAB_KEYBOARD "SDL_GRAB_KEYBOARD"
|
||||
|
||||
/**
|
||||
* \brief A variable setting the speed scale for mouse motion, in floating point, when the mouse is not in relative mode
|
||||
*/
|
||||
#define SDL_HINT_MOUSE_NORMAL_SPEED_SCALE "SDL_MOUSE_NORMAL_SPEED_SCALE"
|
||||
|
||||
/**
|
||||
* \brief A variable setting the scale for mouse motion, in floating point, when the mouse is in relative mode
|
||||
*/
|
||||
#define SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE "SDL_MOUSE_RELATIVE_SPEED_SCALE"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether relative mouse mode is implemented using mouse warping
|
||||
*
|
||||
|
|
@ -254,6 +294,17 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH "SDL_MOUSE_FOCUS_CLICKTHROUGH"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether touch events should generate synthetic mouse events
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - Touch events will not generate mouse events
|
||||
* "1" - Touch events will generate mouse events
|
||||
*
|
||||
* By default SDL will generate mouse events for touch events
|
||||
*/
|
||||
#define SDL_HINT_TOUCH_MOUSE_EVENTS "SDL_TOUCH_MOUSE_EVENTS"
|
||||
|
||||
/**
|
||||
* \brief Minimize your SDL_Window if it loses key focus when in fullscreen mode. Defaults to true.
|
||||
*
|
||||
|
|
@ -317,16 +368,35 @@ extern "C" {
|
|||
#define SDL_HINT_APPLE_TV_REMOTE_ALLOW_ROTATION "SDL_APPLE_TV_REMOTE_ALLOW_ROTATION"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the Android / iOS built-in
|
||||
* accelerometer should be listed as a joystick device, rather than listing
|
||||
* actual joysticks only.
|
||||
* \brief A variable controlling whether the home indicator bar on iPhone X
|
||||
* should be hidden.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - List only real joysticks and accept input from them
|
||||
* "1" - List real joysticks along with the accelerometer as if it were a 3 axis joystick (the default).
|
||||
* "0" - The indicator bar is not hidden (default for windowed applications)
|
||||
* "1" - The indicator bar is hidden and is shown when the screen is touched (useful for movie playback applications)
|
||||
* "2" - The indicator bar is dim and the first swipe makes it visible and the second swipe performs the "home" action (default for fullscreen applications)
|
||||
*/
|
||||
#define SDL_HINT_IOS_HIDE_HOME_INDICATOR "SDL_IOS_HIDE_HOME_INDICATOR"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the Android / iOS built-in
|
||||
* accelerometer should be listed as a joystick device.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - The accelerometer is not listed as a joystick
|
||||
* "1" - The accelerometer is available as a 3 axis joystick (the default).
|
||||
*/
|
||||
#define SDL_HINT_ACCELEROMETER_AS_JOYSTICK "SDL_ACCELEROMETER_AS_JOYSTICK"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the Android / tvOS remotes
|
||||
* should be listed as joystick devices, instead of sending keyboard events.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - Remotes send enter/escape/arrow key events
|
||||
* "1" - Remotes are available as 2 axis, 2 button joysticks (the default).
|
||||
*/
|
||||
#define SDL_HINT_TV_REMOTE_AS_JOYSTICK "SDL_TV_REMOTE_AS_JOYSTICK"
|
||||
|
||||
/**
|
||||
* \brief A variable that lets you disable the detection and use of Xinput gamepad devices
|
||||
|
|
@ -337,7 +407,6 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_XINPUT_ENABLED "SDL_XINPUT_ENABLED"
|
||||
|
||||
|
||||
/**
|
||||
* \brief A variable that causes SDL to use the old axis and button mapping for XInput devices.
|
||||
*
|
||||
|
|
@ -347,9 +416,8 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_XINPUT_USE_OLD_JOYSTICK_MAPPING "SDL_XINPUT_USE_OLD_JOYSTICK_MAPPING"
|
||||
|
||||
|
||||
/**
|
||||
* \brief A variable that lets you manually hint extra gamecontroller db entries
|
||||
* \brief A variable that lets you manually hint extra gamecontroller db entries.
|
||||
*
|
||||
* The variable should be newline delimited rows of gamecontroller config data, see SDL_gamecontroller.h
|
||||
*
|
||||
|
|
@ -358,6 +426,31 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_GAMECONTROLLERCONFIG "SDL_GAMECONTROLLERCONFIG"
|
||||
|
||||
/**
|
||||
* \brief A variable containing a list of devices to skip when scanning for game controllers.
|
||||
*
|
||||
* The format of the string is a comma separated list of USB VID/PID pairs
|
||||
* in hexadecimal form, e.g.
|
||||
*
|
||||
* 0xAAAA/0xBBBB,0xCCCC/0xDDDD
|
||||
*
|
||||
* The variable can also take the form of @file, in which case the named
|
||||
* file will be loaded and interpreted as the value of the variable.
|
||||
*/
|
||||
#define SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES "SDL_GAMECONTROLLER_IGNORE_DEVICES"
|
||||
|
||||
/**
|
||||
* \brief If set, all devices will be skipped when scanning for game controllers except for the ones listed in this variable.
|
||||
*
|
||||
* The format of the string is a comma separated list of USB VID/PID pairs
|
||||
* in hexadecimal form, e.g.
|
||||
*
|
||||
* 0xAAAA/0xBBBB,0xCCCC/0xDDDD
|
||||
*
|
||||
* The variable can also take the form of @file, in which case the named
|
||||
* file will be loaded and interpreted as the value of the variable.
|
||||
*/
|
||||
#define SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT "SDL_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT"
|
||||
|
||||
/**
|
||||
* \brief A variable that lets you enable joystick (and gamecontroller) events even when your app is in the background.
|
||||
|
|
@ -372,7 +465,6 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS "SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS"
|
||||
|
||||
|
||||
/**
|
||||
* \brief If set to "0" then never set the top most bit on a SDL Window, even if the video mode expects it.
|
||||
* This is a debugging aid for developers and not expected to be used by end users. The default is "1"
|
||||
|
|
@ -383,7 +475,6 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_ALLOW_TOPMOST "SDL_ALLOW_TOPMOST"
|
||||
|
||||
|
||||
/**
|
||||
* \brief A variable that controls the timer resolution, in milliseconds.
|
||||
*
|
||||
|
|
@ -401,6 +492,33 @@ extern "C" {
|
|||
#define SDL_HINT_TIMER_RESOLUTION "SDL_TIMER_RESOLUTION"
|
||||
|
||||
|
||||
/**
|
||||
* \brief A variable describing the content orientation on QtWayland-based platforms.
|
||||
*
|
||||
* On QtWayland platforms, windows are rotated client-side to allow for custom
|
||||
* transitions. In order to correctly position overlays (e.g. volume bar) and
|
||||
* gestures (e.g. events view, close/minimize gestures), the system needs to
|
||||
* know in which orientation the application is currently drawing its contents.
|
||||
*
|
||||
* This does not cause the window to be rotated or resized, the application
|
||||
* needs to take care of drawing the content in the right orientation (the
|
||||
* framebuffer is always in portrait mode).
|
||||
*
|
||||
* This variable can be one of the following values:
|
||||
* "primary" (default), "portrait", "landscape", "inverted-portrait", "inverted-landscape"
|
||||
*/
|
||||
#define SDL_HINT_QTWAYLAND_CONTENT_ORIENTATION "SDL_QTWAYLAND_CONTENT_ORIENTATION"
|
||||
|
||||
/**
|
||||
* \brief Flags to set on QtWayland windows to integrate with the native window manager.
|
||||
*
|
||||
* On QtWayland platforms, this hint controls the flags to set on the windows.
|
||||
* For example, on Sailfish OS "OverridesSystemGestures" disables swipe gestures.
|
||||
*
|
||||
* This variable is a space-separated list of the following values (empty = no flags):
|
||||
* "OverridesSystemGestures", "StaysOnTop", "BypassWindowManager"
|
||||
*/
|
||||
#define SDL_HINT_QTWAYLAND_WINDOW_FLAGS "SDL_QTWAYLAND_WINDOW_FLAGS"
|
||||
|
||||
/**
|
||||
* \brief A string specifying SDL's threads stack size in bytes or "0" for the backend's default size
|
||||
|
|
@ -634,6 +752,18 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH "SDL_ANDROID_SEPARATE_MOUSE_AND_TOUCH"
|
||||
|
||||
/**
|
||||
* \brief A variable to control whether the return key on the soft keyboard
|
||||
* should hide the soft keyboard on Android and iOS.
|
||||
*
|
||||
* The variable can be set to the following values:
|
||||
* "0" - The return key will be handled as a key event. This is the behaviour of SDL <= 2.0.3. (default)
|
||||
* "1" - The return key will hide the keyboard.
|
||||
*
|
||||
* The value of this hint is used at runtime, so it can be changed at any time.
|
||||
*/
|
||||
#define SDL_HINT_RETURN_KEY_HIDES_IME "SDL_RETURN_KEY_HIDES_IME"
|
||||
|
||||
/**
|
||||
* \brief override the binding element for keyboard inputs for Emscripten builds
|
||||
*
|
||||
|
|
@ -667,7 +797,7 @@ extern "C" {
|
|||
* "0" - SDL will generate a window-close event when it sees Alt+F4.
|
||||
* "1" - SDL will only do normal key handling for Alt+F4.
|
||||
*/
|
||||
#define SDL_HINT_WINDOWS_NO_CLOSE_ON_ALT_F4 "SDL_WINDOWS_NO_CLOSE_ON_ALT_F4"
|
||||
#define SDL_HINT_WINDOWS_NO_CLOSE_ON_ALT_F4 "SDL_WINDOWS_NO_CLOSE_ON_ALT_F4"
|
||||
|
||||
/**
|
||||
* \brief Prevent SDL from using version 4 of the bitmap header when saving BMPs.
|
||||
|
|
@ -689,13 +819,18 @@ extern "C" {
|
|||
#define SDL_HINT_BMP_SAVE_LEGACY_FORMAT "SDL_BMP_SAVE_LEGACY_FORMAT"
|
||||
|
||||
/**
|
||||
* \brief Tell SDL not to name threads on Windows.
|
||||
* \brief Tell SDL not to name threads on Windows with the 0x406D1388 Exception.
|
||||
* The 0x406D1388 Exception is a trick used to inform Visual Studio of a
|
||||
* thread's name, but it tends to cause problems with other debuggers,
|
||||
* and the .NET runtime. Note that SDL 2.0.6 and later will still use
|
||||
* the (safer) SetThreadDescription API, introduced in the Windows 10
|
||||
* Creators Update, if available.
|
||||
*
|
||||
* The variable can be set to the following values:
|
||||
* "0" - SDL will raise the 0x406D1388 Exception to name threads.
|
||||
* This is the default behavior of SDL <= 2.0.4. (default)
|
||||
* "1" - SDL will not raise this exception, and threads will be unnamed.
|
||||
* For .NET languages this is required when running under a debugger.
|
||||
* This is the default behavior of SDL <= 2.0.4.
|
||||
* "1" - SDL will not raise this exception, and threads will be unnamed. (default)
|
||||
* This is necessary with .NET languages or debuggers that aren't Visual Studio.
|
||||
*/
|
||||
#define SDL_HINT_WINDOWS_DISABLE_THREAD_NAMING "SDL_WINDOWS_DISABLE_THREAD_NAMING"
|
||||
|
||||
|
|
@ -707,6 +842,94 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_RPI_VIDEO_LAYER "SDL_RPI_VIDEO_LAYER"
|
||||
|
||||
/**
|
||||
* \brief Tell the video driver that we only want a double buffer.
|
||||
*
|
||||
* By default, most lowlevel 2D APIs will use a triple buffer scheme that
|
||||
* wastes no CPU time on waiting for vsync after issuing a flip, but
|
||||
* introduces a frame of latency. On the other hand, using a double buffer
|
||||
* scheme instead is recommended for cases where low latency is an important
|
||||
* factor because we save a whole frame of latency.
|
||||
* We do so by waiting for vsync immediately after issuing a flip, usually just
|
||||
* after eglSwapBuffers call in the backend's *_SwapWindow function.
|
||||
*
|
||||
* Since it's driver-specific, it's only supported where possible and
|
||||
* implemented. Currently supported the following drivers:
|
||||
* - KMSDRM (kmsdrm)
|
||||
* - Raspberry Pi (raspberrypi)
|
||||
*/
|
||||
#define SDL_HINT_VIDEO_DOUBLE_BUFFER "SDL_VIDEO_DOUBLE_BUFFER"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling what driver to use for OpenGL ES contexts.
|
||||
*
|
||||
* On some platforms, currently Windows and X11, OpenGL drivers may support
|
||||
* creating contexts with an OpenGL ES profile. By default SDL uses these
|
||||
* profiles, when available, otherwise it attempts to load an OpenGL ES
|
||||
* library, e.g. that provided by the ANGLE project. This variable controls
|
||||
* whether SDL follows this default behaviour or will always load an
|
||||
* OpenGL ES library.
|
||||
*
|
||||
* Circumstances where this is useful include
|
||||
* - Testing an app with a particular OpenGL ES implementation, e.g ANGLE,
|
||||
* or emulator, e.g. those from ARM, Imagination or Qualcomm.
|
||||
* - Resolving OpenGL ES function addresses at link time by linking with
|
||||
* the OpenGL ES library instead of querying them at run time with
|
||||
* SDL_GL_GetProcAddress().
|
||||
*
|
||||
* Caution: for an application to work with the default behaviour across
|
||||
* different OpenGL drivers it must query the OpenGL ES function
|
||||
* addresses at run time using SDL_GL_GetProcAddress().
|
||||
*
|
||||
* This variable is ignored on most platforms because OpenGL ES is native
|
||||
* or not supported.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - Use ES profile of OpenGL, if available. (Default when not set.)
|
||||
* "1" - Load OpenGL ES library using the default library names.
|
||||
*
|
||||
*/
|
||||
#define SDL_HINT_OPENGL_ES_DRIVER "SDL_OPENGL_ES_DRIVER"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling speed/quality tradeoff of audio resampling.
|
||||
*
|
||||
* If available, SDL can use libsamplerate ( http://www.mega-nerd.com/SRC/ )
|
||||
* to handle audio resampling. There are different resampling modes available
|
||||
* that produce different levels of quality, using more CPU.
|
||||
*
|
||||
* If this hint isn't specified to a valid setting, or libsamplerate isn't
|
||||
* available, SDL will use the default, internal resampling algorithm.
|
||||
*
|
||||
* Note that this is currently only applicable to resampling audio that is
|
||||
* being written to a device for playback or audio being read from a device
|
||||
* for capture. SDL_AudioCVT always uses the default resampler (although this
|
||||
* might change for SDL 2.1).
|
||||
*
|
||||
* This hint is currently only checked at audio subsystem initialization.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
*
|
||||
* "0" or "default" - Use SDL's internal resampling (Default when not set - low quality, fast)
|
||||
* "1" or "fast" - Use fast, slightly higher quality resampling, if available
|
||||
* "2" or "medium" - Use medium quality resampling, if available
|
||||
* "3" or "best" - Use high quality resampling, if available
|
||||
*/
|
||||
#define SDL_HINT_AUDIO_RESAMPLING_MODE "SDL_AUDIO_RESAMPLING_MODE"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling the audio category on iOS and Mac OS X
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
*
|
||||
* "ambient" - Use the AVAudioSessionCategoryAmbient audio category, will be muted by the phone mute switch (default)
|
||||
* "playback" - Use the AVAudioSessionCategoryPlayback category
|
||||
*
|
||||
* For more information, see Apple's documentation:
|
||||
* https://developer.apple.com/library/content/documentation/Audio/Conceptual/AudioSessionProgrammingGuide/AudioSessionCategoriesandModes/AudioSessionCategoriesandModes.html
|
||||
*/
|
||||
#define SDL_HINT_AUDIO_CATEGORY "SDL_AUDIO_CATEGORY"
|
||||
|
||||
/**
|
||||
* \brief An enumeration of hint priorities
|
||||
*/
|
||||
|
|
@ -753,6 +976,11 @@ extern DECLSPEC const char * SDLCALL SDL_GetHint(const char *name);
|
|||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_GetHintBoolean(const char *name, SDL_bool default_value);
|
||||
|
||||
/**
|
||||
* \brief type definition of the hint callback function.
|
||||
*/
|
||||
typedef void (SDLCALL *SDL_HintCallback)(void *userdata, const char *name, const char *oldValue, const char *newValue);
|
||||
|
||||
/**
|
||||
* \brief Add a function to watch a particular hint
|
||||
*
|
||||
|
|
@ -760,7 +988,6 @@ extern DECLSPEC SDL_bool SDLCALL SDL_GetHintBoolean(const char *name, SDL_bool d
|
|||
* \param callback The function to call when the hint value changes
|
||||
* \param userdata A pointer to pass to the callback function
|
||||
*/
|
||||
typedef void (*SDL_HintCallback)(void *userdata, const char *name, const char *oldValue, const char *newValue);
|
||||
extern DECLSPEC void SDLCALL SDL_AddHintCallback(const char *name,
|
||||
SDL_HintCallback callback,
|
||||
void *userdata);
|
||||
|
|
@ -790,6 +1017,6 @@ extern DECLSPEC void SDLCALL SDL_ClearHints(void);
|
|||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_hints_h */
|
||||
#endif /* SDL_hints_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 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
|
||||
|
|
@ -36,8 +36,8 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#ifndef _SDL_joystick_h
|
||||
#define _SDL_joystick_h
|
||||
#ifndef SDL_joystick_h_
|
||||
#define SDL_joystick_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_error.h"
|
||||
|
|
@ -60,7 +60,9 @@ extern "C" {
|
|||
* SDL_Init(): SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS
|
||||
*/
|
||||
|
||||
/* The joystick structure used to identify an SDL joystick */
|
||||
/**
|
||||
* The joystick structure used to identify an SDL joystick
|
||||
*/
|
||||
struct _SDL_Joystick;
|
||||
typedef struct _SDL_Joystick SDL_Joystick;
|
||||
|
||||
|
|
@ -69,8 +71,29 @@ typedef struct {
|
|||
Uint8 data[16];
|
||||
} SDL_JoystickGUID;
|
||||
|
||||
/**
|
||||
* This is a unique ID for a joystick for the time it is connected to the system,
|
||||
* and is never reused for the lifetime of the application. If the joystick is
|
||||
* disconnected and reconnected, it will get a new ID.
|
||||
*
|
||||
* The ID value starts at 0 and increments from there. The value -1 is an invalid ID.
|
||||
*/
|
||||
typedef Sint32 SDL_JoystickID;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
SDL_JOYSTICK_TYPE_UNKNOWN,
|
||||
SDL_JOYSTICK_TYPE_GAMECONTROLLER,
|
||||
SDL_JOYSTICK_TYPE_WHEEL,
|
||||
SDL_JOYSTICK_TYPE_ARCADE_STICK,
|
||||
SDL_JOYSTICK_TYPE_FLIGHT_STICK,
|
||||
SDL_JOYSTICK_TYPE_DANCE_PAD,
|
||||
SDL_JOYSTICK_TYPE_GUITAR,
|
||||
SDL_JOYSTICK_TYPE_DRUM_KIT,
|
||||
SDL_JOYSTICK_TYPE_ARCADE_PAD,
|
||||
SDL_JOYSTICK_TYPE_THROTTLE
|
||||
} SDL_JoystickType;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
SDL_JOYSTICK_POWER_UNKNOWN = -1,
|
||||
|
|
@ -83,6 +106,20 @@ typedef enum
|
|||
} SDL_JoystickPowerLevel;
|
||||
|
||||
/* Function prototypes */
|
||||
|
||||
/**
|
||||
* Locking for multi-threaded access to the joystick API
|
||||
*
|
||||
* If you are using the joystick API or handling events from multiple threads
|
||||
* you should use these locking functions to protect access to the joysticks.
|
||||
*
|
||||
* In particular, you are guaranteed that the joystick list won't change, so
|
||||
* the API functions that take a joystick index will be valid, and joystick
|
||||
* and game controller events will not be delivered.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_LockJoysticks(void);
|
||||
extern DECLSPEC void SDLCALL SDL_UnlockJoysticks(void);
|
||||
|
||||
/**
|
||||
* Count the number of joysticks attached to the system right now
|
||||
*/
|
||||
|
|
@ -95,6 +132,46 @@ extern DECLSPEC int SDLCALL SDL_NumJoysticks(void);
|
|||
*/
|
||||
extern DECLSPEC const char *SDLCALL SDL_JoystickNameForIndex(int device_index);
|
||||
|
||||
/**
|
||||
* Return the GUID for the joystick at this index
|
||||
* This can be called before any joysticks are opened.
|
||||
*/
|
||||
extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetDeviceGUID(int device_index);
|
||||
|
||||
/**
|
||||
* Get the USB vendor ID of a joystick, if available.
|
||||
* This can be called before any joysticks are opened.
|
||||
* If the vendor ID isn't available this function returns 0.
|
||||
*/
|
||||
extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetDeviceVendor(int device_index);
|
||||
|
||||
/**
|
||||
* Get the USB product ID of a joystick, if available.
|
||||
* This can be called before any joysticks are opened.
|
||||
* If the product ID isn't available this function returns 0.
|
||||
*/
|
||||
extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetDeviceProduct(int device_index);
|
||||
|
||||
/**
|
||||
* Get the product version of a joystick, if available.
|
||||
* This can be called before any joysticks are opened.
|
||||
* If the product version isn't available this function returns 0.
|
||||
*/
|
||||
extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetDeviceProductVersion(int device_index);
|
||||
|
||||
/**
|
||||
* Get the type of a joystick, if available.
|
||||
* This can be called before any joysticks are opened.
|
||||
*/
|
||||
extern DECLSPEC SDL_JoystickType SDLCALL SDL_JoystickGetDeviceType(int device_index);
|
||||
|
||||
/**
|
||||
* Get the instance ID of a joystick.
|
||||
* This can be called before any joysticks are opened.
|
||||
* If the index is out of range, this function will return -1.
|
||||
*/
|
||||
extern DECLSPEC SDL_JoystickID SDLCALL SDL_JoystickGetDeviceInstanceID(int device_index);
|
||||
|
||||
/**
|
||||
* Open a joystick for use.
|
||||
* The index passed as an argument refers to the N'th joystick on the system.
|
||||
|
|
@ -117,16 +194,34 @@ extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickFromInstanceID(SDL_JoystickID
|
|||
*/
|
||||
extern DECLSPEC const char *SDLCALL SDL_JoystickName(SDL_Joystick * joystick);
|
||||
|
||||
/**
|
||||
* Return the GUID for the joystick at this index
|
||||
*/
|
||||
extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetDeviceGUID(int device_index);
|
||||
|
||||
/**
|
||||
* Return the GUID for this opened joystick
|
||||
*/
|
||||
extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetGUID(SDL_Joystick * joystick);
|
||||
|
||||
/**
|
||||
* Get the USB vendor ID of an opened joystick, if available.
|
||||
* If the vendor ID isn't available this function returns 0.
|
||||
*/
|
||||
extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetVendor(SDL_Joystick * joystick);
|
||||
|
||||
/**
|
||||
* Get the USB product ID of an opened joystick, if available.
|
||||
* If the product ID isn't available this function returns 0.
|
||||
*/
|
||||
extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetProduct(SDL_Joystick * joystick);
|
||||
|
||||
/**
|
||||
* Get the product version of an opened joystick, if available.
|
||||
* If the product version isn't available this function returns 0.
|
||||
*/
|
||||
extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetProductVersion(SDL_Joystick * joystick);
|
||||
|
||||
/**
|
||||
* Get the type of an opened joystick.
|
||||
*/
|
||||
extern DECLSPEC SDL_JoystickType SDLCALL SDL_JoystickGetType(SDL_Joystick * joystick);
|
||||
|
||||
/**
|
||||
* Return a string representation for this guid. pszGUID must point to at least 33 bytes
|
||||
* (32 for the string plus a NULL terminator).
|
||||
|
|
@ -134,7 +229,7 @@ extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetGUID(SDL_Joystick * joys
|
|||
extern DECLSPEC void SDLCALL SDL_JoystickGetGUIDString(SDL_JoystickGUID guid, char *pszGUID, int cbGUID);
|
||||
|
||||
/**
|
||||
* convert a string into a joystick formatted guid
|
||||
* Convert a string into a joystick guid
|
||||
*/
|
||||
extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetGUIDFromString(const char *pchGUID);
|
||||
|
||||
|
|
@ -190,6 +285,8 @@ extern DECLSPEC void SDLCALL SDL_JoystickUpdate(void);
|
|||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickEventState(int state);
|
||||
|
||||
#define SDL_JOYSTICK_AXIS_MAX 32767
|
||||
#define SDL_JOYSTICK_AXIS_MIN -32768
|
||||
/**
|
||||
* Get the current state of an axis control on a joystick.
|
||||
*
|
||||
|
|
@ -200,6 +297,18 @@ extern DECLSPEC int SDLCALL SDL_JoystickEventState(int state);
|
|||
extern DECLSPEC Sint16 SDLCALL SDL_JoystickGetAxis(SDL_Joystick * joystick,
|
||||
int axis);
|
||||
|
||||
/**
|
||||
* Get the initial state of an axis control on a joystick.
|
||||
*
|
||||
* The state is a value ranging from -32768 to 32767.
|
||||
*
|
||||
* The axis indices start at index 0.
|
||||
*
|
||||
* \return SDL_TRUE if this axis has any initial value, or SDL_FALSE if not.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_JoystickGetAxisInitialState(SDL_Joystick * joystick,
|
||||
int axis, Sint16 *state);
|
||||
|
||||
/**
|
||||
* \name Hat positions
|
||||
*/
|
||||
|
|
@ -268,6 +377,6 @@ extern DECLSPEC SDL_JoystickPowerLevel SDLCALL SDL_JoystickCurrentPowerLevel(SDL
|
|||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_joystick_h */
|
||||
#endif /* SDL_joystick_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 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
|
||||
|
|
@ -25,8 +25,8 @@
|
|||
* Include file for SDL keyboard event handling
|
||||
*/
|
||||
|
||||
#ifndef _SDL_keyboard_h
|
||||
#define _SDL_keyboard_h
|
||||
#ifndef SDL_keyboard_h_
|
||||
#define SDL_keyboard_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_error.h"
|
||||
|
|
@ -212,6 +212,6 @@ extern DECLSPEC SDL_bool SDLCALL SDL_IsScreenKeyboardShown(SDL_Window *window);
|
|||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_keyboard_h */
|
||||
#endif /* SDL_keyboard_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 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
|
||||
|
|
@ -25,8 +25,8 @@
|
|||
* Defines constants which identify keyboard keys and modifiers.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_keycode_h
|
||||
#define _SDL_keycode_h
|
||||
#ifndef SDL_keycode_h_
|
||||
#define SDL_keycode_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_scancode.h"
|
||||
|
|
@ -38,6 +38,9 @@
|
|||
* layout of the keyboard. These values include Unicode values representing
|
||||
* the unmodified character that would be generated by pressing the key, or
|
||||
* an SDLK_* constant for those keys that do not generate characters.
|
||||
*
|
||||
* A special exception is the number keys at the top of the keyboard which
|
||||
* always map to SDLK_0...SDLK_9, regardless of layout.
|
||||
*/
|
||||
typedef Sint32 SDL_Keycode;
|
||||
|
||||
|
|
@ -308,7 +311,12 @@ enum
|
|||
SDLK_KBDILLUMDOWN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KBDILLUMDOWN),
|
||||
SDLK_KBDILLUMUP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KBDILLUMUP),
|
||||
SDLK_EJECT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_EJECT),
|
||||
SDLK_SLEEP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SLEEP)
|
||||
SDLK_SLEEP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SLEEP),
|
||||
SDLK_APP1 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_APP1),
|
||||
SDLK_APP2 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_APP2),
|
||||
|
||||
SDLK_AUDIOREWIND = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOREWIND),
|
||||
SDLK_AUDIOFASTFORWARD = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOFASTFORWARD)
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -336,6 +344,6 @@ typedef enum
|
|||
#define KMOD_ALT (KMOD_LALT|KMOD_RALT)
|
||||
#define KMOD_GUI (KMOD_LGUI|KMOD_RGUI)
|
||||
|
||||
#endif /* _SDL_keycode_h */
|
||||
#endif /* SDL_keycode_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 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
|
||||
|
|
@ -38,8 +38,8 @@
|
|||
* the results you expect. :)
|
||||
*/
|
||||
|
||||
#ifndef _SDL_loadso_h
|
||||
#define _SDL_loadso_h
|
||||
#ifndef SDL_loadso_h_
|
||||
#define SDL_loadso_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_error.h"
|
||||
|
|
@ -76,6 +76,6 @@ extern DECLSPEC void SDLCALL SDL_UnloadObject(void *handle);
|
|||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_loadso_h */
|
||||
#endif /* SDL_loadso_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 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
|
||||
|
|
@ -34,8 +34,8 @@
|
|||
* Others: standard error output (stderr)
|
||||
*/
|
||||
|
||||
#ifndef _SDL_log_h
|
||||
#define _SDL_log_h
|
||||
#ifndef SDL_log_h_
|
||||
#define SDL_log_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
|
||||
|
|
@ -186,7 +186,7 @@ extern DECLSPEC void SDLCALL SDL_LogMessageV(int category,
|
|||
/**
|
||||
* \brief The prototype for the log output function
|
||||
*/
|
||||
typedef void (*SDL_LogOutputFunction)(void *userdata, int category, SDL_LogPriority priority, const char *message);
|
||||
typedef void (SDLCALL *SDL_LogOutputFunction)(void *userdata, int category, SDL_LogPriority priority, const char *message);
|
||||
|
||||
/**
|
||||
* \brief Get the current log output function.
|
||||
|
|
@ -206,6 +206,6 @@ extern DECLSPEC void SDLCALL SDL_LogSetOutputFunction(SDL_LogOutputFunction call
|
|||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_log_h */
|
||||
#endif /* SDL_log_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 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
|
||||
|
|
@ -19,8 +19,8 @@
|
|||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_main_h
|
||||
#define _SDL_main_h
|
||||
#ifndef SDL_main_h_
|
||||
#define SDL_main_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
|
||||
|
|
@ -63,10 +63,13 @@
|
|||
/* On Android SDL provides a Java class in SDLActivity.java that is the
|
||||
main activity entry point.
|
||||
|
||||
See README-android.md for more details on extending that class.
|
||||
See docs/README-android.md for more details on extending that class.
|
||||
*/
|
||||
#define SDL_MAIN_NEEDED
|
||||
|
||||
/* We need to export SDL_main so it can be launched from Java */
|
||||
#define SDLMAIN_DECLSPEC DECLSPEC
|
||||
|
||||
#elif defined(__NACL__)
|
||||
/* On NACL we use ppapi_simple to set up the application helper code,
|
||||
then wait for the first PSE_INSTANCE_DIDCHANGEVIEW event before
|
||||
|
|
@ -85,6 +88,10 @@
|
|||
#define C_LINKAGE
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#ifndef SDLMAIN_DECLSPEC
|
||||
#define SDLMAIN_DECLSPEC
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \file SDL_main.h
|
||||
*
|
||||
|
|
@ -107,7 +114,7 @@
|
|||
/**
|
||||
* The prototype for the application's main() function
|
||||
*/
|
||||
extern C_LINKAGE int SDL_main(int argc, char *argv[]);
|
||||
extern C_LINKAGE SDLMAIN_DECLSPEC int SDL_main(int argc, char *argv[]);
|
||||
|
||||
|
||||
#include "begin_code.h"
|
||||
|
|
@ -156,6 +163,6 @@ extern DECLSPEC int SDLCALL SDL_WinRTRunApp(int (*mainFunction)(int, char **), v
|
|||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_main_h */
|
||||
#endif /* SDL_main_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 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
|
||||
|
|
@ -19,8 +19,8 @@
|
|||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_messagebox_h
|
||||
#define _SDL_messagebox_h
|
||||
#ifndef SDL_messagebox_h_
|
||||
#define SDL_messagebox_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_video.h" /* For SDL_Window */
|
||||
|
|
@ -139,6 +139,6 @@ extern DECLSPEC int SDLCALL SDL_ShowSimpleMessageBox(Uint32 flags, const char *t
|
|||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_messagebox_h */
|
||||
#endif /* SDL_messagebox_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 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
|
||||
|
|
@ -25,8 +25,8 @@
|
|||
* Include file for SDL mouse event handling.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_mouse_h
|
||||
#define _SDL_mouse_h
|
||||
#ifndef SDL_mouse_h_
|
||||
#define SDL_mouse_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_error.h"
|
||||
|
|
@ -38,7 +38,7 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct SDL_Cursor SDL_Cursor; /* Implementation dependent */
|
||||
typedef struct SDL_Cursor SDL_Cursor; /**< Implementation dependent */
|
||||
|
||||
/**
|
||||
* \brief Cursor types for SDL_CreateSystemCursor().
|
||||
|
|
@ -297,6 +297,6 @@ extern DECLSPEC int SDLCALL SDL_ShowCursor(int toggle);
|
|||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_mouse_h */
|
||||
#endif /* SDL_mouse_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 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
|
||||
|
|
@ -19,8 +19,8 @@
|
|||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_mutex_h
|
||||
#define _SDL_mutex_h
|
||||
#ifndef SDL_mutex_h_
|
||||
#define SDL_mutex_h_
|
||||
|
||||
/**
|
||||
* \file SDL_mutex.h
|
||||
|
|
@ -246,6 +246,6 @@ extern DECLSPEC int SDLCALL SDL_CondWaitTimeout(SDL_cond * cond,
|
|||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_mutex_h */
|
||||
#endif /* SDL_mutex_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 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
|
||||
|
|
@ -19,8 +19,8 @@
|
|||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef _SDLname_h_
|
||||
#define _SDLname_h_
|
||||
#ifndef SDLname_h_
|
||||
#define SDLname_h_
|
||||
|
||||
#if defined(__STDC__) || defined(__cplusplus)
|
||||
#define NeedFunctionPrototypes 1
|
||||
|
|
@ -28,6 +28,6 @@
|
|||
|
||||
#define SDL_NAME(X) SDL_##X
|
||||
|
||||
#endif /* _SDLname_h_ */
|
||||
#endif /* SDLname_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 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
|
||||
|
|
@ -32,8 +32,8 @@
|
|||
* version included in SDL_opengl.h.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_opengl_h
|
||||
#define _SDL_opengl_h
|
||||
#ifndef SDL_opengl_h_
|
||||
#define SDL_opengl_h_
|
||||
|
||||
#include "SDL_config.h"
|
||||
|
||||
|
|
@ -97,6 +97,13 @@
|
|||
#elif defined(__CYGWIN__) && defined(USE_OPENGL32) /* use native windows opengl32 */
|
||||
# define GLAPI extern
|
||||
# define GLAPIENTRY __stdcall
|
||||
#elif defined(__OS2__) || defined(__EMX__) /* native os/2 opengl */
|
||||
# define GLAPI extern
|
||||
# define GLAPIENTRY _System
|
||||
# define APIENTRY _System
|
||||
# if defined(__GNUC__) && !defined(_System)
|
||||
# define _System
|
||||
# endif
|
||||
#elif (defined(__GNUC__) && __GNUC__ >= 4) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
|
||||
# define GLAPI __attribute__((visibility("default")))
|
||||
# define GLAPIENTRY
|
||||
|
|
@ -2171,6 +2178,6 @@ typedef void (APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum t
|
|||
|
||||
#endif /* !__IPHONEOS__ */
|
||||
|
||||
#endif /* _SDL_opengl_h */
|
||||
#endif /* SDL_opengl_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 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
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 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
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 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
|
||||
|
|
@ -25,8 +25,8 @@
|
|||
* Header for the enumerated pixel format definitions.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_pixels_h
|
||||
#define _SDL_pixels_h
|
||||
#ifndef SDL_pixels_h_
|
||||
#define SDL_pixels_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_endian.h"
|
||||
|
|
@ -287,7 +287,9 @@ enum
|
|||
SDL_PIXELFORMAT_NV12 = /**< Planar mode: Y + U/V interleaved (2 planes) */
|
||||
SDL_DEFINE_PIXELFOURCC('N', 'V', '1', '2'),
|
||||
SDL_PIXELFORMAT_NV21 = /**< Planar mode: Y + V/U interleaved (2 planes) */
|
||||
SDL_DEFINE_PIXELFOURCC('N', 'V', '2', '1')
|
||||
SDL_DEFINE_PIXELFOURCC('N', 'V', '2', '1'),
|
||||
SDL_PIXELFORMAT_EXTERNAL_OES = /**< Android video texture format */
|
||||
SDL_DEFINE_PIXELFOURCC('O', 'E', 'S', ' ')
|
||||
};
|
||||
|
||||
typedef struct SDL_Color
|
||||
|
|
@ -463,6 +465,6 @@ extern DECLSPEC void SDLCALL SDL_CalculateGammaRamp(float gamma, Uint16 * ramp);
|
|||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_pixels_h */
|
||||
#endif /* SDL_pixels_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 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
|
||||
|
|
@ -25,8 +25,8 @@
|
|||
* Try to get a standard set of platform defines.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_platform_h
|
||||
#define _SDL_platform_h
|
||||
#ifndef SDL_platform_h_
|
||||
#define SDL_platform_h_
|
||||
|
||||
#if defined(_AIX)
|
||||
#undef __AIX__
|
||||
|
|
@ -97,7 +97,7 @@
|
|||
#undef __OPENBSD__
|
||||
#define __OPENBSD__ 1
|
||||
#endif
|
||||
#if defined(__OS2__)
|
||||
#if defined(__OS2__) || defined(__EMX__)
|
||||
#undef __OS2__
|
||||
#define __OS2__ 1
|
||||
#endif
|
||||
|
|
@ -120,21 +120,34 @@
|
|||
|
||||
#if defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__) || defined(__MINGW32__)
|
||||
/* Try to find out if we're compiling for WinRT or non-WinRT */
|
||||
/* If _USING_V110_SDK71_ is defined it means we are using the v110_xp or v120_xp toolset. */
|
||||
#if (defined(_MSC_VER) && (_MSC_VER >= 1700) && !_USING_V110_SDK71_) /* _MSC_VER==1700 for MSVC 2012 */
|
||||
#if defined(_MSC_VER) && defined(__has_include)
|
||||
#if __has_include(<winapifamily.h>)
|
||||
#define HAVE_WINAPIFAMILY_H 1
|
||||
#else
|
||||
#define HAVE_WINAPIFAMILY_H 0
|
||||
#endif
|
||||
|
||||
/* If _USING_V110_SDK71_ is defined it means we are using the Windows XP toolset. */
|
||||
#elif defined(_MSC_VER) && (_MSC_VER >= 1700 && !_USING_V110_SDK71_) /* _MSC_VER == 1700 for Visual Studio 2012 */
|
||||
#define HAVE_WINAPIFAMILY_H 1
|
||||
#else
|
||||
#define HAVE_WINAPIFAMILY_H 0
|
||||
#endif
|
||||
|
||||
#if HAVE_WINAPIFAMILY_H
|
||||
#include <winapifamily.h>
|
||||
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
|
||||
#undef __WINDOWS__
|
||||
#define __WINDOWS__ 1
|
||||
/* See if we're compiling for WinRT: */
|
||||
#elif WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
|
||||
#define WINAPI_FAMILY_WINRT (!WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP))
|
||||
#else
|
||||
#define WINAPI_FAMILY_WINRT 0
|
||||
#endif /* HAVE_WINAPIFAMILY_H */
|
||||
|
||||
#if WINAPI_FAMILY_WINRT
|
||||
#undef __WINRT__
|
||||
#define __WINRT__ 1
|
||||
#endif
|
||||
#else
|
||||
#undef __WINDOWS__
|
||||
#define __WINDOWS__ 1
|
||||
#endif /* _MSC_VER < 1700 */
|
||||
#define __WINDOWS__ 1
|
||||
#endif
|
||||
#endif /* defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__) */
|
||||
|
||||
#if defined(__WINDOWS__)
|
||||
|
|
@ -180,6 +193,6 @@ extern DECLSPEC const char * SDLCALL SDL_GetPlatform (void);
|
|||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_platform_h */
|
||||
#endif /* SDL_platform_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 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
|
||||
|
|
@ -19,8 +19,8 @@
|
|||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_power_h
|
||||
#define _SDL_power_h
|
||||
#ifndef SDL_power_h_
|
||||
#define SDL_power_h_
|
||||
|
||||
/**
|
||||
* \file SDL_power.h
|
||||
|
|
@ -70,6 +70,6 @@ extern DECLSPEC SDL_PowerState SDLCALL SDL_GetPowerInfo(int *secs, int *pct);
|
|||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_power_h */
|
||||
#endif /* SDL_power_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 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
|
||||
|
|
@ -25,8 +25,8 @@
|
|||
* Include file for SDL quit event handling.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_quit_h
|
||||
#define _SDL_quit_h
|
||||
#ifndef SDL_quit_h_
|
||||
#define SDL_quit_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_error.h"
|
||||
|
|
@ -55,4 +55,4 @@
|
|||
#define SDL_QuitRequested() \
|
||||
(SDL_PumpEvents(), (SDL_PeepEvents(NULL,0,SDL_PEEKEVENT,SDL_QUIT,SDL_QUIT) > 0))
|
||||
|
||||
#endif /* _SDL_quit_h */
|
||||
#endif /* SDL_quit_h_ */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 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
|
||||
|
|
@ -25,8 +25,8 @@
|
|||
* Header file for SDL_rect definition and management functions.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_rect_h
|
||||
#define _SDL_rect_h
|
||||
#ifndef SDL_rect_h_
|
||||
#define SDL_rect_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_error.h"
|
||||
|
|
@ -143,6 +143,6 @@ extern DECLSPEC SDL_bool SDLCALL SDL_IntersectRectAndLine(const SDL_Rect *
|
|||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_rect_h */
|
||||
#endif /* SDL_rect_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 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
|
||||
|
|
@ -45,8 +45,8 @@
|
|||
* See this bug for details: http://bugzilla.libsdl.org/show_bug.cgi?id=1995
|
||||
*/
|
||||
|
||||
#ifndef _SDL_render_h
|
||||
#define _SDL_render_h
|
||||
#ifndef SDL_render_h_
|
||||
#define SDL_render_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_rect.h"
|
||||
|
|
@ -233,6 +233,8 @@ extern DECLSPEC int SDLCALL SDL_GetRendererOutputSize(SDL_Renderer * renderer,
|
|||
* active, the format was unsupported, or the width or height were out
|
||||
* of range.
|
||||
*
|
||||
* \note The contents of the texture are not defined at creation.
|
||||
*
|
||||
* \sa SDL_QueryTexture()
|
||||
* \sa SDL_UpdateTexture()
|
||||
* \sa SDL_DestroyTexture()
|
||||
|
|
@ -370,9 +372,12 @@ extern DECLSPEC int SDLCALL SDL_GetTextureBlendMode(SDL_Texture * texture,
|
|||
* \param texture The texture to update
|
||||
* \param rect A pointer to the rectangle of pixels to update, or NULL to
|
||||
* update the entire texture.
|
||||
* \param pixels The raw pixel data.
|
||||
* \param pixels The raw pixel data in the format of the texture.
|
||||
* \param pitch The number of bytes in a row of pixel data, including padding between lines.
|
||||
*
|
||||
* The pixel data must be in the format of the texture. The pixel format can be
|
||||
* queried with SDL_QueryTexture.
|
||||
*
|
||||
* \return 0 on success, or -1 if the texture is not valid.
|
||||
*
|
||||
* \note This is a fairly slow function.
|
||||
|
|
@ -816,7 +821,7 @@ extern DECLSPEC int SDLCALL SDL_RenderCopy(SDL_Renderer * renderer,
|
|||
* texture.
|
||||
* \param dstrect A pointer to the destination rectangle, or NULL for the
|
||||
* entire rendering target.
|
||||
* \param angle An angle in degrees that indicates the rotation that will be applied to dstrect
|
||||
* \param angle An angle in degrees that indicates the rotation that will be applied to dstrect, rotating it in a clockwise direction
|
||||
* \param center A pointer to a point indicating the point around which dstrect will be rotated (if NULL, rotation will be done around dstrect.w/2, dstrect.h/2).
|
||||
* \param flip An SDL_RendererFlip value stating which flipping actions should be performed on the texture
|
||||
*
|
||||
|
|
@ -893,6 +898,27 @@ extern DECLSPEC int SDLCALL SDL_GL_BindTexture(SDL_Texture *texture, float *texw
|
|||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GL_UnbindTexture(SDL_Texture *texture);
|
||||
|
||||
/**
|
||||
* \brief Get the CAMetalLayer associated with the given Metal renderer
|
||||
*
|
||||
* \param renderer The renderer to query
|
||||
*
|
||||
* \return CAMetalLayer* on success, or NULL if the renderer isn't a Metal renderer
|
||||
*
|
||||
* \sa SDL_RenderGetMetalCommandEncoder()
|
||||
*/
|
||||
extern DECLSPEC void *SDLCALL SDL_RenderGetMetalLayer(SDL_Renderer * renderer);
|
||||
|
||||
/**
|
||||
* \brief Get the Metal command encoder for the current frame
|
||||
*
|
||||
* \param renderer The renderer to query
|
||||
*
|
||||
* \return id<MTLRenderCommandEncoder> on success, or NULL if the renderer isn't a Metal renderer
|
||||
*
|
||||
* \sa SDL_RenderGetMetalLayer()
|
||||
*/
|
||||
extern DECLSPEC void *SDLCALL SDL_RenderGetMetalCommandEncoder(SDL_Renderer * renderer);
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
|
|
@ -900,6 +926,6 @@ extern DECLSPEC int SDLCALL SDL_GL_UnbindTexture(SDL_Texture *texture);
|
|||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_render_h */
|
||||
#endif /* SDL_render_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
#define SDL_REVISION "hg-10556:007dfe83abf8"
|
||||
#define SDL_REVISION_NUMBER 10556
|
||||
#define SDL_REVISION "hg-11914:f1084c419f33"
|
||||
#define SDL_REVISION_NUMBER 11914
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 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
|
||||
|
|
@ -26,8 +26,8 @@
|
|||
* data streams. It can easily be extended to files, memory, etc.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_rwops_h
|
||||
#define _SDL_rwops_h
|
||||
#ifndef SDL_rwops_h_
|
||||
#define SDL_rwops_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_error.h"
|
||||
|
|
@ -39,12 +39,12 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
/* RWops Types */
|
||||
#define SDL_RWOPS_UNKNOWN 0U /* Unknown stream type */
|
||||
#define SDL_RWOPS_WINFILE 1U /* Win32 file */
|
||||
#define SDL_RWOPS_STDFILE 2U /* Stdio file */
|
||||
#define SDL_RWOPS_JNIFILE 3U /* Android asset */
|
||||
#define SDL_RWOPS_MEMORY 4U /* Memory stream */
|
||||
#define SDL_RWOPS_MEMORY_RO 5U /* Read-Only memory stream */
|
||||
#define SDL_RWOPS_UNKNOWN 0U /**< Unknown stream type */
|
||||
#define SDL_RWOPS_WINFILE 1U /**< Win32 file */
|
||||
#define SDL_RWOPS_STDFILE 2U /**< Stdio file */
|
||||
#define SDL_RWOPS_JNIFILE 3U /**< Android asset */
|
||||
#define SDL_RWOPS_MEMORY 4U /**< Memory stream */
|
||||
#define SDL_RWOPS_MEMORY_RO 5U /**< Read-Only memory stream */
|
||||
|
||||
/**
|
||||
* This is the read/write operation structure -- very basic.
|
||||
|
|
@ -190,6 +190,29 @@ extern DECLSPEC void SDLCALL SDL_FreeRW(SDL_RWops * area);
|
|||
/* @} *//* Read/write macros */
|
||||
|
||||
|
||||
/**
|
||||
* Load all the data from an SDL data stream.
|
||||
*
|
||||
* The data is allocated with a zero byte at the end (null terminated)
|
||||
*
|
||||
* If \c datasize is not NULL, it is filled with the size of the data read.
|
||||
*
|
||||
* If \c freesrc is non-zero, the stream will be closed after being read.
|
||||
*
|
||||
* The data should be freed with SDL_free().
|
||||
*
|
||||
* \return the data, or NULL if there was an error.
|
||||
*/
|
||||
extern DECLSPEC void *SDLCALL SDL_LoadFile_RW(SDL_RWops * src, size_t *datasize,
|
||||
int freesrc);
|
||||
|
||||
/**
|
||||
* Load an entire file.
|
||||
*
|
||||
* Convenience macro.
|
||||
*/
|
||||
#define SDL_LoadFile(file, datasize) SDL_LoadFile_RW(SDL_RWFromFile(file, "rb"), datasize, 1)
|
||||
|
||||
/**
|
||||
* \name Read endian functions
|
||||
*
|
||||
|
|
@ -226,6 +249,6 @@ extern DECLSPEC size_t SDLCALL SDL_WriteBE64(SDL_RWops * dst, Uint64 value);
|
|||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_rwops_h */
|
||||
#endif /* SDL_rwops_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 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
|
||||
|
|
@ -25,8 +25,8 @@
|
|||
* Defines keyboard scancodes.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_scancode_h
|
||||
#define _SDL_scancode_h
|
||||
#ifndef SDL_scancode_h_
|
||||
#define SDL_scancode_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
|
||||
|
|
@ -38,7 +38,7 @@
|
|||
* SDL_Event structure.
|
||||
*
|
||||
* The values in this enumeration are based on the USB usage page standard:
|
||||
* http://www.usb.org/developers/devclass_docs/Hut1_12v2.pdf
|
||||
* http://www.usb.org/developers/hidpage/Hut1_12v2.pdf
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
|
|
@ -390,12 +390,24 @@ typedef enum
|
|||
|
||||
/* @} *//* Walther keys */
|
||||
|
||||
/**
|
||||
* \name Usage page 0x0C (additional media keys)
|
||||
*
|
||||
* These values are mapped from usage page 0x0C (USB consumer page).
|
||||
*/
|
||||
/* @{ */
|
||||
|
||||
SDL_SCANCODE_AUDIOREWIND = 285,
|
||||
SDL_SCANCODE_AUDIOFASTFORWARD = 286,
|
||||
|
||||
/* @} *//* Usage page 0x0C (additional media keys) */
|
||||
|
||||
/* Add any other keys here. */
|
||||
|
||||
SDL_NUM_SCANCODES = 512 /**< not a key, just marks the number of scancodes
|
||||
for array bounds */
|
||||
} SDL_Scancode;
|
||||
|
||||
#endif /* _SDL_scancode_h */
|
||||
#endif /* SDL_scancode_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 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
|
||||
|
|
@ -19,8 +19,8 @@
|
|||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_shape_h
|
||||
#define _SDL_shape_h
|
||||
#ifndef SDL_shape_h_
|
||||
#define SDL_shape_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_pixels.h"
|
||||
|
|
@ -71,6 +71,7 @@ extern DECLSPEC SDL_Window * SDLCALL SDL_CreateShapedWindow(const char *title,un
|
|||
* \param window The window to query for being shaped.
|
||||
*
|
||||
* \return SDL_TRUE if the window is a window that can be shaped, SDL_FALSE if the window is unshaped or NULL.
|
||||
*
|
||||
* \sa SDL_CreateShapedWindow
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_IsShapedWindow(const SDL_Window *window);
|
||||
|
|
@ -91,7 +92,7 @@ typedef enum {
|
|||
|
||||
/** \brief A union containing parameters for shaped windows. */
|
||||
typedef union {
|
||||
/** \brief a cutoff alpha value for binarization of the window shape's alpha channel. */
|
||||
/** \brief A cutoff alpha value for binarization of the window shape's alpha channel. */
|
||||
Uint8 binarizationCutoff;
|
||||
SDL_Color colorKey;
|
||||
} SDL_WindowShapeParams;
|
||||
|
|
@ -111,8 +112,8 @@ typedef struct SDL_WindowShapeMode {
|
|||
* \param shape A surface encoding the desired shape for the window.
|
||||
* \param shape_mode The parameters to set for the shaped window.
|
||||
*
|
||||
* \return 0 on success, SDL_INVALID_SHAPE_ARGUMENT on invalid an invalid shape argument, or SDL_NONSHAPEABLE_WINDOW
|
||||
* if the SDL_Window* given does not reference a valid shaped window.
|
||||
* \return 0 on success, SDL_INVALID_SHAPE_ARGUMENT on an invalid shape argument, or SDL_NONSHAPEABLE_WINDOW
|
||||
* if the SDL_Window given does not reference a valid shaped window.
|
||||
*
|
||||
* \sa SDL_WindowShapeMode
|
||||
* \sa SDL_GetShapedWindowMode.
|
||||
|
|
@ -127,7 +128,7 @@ extern DECLSPEC int SDLCALL SDL_SetWindowShape(SDL_Window *window,SDL_Surface *s
|
|||
*
|
||||
* \return 0 if the window has a shape and, provided shape_mode was not NULL, shape_mode has been filled with the mode
|
||||
* data, SDL_NONSHAPEABLE_WINDOW if the SDL_Window given is not a shaped window, or SDL_WINDOW_LACKS_SHAPE if
|
||||
* the SDL_Window* given is a shapeable window currently lacking a shape.
|
||||
* the SDL_Window given is a shapeable window currently lacking a shape.
|
||||
*
|
||||
* \sa SDL_WindowShapeMode
|
||||
* \sa SDL_SetWindowShape
|
||||
|
|
@ -140,4 +141,4 @@ extern DECLSPEC int SDLCALL SDL_GetShapedWindowMode(SDL_Window *window,SDL_Windo
|
|||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_shape_h */
|
||||
#endif /* SDL_shape_h_ */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 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
|
||||
|
|
@ -25,8 +25,8 @@
|
|||
* This is a general header that includes C language support.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_stdinc_h
|
||||
#define _SDL_stdinc_h
|
||||
#ifndef SDL_stdinc_h_
|
||||
#define SDL_stdinc_h_
|
||||
|
||||
#include "SDL_config.h"
|
||||
|
||||
|
|
@ -62,6 +62,9 @@
|
|||
#ifdef HAVE_STRINGS_H
|
||||
# include <strings.h>
|
||||
#endif
|
||||
#ifdef HAVE_WCHAR_H
|
||||
# include <wchar.h>
|
||||
#endif
|
||||
#if defined(HAVE_INTTYPES_H)
|
||||
# include <inttypes.h>
|
||||
#elif defined(HAVE_STDINT_H)
|
||||
|
|
@ -127,44 +130,67 @@
|
|||
*/
|
||||
/* @{ */
|
||||
|
||||
#ifdef __CC_ARM
|
||||
/* ARM's compiler throws warnings if we use an enum: like "SDL_bool x = a < b;" */
|
||||
#define SDL_FALSE 0
|
||||
#define SDL_TRUE 1
|
||||
typedef int SDL_bool;
|
||||
#else
|
||||
typedef enum
|
||||
{
|
||||
SDL_FALSE = 0,
|
||||
SDL_TRUE = 1
|
||||
} SDL_bool;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \brief A signed 8-bit integer type.
|
||||
*/
|
||||
#define SDL_MAX_SINT8 ((Sint8)0x7F) /* 127 */
|
||||
#define SDL_MIN_SINT8 ((Sint8)(~0x7F)) /* -128 */
|
||||
typedef int8_t Sint8;
|
||||
/**
|
||||
* \brief An unsigned 8-bit integer type.
|
||||
*/
|
||||
#define SDL_MAX_UINT8 ((Uint8)0xFF) /* 255 */
|
||||
#define SDL_MIN_UINT8 ((Uint8)0x00) /* 0 */
|
||||
typedef uint8_t Uint8;
|
||||
/**
|
||||
* \brief A signed 16-bit integer type.
|
||||
*/
|
||||
#define SDL_MAX_SINT16 ((Sint16)0x7FFF) /* 32767 */
|
||||
#define SDL_MIN_SINT16 ((Sint16)(~0x7FFF)) /* -32768 */
|
||||
typedef int16_t Sint16;
|
||||
/**
|
||||
* \brief An unsigned 16-bit integer type.
|
||||
*/
|
||||
#define SDL_MAX_UINT16 ((Uint16)0xFFFF) /* 65535 */
|
||||
#define SDL_MIN_UINT16 ((Uint16)0x0000) /* 0 */
|
||||
typedef uint16_t Uint16;
|
||||
/**
|
||||
* \brief A signed 32-bit integer type.
|
||||
*/
|
||||
#define SDL_MAX_SINT32 ((Sint32)0x7FFFFFFF) /* 2147483647 */
|
||||
#define SDL_MIN_SINT32 ((Sint32)(~0x7FFFFFFF)) /* -2147483648 */
|
||||
typedef int32_t Sint32;
|
||||
/**
|
||||
* \brief An unsigned 32-bit integer type.
|
||||
*/
|
||||
#define SDL_MAX_UINT32 ((Uint32)0xFFFFFFFFu) /* 4294967295 */
|
||||
#define SDL_MIN_UINT32 ((Uint32)0x00000000) /* 0 */
|
||||
typedef uint32_t Uint32;
|
||||
|
||||
/**
|
||||
* \brief A signed 64-bit integer type.
|
||||
*/
|
||||
#define SDL_MAX_SINT64 ((Sint64)0x7FFFFFFFFFFFFFFFll) /* 9223372036854775807 */
|
||||
#define SDL_MIN_SINT64 ((Sint64)(~0x7FFFFFFFFFFFFFFFll)) /* -9223372036854775808 */
|
||||
typedef int64_t Sint64;
|
||||
/**
|
||||
* \brief An unsigned 64-bit integer type.
|
||||
*/
|
||||
#define SDL_MAX_UINT64 ((Uint64)0xFFFFFFFFFFFFFFFFull) /* 18446744073709551615 */
|
||||
#define SDL_MIN_UINT64 ((Uint64)(0x0000000000000000ull)) /* 0 */
|
||||
typedef uint64_t Uint64;
|
||||
|
||||
/* @} *//* Basic data types */
|
||||
|
|
@ -262,7 +288,7 @@ typedef uint64_t Uint64;
|
|||
#endif /* SDL_DISABLE_ANALYZE_MACROS */
|
||||
|
||||
#define SDL_COMPILE_TIME_ASSERT(name, x) \
|
||||
typedef int SDL_dummy_ ## name[(x) * 2 - 1]
|
||||
typedef int SDL_compile_time_assert_ ## name[(x) * 2 - 1]
|
||||
/** \cond */
|
||||
#ifndef DOXYGEN_SHOULD_IGNORE_THIS
|
||||
SDL_COMPILE_TIME_ASSERT(uint8, sizeof(Uint8) == 1);
|
||||
|
|
@ -337,6 +363,37 @@ extern DECLSPEC void *SDLCALL SDL_calloc(size_t nmemb, size_t size);
|
|||
extern DECLSPEC void *SDLCALL SDL_realloc(void *mem, size_t size);
|
||||
extern DECLSPEC void SDLCALL SDL_free(void *mem);
|
||||
|
||||
typedef void *(SDLCALL *SDL_malloc_func)(size_t size);
|
||||
typedef void *(SDLCALL *SDL_calloc_func)(size_t nmemb, size_t size);
|
||||
typedef void *(SDLCALL *SDL_realloc_func)(void *mem, size_t size);
|
||||
typedef void (SDLCALL *SDL_free_func)(void *mem);
|
||||
|
||||
/**
|
||||
* \brief Get the current set of SDL memory functions
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_GetMemoryFunctions(SDL_malloc_func *malloc_func,
|
||||
SDL_calloc_func *calloc_func,
|
||||
SDL_realloc_func *realloc_func,
|
||||
SDL_free_func *free_func);
|
||||
|
||||
/**
|
||||
* \brief Replace SDL's memory allocation functions with a custom set
|
||||
*
|
||||
* \note If you are replacing SDL's memory functions, you should call
|
||||
* SDL_GetNumAllocations() and be very careful if it returns non-zero.
|
||||
* That means that your free function will be called with memory
|
||||
* allocated by the previous memory allocation functions.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SetMemoryFunctions(SDL_malloc_func malloc_func,
|
||||
SDL_calloc_func calloc_func,
|
||||
SDL_realloc_func realloc_func,
|
||||
SDL_free_func free_func);
|
||||
|
||||
/**
|
||||
* \brief Get the number of outstanding (unfreed) allocations
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GetNumAllocations(void);
|
||||
|
||||
extern DECLSPEC char *SDLCALL SDL_getenv(const char *name);
|
||||
extern DECLSPEC int SDLCALL SDL_setenv(const char *name, const char *value, int overwrite);
|
||||
|
||||
|
|
@ -379,10 +436,10 @@ SDL_FORCE_INLINE void SDL_memset4(void *dst, Uint32 val, size_t dwords)
|
|||
return;
|
||||
switch (dwords % 4)
|
||||
{
|
||||
case 0: do { *_p++ = _val;
|
||||
case 3: *_p++ = _val;
|
||||
case 2: *_p++ = _val;
|
||||
case 1: *_p++ = _val;
|
||||
case 0: do { *_p++ = _val; /* fallthrough */
|
||||
case 3: *_p++ = _val; /* fallthrough */
|
||||
case 2: *_p++ = _val; /* fallthrough */
|
||||
case 1: *_p++ = _val; /* fallthrough */
|
||||
} while ( --_n );
|
||||
}
|
||||
#endif
|
||||
|
|
@ -397,6 +454,7 @@ extern DECLSPEC int SDLCALL SDL_memcmp(const void *s1, const void *s2, size_t le
|
|||
extern DECLSPEC size_t SDLCALL SDL_wcslen(const wchar_t *wstr);
|
||||
extern DECLSPEC size_t SDLCALL SDL_wcslcpy(SDL_OUT_Z_CAP(maxlen) wchar_t *dst, const wchar_t *src, size_t maxlen);
|
||||
extern DECLSPEC size_t SDLCALL SDL_wcslcat(SDL_INOUT_Z_CAP(maxlen) wchar_t *dst, const wchar_t *src, size_t maxlen);
|
||||
extern DECLSPEC int SDLCALL SDL_wcscmp(const wchar_t *str1, const wchar_t *str2);
|
||||
|
||||
extern DECLSPEC size_t SDLCALL SDL_strlen(const char *str);
|
||||
extern DECLSPEC size_t SDLCALL SDL_strlcpy(SDL_OUT_Z_CAP(maxlen) char *dst, const char *src, size_t maxlen);
|
||||
|
|
@ -409,6 +467,7 @@ extern DECLSPEC char *SDLCALL SDL_strlwr(char *str);
|
|||
extern DECLSPEC char *SDLCALL SDL_strchr(const char *str, int c);
|
||||
extern DECLSPEC char *SDLCALL SDL_strrchr(const char *str, int c);
|
||||
extern DECLSPEC char *SDLCALL SDL_strstr(const char *haystack, const char *needle);
|
||||
extern DECLSPEC size_t SDLCALL SDL_utf8strlen(const char *str);
|
||||
|
||||
extern DECLSPEC char *SDLCALL SDL_itoa(int value, char *str, int radix);
|
||||
extern DECLSPEC char *SDLCALL SDL_uitoa(unsigned int value, char *str, int radix);
|
||||
|
|
@ -437,23 +496,38 @@ extern DECLSPEC int SDLCALL SDL_vsnprintf(SDL_OUT_Z_CAP(maxlen) char *text, size
|
|||
|
||||
#ifndef HAVE_M_PI
|
||||
#ifndef M_PI
|
||||
#define M_PI 3.14159265358979323846264338327950288 /* pi */
|
||||
#define M_PI 3.14159265358979323846264338327950288 /**< pi */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
extern DECLSPEC double SDLCALL SDL_acos(double x);
|
||||
extern DECLSPEC float SDLCALL SDL_acosf(float x);
|
||||
extern DECLSPEC double SDLCALL SDL_asin(double x);
|
||||
extern DECLSPEC float SDLCALL SDL_asinf(float x);
|
||||
extern DECLSPEC double SDLCALL SDL_atan(double x);
|
||||
extern DECLSPEC float SDLCALL SDL_atanf(float x);
|
||||
extern DECLSPEC double SDLCALL SDL_atan2(double x, double y);
|
||||
extern DECLSPEC float SDLCALL SDL_atan2f(float x, float y);
|
||||
extern DECLSPEC double SDLCALL SDL_ceil(double x);
|
||||
extern DECLSPEC float SDLCALL SDL_ceilf(float x);
|
||||
extern DECLSPEC double SDLCALL SDL_copysign(double x, double y);
|
||||
extern DECLSPEC float SDLCALL SDL_copysignf(float x, float y);
|
||||
extern DECLSPEC double SDLCALL SDL_cos(double x);
|
||||
extern DECLSPEC float SDLCALL SDL_cosf(float x);
|
||||
extern DECLSPEC double SDLCALL SDL_fabs(double x);
|
||||
extern DECLSPEC float SDLCALL SDL_fabsf(float x);
|
||||
extern DECLSPEC double SDLCALL SDL_floor(double x);
|
||||
extern DECLSPEC float SDLCALL SDL_floorf(float x);
|
||||
extern DECLSPEC double SDLCALL SDL_fmod(double x, double y);
|
||||
extern DECLSPEC float SDLCALL SDL_fmodf(float x, float y);
|
||||
extern DECLSPEC double SDLCALL SDL_log(double x);
|
||||
extern DECLSPEC float SDLCALL SDL_logf(float x);
|
||||
extern DECLSPEC double SDLCALL SDL_log10(double x);
|
||||
extern DECLSPEC float SDLCALL SDL_log10f(float x);
|
||||
extern DECLSPEC double SDLCALL SDL_pow(double x, double y);
|
||||
extern DECLSPEC float SDLCALL SDL_powf(float x, float y);
|
||||
extern DECLSPEC double SDLCALL SDL_scalbn(double x, int n);
|
||||
extern DECLSPEC float SDLCALL SDL_scalbnf(float x, int n);
|
||||
extern DECLSPEC double SDLCALL SDL_sin(double x);
|
||||
extern DECLSPEC float SDLCALL SDL_sinf(float x);
|
||||
extern DECLSPEC double SDLCALL SDL_sqrt(double x);
|
||||
|
|
@ -526,6 +600,6 @@ SDL_FORCE_INLINE void *SDL_memcpy4(SDL_OUT_BYTECAP(dwords*4) void *dst, SDL_IN_B
|
|||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_stdinc_h */
|
||||
#endif /* SDL_stdinc_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 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
|
||||
|
|
@ -25,8 +25,8 @@
|
|||
* Header file for ::SDL_Surface definition and management functions.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_surface_h
|
||||
#define _SDL_surface_h
|
||||
#ifndef SDL_surface_h_
|
||||
#define SDL_surface_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_pixels.h"
|
||||
|
|
@ -94,8 +94,19 @@ typedef struct SDL_Surface
|
|||
/**
|
||||
* \brief The type of function used for surface blitting functions.
|
||||
*/
|
||||
typedef int (*SDL_blit) (struct SDL_Surface * src, SDL_Rect * srcrect,
|
||||
struct SDL_Surface * dst, SDL_Rect * dstrect);
|
||||
typedef int (SDLCALL *SDL_blit) (struct SDL_Surface * src, SDL_Rect * srcrect,
|
||||
struct SDL_Surface * dst, SDL_Rect * dstrect);
|
||||
|
||||
/**
|
||||
* \brief The formula used for converting between YUV and RGB
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
SDL_YUV_CONVERSION_JPEG, /**< Full range JPEG */
|
||||
SDL_YUV_CONVERSION_BT601, /**< BT.601 (the default) */
|
||||
SDL_YUV_CONVERSION_BT709, /**< BT.709 */
|
||||
SDL_YUV_CONVERSION_AUTOMATIC /**< BT.601 for SD content, BT.709 for HD content */
|
||||
} SDL_YUV_CONVERSION_MODE;
|
||||
|
||||
/**
|
||||
* Allocate and free an RGB surface.
|
||||
|
|
@ -118,8 +129,11 @@ typedef int (*SDL_blit) (struct SDL_Surface * src, SDL_Rect * srcrect,
|
|||
extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurface
|
||||
(Uint32 flags, int width, int height, int depth,
|
||||
Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask);
|
||||
|
||||
/* !!! FIXME for 2.1: why does this ask for depth? Format provides that. */
|
||||
extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceWithFormat
|
||||
(Uint32 flags, int width, int height, int depth, Uint32 format);
|
||||
|
||||
extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceFrom(void *pixels,
|
||||
int width,
|
||||
int height,
|
||||
|
|
@ -356,6 +370,11 @@ extern DECLSPEC SDL_bool SDLCALL SDL_SetClipRect(SDL_Surface * surface,
|
|||
extern DECLSPEC void SDLCALL SDL_GetClipRect(SDL_Surface * surface,
|
||||
SDL_Rect * rect);
|
||||
|
||||
/*
|
||||
* Creates a new surface identical to the existing surface
|
||||
*/
|
||||
extern DECLSPEC SDL_Surface *SDLCALL SDL_DuplicateSurface(SDL_Surface * surface);
|
||||
|
||||
/**
|
||||
* Creates a new surface of the specified format, and then copies and maps
|
||||
* the given surface to it so the blit of the converted surface will be as
|
||||
|
|
@ -501,6 +520,20 @@ extern DECLSPEC int SDLCALL SDL_LowerBlitScaled
|
|||
(SDL_Surface * src, SDL_Rect * srcrect,
|
||||
SDL_Surface * dst, SDL_Rect * dstrect);
|
||||
|
||||
/**
|
||||
* \brief Set the YUV conversion mode
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_SetYUVConversionMode(SDL_YUV_CONVERSION_MODE mode);
|
||||
|
||||
/**
|
||||
* \brief Get the YUV conversion mode
|
||||
*/
|
||||
extern DECLSPEC SDL_YUV_CONVERSION_MODE SDLCALL SDL_GetYUVConversionMode(void);
|
||||
|
||||
/**
|
||||
* \brief Get the YUV conversion mode, returning the correct mode for the resolution when the current conversion mode is SDL_YUV_CONVERSION_AUTOMATIC
|
||||
*/
|
||||
extern DECLSPEC SDL_YUV_CONVERSION_MODE SDLCALL SDL_GetYUVConversionModeForResolution(int width, int height);
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
|
|
@ -508,6 +541,6 @@ extern DECLSPEC int SDLCALL SDL_LowerBlitScaled
|
|||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_surface_h */
|
||||
#endif /* SDL_surface_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue