mirror of
https://github.com/etlegacy/etlegacy-libs.git
synced 2025-04-08 23:42:48 +00:00
libs: updated to SDL 2.0.12
This commit is contained in:
parent
ee9e1b7c3d
commit
08e9a8c435
888 changed files with 35453 additions and 11674 deletions
|
@ -64,7 +64,11 @@ LOCAL_CFLAGS += \
|
|||
-Wmissing-variable-declarations \
|
||||
-Wfloat-conversion \
|
||||
-Wshorten-64-to-32 \
|
||||
-Wunreachable-code-return
|
||||
-Wunreachable-code-return \
|
||||
-Wshift-sign-overflow \
|
||||
-Wstrict-prototypes \
|
||||
-Wkeyword-macro \
|
||||
|
||||
|
||||
# Warnings we haven't fixed (yet)
|
||||
LOCAL_CFLAGS += -Wno-unused-parameter -Wno-sign-compare
|
||||
|
|
|
@ -42,12 +42,12 @@ 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 10)
|
||||
set(SDL_MICRO_VERSION 12)
|
||||
set(SDL_INTERFACE_AGE 0)
|
||||
set(SDL_BINARY_AGE 10)
|
||||
set(SDL_BINARY_AGE 12)
|
||||
set(SDL_VERSION "${SDL_MAJOR_VERSION}.${SDL_MINOR_VERSION}.${SDL_MICRO_VERSION}")
|
||||
# the following should match the versions in Xcode project file:
|
||||
set(DYLIB_CURRENT_VERSION 10.0.0)
|
||||
set(DYLIB_CURRENT_VERSION 12.0.0)
|
||||
set(DYLIB_COMPATIBILITY_VERSION 1.0.0)
|
||||
|
||||
# Set defaults preventing destination file conflicts
|
||||
|
@ -118,6 +118,8 @@ elseif(APPLE)
|
|||
set(DARWIN TRUE)
|
||||
elseif(CMAKE_SYSTEM_NAME MATCHES ".*MacOS.*")
|
||||
set(MACOSX TRUE)
|
||||
elseif(CMAKE_SYSTEM_NAME MATCHES ".*tvOS.*")
|
||||
set(TVOS TRUE)
|
||||
endif()
|
||||
# TODO: iOS?
|
||||
elseif(CMAKE_SYSTEM_NAME MATCHES "BeOS.*")
|
||||
|
@ -127,7 +129,7 @@ elseif(CMAKE_SYSTEM_NAME MATCHES "Haiku.*")
|
|||
endif()
|
||||
|
||||
# Don't mistake osx for unix
|
||||
if(UNIX AND NOT APPLE)
|
||||
if(UNIX AND NOT APPLE AND NOT RISCOS)
|
||||
set(UNIX_SYS ON)
|
||||
else()
|
||||
set(UNIX_SYS OFF)
|
||||
|
@ -156,11 +158,10 @@ if(UNIX OR MINGW OR MSYS)
|
|||
endif()
|
||||
|
||||
# The hidraw support doesn't catch Xbox, PS4 and Nintendo controllers,
|
||||
# so we'll just use libusb when it's available. Except that libusb
|
||||
# requires root permissions to open devices, so that's not generally
|
||||
# useful, and we'll disable this by default on Unix. Windows and macOS
|
||||
# can use it without root access, though, so enable by default there.
|
||||
if(WINDOWS OR APPLE OR ANDROID)
|
||||
# so we'll just use libusb when it's available. libusb does not support iOS,
|
||||
# so we default to yes on iOS.
|
||||
# TODO: Windows can support libusb, the hid.c file just depends on Unix APIs
|
||||
if(WINDOWS OR IOS OR TVOS OR ANDROID)
|
||||
set(HIDAPI_SKIP_LIBUSB TRUE)
|
||||
else()
|
||||
set(HIDAPI_SKIP_LIBUSB FALSE)
|
||||
|
@ -169,6 +170,14 @@ if (HIDAPI_SKIP_LIBUSB)
|
|||
set(OPT_DEF_HIDAPI ON)
|
||||
endif()
|
||||
|
||||
# On the other hand, *BSD specifically uses libusb only, so we make a special
|
||||
# case just for them.
|
||||
if(FREEBSD OR NETBSD OR OPENBSD OR BSDI)
|
||||
set(HIDAPI_ONLY_LIBUSB TRUE)
|
||||
else()
|
||||
set(HIDAPI_ONLY_LIBUSB FALSE)
|
||||
endif()
|
||||
|
||||
# Compiler info
|
||||
if(CMAKE_COMPILER_IS_GNUCC)
|
||||
set(USE_GCC TRUE)
|
||||
|
@ -320,6 +329,8 @@ 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(ARMSIMD "use SIMD assembly blitters on ARM" ON)
|
||||
set_option(ARMNEON "use NEON assembly blitters on ARM" ON)
|
||||
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)
|
||||
|
@ -330,7 +341,7 @@ set_option(VIDEO_OPENGLES "Include OpenGL ES support" ON)
|
|||
set_option(PTHREADS "Use POSIX threads for multi-threading" ${SDL_PTHREADS_ENABLED_BY_DEFAULT})
|
||||
dep_option(PTHREADS_SEM "Use pthread semaphores" ON "PTHREADS" OFF)
|
||||
set_option(SDL_DLOPEN "Use dlopen for shared object loading" ${SDL_DLOPEN_ENABLED_BY_DEFAULT})
|
||||
set_option(OSS "Support the OSS audio API" ${UNIX_SYS})
|
||||
dep_option(OSS "Support the OSS audio API" ON "UNIX_SYS OR RISCOS" OFF)
|
||||
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})
|
||||
|
@ -366,10 +377,13 @@ set_option(VIDEO_COCOA "Use Cocoa video driver" ${APPLE})
|
|||
set_option(DIRECTX "Use DirectX for Windows audio/video" ${WINDOWS})
|
||||
set_option(WASAPI "Use the Windows WASAPI audio driver" ${WINDOWS})
|
||||
set_option(RENDER_D3D "Enable the Direct3D render driver" ${WINDOWS})
|
||||
set_option(RENDER_METAL "Enable the Metal render driver" ${APPLE})
|
||||
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_METAL "Enable Metal support" ${APPLE})
|
||||
set_option(VIDEO_KMSDRM "Use KMS DRM video driver" ${UNIX_SYS})
|
||||
dep_option(KMSDRM_SHARED "Dynamically load KMS DRM support" ON "VIDEO_KMSDRM" OFF)
|
||||
set_option(VIDEO_OFFSCREEN "Use offscreen video driver" OFF)
|
||||
option_string(BACKGROUNDING_SIGNAL "number to use for magic backgrounding signal or 'OFF'" "OFF")
|
||||
option_string(FOREGROUNDING_SIGNAL "number to use for magic foregrounding signal or 'OFF'" "OFF")
|
||||
set_option(HIDAPI "Use HIDAPI for low level joystick drivers" ${OPT_DEF_HIDAPI})
|
||||
|
@ -659,6 +673,61 @@ if(ASSEMBLY)
|
|||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(ARMSIMD)
|
||||
set(ORIG_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
|
||||
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -x assembler-with-cpp")
|
||||
check_c_source_compiles("
|
||||
.text
|
||||
.arch armv6
|
||||
.object_arch armv4
|
||||
.arm
|
||||
.altmacro
|
||||
#ifndef __ARM_EABI__
|
||||
#error EABI is required (to be sure that calling conventions are compatible)
|
||||
#endif
|
||||
pld [r0]
|
||||
uqadd8 r0, r0, r0
|
||||
" ARMSIMD_FOUND)
|
||||
set(CMAKE_REQUIRED_FLAGS "${ORIG_CMAKE_REQUIRED_FLAGS}")
|
||||
|
||||
if(ARMSIMD_FOUND)
|
||||
set(HAVE_ARMSIMD TRUE)
|
||||
set(SDL_ARM_SIMD_BLITTERS 1)
|
||||
file(GLOB ARMSIMD_SOURCES ${SDL2_SOURCE_DIR}/src/video/arm/pixman-arm-simd*.S)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${ARMSIMD_SOURCES})
|
||||
set(WARN_ABOUT_ARM_SIMD_ASM_MIT TRUE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(ARMNEON)
|
||||
set(ORIG_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
|
||||
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -x assembler-with-cpp")
|
||||
check_c_source_compiles("
|
||||
.text
|
||||
.fpu neon
|
||||
.arch armv7a
|
||||
.object_arch armv4
|
||||
.eabi_attribute 10, 0
|
||||
.arm
|
||||
.altmacro
|
||||
#ifndef __ARM_EABI__
|
||||
#error EABI is required (to be sure that calling conventions are compatible)
|
||||
#endif
|
||||
pld [r0]
|
||||
vmovn.u16 d0, q0
|
||||
" ARMNEON_FOUND)
|
||||
set(CMAKE_REQUIRED_FLAGS "${ORIG_CMAKE_REQUIRED_FLAGS}")
|
||||
|
||||
if(ARMNEON_FOUND)
|
||||
set(HAVE_ARMNEON TRUE)
|
||||
set(SDL_ARM_NEON_BLITTERS 1)
|
||||
file(GLOB ARMNEON_SOURCES ${SDL2_SOURCE_DIR}/src/video/arm/pixman-arm-neon*.S)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${ARMNEON_SOURCES})
|
||||
set(WARN_ABOUT_ARM_NEON_ASM_MIT TRUE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
elseif(MSVC_VERSION GREATER 1500)
|
||||
# TODO: SDL_cpuinfo.h needs to support the user's configuration wish
|
||||
# for MSVC - right now it is always activated
|
||||
|
@ -691,10 +760,10 @@ if(LIBC)
|
|||
set(HAVE_SIGNAL_H 1)
|
||||
foreach(_FN
|
||||
malloc calloc realloc free qsort abs memset memcpy memmove memcmp
|
||||
wcslen wcscmp
|
||||
wcslen wcslcpy wcslcat wcsdup wcsstr wcscmp wcsncmp
|
||||
strlen _strrev _strupr _strlwr strchr strrchr strstr itoa _ltoa
|
||||
_ultoa strtol strtoul strtoll strtod atoi atof strcmp strncmp
|
||||
_stricmp _strnicmp sscanf
|
||||
_stricmp _strnicmp strtok_s sscanf
|
||||
acos acosf asin asinf atan atanf atan2 atan2f ceil ceilf
|
||||
copysign copysignf cos cosf exp expf fabs fabsf floor floorf fmod fmodf
|
||||
log logf log10 log10f pow powf scalbn scalbnf sin sinf sqrt sqrtf tan tanf)
|
||||
|
@ -728,10 +797,11 @@ if(LIBC)
|
|||
foreach(_FN
|
||||
strtod malloc calloc realloc free getenv setenv putenv unsetenv
|
||||
qsort abs bcopy memset memcpy memmove memcmp strlen strlcpy strlcat
|
||||
_strrev _strupr _strlwr strchr strrchr strstr itoa _ltoa
|
||||
_strrev _strupr _strlwr strchr strrchr strstr strtok_r itoa _ltoa
|
||||
_uitoa _ultoa strtol strtoul _i64toa _ui64toa strtoll strtoull
|
||||
atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp
|
||||
vsscanf vsnprintf fopen64 fseeko fseeko64 sigaction setjmp
|
||||
wcscmp wcsdup wcslcat wcslcpy wcslen wcsncmp wcsstr
|
||||
sscanf vsscanf vsnprintf fopen64 fseeko fseeko64 sigaction setjmp
|
||||
nanosleep sysconf sysctlbyname getauxval poll _Exit
|
||||
)
|
||||
string(TOUPPER ${_FN} _UPPER)
|
||||
|
@ -743,8 +813,10 @@ if(LIBC)
|
|||
if(HAVE_LIBM)
|
||||
set(CMAKE_REQUIRED_LIBRARIES m)
|
||||
foreach(_FN
|
||||
atan atan2 ceil copysign cos cosf fabs floor log pow scalbn sin
|
||||
sinf sqrt sqrtf tan tanf acos asin)
|
||||
atan atan2 atanf atan2f ceil ceilf copysign copysignf cos cosf
|
||||
exp expf fabs fabsf floor floorf fmod fmodf log logf log10 log10f
|
||||
pow powf scalbn scalbnf sin sinf sqrt sqrtf tan tanf acos acosf
|
||||
asin asinf)
|
||||
string(TOUPPER ${_FN} _UPPER)
|
||||
set(_HAVEVAR "HAVE_${_UPPER}")
|
||||
check_function_exists("${_FN}" ${_HAVEVAR})
|
||||
|
@ -841,6 +913,13 @@ if(SDL_VIDEO)
|
|||
set(HAVE_VIDEO_DUMMY TRUE)
|
||||
set(HAVE_SDL_VIDEO TRUE)
|
||||
endif()
|
||||
if(VIDEO_OFFSCREEN)
|
||||
set(SDL_VIDEO_DRIVER_OFFSCREEN 1)
|
||||
file(GLOB VIDEO_OFFSCREEN_SOURCES ${SDL2_SOURCE_DIR}/src/video/offscreen/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${VIDEO_OFFSCREEN_SOURCES})
|
||||
set(HAVE_VIDEO_OFFSCREEN TRUE)
|
||||
set(HAVE_SDL_VIDEO TRUE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Platform-specific options and settings
|
||||
|
@ -916,12 +995,18 @@ if(ANDROID)
|
|||
set(HAVE_SDL_VIDEO TRUE)
|
||||
|
||||
# Core stuff
|
||||
find_library(ANDROID_DL_LIBRARY dl)
|
||||
# find_library(ANDROID_DL_LIBRARY dl)
|
||||
# FIXME failing dlopen https://github.com/android-ndk/ndk/issues/929
|
||||
find_library(ANDROID_DL_LIBRARY NAMES libdl.so 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)
|
||||
|
||||
if (HAVE_HIDAPI)
|
||||
list(APPEND EXTRA_LIBS hidapi)
|
||||
endif()
|
||||
|
||||
#enable gles
|
||||
if(VIDEO_OPENGLES)
|
||||
set(SDL_VIDEO_OPENGL_EGL 1)
|
||||
|
@ -1006,7 +1091,7 @@ elseif(EMSCRIPTEN)
|
|||
endif()
|
||||
endif()
|
||||
|
||||
elseif(UNIX AND NOT APPLE AND NOT ANDROID)
|
||||
elseif(UNIX AND NOT APPLE AND NOT ANDROID AND NOT RISCOS)
|
||||
if(SDL_AUDIO)
|
||||
if(SYSV5 OR SOLARIS OR HPUX)
|
||||
set(SDL_AUDIO_DRIVER_SUNAUDIO 1)
|
||||
|
@ -1105,6 +1190,7 @@ elseif(UNIX AND NOT APPLE AND NOT ANDROID)
|
|||
set(HAVE_IBUS_IBUS_H TRUE)
|
||||
include_directories(${IBUS_INCLUDE_DIRS})
|
||||
list(APPEND EXTRA_LIBS ${IBUS_LIBRARIES})
|
||||
add_definitions(-DSDL_USE_IME)
|
||||
endif()
|
||||
if(HAVE_LIBUNWIND_H)
|
||||
# We've already found the header, so REQUIRE the lib to be present
|
||||
|
@ -1128,7 +1214,9 @@ elseif(UNIX AND NOT APPLE AND NOT ANDROID)
|
|||
endif()
|
||||
|
||||
if(SDL_JOYSTICK)
|
||||
CheckUSBHID() # seems to be BSD specific - limit the test to BSD only?
|
||||
if(FREEBSD OR NETBSD OR OPENBSD OR BSDI)
|
||||
CheckUSBHID()
|
||||
endif()
|
||||
CheckHIDAPI()
|
||||
if(LINUX AND NOT ANDROID)
|
||||
set(SDL_JOYSTICK_LINUX 1)
|
||||
|
@ -1266,10 +1354,9 @@ elseif(WINDOWS)
|
|||
set(CMAKE_REQUIRED_FLAGS ${ORIG_CMAKE_REQUIRED_FLAGS})
|
||||
endif()
|
||||
|
||||
# headers needed elsewhere ...
|
||||
# headers needed elsewhere
|
||||
check_include_file(mmdeviceapi.h HAVE_MMDEVICEAPI_H)
|
||||
check_include_file(audioclient.h HAVE_AUDIOCLIENT_H)
|
||||
check_include_file(endpointvolume.h HAVE_ENDPOINTVOLUME_H)
|
||||
|
||||
if(SDL_AUDIO)
|
||||
set(SDL_AUDIO_DRIVER_WINMM 1)
|
||||
|
@ -1374,6 +1461,7 @@ elseif(WINDOWS)
|
|||
|
||||
if(SDL_JOYSTICK)
|
||||
CheckHIDAPI()
|
||||
# TODO: Remove this hid.c block when SDL_hidapi.c is supported on Windows!
|
||||
if(HAVE_HIDAPI)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${SDL2_SOURCE_DIR}/src/hidapi/windows/hid.c)
|
||||
endif()
|
||||
|
@ -1430,10 +1518,11 @@ elseif(APPLE)
|
|||
# !!! 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)
|
||||
if(DARWIN OR MACOSX)
|
||||
set(SDL_FRAMEWORK_COCOA 1)
|
||||
set(SDL_FRAMEWORK_CARBON 1)
|
||||
endif()
|
||||
set(SDL_FRAMEWORK_FOUNDATION 1)
|
||||
|
||||
# Requires the darwin file implementation
|
||||
if(SDL_FILE)
|
||||
|
@ -1457,56 +1546,63 @@ elseif(APPLE)
|
|||
set(HAVE_SDL_AUDIO TRUE)
|
||||
set(SDL_FRAMEWORK_COREAUDIO 1)
|
||||
set(SDL_FRAMEWORK_AUDIOTOOLBOX 1)
|
||||
set(SDL_FRAMEWORK_AVFOUNDATION 1)
|
||||
endif()
|
||||
|
||||
if(SDL_JOYSTICK)
|
||||
CheckHIDAPI()
|
||||
if(HAVE_HIDAPI)
|
||||
if(IOS)
|
||||
if(IOS OR TVOS)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${SDL2_SOURCE_DIR}/src/hidapi/ios/hid.m)
|
||||
else()
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${SDL2_SOURCE_DIR}/src/hidapi/mac/hid.c)
|
||||
set(SDL_FRAMEWORK_COREBLUETOOTH 1)
|
||||
endif()
|
||||
endif()
|
||||
set(SDL_JOYSTICK_IOKIT 1)
|
||||
if (IOS)
|
||||
if(IOS OR TVOS)
|
||||
file(GLOB JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/iphoneos/*.m ${SDL2_SOURCE_DIR}/src/joystick/steam/*.c)
|
||||
set(SDL_JOYSTICK_MFI 1)
|
||||
if(IOS)
|
||||
set(SDL_FRAMEWORK_COREMOTION 1)
|
||||
endif()
|
||||
set(SDL_FRAMEWORK_GAMECONTROLLER 1)
|
||||
set(HAVE_SDL_SENSORS 1)
|
||||
else()
|
||||
file(GLOB JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/darwin/*.c)
|
||||
set(SDL_JOYSTICK_IOKIT 1)
|
||||
set(SDL_FRAMEWORK_IOKIT 1)
|
||||
set(SDL_FRAMEWORK_FF 1)
|
||||
endif()
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${JOYSTICK_SOURCES})
|
||||
set(HAVE_SDL_JOYSTICK TRUE)
|
||||
set(SDL_FRAMEWORK_IOKIT 1)
|
||||
set(SDL_FRAMEWORK_FF 1)
|
||||
endif()
|
||||
|
||||
if(SDL_HAPTIC)
|
||||
set(SDL_HAPTIC_IOKIT 1)
|
||||
if (IOS)
|
||||
if (IOS OR TVOS)
|
||||
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)
|
||||
set(SDL_HAPTIC_IOKIT 1)
|
||||
set(SDL_FRAMEWORK_IOKIT 1)
|
||||
set(SDL_FRAMEWORK_FF 1)
|
||||
endif()
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${HAPTIC_SOURCES})
|
||||
set(HAVE_SDL_HAPTIC TRUE)
|
||||
set(SDL_FRAMEWORK_IOKIT 1)
|
||||
set(SDL_FRAMEWORK_FF 1)
|
||||
if(NOT SDL_JOYSTICK)
|
||||
message(FATAL_ERROR "SDL_HAPTIC requires SDL_JOYSTICK to be enabled")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(SDL_POWER)
|
||||
set(SDL_POWER_MACOSX 1)
|
||||
if (IOS)
|
||||
if (IOS OR TVOS)
|
||||
file(GLOB POWER_SOURCES ${SDL2_SOURCE_DIR}/src/power/uikit/*.m)
|
||||
set(SDL_POWER_UIKIT 1)
|
||||
else()
|
||||
file(GLOB POWER_SOURCES ${SDL2_SOURCE_DIR}/src/power/macosx/*.c)
|
||||
set(SDL_POWER_MACOSX 1)
|
||||
set(SDL_FRAMEWORK_IOKIT 1)
|
||||
endif()
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${POWER_SOURCES})
|
||||
set(HAVE_SDL_POWER TRUE)
|
||||
set(SDL_FRAMEWORK_IOKIT 1)
|
||||
endif()
|
||||
|
||||
if(SDL_TIMERS)
|
||||
|
@ -1525,6 +1621,89 @@ elseif(APPLE)
|
|||
set(HAVE_SDL_FILESYSTEM TRUE)
|
||||
endif()
|
||||
|
||||
if(SDL_SENSOR)
|
||||
if(IOS)
|
||||
set(SDL_SENSOR_COREMOTION 1)
|
||||
set(HAVE_SDL_SENSORS TRUE)
|
||||
file(GLOB SENSOR_SOURCES ${SDL2_SOURCE_DIR}/src/sensor/coremotion/*.m)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${SENSOR_SOURCES})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# iOS hack needed - http://code.google.com/p/ios-cmake/ ?
|
||||
if(SDL_VIDEO)
|
||||
if (IOS OR TVOS)
|
||||
set(SDL_VIDEO_DRIVER_UIKIT 1)
|
||||
set(SDL_FRAMEWORK_COREGRAPHICS 1)
|
||||
set(SDL_FRAMEWORK_QUARTZCORE 1)
|
||||
set(SDL_FRAMEWORK_UIKIT 1)
|
||||
set(SDL_IPHONE_KEYBOARD 1)
|
||||
set(SDL_IPHONE_LAUNCHSCREEN 1)
|
||||
file(GLOB UIKITVIDEO_SOURCES ${SDL2_SOURCE_DIR}/src/video/uikit/*.m)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${UIKITVIDEO_SOURCES})
|
||||
else()
|
||||
CheckCOCOA()
|
||||
if(VIDEO_OPENGL)
|
||||
set(SDL_VIDEO_OPENGL 1)
|
||||
set(SDL_VIDEO_OPENGL_CGL 1)
|
||||
set(SDL_VIDEO_RENDER_OGL 1)
|
||||
set(HAVE_VIDEO_OPENGL TRUE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(VIDEO_OPENGLES)
|
||||
if(IOS OR TVOS)
|
||||
set(SDL_FRAMEWORK_OPENGLES 1)
|
||||
set(SDL_VIDEO_OPENGL_ES 1)
|
||||
set(SDL_VIDEO_RENDER_OGL_ES 1)
|
||||
else()
|
||||
set(SDL_VIDEO_OPENGL_EGL 1)
|
||||
endif()
|
||||
set(SDL_VIDEO_OPENGL_ES2 1)
|
||||
set(SDL_VIDEO_RENDER_OGL_ES2 1)
|
||||
set(HAVE_VIDEO_OPENGLES TRUE)
|
||||
endif()
|
||||
|
||||
if(VIDEO_VULKAN OR VIDEO_METAL OR RENDER_METAL)
|
||||
set(ORIG_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
|
||||
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -x objective-c")
|
||||
check_c_source_compiles("
|
||||
#include <AvailabilityMacros.h>
|
||||
#import <Metal/Metal.h>
|
||||
#import <QuartzCore/CAMetalLayer.h>
|
||||
|
||||
#if TARGET_OS_SIMULATOR || (!TARGET_CPU_X86_64 && !TARGET_CPU_ARM64)
|
||||
#error Metal doesn't work on this configuration
|
||||
#endif
|
||||
int main()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
" HAVE_FRAMEWORK_METAL)
|
||||
set(CMAKE_REQUIRED_FLAGS ${ORIG_CMAKE_REQUIRED_FLAGS})
|
||||
if(HAVE_FRAMEWORK_METAL)
|
||||
set(SDL_FRAMEWORK_METAL 1)
|
||||
set(SDL_FRAMEWORK_QUARTZCORE 1)
|
||||
else()
|
||||
set(VIDEO_VULKAN 0)
|
||||
set(VIDEO_METAL 0)
|
||||
set(RENDER_METAL 0)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(VIDEO_METAL)
|
||||
set(SDL_VIDEO_METAL 1)
|
||||
set(HAVE_VIDEO_METAL TRUE)
|
||||
endif()
|
||||
|
||||
if(RENDER_METAL)
|
||||
file(GLOB RENDER_METAL_SOURCES ${SDL2_SOURCE_DIR}/src/render/metal/*.m)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${RENDER_METAL_SOURCES})
|
||||
set(SDL_VIDEO_RENDER_METAL 1)
|
||||
set(HAVE_RENDER_METAL TRUE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Actually load the frameworks at the end so we don't duplicate include.
|
||||
if(SDL_FRAMEWORK_COREVIDEO)
|
||||
find_library(COREVIDEO CoreVideo)
|
||||
|
@ -1554,30 +1733,54 @@ elseif(APPLE)
|
|||
find_library(AUDIOTOOLBOX AudioToolbox)
|
||||
list(APPEND EXTRA_LIBS ${AUDIOTOOLBOX})
|
||||
endif()
|
||||
|
||||
# iOS hack needed - http://code.google.com/p/ios-cmake/ ?
|
||||
if(SDL_VIDEO)
|
||||
if (IOS)
|
||||
set(SDL_VIDEO_DRIVER_UIKIT 1)
|
||||
file(GLOB UIKITVIDEO_SOURCES ${SDL2_SOURCE_DIR}/src/video/uikit/*.m)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${UIKITVIDEO_SOURCES})
|
||||
if(SDL_FRAMEWORK_AVFOUNDATION)
|
||||
find_library(AVFOUNDATION AVFoundation)
|
||||
list(APPEND EXTRA_LIBS ${AVFOUNDATION})
|
||||
endif()
|
||||
if(SDL_FRAMEWORK_COREBLUETOOTH)
|
||||
find_library(COREBLUETOOTH CoreBluetooth)
|
||||
list(APPEND EXTRA_LIBS ${COREBLUETOOTH})
|
||||
endif()
|
||||
if(SDL_FRAMEWORK_COREGRAPHICS)
|
||||
find_library(COREGRAPHICS CoreGraphics)
|
||||
list(APPEND EXTRA_LIBS ${COREGRAPHICS})
|
||||
endif()
|
||||
if(SDL_FRAMEWORK_COREMOTION)
|
||||
find_library(COREMOTION CoreMotion)
|
||||
list(APPEND EXTRA_LIBS ${COREMOTION})
|
||||
endif()
|
||||
if(SDL_FRAMEWORK_FOUNDATION)
|
||||
find_library(FOUNDATION Foundation)
|
||||
list(APPEND EXTRA_LIBS ${FOUNDATION})
|
||||
endif()
|
||||
if(SDL_FRAMEWORK_GAMECONTROLLER)
|
||||
find_library(GAMECONTROLLER GameController)
|
||||
list(APPEND EXTRA_LIBS ${GAMECONTROLLER})
|
||||
endif()
|
||||
if(SDL_FRAMEWORK_METAL)
|
||||
if(IOS OR TVOS)
|
||||
find_library(METAL Metal)
|
||||
list(APPEND EXTRA_LIBS ${METAL})
|
||||
else()
|
||||
CheckCOCOA()
|
||||
if(VIDEO_OPENGL)
|
||||
set(SDL_VIDEO_OPENGL 1)
|
||||
set(SDL_VIDEO_OPENGL_CGL 1)
|
||||
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()
|
||||
list(APPEND EXTRA_LDFLAGS "-Wl,-weak_framework,Metal")
|
||||
endif()
|
||||
endif()
|
||||
if(SDL_FRAMEWORK_OPENGLES)
|
||||
find_library(OPENGLES OpenGLES)
|
||||
list(APPEND EXTRA_LIBS ${OPENGLES})
|
||||
endif()
|
||||
if(SDL_FRAMEWORK_QUARTZCORE)
|
||||
if(IOS OR TVOS)
|
||||
find_library(QUARTZCORE QuartzCore)
|
||||
list(APPEND EXTRA_LIBS ${QUARTZCORE})
|
||||
else()
|
||||
list(APPEND EXTRA_LDFLAGS "-Wl,-weak_framework,QuartzCore")
|
||||
endif()
|
||||
endif()
|
||||
if(SDL_FRAMEWORK_UIKIT)
|
||||
find_library(UIKIT UIKit)
|
||||
list(APPEND EXTRA_LIBS ${UIKIT})
|
||||
endif()
|
||||
|
||||
CheckPTHREAD()
|
||||
|
||||
|
@ -1611,6 +1814,24 @@ elseif(HAIKU)
|
|||
endif()
|
||||
|
||||
CheckPTHREAD()
|
||||
|
||||
elseif(RISCOS)
|
||||
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)
|
||||
|
||||
if(CLOCK_GETTIME)
|
||||
set(HAVE_CLOCK_GETTIME 1)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
CheckPTHREAD()
|
||||
|
||||
if(SDL_AUDIO)
|
||||
CheckOSS()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(VIDEO_VULKAN)
|
||||
|
@ -1784,15 +2005,37 @@ if(UNIX)
|
|||
message(STATUS "")
|
||||
endif()
|
||||
|
||||
if(WARN_ABOUT_ARM_SIMD_ASM_MIT)
|
||||
message(STATUS "")
|
||||
message(STATUS "SDL is being built with ARM SIMD optimizations, which")
|
||||
message(STATUS "uses code licensed under the MIT license. If this is a")
|
||||
message(STATUS "problem, please disable that code by rerunning CMake with:")
|
||||
message(STATUS "")
|
||||
message(STATUS " -DARMSIMD=OFF")
|
||||
endif()
|
||||
|
||||
if(WARN_ABOUT_ARM_NEON_ASM_MIT)
|
||||
message(STATUS "")
|
||||
message(STATUS "SDL is being built with ARM NEON optimizations, which")
|
||||
message(STATUS "uses code licensed under the MIT license. If this is a")
|
||||
message(STATUS "problem, please disable that code by rerunning CMake with:")
|
||||
message(STATUS "")
|
||||
message(STATUS " -DARMNEON=OFF")
|
||||
endif()
|
||||
|
||||
# Ensure that the extra cflags are used at compile time
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
|
||||
|
||||
# Always build SDLmain
|
||||
add_library(SDL2main STATIC ${SDLMAIN_SOURCES})
|
||||
target_include_directories(SDL2main PUBLIC "$<BUILD_INTERFACE:${SDL2_SOURCE_DIR}/include>" $<INSTALL_INTERFACE:include/SDL2>)
|
||||
target_include_directories(SDL2main PUBLIC "$<BUILD_INTERFACE:${SDL2_SOURCE_DIR}/include>" $<INSTALL_INTERFACE:include> $<INSTALL_INTERFACE:include/SDL2>)
|
||||
set(_INSTALL_LIBS "SDL2main")
|
||||
if (NOT ANDROID)
|
||||
set_target_properties(SDL2main PROPERTIES DEBUG_POSTFIX ${SDL_CMAKE_DEBUG_POSTFIX})
|
||||
set_target_properties(SDL2main PROPERTIES DEBUG_POSTFIX "${SDL_CMAKE_DEBUG_POSTFIX}")
|
||||
endif()
|
||||
|
||||
if (ANDROID AND HAVE_HIDAPI)
|
||||
set(_INSTALL_LIBS ${_INSTALL_LIBS} "hidapi")
|
||||
endif()
|
||||
|
||||
if(SDL_SHARED)
|
||||
|
@ -1820,9 +2063,13 @@ if(SDL_SHARED)
|
|||
endif()
|
||||
set(_INSTALL_LIBS "SDL2" ${_INSTALL_LIBS})
|
||||
target_link_libraries(SDL2 ${EXTRA_LIBS} ${EXTRA_LDFLAGS})
|
||||
target_include_directories(SDL2 PUBLIC "$<BUILD_INTERFACE:${SDL2_SOURCE_DIR}/include>" $<INSTALL_INTERFACE:include/SDL2>)
|
||||
target_include_directories(SDL2 PUBLIC "$<BUILD_INTERFACE:${SDL2_SOURCE_DIR}/include>" $<INSTALL_INTERFACE:include> $<INSTALL_INTERFACE:include/SDL2>)
|
||||
if (NOT ANDROID)
|
||||
set_target_properties(SDL2 PROPERTIES DEBUG_POSTFIX ${SDL_CMAKE_DEBUG_POSTFIX})
|
||||
set_target_properties(SDL2 PROPERTIES DEBUG_POSTFIX "${SDL_CMAKE_DEBUG_POSTFIX}")
|
||||
endif()
|
||||
if(IOS OR TVOS)
|
||||
set_property(TARGET SDL2 APPEND_STRING PROPERTY COMPILE_FLAGS "-fobjc-arc")
|
||||
target_compile_definitions(SDL2 PRIVATE IOS_DYLIB=1)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
@ -1837,7 +2084,9 @@ if(ANDROID)
|
|||
set_target_properties(hidapi PROPERTIES LINK_FLAGS_DEBUG "/NODEFAULTLIB")
|
||||
set_target_properties(hidapi PROPERTIES STATIC_LIBRARY_FLAGS "/NODEFAULTLIB")
|
||||
endif()
|
||||
target_link_libraries(hidapi log)
|
||||
if(HAVE_HIDAPI)
|
||||
target_link_libraries(hidapi log)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(SDL_STATIC)
|
||||
|
@ -1860,9 +2109,12 @@ 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 "$<BUILD_INTERFACE:${SDL2_SOURCE_DIR}/include>" $<INSTALL_INTERFACE:include/SDL2>)
|
||||
target_include_directories(SDL2-static PUBLIC "$<BUILD_INTERFACE:${SDL2_SOURCE_DIR}/include>" $<INSTALL_INTERFACE:include> $<INSTALL_INTERFACE:include/SDL2>)
|
||||
if (NOT ANDROID)
|
||||
set_target_properties(SDL2-static PROPERTIES DEBUG_POSTFIX ${SDL_CMAKE_DEBUG_POSTFIX})
|
||||
set_target_properties(SDL2-static PROPERTIES DEBUG_POSTFIX "${SDL_CMAKE_DEBUG_POSTFIX}")
|
||||
endif()
|
||||
if(IOS OR TVOS)
|
||||
set_property(TARGET SDL2-static APPEND_STRING PROPERTY COMPILE_FLAGS "-fobjc-arc")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
@ -1885,7 +2137,7 @@ install(TARGETS ${_INSTALL_LIBS} EXPORT SDL2Targets
|
|||
if (WINDOWS)
|
||||
set(PKG_PREFIX "cmake")
|
||||
else ()
|
||||
set(PKG_PREFIX "lib/cmake/SDL2")
|
||||
set(PKG_PREFIX "lib${LIB_SUFFIX}/cmake/SDL2")
|
||||
endif ()
|
||||
|
||||
include(CMakePackageConfigHelpers)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 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
|
||||
|
|
|
@ -46,7 +46,7 @@ WAYLAND_SCANNER = @WAYLAND_SCANNER@
|
|||
|
||||
INSTALL_SDL2_CONFIG = @INSTALL_SDL2_CONFIG@
|
||||
|
||||
SRC_DIST = *.txt acinclude Android.mk autogen.sh android-project build-scripts cmake cmake_uninstall.cmake.in configure configure.ac 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 wayland-protocols
|
||||
SRC_DIST = *.txt acinclude Android.mk autogen.sh android-project build-scripts cmake cmake_uninstall.cmake.in configure configure.ac debian docs include Makefile.* sdl2-config.cmake.in sdl2-config-version.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 wayland-protocols
|
||||
GEN_DIST = SDL2.spec
|
||||
|
||||
ifneq ($V,1)
|
||||
|
@ -84,6 +84,7 @@ HDRS = \
|
|||
SDL_log.h \
|
||||
SDL_main.h \
|
||||
SDL_messagebox.h \
|
||||
SDL_metal.h \
|
||||
SDL_mouse.h \
|
||||
SDL_mutex.h \
|
||||
SDL_name.h \
|
||||
|
@ -187,6 +188,7 @@ install-data:
|
|||
ifeq ($(INSTALL_SDL2_CONFIG),TRUE)
|
||||
$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)/cmake/SDL2
|
||||
$(INSTALL) -m 644 sdl2-config.cmake $(DESTDIR)$(libdir)/cmake/SDL2
|
||||
$(INSTALL) -m 644 sdl2-config-version.cmake $(DESTDIR)$(libdir)/cmake/SDL2
|
||||
endif
|
||||
|
||||
uninstall: uninstall-bin uninstall-hdrs uninstall-lib uninstall-data
|
||||
|
@ -207,6 +209,7 @@ uninstall-data:
|
|||
rm -f $(DESTDIR)$(datadir)/aclocal/sdl2.m4
|
||||
rm -f $(DESTDIR)$(libdir)/pkgconfig/sdl2.pc
|
||||
rm -f $(DESTDIR)$(libdir)/cmake/SDL2/sdl2-config.cmake
|
||||
rm -f $(DESTDIR)$(libdir)/cmake/SDL2/sdl2-config-version.cmake
|
||||
|
||||
clean:
|
||||
rm -rf $(objects)
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# Open Watcom makefile to build SDL2.dll for OS/2:
|
||||
# Open Watcom makefile to build SDL2.dll for OS/2
|
||||
# wmake -f Makefile.os2
|
||||
|
||||
LIBNAME = SDL2
|
||||
VERSION = 2.0.10
|
||||
VERSION = 2.0.12
|
||||
DESCRIPTION = Simple DirectMedia Layer 2
|
||||
|
||||
LIBHOME = .
|
||||
|
@ -33,7 +33,7 @@ MSRCS= e_atan2.c e_exp.c e_fmod.c e_log10.c e_log.c e_pow.c e_rem_pio2.c e_sqrt.
|
|||
s_atan.c s_copysign.c s_cos.c s_fabs.c s_floor.c s_scalbn.c s_sin.c s_tan.c
|
||||
|
||||
SRCS = SDL.c SDL_assert.c SDL_error.c SDL_log.c SDL_dataqueue.c SDL_hints.c
|
||||
SRCS+= SDL_getenv.c SDL_iconv.c SDL_malloc.c SDL_qsort.c SDL_stdlib.c SDL_string.c
|
||||
SRCS+= SDL_getenv.c SDL_iconv.c SDL_malloc.c SDL_qsort.c SDL_stdlib.c SDL_string.c SDL_strtokr.c
|
||||
SRCS+= SDL_cpuinfo.c SDL_atomic.c SDL_spinlock.c SDL_thread.c SDL_timer.c
|
||||
SRCS+= SDL_rwops.c SDL_power.c
|
||||
SRCS+= SDL_audio.c SDL_audiocvt.c SDL_audiodev.c SDL_audiotypecvt.c SDL_mixer.c SDL_wave.c
|
||||
|
@ -89,6 +89,9 @@ SDL_cpuinfo.obj: SDL_cpuinfo.c
|
|||
SDL_rwops.obj: SDL_rwops.c
|
||||
wcc386 $(CFLAGS) -wcd=136 -fo=$^@ $<
|
||||
|
||||
SDL_wave.obj: SDL_wave.c
|
||||
wcc386 $(CFLAGS) -wcd=124 -fo=$^@ $<
|
||||
|
||||
SDL_blendfillrect.obj: SDL_blendfillrect.c
|
||||
wcc386 $(CFLAGS) -wcd=200 -fo=$^@ $<
|
||||
|
||||
|
|
|
@ -50,6 +50,7 @@ OBJS= src/SDL.o \
|
|||
src/stdlib/SDL_qsort.o \
|
||||
src/stdlib/SDL_stdlib.o \
|
||||
src/stdlib/SDL_string.o \
|
||||
src/stdlib/SDL_strtokr.o \
|
||||
src/thread/SDL_thread.o \
|
||||
src/thread/generic/SDL_systls.o \
|
||||
src/thread/psp/SDL_syssem.o \
|
||||
|
@ -78,7 +79,7 @@ OBJS= src/SDL.o \
|
|||
src/video/psp/SDL_pspevents.o \
|
||||
src/video/psp/SDL_pspvideo.o \
|
||||
src/video/psp/SDL_pspgl.o \
|
||||
src/video/psp/SDL_pspmouse.o \
|
||||
src/video/psp/SDL_pspmouse.o
|
||||
|
||||
INCDIR = ./include
|
||||
CFLAGS = -g -O2 -G0 -Wall -D__PSP__ -DHAVE_OPENGL
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
Summary: Simple DirectMedia Layer
|
||||
Name: SDL2
|
||||
Version: 2.0.10
|
||||
Version: 2.0.12
|
||||
Release: 2
|
||||
Source: http://www.libsdl.org/release/%{name}-%{version}.tar.gz
|
||||
URL: http://www.libsdl.org/
|
||||
|
|
|
@ -285,6 +285,7 @@
|
|||
<ClCompile Include="..\..\src\stdlib\SDL_qsort.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_stdlib.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_string.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_strtokr.c" />
|
||||
<ClCompile Include="..\..\src\thread\generic\SDL_syssem.c" />
|
||||
<ClCompile Include="..\..\src\thread\SDL_thread.c" />
|
||||
<ClCompile Include="..\..\src\thread\stdcpp\SDL_syscond.cpp" />
|
||||
|
|
|
@ -626,6 +626,9 @@
|
|||
<ClCompile Include="..\..\src\stdlib\SDL_string.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_strtokr.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\thread\generic\SDL_syssem.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
|
|
|
@ -251,6 +251,7 @@
|
|||
<ClCompile Include="..\..\src\stdlib\SDL_qsort.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_stdlib.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_string.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_strtokr.c" />
|
||||
<ClCompile Include="..\..\src\thread\generic\SDL_syscond.c" />
|
||||
<ClCompile Include="..\..\src\thread\SDL_thread.c" />
|
||||
<ClCompile Include="..\..\src\thread\windows\SDL_sysmutex.c" />
|
||||
|
|
|
@ -593,6 +593,9 @@
|
|||
<ClCompile Include="..\..\src\stdlib\SDL_string.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_strtokr.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\thread\SDL_thread.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
|
|
|
@ -283,6 +283,7 @@
|
|||
<ClCompile Include="..\..\src\stdlib\SDL_qsort.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_stdlib.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_string.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_strtokr.c" />
|
||||
<ClCompile Include="..\..\src\thread\generic\SDL_syscond.c" />
|
||||
<ClCompile Include="..\..\src\thread\SDL_thread.c" />
|
||||
<ClCompile Include="..\..\src\thread\windows\SDL_sysmutex.c" />
|
||||
|
|
|
@ -611,6 +611,9 @@
|
|||
<ClCompile Include="..\..\src\stdlib\SDL_string.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_strtokr.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\thread\SDL_thread.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
|
|
|
@ -130,7 +130,6 @@
|
|||
<PreprocessorDefinitions>_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
<OmitDefaultLibName>true</OmitDefaultLibName>
|
||||
|
@ -196,7 +195,6 @@
|
|||
<PreprocessorDefinitions>NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<OmitDefaultLibName>true</OmitDefaultLibName>
|
||||
|
@ -320,7 +318,7 @@
|
|||
<ClInclude Include="..\..\src\haptic\windows\SDL_dinputhaptic_c.h" />
|
||||
<ClInclude Include="..\..\src\haptic\windows\SDL_windowshaptic_c.h" />
|
||||
<ClInclude Include="..\..\src\haptic\windows\SDL_xinputhaptic_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\hidapi\controller_type.h" />
|
||||
<ClInclude Include="..\..\src\joystick\controller_type.h" />
|
||||
<ClInclude Include="..\..\src\joystick\hidapi\SDL_hidapijoystick_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\SDL_joystick_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\SDL_sysjoystick.h" />
|
||||
|
@ -421,9 +419,12 @@
|
|||
<ClCompile Include="..\..\src\haptic\windows\SDL_xinputhaptic.c" />
|
||||
<ClCompile Include="..\..\src\hidapi\windows\hid.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapijoystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_gamecube.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_ps4.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_rumble.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_switch.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xbox360.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xbox360w.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xboxone.c" />
|
||||
<ClCompile Include="..\..\src\joystick\SDL_gamecontroller.c" />
|
||||
<ClCompile Include="..\..\src\joystick\SDL_joystick.c" />
|
||||
|
@ -486,6 +487,7 @@
|
|||
<ClCompile Include="..\..\src\stdlib\SDL_qsort.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_stdlib.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_string.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_strtokr.c" />
|
||||
<ClCompile Include="..\..\src\thread\generic\SDL_syscond.c" />
|
||||
<ClCompile Include="..\..\src\thread\SDL_thread.c" />
|
||||
<ClCompile Include="..\..\src\thread\windows\SDL_sysmutex.c" />
|
||||
|
|
|
@ -259,7 +259,7 @@
|
|||
<ClInclude Include="..\..\src\haptic\windows\SDL_dinputhaptic_c.h" />
|
||||
<ClInclude Include="..\..\src\haptic\windows\SDL_windowshaptic_c.h" />
|
||||
<ClInclude Include="..\..\src\haptic\windows\SDL_xinputhaptic_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\hidapi\controller_type.h" />
|
||||
<ClInclude Include="..\..\src\joystick\controller_type.h" />
|
||||
<ClInclude Include="..\..\src\joystick\hidapi\SDL_hidapijoystick_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\SDL_joystick_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\SDL_sysjoystick.h" />
|
||||
|
@ -360,9 +360,12 @@
|
|||
<ClCompile Include="..\..\src\haptic\windows\SDL_windowshaptic.c" />
|
||||
<ClCompile Include="..\..\src\haptic\windows\SDL_xinputhaptic.c" />
|
||||
<ClCompile Include="..\..\src\hidapi\windows\hid.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_gamecube.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_ps4.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_rumble.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_switch.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xbox360.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xbox360w.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xboxone.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapijoystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\SDL_gamecontroller.c" />
|
||||
|
@ -426,6 +429,7 @@
|
|||
<ClCompile Include="..\..\src\stdlib\SDL_qsort.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_stdlib.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_string.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_strtokr.c" />
|
||||
<ClCompile Include="..\..\src\thread\generic\SDL_syscond.c" />
|
||||
<ClCompile Include="..\..\src\thread\SDL_thread.c" />
|
||||
<ClCompile Include="..\..\src\thread\windows\SDL_sysmutex.c" />
|
||||
|
|
|
@ -108,7 +108,6 @@
|
|||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
<OmitDefaultLibName>true</OmitDefaultLibName>
|
||||
|
@ -143,7 +142,6 @@
|
|||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
<OmitDefaultLibName>true</OmitDefaultLibName>
|
||||
|
|
|
@ -108,7 +108,6 @@
|
|||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
<OmitDefaultLibName>true</OmitDefaultLibName>
|
||||
|
@ -143,7 +142,6 @@
|
|||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
<OmitDefaultLibName>true</OmitDefaultLibName>
|
||||
|
|
|
@ -1,6 +1,69 @@
|
|||
|
||||
This is a list of major changes in SDL's version history.
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
2.0.12:
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
General:
|
||||
* Added SDL_GetTextureScaleMode() and SDL_SetTextureScaleMode() to get and set the scaling mode used for a texture
|
||||
* Added SDL_LockTextureToSurface(), similar to SDL_LockTexture() but the locked area is exposed as a SDL surface.
|
||||
* Added new blend mode, SDL_BLENDMODE_MUL, which does a modulate and blend operation
|
||||
* Added the hint SDL_HINT_DISPLAY_USABLE_BOUNDS to override the results of SDL_GetDisplayUsableBounds() for display index 0.
|
||||
* Added the window underneath the finger to the SDL_TouchFingerEvent
|
||||
* Added SDL_GameControllerTypeForIndex(), SDL_GameControllerGetType() to return the type of a game controller (Xbox 360, Xbox One, PS3, PS4, or Nintendo Switch Pro)
|
||||
* Added the hint SDL_HINT_GAMECONTROLLERTYPE to override the automatic game controller type detection
|
||||
* Added SDL_JoystickFromPlayerIndex() and SDL_GameControllerFromPlayerIndex() to get the device associated with a player index
|
||||
* Added SDL_JoystickSetPlayerIndex() and SDL_GameControllerSetPlayerIndex() to set the player index associated with a device
|
||||
* Added the hint SDL_HINT_GAMECONTROLLER_USE_BUTTON_LABELS to specify whether Nintendo Switch Pro controllers should use the buttons as labeled or swapped to match positional layout. The default is to use the buttons as labeled.
|
||||
* Added support for Nintendo GameCube controllers to the HIDAPI driver, and a hint SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE to control whether this is used.
|
||||
* Improved support for Xbox 360 and Xbox One controllers when using the HIDAPI driver
|
||||
* Added support for many game controllers, including:
|
||||
* 8BitDo FC30 Pro
|
||||
* 8BitDo M30 GamePad
|
||||
* BDA PS4 Fightpad
|
||||
* HORI Fighting Commander
|
||||
* Hyperkin Duke
|
||||
* Hyperkin X91
|
||||
* MOGA XP5-A Plus
|
||||
* NACON GC-400ES
|
||||
* NVIDIA Controller v01.04
|
||||
* PDP Versus Fighting Pad
|
||||
* Razer Raion Fightpad for PS4
|
||||
* Razer Serval
|
||||
* Stadia Controller
|
||||
* SteelSeries Stratus Duo
|
||||
* Victrix Pro Fight Stick for PS4
|
||||
* Xbox One Elite Series 2
|
||||
* Fixed blocking game controller rumble calls when using the HIDAPI driver
|
||||
* Added SDL_zeroa() macro to zero an array of elements
|
||||
* Added SDL_HasARMSIMD() which returns true if the CPU has ARM SIMD (ARMv6+) features
|
||||
|
||||
Windows:
|
||||
* Fixed crash when using the release SDL DLL with applications built with gcc
|
||||
* Fixed performance regression in event handling introduced in 2.0.10
|
||||
* Added support for SDL_SetThreadPriority() for UWP applications
|
||||
|
||||
Linux:
|
||||
* Added the hint SDL_HINT_VIDEO_X11_WINDOW_VISUALID to specify the visual chosen for new X11 windows
|
||||
* Added the hint SDL_HINT_VIDEO_X11_FORCE_EGL to specify whether X11 should use GLX or EGL by default
|
||||
|
||||
iOS / tvOS / macOS:
|
||||
* Added SDL_Metal_CreateView() and SDL_Metal_DestroyView() to create CAMetalLayer-backed NSView/UIView and attach it to the specified window.
|
||||
|
||||
iOS/ tvOS:
|
||||
* Added support for Bluetooth Steam Controllers as game controllers
|
||||
|
||||
tvOS:
|
||||
* Fixed support for surround sound on Apple TV
|
||||
|
||||
Android:
|
||||
* Added SDL_GetAndroidSDKVersion() to return the API level of the current device
|
||||
* Added support for audio capture using OpenSL-ES
|
||||
* Added support for Bluetooth Steam Controllers as game controllers
|
||||
* Fixed rare crashes when the app goes into the background or terminates
|
||||
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
2.0.10:
|
||||
---------------------------------------------------------------------------
|
||||
|
|
|
@ -355,14 +355,37 @@
|
|||
56ED04E1118A8EE200A56AA6 /* SDL_power.c in Sources */ = {isa = PBXBuildFile; fileRef = 56ED04E0118A8EE200A56AA6 /* SDL_power.c */; };
|
||||
56ED04E3118A8EFD00A56AA6 /* SDL_syspower.m in Sources */ = {isa = PBXBuildFile; fileRef = 56ED04E2118A8EFD00A56AA6 /* SDL_syspower.m */; };
|
||||
56F9D5601DF73BA400C15B5D /* SDL_dataqueue.c in Sources */ = {isa = PBXBuildFile; fileRef = 566726431DF72CF5001DD3DB /* SDL_dataqueue.c */; };
|
||||
63CC93C723849391002A5C54 /* SDL_strtokr.c in Sources */ = {isa = PBXBuildFile; fileRef = 63CC93C623849391002A5C54 /* SDL_strtokr.c */; };
|
||||
63CC93C823849391002A5C54 /* SDL_strtokr.c in Sources */ = {isa = PBXBuildFile; fileRef = 63CC93C623849391002A5C54 /* SDL_strtokr.c */; };
|
||||
63CC93C923849391002A5C54 /* SDL_strtokr.c in Sources */ = {isa = PBXBuildFile; fileRef = 63CC93C623849391002A5C54 /* SDL_strtokr.c */; };
|
||||
63CC93CA23849391002A5C54 /* SDL_strtokr.c in Sources */ = {isa = PBXBuildFile; fileRef = 63CC93C623849391002A5C54 /* SDL_strtokr.c */; };
|
||||
93CB792313FC5E5200BD3E05 /* SDL_uikitviewcontroller.h in Headers */ = {isa = PBXBuildFile; fileRef = 93CB792213FC5E5200BD3E05 /* SDL_uikitviewcontroller.h */; };
|
||||
93CB792613FC5F5300BD3E05 /* SDL_uikitviewcontroller.m in Sources */ = {isa = PBXBuildFile; fileRef = 93CB792513FC5F5300BD3E05 /* SDL_uikitviewcontroller.m */; };
|
||||
A704172E20F7E74800A82227 /* controller_type.h in Headers */ = {isa = PBXBuildFile; fileRef = A704172D20F7E74800A82227 /* controller_type.h */; };
|
||||
A704172F20F7E76000A82227 /* SDL_gamecontroller.c in Sources */ = {isa = PBXBuildFile; fileRef = AA0AD06116647BBB00CE5896 /* SDL_gamecontroller.c */; };
|
||||
A704173120F7F39900A82227 /* SDL_hidapi_steam.c in Sources */ = {isa = PBXBuildFile; fileRef = A704173020F7F39400A82227 /* SDL_hidapi_steam.c */; };
|
||||
A704173220F7F39900A82227 /* SDL_hidapi_steam.c in Sources */ = {isa = PBXBuildFile; fileRef = A704173020F7F39400A82227 /* SDL_hidapi_steam.c */; };
|
||||
A75FDAB723E288E400529352 /* SDL_hidapi_steam.c in Sources */ = {isa = PBXBuildFile; fileRef = A704173020F7F39400A82227 /* SDL_hidapi_steam.c */; };
|
||||
A75FDAB823E2890000529352 /* SDL_hidapi_steam.c in Sources */ = {isa = PBXBuildFile; fileRef = A704173020F7F39400A82227 /* SDL_hidapi_steam.c */; };
|
||||
A75FDBD923EA38AD00529352 /* SDL_hidapi_rumble.c in Sources */ = {isa = PBXBuildFile; fileRef = A75FDBD723EA38AD00529352 /* SDL_hidapi_rumble.c */; };
|
||||
A75FDBDA23EA38AD00529352 /* SDL_hidapi_rumble.c in Sources */ = {isa = PBXBuildFile; fileRef = A75FDBD723EA38AD00529352 /* SDL_hidapi_rumble.c */; };
|
||||
A75FDBDB23EA38AD00529352 /* SDL_hidapi_rumble.c in Sources */ = {isa = PBXBuildFile; fileRef = A75FDBD723EA38AD00529352 /* SDL_hidapi_rumble.c */; };
|
||||
A75FDBDC23EA38AD00529352 /* SDL_hidapi_rumble.c in Sources */ = {isa = PBXBuildFile; fileRef = A75FDBD723EA38AD00529352 /* SDL_hidapi_rumble.c */; };
|
||||
A75FDBDD23EA38AD00529352 /* SDL_hidapi_rumble.h in Headers */ = {isa = PBXBuildFile; fileRef = A75FDBD823EA38AD00529352 /* SDL_hidapi_rumble.h */; };
|
||||
A75FDBDE23EA38AD00529352 /* SDL_hidapi_rumble.h in Headers */ = {isa = PBXBuildFile; fileRef = A75FDBD823EA38AD00529352 /* SDL_hidapi_rumble.h */; };
|
||||
A75FDBDF23EA38AD00529352 /* SDL_hidapi_rumble.h in Headers */ = {isa = PBXBuildFile; fileRef = A75FDBD823EA38AD00529352 /* SDL_hidapi_rumble.h */; };
|
||||
A7C19D29212E552C00DF2152 /* SDL_displayevents_c.h in Headers */ = {isa = PBXBuildFile; fileRef = A7C19D27212E552B00DF2152 /* SDL_displayevents_c.h */; };
|
||||
A7C19D2A212E552C00DF2152 /* SDL_displayevents.c in Sources */ = {isa = PBXBuildFile; fileRef = A7C19D28212E552B00DF2152 /* SDL_displayevents.c */; };
|
||||
A7C19D2B212E552C00DF2152 /* SDL_displayevents.c in Sources */ = {isa = PBXBuildFile; fileRef = A7C19D28212E552B00DF2152 /* SDL_displayevents.c */; };
|
||||
A7F629241FE06523002F9CC9 /* SDL_uikitmetalview.m in Sources */ = {isa = PBXBuildFile; fileRef = 4D7516F81EE1C28A00820EEA /* SDL_uikitmetalview.m */; };
|
||||
A7FF6B6223AC3BC6005876C6 /* SDL_hidapi_gamecube.c in Sources */ = {isa = PBXBuildFile; fileRef = A7FF6B6123AC3BC6005876C6 /* SDL_hidapi_gamecube.c */; };
|
||||
A7FF6B6323AC3BC6005876C6 /* SDL_hidapi_gamecube.c in Sources */ = {isa = PBXBuildFile; fileRef = A7FF6B6123AC3BC6005876C6 /* SDL_hidapi_gamecube.c */; };
|
||||
A7FF6B6423AC3BC6005876C6 /* SDL_hidapi_gamecube.c in Sources */ = {isa = PBXBuildFile; fileRef = A7FF6B6123AC3BC6005876C6 /* SDL_hidapi_gamecube.c */; };
|
||||
A7FF6B6523AC3BC6005876C6 /* SDL_hidapi_gamecube.c in Sources */ = {isa = PBXBuildFile; fileRef = A7FF6B6123AC3BC6005876C6 /* SDL_hidapi_gamecube.c */; };
|
||||
A7FF6B6723AC3BCD005876C6 /* SDL_hidapi_xbox360w.c in Sources */ = {isa = PBXBuildFile; fileRef = A7FF6B6623AC3BCD005876C6 /* SDL_hidapi_xbox360w.c */; };
|
||||
A7FF6B6823AC3BCD005876C6 /* SDL_hidapi_xbox360w.c in Sources */ = {isa = PBXBuildFile; fileRef = A7FF6B6623AC3BCD005876C6 /* SDL_hidapi_xbox360w.c */; };
|
||||
A7FF6B6923AC3BCD005876C6 /* SDL_hidapi_xbox360w.c in Sources */ = {isa = PBXBuildFile; fileRef = A7FF6B6623AC3BCD005876C6 /* SDL_hidapi_xbox360w.c */; };
|
||||
A7FF6B6A23AC3BCD005876C6 /* SDL_hidapi_xbox360w.c in Sources */ = {isa = PBXBuildFile; fileRef = A7FF6B6623AC3BCD005876C6 /* SDL_hidapi_xbox360w.c */; };
|
||||
AA0AD06216647BBB00CE5896 /* SDL_gamecontroller.c in Sources */ = {isa = PBXBuildFile; fileRef = AA0AD06116647BBB00CE5896 /* SDL_gamecontroller.c */; };
|
||||
AA0AD06516647BD400CE5896 /* SDL_gamecontroller.h in Headers */ = {isa = PBXBuildFile; fileRef = AA0AD06416647BD400CE5896 /* SDL_gamecontroller.h */; };
|
||||
AA0F8495178D5F1A00823F9D /* SDL_systls.c in Sources */ = {isa = PBXBuildFile; fileRef = AA0F8494178D5F1A00823F9D /* SDL_systls.c */; };
|
||||
|
@ -717,6 +740,7 @@
|
|||
F3E3C75B224138AE007D243C /* SDL_uikit_main.c in Sources */ = {isa = PBXBuildFile; fileRef = F3E3C657224069CE007D243C /* SDL_uikit_main.c */; };
|
||||
FA1DC2721C62BE65008F99A0 /* SDL_uikitclipboard.h in Headers */ = {isa = PBXBuildFile; fileRef = FA1DC2701C62BE65008F99A0 /* SDL_uikitclipboard.h */; };
|
||||
FA1DC2731C62BE65008F99A0 /* SDL_uikitclipboard.m in Sources */ = {isa = PBXBuildFile; fileRef = FA1DC2711C62BE65008F99A0 /* SDL_uikitclipboard.m */; };
|
||||
FA24348D21D4201400B8918A /* SDL_metal.h in Headers */ = {isa = PBXBuildFile; fileRef = FA24348C21D4201400B8918A /* SDL_metal.h */; };
|
||||
FAB5981D1BB5C31500BE72C5 /* SDL_atomic.c in Sources */ = {isa = PBXBuildFile; fileRef = 04FFAB8912E23B8D00BA343D /* SDL_atomic.c */; };
|
||||
FAB5981E1BB5C31500BE72C5 /* SDL_spinlock.c in Sources */ = {isa = PBXBuildFile; fileRef = 04FFAB8A12E23B8D00BA343D /* SDL_spinlock.c */; };
|
||||
FAB5981F1BB5C31500BE72C5 /* SDL_coreaudio.m in Sources */ = {isa = PBXBuildFile; fileRef = 56EA86F913E9EC2B002E47EB /* SDL_coreaudio.m */; };
|
||||
|
@ -962,11 +986,17 @@
|
|||
56EA86FA13E9EC2B002E47EB /* SDL_coreaudio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_coreaudio.h; sourceTree = "<group>"; };
|
||||
56ED04E0118A8EE200A56AA6 /* SDL_power.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_power.c; sourceTree = "<group>"; };
|
||||
56ED04E2118A8EFD00A56AA6 /* SDL_syspower.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDL_syspower.m; sourceTree = "<group>"; };
|
||||
63CC93C623849391002A5C54 /* SDL_strtokr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_strtokr.c; sourceTree = "<group>"; };
|
||||
93CB792213FC5E5200BD3E05 /* SDL_uikitviewcontroller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_uikitviewcontroller.h; sourceTree = "<group>"; };
|
||||
93CB792513FC5F5300BD3E05 /* SDL_uikitviewcontroller.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDL_uikitviewcontroller.m; sourceTree = "<group>"; };
|
||||
A704172D20F7E74800A82227 /* controller_type.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = controller_type.h; sourceTree = "<group>"; };
|
||||
A704173020F7F39400A82227 /* SDL_hidapi_steam.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_hidapi_steam.c; sourceTree = "<group>"; };
|
||||
A75FDBD723EA38AD00529352 /* SDL_hidapi_rumble.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_hidapi_rumble.c; sourceTree = "<group>"; };
|
||||
A75FDBD823EA38AD00529352 /* SDL_hidapi_rumble.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_hidapi_rumble.h; sourceTree = "<group>"; };
|
||||
A7C19D27212E552B00DF2152 /* SDL_displayevents_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_displayevents_c.h; sourceTree = "<group>"; };
|
||||
A7C19D28212E552B00DF2152 /* SDL_displayevents.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_displayevents.c; sourceTree = "<group>"; };
|
||||
A7FF6B6123AC3BC6005876C6 /* SDL_hidapi_gamecube.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_hidapi_gamecube.c; sourceTree = "<group>"; };
|
||||
A7FF6B6623AC3BCD005876C6 /* SDL_hidapi_xbox360w.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_hidapi_xbox360w.c; sourceTree = "<group>"; };
|
||||
AA0AD06116647BBB00CE5896 /* SDL_gamecontroller.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_gamecontroller.c; sourceTree = "<group>"; };
|
||||
AA0AD06416647BD400CE5896 /* SDL_gamecontroller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_gamecontroller.h; sourceTree = "<group>"; };
|
||||
AA0F8494178D5F1A00823F9D /* SDL_systls.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_systls.c; sourceTree = "<group>"; };
|
||||
|
@ -1064,6 +1094,8 @@
|
|||
F3E3C75F224138AE007D243C /* libSDLmain.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libSDLmain.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
FA1DC2701C62BE65008F99A0 /* SDL_uikitclipboard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_uikitclipboard.h; sourceTree = "<group>"; };
|
||||
FA1DC2711C62BE65008F99A0 /* SDL_uikitclipboard.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDL_uikitclipboard.m; sourceTree = "<group>"; };
|
||||
FA20874D2307894C0029758C /* SDL_shaders_metal_tvos.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDL_shaders_metal_tvos.h; sourceTree = "<group>"; };
|
||||
FA24348C21D4201400B8918A /* SDL_metal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_metal.h; sourceTree = "<group>"; };
|
||||
FAB598141BB5C1B100BE72C5 /* libSDL2.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libSDL2.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
FAD4F7011BA3C4E8008346CE /* SDL_sysjoystick_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_sysjoystick_c.h; sourceTree = "<group>"; };
|
||||
FD0BBFEF0E3933DD00D833B1 /* SDL_uikitview.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_uikitview.h; sourceTree = "<group>"; };
|
||||
|
@ -1405,6 +1437,7 @@
|
|||
children = (
|
||||
AADC5A621FDA10C800960936 /* SDL_render_metal.m */,
|
||||
AADC5A611FDA10C800960936 /* SDL_shaders_metal_ios.h */,
|
||||
FA20874D2307894C0029758C /* SDL_shaders_metal_tvos.h */,
|
||||
);
|
||||
path = metal;
|
||||
sourceTree = "<group>";
|
||||
|
@ -1458,9 +1491,14 @@
|
|||
F3BDD78A20F51C8D004ECBF3 /* hidapi */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
A7FF6B6123AC3BC6005876C6 /* SDL_hidapi_gamecube.c */,
|
||||
F3BDD78E20F51CB8004ECBF3 /* SDL_hidapi_ps4.c */,
|
||||
A75FDBD723EA38AD00529352 /* SDL_hidapi_rumble.c */,
|
||||
A75FDBD823EA38AD00529352 /* SDL_hidapi_rumble.h */,
|
||||
A704173020F7F39400A82227 /* SDL_hidapi_steam.c */,
|
||||
F3BDD78C20F51CB8004ECBF3 /* SDL_hidapi_switch.c */,
|
||||
F3BDD78B20F51CB8004ECBF3 /* SDL_hidapi_xbox360.c */,
|
||||
A7FF6B6623AC3BCD005876C6 /* SDL_hidapi_xbox360w.c */,
|
||||
F3BDD78D20F51CB8004ECBF3 /* SDL_hidapi_xboxone.c */,
|
||||
F3BDD79020F51CB8004ECBF3 /* SDL_hidapijoystick_c.h */,
|
||||
F3BDD79120F51CB8004ECBF3 /* SDL_hidapijoystick.c */,
|
||||
|
@ -1487,6 +1525,7 @@
|
|||
FD3F4A6F0DEA620800C5B771 /* stdlib */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
63CC93C623849391002A5C54 /* SDL_strtokr.c */,
|
||||
FD3F4A700DEA620800C5B771 /* SDL_getenv.c */,
|
||||
FD3F4A710DEA620800C5B771 /* SDL_iconv.c */,
|
||||
FD3F4A720DEA620800C5B771 /* SDL_malloc.c */,
|
||||
|
@ -1576,15 +1615,14 @@
|
|||
children = (
|
||||
AA7558651595D55500BBD41B /* begin_code.h */,
|
||||
AA7558661595D55500BBD41B /* close_code.h */,
|
||||
AA7558971595D55500BBD41B /* SDL.h */,
|
||||
AA7558671595D55500BBD41B /* SDL_assert.h */,
|
||||
AA7558681595D55500BBD41B /* SDL_atomic.h */,
|
||||
AA7558691595D55500BBD41B /* SDL_audio.h */,
|
||||
AADA5B8E16CCAB7C00107CF7 /* SDL_bits.h */,
|
||||
AA75586A1595D55500BBD41B /* SDL_blendmode.h */,
|
||||
AA75586B1595D55500BBD41B /* SDL_clipboard.h */,
|
||||
AA75586D1595D55500BBD41B /* SDL_config.h */,
|
||||
AA75586C1595D55500BBD41B /* SDL_config_iphoneos.h */,
|
||||
AA75586D1595D55500BBD41B /* SDL_config.h */,
|
||||
AA75586E1595D55500BBD41B /* SDL_copying.h */,
|
||||
AA75586F1595D55500BBD41B /* SDL_cpuinfo.h */,
|
||||
AA7558701595D55500BBD41B /* SDL_endian.h */,
|
||||
|
@ -1602,6 +1640,7 @@
|
|||
AA75587B1595D55500BBD41B /* SDL_log.h */,
|
||||
AA75587C1595D55500BBD41B /* SDL_main.h */,
|
||||
AA9FF9501637C6E5000DF050 /* SDL_messagebox.h */,
|
||||
FA24348C21D4201400B8918A /* SDL_metal.h */,
|
||||
AA75587D1595D55500BBD41B /* SDL_mouse.h */,
|
||||
AA75587E1595D55500BBD41B /* SDL_mutex.h */,
|
||||
AA75587F1595D55500BBD41B /* SDL_name.h */,
|
||||
|
@ -1630,6 +1669,7 @@
|
|||
AA7558951595D55500BBD41B /* SDL_version.h */,
|
||||
AA7558961595D55500BBD41B /* SDL_video.h */,
|
||||
4D7516FE1EE1C5B400820EEA /* SDL_vulkan.h */,
|
||||
AA7558971595D55500BBD41B /* SDL.h */,
|
||||
);
|
||||
name = "Public Headers";
|
||||
path = ../../include;
|
||||
|
@ -1960,6 +2000,7 @@
|
|||
52ED1DD5222889500061FCE0 /* SDL_syswm.h in Headers */,
|
||||
52ED1DD6222889500061FCE0 /* SDL_thread.h in Headers */,
|
||||
52ED1DD7222889500061FCE0 /* SDL_timer.h in Headers */,
|
||||
A75FDBDE23EA38AD00529352 /* SDL_hidapi_rumble.h in Headers */,
|
||||
52ED1DD8222889500061FCE0 /* SDL_touch.h in Headers */,
|
||||
52ED1DD9222889500061FCE0 /* SDL_types.h in Headers */,
|
||||
52ED1DDA222889500061FCE0 /* SDL_version.h in Headers */,
|
||||
|
@ -2096,6 +2137,7 @@
|
|||
F3E3C6C32241389A007D243C /* SDL_syswm.h in Headers */,
|
||||
F3E3C6C42241389A007D243C /* SDL_thread.h in Headers */,
|
||||
F3E3C6C52241389A007D243C /* SDL_timer.h in Headers */,
|
||||
A75FDBDF23EA38AD00529352 /* SDL_hidapi_rumble.h in Headers */,
|
||||
F3E3C6C62241389A007D243C /* SDL_touch.h in Headers */,
|
||||
F3E3C6C72241389A007D243C /* SDL_types.h in Headers */,
|
||||
F3E3C6C82241389A007D243C /* SDL_version.h in Headers */,
|
||||
|
@ -2183,6 +2225,7 @@
|
|||
AA75589D1595D55500BBD41B /* SDL_blendmode.h in Headers */,
|
||||
F30D9C9E212CD0990047DF2E /* SDL_sensor_c.h in Headers */,
|
||||
AA75589E1595D55500BBD41B /* SDL_clipboard.h in Headers */,
|
||||
FA24348D21D4201400B8918A /* SDL_metal.h in Headers */,
|
||||
AA75589F1595D55500BBD41B /* SDL_config_iphoneos.h in Headers */,
|
||||
AA7558A01595D55500BBD41B /* SDL_config.h in Headers */,
|
||||
AA7558A11595D55500BBD41B /* SDL_copying.h in Headers */,
|
||||
|
@ -2232,6 +2275,7 @@
|
|||
AA7558C31595D55500BBD41B /* SDL_syswm.h in Headers */,
|
||||
AA7558C41595D55500BBD41B /* SDL_thread.h in Headers */,
|
||||
AA7558C51595D55500BBD41B /* SDL_timer.h in Headers */,
|
||||
A75FDBDD23EA38AD00529352 /* SDL_hidapi_rumble.h in Headers */,
|
||||
AA7558C61595D55500BBD41B /* SDL_touch.h in Headers */,
|
||||
AA7558C71595D55500BBD41B /* SDL_types.h in Headers */,
|
||||
AA7558C81595D55500BBD41B /* SDL_version.h in Headers */,
|
||||
|
@ -2483,12 +2527,14 @@
|
|||
52ED1E07222889500061FCE0 /* SDL_getenv.c in Sources */,
|
||||
52ED1E08222889500061FCE0 /* SDL_iconv.c in Sources */,
|
||||
52ED1E09222889500061FCE0 /* SDL_malloc.c in Sources */,
|
||||
A7FF6B6323AC3BC6005876C6 /* SDL_hidapi_gamecube.c in Sources */,
|
||||
52ED1E0A222889500061FCE0 /* SDL_hidapi_xbox360.c in Sources */,
|
||||
52ED1E0B222889500061FCE0 /* SDL_qsort.c in Sources */,
|
||||
52ED1E0C222889500061FCE0 /* SDL_hidapi_ps4.c in Sources */,
|
||||
52ED1E0D222889500061FCE0 /* SDL_stdlib.c in Sources */,
|
||||
52ED1E0E222889500061FCE0 /* SDL_blit.c in Sources */,
|
||||
52ED1E0F222889500061FCE0 /* SDL_blit_0.c in Sources */,
|
||||
A75FDAB723E288E400529352 /* SDL_hidapi_steam.c in Sources */,
|
||||
52ED1E10222889500061FCE0 /* SDL_yuv.c in Sources */,
|
||||
52ED1E11222889500061FCE0 /* SDL_blit_1.c in Sources */,
|
||||
52ED1E12222889500061FCE0 /* SDL_dataqueue.c in Sources */,
|
||||
|
@ -2504,6 +2550,7 @@
|
|||
52ED1E1C222889500061FCE0 /* SDL_stretch.c in Sources */,
|
||||
52ED1E1D222889500061FCE0 /* SDL_egl.c in Sources */,
|
||||
52ED1E1E222889500061FCE0 /* SDL_surface.c in Sources */,
|
||||
A75FDBDA23EA38AD00529352 /* SDL_hidapi_rumble.c in Sources */,
|
||||
52ED1E1F222889500061FCE0 /* SDL_video.c in Sources */,
|
||||
52ED1E20222889500061FCE0 /* SDL_nullevents.c in Sources */,
|
||||
52ED1E21222889500061FCE0 /* SDL_nullvideo.c in Sources */,
|
||||
|
@ -2547,6 +2594,7 @@
|
|||
52ED1E47222889500061FCE0 /* SDL_render_gles.c in Sources */,
|
||||
52ED1E48222889500061FCE0 /* SDL_hints.c in Sources */,
|
||||
52ED1E49222889500061FCE0 /* SDL_shape.c in Sources */,
|
||||
A7FF6B6823AC3BCD005876C6 /* SDL_hidapi_xbox360w.c in Sources */,
|
||||
52ED1E4A222889500061FCE0 /* SDL_render_gles2.c in Sources */,
|
||||
52ED1E4B222889500061FCE0 /* SDL_dummysensor.c in Sources */,
|
||||
52ED1E4C222889500061FCE0 /* SDL_shaders_gles2.c in Sources */,
|
||||
|
@ -2562,6 +2610,7 @@
|
|||
52ED1E56222889500061FCE0 /* SDL_gamecontroller.c in Sources */,
|
||||
52ED1E57222889500061FCE0 /* SDL_systls.c in Sources */,
|
||||
52ED1E58222889500061FCE0 /* SDL_sysfilesystem.m in Sources */,
|
||||
63CC93C823849391002A5C54 /* SDL_strtokr.c in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
@ -2611,12 +2660,14 @@
|
|||
F3E3C6F52241389A007D243C /* SDL_getenv.c in Sources */,
|
||||
F3E3C6F62241389A007D243C /* SDL_iconv.c in Sources */,
|
||||
F3E3C6F72241389A007D243C /* SDL_malloc.c in Sources */,
|
||||
A7FF6B6523AC3BC6005876C6 /* SDL_hidapi_gamecube.c in Sources */,
|
||||
F3E3C6F82241389A007D243C /* SDL_hidapi_xbox360.c in Sources */,
|
||||
F3E3C6F92241389A007D243C /* SDL_qsort.c in Sources */,
|
||||
F3E3C6FA2241389A007D243C /* SDL_hidapi_ps4.c in Sources */,
|
||||
F3E3C6FB2241389A007D243C /* SDL_stdlib.c in Sources */,
|
||||
F3E3C6FC2241389A007D243C /* SDL_blit.c in Sources */,
|
||||
F3E3C6FD2241389A007D243C /* SDL_blit_0.c in Sources */,
|
||||
A75FDAB823E2890000529352 /* SDL_hidapi_steam.c in Sources */,
|
||||
F3E3C6FE2241389A007D243C /* SDL_yuv.c in Sources */,
|
||||
F3E3C6FF2241389A007D243C /* SDL_blit_1.c in Sources */,
|
||||
F3E3C7002241389A007D243C /* SDL_dataqueue.c in Sources */,
|
||||
|
@ -2632,6 +2683,7 @@
|
|||
F3E3C70A2241389A007D243C /* SDL_stretch.c in Sources */,
|
||||
F3E3C70B2241389A007D243C /* SDL_egl.c in Sources */,
|
||||
F3E3C70C2241389A007D243C /* SDL_surface.c in Sources */,
|
||||
A75FDBDC23EA38AD00529352 /* SDL_hidapi_rumble.c in Sources */,
|
||||
F3E3C70D2241389A007D243C /* SDL_video.c in Sources */,
|
||||
F3E3C70E2241389A007D243C /* SDL_nullevents.c in Sources */,
|
||||
F3E3C70F2241389A007D243C /* SDL_nullvideo.c in Sources */,
|
||||
|
@ -2675,6 +2727,7 @@
|
|||
F3E3C7362241389A007D243C /* SDL_render_gles.c in Sources */,
|
||||
F3E3C7372241389A007D243C /* SDL_hints.c in Sources */,
|
||||
F3E3C7382241389A007D243C /* SDL_shape.c in Sources */,
|
||||
A7FF6B6A23AC3BCD005876C6 /* SDL_hidapi_xbox360w.c in Sources */,
|
||||
F3E3C7392241389A007D243C /* SDL_render_gles2.c in Sources */,
|
||||
F3E3C73A2241389A007D243C /* SDL_dummysensor.c in Sources */,
|
||||
F3E3C73B2241389A007D243C /* SDL_shaders_gles2.c in Sources */,
|
||||
|
@ -2690,6 +2743,7 @@
|
|||
F3E3C7452241389A007D243C /* SDL_gamecontroller.c in Sources */,
|
||||
F3E3C7462241389A007D243C /* SDL_systls.c in Sources */,
|
||||
F3E3C7472241389A007D243C /* SDL_sysfilesystem.m in Sources */,
|
||||
63CC93CA23849391002A5C54 /* SDL_strtokr.c in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
@ -2736,6 +2790,7 @@
|
|||
FAB5984B1BB5C31600BE72C5 /* SDL_sysfilesystem.m in Sources */,
|
||||
AADC5A5D1FDA104400960936 /* yuv_rgb.c in Sources */,
|
||||
FAB5984C1BB5C31600BE72C5 /* SDL_syshaptic.c in Sources */,
|
||||
A75FDBDB23EA38AD00529352 /* SDL_hidapi_rumble.c in Sources */,
|
||||
AADC5A5F1FDA105600960936 /* SDL_vulkan_utils.c in Sources */,
|
||||
AADC5A5E1FDA105300960936 /* SDL_yuv.c in Sources */,
|
||||
FAB5984D1BB5C31600BE72C5 /* SDL_haptic.c in Sources */,
|
||||
|
@ -2744,6 +2799,7 @@
|
|||
FAB598521BB5C31600BE72C5 /* SDL_joystick.c in Sources */,
|
||||
FAB598551BB5C31600BE72C5 /* SDL_sysloadso.c in Sources */,
|
||||
AADC5A651FDA10CB00960936 /* SDL_render_metal.m in Sources */,
|
||||
A7FF6B6923AC3BCD005876C6 /* SDL_hidapi_xbox360w.c in Sources */,
|
||||
FAB598561BB5C31600BE72C5 /* SDL_sysloadso.c in Sources */,
|
||||
FAB598571BB5C31600BE72C5 /* SDL_power.c in Sources */,
|
||||
F30D9CA1212CD0990047DF2E /* SDL_sensor.c in Sources */,
|
||||
|
@ -2773,6 +2829,7 @@
|
|||
FAB598781BB5C31600BE72C5 /* SDL_syscond.c in Sources */,
|
||||
F3BDD79D20F51CB8004ECBF3 /* SDL_hidapijoystick.c in Sources */,
|
||||
AADC5A601FDA10A400960936 /* SDL_uikitvulkan.m in Sources */,
|
||||
A7FF6B6423AC3BC6005876C6 /* SDL_hidapi_gamecube.c in Sources */,
|
||||
FAB598791BB5C31600BE72C5 /* SDL_sysmutex.c in Sources */,
|
||||
FAB5987B1BB5C31600BE72C5 /* SDL_syssem.c in Sources */,
|
||||
FAB5987C1BB5C31600BE72C5 /* SDL_systhread.c in Sources */,
|
||||
|
@ -2791,6 +2848,7 @@
|
|||
FAB598951BB5C31600BE72C5 /* SDL_uikitview.m in Sources */,
|
||||
FAB598971BB5C31600BE72C5 /* SDL_uikitviewcontroller.m in Sources */,
|
||||
FAB598991BB5C31600BE72C5 /* SDL_uikitwindow.m in Sources */,
|
||||
A704173220F7F39900A82227 /* SDL_hidapi_steam.c in Sources */,
|
||||
FAB5989A1BB5C31600BE72C5 /* SDL_nullevents.c in Sources */,
|
||||
FAB5989D1BB5C31600BE72C5 /* SDL_nullframebuffer.c in Sources */,
|
||||
FAB5989E1BB5C31600BE72C5 /* SDL_nullvideo.c in Sources */,
|
||||
|
@ -2816,6 +2874,7 @@
|
|||
FAB598BD1BB5C31600BE72C5 /* SDL_hints.c in Sources */,
|
||||
FAB598BE1BB5C31600BE72C5 /* SDL_log.c in Sources */,
|
||||
FAB598BF1BB5C31600BE72C5 /* SDL.c in Sources */,
|
||||
63CC93C923849391002A5C54 /* SDL_strtokr.c in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
@ -2857,6 +2916,7 @@
|
|||
FD3F4A760DEA620800C5B771 /* SDL_getenv.c in Sources */,
|
||||
FD3F4A770DEA620800C5B771 /* SDL_iconv.c in Sources */,
|
||||
FD3F4A780DEA620800C5B771 /* SDL_malloc.c in Sources */,
|
||||
A7FF6B6223AC3BC6005876C6 /* SDL_hidapi_gamecube.c in Sources */,
|
||||
F3BDD79220F51CB8004ECBF3 /* SDL_hidapi_xbox360.c in Sources */,
|
||||
FD3F4A790DEA620800C5B771 /* SDL_qsort.c in Sources */,
|
||||
F3BDD79820F51CB8004ECBF3 /* SDL_hidapi_ps4.c in Sources */,
|
||||
|
@ -2868,6 +2928,7 @@
|
|||
566726451DF72CF5001DD3DB /* SDL_dataqueue.c in Sources */,
|
||||
FDA684510DF2374E00F98A1A /* SDL_blit_A.c in Sources */,
|
||||
FDA684520DF2374E00F98A1A /* SDL_blit_auto.c in Sources */,
|
||||
A704173120F7F39900A82227 /* SDL_hidapi_steam.c in Sources */,
|
||||
FDA684540DF2374E00F98A1A /* SDL_blit_copy.c in Sources */,
|
||||
FDA684560DF2374E00F98A1A /* SDL_blit_N.c in Sources */,
|
||||
FDA684570DF2374E00F98A1A /* SDL_blit_slow.c in Sources */,
|
||||
|
@ -2878,6 +2939,7 @@
|
|||
FDA684640DF2374E00F98A1A /* SDL_stretch.c in Sources */,
|
||||
AA13B34D1FB8B27800D9FEE6 /* SDL_egl.c in Sources */,
|
||||
FDA684660DF2374E00F98A1A /* SDL_surface.c in Sources */,
|
||||
A75FDBD923EA38AD00529352 /* SDL_hidapi_rumble.c in Sources */,
|
||||
FDA684680DF2374E00F98A1A /* SDL_video.c in Sources */,
|
||||
FDA685FB0DF244C800F98A1A /* SDL_nullevents.c in Sources */,
|
||||
FDA685FF0DF244C800F98A1A /* SDL_nullvideo.c in Sources */,
|
||||
|
@ -2921,6 +2983,7 @@
|
|||
0442EC5312FE1C28004C9285 /* SDL_render_gles.c in Sources */,
|
||||
0442EC5512FE1C3F004C9285 /* SDL_hints.c in Sources */,
|
||||
AA13B34A1FB8B27800D9FEE6 /* SDL_shape.c in Sources */,
|
||||
A7FF6B6723AC3BCD005876C6 /* SDL_hidapi_xbox360w.c in Sources */,
|
||||
0402A85812FE70C600CECEE3 /* SDL_render_gles2.c in Sources */,
|
||||
F36839CD214790950000F255 /* SDL_dummysensor.c in Sources */,
|
||||
0402A85912FE70C600CECEE3 /* SDL_shaders_gles2.c in Sources */,
|
||||
|
@ -2936,6 +2999,7 @@
|
|||
AA0AD06216647BBB00CE5896 /* SDL_gamecontroller.c in Sources */,
|
||||
AA0F8495178D5F1A00823F9D /* SDL_systls.c in Sources */,
|
||||
56C181E217C44D7A00406AE3 /* SDL_sysfilesystem.m in Sources */,
|
||||
63CC93C723849391002A5C54 /* SDL_strtokr.c in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
|
|
@ -19,10 +19,10 @@
|
|||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>2.0.10</string>
|
||||
<string>2.0.12</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>SDLX</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>2.0.10</string>
|
||||
<string>2.0.12</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
File diff suppressed because it is too large
Load diff
22
sdl2/Xcode/SDL/hidapi/Info.plist
Normal file
22
sdl2/Xcode/SDL/hidapi/Info.plist
Normal file
|
@ -0,0 +1,22 @@
|
|||
<?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>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>$(CURRENT_PROJECT_VERSION)</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>$(CURRENT_PROJECT_VERSION)</string>
|
||||
</dict>
|
||||
</plist>
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 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,6 +22,11 @@ android {
|
|||
arguments "APP_PLATFORM=android-16"
|
||||
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
|
||||
}
|
||||
// cmake {
|
||||
// arguments "-DANDROID_APP_PLATFORM=android-16", "-DANDROID_STL=c++_static"
|
||||
// // abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
|
||||
// abiFilters 'arm64-v8a'
|
||||
// }
|
||||
}
|
||||
}
|
||||
buildTypes {
|
||||
|
@ -38,6 +43,9 @@ android {
|
|||
ndkBuild {
|
||||
path 'jni/Android.mk'
|
||||
}
|
||||
// cmake {
|
||||
// path 'jni/CMakeLists.txt'
|
||||
// }
|
||||
}
|
||||
|
||||
}
|
||||
|
|
20
sdl2/android-project/app/jni/CMakeLists.txt
Normal file
20
sdl2/android-project/app/jni/CMakeLists.txt
Normal file
|
@ -0,0 +1,20 @@
|
|||
cmake_minimum_required(VERSION 3.6)
|
||||
|
||||
project(GAME)
|
||||
|
||||
# armeabi-v7a requires cpufeatures library
|
||||
# include(AndroidNdkModules)
|
||||
# android_ndk_import_module_cpufeatures()
|
||||
|
||||
|
||||
# SDL sources are in a subfolder named "SDL"
|
||||
add_subdirectory(SDL)
|
||||
|
||||
# Compilation of companion libraries
|
||||
#add_subdirectory(SDL_image)
|
||||
#add_subdirectory(SDL_mixer)
|
||||
#add_subdirectory(SDL_ttf)
|
||||
|
||||
# Your game and its CMakeLists.txt are in a subfolder named "src"
|
||||
add_subdirectory(src)
|
||||
|
13
sdl2/android-project/app/jni/src/CMakeLists.txt
Normal file
13
sdl2/android-project/app/jni/src/CMakeLists.txt
Normal file
|
@ -0,0 +1,13 @@
|
|||
cmake_minimum_required(VERSION 3.6)
|
||||
|
||||
project(MY_APP)
|
||||
|
||||
find_library(SDL2 SDL2)
|
||||
|
||||
add_library(main SHARED)
|
||||
|
||||
target_sources(main PRIVATE YourSourceHere.c)
|
||||
|
||||
target_link_libraries(main SDL2)
|
||||
|
||||
|
|
@ -17,17 +17,31 @@
|
|||
android:required="false" />
|
||||
|
||||
<!-- Game controller support -->
|
||||
<uses-feature
|
||||
android:name="android.hardware.bluetooth"
|
||||
android:required="false" />
|
||||
<uses-feature
|
||||
android:name="android.hardware.gamepad"
|
||||
android:required="false" />
|
||||
<uses-feature
|
||||
android:name="android.hardware.usb.host"
|
||||
android:required="false" />
|
||||
|
||||
<!-- External mouse input events -->
|
||||
<uses-feature
|
||||
android:name="android.hardware.type.pc"
|
||||
android:required="false" />
|
||||
|
||||
<!-- Audio recording support -->
|
||||
<!-- if you want to capture audio, uncomment this. -->
|
||||
<!-- <uses-feature
|
||||
android:name="android.hardware.microphone"
|
||||
android:required="false" /> -->
|
||||
|
||||
<!-- Allow writing to external storage -->
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
<!-- Allow access to Bluetooth devices -->
|
||||
<uses-permission android:name="android.permission.BLUETOOTH" />
|
||||
<!-- Allow access to the vibrator -->
|
||||
<uses-permission android:name="android.permission.VIBRATE" />
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package org.libsdl.app;
|
||||
|
||||
import android.hardware.usb.UsbDevice;
|
||||
|
||||
interface HIDDevice
|
||||
{
|
||||
public int getId();
|
||||
|
@ -9,6 +11,7 @@ interface HIDDevice
|
|||
public int getVersion();
|
||||
public String getManufacturerName();
|
||||
public String getProductName();
|
||||
public UsbDevice getDevice();
|
||||
public boolean open();
|
||||
public int sendFeatureReport(byte[] report);
|
||||
public int sendOutputReport(byte[] report);
|
||||
|
|
|
@ -9,6 +9,7 @@ import android.bluetooth.BluetoothGattDescriptor;
|
|||
import android.bluetooth.BluetoothManager;
|
||||
import android.bluetooth.BluetoothProfile;
|
||||
import android.bluetooth.BluetoothGattService;
|
||||
import android.hardware.usb.UsbDevice;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.util.Log;
|
||||
|
@ -165,13 +166,13 @@ class HIDDeviceBLESteamController extends BluetoothGattCallback implements HIDDe
|
|||
mHandler = new Handler(Looper.getMainLooper());
|
||||
|
||||
mGatt = connectGatt();
|
||||
final HIDDeviceBLESteamController finalThis = this;
|
||||
mHandler.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
finalThis.checkConnectionForChromebookIssue();
|
||||
}
|
||||
}, CHROMEBOOK_CONNECTION_CHECK_INTERVAL);
|
||||
// final HIDDeviceBLESteamController finalThis = this;
|
||||
// mHandler.postDelayed(new Runnable() {
|
||||
// @Override
|
||||
// public void run() {
|
||||
// finalThis.checkConnectionForChromebookIssue();
|
||||
// }
|
||||
// }, CHROMEBOOK_CONNECTION_CHECK_INTERVAL);
|
||||
}
|
||||
|
||||
public String getIdentifier() {
|
||||
|
@ -469,7 +470,7 @@ class HIDDeviceBLESteamController extends BluetoothGattCallback implements HIDDe
|
|||
// Only register controller with the native side once it has been fully configured
|
||||
if (!isRegistered()) {
|
||||
Log.v(TAG, "Registering Steam Controller with ID: " + getId());
|
||||
mManager.HIDDeviceConnected(getId(), getIdentifier(), getVendorId(), getProductId(), getSerialNumber(), getVersion(), getManufacturerName(), getProductName(), 0);
|
||||
mManager.HIDDeviceConnected(getId(), getIdentifier(), getVendorId(), getProductId(), getSerialNumber(), getVersion(), getManufacturerName(), getProductName(), 0, 0, 0, 0);
|
||||
setRegistered();
|
||||
}
|
||||
}
|
||||
|
@ -563,6 +564,11 @@ class HIDDeviceBLESteamController extends BluetoothGattCallback implements HIDDe
|
|||
return "Steam Controller";
|
||||
}
|
||||
|
||||
@Override
|
||||
public UsbDevice getDevice() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean open() {
|
||||
return true;
|
||||
|
|
|
@ -19,8 +19,9 @@ import android.hardware.usb.*;
|
|||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
public class HIDDeviceManager {
|
||||
|
@ -50,7 +51,6 @@ public class HIDDeviceManager {
|
|||
|
||||
private Context mContext;
|
||||
private HashMap<Integer, HIDDevice> mDevicesById = new HashMap<Integer, HIDDevice>();
|
||||
private HashMap<UsbDevice, HIDDeviceUSB> mUSBDevices = new HashMap<UsbDevice, HIDDeviceUSB>();
|
||||
private HashMap<BluetoothDevice, HIDDeviceBLESteamController> mBluetoothDevices = new HashMap<BluetoothDevice, HIDDeviceBLESteamController>();
|
||||
private int mNextDeviceId = 0;
|
||||
private SharedPreferences mSharedPreferences = null;
|
||||
|
@ -241,31 +241,20 @@ public class HIDDeviceManager {
|
|||
}
|
||||
}
|
||||
|
||||
private boolean isHIDDeviceUSB(UsbDevice usbDevice) {
|
||||
for (int interface_number = 0; interface_number < usbDevice.getInterfaceCount(); ++interface_number) {
|
||||
if (isHIDDeviceInterface(usbDevice, interface_number)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean isHIDDeviceInterface(UsbDevice usbDevice, int interface_number) {
|
||||
UsbInterface usbInterface = usbDevice.getInterface(interface_number);
|
||||
private boolean isHIDDeviceInterface(UsbDevice usbDevice, UsbInterface usbInterface) {
|
||||
if (usbInterface.getInterfaceClass() == UsbConstants.USB_CLASS_HID) {
|
||||
return true;
|
||||
}
|
||||
if (interface_number == 0) {
|
||||
if (isXbox360Controller(usbDevice, usbInterface) || isXboxOneController(usbDevice, usbInterface)) {
|
||||
return true;
|
||||
}
|
||||
if (isXbox360Controller(usbDevice, usbInterface) || isXboxOneController(usbDevice, usbInterface)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean isXbox360Controller(UsbDevice usbDevice, UsbInterface usbInterface) {
|
||||
final int XB360_IFACE_SUBCLASS = 93;
|
||||
final int XB360_IFACE_PROTOCOL = 1; // Wired only
|
||||
final int XB360_IFACE_PROTOCOL = 1; // Wired
|
||||
final int XB360W_IFACE_PROTOCOL = 129; // Wireless
|
||||
final int[] SUPPORTED_VENDORS = {
|
||||
0x0079, // GPD Win 2
|
||||
0x044f, // Thrustmaster
|
||||
|
@ -275,8 +264,9 @@ public class HIDDeviceManager {
|
|||
0x06a3, // Saitek
|
||||
0x0738, // Mad Catz
|
||||
0x07ff, // Mad Catz
|
||||
0x0e6f, // Unknown
|
||||
0x0e6f, // PDP
|
||||
0x0f0d, // Hori
|
||||
0x1038, // SteelSeries
|
||||
0x11c9, // Nacon
|
||||
0x12ab, // Unknown
|
||||
0x1430, // RedOctane
|
||||
|
@ -291,7 +281,8 @@ public class HIDDeviceManager {
|
|||
|
||||
if (usbInterface.getInterfaceClass() == UsbConstants.USB_CLASS_VENDOR_SPEC &&
|
||||
usbInterface.getInterfaceSubclass() == XB360_IFACE_SUBCLASS &&
|
||||
usbInterface.getInterfaceProtocol() == XB360_IFACE_PROTOCOL) {
|
||||
(usbInterface.getInterfaceProtocol() == XB360_IFACE_PROTOCOL ||
|
||||
usbInterface.getInterfaceProtocol() == XB360W_IFACE_PROTOCOL)) {
|
||||
int vendor_id = usbDevice.getVendorId();
|
||||
for (int supportedVid : SUPPORTED_VENDORS) {
|
||||
if (vendor_id == supportedVid) {
|
||||
|
@ -308,13 +299,15 @@ public class HIDDeviceManager {
|
|||
final int[] SUPPORTED_VENDORS = {
|
||||
0x045e, // Microsoft
|
||||
0x0738, // Mad Catz
|
||||
0x0e6f, // Unknown
|
||||
0x0e6f, // PDP
|
||||
0x0f0d, // Hori
|
||||
0x1532, // Razer Wildcat
|
||||
0x24c6, // PowerA
|
||||
0x2e24, // Hyperkin
|
||||
};
|
||||
|
||||
if (usbInterface.getInterfaceClass() == UsbConstants.USB_CLASS_VENDOR_SPEC &&
|
||||
if (usbInterface.getId() == 0 &&
|
||||
usbInterface.getInterfaceClass() == UsbConstants.USB_CLASS_VENDOR_SPEC &&
|
||||
usbInterface.getInterfaceSubclass() == XB1_IFACE_SUBCLASS &&
|
||||
usbInterface.getInterfaceProtocol() == XB1_IFACE_PROTOCOL) {
|
||||
int vendor_id = usbDevice.getVendorId();
|
||||
|
@ -328,45 +321,45 @@ public class HIDDeviceManager {
|
|||
}
|
||||
|
||||
private void handleUsbDeviceAttached(UsbDevice usbDevice) {
|
||||
if (isHIDDeviceUSB(usbDevice)) {
|
||||
connectHIDDeviceUSB(usbDevice);
|
||||
}
|
||||
connectHIDDeviceUSB(usbDevice);
|
||||
}
|
||||
|
||||
private void handleUsbDeviceDetached(UsbDevice usbDevice) {
|
||||
HIDDeviceUSB device = mUSBDevices.get(usbDevice);
|
||||
if (device == null)
|
||||
return;
|
||||
|
||||
int id = device.getId();
|
||||
mUSBDevices.remove(usbDevice);
|
||||
mDevicesById.remove(id);
|
||||
device.shutdown();
|
||||
HIDDeviceDisconnected(id);
|
||||
List<Integer> devices = new ArrayList<Integer>();
|
||||
for (HIDDevice device : mDevicesById.values()) {
|
||||
if (usbDevice.equals(device.getDevice())) {
|
||||
devices.add(device.getId());
|
||||
}
|
||||
}
|
||||
for (int id : devices) {
|
||||
HIDDevice device = mDevicesById.get(id);
|
||||
mDevicesById.remove(id);
|
||||
device.shutdown();
|
||||
HIDDeviceDisconnected(id);
|
||||
}
|
||||
}
|
||||
|
||||
private void handleUsbDevicePermission(UsbDevice usbDevice, boolean permission_granted) {
|
||||
HIDDeviceUSB device = mUSBDevices.get(usbDevice);
|
||||
if (device == null)
|
||||
return;
|
||||
|
||||
boolean opened = false;
|
||||
if (permission_granted) {
|
||||
opened = device.open();
|
||||
for (HIDDevice device : mDevicesById.values()) {
|
||||
if (usbDevice.equals(device.getDevice())) {
|
||||
boolean opened = false;
|
||||
if (permission_granted) {
|
||||
opened = device.open();
|
||||
}
|
||||
HIDDeviceOpenResult(device.getId(), opened);
|
||||
}
|
||||
}
|
||||
HIDDeviceOpenResult(device.getId(), opened);
|
||||
}
|
||||
|
||||
private void connectHIDDeviceUSB(UsbDevice usbDevice) {
|
||||
synchronized (this) {
|
||||
for (int interface_number = 0; interface_number < usbDevice.getInterfaceCount(); interface_number++) {
|
||||
if (isHIDDeviceInterface(usbDevice, interface_number)) {
|
||||
HIDDeviceUSB device = new HIDDeviceUSB(this, usbDevice, interface_number);
|
||||
for (int interface_index = 0; interface_index < usbDevice.getInterfaceCount(); interface_index++) {
|
||||
UsbInterface usbInterface = usbDevice.getInterface(interface_index);
|
||||
if (isHIDDeviceInterface(usbDevice, usbInterface)) {
|
||||
HIDDeviceUSB device = new HIDDeviceUSB(this, usbDevice, interface_index);
|
||||
int id = device.getId();
|
||||
mUSBDevices.put(usbDevice, device);
|
||||
mDevicesById.put(id, device);
|
||||
HIDDeviceConnected(id, device.getIdentifier(), device.getVendorId(), device.getProductId(), device.getSerialNumber(), device.getVersion(), device.getManufacturerName(), device.getProductName(), interface_number);
|
||||
break;
|
||||
HIDDeviceConnected(id, device.getIdentifier(), device.getVendorId(), device.getProductId(), device.getSerialNumber(), device.getVersion(), device.getManufacturerName(), device.getProductName(), usbInterface.getId(), usbInterface.getInterfaceClass(), usbInterface.getInterfaceSubclass(), usbInterface.getInterfaceProtocol());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -563,33 +556,27 @@ public class HIDDeviceManager {
|
|||
//////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
public boolean openDevice(int deviceID) {
|
||||
Log.v(TAG, "openDevice deviceID=" + deviceID);
|
||||
HIDDevice device = getDevice(deviceID);
|
||||
if (device == null) {
|
||||
HIDDeviceDisconnected(deviceID);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Look to see if this is a USB device and we have permission to access it
|
||||
for (HIDDeviceUSB device : mUSBDevices.values()) {
|
||||
if (deviceID == device.getId()) {
|
||||
UsbDevice usbDevice = device.getDevice();
|
||||
if (!mUsbManager.hasPermission(usbDevice)) {
|
||||
HIDDeviceOpenPending(deviceID);
|
||||
try {
|
||||
mUsbManager.requestPermission(usbDevice, PendingIntent.getBroadcast(mContext, 0, new Intent(HIDDeviceManager.ACTION_USB_PERMISSION), 0));
|
||||
} catch (Exception e) {
|
||||
Log.v(TAG, "Couldn't request permission for USB device " + usbDevice);
|
||||
HIDDeviceOpenResult(deviceID, false);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
UsbDevice usbDevice = device.getDevice();
|
||||
if (usbDevice != null && !mUsbManager.hasPermission(usbDevice)) {
|
||||
HIDDeviceOpenPending(deviceID);
|
||||
try {
|
||||
mUsbManager.requestPermission(usbDevice, PendingIntent.getBroadcast(mContext, 0, new Intent(HIDDeviceManager.ACTION_USB_PERMISSION), 0));
|
||||
} catch (Exception e) {
|
||||
Log.v(TAG, "Couldn't request permission for USB device " + usbDevice);
|
||||
HIDDeviceOpenResult(deviceID, false);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
try {
|
||||
Log.v(TAG, "openDevice deviceID=" + deviceID);
|
||||
HIDDevice device;
|
||||
device = getDevice(deviceID);
|
||||
if (device == null) {
|
||||
HIDDeviceDisconnected(deviceID);
|
||||
return false;
|
||||
}
|
||||
|
||||
return device.open();
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, "Got exception: " + Log.getStackTraceString(e));
|
||||
|
@ -599,7 +586,7 @@ public class HIDDeviceManager {
|
|||
|
||||
public int sendOutputReport(int deviceID, byte[] report) {
|
||||
try {
|
||||
Log.v(TAG, "sendOutputReport deviceID=" + deviceID + " length=" + report.length);
|
||||
//Log.v(TAG, "sendOutputReport deviceID=" + deviceID + " length=" + report.length);
|
||||
HIDDevice device;
|
||||
device = getDevice(deviceID);
|
||||
if (device == null) {
|
||||
|
@ -616,7 +603,7 @@ public class HIDDeviceManager {
|
|||
|
||||
public int sendFeatureReport(int deviceID, byte[] report) {
|
||||
try {
|
||||
Log.v(TAG, "sendFeatureReport deviceID=" + deviceID + " length=" + report.length);
|
||||
//Log.v(TAG, "sendFeatureReport deviceID=" + deviceID + " length=" + report.length);
|
||||
HIDDevice device;
|
||||
device = getDevice(deviceID);
|
||||
if (device == null) {
|
||||
|
@ -633,7 +620,7 @@ public class HIDDeviceManager {
|
|||
|
||||
public boolean getFeatureReport(int deviceID, byte[] report) {
|
||||
try {
|
||||
Log.v(TAG, "getFeatureReport deviceID=" + deviceID);
|
||||
//Log.v(TAG, "getFeatureReport deviceID=" + deviceID);
|
||||
HIDDevice device;
|
||||
device = getDevice(deviceID);
|
||||
if (device == null) {
|
||||
|
@ -672,7 +659,7 @@ public class HIDDeviceManager {
|
|||
private native void HIDDeviceRegisterCallback();
|
||||
private native void HIDDeviceReleaseCallback();
|
||||
|
||||
native void HIDDeviceConnected(int deviceID, String identifier, int vendorId, int productId, String serial_number, int release_number, String manufacturer_string, String product_string, int interface_number);
|
||||
native void HIDDeviceConnected(int deviceID, String identifier, int vendorId, int productId, String serial_number, int release_number, String manufacturer_string, String product_string, int interface_number, int interface_class, int interface_subclass, int interface_protocol);
|
||||
native void HIDDeviceOpenPending(int deviceID);
|
||||
native void HIDDeviceOpenResult(int deviceID, boolean opened);
|
||||
native void HIDDeviceDisconnected(int deviceID);
|
||||
|
|
|
@ -11,6 +11,7 @@ class HIDDeviceUSB implements HIDDevice {
|
|||
|
||||
protected HIDDeviceManager mManager;
|
||||
protected UsbDevice mDevice;
|
||||
protected int mInterfaceIndex;
|
||||
protected int mInterface;
|
||||
protected int mDeviceId;
|
||||
protected UsbDeviceConnection mConnection;
|
||||
|
@ -20,16 +21,17 @@ class HIDDeviceUSB implements HIDDevice {
|
|||
protected boolean mRunning;
|
||||
protected boolean mFrozen;
|
||||
|
||||
public HIDDeviceUSB(HIDDeviceManager manager, UsbDevice usbDevice, int interface_number) {
|
||||
public HIDDeviceUSB(HIDDeviceManager manager, UsbDevice usbDevice, int interface_index) {
|
||||
mManager = manager;
|
||||
mDevice = usbDevice;
|
||||
mInterface = interface_number;
|
||||
mInterfaceIndex = interface_index;
|
||||
mInterface = mDevice.getInterface(mInterfaceIndex).getId();
|
||||
mDeviceId = manager.getDeviceIDForIdentifier(getIdentifier());
|
||||
mRunning = false;
|
||||
}
|
||||
|
||||
public String getIdentifier() {
|
||||
return String.format("%s/%x/%x", mDevice.getDeviceName(), mDevice.getVendorId(), mDevice.getProductId());
|
||||
return String.format("%s/%x/%x/%d", mDevice.getDeviceName(), mDevice.getVendorId(), mDevice.getProductId(), mInterfaceIndex);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -88,6 +90,7 @@ class HIDDeviceUSB implements HIDDevice {
|
|||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UsbDevice getDevice() {
|
||||
return mDevice;
|
||||
}
|
||||
|
@ -104,19 +107,15 @@ class HIDDeviceUSB implements HIDDevice {
|
|||
return false;
|
||||
}
|
||||
|
||||
// Force claim all interfaces
|
||||
for (int i = 0; i < mDevice.getInterfaceCount(); i++) {
|
||||
UsbInterface iface = mDevice.getInterface(i);
|
||||
|
||||
if (!mConnection.claimInterface(iface, true)) {
|
||||
Log.w(TAG, "Failed to claim interfaces on USB device " + getDeviceName());
|
||||
close();
|
||||
return false;
|
||||
}
|
||||
// Force claim our interface
|
||||
UsbInterface iface = mDevice.getInterface(mInterfaceIndex);
|
||||
if (!mConnection.claimInterface(iface, true)) {
|
||||
Log.w(TAG, "Failed to claim interfaces on USB device " + getDeviceName());
|
||||
close();
|
||||
return false;
|
||||
}
|
||||
|
||||
// Find the endpoints
|
||||
UsbInterface iface = mDevice.getInterface(mInterface);
|
||||
for (int j = 0; j < iface.getEndpointCount(); j++) {
|
||||
UsbEndpoint endpt = iface.getEndpoint(j);
|
||||
switch (endpt.getDirection()) {
|
||||
|
@ -166,7 +165,7 @@ class HIDDeviceUSB implements HIDDevice {
|
|||
UsbConstants.USB_TYPE_CLASS | 0x01 /*RECIPIENT_INTERFACE*/ | UsbConstants.USB_DIR_OUT,
|
||||
0x09/*HID set_report*/,
|
||||
(3/*HID feature*/ << 8) | report_number,
|
||||
0,
|
||||
mInterface,
|
||||
report, offset, length,
|
||||
1000/*timeout millis*/);
|
||||
|
||||
|
@ -210,7 +209,7 @@ class HIDDeviceUSB implements HIDDevice {
|
|||
UsbConstants.USB_TYPE_CLASS | 0x01 /*RECIPIENT_INTERFACE*/ | UsbConstants.USB_DIR_IN,
|
||||
0x01/*HID get_report*/,
|
||||
(3/*HID feature*/ << 8) | report_number,
|
||||
0,
|
||||
mInterface,
|
||||
report, offset, length,
|
||||
1000/*timeout millis*/);
|
||||
|
||||
|
@ -250,10 +249,8 @@ class HIDDeviceUSB implements HIDDevice {
|
|||
mInputThread = null;
|
||||
}
|
||||
if (mConnection != null) {
|
||||
for (int i = 0; i < mDevice.getInterfaceCount(); i++) {
|
||||
UsbInterface iface = mDevice.getInterface(i);
|
||||
mConnection.releaseInterface(iface);
|
||||
}
|
||||
UsbInterface iface = mDevice.getInterface(mInterfaceIndex);
|
||||
mConnection.releaseInterface(iface);
|
||||
mConnection.close();
|
||||
mConnection = null;
|
||||
}
|
||||
|
|
|
@ -283,10 +283,6 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
return;
|
||||
}
|
||||
|
||||
if (mHIDDeviceManager != null) {
|
||||
mHIDDeviceManager.setFrozen(true);
|
||||
}
|
||||
|
||||
SDLActivity.handleNativeState();
|
||||
}
|
||||
|
||||
|
@ -298,10 +294,6 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
return;
|
||||
}
|
||||
|
||||
if (mHIDDeviceManager != null) {
|
||||
mHIDDeviceManager.setFrozen(false);
|
||||
}
|
||||
|
||||
SDLActivity.handleNativeState();
|
||||
}
|
||||
|
||||
|
@ -310,6 +302,10 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
protected void onPause() {
|
||||
Log.v(TAG, "onPause()");
|
||||
super.onPause();
|
||||
|
||||
if (mHIDDeviceManager != null) {
|
||||
mHIDDeviceManager.setFrozen(true);
|
||||
}
|
||||
if (!mHasMultiWindow) {
|
||||
pauseNativeThread();
|
||||
}
|
||||
|
@ -319,6 +315,10 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
protected void onResume() {
|
||||
Log.v(TAG, "onResume()");
|
||||
super.onResume();
|
||||
|
||||
if (mHIDDeviceManager != null) {
|
||||
mHIDDeviceManager.setFrozen(false);
|
||||
}
|
||||
if (!mHasMultiWindow) {
|
||||
resumeNativeThread();
|
||||
}
|
||||
|
@ -453,7 +453,9 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
}
|
||||
|
||||
// Default system back button behavior.
|
||||
super.onBackPressed();
|
||||
if (!isFinishing()) {
|
||||
super.onBackPressed();
|
||||
}
|
||||
}
|
||||
|
||||
// Called by JNI from SDL.
|
||||
|
@ -466,7 +468,9 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
SDLActivity.this.superOnBackPressed();
|
||||
if (!SDLActivity.this.isFinishing()) {
|
||||
SDLActivity.this.superOnBackPressed();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -633,6 +637,8 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
imm.hideSoftInputFromWindow(mTextEdit.getWindowToken(), 0);
|
||||
|
||||
mScreenKeyboardShown = false;
|
||||
|
||||
mSurface.requestFocus();
|
||||
}
|
||||
break;
|
||||
case COMMAND_SET_KEEP_SCREEN_ON:
|
||||
|
@ -724,7 +730,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
}
|
||||
}
|
||||
|
||||
if (bShouldWait) {
|
||||
if (bShouldWait && (SDLActivity.getContext() != null)) {
|
||||
// We'll wait for the surfaceChanged() method, which will notify us
|
||||
// when called. That way, we know our current size is really the
|
||||
// size we need, instead of grabbing a size that's still got
|
||||
|
@ -777,6 +783,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
public static native void nativeSetenv(String name, String value);
|
||||
public static native void onNativeOrientationChanged(int orientation);
|
||||
public static native void nativeAddTouch(int touchId, String name);
|
||||
public static native void nativePermissionResult(int requestCode, boolean result);
|
||||
|
||||
/**
|
||||
* This method is called by SDL using JNI.
|
||||
|
@ -811,39 +818,62 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
*/
|
||||
public void setOrientationBis(int w, int h, boolean resizable, String hint)
|
||||
{
|
||||
int orientation = -1;
|
||||
int orientation_landscape = -1;
|
||||
int orientation_portrait = -1;
|
||||
|
||||
/* If set, hint "explicitly controls which UI orientations are allowed". */
|
||||
if (hint.contains("LandscapeRight") && hint.contains("LandscapeLeft")) {
|
||||
orientation = ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE;
|
||||
orientation_landscape = ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE;
|
||||
} else if (hint.contains("LandscapeRight")) {
|
||||
orientation = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE;
|
||||
orientation_landscape = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE;
|
||||
} else if (hint.contains("LandscapeLeft")) {
|
||||
orientation = ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE;
|
||||
} else if (hint.contains("Portrait") && hint.contains("PortraitUpsideDown")) {
|
||||
orientation = ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT;
|
||||
} else if (hint.contains("Portrait")) {
|
||||
orientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT;
|
||||
} else if (hint.contains("PortraitUpsideDown")) {
|
||||
orientation = ActivityInfo.SCREEN_ORIENTATION_REVERSE_PORTRAIT;
|
||||
orientation_landscape = ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE;
|
||||
}
|
||||
|
||||
/* no valid hint */
|
||||
if (orientation == -1) {
|
||||
if (hint.contains("Portrait") && hint.contains("PortraitUpsideDown")) {
|
||||
orientation_portrait = ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT;
|
||||
} else if (hint.contains("Portrait")) {
|
||||
orientation_portrait = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT;
|
||||
} else if (hint.contains("PortraitUpsideDown")) {
|
||||
orientation_portrait = ActivityInfo.SCREEN_ORIENTATION_REVERSE_PORTRAIT;
|
||||
}
|
||||
|
||||
boolean is_landscape_allowed = (orientation_landscape == -1 ? false : true);
|
||||
boolean is_portrait_allowed = (orientation_portrait == -1 ? false : true);
|
||||
int req = -1; /* Requested orientation */
|
||||
|
||||
/* No valid hint, nothing is explicitly allowed */
|
||||
if (!is_portrait_allowed && !is_landscape_allowed) {
|
||||
if (resizable) {
|
||||
/* no fixed orientation */
|
||||
/* All orientations are allowed */
|
||||
req = ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR;
|
||||
} else {
|
||||
if (w > h) {
|
||||
orientation = ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE;
|
||||
/* Fixed window and nothing specified. Get orientation from w/h of created window */
|
||||
req = (w > h ? ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE : ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT);
|
||||
}
|
||||
} else {
|
||||
/* At least one orientation is allowed */
|
||||
if (resizable) {
|
||||
if (is_portrait_allowed && is_landscape_allowed) {
|
||||
/* hint allows both landscape and portrait, promote to full sensor */
|
||||
req = ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR;
|
||||
} else {
|
||||
orientation = ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT;
|
||||
/* Use the only one allowed "orientation" */
|
||||
req = (is_landscape_allowed ? orientation_landscape : orientation_portrait);
|
||||
}
|
||||
} else {
|
||||
/* Fixed window and both orientations are allowed. Choose one. */
|
||||
if (is_portrait_allowed && is_landscape_allowed) {
|
||||
req = (w > h ? orientation_landscape : orientation_portrait);
|
||||
} else {
|
||||
/* Use the only one allowed "orientation" */
|
||||
req = (is_landscape_allowed ? orientation_landscape : orientation_portrait);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Log.v("SDL", "setOrientation() orientation=" + orientation + " width=" + w +" height="+ h +" resizable=" + resizable + " hint=" + hint);
|
||||
if (orientation != -1) {
|
||||
mSingleton.setRequestedOrientation(orientation);
|
||||
}
|
||||
Log.v("SDL", "setOrientation() requestedOrientation=" + req + " width=" + w +" height="+ h +" resizable=" + resizable + " hint=" + hint);
|
||||
mSingleton.setRequestedOrientation(req);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -970,6 +1000,9 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
if (Build.MANUFACTURER.equals("Amlogic") && Build.MODEL.equals("X96-W")) {
|
||||
return true;
|
||||
}
|
||||
if (Build.MANUFACTURER.equals("Amlogic") && Build.MODEL.startsWith("TV")) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -979,6 +1012,9 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
public static boolean isTablet() {
|
||||
DisplayMetrics metrics = new DisplayMetrics();
|
||||
Activity activity = (Activity)getContext();
|
||||
if (activity == null) {
|
||||
return false;
|
||||
}
|
||||
activity.getWindowManager().getDefaultDisplay().getMetrics(metrics);
|
||||
|
||||
double dWidthInches = metrics.widthPixels / (double)metrics.xdpi;
|
||||
|
@ -994,6 +1030,9 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
* This method is called by SDL using JNI.
|
||||
*/
|
||||
public static boolean isChromebook() {
|
||||
if (getContext() == null) {
|
||||
return false;
|
||||
}
|
||||
return getContext().getPackageManager().hasSystemFeature("org.chromium.arc.device_management");
|
||||
}
|
||||
|
||||
|
@ -1565,6 +1604,32 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called by SDL using JNI.
|
||||
*/
|
||||
public static void requestPermission(String permission, int requestCode) {
|
||||
if (Build.VERSION.SDK_INT < 23) {
|
||||
nativePermissionResult(requestCode, true);
|
||||
return;
|
||||
}
|
||||
|
||||
Activity activity = (Activity)getContext();
|
||||
if (activity.checkSelfPermission(permission) != PackageManager.PERMISSION_GRANTED) {
|
||||
activity.requestPermissions(new String[]{permission}, requestCode);
|
||||
} else {
|
||||
nativePermissionResult(requestCode, true);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
|
||||
if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
|
||||
nativePermissionResult(requestCode, true);
|
||||
} else {
|
||||
nativePermissionResult(requestCode, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1590,7 +1655,7 @@ class SDLMain implements Runnable {
|
|||
|
||||
Log.v("SDL", "Finished main function");
|
||||
|
||||
if (SDLActivity.mSingleton.isFinishing()) {
|
||||
if (SDLActivity.mSingleton == null || SDLActivity.mSingleton.isFinishing()) {
|
||||
// Activity is already being destroyed
|
||||
} else {
|
||||
// Let's finish the Activity
|
||||
|
@ -1825,7 +1890,9 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
|
|||
|
||||
if (source == InputDevice.SOURCE_UNKNOWN) {
|
||||
InputDevice device = InputDevice.getDevice(deviceId);
|
||||
source = device.getSources();
|
||||
if (device != null) {
|
||||
source = device.getSources();
|
||||
}
|
||||
}
|
||||
|
||||
if ((source & InputDevice.SOURCE_KEYBOARD) != 0) {
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
#
|
||||
|
||||
# Base version of SDL, used for packaging purposes
|
||||
$SDLVersion = "2.0.10"
|
||||
$SDLVersion = "2.0.12"
|
||||
|
||||
# Gets the .bat file that sets up an MSBuild environment, given one of
|
||||
# Visual Studio's, "PlatformToolset"s.
|
||||
|
|
|
@ -757,8 +757,10 @@ macro(CheckOpenGLX11)
|
|||
endmacro()
|
||||
|
||||
# Requires:
|
||||
# - nada
|
||||
# - PkgCheckModules
|
||||
macro(CheckOpenGLESX11)
|
||||
pkg_check_modules(EGL egl)
|
||||
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} ${EGL_CFLAGS}")
|
||||
if(VIDEO_OPENGLES)
|
||||
check_c_source_compiles("
|
||||
#define EGL_API_FB
|
||||
|
@ -1074,7 +1076,7 @@ macro(CheckHIDAPI)
|
|||
set(HAVE_HIDAPI FALSE)
|
||||
pkg_check_modules(LIBUSB libusb)
|
||||
if (LIBUSB_FOUND)
|
||||
check_include_file(libusb.h HAVE_LIBUSB_H)
|
||||
check_include_file(libusb.h HAVE_LIBUSB_H ${LIBUSB_CFLAGS})
|
||||
if (HAVE_LIBUSB_H)
|
||||
set(HAVE_HIDAPI TRUE)
|
||||
endif()
|
||||
|
@ -1088,8 +1090,15 @@ macro(CheckHIDAPI)
|
|||
set(SOURCE_FILES ${SOURCE_FILES} ${HIDAPI_SOURCES})
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${LIBUSB_CFLAGS} -I${SDL2_SOURCE_DIR}/src/hidapi/hidapi")
|
||||
if(NOT HIDAPI_SKIP_LIBUSB)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${SDL2_SOURCE_DIR}/src/hidapi/libusb/hid.c)
|
||||
list(APPEND EXTRA_LIBS ${LIBUSB_LIBS})
|
||||
if(HIDAPI_ONLY_LIBUSB)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${SDL2_SOURCE_DIR}/src/hidapi/libusb/hid.c)
|
||||
list(APPEND EXTRA_LIBS ${LIBUSB_LIBS})
|
||||
else()
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${SDL2_SOURCE_DIR}/src/hidapi/SDL_hidapi.c)
|
||||
# libusb is loaded dynamically, so don't add it to EXTRA_LIBS
|
||||
FindLibraryAndSONAME("usb-1.0")
|
||||
set(SDL_LIBUSB_DYNAMIC "\"${USB_LIB_SONAME}\"")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
|
290
sdl2/configure
vendored
290
sdl2/configure
vendored
|
@ -852,6 +852,8 @@ enable_diskaudio
|
|||
enable_dummyaudio
|
||||
enable_libsamplerate
|
||||
enable_libsamplerate_shared
|
||||
enable_arm_simd
|
||||
enable_arm_neon
|
||||
enable_video_wayland
|
||||
enable_video_wayland_qt_touch
|
||||
enable_wayland_shared
|
||||
|
@ -869,6 +871,7 @@ enable_video_x11_xshape
|
|||
enable_video_x11_vm
|
||||
enable_video_vivante
|
||||
enable_video_cocoa
|
||||
enable_video_metal
|
||||
enable_render_metal
|
||||
enable_video_directfb
|
||||
enable_directfb_shared
|
||||
|
@ -1621,6 +1624,8 @@ Optional Features:
|
|||
[[default=yes]]
|
||||
--enable-libsamplerate-shared
|
||||
dynamically load libsamplerate [[default=yes]]
|
||||
--enable-arm-simd use SIMD assembly blitters on ARM [[default=yes]]
|
||||
--enable-arm-neon use NEON assembly blitters on ARM [[default=no]]
|
||||
--enable-video-wayland use Wayland video driver [[default=yes]]
|
||||
--enable-video-wayland-qt-touch
|
||||
QtWayland server support for Wayland video driver
|
||||
|
@ -1647,6 +1652,7 @@ Optional Features:
|
|||
--enable-video-x11-vm use X11 VM extension for fullscreen [[default=yes]]
|
||||
--enable-video-vivante use Vivante EGL video driver [[default=yes]]
|
||||
--enable-video-cocoa use Cocoa video driver [[default=yes]]
|
||||
--enable-video-metal include Metal support [[default=yes]]
|
||||
--enable-render-metal enable the Metal render driver [[default=yes]]
|
||||
--enable-video-directfb use DirectFB video driver [[default=no]]
|
||||
--enable-directfb-shared
|
||||
|
@ -1675,7 +1681,7 @@ Optional Features:
|
|||
--enable-wasapi use the Windows WASAPI audio driver [[default=yes]]
|
||||
--enable-sdl-dlopen use dlopen for shared object loading [[default=yes]]
|
||||
--enable-hidapi use HIDAPI for low level joystick drivers
|
||||
[[default=maybe]]
|
||||
[[default=no]]
|
||||
--enable-clock_gettime use clock_gettime() instead of gettimeofday() on
|
||||
UNIX [[default=yes]]
|
||||
--enable-rpath use an rpath when linking SDL [[default=yes]]
|
||||
|
@ -2811,9 +2817,9 @@ orig_CFLAGS="$CFLAGS"
|
|||
#
|
||||
SDL_MAJOR_VERSION=2
|
||||
SDL_MINOR_VERSION=0
|
||||
SDL_MICRO_VERSION=10
|
||||
SDL_MICRO_VERSION=12
|
||||
SDL_INTERFACE_AGE=0
|
||||
SDL_BINARY_AGE=10
|
||||
SDL_BINARY_AGE=12
|
||||
SDL_VERSION=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION.$SDL_MICRO_VERSION
|
||||
|
||||
|
||||
|
@ -16972,7 +16978,7 @@ fi
|
|||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
fi
|
||||
|
||||
for ac_func in malloc calloc realloc free getenv setenv putenv unsetenv qsort abs bcopy memset memcpy memmove wcslen wcscmp strlen strlcpy strlcat _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 fopen64 fseeko fseeko64 sigaction setjmp nanosleep sysconf sysctlbyname getauxval poll _Exit
|
||||
for ac_func in malloc calloc realloc free getenv setenv putenv unsetenv qsort abs bcopy memset memcpy memmove wcslen wcslcpy wcslcat wcsdup wcsstr wcscmp wcsncmp strlen strlcpy strlcat _strrev _strupr _strlwr strchr strrchr strstr strtok_r itoa _ltoa _uitoa _ultoa strtol strtoul _i64toa _ui64toa strtoll strtoull atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp vsscanf vsnprintf fopen64 fseeko fseeko64 sigaction setjmp nanosleep sysconf sysctlbyname getauxval poll _Exit
|
||||
do :
|
||||
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
|
||||
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
|
||||
|
@ -19356,6 +19362,106 @@ _ACEOF
|
|||
fi
|
||||
}
|
||||
|
||||
CheckARM()
|
||||
{
|
||||
# Check whether --enable-arm-simd was given.
|
||||
if test "${enable_arm_simd+set}" = set; then :
|
||||
enableval=$enable_arm_simd; enable_arm_simd=$enableval
|
||||
else
|
||||
enable_arm_simd=yes
|
||||
fi
|
||||
|
||||
if test x$enable_video = xyes -a x$enable_assembly = xyes -a x$enable_arm_simd = xyes; then
|
||||
save_CFLAGS="$CFLAGS"
|
||||
have_arm_simd=no
|
||||
CFLAGS="-x assembler-with-cpp $CFLAGS"
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ARM SIMD" >&5
|
||||
$as_echo_n "checking for ARM SIMD... " >&6; }
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
.text
|
||||
.arch armv6
|
||||
.object_arch armv4
|
||||
.arm
|
||||
.altmacro
|
||||
#ifndef __ARM_EABI__
|
||||
#error EABI is required (to be sure that calling conventions are compatible)
|
||||
#endif
|
||||
pld [r0]
|
||||
uqadd8 r0, r0, r0
|
||||
|
||||
_ACEOF
|
||||
if ac_fn_c_try_compile "$LINENO"; then :
|
||||
have_arm_simd=yes
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_arm_simd" >&5
|
||||
$as_echo "$have_arm_simd" >&6; }
|
||||
|
||||
CFLAGS="$save_CFLAGS"
|
||||
|
||||
if test x$have_arm_simd = xyes; then
|
||||
$as_echo "#define SDL_ARM_SIMD_BLITTERS 1" >>confdefs.h
|
||||
|
||||
SOURCES="$SOURCES $srcdir/src/video/arm/pixman-arm-simd*.S"
|
||||
WARN_ABOUT_ARM_SIMD_ASM_MIT="yes"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
CheckNEON()
|
||||
{
|
||||
# Check whether --enable-arm-neon was given.
|
||||
if test "${enable_arm_neon+set}" = set; then :
|
||||
enableval=$enable_arm_neon; enable_arm_neon=$enableval
|
||||
else
|
||||
enable_arm_neon=no
|
||||
fi
|
||||
|
||||
if test x$enable_video = xyes -a x$enable_assembly = xyes -a x$enable_arm_neon = xyes; then
|
||||
save_CFLAGS="$CFLAGS"
|
||||
have_arm_neon=no
|
||||
CFLAGS="-x assembler-with-cpp $CFLAGS"
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ARM NEON" >&5
|
||||
$as_echo_n "checking for ARM NEON... " >&6; }
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
.text
|
||||
.fpu neon
|
||||
.arch armv7a
|
||||
.object_arch armv4
|
||||
.eabi_attribute 10, 0
|
||||
.arm
|
||||
.altmacro
|
||||
#ifndef __ARM_EABI__
|
||||
#error EABI is required (to be sure that calling conventions are compatible)
|
||||
#endif
|
||||
pld [r0]
|
||||
vmovn.u16 d0, q0
|
||||
|
||||
_ACEOF
|
||||
if ac_fn_c_try_compile "$LINENO"; then :
|
||||
have_arm_neon=yes
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_arm_neon" >&5
|
||||
$as_echo "$have_arm_neon" >&6; }
|
||||
|
||||
CFLAGS="$save_CFLAGS"
|
||||
|
||||
if test x$have_arm_neon = xyes; then
|
||||
$as_echo "#define SDL_ARM_NEON_BLITTERS 1" >>confdefs.h
|
||||
|
||||
SOURCES="$SOURCES $srcdir/src/video/arm/pixman-arm-neon*.S"
|
||||
WARN_ABOUT_ARM_NEON_ASM_MIT="yes"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
CheckVisibilityHidden()
|
||||
{
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC -fvisibility=hidden option" >&5
|
||||
|
@ -19884,10 +19990,10 @@ fi
|
|||
# This isn't necessary for X11, but fixes GLX detection
|
||||
if test "x$x_includes" = xNONE && \
|
||||
test "x$x_libraries" = xNONE && \
|
||||
test -d /usr/X11R6/include && \
|
||||
test -d /usr/X11R6/lib; then
|
||||
x_includes="/usr/X11R6/include"
|
||||
x_libraries="/usr/X11R6/lib"
|
||||
test -d /opt/X11/include && \
|
||||
test -d /opt/X11/lib; then
|
||||
x_includes="/opt/X11/include"
|
||||
x_libraries="/opt/X11/lib"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
@ -20585,15 +20691,16 @@ fi
|
|||
|
||||
case "$host" in
|
||||
*-*-darwin*)
|
||||
x11_lib='/usr/X11R6/lib/libX11.6.dylib'
|
||||
x11ext_lib='/usr/X11R6/lib/libXext.6.dylib'
|
||||
xcursor_lib='/usr/X11R6/lib/libXcursor.1.dylib'
|
||||
xinerama_lib='/usr/X11R6/lib/libXinerama.1.dylib'
|
||||
xinput_lib='/usr/X11R6/lib/libXi.6.dylib'
|
||||
xrandr_lib='/usr/X11R6/lib/libXrandr.2.dylib'
|
||||
xrender_lib='/usr/X11R6/lib/libXrender.1.dylib'
|
||||
xss_lib='/usr/X11R6/lib/libXss.1.dylib'
|
||||
xvidmode_lib='/usr/X11R6/lib/libXxf86vm.1.dylib'
|
||||
# Apple now puts this in /opt/X11
|
||||
x11_lib='/opt/X11/lib/libX11.6.dylib'
|
||||
x11ext_lib='/opt/X11/lib/libXext.6.dylib'
|
||||
xcursor_lib='/opt/X11/lib/libXcursor.1.dylib'
|
||||
xinerama_lib='/opt/X11/lib/libXinerama.1.dylib'
|
||||
xinput_lib='/opt/X11/lib/libXi.6.dylib'
|
||||
xrandr_lib='/opt/X11/lib/libXrandr.2.dylib'
|
||||
xrender_lib='/opt/X11/lib/libXrender.1.dylib'
|
||||
xss_lib='/opt/X11/lib/libXss.1.dylib'
|
||||
xvidmode_lib='/opt/X11/lib/libXxf86vm.1.dylib'
|
||||
;;
|
||||
*-*-openbsd*)
|
||||
x11_lib='libX11.so'
|
||||
|
@ -21380,6 +21487,9 @@ $as_echo "#define SDL_VIDEO_DRIVER_X11_XVIDMODE 1" >>confdefs.h
|
|||
SUMMARY_video_x11="${SUMMARY_video_x11} xvidmode"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
# Prevent Mesa from including X11 headers
|
||||
EXTRA_CFLAGS="$EXTRA_CFLAGS -DMESA_EGL_NO_X11_HEADERS -DEGL_NO_X11"
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -21530,6 +21640,13 @@ $as_echo "#define SDL_VIDEO_DRIVER_COCOA 1" >>confdefs.h
|
|||
|
||||
CheckMETAL()
|
||||
{
|
||||
# Check whether --enable-video-metal was given.
|
||||
if test "${enable_video_metal+set}" = set; then :
|
||||
enableval=$enable_video_metal;
|
||||
else
|
||||
enable_video_metal=yes
|
||||
fi
|
||||
|
||||
# Check whether --enable-render-metal was given.
|
||||
if test "${enable_render_metal+set}" = set; then :
|
||||
enableval=$enable_render_metal;
|
||||
|
@ -21537,7 +21654,7 @@ else
|
|||
enable_render_metal=yes
|
||||
fi
|
||||
|
||||
if test x$enable_render = xyes -a x$enable_render_metal = xyes; then
|
||||
if test x$enable_video = xyes -a x$enable_video_metal = xyes; then
|
||||
save_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -x objective-c"
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Metal framework" >&5
|
||||
|
@ -21574,11 +21691,17 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
|||
$as_echo "$have_metal" >&6; }
|
||||
if test x$have_metal = xyes; then
|
||||
|
||||
$as_echo "#define SDL_VIDEO_METAL 1" >>confdefs.h
|
||||
|
||||
if test x$enable_render = xyes -a x$enable_render_metal = xyes; then
|
||||
|
||||
$as_echo "#define SDL_VIDEO_RENDER_METAL 1" >>confdefs.h
|
||||
|
||||
SOURCES="$SOURCES $srcdir/src/render/metal/*.m"
|
||||
SOURCES="$SOURCES $srcdir/src/render/metal/*.m"
|
||||
fi
|
||||
SUMMARY_video="${SUMMARY_video} metal"
|
||||
else
|
||||
enable_video_metal=no
|
||||
enable_render_metal=no
|
||||
fi
|
||||
fi
|
||||
|
@ -22716,7 +22839,7 @@ fi
|
|||
|
||||
$as_echo "#define SDL_USE_IME 1" >>confdefs.h
|
||||
|
||||
SOURCES="$SOURCES $srcdir/src/core/linux/SDL_ime.c"
|
||||
SOURCES="$SOURCES $srcdir/src/core/linux/SDL_ime.c"
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -23608,14 +23731,6 @@ fi
|
|||
|
||||
fi
|
||||
|
||||
ac_fn_c_check_header_mongrel "$LINENO" "endpointvolume.h" "ac_cv_header_endpointvolume_h" "$ac_includes_default"
|
||||
if test "x$ac_cv_header_endpointvolume_h" = xyes; then :
|
||||
$as_echo "#define HAVE_ENDPOINTVOLUME_H 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# Check whether --enable-wasapi was given.
|
||||
if test "${enable_wasapi+set}" = set; then :
|
||||
enableval=$enable_wasapi;
|
||||
|
@ -24105,30 +24220,24 @@ CheckHIDAPI()
|
|||
{
|
||||
# The hidraw support doesn't catch Xbox, PS4 and Nintendo controllers,
|
||||
# so we'll just use libusb when it's available.
|
||||
#
|
||||
# Except that libusb requires root permissions to open devices, so that's not generally useful, and we'll disable this by default.
|
||||
#
|
||||
# On macOS and Windows, where you don't need libusb or root, we default to yes.
|
||||
skiplibusb=no
|
||||
case "$host" in
|
||||
*-*-cygwin* | *-*-mingw32* | *-*-darwin* )
|
||||
# libusb does not support iOS
|
||||
arm*-apple-darwin* | *-ios-* )
|
||||
skiplibusb=yes
|
||||
;;
|
||||
# On the other hand, *BSD specifically uses libusb only
|
||||
*-*-*bsd* )
|
||||
onlylibusb=yes
|
||||
;;
|
||||
esac
|
||||
|
||||
# Check whether --enable-hidapi was given.
|
||||
if test "${enable_hidapi+set}" = set; then :
|
||||
enableval=$enable_hidapi;
|
||||
else
|
||||
enable_hidapi=maybe
|
||||
enable_hidapi=no
|
||||
fi
|
||||
|
||||
hidapi_support=no
|
||||
|
||||
if test x$enable_hidapi = xmaybe; then
|
||||
enable_hidapi=$skiplibusb
|
||||
fi
|
||||
|
||||
if test x$enable_joystick = xyes -a x$enable_hidapi = xyes; then
|
||||
if test x$skiplibusb = xyes; then
|
||||
hidapi_support=yes
|
||||
|
@ -24213,6 +24322,10 @@ fi
|
|||
CFLAGS="$save_CFLAGS"
|
||||
if test x$have_libusb_h = xyes; then
|
||||
hidapi_support=yes
|
||||
elif test x$onlylibusb = xyes; then
|
||||
hidapi_support=no
|
||||
else
|
||||
hidapi_support=yes
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -24222,11 +24335,37 @@ $as_echo "#define SDL_JOYSTICK_HIDAPI 1" >>confdefs.h
|
|||
|
||||
EXTRA_CFLAGS="$EXTRA_CFLAGS -I$srcdir/src/hidapi/hidapi"
|
||||
SOURCES="$SOURCES $srcdir/src/joystick/hidapi/*.c"
|
||||
SOURCES="$SOURCES $srcdir/src/hidapi/SDL_hidapi.c"
|
||||
|
||||
if test x$skiplibusb = xno; then
|
||||
SOURCES="$SOURCES $srcdir/src/hidapi/libusb/hid.c"
|
||||
if test x$have_libusb_h = xyes; then
|
||||
EXTRA_CFLAGS="$EXTRA_CFLAGS $LIBUSB_CFLAGS"
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS $LIBUSB_LIBS"
|
||||
if test x$onlylibusb = xyes; then
|
||||
SOURCES="$SOURCES $srcdir/src/hidapi/libusb/hid.c"
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS $LIBUSB_LIBS"
|
||||
else
|
||||
if test x$have_loadso != xyes; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You must have SDL_LoadObject() support for dynamic libusb loading" >&5
|
||||
$as_echo "$as_me: WARNING: You must have SDL_LoadObject() support for dynamic libusb loading" >&2;}
|
||||
fi
|
||||
# libusb is loaded dynamically, so don't add it to LDFLAGS
|
||||
libusb_lib=""
|
||||
case "$host" in
|
||||
*-*-darwin* )
|
||||
libusb_lib="libusb-1.0.0.dylib"
|
||||
;;
|
||||
*-*-cygwin* | *-*-mingw32* )
|
||||
libusb_lib="libusb-1.0.dll"
|
||||
;;
|
||||
esac
|
||||
if test x$libusb_lib = x; then
|
||||
libusb_lib=`find_lib "libusb-1.0.so.*" "" | sed 's/.*\/\(.*\)/\1/; q'`
|
||||
fi
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define SDL_LIBUSB_DYNAMIC "$libusb_lib"
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -24445,6 +24584,8 @@ case "$host" in
|
|||
CheckDiskAudio
|
||||
CheckDummyAudio
|
||||
CheckDLOPEN
|
||||
CheckARM
|
||||
CheckNEON
|
||||
CheckOSS
|
||||
CheckALSA
|
||||
CheckPulseAudio
|
||||
|
@ -24732,9 +24873,6 @@ $as_echo "#define SDL_JOYSTICK_WINMM 1" >>confdefs.h
|
|||
fi
|
||||
SOURCES="$SOURCES $srcdir/src/joystick/windows/*.c"
|
||||
have_joystick=yes
|
||||
if test x$hidapi_support = xyes; then
|
||||
SOURCES="$SOURCES $srcdir/src/hidapi/windows/hid.c"
|
||||
fi
|
||||
fi
|
||||
if test x$enable_haptic = xyes; then
|
||||
if test x$have_dinput = xyes -o x$have_xinput = xyes; then
|
||||
|
@ -24971,6 +25109,14 @@ $as_echo "#define SDL_JOYSTICK_MFI 1" >>confdefs.h
|
|||
# have_haptic=yes
|
||||
# EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,ForceFeedback"
|
||||
#fi
|
||||
# Set up files for the sensor library
|
||||
if test x$enable_sensor = xyes; then
|
||||
|
||||
$as_echo "#define SDL_SENSOR_COREMOTION 1" >>confdefs.h
|
||||
|
||||
SOURCES="$SOURCES $srcdir/src/sensor/coremotion/*.m"
|
||||
have_sensor=yes
|
||||
fi
|
||||
# Set up files for the power library
|
||||
if test x$enable_power = xyes; then
|
||||
|
||||
|
@ -25030,7 +25176,7 @@ $as_echo "#define SDL_VIDEO_RENDER_OGL_ES2 1" >>confdefs.h
|
|||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,QuartzCore"
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,UIKit"
|
||||
|
||||
if test x$enable_render = xyes -a x$enable_render_metal = xyes; then
|
||||
if test x$enable_video_metal = xyes -o x$enable_video_vulkan = xyes; then
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,Metal"
|
||||
fi
|
||||
;;
|
||||
|
@ -25077,9 +25223,6 @@ $as_echo "#define SDL_JOYSTICK_IOKIT 1" >>confdefs.h
|
|||
|
||||
SOURCES="$SOURCES $srcdir/src/joystick/darwin/*.c"
|
||||
have_joystick=yes
|
||||
if test x$hidapi_support = xyes; then
|
||||
SOURCES="$SOURCES $srcdir/src/hidapi/mac/hid.c"
|
||||
fi
|
||||
fi
|
||||
# Set up files for the haptic library
|
||||
if test x$enable_haptic = xyes; then
|
||||
|
@ -25127,7 +25270,7 @@ $as_echo "#define SDL_TIMER_UNIX 1" >>confdefs.h
|
|||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,Carbon"
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,IOKit"
|
||||
|
||||
if test x$enable_render = xyes -a x$enable_render_metal = xyes; then
|
||||
if test x$enable_video_metal = xyes -o x$enable_video_vulkan = xyes; then
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-weak_framework,QuartzCore -Wl,-weak_framework,Metal"
|
||||
fi
|
||||
;;
|
||||
|
@ -25213,6 +25356,27 @@ $as_echo "#define SDL_FILESYSTEM_EMSCRIPTEN 1" >>confdefs.h
|
|||
# Set up files for the timer library
|
||||
if test x$enable_timers = xyes; then
|
||||
|
||||
$as_echo "#define SDL_TIMER_UNIX 1" >>confdefs.h
|
||||
|
||||
SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
|
||||
have_timers=yes
|
||||
fi
|
||||
;;
|
||||
*-*-riscos*)
|
||||
ARCH=riscos
|
||||
CheckVisibilityHidden
|
||||
CheckDeclarationAfterStatement
|
||||
CheckDummyVideo
|
||||
CheckDiskAudio
|
||||
CheckDummyAudio
|
||||
CheckDLOPEN
|
||||
CheckOSS
|
||||
CheckPTHREAD
|
||||
CheckClockGettime
|
||||
|
||||
# Set up files for the timer library
|
||||
if test x$enable_timers = xyes; then
|
||||
|
||||
$as_echo "#define SDL_TIMER_UNIX 1" >>confdefs.h
|
||||
|
||||
SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
|
||||
|
@ -25352,7 +25516,7 @@ VERSION_OBJECTS=`echo $VERSION_SOURCES`
|
|||
VERSION_DEPENDS=`echo $VERSION_SOURCES`
|
||||
VERSION_OBJECTS=`echo "$VERSION_OBJECTS" | sed 's,[^ ]*/\([^ ]*\)\.rc,$(objects)/\1.o,g'`
|
||||
VERSION_DEPENDS=`echo "$VERSION_DEPENDS" | sed "s,\\([^ ]*\\)/\\([^ ]*\\)\\.rc,\\\\
|
||||
\\$(objects)/\\2.o: \\1/\\2.rc\\\\
|
||||
\\$(objects)/\\2.o: \\1/\\2.rc \\$(objects)/.created\\\\
|
||||
\\$(WINDRES) \\$< \\$@,g"`
|
||||
|
||||
SDLMAIN_OBJECTS=`echo $SDLMAIN_SOURCES`
|
||||
|
@ -25466,7 +25630,7 @@ $SDLTEST_DEPENDS
|
|||
$WAYLAND_PROTOCOLS_DEPENDS
|
||||
__EOF__
|
||||
|
||||
ac_config_files="$ac_config_files Makefile:Makefile.in:Makefile.rules sdl2-config sdl2-config.cmake SDL2.spec sdl2.pc"
|
||||
ac_config_files="$ac_config_files Makefile:Makefile.in:Makefile.rules sdl2-config sdl2-config.cmake sdl2-config-version.cmake SDL2.spec sdl2.pc"
|
||||
|
||||
ac_config_commands="$ac_config_commands sdl2_config"
|
||||
|
||||
|
@ -25516,6 +25680,23 @@ if test x$have_fcitx_frontend_h_hdr = xyes; then
|
|||
else
|
||||
SUMMARY="${SUMMARY}Using fcitx : NO\n"
|
||||
fi
|
||||
|
||||
if test x$WARN_ABOUT_ARM_SIMD_ASM_MIT = xyes; then
|
||||
SUMMARY="${SUMMARY}\nSDL is being built with ARM SIMD optimizations, which\n"
|
||||
SUMMARY="${SUMMARY}uses code licensed under the MIT license. If this is a\n"
|
||||
SUMMARY="${SUMMARY}problem, please disable that code by rerunning the\n"
|
||||
SUMMARY="${SUMMARY}configure script with:\n"
|
||||
SUMMARY="${SUMMARY}\n --disable-arm-simd\n"
|
||||
fi
|
||||
|
||||
if test x$WARN_ABOUT_ARM_NEON_ASM_MIT = xyes; then
|
||||
SUMMARY="${SUMMARY}\nSDL is being built with ARM NEON optimizations, which\n"
|
||||
SUMMARY="${SUMMARY}uses code licensed under the MIT license. If this is a\n"
|
||||
SUMMARY="${SUMMARY}problem, please disable that code by rerunning the\n"
|
||||
SUMMARY="${SUMMARY}configure script with:\n"
|
||||
SUMMARY="${SUMMARY}\n --disable-arm-neon\n"
|
||||
fi
|
||||
|
||||
ac_config_commands="$ac_config_commands summary"
|
||||
|
||||
|
||||
|
@ -26601,6 +26782,7 @@ do
|
|||
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile:Makefile.in:Makefile.rules" ;;
|
||||
"sdl2-config") CONFIG_FILES="$CONFIG_FILES sdl2-config" ;;
|
||||
"sdl2-config.cmake") CONFIG_FILES="$CONFIG_FILES sdl2-config.cmake" ;;
|
||||
"sdl2-config-version.cmake") CONFIG_FILES="$CONFIG_FILES sdl2-config-version.cmake" ;;
|
||||
"SDL2.spec") CONFIG_FILES="$CONFIG_FILES SDL2.spec" ;;
|
||||
"sdl2.pc") CONFIG_FILES="$CONFIG_FILES sdl2.pc" ;;
|
||||
"sdl2_config") CONFIG_COMMANDS="$CONFIG_COMMANDS sdl2_config" ;;
|
||||
|
|
|
@ -20,9 +20,9 @@ dnl Set various version strings - taken gratefully from the GTk sources
|
|||
#
|
||||
SDL_MAJOR_VERSION=2
|
||||
SDL_MINOR_VERSION=0
|
||||
SDL_MICRO_VERSION=10
|
||||
SDL_MICRO_VERSION=12
|
||||
SDL_INTERFACE_AGE=0
|
||||
SDL_BINARY_AGE=10
|
||||
SDL_BINARY_AGE=12
|
||||
SDL_VERSION=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION.$SDL_MICRO_VERSION
|
||||
|
||||
AC_SUBST(SDL_MAJOR_VERSION)
|
||||
|
@ -335,7 +335,7 @@ if test x$enable_libc = xyes; then
|
|||
AC_DEFINE(HAVE_MPROTECT, 1, [ ])
|
||||
]),
|
||||
)
|
||||
AC_CHECK_FUNCS(malloc calloc realloc free getenv setenv putenv unsetenv qsort abs bcopy memset memcpy memmove wcslen wcscmp strlen strlcpy strlcat _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 fopen64 fseeko fseeko64 sigaction setjmp nanosleep sysconf sysctlbyname getauxval poll _Exit)
|
||||
AC_CHECK_FUNCS(malloc calloc realloc free getenv setenv putenv unsetenv qsort abs bcopy memset memcpy memmove wcslen wcslcpy wcslcat wcsdup wcsstr wcscmp wcsncmp strlen strlcpy strlcat _strrev _strupr _strlwr strchr strrchr strstr strtok_r itoa _ltoa _uitoa _ultoa strtol strtoul _i64toa _ui64toa strtoll strtoull atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp vsscanf vsnprintf fopen64 fseeko fseeko64 sigaction setjmp nanosleep sysconf sysctlbyname getauxval poll _Exit)
|
||||
|
||||
AC_CHECK_LIB(m, pow, [LIBS="$LIBS -lm"; EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lm"])
|
||||
AC_CHECK_FUNCS(acos acosf asin asinf atan atanf atan2 atan2f ceil ceilf copysign copysignf cos cosf exp expf fabs fabsf floor floorf fmod fmodf log logf log10 log10f pow powf scalbn scalbnf sin sinf sqrt sqrtf tan tanf)
|
||||
|
@ -1303,6 +1303,82 @@ AS_HELP_STRING([--enable-libsamplerate-shared], [dynamically load libsamplerate
|
|||
fi
|
||||
}
|
||||
|
||||
dnl Check for ARM instruction support using gas syntax
|
||||
CheckARM()
|
||||
{
|
||||
AC_ARG_ENABLE(arm-simd,
|
||||
AC_HELP_STRING([--enable-arm-simd], [use SIMD assembly blitters on ARM [[default=yes]]]),
|
||||
enable_arm_simd=$enableval, enable_arm_simd=yes)
|
||||
if test x$enable_video = xyes -a x$enable_assembly = xyes -a x$enable_arm_simd = xyes; then
|
||||
save_CFLAGS="$CFLAGS"
|
||||
have_arm_simd=no
|
||||
CFLAGS="-x assembler-with-cpp $CFLAGS"
|
||||
|
||||
AC_MSG_CHECKING(for ARM SIMD)
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
||||
.text
|
||||
.arch armv6
|
||||
.object_arch armv4
|
||||
.arm
|
||||
.altmacro
|
||||
#ifndef __ARM_EABI__
|
||||
#error EABI is required (to be sure that calling conventions are compatible)
|
||||
#endif
|
||||
pld [r0]
|
||||
uqadd8 r0, r0, r0
|
||||
]])], have_arm_simd=yes)
|
||||
AC_MSG_RESULT($have_arm_simd)
|
||||
|
||||
CFLAGS="$save_CFLAGS"
|
||||
|
||||
if test x$have_arm_simd = xyes; then
|
||||
AC_DEFINE(SDL_ARM_SIMD_BLITTERS)
|
||||
dnl SOURCES="$SOURCES $srcdir/src/video/arm/pixman-arm-simd*.c"
|
||||
SOURCES="$SOURCES $srcdir/src/video/arm/pixman-arm-simd*.S"
|
||||
WARN_ABOUT_ARM_SIMD_ASM_MIT="yes"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
dnl Check for ARM NEON instruction support using gas syntax
|
||||
CheckNEON()
|
||||
{
|
||||
AC_ARG_ENABLE(arm-neon,
|
||||
AC_HELP_STRING([--enable-arm-neon], [use NEON assembly blitters on ARM [[default=no]]]),
|
||||
enable_arm_neon=$enableval, enable_arm_neon=no)
|
||||
if test x$enable_video = xyes -a x$enable_assembly = xyes -a x$enable_arm_neon = xyes; then
|
||||
save_CFLAGS="$CFLAGS"
|
||||
have_arm_neon=no
|
||||
CFLAGS="-x assembler-with-cpp $CFLAGS"
|
||||
|
||||
AC_MSG_CHECKING(for ARM NEON)
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
||||
.text
|
||||
.fpu neon
|
||||
.arch armv7a
|
||||
.object_arch armv4
|
||||
.eabi_attribute 10, 0
|
||||
.arm
|
||||
.altmacro
|
||||
#ifndef __ARM_EABI__
|
||||
#error EABI is required (to be sure that calling conventions are compatible)
|
||||
#endif
|
||||
pld [r0]
|
||||
vmovn.u16 d0, q0
|
||||
]])], have_arm_neon=yes)
|
||||
AC_MSG_RESULT($have_arm_neon)
|
||||
|
||||
CFLAGS="$save_CFLAGS"
|
||||
|
||||
if test x$have_arm_neon = xyes; then
|
||||
AC_DEFINE(SDL_ARM_NEON_BLITTERS)
|
||||
dnl SOURCES="$SOURCES $srcdir/src/video/arm/pixman-arm-neon*.c"
|
||||
SOURCES="$SOURCES $srcdir/src/video/arm/pixman-arm-neon*.S"
|
||||
WARN_ABOUT_ARM_NEON_ASM_MIT="yes"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
dnl See if GCC's -fvisibility=hidden is supported (gcc4 and later, usually).
|
||||
dnl Details of this flag are here: http://gcc.gnu.org/wiki/Visibility
|
||||
CheckVisibilityHidden()
|
||||
|
@ -1610,10 +1686,10 @@ AS_HELP_STRING([--enable-video-x11], [use X11 video driver [[default=yes]]]),
|
|||
# This isn't necessary for X11, but fixes GLX detection
|
||||
if test "x$x_includes" = xNONE && \
|
||||
test "x$x_libraries" = xNONE && \
|
||||
test -d /usr/X11R6/include && \
|
||||
test -d /usr/X11R6/lib; then
|
||||
x_includes="/usr/X11R6/include"
|
||||
x_libraries="/usr/X11R6/lib"
|
||||
test -d /opt/X11/include && \
|
||||
test -d /opt/X11/lib; then
|
||||
x_includes="/opt/X11/include"
|
||||
x_libraries="/opt/X11/lib"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
@ -1626,15 +1702,16 @@ AS_HELP_STRING([--enable-x11-shared], [dynamically load X11 support [[default=ma
|
|||
|
||||
case "$host" in
|
||||
*-*-darwin*)
|
||||
x11_lib='/usr/X11R6/lib/libX11.6.dylib'
|
||||
x11ext_lib='/usr/X11R6/lib/libXext.6.dylib'
|
||||
xcursor_lib='/usr/X11R6/lib/libXcursor.1.dylib'
|
||||
xinerama_lib='/usr/X11R6/lib/libXinerama.1.dylib'
|
||||
xinput_lib='/usr/X11R6/lib/libXi.6.dylib'
|
||||
xrandr_lib='/usr/X11R6/lib/libXrandr.2.dylib'
|
||||
xrender_lib='/usr/X11R6/lib/libXrender.1.dylib'
|
||||
xss_lib='/usr/X11R6/lib/libXss.1.dylib'
|
||||
xvidmode_lib='/usr/X11R6/lib/libXxf86vm.1.dylib'
|
||||
# Apple now puts this in /opt/X11
|
||||
x11_lib='/opt/X11/lib/libX11.6.dylib'
|
||||
x11ext_lib='/opt/X11/lib/libXext.6.dylib'
|
||||
xcursor_lib='/opt/X11/lib/libXcursor.1.dylib'
|
||||
xinerama_lib='/opt/X11/lib/libXinerama.1.dylib'
|
||||
xinput_lib='/opt/X11/lib/libXi.6.dylib'
|
||||
xrandr_lib='/opt/X11/lib/libXrandr.2.dylib'
|
||||
xrender_lib='/opt/X11/lib/libXrender.1.dylib'
|
||||
xss_lib='/opt/X11/lib/libXss.1.dylib'
|
||||
xvidmode_lib='/opt/X11/lib/libXxf86vm.1.dylib'
|
||||
;;
|
||||
*-*-openbsd*)
|
||||
x11_lib='libX11.so'
|
||||
|
@ -1958,6 +2035,9 @@ AS_HELP_STRING([--enable-video-x11-vm], [use X11 VM extension for fullscreen [[d
|
|||
SUMMARY_video_x11="${SUMMARY_video_x11} xvidmode"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
# Prevent Mesa from including X11 headers
|
||||
EXTRA_CFLAGS="$EXTRA_CFLAGS -DMESA_EGL_NO_X11_HEADERS -DEGL_NO_X11"
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -2048,10 +2128,13 @@ AS_HELP_STRING([--enable-video-cocoa], [use Cocoa video driver [[default=yes]]])
|
|||
|
||||
CheckMETAL()
|
||||
{
|
||||
AC_ARG_ENABLE(video-metal,
|
||||
AC_HELP_STRING([--enable-video-metal], [include Metal support [[default=yes]]]),
|
||||
, enable_video_metal=yes)
|
||||
AC_ARG_ENABLE(render-metal,
|
||||
AS_HELP_STRING([--enable-render-metal], [enable the Metal render driver [[default=yes]]]),
|
||||
, enable_render_metal=yes)
|
||||
if test x$enable_render = xyes -a x$enable_render_metal = xyes; then
|
||||
if test x$enable_video = xyes -a x$enable_video_metal = xyes; then
|
||||
save_CFLAGS="$CFLAGS"
|
||||
dnl Work around that we don't have Objective-C support in autoconf
|
||||
CFLAGS="$CFLAGS -x objective-c"
|
||||
|
@ -2072,10 +2155,14 @@ AS_HELP_STRING([--enable-render-metal], [enable the Metal render driver [[defaul
|
|||
CFLAGS="$save_CFLAGS"
|
||||
AC_MSG_RESULT($have_metal)
|
||||
if test x$have_metal = xyes; then
|
||||
AC_DEFINE(SDL_VIDEO_RENDER_METAL, 1, [ ])
|
||||
SOURCES="$SOURCES $srcdir/src/render/metal/*.m"
|
||||
AC_DEFINE(SDL_VIDEO_METAL, 1, [ ])
|
||||
if test x$enable_render = xyes -a x$enable_render_metal = xyes; then
|
||||
AC_DEFINE(SDL_VIDEO_RENDER_METAL, 1, [ ])
|
||||
SOURCES="$SOURCES $srcdir/src/render/metal/*.m"
|
||||
fi
|
||||
SUMMARY_video="${SUMMARY_video} metal"
|
||||
else
|
||||
enable_video_metal=no
|
||||
enable_render_metal=no
|
||||
fi
|
||||
fi
|
||||
|
@ -2284,7 +2371,7 @@ CheckOpenGLESX11()
|
|||
if test x$video_opengl_egl = xyes; then
|
||||
AC_DEFINE(SDL_VIDEO_OPENGL_EGL, 1, [ ])
|
||||
fi
|
||||
|
||||
|
||||
if test x$enable_video_opengles1 = xyes; then
|
||||
AC_MSG_CHECKING(for OpenGL ES v1 headers)
|
||||
video_opengles_v1=no
|
||||
|
@ -2595,7 +2682,7 @@ AS_HELP_STRING([--enable-ime], [enable IME support [[default=yes]]]),
|
|||
, enable_ime=yes)
|
||||
if test x$enable_ime = xyes; then
|
||||
AC_DEFINE(SDL_USE_IME, 1, [ ])
|
||||
SOURCES="$SOURCES $srcdir/src/core/linux/SDL_ime.c"
|
||||
SOURCES="$SOURCES $srcdir/src/core/linux/SDL_ime.c"
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -3014,8 +3101,6 @@ XINPUT_STATE_EX s1;
|
|||
AC_DEFINE(HAVE_AUDIOCLIENT_H,1,[])
|
||||
fi
|
||||
|
||||
AC_CHECK_HEADER(endpointvolume.h,AC_DEFINE(HAVE_ENDPOINTVOLUME_H,1,[]))
|
||||
|
||||
AC_ARG_ENABLE(wasapi,
|
||||
AS_HELP_STRING([--enable-wasapi], [use the Windows WASAPI audio driver [[default=yes]]]),
|
||||
, enable_wasapi=yes)
|
||||
|
@ -3067,7 +3152,7 @@ CheckUSBHID()
|
|||
AC_CHECK_HEADER(libusb.h, [USB_CFLAGS="-DHAVE_LIBUSB_H"])
|
||||
AC_CHECK_LIB(usb, hid_init, [USB_LIBS="$USB_LIBS -lusb"])
|
||||
fi
|
||||
|
||||
|
||||
save_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS $USB_CFLAGS"
|
||||
|
||||
|
@ -3197,26 +3282,20 @@ CheckHIDAPI()
|
|||
{
|
||||
# The hidraw support doesn't catch Xbox, PS4 and Nintendo controllers,
|
||||
# so we'll just use libusb when it's available.
|
||||
#
|
||||
# Except that libusb requires root permissions to open devices, so that's not generally useful, and we'll disable this by default.
|
||||
#
|
||||
# On macOS and Windows, where you don't need libusb or root, we default to yes.
|
||||
skiplibusb=no
|
||||
case "$host" in
|
||||
*-*-cygwin* | *-*-mingw32* | *-*-darwin* )
|
||||
# libusb does not support iOS
|
||||
arm*-apple-darwin* | *-ios-* )
|
||||
skiplibusb=yes
|
||||
;;
|
||||
# On the other hand, *BSD specifically uses libusb only
|
||||
*-*-*bsd* )
|
||||
onlylibusb=yes
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_ARG_ENABLE(hidapi,
|
||||
AS_HELP_STRING([--enable-hidapi], [use HIDAPI for low level joystick drivers [[default=maybe]]]),
|
||||
, enable_hidapi=maybe)
|
||||
hidapi_support=no
|
||||
|
||||
if test x$enable_hidapi = xmaybe; then
|
||||
enable_hidapi=$skiplibusb
|
||||
fi
|
||||
|
||||
AS_HELP_STRING([--enable-hidapi], [use HIDAPI for low level joystick drivers [[default=no]]]),
|
||||
, enable_hidapi=no)
|
||||
if test x$enable_joystick = xyes -a x$enable_hidapi = xyes; then
|
||||
if test x$skiplibusb = xyes; then
|
||||
hidapi_support=yes
|
||||
|
@ -3228,6 +3307,10 @@ AS_HELP_STRING([--enable-hidapi], [use HIDAPI for low level joystick drivers [[d
|
|||
CFLAGS="$save_CFLAGS"
|
||||
if test x$have_libusb_h = xyes; then
|
||||
hidapi_support=yes
|
||||
elif test x$onlylibusb = xyes; then
|
||||
hidapi_support=no
|
||||
else
|
||||
hidapi_support=yes
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -3235,11 +3318,32 @@ AS_HELP_STRING([--enable-hidapi], [use HIDAPI for low level joystick drivers [[d
|
|||
AC_DEFINE(SDL_JOYSTICK_HIDAPI, 1, [ ])
|
||||
EXTRA_CFLAGS="$EXTRA_CFLAGS -I$srcdir/src/hidapi/hidapi"
|
||||
SOURCES="$SOURCES $srcdir/src/joystick/hidapi/*.c"
|
||||
SOURCES="$SOURCES $srcdir/src/hidapi/SDL_hidapi.c"
|
||||
|
||||
if test x$skiplibusb = xno; then
|
||||
SOURCES="$SOURCES $srcdir/src/hidapi/libusb/hid.c"
|
||||
if test x$have_libusb_h = xyes; then
|
||||
EXTRA_CFLAGS="$EXTRA_CFLAGS $LIBUSB_CFLAGS"
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS $LIBUSB_LIBS"
|
||||
if test x$onlylibusb = xyes; then
|
||||
SOURCES="$SOURCES $srcdir/src/hidapi/libusb/hid.c"
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS $LIBUSB_LIBS"
|
||||
else
|
||||
if test x$have_loadso != xyes; then
|
||||
AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic libusb loading])
|
||||
fi
|
||||
# libusb is loaded dynamically, so don't add it to LDFLAGS
|
||||
libusb_lib=""
|
||||
case "$host" in
|
||||
*-*-darwin* )
|
||||
libusb_lib="libusb-1.0.0.dylib"
|
||||
;;
|
||||
*-*-cygwin* | *-*-mingw32* )
|
||||
libusb_lib="libusb-1.0.dll"
|
||||
;;
|
||||
esac
|
||||
if test x$libusb_lib = x; then
|
||||
libusb_lib=[`find_lib "libusb-1.0.so.*" "" | sed 's/.*\/\(.*\)/\1/; q'`]
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED(SDL_LIBUSB_DYNAMIC, "$libusb_lib", [ ])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -3362,6 +3466,8 @@ case "$host" in
|
|||
CheckDiskAudio
|
||||
CheckDummyAudio
|
||||
CheckDLOPEN
|
||||
CheckARM
|
||||
CheckNEON
|
||||
CheckOSS
|
||||
CheckALSA
|
||||
CheckPulseAudio
|
||||
|
@ -3599,9 +3705,6 @@ AS_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
|
|||
fi
|
||||
SOURCES="$SOURCES $srcdir/src/joystick/windows/*.c"
|
||||
have_joystick=yes
|
||||
if test x$hidapi_support = xyes; then
|
||||
SOURCES="$SOURCES $srcdir/src/hidapi/windows/hid.c"
|
||||
fi
|
||||
fi
|
||||
if test x$enable_haptic = xyes; then
|
||||
if test x$have_dinput = xyes -o x$have_xinput = xyes; then
|
||||
|
@ -3756,6 +3859,12 @@ AS_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
|
|||
# have_haptic=yes
|
||||
# EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,ForceFeedback"
|
||||
#fi
|
||||
# Set up files for the sensor library
|
||||
if test x$enable_sensor = xyes; then
|
||||
AC_DEFINE(SDL_SENSOR_COREMOTION, 1, [ ])
|
||||
SOURCES="$SOURCES $srcdir/src/sensor/coremotion/*.m"
|
||||
have_sensor=yes
|
||||
fi
|
||||
# Set up files for the power library
|
||||
if test x$enable_power = xyes; then
|
||||
AC_DEFINE(SDL_POWER_UIKIT, 1, [ ])
|
||||
|
@ -3799,7 +3908,7 @@ AS_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
|
|||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,QuartzCore"
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,UIKit"
|
||||
|
||||
if test x$enable_render = xyes -a x$enable_render_metal = xyes; then
|
||||
if test x$enable_video_metal = xyes -o x$enable_video_vulkan = xyes; then
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,Metal"
|
||||
fi
|
||||
;;
|
||||
|
@ -3842,9 +3951,6 @@ AS_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
|
|||
AC_DEFINE(SDL_JOYSTICK_IOKIT, 1, [ ])
|
||||
SOURCES="$SOURCES $srcdir/src/joystick/darwin/*.c"
|
||||
have_joystick=yes
|
||||
if test x$hidapi_support = xyes; then
|
||||
SOURCES="$SOURCES $srcdir/src/hidapi/mac/hid.c"
|
||||
fi
|
||||
fi
|
||||
# Set up files for the haptic library
|
||||
if test x$enable_haptic = xyes; then
|
||||
|
@ -3884,7 +3990,7 @@ AS_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
|
|||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,Carbon"
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,IOKit"
|
||||
|
||||
if test x$enable_render = xyes -a x$enable_render_metal = xyes; then
|
||||
if test x$enable_video_metal = xyes -o x$enable_video_vulkan = xyes; then
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-weak_framework,QuartzCore -Wl,-weak_framework,Metal"
|
||||
fi
|
||||
;;
|
||||
|
@ -3953,6 +4059,25 @@ AS_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
|
|||
SOURCES="$SOURCES $srcdir/src/filesystem/emscripten/*.c"
|
||||
have_filesystem=yes
|
||||
fi
|
||||
# Set up files for the timer library
|
||||
if test x$enable_timers = xyes; then
|
||||
AC_DEFINE(SDL_TIMER_UNIX, 1, [ ])
|
||||
SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
|
||||
have_timers=yes
|
||||
fi
|
||||
;;
|
||||
*-*-riscos*)
|
||||
ARCH=riscos
|
||||
CheckVisibilityHidden
|
||||
CheckDeclarationAfterStatement
|
||||
CheckDummyVideo
|
||||
CheckDiskAudio
|
||||
CheckDummyAudio
|
||||
CheckDLOPEN
|
||||
CheckOSS
|
||||
CheckPTHREAD
|
||||
CheckClockGettime
|
||||
|
||||
# Set up files for the timer library
|
||||
if test x$enable_timers = xyes; then
|
||||
AC_DEFINE(SDL_TIMER_UNIX, 1, [ ])
|
||||
|
@ -4071,7 +4196,7 @@ VERSION_OBJECTS=`echo $VERSION_SOURCES`
|
|||
VERSION_DEPENDS=`echo $VERSION_SOURCES`
|
||||
VERSION_OBJECTS=`echo "$VERSION_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.rc,$(objects)/\1.o,g'`
|
||||
VERSION_DEPENDS=`echo "$VERSION_DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.rc,\\\\
|
||||
\\$(objects)/\\2.o: \\1/\\2.rc\\\\
|
||||
\\$(objects)/\\2.o: \\1/\\2.rc \\$(objects)/.created\\\\
|
||||
\\$(WINDRES) \\$< \\$@,g"`
|
||||
|
||||
SDLMAIN_OBJECTS=`echo $SDLMAIN_SOURCES`
|
||||
|
@ -4171,7 +4296,7 @@ $WAYLAND_PROTOCOLS_DEPENDS
|
|||
__EOF__
|
||||
|
||||
AC_CONFIG_FILES([
|
||||
Makefile:Makefile.in:Makefile.rules sdl2-config sdl2-config.cmake SDL2.spec sdl2.pc
|
||||
Makefile:Makefile.in:Makefile.rules sdl2-config sdl2-config.cmake sdl2-config-version.cmake SDL2.spec sdl2.pc
|
||||
])
|
||||
AC_CONFIG_COMMANDS([sdl2_config],[chmod a+x sdl2-config])
|
||||
|
||||
|
@ -4220,6 +4345,23 @@ if test x$have_fcitx_frontend_h_hdr = xyes; then
|
|||
else
|
||||
SUMMARY="${SUMMARY}Using fcitx : NO\n"
|
||||
fi
|
||||
|
||||
if test x$WARN_ABOUT_ARM_SIMD_ASM_MIT = xyes; then
|
||||
SUMMARY="${SUMMARY}\nSDL is being built with ARM SIMD optimizations, which\n"
|
||||
SUMMARY="${SUMMARY}uses code licensed under the MIT license. If this is a\n"
|
||||
SUMMARY="${SUMMARY}problem, please disable that code by rerunning the\n"
|
||||
SUMMARY="${SUMMARY}configure script with:\n"
|
||||
SUMMARY="${SUMMARY}\n --disable-arm-simd\n"
|
||||
fi
|
||||
|
||||
if test x$WARN_ABOUT_ARM_NEON_ASM_MIT = xyes; then
|
||||
SUMMARY="${SUMMARY}\nSDL is being built with ARM NEON optimizations, which\n"
|
||||
SUMMARY="${SUMMARY}uses code licensed under the MIT license. If this is a\n"
|
||||
SUMMARY="${SUMMARY}problem, please disable that code by rerunning the\n"
|
||||
SUMMARY="${SUMMARY}configure script with:\n"
|
||||
SUMMARY="${SUMMARY}\n --disable-arm-neon\n"
|
||||
fi
|
||||
|
||||
AC_CONFIG_COMMANDS([summary], [echo -en "$SUMMARY"], [SUMMARY="$SUMMARY"])
|
||||
|
||||
AC_OUTPUT
|
||||
|
|
|
@ -1,8 +1,20 @@
|
|||
libsdl2 (2.0.12) UNRELEASED; urgency=low
|
||||
|
||||
* Updated SDL to version 2.0.12 for development builds
|
||||
|
||||
-- Sam Lantinga <slouken@libsdl.org> Sun, 1 Mar 2020 14:57:07 -0800
|
||||
|
||||
libsdl2 (2.0.11) UNRELEASED; urgency=low
|
||||
|
||||
* Updated SDL to version 2.0.11 for development builds
|
||||
|
||||
-- Sam Lantinga <slouken@libsdl.org> Sun, 22 Sep 2019 10:33:03 -0800
|
||||
|
||||
libsdl2 (2.0.10) UNRELEASED; urgency=low
|
||||
|
||||
* Updated SDL to version 2.0.10
|
||||
|
||||
-- Sam Lantinga <slouken@libsdl.org> Mon, 17 Jun 2018 08:48:47 -0800
|
||||
-- Sam Lantinga <slouken@libsdl.org> Mon, 17 Jun 2019 08:48:47 -0800
|
||||
|
||||
libsdl2 (2.0.9) UNRELEASED; urgency=low
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ Upstream-Contact: Sam Lantinga <slouken@libsdl.org>
|
|||
Source: http://www.libsdl.org/
|
||||
|
||||
Files: *
|
||||
Copyright: 1997-2019 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright: 1997-2020 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: 2019 Sam Lantinga
|
||||
Copyright: 2020 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-2019 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright: 1997-2020 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-2019 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright: 1997-2020 Sam Lantinga <slouken@libsdl.org>
|
||||
2008 Edgar Simo Serra
|
||||
License: BSD_3_clause
|
||||
|
||||
Files: test/testrumble.c
|
||||
Copyright: 1997-2019 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright: 1997-2020 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-2019 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 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,4 +5,5 @@ usr/lib/*/*.la
|
|||
usr/lib/*/*.so
|
||||
usr/lib/*/pkgconfig/sdl2.pc
|
||||
usr/lib/*/cmake/SDL2/sdl2-config.cmake
|
||||
usr/lib/*/cmake/SDL2/sdl2-config-version.cmake
|
||||
usr/share/aclocal/sdl2.m4
|
||||
|
|
|
@ -82,6 +82,23 @@ For more complex projects, follow these instructions:
|
|||
|
||||
4b. If you want to build manually, run './gradlew installDebug' in the project directory. This compiles the .java, creates an .apk with the native code embedded, and installs it on any connected Android device
|
||||
|
||||
|
||||
If you already have a project that uses CMake, the instructions change somewhat:
|
||||
|
||||
1. Do points 1 and 2 from the instruction above.
|
||||
2. Edit "<project>/app/build.gradle" to comment out or remove sections containing ndk-build
|
||||
and uncomment the cmake sections. Add arguments to the CMake invocation as needed.
|
||||
3. Edit "<project>/app/jni/CMakeLists.txt" to include your project (it defaults to
|
||||
adding the "src" subdirectory). Note that you'll have SDL2, SDL2main and SDL2-static
|
||||
as targets in your project, so you should have "target_link_libraries(yourgame SDL2 SDL2main)"
|
||||
in your CMakeLists.txt file. Also be aware that you should use add_library() instead of
|
||||
add_executable() for the target containing your "main" function.
|
||||
|
||||
If you wish to use Android Studio, you can skip the last step.
|
||||
|
||||
4. Run './gradlew installDebug' or './gradlew installRelease' in the project directory. It will build and install your .apk on any
|
||||
connected Android device
|
||||
|
||||
Here's an explanation of the files in the Android project, so you can customize them:
|
||||
|
||||
android-project/app
|
||||
|
@ -90,10 +107,12 @@ Here's an explanation of the files in the Android project, so you can customize
|
|||
jni/ - directory holding native code
|
||||
jni/Application.mk - Application JNI settings, including target platform and STL library
|
||||
jni/Android.mk - Android makefile that can call recursively the Android.mk files in all subdirectories
|
||||
jni/CMakeLists.txt - Top-level CMake project that adds SDL as a subproject
|
||||
jni/SDL/ - (symlink to) directory holding the SDL library files
|
||||
jni/SDL/Android.mk - Android makefile for creating the SDL shared library
|
||||
jni/src/ - directory holding your C/C++ source
|
||||
jni/src/Android.mk - Android makefile that you should customize to include your source code and any library references
|
||||
jni/src/CMakeLists.txt - CMake file that you may customize to include your source code and any library references
|
||||
src/main/assets/ - directory holding asset files for your application
|
||||
src/main/res/ - directory holding resources for your application
|
||||
src/main/res/mipmap-* - directories holding icons for different phone hardware
|
||||
|
|
|
@ -15,7 +15,7 @@ platforms:
|
|||
* Linux
|
||||
* VS.NET 2010
|
||||
* MinGW and Msys
|
||||
* OS X with support for XCode
|
||||
* macOS, iOS, and tvOS, with support for XCode
|
||||
|
||||
|
||||
================================================================================
|
||||
|
@ -30,3 +30,55 @@ Assuming the source for SDL is located at ~/sdl
|
|||
cmake ../sdl
|
||||
|
||||
This will build the static and dynamic versions of SDL in the ~/build directory.
|
||||
|
||||
|
||||
================================================================================
|
||||
Usage, iOS/tvOS
|
||||
================================================================================
|
||||
|
||||
CMake 3.14+ natively includes support for iOS and tvOS. SDL binaries may be built
|
||||
using Xcode or Make, possibly among other build-systems.
|
||||
|
||||
When using a recent version of CMake (3.14+), it should be possible to:
|
||||
|
||||
- build SDL for iOS, both static and dynamic
|
||||
- build SDL test apps (as iOS/tvOS .app bundles)
|
||||
- generate a working SDL_config.h for iOS (using SDL_config.h.cmake as a basis)
|
||||
|
||||
To use, set the following CMake variables when running CMake's configuration stage:
|
||||
|
||||
- `CMAKE_SYSTEM_NAME=<OS>` (either `iOS` or `tvOS`)
|
||||
- `CMAKE_OSX_SYSROOT=<SDK>` (examples: `iphoneos`, `iphonesimulator`, `iphoneos12.4`, `/full/path/to/iPhoneOS.sdk`,
|
||||
`appletvos`, `appletvsimulator`, `appletvos12.4`, `/full/path/to/AppleTVOS.sdk`, etc.)
|
||||
- `CMAKE_OSX_ARCHITECTURES=<semicolon-separated list of CPU architectures>` (example: "arm64;armv7s;x86_64")
|
||||
|
||||
|
||||
### Examples (for iOS/tvOS):
|
||||
|
||||
- for iOS-Simulator, using the latest, installed SDK:
|
||||
|
||||
`cmake ~/sdl -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphonesimulator -DCMAKE_OSX_ARCHITECTURES=x86_64`
|
||||
|
||||
- for iOS-Device, using the latest, installed SDK, 64-bit only
|
||||
|
||||
`cmake ~/sdl -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphoneos -DCMAKE_OSX_ARCHITECTURES=arm64`
|
||||
|
||||
- for iOS-Device, using the latest, installed SDK, mixed 32/64 bit
|
||||
|
||||
`cmake ~/sdl -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphoneos -DCMAKE_OSX_ARCHITECTURES="arm64;armv7s"`
|
||||
|
||||
- for iOS-Device, using a specific SDK revision (iOS 12.4, in this example):
|
||||
|
||||
`cmake ~/sdl -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphoneos12.4 -DCMAKE_OSX_ARCHITECTURES=arm64`
|
||||
|
||||
- for iOS-Simulator, using the latest, installed SDK, and building SDL test apps (as .app bundles):
|
||||
|
||||
`cmake ~/sdl -DSDL_TEST=1 -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphonesimulator -DCMAKE_OSX_ARCHITECTURES=x86_64`
|
||||
|
||||
- for tvOS-Simulator, using the latest, installed SDK:
|
||||
|
||||
`cmake ~/sdl -DCMAKE_SYSTEM_NAME=tvOS -DCMAKE_OSX_SYSROOT=appletvsimulator -DCMAKE_OSX_ARCHITECTURES=x86_64`
|
||||
|
||||
- for tvOS-Device, using the latest, installed SDK:
|
||||
|
||||
`cmake ~/sdl -DCMAKE_SYSTEM_NAME=tvOS -DCMAKE_OSX_SYSROOT=appletvos -DCMAKE_OSX_ARCHITECTURES=arm64`
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 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
|
||||
|
@ -47,6 +47,7 @@
|
|||
#include "SDL_loadso.h"
|
||||
#include "SDL_log.h"
|
||||
#include "SDL_messagebox.h"
|
||||
#include "SDL_metal.h"
|
||||
#include "SDL_mutex.h"
|
||||
#include "SDL_power.h"
|
||||
#include "SDL_render.h"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 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-2019 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 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-2019 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 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-2019 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 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-2019 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 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
|
||||
|
@ -50,6 +50,9 @@ typedef enum
|
|||
SDL_BLENDMODE_MOD = 0x00000004, /**< color modulate
|
||||
dstRGB = srcRGB * dstRGB
|
||||
dstA = dstA */
|
||||
SDL_BLENDMODE_MUL = 0x00000008, /**< color multiply
|
||||
dstRGB = (srcRGB * dstRGB) + (dstRGB * (1-srcA))
|
||||
dstA = (srcA * dstA) + (dstA * (1-srcA)) */
|
||||
SDL_BLENDMODE_INVALID = 0x7FFFFFFF
|
||||
|
||||
/* Additional custom blend modes can be returned by SDL_ComposeCustomBlendMode() */
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 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-2019 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 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-2019 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 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
|
||||
|
@ -96,7 +96,10 @@
|
|||
#cmakedefine HAVE_WCSLEN 1
|
||||
#cmakedefine HAVE_WCSLCPY 1
|
||||
#cmakedefine HAVE_WCSLCAT 1
|
||||
#cmakedefine HAVE_WCSDUP 1
|
||||
#cmakedefine HAVE_WCSSTR 1
|
||||
#cmakedefine HAVE_WCSCMP 1
|
||||
#cmakedefine HAVE_WCSNCMP 1
|
||||
#cmakedefine HAVE_STRLEN 1
|
||||
#cmakedefine HAVE_STRLCPY 1
|
||||
#cmakedefine HAVE_STRLCAT 1
|
||||
|
@ -108,6 +111,8 @@
|
|||
#cmakedefine HAVE_STRCHR 1
|
||||
#cmakedefine HAVE_STRRCHR 1
|
||||
#cmakedefine HAVE_STRSTR 1
|
||||
#cmakedefine HAVE_STRTOK_R 1
|
||||
#cmakedefine HAVE_STRTOK_S 1
|
||||
#cmakedefine HAVE_ITOA 1
|
||||
#cmakedefine HAVE__LTOA 1
|
||||
#cmakedefine HAVE__UITOA 1
|
||||
|
@ -127,6 +132,7 @@
|
|||
#cmakedefine HAVE_STRCASECMP 1
|
||||
#cmakedefine HAVE__STRNICMP 1
|
||||
#cmakedefine HAVE_STRNCASECMP 1
|
||||
#cmakedefine HAVE_SSCANF 1
|
||||
#cmakedefine HAVE_VSSCANF 1
|
||||
#cmakedefine HAVE_VSNPRINTF 1
|
||||
#cmakedefine HAVE_M_PI 1
|
||||
|
@ -211,7 +217,6 @@
|
|||
#cmakedefine HAVE_XINPUT_H @HAVE_XINPUT_H@
|
||||
#cmakedefine HAVE_DXGI_H @HAVE_DXGI_H@
|
||||
|
||||
#cmakedefine HAVE_ENDPOINTVOLUME_H @HAVE_ENDPOINTVOLUME_H@
|
||||
#cmakedefine HAVE_MMDEVICEAPI_H @HAVE_MMDEVICEAPI_H@
|
||||
#cmakedefine HAVE_AUDIOCLIENT_H @HAVE_AUDIOCLIENT_H@
|
||||
|
||||
|
@ -294,9 +299,11 @@
|
|||
#cmakedefine SDL_HAPTIC_DINPUT @SDL_HAPTIC_DINPUT@
|
||||
#cmakedefine SDL_HAPTIC_XINPUT @SDL_HAPTIC_XINPUT@
|
||||
#cmakedefine SDL_HAPTIC_ANDROID @SDL_HAPTIC_ANDROID@
|
||||
#cmakedefine SDL_LIBUSB_DYNAMIC @SDL_LIBUSB_DYNAMIC@
|
||||
|
||||
/* Enable various sensor drivers */
|
||||
#cmakedefine SDL_SENSOR_ANDROID @SDL_SENSOR_ANDROID@
|
||||
#cmakedefine SDL_SENSOR_COREMOTION @SDL_SENSOR_COREMOTION@
|
||||
#cmakedefine SDL_SENSOR_DUMMY @SDL_SENSOR_DUMMY@
|
||||
|
||||
/* Enable various shared object loading systems */
|
||||
|
@ -322,9 +329,11 @@
|
|||
#cmakedefine SDL_VIDEO_DRIVER_ANDROID @SDL_VIDEO_DRIVER_ANDROID@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_HAIKU @SDL_VIDEO_DRIVER_HAIKU@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_COCOA @SDL_VIDEO_DRIVER_COCOA@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_UIKIT @SDL_VIDEO_DRIVER_UIKIT@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_DIRECTFB @SDL_VIDEO_DRIVER_DIRECTFB@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC @SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_DUMMY @SDL_VIDEO_DRIVER_DUMMY@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_OFFSCREEN @SDL_VIDEO_DRIVER_OFFSCREEN@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_WINDOWS @SDL_VIDEO_DRIVER_WINDOWS@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_WAYLAND @SDL_VIDEO_DRIVER_WAYLAND@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_RPI @SDL_VIDEO_DRIVER_RPI@
|
||||
|
@ -387,11 +396,15 @@
|
|||
/* Enable Vulkan support */
|
||||
#cmakedefine SDL_VIDEO_VULKAN @SDL_VIDEO_VULKAN@
|
||||
|
||||
/* Enable Metal support */
|
||||
#cmakedefine SDL_VIDEO_METAL @SDL_VIDEO_METAL@
|
||||
|
||||
/* Enable system power support */
|
||||
#cmakedefine SDL_POWER_ANDROID @SDL_POWER_ANDROID@
|
||||
#cmakedefine SDL_POWER_LINUX @SDL_POWER_LINUX@
|
||||
#cmakedefine SDL_POWER_WINDOWS @SDL_POWER_WINDOWS@
|
||||
#cmakedefine SDL_POWER_MACOSX @SDL_POWER_MACOSX@
|
||||
#cmakedefine SDL_POWER_UIKIT @SDL_POWER_UIKIT@
|
||||
#cmakedefine SDL_POWER_HAIKU @SDL_POWER_HAIKU@
|
||||
#cmakedefine SDL_POWER_EMSCRIPTEN @SDL_POWER_EMSCRIPTEN@
|
||||
#cmakedefine SDL_POWER_HARDWIRED @SDL_POWER_HARDWIRED@
|
||||
|
@ -408,11 +421,16 @@
|
|||
/* Enable assembly routines */
|
||||
#cmakedefine SDL_ASSEMBLY_ROUTINES @SDL_ASSEMBLY_ROUTINES@
|
||||
#cmakedefine SDL_ALTIVEC_BLITTERS @SDL_ALTIVEC_BLITTERS@
|
||||
#cmakedefine SDL_ARM_SIMD_BLITTERS @SDL_ARM_SIMD_BLITTERS@
|
||||
#cmakedefine SDL_ARM_NEON_BLITTERS @SDL_ARM_NEON_BLITTERS@
|
||||
|
||||
/* Enable dynamic libsamplerate support */
|
||||
#cmakedefine SDL_LIBSAMPLERATE_DYNAMIC @SDL_LIBSAMPLERATE_DYNAMIC@
|
||||
|
||||
/* Platform specific definitions */
|
||||
#cmakedefine SDL_IPHONE_KEYBOARD @SDL_IPHONE_KEYBOARD@
|
||||
#cmakedefine SDL_IPHONE_LAUNCHSCREEN @SDL_IPHONE_LAUNCHSCREEN@
|
||||
|
||||
#if !defined(__WIN32__)
|
||||
# if !defined(_STDINT_H_) && !defined(_STDINT_H) && !defined(HAVE_STDINT_H) && !defined(_HAVE_STDINT_H)
|
||||
typedef unsigned int size_t;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 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
|
||||
|
@ -33,7 +33,7 @@
|
|||
|
||||
/* Make sure that this isn't included by Visual C++ */
|
||||
#ifdef _MSC_VER
|
||||
#error You should run hg revert SDL_config.h
|
||||
#error You should run hg revert SDL_config.h
|
||||
#endif
|
||||
|
||||
/* C language features */
|
||||
|
@ -99,7 +99,10 @@
|
|||
#undef HAVE_WCSLEN
|
||||
#undef HAVE_WCSLCPY
|
||||
#undef HAVE_WCSLCAT
|
||||
#undef HAVE_WCSDUP
|
||||
#undef HAVE_WCSSTR
|
||||
#undef HAVE_WCSCMP
|
||||
#undef HAVE_WCSNCMP
|
||||
#undef HAVE_STRLEN
|
||||
#undef HAVE_STRLCPY
|
||||
#undef HAVE_STRLCAT
|
||||
|
@ -111,6 +114,8 @@
|
|||
#undef HAVE_STRCHR
|
||||
#undef HAVE_STRRCHR
|
||||
#undef HAVE_STRSTR
|
||||
#undef HAVE_STRTOK_R
|
||||
#undef HAVE_STRTOK_S
|
||||
#undef HAVE_ITOA
|
||||
#undef HAVE__LTOA
|
||||
#undef HAVE__UITOA
|
||||
|
@ -192,9 +197,9 @@
|
|||
#undef HAVE__EXIT
|
||||
|
||||
#else
|
||||
#define HAVE_STDARG_H 1
|
||||
#define HAVE_STDDEF_H 1
|
||||
#define HAVE_STDINT_H 1
|
||||
#define HAVE_STDARG_H 1
|
||||
#define HAVE_STDDEF_H 1
|
||||
#define HAVE_STDINT_H 1
|
||||
#endif /* HAVE_LIBC */
|
||||
|
||||
#undef HAVE_ALTIVEC_H
|
||||
|
@ -210,7 +215,6 @@
|
|||
#undef HAVE_DSOUND_H
|
||||
#undef HAVE_DXGI_H
|
||||
#undef HAVE_XINPUT_H
|
||||
#undef HAVE_ENDPOINTVOLUME_H
|
||||
#undef HAVE_MMDEVICEAPI_H
|
||||
#undef HAVE_AUDIOCLIENT_H
|
||||
#undef HAVE_XINPUT_GAMEPAD_EX
|
||||
|
@ -383,6 +387,9 @@
|
|||
/* Enable Vulkan support */
|
||||
#undef SDL_VIDEO_VULKAN
|
||||
|
||||
/* Enable Metal support */
|
||||
#undef SDL_VIDEO_METAL
|
||||
|
||||
/* Enable system power support */
|
||||
#undef SDL_POWER_LINUX
|
||||
#undef SDL_POWER_WINDOWS
|
||||
|
@ -405,6 +412,8 @@
|
|||
/* Enable assembly routines */
|
||||
#undef SDL_ASSEMBLY_ROUTINES
|
||||
#undef SDL_ALTIVEC_BLITTERS
|
||||
#undef SDL_ARM_SIMD_BLITTERS
|
||||
#undef SDL_ARM_NEON_BLITTERS
|
||||
|
||||
/* Enable ime support */
|
||||
#undef SDL_USE_IME
|
||||
|
@ -412,6 +421,9 @@
|
|||
/* Enable dynamic udev support */
|
||||
#undef SDL_UDEV_DYNAMIC
|
||||
|
||||
/* Enable dynamic libusb support */
|
||||
#undef SDL_LIBUSB_DYNAMIC
|
||||
|
||||
/* Enable dynamic libsamplerate support */
|
||||
#undef SDL_LIBSAMPLERATE_DYNAMIC
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 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
|
||||
|
@ -71,6 +71,7 @@
|
|||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRSTR 1
|
||||
#define HAVE_STRTOK_R 1
|
||||
#define HAVE_STRTOL 1
|
||||
#define HAVE_STRTOUL 1
|
||||
#define HAVE_STRTOLL 1
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 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
|
||||
|
@ -71,6 +71,7 @@
|
|||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRSTR 1
|
||||
#define HAVE_STRTOK_R 1
|
||||
#define HAVE_STRTOL 1
|
||||
#define HAVE_STRTOUL 1
|
||||
#define HAVE_STRTOLL 1
|
||||
|
@ -137,7 +138,7 @@
|
|||
|
||||
/* Enable MFi joystick support */
|
||||
#define SDL_JOYSTICK_MFI 1
|
||||
/*#define SDL_JOYSTICK_HIDAPI 1*/
|
||||
#define SDL_JOYSTICK_HIDAPI 1
|
||||
|
||||
#ifdef __TVOS__
|
||||
#define SDL_SENSOR_DUMMY 1
|
||||
|
@ -181,6 +182,10 @@
|
|||
#define SDL_VIDEO_VULKAN 1
|
||||
#endif
|
||||
|
||||
#if SDL_PLATFORM_SUPPORTS_METAL
|
||||
#define SDL_VIDEO_METAL 1
|
||||
#endif
|
||||
|
||||
/* Enable system power support */
|
||||
#define SDL_POWER_UIKIT 1
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 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
|
||||
|
@ -74,6 +74,7 @@
|
|||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRSTR 1
|
||||
#define HAVE_STRTOK_R 1
|
||||
#define HAVE_STRTOL 1
|
||||
#define HAVE_STRTOUL 1
|
||||
#define HAVE_STRTOLL 1
|
||||
|
@ -130,6 +131,8 @@
|
|||
#define HAVE_SYSCONF 1
|
||||
#define HAVE_SYSCTLBYNAME 1
|
||||
|
||||
#define HAVE_GCC_ATOMICS 1
|
||||
|
||||
/* Enable various audio drivers */
|
||||
#define SDL_AUDIO_DRIVER_COREAUDIO 1
|
||||
#define SDL_AUDIO_DRIVER_DISK 1
|
||||
|
@ -157,13 +160,13 @@
|
|||
#define SDL_VIDEO_DRIVER_COCOA 1
|
||||
#define SDL_VIDEO_DRIVER_DUMMY 1
|
||||
#undef SDL_VIDEO_DRIVER_X11
|
||||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC "/usr/X11R6/lib/libX11.6.dylib"
|
||||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT "/usr/X11R6/lib/libXext.6.dylib"
|
||||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA "/usr/X11R6/lib/libXinerama.1.dylib"
|
||||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2 "/usr/X11R6/lib/libXi.6.dylib"
|
||||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR "/usr/X11R6/lib/libXrandr.2.dylib"
|
||||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS "/usr/X11R6/lib/libXss.1.dylib"
|
||||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE "/usr/X11R6/lib/libXxf86vm.1.dylib"
|
||||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC "/opt/X11/lib/libX11.6.dylib"
|
||||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT "/opt/X11/lib/libXext.6.dylib"
|
||||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA "/opt/X11/lib/libXinerama.1.dylib"
|
||||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2 "/opt/X11/lib/libXi.6.dylib"
|
||||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR "/opt/X11/lib/libXrandr.2.dylib"
|
||||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS "/opt/X11/lib/libXss.1.dylib"
|
||||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE "/opt/X11/lib/libXxf86vm.1.dylib"
|
||||
#define SDL_VIDEO_DRIVER_X11_XDBE 1
|
||||
#define SDL_VIDEO_DRIVER_X11_XINERAMA 1
|
||||
#define SDL_VIDEO_DRIVER_X11_XRANDR 1
|
||||
|
@ -191,9 +194,15 @@
|
|||
#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_PLATFORM_SUPPORTS_METAL 1
|
||||
#else
|
||||
#define SDL_PLATFORM_SUPPORTS_METAL 0
|
||||
#endif
|
||||
|
||||
#ifndef SDL_VIDEO_RENDER_METAL
|
||||
#if SDL_PLATFORM_SUPPORTS_METAL
|
||||
#define SDL_VIDEO_RENDER_METAL 1
|
||||
#else
|
||||
#define SDL_VIDEO_RENDER_METAL 0
|
||||
|
@ -217,13 +226,22 @@
|
|||
#define SDL_VIDEO_OPENGL_GLX 1
|
||||
#endif
|
||||
|
||||
/* Enable Vulkan support */
|
||||
/* Metal/Vulkan Portability only supported on 64-bit architectures with 10.11+ */
|
||||
#if TARGET_CPU_X86_64 && (MAC_OS_X_VERSION_MAX_ALLOWED >= 101100)
|
||||
/* Enable Vulkan and Metal support */
|
||||
#ifndef SDL_VIDEO_VULKAN
|
||||
#if SDL_PLATFORM_SUPPORTS_METAL
|
||||
#define SDL_VIDEO_VULKAN 1
|
||||
#else
|
||||
#define SDL_VIDEO_VULKAN 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef SDL_VIDEO_METAL
|
||||
#if SDL_PLATFORM_SUPPORTS_METAL
|
||||
#define SDL_VIDEO_METAL 1
|
||||
#else
|
||||
#define SDL_VIDEO_METAL 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Enable system power support */
|
||||
#define SDL_POWER_MACOSX 1
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 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-2019 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 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
|
||||
|
@ -110,6 +110,7 @@
|
|||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRSTR 1
|
||||
/* #undef HAVE_STRTOK_R */
|
||||
#define HAVE_ITOA 1
|
||||
#define HAVE__LTOA 1
|
||||
#define HAVE__ULTOA 1
|
||||
|
@ -122,12 +123,21 @@
|
|||
#define HAVE_STRTOD 1
|
||||
#define HAVE_ATOI 1
|
||||
#define HAVE_ATOF 1
|
||||
#define HAVE_WCSLEN 1
|
||||
#define HAVE_WCSLCPY 1
|
||||
#define HAVE_WCSLCAT 1
|
||||
/* #define HAVE_WCSDUP 1 */
|
||||
/* #define wcsdup _wcsdup */
|
||||
#define HAVE_WCSSTR 1
|
||||
#define HAVE_WCSCMP 1
|
||||
#define HAVE_WCSNCMP 1
|
||||
#define HAVE_STRCMP 1
|
||||
#define HAVE_STRNCMP 1
|
||||
#define HAVE_STRICMP 1
|
||||
#define HAVE_STRCASECMP 1
|
||||
#define HAVE_STRNCASECMP 1
|
||||
#define HAVE_SSCANF 1
|
||||
#define HAVE_SSCANF 1
|
||||
#define HAVE_VSSCANF 1
|
||||
#define HAVE_SNPRINTF 1
|
||||
#define HAVE_VSNPRINTF 1
|
||||
#define HAVE_SETJMP 1
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 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-2019 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 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-2019 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 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
|
||||
|
@ -84,7 +84,6 @@ typedef unsigned int uintptr_t;
|
|||
#define HAVE_XINPUT_H 1
|
||||
#define HAVE_MMDEVICEAPI_H 1
|
||||
#define HAVE_AUDIOCLIENT_H 1
|
||||
#define HAVE_ENDPOINTVOLUME_H 1
|
||||
|
||||
/* This is disabled by default to avoid C runtime dependencies and manifest requirements */
|
||||
#ifdef HAVE_LIBC
|
||||
|
@ -118,6 +117,10 @@ typedef unsigned int uintptr_t;
|
|||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRSTR 1
|
||||
/* #undef HAVE_STRTOK_R */
|
||||
#if defined(_MSC_VER)
|
||||
#define HAVE_STRTOK_S 1
|
||||
#endif
|
||||
/* These functions have security warnings, so we won't use them */
|
||||
/* #undef HAVE__LTOA */
|
||||
/* #undef HAVE__ULTOA */
|
||||
|
@ -139,7 +142,7 @@ typedef unsigned int uintptr_t;
|
|||
#define HAVE_ATAN2 1
|
||||
#define HAVE_ATAN2F 1
|
||||
#define HAVE_CEILF 1
|
||||
#define HAVE__COPYSIGN 1
|
||||
#define HAVE__COPYSIGN 1
|
||||
#define HAVE_COS 1
|
||||
#define HAVE_COSF 1
|
||||
#define HAVE_EXP 1
|
||||
|
@ -168,7 +171,7 @@ typedef unsigned int uintptr_t;
|
|||
#define HAVE_STRTOLL 1
|
||||
#define HAVE_VSSCANF 1
|
||||
#define HAVE_SCALBN 1
|
||||
#define HAVE_SCALBNF 1
|
||||
#define HAVE_SCALBNF 1
|
||||
#endif
|
||||
/* This function is available with at least the VC++ 2008 C runtime library */
|
||||
#if _MSC_VER >= 1400
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 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
|
||||
|
@ -100,7 +100,6 @@ typedef unsigned int uintptr_t;
|
|||
|
||||
#define HAVE_MMDEVICEAPI_H 1
|
||||
#define HAVE_AUDIOCLIENT_H 1
|
||||
#define HAVE_ENDPOINTVOLUME_H 1
|
||||
|
||||
#define HAVE_LIBC 1
|
||||
#define STDC_HEADERS 1
|
||||
|
@ -131,6 +130,7 @@ typedef unsigned int uintptr_t;
|
|||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRSTR 1
|
||||
#define HAVE_STRTOK_S 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 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
|
||||
|
@ -67,6 +67,7 @@
|
|||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRSTR 1
|
||||
#define HAVE_STRTOK_R 1
|
||||
#define HAVE_STRTOL 1
|
||||
#define HAVE_STRTOUL 1
|
||||
#define HAVE_STRTOLL 1
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 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-2019 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 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
|
||||
|
@ -73,8 +73,8 @@
|
|||
# define __ARM_NEON 1 /* Set __ARM_NEON so that it can be used elsewhere, at compile time */
|
||||
# endif
|
||||
# if defined (_M_ARM64)
|
||||
# include <armintr.h>
|
||||
# include <arm_neon.h>
|
||||
# include <arm64intr.h>
|
||||
# include <arm64_neon.h>
|
||||
# define __ARM_NEON 1 /* Set __ARM_NEON so that it can be used elsewhere, at compile time */
|
||||
# endif
|
||||
# endif
|
||||
|
@ -186,6 +186,11 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX2(void);
|
|||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX512F(void);
|
||||
|
||||
/**
|
||||
* This function returns true if the CPU has ARM SIMD (ARMv6) features.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasARMSIMD(void);
|
||||
|
||||
/**
|
||||
* This function returns true if the CPU has NEON (ARM SIMD) features.
|
||||
*/
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 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
|
||||
|
@ -390,6 +390,9 @@ typedef enum {
|
|||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
#define WIN32_LEAN_AND_MEAN 1
|
||||
#endif
|
||||
#ifndef NOMINMAX /* don't define min() and max(). */
|
||||
#define NOMINMAX
|
||||
#endif
|
||||
#include <windows.h>
|
||||
|
||||
#if __WINRT__
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 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
|
||||
|
@ -42,10 +42,13 @@
|
|||
#ifdef __linux__
|
||||
#include <endian.h>
|
||||
#define SDL_BYTEORDER __BYTE_ORDER
|
||||
#else /* __linux__ */
|
||||
#elif defined(__OpenBSD__)
|
||||
#include <endian.h>
|
||||
#define SDL_BYTEORDER BYTE_ORDER
|
||||
#else
|
||||
#if defined(__hppa__) || \
|
||||
defined(__m68k__) || defined(mc68000) || defined(_M_M68K) || \
|
||||
(defined(__MIPS__) && defined(__MISPEB__)) || \
|
||||
(defined(__MIPS__) && defined(__MIPSEB__)) || \
|
||||
defined(__ppc__) || defined(__POWERPC__) || defined(_M_PPC) || \
|
||||
defined(__sparc__)
|
||||
#define SDL_BYTEORDER SDL_BIG_ENDIAN
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 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-2019 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 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
|
||||
|
@ -442,6 +442,7 @@ typedef struct SDL_TouchFingerEvent
|
|||
float dx; /**< Normalized in the range -1...1 */
|
||||
float dy; /**< Normalized in the range -1...1 */
|
||||
float pressure; /**< Normalized in the range 0...1 */
|
||||
Uint32 windowID; /**< The window underneath the finger, if any */
|
||||
} SDL_TouchFingerEvent;
|
||||
|
||||
|
||||
|
@ -558,7 +559,7 @@ typedef union SDL_Event
|
|||
{
|
||||
Uint32 type; /**< Event type, shared with all events */
|
||||
SDL_CommonEvent common; /**< Common event data */
|
||||
SDL_DisplayEvent display; /**< Window event data */
|
||||
SDL_DisplayEvent display; /**< Display event data */
|
||||
SDL_WindowEvent window; /**< Window event data */
|
||||
SDL_KeyboardEvent key; /**< Keyboard event data */
|
||||
SDL_TextEditingEvent edit; /**< Text editing event data */
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 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-2019 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 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
|
||||
|
@ -57,6 +57,15 @@ extern "C" {
|
|||
struct _SDL_GameController;
|
||||
typedef struct _SDL_GameController SDL_GameController;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
SDL_CONTROLLER_TYPE_UNKNOWN = 0,
|
||||
SDL_CONTROLLER_TYPE_XBOX360,
|
||||
SDL_CONTROLLER_TYPE_XBOXONE,
|
||||
SDL_CONTROLLER_TYPE_PS3,
|
||||
SDL_CONTROLLER_TYPE_PS4,
|
||||
SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_PRO
|
||||
} SDL_GameControllerType;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
|
@ -175,6 +184,12 @@ extern DECLSPEC SDL_bool SDLCALL SDL_IsGameController(int joystick_index);
|
|||
*/
|
||||
extern DECLSPEC const char *SDLCALL SDL_GameControllerNameForIndex(int joystick_index);
|
||||
|
||||
/**
|
||||
* Get the type of a game controller.
|
||||
* This can be called before any controllers are opened.
|
||||
*/
|
||||
extern DECLSPEC SDL_GameControllerType SDLCALL SDL_GameControllerTypeForIndex(int joystick_index);
|
||||
|
||||
/**
|
||||
* Get the mapping of a game controller.
|
||||
* This can be called before any controllers are opened.
|
||||
|
@ -199,11 +214,21 @@ extern DECLSPEC SDL_GameController *SDLCALL SDL_GameControllerOpen(int joystick_
|
|||
*/
|
||||
extern DECLSPEC SDL_GameController *SDLCALL SDL_GameControllerFromInstanceID(SDL_JoystickID joyid);
|
||||
|
||||
/**
|
||||
* Return the SDL_GameController associated with a player index.
|
||||
*/
|
||||
extern DECLSPEC SDL_GameController *SDLCALL SDL_GameControllerFromPlayerIndex(int player_index);
|
||||
|
||||
/**
|
||||
* Return the name for this currently opened controller
|
||||
*/
|
||||
extern DECLSPEC const char *SDLCALL SDL_GameControllerName(SDL_GameController *gamecontroller);
|
||||
|
||||
/**
|
||||
* Return the type of this currently opened controller
|
||||
*/
|
||||
extern DECLSPEC SDL_GameControllerType SDLCALL SDL_GameControllerGetType(SDL_GameController *gamecontroller);
|
||||
|
||||
/**
|
||||
* Get the player index of an opened game controller, or -1 if it's not available
|
||||
*
|
||||
|
@ -211,6 +236,11 @@ extern DECLSPEC const char *SDLCALL SDL_GameControllerName(SDL_GameController *g
|
|||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GameControllerGetPlayerIndex(SDL_GameController *gamecontroller);
|
||||
|
||||
/**
|
||||
* Set the player index of an opened game controller
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_GameControllerSetPlayerIndex(SDL_GameController *gamecontroller, int player_index);
|
||||
|
||||
/**
|
||||
* Get the USB vendor ID of an opened controller, if available.
|
||||
* If the vendor ID isn't available this function returns 0.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 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-2019 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 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-2019 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 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
|
||||
|
@ -164,6 +164,21 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_VIDEO_ALLOW_SCREENSAVER "SDL_VIDEO_ALLOW_SCREENSAVER"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the graphics context is externally managed.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - SDL will manage graphics contexts that are attached to windows.
|
||||
* "1" - Disable graphics context management on windows.
|
||||
*
|
||||
* By default SDL will manage OpenGL contexts in certain situations. For example, on Android the
|
||||
* context will be automatically saved and restored when pausing the application. Additionally, some
|
||||
* platforms will assume usage of OpenGL if Vulkan isn't used. Setting this to "1" will prevent this
|
||||
* behavior, which is desireable when the application manages the graphics context, such as
|
||||
* an externally managed OpenGL context or attaching a Vulkan surface to the window.
|
||||
*/
|
||||
#define SDL_HINT_VIDEO_EXTERNAL_CONTEXT "SDL_VIDEO_EXTERNAL_CONTEXT"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the X11 VidMode extension should be used.
|
||||
*
|
||||
|
@ -197,6 +212,12 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_VIDEO_X11_XRANDR "SDL_VIDEO_X11_XRANDR"
|
||||
|
||||
/**
|
||||
* \brief A variable forcing the visual ID chosen for new X11 windows
|
||||
*
|
||||
*/
|
||||
#define SDL_HINT_VIDEO_X11_WINDOW_VISUALID "SDL_VIDEO_X11_WINDOW_VISUALID"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the X11 _NET_WM_PING protocol should be supported.
|
||||
*
|
||||
|
@ -223,6 +244,17 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR "SDL_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether X11 should use GLX or EGL by default
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - Use GLX
|
||||
* "1" - Use EGL
|
||||
*
|
||||
* By default SDL will use GLX when both are present.
|
||||
*/
|
||||
#define SDL_HINT_VIDEO_X11_FORCE_EGL "SDL_VIDEO_X11_FORCE_EGL"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the window frame and title bar are interactive when the cursor is hidden
|
||||
*
|
||||
|
@ -436,6 +468,24 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_XINPUT_USE_OLD_JOYSTICK_MAPPING "SDL_XINPUT_USE_OLD_JOYSTICK_MAPPING"
|
||||
|
||||
/**
|
||||
* \brief A variable that overrides the automatic controller type detection
|
||||
*
|
||||
* The variable should be comma separated entries, in the form: VID/PID=type
|
||||
*
|
||||
* The VID and PID should be hexadecimal with exactly 4 digits, e.g. 0x00fd
|
||||
*
|
||||
* The type should be one of:
|
||||
* Xbox360
|
||||
* XboxOne
|
||||
* PS3
|
||||
* PS4
|
||||
* SwitchPro
|
||||
*
|
||||
* This hint affects what driver is used, and must be set before calling SDL_Init(SDL_INIT_GAMECONTROLLER)
|
||||
*/
|
||||
#define SDL_HINT_GAMECONTROLLERTYPE "SDL_GAMECONTROLLERTYPE"
|
||||
|
||||
/**
|
||||
* \brief A variable that lets you manually hint extra gamecontroller db entries.
|
||||
*
|
||||
|
@ -482,6 +532,29 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT "SDL_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT"
|
||||
|
||||
/**
|
||||
* \brief If set, game controller face buttons report their values according to their labels instead of their positional layout.
|
||||
*
|
||||
* For example, on Nintendo Switch controllers, normally you'd get:
|
||||
*
|
||||
* (Y)
|
||||
* (X) (B)
|
||||
* (A)
|
||||
*
|
||||
* but if this hint is set, you'll get:
|
||||
*
|
||||
* (X)
|
||||
* (Y) (A)
|
||||
* (B)
|
||||
*
|
||||
* The variable can be set to the following values:
|
||||
* "0" - Report the face buttons by position, as though they were on an Xbox controller.
|
||||
* "1" - Report the face buttons by label instead of position
|
||||
*
|
||||
* The default value is "1". This hint may be set at any time.
|
||||
*/
|
||||
#define SDL_HINT_GAMECONTROLLER_USE_BUTTON_LABELS "SDL_GAMECONTROLLER_USE_BUTTON_LABELS"
|
||||
|
||||
/**
|
||||
* \brief A variable that lets you enable joystick (and gamecontroller) events even when your app is in the background.
|
||||
*
|
||||
|
@ -565,6 +638,17 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_JOYSTICK_HIDAPI_XBOX "SDL_JOYSTICK_HIDAPI_XBOX"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the HIDAPI driver for Nintendo GameCube controllers should be used.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - HIDAPI driver is not used
|
||||
* "1" - HIDAPI driver is used
|
||||
*
|
||||
* The default is the value of SDL_HINT_JOYSTICK_HIDAPI
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE "SDL_JOYSTICK_HIDAPI_GAMECUBE"
|
||||
|
||||
/**
|
||||
* \brief A variable that controls whether Steam Controllers should be exposed using the SDL joystick and game controller APIs
|
||||
*
|
||||
|
@ -1174,6 +1258,20 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_WAVE_FACT_CHUNK "SDL_WAVE_FACT_CHUNK"
|
||||
|
||||
/*
|
||||
* \brief Override for SDL_GetDisplayUsableBounds()
|
||||
*
|
||||
* If set, this hint will override the expected results for
|
||||
* SDL_GetDisplayUsableBounds() for display index 0. Generally you don't want
|
||||
* to do this, but this allows an embedded system to request that some of the
|
||||
* screen be reserved for other uses when paired with a well-behaved
|
||||
* application.
|
||||
*
|
||||
* The contents of this hint must be 4 comma-separated integers, the first
|
||||
* is the bounds x, then y, width and height, in that order.
|
||||
*/
|
||||
#define SDL_HINT_DISPLAY_USABLE_BOUNDS "SDL_DISPLAY_USABLE_BOUNDS"
|
||||
|
||||
/**
|
||||
* \brief An enumeration of hint priorities
|
||||
*/
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 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
|
||||
|
@ -192,7 +192,12 @@ extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickOpen(int device_index);
|
|||
/**
|
||||
* Return the SDL_Joystick associated with an instance id.
|
||||
*/
|
||||
extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickFromInstanceID(SDL_JoystickID joyid);
|
||||
extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickFromInstanceID(SDL_JoystickID instance_id);
|
||||
|
||||
/**
|
||||
* Return the SDL_Joystick associated with a player index.
|
||||
*/
|
||||
extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickFromPlayerIndex(int player_index);
|
||||
|
||||
/**
|
||||
* Return the name for this currently opened joystick.
|
||||
|
@ -207,6 +212,11 @@ extern DECLSPEC const char *SDLCALL SDL_JoystickName(SDL_Joystick * joystick);
|
|||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickGetPlayerIndex(SDL_Joystick * joystick);
|
||||
|
||||
/**
|
||||
* Set the player index of an opened joystick
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_JoystickSetPlayerIndex(SDL_Joystick * joystick, int player_index);
|
||||
|
||||
/**
|
||||
* Return the GUID for this opened joystick
|
||||
*/
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 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-2019 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 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
|
||||
|
@ -47,7 +47,7 @@ typedef Sint32 SDL_Keycode;
|
|||
#define SDLK_SCANCODE_MASK (1<<30)
|
||||
#define SDL_SCANCODE_TO_KEYCODE(X) (X | SDLK_SCANCODE_MASK)
|
||||
|
||||
enum
|
||||
typedef enum
|
||||
{
|
||||
SDLK_UNKNOWN = 0,
|
||||
|
||||
|
@ -317,7 +317,7 @@ enum
|
|||
|
||||
SDLK_AUDIOREWIND = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOREWIND),
|
||||
SDLK_AUDIOFASTFORWARD = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOFASTFORWARD)
|
||||
};
|
||||
} SDL_KeyCode;
|
||||
|
||||
/**
|
||||
* \brief Enumeration of valid key mods (possibly OR'd together).
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 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-2019 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 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
|
||||
|
@ -61,7 +61,7 @@ extern "C" {
|
|||
* at the VERBOSE level and all other categories are enabled at the
|
||||
* CRITICAL level.
|
||||
*/
|
||||
enum
|
||||
typedef enum
|
||||
{
|
||||
SDL_LOG_CATEGORY_APPLICATION,
|
||||
SDL_LOG_CATEGORY_ERROR,
|
||||
|
@ -94,7 +94,7 @@ enum
|
|||
};
|
||||
*/
|
||||
SDL_LOG_CATEGORY_CUSTOM
|
||||
};
|
||||
} SDL_LogCategory;
|
||||
|
||||
/**
|
||||
* \brief The predefined log priorities
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 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-2019 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 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,9 +36,11 @@ extern "C" {
|
|||
*/
|
||||
typedef enum
|
||||
{
|
||||
SDL_MESSAGEBOX_ERROR = 0x00000010, /**< error dialog */
|
||||
SDL_MESSAGEBOX_WARNING = 0x00000020, /**< warning dialog */
|
||||
SDL_MESSAGEBOX_INFORMATION = 0x00000040 /**< informational dialog */
|
||||
SDL_MESSAGEBOX_ERROR = 0x00000010, /**< error dialog */
|
||||
SDL_MESSAGEBOX_WARNING = 0x00000020, /**< warning dialog */
|
||||
SDL_MESSAGEBOX_INFORMATION = 0x00000040, /**< informational dialog */
|
||||
SDL_MESSAGEBOX_BUTTONS_LEFT_TO_RIGHT = 0x00000080, /**< buttons placed left to right */
|
||||
SDL_MESSAGEBOX_BUTTONS_RIGHT_TO_LEFT = 0x00000100 /**< buttons placed right to left */
|
||||
} SDL_MessageBoxFlags;
|
||||
|
||||
/**
|
||||
|
|
91
sdl2/include/SDL_metal.h
Normal file
91
sdl2/include/SDL_metal.h
Normal file
|
@ -0,0 +1,91 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2020 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file SDL_metal.h
|
||||
*
|
||||
* Header file for functions to creating Metal layers and views on SDL windows.
|
||||
*/
|
||||
|
||||
#ifndef SDL_metal_h_
|
||||
#define SDL_metal_h_
|
||||
|
||||
#include "SDL_video.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \brief A handle to a CAMetalLayer-backed NSView (macOS) or UIView (iOS/tvOS).
|
||||
*
|
||||
* \note This can be cast directly to an NSView or UIView.
|
||||
*/
|
||||
typedef void *SDL_MetalView;
|
||||
|
||||
/**
|
||||
* \name Metal support functions
|
||||
*/
|
||||
/* @{ */
|
||||
|
||||
/**
|
||||
* \brief Create a CAMetalLayer-backed NSView/UIView and attach it to the
|
||||
* specified window.
|
||||
*
|
||||
* On macOS, this does *not* associate a MTLDevice with the CAMetalLayer on its
|
||||
* own. It is up to user code to do that.
|
||||
*
|
||||
* The returned handle can be casted directly to a NSView or UIView, and the
|
||||
* CAMetalLayer can be accessed from the view's 'layer' property.
|
||||
*
|
||||
* \code
|
||||
* SDL_MetalView metalview = SDL_Metal_CreateView(window);
|
||||
* UIView *uiview = (__bridge UIView *)metalview;
|
||||
* CAMetalLayer *metallayer = (CAMetalLayer *)uiview.layer;
|
||||
* // [...]
|
||||
* SDL_Metal_DestroyView(metalview);
|
||||
* \endcode
|
||||
*
|
||||
* \sa SDL_Metal_DestroyView
|
||||
*/
|
||||
extern DECLSPEC SDL_MetalView SDLCALL SDL_Metal_CreateView(SDL_Window * window);
|
||||
|
||||
/**
|
||||
* \brief Destroy an existing SDL_MetalView object.
|
||||
*
|
||||
* This should be called before SDL_DestroyWindow, if SDL_Metal_CreateView was
|
||||
* called after SDL_CreateWindow.
|
||||
*
|
||||
* \sa SDL_Metal_CreateView
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_Metal_DestroyView(SDL_MetalView view);
|
||||
|
||||
/* @} *//* Metal support functions */
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* SDL_metal_h_ */
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 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-2019 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 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-2019 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 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-2019 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 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
|
||||
|
|
|
@ -40,6 +40,9 @@ extern "C" {
|
|||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
#define WIN32_LEAN_AND_MEAN 1
|
||||
#endif
|
||||
#ifndef NOMINMAX /* don't define min() and max(). */
|
||||
#define NOMINMAX
|
||||
#endif
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 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-2019 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 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-2019 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 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
|
||||
|
@ -48,7 +48,7 @@ extern "C" {
|
|||
/* @} */
|
||||
|
||||
/** Pixel type. */
|
||||
enum
|
||||
typedef enum
|
||||
{
|
||||
SDL_PIXELTYPE_UNKNOWN,
|
||||
SDL_PIXELTYPE_INDEX1,
|
||||
|
@ -62,18 +62,18 @@ enum
|
|||
SDL_PIXELTYPE_ARRAYU32,
|
||||
SDL_PIXELTYPE_ARRAYF16,
|
||||
SDL_PIXELTYPE_ARRAYF32
|
||||
};
|
||||
} SDL_PixelType;
|
||||
|
||||
/** Bitmap pixel order, high bit -> low bit. */
|
||||
enum
|
||||
typedef enum
|
||||
{
|
||||
SDL_BITMAPORDER_NONE,
|
||||
SDL_BITMAPORDER_4321,
|
||||
SDL_BITMAPORDER_1234
|
||||
};
|
||||
} SDL_BitmapOrder;
|
||||
|
||||
/** Packed component order, high bit -> low bit. */
|
||||
enum
|
||||
typedef enum
|
||||
{
|
||||
SDL_PACKEDORDER_NONE,
|
||||
SDL_PACKEDORDER_XRGB,
|
||||
|
@ -84,12 +84,12 @@ enum
|
|||
SDL_PACKEDORDER_BGRX,
|
||||
SDL_PACKEDORDER_ABGR,
|
||||
SDL_PACKEDORDER_BGRA
|
||||
};
|
||||
} SDL_PackedOrder;
|
||||
|
||||
/** Array component order, low byte -> high byte. */
|
||||
/* !!! FIXME: in 2.1, make these not overlap differently with
|
||||
!!! FIXME: SDL_PACKEDORDER_*, so we can simplify SDL_ISPIXELFORMAT_ALPHA */
|
||||
enum
|
||||
typedef enum
|
||||
{
|
||||
SDL_ARRAYORDER_NONE,
|
||||
SDL_ARRAYORDER_RGB,
|
||||
|
@ -98,10 +98,10 @@ enum
|
|||
SDL_ARRAYORDER_BGR,
|
||||
SDL_ARRAYORDER_BGRA,
|
||||
SDL_ARRAYORDER_ABGR
|
||||
};
|
||||
} SDL_ArrayOrder;
|
||||
|
||||
/** Packed component layout. */
|
||||
enum
|
||||
typedef enum
|
||||
{
|
||||
SDL_PACKEDLAYOUT_NONE,
|
||||
SDL_PACKEDLAYOUT_332,
|
||||
|
@ -112,7 +112,7 @@ enum
|
|||
SDL_PACKEDLAYOUT_8888,
|
||||
SDL_PACKEDLAYOUT_2101010,
|
||||
SDL_PACKEDLAYOUT_1010102
|
||||
};
|
||||
} SDL_PackedLayout;
|
||||
|
||||
#define SDL_DEFINE_PIXELFOURCC(A, B, C, D) SDL_FOURCC(A, B, C, D)
|
||||
|
||||
|
@ -191,6 +191,9 @@ typedef enum
|
|||
SDL_PIXELFORMAT_RGB444 =
|
||||
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XRGB,
|
||||
SDL_PACKEDLAYOUT_4444, 12, 2),
|
||||
SDL_PIXELFORMAT_BGR444 =
|
||||
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XBGR,
|
||||
SDL_PACKEDLAYOUT_4444, 12, 2),
|
||||
SDL_PIXELFORMAT_RGB555 =
|
||||
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XRGB,
|
||||
SDL_PACKEDLAYOUT_1555, 15, 2),
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 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-2019 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 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-2019 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 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-2019 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 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-2019 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 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
|
||||
|
@ -85,6 +85,16 @@ typedef struct SDL_RendererInfo
|
|||
int max_texture_height; /**< The maximum texture height */
|
||||
} SDL_RendererInfo;
|
||||
|
||||
/**
|
||||
* \brief The scaling mode for a texture.
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
SDL_ScaleModeNearest, /**< nearest pixel sampling */
|
||||
SDL_ScaleModeLinear, /**< linear filtering */
|
||||
SDL_ScaleModeBest /**< anisotropic filtering */
|
||||
} SDL_ScaleMode;
|
||||
|
||||
/**
|
||||
* \brief The access pattern allowed for a texture.
|
||||
*/
|
||||
|
@ -366,6 +376,35 @@ extern DECLSPEC int SDLCALL SDL_SetTextureBlendMode(SDL_Texture * texture,
|
|||
extern DECLSPEC int SDLCALL SDL_GetTextureBlendMode(SDL_Texture * texture,
|
||||
SDL_BlendMode *blendMode);
|
||||
|
||||
/**
|
||||
* \brief Set the scale mode used for texture scale operations.
|
||||
*
|
||||
* \param texture The texture to update.
|
||||
* \param scaleMode ::SDL_ScaleMode to use for texture scaling.
|
||||
*
|
||||
* \return 0 on success, or -1 if the texture is not valid.
|
||||
*
|
||||
* \note If the scale mode is not supported, the closest supported mode is
|
||||
* chosen.
|
||||
*
|
||||
* \sa SDL_GetTextureScaleMode()
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SetTextureScaleMode(SDL_Texture * texture,
|
||||
SDL_ScaleMode scaleMode);
|
||||
|
||||
/**
|
||||
* \brief Get the scale mode used for texture scale operations.
|
||||
*
|
||||
* \param texture The texture to query.
|
||||
* \param scaleMode A pointer filled in with the current scale mode.
|
||||
*
|
||||
* \return 0 on success, or -1 if the texture is not valid.
|
||||
*
|
||||
* \sa SDL_SetTextureScaleMode()
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GetTextureScaleMode(SDL_Texture * texture,
|
||||
SDL_ScaleMode *scaleMode);
|
||||
|
||||
/**
|
||||
* \brief Update the given texture rectangle with new pixel data.
|
||||
*
|
||||
|
@ -430,10 +469,31 @@ extern DECLSPEC int SDLCALL SDL_LockTexture(SDL_Texture * texture,
|
|||
const SDL_Rect * rect,
|
||||
void **pixels, int *pitch);
|
||||
|
||||
/**
|
||||
* \brief Lock a portion of the texture for write-only pixel access.
|
||||
* Expose it as a SDL surface.
|
||||
*
|
||||
* \param texture The texture to lock for access, which was created with
|
||||
* ::SDL_TEXTUREACCESS_STREAMING.
|
||||
* \param rect A pointer to the rectangle to lock for access. If the rect
|
||||
* is NULL, the entire texture will be locked.
|
||||
* \param surface This is filled in with a SDL surface representing the locked area
|
||||
* Surface is freed internally after calling SDL_UnlockTexture or SDL_DestroyTexture.
|
||||
*
|
||||
* \return 0 on success, or -1 if the texture is not valid or was not created with ::SDL_TEXTUREACCESS_STREAMING.
|
||||
*
|
||||
* \sa SDL_UnlockTexture()
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_LockTextureToSurface(SDL_Texture *texture,
|
||||
const SDL_Rect *rect,
|
||||
SDL_Surface **surface);
|
||||
|
||||
/**
|
||||
* \brief Unlock a texture, uploading the changes to video memory, if needed.
|
||||
* If SDL_LockTextureToSurface() was called for locking, the SDL surface is freed.
|
||||
*
|
||||
* \sa SDL_LockTexture()
|
||||
* \sa SDL_LockTextureToSurface()
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_UnlockTexture(SDL_Texture * texture);
|
||||
|
||||
|
@ -558,8 +618,8 @@ extern DECLSPEC void SDLCALL SDL_RenderGetViewport(SDL_Renderer * renderer,
|
|||
* \brief Set the clip rectangle for the current target.
|
||||
*
|
||||
* \param renderer The renderer for which clip rectangle should be set.
|
||||
* \param rect A pointer to the rectangle to set as the clip rectangle, or
|
||||
* NULL to disable clipping.
|
||||
* \param rect A pointer to the rectangle to set as the clip rectangle,
|
||||
* relative to the viewport, or NULL to disable clipping.
|
||||
*
|
||||
* \return 0 on success, or -1 on error
|
||||
*
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#define SDL_REVISION "hg-12952:bc90ce38f1e2"
|
||||
#define SDL_REVISION_NUMBER 12952
|
||||
#define SDL_REVISION "hg-13609:34cc7d3b69d3"
|
||||
#define SDL_REVISION_NUMBER 13609
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 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-2019 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 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-2019 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 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-2019 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 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-2019 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 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
|
||||
|
@ -408,6 +408,8 @@ extern DECLSPEC int SDLCALL SDL_abs(int x);
|
|||
|
||||
extern DECLSPEC int SDLCALL SDL_isdigit(int x);
|
||||
extern DECLSPEC int SDLCALL SDL_isspace(int x);
|
||||
extern DECLSPEC int SDLCALL SDL_isupper(int x);
|
||||
extern DECLSPEC int SDLCALL SDL_islower(int x);
|
||||
extern DECLSPEC int SDLCALL SDL_toupper(int x);
|
||||
extern DECLSPEC int SDLCALL SDL_tolower(int x);
|
||||
|
||||
|
@ -415,11 +417,14 @@ extern DECLSPEC void *SDLCALL SDL_memset(SDL_OUT_BYTECAP(len) void *dst, int c,
|
|||
|
||||
#define SDL_zero(x) SDL_memset(&(x), 0, sizeof((x)))
|
||||
#define SDL_zerop(x) SDL_memset((x), 0, sizeof(*(x)))
|
||||
#define SDL_zeroa(x) SDL_memset((x), 0, sizeof((x)))
|
||||
|
||||
/* Note that memset() is a byte assignment and this is a 32-bit assignment, so they're not directly equivalent. */
|
||||
SDL_FORCE_INLINE void SDL_memset4(void *dst, Uint32 val, size_t dwords)
|
||||
{
|
||||
#if defined(__GNUC__) && defined(i386)
|
||||
#ifdef __APPLE__
|
||||
memset_pattern4(dst, &val, dwords * 4);
|
||||
#elif defined(__GNUC__) && defined(i386)
|
||||
int u0, u1, u2;
|
||||
__asm__ __volatile__ (
|
||||
"cld \n\t"
|
||||
|
@ -450,11 +455,14 @@ extern DECLSPEC void *SDLCALL SDL_memcpy(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_
|
|||
extern DECLSPEC void *SDLCALL SDL_memmove(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len);
|
||||
extern DECLSPEC int SDLCALL SDL_memcmp(const void *s1, const void *s2, size_t len);
|
||||
|
||||
extern DECLSPEC wchar_t *SDLCALL SDL_wcsdup(const wchar_t *wstr);
|
||||
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 wchar_t *SDLCALL SDL_wcsdup(const wchar_t *wstr);
|
||||
extern DECLSPEC wchar_t *SDLCALL SDL_wcsstr(const wchar_t *haystack, const wchar_t *needle);
|
||||
|
||||
extern DECLSPEC int SDLCALL SDL_wcscmp(const wchar_t *str1, const wchar_t *str2);
|
||||
extern DECLSPEC int SDLCALL SDL_wcsncmp(const wchar_t *str1, const wchar_t *str2, size_t maxlen);
|
||||
|
||||
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);
|
||||
|
@ -467,6 +475,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 char *SDLCALL SDL_strtokr(char *s1, const char *s2, char **saveptr);
|
||||
extern DECLSPEC size_t SDLCALL SDL_utf8strlen(const char *str);
|
||||
|
||||
extern DECLSPEC char *SDLCALL SDL_itoa(int value, char *str, int radix);
|
||||
|
@ -581,6 +590,7 @@ extern DECLSPEC char *SDLCALL SDL_iconv_string(const char *tocode,
|
|||
#define SDL_strchr strchr
|
||||
#define SDL_strrchr strrchr
|
||||
#define SDL_strstr strstr
|
||||
#define SDL_strtokr strtok_r
|
||||
#define SDL_strcmp strcmp
|
||||
#define SDL_strncmp strncmp
|
||||
#define SDL_strcasecmp strcasecmp
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 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
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue