Compare commits

..

10 commits

Author SHA1 Message Date
Chris Smith
424032b0ca Corrects the additon of SDLK_CONTEXT_MENU (and scancodes). 2023-01-10 13:45:54 +00:00
Chris Smith
8da70d5aa1 Adds SDLK_CONTEXT_MENU (and scancode). 2022-10-12 10:07:31 +01:00
Chris Smith
f1003e7110 Adds function SDL_JoystickGetDeviceHWID() to get the hardware ID of a joystick so devices can be uniquely referenced over program executions.
An example would be one SDL application launching another SDL application, passing it the HWID of the joystick that is to be the "primary" controller.
2021-03-18 18:40:22 +00:00
Chris Smith
f6027780aa Fixes build so it works with LibreELEC (bad unnecessary header include), dodgy sdlchecks endif() 2020-09-14 16:23:02 +01:00
Chris Smith
92272721ac Fixes Mali build. 2020-03-25 16:26:00 +00:00
Chris Smith
30cb43e6bb Restored SDL_config.h 2020-03-25 15:35:45 +00:00
Chris Smith
401fb4308e Adds Mali Sys Window Info - returns native_window (and egl_surface as a bonus). 2020-03-25 15:21:54 +00:00
Jools Wills
b5e5778aab mali-fbdev support / debian package changes
* mali-fbdev support from https://github.com/mihailescu2m/libsdl2-2.0.2-dfsg1 with changes for newer SDL
2019-02-07 20:16:12 +00:00
Jools Wills
3de856fc76 Revert "Linux joystick: Look at entire axis namespace for controls (thanks, "spaz16"!)."
This reverts commit 4cb7923f25.

see https://github.com/RetroPie/RetroPie-Setup/issues/1297
2019-02-07 20:16:12 +00:00
Jools Wills
8b464c159c silence log output for unknown input 2019-02-07 20:16:12 +00:00
959 changed files with 31946 additions and 119549 deletions

View file

@ -4,34 +4,13 @@ autom4te*
config.cache config.cache
config.log config.log
config.status config.status
libtool
Makefile Makefile
Makefile.rules sdl-config
sdl2-config
sdl2-config.cmake
sdl2.pc
SDL2.spec SDL2.spec
build build
gen gen
Build Build
# for CMake
CMakeFiles/
CMakeCache.txt
cmake_install.cmake
cmake_uninstall.cmake
SDL2ConfigVersion.cmake
*.a
*.la
*.so
*.so.*
.ninja_*
*.ninja
# for CLion
.idea
cmake-build-*
# for Xcode # for Xcode
*.orig *.orig
*.swp *.swp
@ -79,7 +58,7 @@ VisualC/visualtest/testsprite2_sample.parameters
# for Android # for Android
android-project/local.properties android-project/local.properties
test/aclocal.m4 sdl.pc
test/autom4te* test/autom4te*
test/config.cache test/config.cache
test/config.log test/config.log
@ -143,13 +122,10 @@ test/testthread
test/testtimer test/testtimer
test/testver test/testver
test/testviewport test/testviewport
test/testvulkan
test/testwm2 test/testwm2
test/testyuv test/testyuv
test/torturethread test/torturethread
test/*.exe test/*.exe
test/*,e1f
test/*,ff8
test/*.dSYM test/*.dSYM
buildbot buildbot
test/buildbot test/buildbot

View file

@ -33,5 +33,3 @@ e12c387305129c847b3928a123300b113782fe3f release-2.0.4
8df7a59b55283aa09889522369a2b32674c048de release-2.0.6 8df7a59b55283aa09889522369a2b32674c048de release-2.0.6
2088cd828335797d73d151e3288d899f77204862 release-2.0.7 2088cd828335797d73d151e3288d899f77204862 release-2.0.7
f1084c419f33610cf274e309a8b2798d2ae665c7 release-2.0.8 f1084c419f33610cf274e309a8b2798d2ae665c7 release-2.0.8
8feb5da6f2fb75703bde2c06813375af984a57f0 release-2.0.9
bc90ce38f1e27ace54b83bebf987993002504f7f release-2.0.10

28
Android.mk Executable file → Normal file
View file

@ -20,7 +20,6 @@ LOCAL_SRC_FILES := \
$(wildcard $(LOCAL_PATH)/src/audio/*.c) \ $(wildcard $(LOCAL_PATH)/src/audio/*.c) \
$(wildcard $(LOCAL_PATH)/src/audio/android/*.c) \ $(wildcard $(LOCAL_PATH)/src/audio/android/*.c) \
$(wildcard $(LOCAL_PATH)/src/audio/dummy/*.c) \ $(wildcard $(LOCAL_PATH)/src/audio/dummy/*.c) \
$(wildcard $(LOCAL_PATH)/src/audio/openslES/*.c) \
$(LOCAL_PATH)/src/atomic/SDL_atomic.c.arm \ $(LOCAL_PATH)/src/atomic/SDL_atomic.c.arm \
$(LOCAL_PATH)/src/atomic/SDL_spinlock.c.arm \ $(LOCAL_PATH)/src/atomic/SDL_spinlock.c.arm \
$(wildcard $(LOCAL_PATH)/src/core/android/*.c) \ $(wildcard $(LOCAL_PATH)/src/core/android/*.c) \
@ -54,34 +53,12 @@ LOCAL_SRC_FILES := \
LOCAL_SHARED_LIBRARIES := hidapi LOCAL_SHARED_LIBRARIES := hidapi
LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES
LOCAL_CFLAGS += \ LOCAL_LDLIBS := -ldl -lGLESv1_CM -lGLESv2 -llog -landroid
-Wall -Wextra \
-Wdocumentation \
-Wdocumentation-unknown-command \
-Wmissing-prototypes \
-Wunreachable-code-break \
-Wunneeded-internal-declaration \
-Wmissing-variable-declarations \
-Wfloat-conversion \
-Wshorten-64-to-32 \
-Wunreachable-code-return \
-Wshift-sign-overflow \
-Wstrict-prototypes \
-Wkeyword-macro \
# Warnings we haven't fixed (yet)
LOCAL_CFLAGS += -Wno-unused-parameter -Wno-sign-compare
LOCAL_LDLIBS := -ldl -lGLESv1_CM -lGLESv2 -lOpenSLES -llog -landroid
ifeq ($(NDK_DEBUG),1) ifeq ($(NDK_DEBUG),1)
cmd-strip := cmd-strip :=
endif endif
LOCAL_STATIC_LIBRARIES := cpufeatures
include $(BUILD_SHARED_LIBRARY) include $(BUILD_SHARED_LIBRARY)
########################### ###########################
@ -131,6 +108,3 @@ LOCAL_MODULE := libhidapi
LOCAL_LDLIBS := -llog LOCAL_LDLIBS := -llog
include $(BUILD_SHARED_LIBRARY) include $(BUILD_SHARED_LIBRARY)
$(call import-module,android/cpufeatures)

View file

@ -3,7 +3,7 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
endif() endif()
cmake_minimum_required(VERSION 2.8.11) cmake_minimum_required(VERSION 2.8.11)
project(SDL2 C CXX) project(SDL2 C)
# !!! FIXME: this should probably do "MACOSX_RPATH ON" as a target property # !!! FIXME: this should probably do "MACOSX_RPATH ON" as a target property
# !!! FIXME: for the SDL2 shared library (so you get an # !!! FIXME: for the SDL2 shared library (so you get an
@ -42,12 +42,12 @@ include(${SDL2_SOURCE_DIR}/cmake/sdlchecks.cmake)
# set SDL_BINARY_AGE and SDL_INTERFACE_AGE to 0. # set SDL_BINARY_AGE and SDL_INTERFACE_AGE to 0.
set(SDL_MAJOR_VERSION 2) set(SDL_MAJOR_VERSION 2)
set(SDL_MINOR_VERSION 0) set(SDL_MINOR_VERSION 0)
set(SDL_MICRO_VERSION 12) set(SDL_MICRO_VERSION 9)
set(SDL_INTERFACE_AGE 0) set(SDL_INTERFACE_AGE 0)
set(SDL_BINARY_AGE 12) set(SDL_BINARY_AGE 9)
set(SDL_VERSION "${SDL_MAJOR_VERSION}.${SDL_MINOR_VERSION}.${SDL_MICRO_VERSION}") set(SDL_VERSION "${SDL_MAJOR_VERSION}.${SDL_MINOR_VERSION}.${SDL_MICRO_VERSION}")
# the following should match the versions in Xcode project file: # the following should match the versions in Xcode project file:
set(DYLIB_CURRENT_VERSION 12.0.0) set(DYLIB_CURRENT_VERSION 10.0.0)
set(DYLIB_COMPATIBILITY_VERSION 1.0.0) set(DYLIB_COMPATIBILITY_VERSION 1.0.0)
# Set defaults preventing destination file conflicts # Set defaults preventing destination file conflicts
@ -64,7 +64,7 @@ set(LT_REVISION "${SDL_INTERFACE_AGE}")
set(LT_RELEASE "${SDL_MAJOR_VERSION}.${SDL_MINOR_VERSION}") set(LT_RELEASE "${SDL_MAJOR_VERSION}.${SDL_MINOR_VERSION}")
set(LT_VERSION "${LT_MAJOR}.${LT_AGE}.${LT_REVISION}") set(LT_VERSION "${LT_MAJOR}.${LT_AGE}.${LT_REVISION}")
#message(STATUS "${LT_VERSION} :: ${LT_AGE} :: ${LT_REVISION} :: ${LT_CURRENT} :: ${LT_RELEASE}") message(STATUS "${LT_VERSION} :: ${LT_AGE} :: ${LT_REVISION} :: ${LT_CURRENT} :: ${LT_RELEASE}")
# General settings & flags # General settings & flags
set(LIBRARY_OUTPUT_DIRECTORY "build") set(LIBRARY_OUTPUT_DIRECTORY "build")
@ -118,8 +118,6 @@ elseif(APPLE)
set(DARWIN TRUE) set(DARWIN TRUE)
elseif(CMAKE_SYSTEM_NAME MATCHES ".*MacOS.*") elseif(CMAKE_SYSTEM_NAME MATCHES ".*MacOS.*")
set(MACOSX TRUE) set(MACOSX TRUE)
elseif(CMAKE_SYSTEM_NAME MATCHES ".*tvOS.*")
set(TVOS TRUE)
endif() endif()
# TODO: iOS? # TODO: iOS?
elseif(CMAKE_SYSTEM_NAME MATCHES "BeOS.*") elseif(CMAKE_SYSTEM_NAME MATCHES "BeOS.*")
@ -129,7 +127,7 @@ elseif(CMAKE_SYSTEM_NAME MATCHES "Haiku.*")
endif() endif()
# Don't mistake osx for unix # Don't mistake osx for unix
if(UNIX AND NOT APPLE AND NOT RISCOS) if(UNIX AND NOT APPLE)
set(UNIX_SYS ON) set(UNIX_SYS ON)
else() else()
set(UNIX_SYS OFF) set(UNIX_SYS OFF)
@ -157,27 +155,6 @@ if(UNIX OR MINGW OR MSYS)
set(OPT_DEF_LIBC ON) set(OPT_DEF_LIBC ON)
endif() endif()
# The hidraw support doesn't catch Xbox, PS4 and Nintendo controllers,
# 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)
endif()
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 # Compiler info
if(CMAKE_COMPILER_IS_GNUCC) if(CMAKE_COMPILER_IS_GNUCC)
set(USE_GCC TRUE) set(USE_GCC TRUE)
@ -287,23 +264,8 @@ if(EMSCRIPTEN)
set(SDL_DLOPEN_ENABLED_BY_DEFAULT OFF) set(SDL_DLOPEN_ENABLED_BY_DEFAULT OFF)
endif() endif()
# When defined, respect CMake's BUILD_SHARED_LIBS setting:
set(SDL_STATIC_ENABLED_BY_DEFAULT ON)
if (NOT DEFINED SDL_SHARED_ENABLED_BY_DEFAULT) if (NOT DEFINED SDL_SHARED_ENABLED_BY_DEFAULT)
# ...unless decided already (as for EMSCRIPTEN)
set(SDL_SHARED_ENABLED_BY_DEFAULT OFF)
if (NOT DEFINED BUILD_SHARED_LIBS)
# No preference? Build both, just like the AC/AM configure
set(SDL_SHARED_ENABLED_BY_DEFAULT ON) set(SDL_SHARED_ENABLED_BY_DEFAULT ON)
elseif (BUILD_SHARED_LIBS)
# In this case, we assume the user wants a shared lib and don't build
# the static one
set(SDL_SHARED_ENABLED_BY_DEFAULT ON)
set(SDL_STATIC_ENABLED_BY_DEFAULT OFF)
endif()
endif() endif()
set(SDL_SUBSYSTEMS set(SDL_SUBSYSTEMS
@ -329,8 +291,6 @@ set_option(SSE "Use SSE assembly routines" ${OPT_DEF_ASM})
set_option(SSE2 "Use SSE2 assembly routines" ${OPT_DEF_SSEMATH}) set_option(SSE2 "Use SSE2 assembly routines" ${OPT_DEF_SSEMATH})
set_option(SSE3 "Use SSE3 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(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(DISKAUDIO "Support the disk writer audio driver" ON)
set_option(DUMMYAUDIO "Support the dummy audio driver" ON) set_option(DUMMYAUDIO "Support the dummy audio driver" ON)
set_option(VIDEO_DIRECTFB "Use DirectFB video driver" OFF) set_option(VIDEO_DIRECTFB "Use DirectFB video driver" OFF)
@ -341,7 +301,7 @@ set_option(VIDEO_OPENGLES "Include OpenGL ES support" ON)
set_option(PTHREADS "Use POSIX threads for multi-threading" ${SDL_PTHREADS_ENABLED_BY_DEFAULT}) set_option(PTHREADS "Use POSIX threads for multi-threading" ${SDL_PTHREADS_ENABLED_BY_DEFAULT})
dep_option(PTHREADS_SEM "Use pthread semaphores" ON "PTHREADS" OFF) 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(SDL_DLOPEN "Use dlopen for shared object loading" ${SDL_DLOPEN_ENABLED_BY_DEFAULT})
dep_option(OSS "Support the OSS audio API" ON "UNIX_SYS OR RISCOS" OFF) set_option(OSS "Support the OSS audio API" ${UNIX_SYS})
set_option(ALSA "Support the ALSA audio API" ${UNIX_SYS}) set_option(ALSA "Support the ALSA audio API" ${UNIX_SYS})
dep_option(ALSA_SHARED "Dynamically load ALSA audio support" ON "ALSA" OFF) dep_option(ALSA_SHARED "Dynamically load ALSA audio support" ON "ALSA" OFF)
set_option(JACK "Support the JACK audio API" ${UNIX_SYS}) set_option(JACK "Support the JACK audio API" ${UNIX_SYS})
@ -366,6 +326,8 @@ set_option(VIDEO_X11 "Use X11 video driver" ${UNIX_SYS})
set_option(VIDEO_WAYLAND "Use Wayland video driver" ${UNIX_SYS}) set_option(VIDEO_WAYLAND "Use Wayland video driver" ${UNIX_SYS})
dep_option(WAYLAND_SHARED "Dynamically load Wayland support" ON "VIDEO_WAYLAND" OFF) dep_option(WAYLAND_SHARED "Dynamically load Wayland support" ON "VIDEO_WAYLAND" OFF)
dep_option(VIDEO_WAYLAND_QT_TOUCH "QtWayland server support for Wayland video driver" ON "VIDEO_WAYLAND" OFF) dep_option(VIDEO_WAYLAND_QT_TOUCH "QtWayland server support for Wayland video driver" ON "VIDEO_WAYLAND" OFF)
set_option(VIDEO_MIR "Use Mir video driver" ${UNIX_SYS})
dep_option(MIR_SHARED "Dynamically load Mir support" ON "VIDEO_MIR" OFF)
set_option(VIDEO_RPI "Use Raspberry Pi video driver" ${UNIX_SYS}) set_option(VIDEO_RPI "Use Raspberry Pi video driver" ${UNIX_SYS})
dep_option(X11_SHARED "Dynamically load X11 support" ON "VIDEO_X11" OFF) dep_option(X11_SHARED "Dynamically load X11 support" ON "VIDEO_X11" OFF)
set(SDL_X11_OPTIONS Xcursor Xinerama XInput Xrandr Xscrnsaver XShape Xvm) set(SDL_X11_OPTIONS Xcursor Xinerama XInput Xrandr Xscrnsaver XShape Xvm)
@ -377,19 +339,16 @@ set_option(VIDEO_COCOA "Use Cocoa video driver" ${APPLE})
set_option(DIRECTX "Use DirectX for Windows audio/video" ${WINDOWS}) set_option(DIRECTX "Use DirectX for Windows audio/video" ${WINDOWS})
set_option(WASAPI "Use the Windows WASAPI audio driver" ${WINDOWS}) set_option(WASAPI "Use the Windows WASAPI audio driver" ${WINDOWS})
set_option(RENDER_D3D "Enable the Direct3D render 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_MALI "Use Mali EGL video driver" ${UNIX_SYS})
set_option(VIDEO_VIVANTE "Use Vivante EGL video driver" ${UNIX_SYS}) 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) 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}) set_option(VIDEO_KMSDRM "Use KMS DRM video driver" ${UNIX_SYS})
dep_option(KMSDRM_SHARED "Dynamically load KMS DRM support" ON "VIDEO_KMSDRM" OFF) 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})
# TODO: We should (should we?) respect cmake's ${BUILD_SHARED_LIBS} flag here
# The options below are for compatibility to configure's default behaviour.
set(SDL_SHARED ${SDL_SHARED_ENABLED_BY_DEFAULT} CACHE BOOL "Build a shared version of the library") set(SDL_SHARED ${SDL_SHARED_ENABLED_BY_DEFAULT} CACHE BOOL "Build a shared version of the library")
set(SDL_STATIC ${SDL_STATIC_ENABLED_BY_DEFAULT} CACHE BOOL "Build a static version of the library") set(SDL_STATIC ON CACHE BOOL "Build a static version of the library")
dep_option(SDL_STATIC_PIC "Static version of the library should be built with Position Independent Code" OFF "SDL_STATIC" OFF) dep_option(SDL_STATIC_PIC "Static version of the library should be built with Position Independent Code" OFF "SDL_STATIC" OFF)
set_option(SDL_TEST "Build the test directory" OFF) set_option(SDL_TEST "Build the test directory" OFF)
@ -428,14 +387,6 @@ else()
endif() endif()
set(HAVE_ASSERTIONS ${ASSERTIONS}) set(HAVE_ASSERTIONS ${ASSERTIONS})
if(NOT BACKGROUNDING_SIGNAL STREQUAL "OFF")
add_definitions("-DSDL_BACKGROUNDING_SIGNAL=${BACKGROUNDING_SIGNAL}")
endif()
if(NOT FOREGROUNDING_SIGNAL STREQUAL "OFF")
add_definitions("-DSDL_FOREGROUNDING_SIGNAL=${FOREGROUNDING_SIGNAL}")
endif()
# Compiler option evaluation # Compiler option evaluation
if(USE_GCC OR USE_CLANG) if(USE_GCC OR USE_CLANG)
# Check for -Wall first, so later things can override pieces of it. # Check for -Wall first, so later things can override pieces of it.
@ -447,11 +398,6 @@ if(USE_GCC OR USE_CLANG)
endif() endif()
endif() endif()
check_c_compiler_flag(-fno-strict-aliasing HAVE_GCC_NO_STRICT_ALIASING)
if(HAVE_GCC_NO_STRICT_ALIASING)
list(APPEND EXTRA_CFLAGS "-fno-strict-aliasing")
endif()
check_c_compiler_flag(-Wdeclaration-after-statement HAVE_GCC_WDECLARATION_AFTER_STATEMENT) check_c_compiler_flag(-Wdeclaration-after-statement HAVE_GCC_WDECLARATION_AFTER_STATEMENT)
if(HAVE_GCC_WDECLARATION_AFTER_STATEMENT) if(HAVE_GCC_WDECLARATION_AFTER_STATEMENT)
check_c_compiler_flag(-Werror=declaration-after-statement HAVE_GCC_WERROR_DECLARATION_AFTER_STATEMENT) check_c_compiler_flag(-Werror=declaration-after-statement HAVE_GCC_WERROR_DECLARATION_AFTER_STATEMENT)
@ -673,61 +619,6 @@ if(ASSEMBLY)
endif() endif()
endif() 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) elseif(MSVC_VERSION GREATER 1500)
# TODO: SDL_cpuinfo.h needs to support the user's configuration wish # TODO: SDL_cpuinfo.h needs to support the user's configuration wish
# for MSVC - right now it is always activated # for MSVC - right now it is always activated
@ -760,10 +651,10 @@ if(LIBC)
set(HAVE_SIGNAL_H 1) set(HAVE_SIGNAL_H 1)
foreach(_FN foreach(_FN
malloc calloc realloc free qsort abs memset memcpy memmove memcmp malloc calloc realloc free qsort abs memset memcpy memmove memcmp
wcslen wcslcpy wcslcat wcsdup wcsstr wcscmp wcsncmp wcslen wcscmp
strlen _strrev _strupr _strlwr strchr strrchr strstr itoa _ltoa strlen _strrev _strupr _strlwr strchr strrchr strstr itoa _ltoa
_ultoa strtol strtoul strtoll strtod atoi atof strcmp strncmp _ultoa strtol strtoul strtoll strtod atoi atof strcmp strncmp
_stricmp _strnicmp strtok_s sscanf _stricmp _strnicmp sscanf
acos acosf asin asinf atan atanf atan2 atan2f ceil ceilf acos acosf asin asinf atan atanf atan2 atan2f ceil ceilf
copysign copysignf cos cosf exp expf fabs fabsf floor floorf fmod fmodf 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) log logf log10 log10f pow powf scalbn scalbnf sin sinf sqrt sqrtf tan tanf)
@ -797,12 +688,11 @@ if(LIBC)
foreach(_FN foreach(_FN
strtod malloc calloc realloc free getenv setenv putenv unsetenv strtod malloc calloc realloc free getenv setenv putenv unsetenv
qsort abs bcopy memset memcpy memmove memcmp strlen strlcpy strlcat qsort abs bcopy memset memcpy memmove memcmp strlen strlcpy strlcat
_strrev _strupr _strlwr strchr strrchr strstr strtok_r itoa _ltoa _strrev _strupr _strlwr strchr strrchr strstr itoa _ltoa
_uitoa _ultoa strtol strtoul _i64toa _ui64toa strtoll strtoull _uitoa _ultoa strtol strtoul _i64toa _ui64toa strtoll strtoull
atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp
wcscmp wcsdup wcslcat wcslcpy wcslen wcsncmp wcsstr vsscanf vsnprintf fopen64 fseeko fseeko64 sigaction setjmp
sscanf vsscanf vsnprintf fopen64 fseeko fseeko64 sigaction setjmp nanosleep sysconf sysctlbyname getauxval poll
nanosleep sysconf sysctlbyname getauxval poll _Exit
) )
string(TOUPPER ${_FN} _UPPER) string(TOUPPER ${_FN} _UPPER)
set(_HAVEVAR "HAVE_${_UPPER}") set(_HAVEVAR "HAVE_${_UPPER}")
@ -813,10 +703,8 @@ if(LIBC)
if(HAVE_LIBM) if(HAVE_LIBM)
set(CMAKE_REQUIRED_LIBRARIES m) set(CMAKE_REQUIRED_LIBRARIES m)
foreach(_FN foreach(_FN
atan atan2 atanf atan2f ceil ceilf copysign copysignf cos cosf atan atan2 ceil copysign cos cosf fabs floor log pow scalbn sin
exp expf fabs fabsf floor floorf fmod fmodf log logf log10 log10f sinf sqrt sqrtf tan tanf acos asin)
pow powf scalbn scalbnf sin sinf sqrt sqrtf tan tanf acos acosf
asin asinf)
string(TOUPPER ${_FN} _UPPER) string(TOUPPER ${_FN} _UPPER)
set(_HAVEVAR "HAVE_${_UPPER}") set(_HAVEVAR "HAVE_${_UPPER}")
check_function_exists("${_FN}" ${_HAVEVAR}) check_function_exists("${_FN}" ${_HAVEVAR})
@ -876,7 +764,7 @@ if(SDL_POWER)
file(GLOB POWER_SOURCES ${SDL2_SOURCE_DIR}/src/power/*.c) file(GLOB POWER_SOURCES ${SDL2_SOURCE_DIR}/src/power/*.c)
set(SOURCE_FILES ${SOURCE_FILES} ${POWER_SOURCES}) set(SOURCE_FILES ${SOURCE_FILES} ${POWER_SOURCES})
endif() endif()
# TODO: in configure.ac, the test for LOADSO and SDL_DLOPEN is a bit weird: # TODO: in configure.in, the test for LOADSO and SDL_DLOPEN is a bit weird:
# if LOADSO is not wanted, SDL_LOADSO_DISABLED is set # if LOADSO is not wanted, SDL_LOADSO_DISABLED is set
# If however on Unix or APPLE dlopen() is detected via CheckDLOPEN(), # If however on Unix or APPLE dlopen() is detected via CheckDLOPEN(),
# SDL_LOADSO_DISABLED will not be set, regardless of the LOADSO settings # SDL_LOADSO_DISABLED will not be set, regardless of the LOADSO settings
@ -913,16 +801,8 @@ if(SDL_VIDEO)
set(HAVE_VIDEO_DUMMY TRUE) set(HAVE_VIDEO_DUMMY TRUE)
set(HAVE_SDL_VIDEO TRUE) set(HAVE_SDL_VIDEO TRUE)
endif() 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() endif()
# Platform-specific options and settings
if(ANDROID) if(ANDROID)
file(GLOB ANDROID_CORE_SOURCES ${SDL2_SOURCE_DIR}/src/core/android/*.c) file(GLOB ANDROID_CORE_SOURCES ${SDL2_SOURCE_DIR}/src/core/android/*.c)
set(SOURCE_FILES ${SOURCE_FILES} ${ANDROID_CORE_SOURCES}) set(SOURCE_FILES ${SOURCE_FILES} ${ANDROID_CORE_SOURCES})
@ -958,7 +838,6 @@ if(ANDROID)
set(HAVE_SDL_HAPTIC TRUE) set(HAVE_SDL_HAPTIC TRUE)
endif() endif()
if(SDL_JOYSTICK) if(SDL_JOYSTICK)
CheckHIDAPI()
set(SDL_JOYSTICK_ANDROID 1) set(SDL_JOYSTICK_ANDROID 1)
file(GLOB ANDROID_JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/android/*.c ${SDL2_SOURCE_DIR}/src/joystick/steam/*.c) file(GLOB ANDROID_JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/android/*.c ${SDL2_SOURCE_DIR}/src/joystick/steam/*.c)
set(SOURCE_FILES ${SOURCE_FILES} ${ANDROID_JOYSTICK_SOURCES}) set(SOURCE_FILES ${SOURCE_FILES} ${ANDROID_JOYSTICK_SOURCES})
@ -995,24 +874,16 @@ if(ANDROID)
set(HAVE_SDL_VIDEO TRUE) set(HAVE_SDL_VIDEO TRUE)
# Core stuff # 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_LOG_LIBRARY log)
find_library(ANDROID_LIBRARY_LIBRARY android) find_library(ANDROID_LIBRARY_LIBRARY android)
list(APPEND EXTRA_LIBS ${ANDROID_DL_LIBRARY} ${ANDROID_LOG_LIBRARY} ${ANDROID_LIBRARY_LIBRARY}) list(APPEND EXTRA_LIBS ${ANDROID_DL_LIBRARY} ${ANDROID_LOG_LIBRARY} ${ANDROID_LIBRARY_LIBRARY})
add_definitions(-DGL_GLEXT_PROTOTYPES) add_definitions(-DGL_GLEXT_PROTOTYPES)
if (HAVE_HIDAPI)
list(APPEND EXTRA_LIBS hidapi)
endif()
#enable gles #enable gles
if(VIDEO_OPENGLES) if(VIDEO_OPENGLES)
set(SDL_VIDEO_OPENGL_EGL 1) set(SDL_VIDEO_OPENGL_EGL 1)
set(HAVE_VIDEO_OPENGLES TRUE) set(HAVE_VIDEO_OPENGLES TRUE)
set(SDL_VIDEO_OPENGL_ES 1)
set(SDL_VIDEO_RENDER_OGL_ES 1)
set(SDL_VIDEO_OPENGL_ES2 1) set(SDL_VIDEO_OPENGL_ES2 1)
set(SDL_VIDEO_RENDER_OGL_ES2 1) set(SDL_VIDEO_RENDER_OGL_ES2 1)
@ -1038,7 +909,10 @@ if(ANDROID)
CheckPTHREAD() CheckPTHREAD()
elseif(EMSCRIPTEN) endif()
# Platform-specific options and settings
if(EMSCRIPTEN)
# Hide noisy warnings that intend to aid mostly during initial stages of porting a new # Hide noisy warnings that intend to aid mostly during initial stages of porting a new
# project. Uncomment at will for verbose cross-compiling -I/../ path info. # project. Uncomment at will for verbose cross-compiling -I/../ path info.
add_definitions(-Wno-warn-absolute-paths) add_definitions(-Wno-warn-absolute-paths)
@ -1090,8 +964,7 @@ elseif(EMSCRIPTEN)
set(SDL_VIDEO_RENDER_OGL_ES2 1) set(SDL_VIDEO_RENDER_OGL_ES2 1)
endif() endif()
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(SDL_AUDIO)
if(SYSV5 OR SOLARIS OR HPUX) if(SYSV5 OR SOLARIS OR HPUX)
set(SDL_AUDIO_DRIVER_SUNAUDIO 1) set(SDL_AUDIO_DRIVER_SUNAUDIO 1)
@ -1125,12 +998,14 @@ elseif(UNIX AND NOT APPLE AND NOT ANDROID AND NOT RISCOS)
# Need to check for Raspberry PI first and add platform specific compiler flags, otherwise the test for GLES fails! # Need to check for Raspberry PI first and add platform specific compiler flags, otherwise the test for GLES fails!
CheckRPI() CheckRPI()
CheckX11() CheckX11()
CheckMir()
CheckDirectFB() CheckDirectFB()
CheckOpenGLX11() CheckOpenGLX11()
CheckOpenGLESX11() CheckOpenGLESX11()
CheckWayland() CheckWayland()
CheckVivante() CheckVivante()
CheckKMSDRM() CheckKMSDRM()
CheckMali()
endif() endif()
if(UNIX) if(UNIX)
@ -1190,7 +1065,6 @@ elseif(UNIX AND NOT APPLE AND NOT ANDROID AND NOT RISCOS)
set(HAVE_IBUS_IBUS_H TRUE) set(HAVE_IBUS_IBUS_H TRUE)
include_directories(${IBUS_INCLUDE_DIRS}) include_directories(${IBUS_INCLUDE_DIRS})
list(APPEND EXTRA_LIBS ${IBUS_LIBRARIES}) list(APPEND EXTRA_LIBS ${IBUS_LIBRARIES})
add_definitions(-DSDL_USE_IME)
endif() endif()
if(HAVE_LIBUNWIND_H) if(HAVE_LIBUNWIND_H)
# We've already found the header, so REQUIRE the lib to be present # We've already found the header, so REQUIRE the lib to be present
@ -1214,10 +1088,7 @@ elseif(UNIX AND NOT APPLE AND NOT ANDROID AND NOT RISCOS)
endif() endif()
if(SDL_JOYSTICK) if(SDL_JOYSTICK)
if(FREEBSD OR NETBSD OR OPENBSD OR BSDI) CheckUSBHID() # seems to be BSD specific - limit the test to BSD only?
CheckUSBHID()
endif()
CheckHIDAPI()
if(LINUX AND NOT ANDROID) if(LINUX AND NOT ANDROID)
set(SDL_JOYSTICK_LINUX 1) set(SDL_JOYSTICK_LINUX 1)
file(GLOB JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/linux/*.c ${SDL2_SOURCE_DIR}/src/joystick/steam/*.c) file(GLOB JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/linux/*.c ${SDL2_SOURCE_DIR}/src/joystick/steam/*.c)
@ -1354,9 +1225,10 @@ elseif(WINDOWS)
set(CMAKE_REQUIRED_FLAGS ${ORIG_CMAKE_REQUIRED_FLAGS}) set(CMAKE_REQUIRED_FLAGS ${ORIG_CMAKE_REQUIRED_FLAGS})
endif() endif()
# headers needed elsewhere # headers needed elsewhere ...
check_include_file(mmdeviceapi.h HAVE_MMDEVICEAPI_H) check_include_file(mmdeviceapi.h HAVE_MMDEVICEAPI_H)
check_include_file(audioclient.h HAVE_AUDIOCLIENT_H) check_include_file(audioclient.h HAVE_AUDIOCLIENT_H)
check_include_file(endpointvolume.h HAVE_ENDPOINTVOLUME_H)
if(SDL_AUDIO) if(SDL_AUDIO)
set(SDL_AUDIO_DRIVER_WINMM 1) set(SDL_AUDIO_DRIVER_WINMM 1)
@ -1422,9 +1294,9 @@ elseif(WINDOWS)
endif() endif()
# Libraries for Win32 native and MinGW # Libraries for Win32 native and MinGW
list(APPEND EXTRA_LIBS user32 gdi32 winmm imm32 ole32 oleaut32 version uuid advapi32 setupapi shell32) list(APPEND EXTRA_LIBS user32 gdi32 winmm imm32 ole32 oleaut32 version uuid advapi32 shell32)
# TODO: in configure.ac the check for timers is set on # TODO: in configure.in the check for timers is set on
# cygwin | mingw32* - does this include mingw32CE? # cygwin | mingw32* - does this include mingw32CE?
if(SDL_TIMERS) if(SDL_TIMERS)
set(SDL_TIMER_WINDOWS 1) set(SDL_TIMER_WINDOWS 1)
@ -1460,11 +1332,6 @@ elseif(WINDOWS)
endif() endif()
if(SDL_JOYSTICK) 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()
file(GLOB JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/windows/*.c) file(GLOB JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/windows/*.c)
set(SOURCE_FILES ${SOURCE_FILES} ${JOYSTICK_SOURCES}) set(SOURCE_FILES ${SOURCE_FILES} ${JOYSTICK_SOURCES})
if(HAVE_DINPUT_H) if(HAVE_DINPUT_H)
@ -1510,7 +1377,6 @@ elseif(WINDOWS)
set(SDL_CFLAGS "${SDL_CFLAGS} -Dmain=SDL_main") set(SDL_CFLAGS "${SDL_CFLAGS} -Dmain=SDL_main")
list(APPEND SDL_LIBS "-lmingw32" "-lSDL2main" "-mwindows") list(APPEND SDL_LIBS "-lmingw32" "-lSDL2main" "-mwindows")
endif() endif()
elseif(APPLE) elseif(APPLE)
# TODO: rework this all for proper MacOS X, iOS and Darwin support # TODO: rework this all for proper MacOS X, iOS and Darwin support
@ -1518,11 +1384,10 @@ elseif(APPLE)
# !!! FIXME: we need Carbon for some very old API calls in # !!! FIXME: we need Carbon for some very old API calls in
# !!! FIXME: src/video/cocoa/SDL_cocoakeyboard.c, but we should figure out # !!! FIXME: src/video/cocoa/SDL_cocoakeyboard.c, but we should figure out
# !!! FIXME: how to dump those. # !!! FIXME: how to dump those.
if(DARWIN OR MACOSX) if(NOT IOS)
set(SDL_FRAMEWORK_COCOA 1) set(SDL_FRAMEWORK_COCOA 1)
set(SDL_FRAMEWORK_CARBON 1) set(SDL_FRAMEWORK_CARBON 1)
endif() endif()
set(SDL_FRAMEWORK_FOUNDATION 1)
# Requires the darwin file implementation # Requires the darwin file implementation
if(SDL_FILE) if(SDL_FILE)
@ -1546,63 +1411,48 @@ elseif(APPLE)
set(HAVE_SDL_AUDIO TRUE) set(HAVE_SDL_AUDIO TRUE)
set(SDL_FRAMEWORK_COREAUDIO 1) set(SDL_FRAMEWORK_COREAUDIO 1)
set(SDL_FRAMEWORK_AUDIOTOOLBOX 1) set(SDL_FRAMEWORK_AUDIOTOOLBOX 1)
set(SDL_FRAMEWORK_AVFOUNDATION 1)
endif() endif()
if(SDL_JOYSTICK) if(SDL_JOYSTICK)
CheckHIDAPI() set(SDL_JOYSTICK_IOKIT 1)
if(HAVE_HIDAPI) if (IOS)
if(IOS OR TVOS)
set(SOURCE_FILES ${SOURCE_FILES} ${SDL2_SOURCE_DIR}/src/hidapi/ios/hid.m)
set(SDL_FRAMEWORK_COREBLUETOOTH 1)
endif()
endif()
if(IOS OR TVOS)
file(GLOB JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/iphoneos/*.m ${SDL2_SOURCE_DIR}/src/joystick/steam/*.c) 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() else()
file(GLOB JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/darwin/*.c) 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() endif()
set(SOURCE_FILES ${SOURCE_FILES} ${JOYSTICK_SOURCES}) set(SOURCE_FILES ${SOURCE_FILES} ${JOYSTICK_SOURCES})
set(HAVE_SDL_JOYSTICK TRUE) set(HAVE_SDL_JOYSTICK TRUE)
set(SDL_FRAMEWORK_IOKIT 1)
set(SDL_FRAMEWORK_FF 1)
endif() endif()
if(SDL_HAPTIC) if(SDL_HAPTIC)
if (IOS OR TVOS) set(SDL_HAPTIC_IOKIT 1)
if (IOS)
file(GLOB HAPTIC_SOURCES ${SDL2_SOURCE_DIR}/src/haptic/dummy/*.c) file(GLOB HAPTIC_SOURCES ${SDL2_SOURCE_DIR}/src/haptic/dummy/*.c)
set(SDL_HAPTIC_DUMMY 1) set(SDL_HAPTIC_DUMMY 1)
else() else()
file(GLOB HAPTIC_SOURCES ${SDL2_SOURCE_DIR}/src/haptic/darwin/*.c) 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() endif()
set(SOURCE_FILES ${SOURCE_FILES} ${HAPTIC_SOURCES}) set(SOURCE_FILES ${SOURCE_FILES} ${HAPTIC_SOURCES})
set(HAVE_SDL_HAPTIC TRUE) set(HAVE_SDL_HAPTIC TRUE)
set(SDL_FRAMEWORK_IOKIT 1)
set(SDL_FRAMEWORK_FF 1)
if(NOT SDL_JOYSTICK) if(NOT SDL_JOYSTICK)
message(FATAL_ERROR "SDL_HAPTIC requires SDL_JOYSTICK to be enabled") message(FATAL_ERROR "SDL_HAPTIC requires SDL_JOYSTICK to be enabled")
endif() endif()
endif() endif()
if(SDL_POWER) if(SDL_POWER)
if (IOS OR TVOS) set(SDL_POWER_MACOSX 1)
if (IOS)
file(GLOB POWER_SOURCES ${SDL2_SOURCE_DIR}/src/power/uikit/*.m) file(GLOB POWER_SOURCES ${SDL2_SOURCE_DIR}/src/power/uikit/*.m)
set(SDL_POWER_UIKIT 1)
else() else()
file(GLOB POWER_SOURCES ${SDL2_SOURCE_DIR}/src/power/macosx/*.c) file(GLOB POWER_SOURCES ${SDL2_SOURCE_DIR}/src/power/macosx/*.c)
set(SDL_POWER_MACOSX 1)
set(SDL_FRAMEWORK_IOKIT 1)
endif() endif()
set(SOURCE_FILES ${SOURCE_FILES} ${POWER_SOURCES}) set(SOURCE_FILES ${SOURCE_FILES} ${POWER_SOURCES})
set(HAVE_SDL_POWER TRUE) set(HAVE_SDL_POWER TRUE)
set(SDL_FRAMEWORK_IOKIT 1)
endif() endif()
if(SDL_TIMERS) if(SDL_TIMERS)
@ -1621,89 +1471,6 @@ elseif(APPLE)
set(HAVE_SDL_FILESYSTEM TRUE) set(HAVE_SDL_FILESYSTEM TRUE)
endif() 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. # Actually load the frameworks at the end so we don't duplicate include.
if(SDL_FRAMEWORK_COREVIDEO) if(SDL_FRAMEWORK_COREVIDEO)
find_library(COREVIDEO CoreVideo) find_library(COREVIDEO CoreVideo)
@ -1733,57 +1500,32 @@ elseif(APPLE)
find_library(AUDIOTOOLBOX AudioToolbox) find_library(AUDIOTOOLBOX AudioToolbox)
list(APPEND EXTRA_LIBS ${AUDIOTOOLBOX}) list(APPEND EXTRA_LIBS ${AUDIOTOOLBOX})
endif() endif()
if(SDL_FRAMEWORK_AVFOUNDATION)
find_library(AVFOUNDATION AVFoundation) # iOS hack needed - http://code.google.com/p/ios-cmake/ ?
list(APPEND EXTRA_LIBS ${AVFOUNDATION}) if(SDL_VIDEO)
endif() if (IOS)
if(SDL_FRAMEWORK_COREBLUETOOTH) set(SDL_VIDEO_DRIVER_UIKIT 1)
find_library(COREBLUETOOTH CoreBluetooth) file(GLOB UIKITVIDEO_SOURCES ${SDL2_SOURCE_DIR}/src/video/uikit/*.m)
list(APPEND EXTRA_LIBS ${COREBLUETOOTH}) set(SOURCE_FILES ${SOURCE_FILES} ${UIKITVIDEO_SOURCES})
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() else()
list(APPEND EXTRA_LDFLAGS "-Wl,-weak_framework,Metal") 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() endif()
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() endif()
CheckPTHREAD() CheckPTHREAD()
elseif(HAIKU) elseif(HAIKU)
if(SDL_VIDEO) if(SDL_VIDEO)
set(SDL_VIDEO_DRIVER_HAIKU 1) set(SDL_VIDEO_DRIVER_HAIKU 1)
@ -1814,24 +1556,6 @@ elseif(HAIKU)
endif() endif()
CheckPTHREAD() 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() endif()
if(VIDEO_VULKAN) if(VIDEO_VULKAN)
@ -1840,7 +1564,7 @@ if(VIDEO_VULKAN)
endif() endif()
# Dummies # Dummies
# configure.ac does it differently: # configure.in does it differently:
# if not have X # if not have X
# if enable_X { SDL_X_DISABLED = 1 } # if enable_X { SDL_X_DISABLED = 1 }
# [add dummy sources] # [add dummy sources]
@ -2005,37 +1729,15 @@ if(UNIX)
message(STATUS "") message(STATUS "")
endif() 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 # Ensure that the extra cflags are used at compile time
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
# Always build SDLmain # Always build SDLmain
add_library(SDL2main STATIC ${SDLMAIN_SOURCES}) add_library(SDL2main STATIC ${SDLMAIN_SOURCES})
target_include_directories(SDL2main PUBLIC "$<BUILD_INTERFACE:${SDL2_SOURCE_DIR}/include>" $<INSTALL_INTERFACE:include> $<INSTALL_INTERFACE:include/SDL2>) target_include_directories(SDL2main PUBLIC "$<BUILD_INTERFACE:${SDL2_SOURCE_DIR}/include>" $<INSTALL_INTERFACE:include/SDL2>)
set(_INSTALL_LIBS "SDL2main") set(_INSTALL_LIBS "SDL2main")
if (NOT ANDROID) 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() endif()
if(SDL_SHARED) if(SDL_SHARED)
@ -2063,29 +1765,9 @@ if(SDL_SHARED)
endif() endif()
set(_INSTALL_LIBS "SDL2" ${_INSTALL_LIBS}) set(_INSTALL_LIBS "SDL2" ${_INSTALL_LIBS})
target_link_libraries(SDL2 ${EXTRA_LIBS} ${EXTRA_LDFLAGS}) target_link_libraries(SDL2 ${EXTRA_LIBS} ${EXTRA_LDFLAGS})
target_include_directories(SDL2 PUBLIC "$<BUILD_INTERFACE:${SDL2_SOURCE_DIR}/include>" $<INSTALL_INTERFACE:include> $<INSTALL_INTERFACE:include/SDL2>) target_include_directories(SDL2 PUBLIC "$<BUILD_INTERFACE:${SDL2_SOURCE_DIR}/include>" $<INSTALL_INTERFACE:include/SDL2>)
if (NOT ANDROID) 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()
if(ANDROID)
if(HAVE_HIDAPI)
add_library(hidapi SHARED ${SDL2_SOURCE_DIR}/src/hidapi/android/hid.cpp)
endif()
if(MSVC AND NOT LIBC)
# Don't try to link with the default set of libraries.
set_target_properties(hidapi PROPERTIES LINK_FLAGS_RELEASE "/NODEFAULTLIB")
set_target_properties(hidapi PROPERTIES LINK_FLAGS_DEBUG "/NODEFAULTLIB")
set_target_properties(hidapi PROPERTIES STATIC_LIBRARY_FLAGS "/NODEFAULTLIB")
endif()
if(HAVE_HIDAPI)
target_link_libraries(hidapi log)
endif() endif()
endif() endif()
@ -2109,12 +1791,9 @@ if(SDL_STATIC)
# libraries - do we need to consider this? # libraries - do we need to consider this?
set(_INSTALL_LIBS "SDL2-static" ${_INSTALL_LIBS}) set(_INSTALL_LIBS "SDL2-static" ${_INSTALL_LIBS})
target_link_libraries(SDL2-static ${EXTRA_LIBS} ${EXTRA_LDFLAGS}) target_link_libraries(SDL2-static ${EXTRA_LIBS} ${EXTRA_LDFLAGS})
target_include_directories(SDL2-static PUBLIC "$<BUILD_INTERFACE:${SDL2_SOURCE_DIR}/include>" $<INSTALL_INTERFACE:include> $<INSTALL_INTERFACE:include/SDL2>) target_include_directories(SDL2-static PUBLIC "$<BUILD_INTERFACE:${SDL2_SOURCE_DIR}/include>" $<INSTALL_INTERFACE:include/SDL2>)
if (NOT ANDROID) 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()
endif() endif()
@ -2134,10 +1813,12 @@ install(TARGETS ${_INSTALL_LIBS} EXPORT SDL2Targets
RUNTIME DESTINATION bin) RUNTIME DESTINATION bin)
##### Export files ##### ##### Export files #####
if (WINDOWS) if (APPLE)
set(PKG_PREFIX "SDL2.framework/Resources")
elseif (WINDOWS)
set(PKG_PREFIX "cmake") set(PKG_PREFIX "cmake")
else () else ()
set(PKG_PREFIX "lib${LIB_SUFFIX}/cmake/SDL2") set(PKG_PREFIX "lib/cmake/SDL2")
endif () endif ()
include(CMakePackageConfigHelpers) include(CMakePackageConfigHelpers)
@ -2182,8 +1863,8 @@ if(NOT (WINDOWS OR CYGWIN))
if(NOT ANDROID) if(NOT ANDROID)
install(CODE " install(CODE "
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink
\"lib${SONAME}${SOPOSTFIX}${SOEXT}\" \"libSDL2${SOPOSTFIX}${SOEXT}\" \"lib${SONAME}${SOPOSTFIX}${SOEXT}\" \"libSDL2${SOPOSTFIX}${SOEXT}\")"
WORKING_DIRECTORY \"${SDL2_BINARY_DIR}\")") WORKING_DIR "${SDL2_BINARY_DIR}")
install(FILES ${SDL2_BINARY_DIR}/libSDL2${SOPOSTFIX}${SOEXT} DESTINATION "lib${LIB_SUFFIX}") install(FILES ${SDL2_BINARY_DIR}/libSDL2${SOPOSTFIX}${SOEXT} DESTINATION "lib${LIB_SUFFIX}")
endif() endif()
endif() endif()

View file

@ -1,6 +1,6 @@
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages

View file

@ -44,9 +44,7 @@ SDLTEST_OBJECTS = @SDLTEST_OBJECTS@
WAYLAND_SCANNER = @WAYLAND_SCANNER@ 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.in debian docs include Makefile.* sdl2-config.cmake.in sdl2-config.in sdl2.m4 sdl2.pc.in SDL2.spec.in SDL2Config.cmake src test VisualC.html VisualC VisualC-WinRT Xcode Xcode-iOS 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 GEN_DIST = SDL2.spec
ifneq ($V,1) ifneq ($V,1)
@ -84,7 +82,6 @@ HDRS = \
SDL_log.h \ SDL_log.h \
SDL_main.h \ SDL_main.h \
SDL_messagebox.h \ SDL_messagebox.h \
SDL_metal.h \
SDL_mouse.h \ SDL_mouse.h \
SDL_mutex.h \ SDL_mutex.h \
SDL_name.h \ SDL_name.h \
@ -128,9 +125,9 @@ LT_RELEASE = @LT_RELEASE@
LT_REVISION = @LT_REVISION@ LT_REVISION = @LT_REVISION@
LT_LDFLAGS = -no-undefined -rpath $(libdir) -release $(LT_RELEASE) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) LT_LDFLAGS = -no-undefined -rpath $(libdir) -release $(LT_RELEASE) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
all: $(srcdir)/configure Makefile $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET) $(objects)/$(SDLTEST_TARGET) all: $(srcdir)/configure Makefile $(objects) $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET) $(objects)/$(SDLTEST_TARGET)
$(srcdir)/configure: $(srcdir)/configure.ac $(srcdir)/configure: $(srcdir)/configure.in
@echo "Warning, configure is out of date, please re-run autogen.sh" @echo "Warning, configure is out of date, please re-run autogen.sh"
Makefile: $(srcdir)/Makefile.in Makefile: $(srcdir)/Makefile.in
@ -138,9 +135,8 @@ Makefile: $(srcdir)/Makefile.in
Makefile.in:; Makefile.in:;
$(objects)/.created: $(objects):
$(SHELL) $(auxdir)/mkinstalldirs $(objects) $(SHELL) $(auxdir)/mkinstalldirs $@
touch $@
update-revision: update-revision:
$(SHELL) $(auxdir)/updaterev.sh $(SHELL) $(auxdir)/updaterev.sh
@ -158,11 +154,8 @@ $(objects)/$(SDLTEST_TARGET): $(SDLTEST_OBJECTS)
install: all install-bin install-hdrs install-lib install-data install: all install-bin install-hdrs install-lib install-data
install-bin: install-bin:
ifeq ($(INSTALL_SDL2_CONFIG),TRUE)
$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(bindir) $(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(bindir)
$(INSTALL) -m 755 sdl2-config $(DESTDIR)$(bindir)/sdl2-config $(INSTALL) -m 755 sdl2-config $(DESTDIR)$(bindir)/sdl2-config
endif
install-hdrs: update-revision install-hdrs: update-revision
$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(includedir)/SDL2 $(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(includedir)/SDL2
for file in $(HDRS) $(SDLTEST_HDRS); do \ for file in $(HDRS) $(SDLTEST_HDRS); do \
@ -185,11 +178,8 @@ install-data:
$(INSTALL) -m 644 $(srcdir)/sdl2.m4 $(DESTDIR)$(datadir)/aclocal/sdl2.m4 $(INSTALL) -m 644 $(srcdir)/sdl2.m4 $(DESTDIR)$(datadir)/aclocal/sdl2.m4
$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)/pkgconfig $(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)/pkgconfig
$(INSTALL) -m 644 sdl2.pc $(DESTDIR)$(libdir)/pkgconfig $(INSTALL) -m 644 sdl2.pc $(DESTDIR)$(libdir)/pkgconfig
ifeq ($(INSTALL_SDL2_CONFIG),TRUE)
$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)/cmake/SDL2 $(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)/cmake/SDL2
$(INSTALL) -m 644 sdl2-config.cmake $(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 uninstall: uninstall-bin uninstall-hdrs uninstall-lib uninstall-data
uninstall-bin: uninstall-bin:
@ -209,7 +199,6 @@ uninstall-data:
rm -f $(DESTDIR)$(datadir)/aclocal/sdl2.m4 rm -f $(DESTDIR)$(datadir)/aclocal/sdl2.m4
rm -f $(DESTDIR)$(libdir)/pkgconfig/sdl2.pc rm -f $(DESTDIR)$(libdir)/pkgconfig/sdl2.pc
rm -f $(DESTDIR)$(libdir)/cmake/SDL2/sdl2-config.cmake rm -f $(DESTDIR)$(libdir)/cmake/SDL2/sdl2-config.cmake
rm -f $(DESTDIR)$(libdir)/cmake/SDL2/sdl2-config-version.cmake
clean: clean:
rm -rf $(objects) rm -rf $(objects)

View file

@ -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 # wmake -f Makefile.os2
LIBNAME = SDL2 LIBNAME = SDL2
VERSION = 2.0.12 VERSION = 2.0.9
DESCRIPTION = Simple DirectMedia Layer 2 DESCRIPTION = Simple DirectMedia Layer 2
LIBHOME = . LIBHOME = .
@ -15,8 +15,7 @@ INCPATH = -I"$(%WATCOM)/h/os2" -I"$(%WATCOM)/h"
INCPATH+= -I"$(LIBHOME)/h" INCPATH+= -I"$(LIBHOME)/h"
INCPATH+= -Iinclude INCPATH+= -Iinclude
LIBM = libm.lib LIBS = mmpm2.lib libuls.lib libconv.lib
LIBS = mmpm2.lib libuls.lib libconv.lib $(LIBM)
CFLAGS = -bt=os2 -d0 -q -bm -5s -fp5 -fpi87 -sg -oteanbmier -ei CFLAGS = -bt=os2 -d0 -q -bm -5s -fp5 -fpi87 -sg -oteanbmier -ei
# max warnings: # max warnings:
@ -25,15 +24,11 @@ CFLAGS+= -wx
CFLAGS+= -bd CFLAGS+= -bd
# the include paths : # the include paths :
CFLAGS+= $(INCPATH) CFLAGS+= $(INCPATH)
# building SDL itself (for DECLSPEC): # building SDL itself:
CFLAGS+= -DBUILD_SDL CFLAGS+= -DBUILD_SDL
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.c &
k_cos.c k_rem_pio2.c k_sin.c k_tan.c &
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.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 SDL_strtokr.c SRCS+= SDL_getenv.c SDL_iconv.c SDL_malloc.c SDL_qsort.c SDL_stdlib.c SDL_string.c
SRCS+= SDL_cpuinfo.c SDL_atomic.c SDL_spinlock.c SDL_thread.c SDL_timer.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_rwops.c SDL_power.c
SRCS+= SDL_audio.c SDL_audiocvt.c SDL_audiodev.c SDL_audiotypecvt.c SDL_mixer.c SDL_wave.c SRCS+= SDL_audio.c SDL_audiocvt.c SDL_audiodev.c SDL_audiotypecvt.c SDL_mixer.c SDL_wave.c
@ -61,7 +56,6 @@ SRCS+= SDL_dummysensor.c
SRCS+= SDL_dynapi.c SRCS+= SDL_dynapi.c
OBJS = $(SRCS:.c=.obj) OBJS = $(SRCS:.c=.obj)
MOBJS= $(MSRCS:.c=.obj)
.extensions: .extensions:
.extensions: .lib .dll .obj .c .asm .extensions: .lib .dll .obj .c .asm
@ -72,7 +66,7 @@ MOBJS= $(MSRCS:.c=.obj)
all: $(DLLFILE) $(LIBFILE) .symbolic all: $(DLLFILE) $(LIBFILE) .symbolic
$(DLLFILE): $(OBJS) $(LIBM) $(LNKFILE) $(DLLFILE): $(OBJS) $(LNKFILE)
@echo * Linking: $@ @echo * Linking: $@
wlink @$(LNKFILE) wlink @$(LNKFILE)
@ -89,9 +83,6 @@ SDL_cpuinfo.obj: SDL_cpuinfo.c
SDL_rwops.obj: SDL_rwops.c SDL_rwops.obj: SDL_rwops.c
wcc386 $(CFLAGS) -wcd=136 -fo=$^@ $< wcc386 $(CFLAGS) -wcd=136 -fo=$^@ $<
SDL_wave.obj: SDL_wave.c
wcc386 $(CFLAGS) -wcd=124 -fo=$^@ $<
SDL_blendfillrect.obj: SDL_blendfillrect.c SDL_blendfillrect.obj: SDL_blendfillrect.c
wcc386 $(CFLAGS) -wcd=200 -fo=$^@ $< wcc386 $(CFLAGS) -wcd=200 -fo=$^@ $<
@ -104,10 +95,6 @@ SDL_blendpoint.obj: SDL_blendpoint.c
SDL_RLEaccel.obj: SDL_RLEaccel.c SDL_RLEaccel.obj: SDL_RLEaccel.c
wcc386 $(CFLAGS) -wcd=201 -fo=$^@ $< wcc386 $(CFLAGS) -wcd=201 -fo=$^@ $<
.c: ./src/libm;
$(LIBM): $(MOBJS)
wlib -q -b -n -c -pa -s -t -zld -ii -io $@ $(MOBJS)
$(LNKFILE): $(LNKFILE):
@echo * Creating linker file: $@ @echo * Creating linker file: $@
@%create $@ @%create $@
@ -131,7 +118,6 @@ clean: .SYMBOLIC
@if exist *.obj rm *.obj @if exist *.obj rm *.obj
@if exist *.err rm *.err @if exist *.err rm *.err
@if exist $(LNKFILE) rm $(LNKFILE) @if exist $(LNKFILE) rm $(LNKFILE)
@if exist $(LIBM) rm $(LIBM)
distclean: .SYMBOLIC clean distclean: .SYMBOLIC clean
@if exist $(LIBHOME)/*.exp rm $(LIBHOME)/*.exp @if exist $(LIBHOME)/*.exp rm $(LIBHOME)/*.exp

View file

@ -50,7 +50,6 @@ OBJS= src/SDL.o \
src/stdlib/SDL_qsort.o \ src/stdlib/SDL_qsort.o \
src/stdlib/SDL_stdlib.o \ src/stdlib/SDL_stdlib.o \
src/stdlib/SDL_string.o \ src/stdlib/SDL_string.o \
src/stdlib/SDL_strtokr.o \
src/thread/SDL_thread.o \ src/thread/SDL_thread.o \
src/thread/generic/SDL_systls.o \ src/thread/generic/SDL_systls.o \
src/thread/psp/SDL_syssem.o \ src/thread/psp/SDL_syssem.o \
@ -79,7 +78,7 @@ OBJS= src/SDL.o \
src/video/psp/SDL_pspevents.o \ src/video/psp/SDL_pspevents.o \
src/video/psp/SDL_pspvideo.o \ src/video/psp/SDL_pspvideo.o \
src/video/psp/SDL_pspgl.o \ src/video/psp/SDL_pspgl.o \
src/video/psp/SDL_pspmouse.o src/video/psp/SDL_pspmouse.o \
INCDIR = ./include INCDIR = ./include
CFLAGS = -g -O2 -G0 -Wall -D__PSP__ -DHAVE_OPENGL CFLAGS = -g -O2 -G0 -Wall -D__PSP__ -DHAVE_OPENGL

View file

@ -74,8 +74,7 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/lib*.la %{_libdir}/lib*.la
%{_libdir}/lib*.%{__soext} %{_libdir}/lib*.%{__soext}
%{_includedir}/*/*.h %{_includedir}/*/*.h
%{_libdir}/cmake/* %{_libdir}/pkgconfig/*
%{_libdir}/pkgconfig/SDL2/*
%{_datadir}/aclocal/* %{_datadir}/aclocal/*
%changelog %changelog

View file

@ -285,7 +285,6 @@
<ClCompile Include="..\..\src\stdlib\SDL_qsort.c" /> <ClCompile Include="..\..\src\stdlib\SDL_qsort.c" />
<ClCompile Include="..\..\src\stdlib\SDL_stdlib.c" /> <ClCompile Include="..\..\src\stdlib\SDL_stdlib.c" />
<ClCompile Include="..\..\src\stdlib\SDL_string.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\generic\SDL_syssem.c" />
<ClCompile Include="..\..\src\thread\SDL_thread.c" /> <ClCompile Include="..\..\src\thread\SDL_thread.c" />
<ClCompile Include="..\..\src\thread\stdcpp\SDL_syscond.cpp" /> <ClCompile Include="..\..\src\thread\stdcpp\SDL_syscond.cpp" />

View file

@ -626,9 +626,6 @@
<ClCompile Include="..\..\src\stdlib\SDL_string.c"> <ClCompile Include="..\..\src\stdlib\SDL_string.c">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\..\src\stdlib\SDL_strtokr.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\thread\generic\SDL_syssem.c"> <ClCompile Include="..\..\src\thread\generic\SDL_syssem.c">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>

View file

@ -251,7 +251,6 @@
<ClCompile Include="..\..\src\stdlib\SDL_qsort.c" /> <ClCompile Include="..\..\src\stdlib\SDL_qsort.c" />
<ClCompile Include="..\..\src\stdlib\SDL_stdlib.c" /> <ClCompile Include="..\..\src\stdlib\SDL_stdlib.c" />
<ClCompile Include="..\..\src\stdlib\SDL_string.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\generic\SDL_syscond.c" />
<ClCompile Include="..\..\src\thread\SDL_thread.c" /> <ClCompile Include="..\..\src\thread\SDL_thread.c" />
<ClCompile Include="..\..\src\thread\windows\SDL_sysmutex.c" /> <ClCompile Include="..\..\src\thread\windows\SDL_sysmutex.c" />

View file

@ -593,9 +593,6 @@
<ClCompile Include="..\..\src\stdlib\SDL_string.c"> <ClCompile Include="..\..\src\stdlib\SDL_string.c">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\..\src\stdlib\SDL_strtokr.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\thread\SDL_thread.c"> <ClCompile Include="..\..\src\thread\SDL_thread.c">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>

View file

@ -283,7 +283,6 @@
<ClCompile Include="..\..\src\stdlib\SDL_qsort.c" /> <ClCompile Include="..\..\src\stdlib\SDL_qsort.c" />
<ClCompile Include="..\..\src\stdlib\SDL_stdlib.c" /> <ClCompile Include="..\..\src\stdlib\SDL_stdlib.c" />
<ClCompile Include="..\..\src\stdlib\SDL_string.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\generic\SDL_syscond.c" />
<ClCompile Include="..\..\src\thread\SDL_thread.c" /> <ClCompile Include="..\..\src\thread\SDL_thread.c" />
<ClCompile Include="..\..\src\thread\windows\SDL_sysmutex.c" /> <ClCompile Include="..\..\src\thread\windows\SDL_sysmutex.c" />

View file

@ -611,9 +611,6 @@
<ClCompile Include="..\..\src\stdlib\SDL_string.c"> <ClCompile Include="..\..\src\stdlib\SDL_string.c">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\..\src\stdlib\SDL_strtokr.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\thread\SDL_thread.c"> <ClCompile Include="..\..\src\thread\SDL_thread.c">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>

View file

@ -80,6 +80,18 @@
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
<LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">C:\Program Files %28x86%29\Microsoft DirectX SDK %28June 2010%29\Lib\x86;$(LibraryPath)</LibraryPath> <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">C:\Program Files %28x86%29\Microsoft DirectX SDK %28June 2010%29\Lib\x86;$(LibraryPath)</LibraryPath>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<IncludePath>D:\dev\steam\rel\streaming_client\SDL\src\hidapi\hidapi;$(IncludePath)</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<IncludePath>D:\dev\steam\rel\streaming_client\SDL\src\hidapi\hidapi;$(IncludePath)</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<IncludePath>D:\dev\steam\rel\streaming_client\SDL\src\hidapi\hidapi;$(IncludePath)</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<IncludePath>D:\dev\steam\rel\streaming_client\SDL\src\hidapi\hidapi;$(IncludePath)</IncludePath>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<PreBuildEvent> <PreBuildEvent>
<Command> <Command>
@ -130,6 +142,7 @@
<PreprocessorDefinitions>_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck> <BufferSecurityCheck>false</BufferSecurityCheck>
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>OldStyle</DebugInformationFormat> <DebugInformationFormat>OldStyle</DebugInformationFormat>
<OmitDefaultLibName>true</OmitDefaultLibName> <OmitDefaultLibName>true</OmitDefaultLibName>
@ -195,6 +208,7 @@
<PreprocessorDefinitions>NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck> <BufferSecurityCheck>false</BufferSecurityCheck>
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<OmitDefaultLibName>true</OmitDefaultLibName> <OmitDefaultLibName>true</OmitDefaultLibName>
@ -318,7 +332,7 @@
<ClInclude Include="..\..\src\haptic\windows\SDL_dinputhaptic_c.h" /> <ClInclude Include="..\..\src\haptic\windows\SDL_dinputhaptic_c.h" />
<ClInclude Include="..\..\src\haptic\windows\SDL_windowshaptic_c.h" /> <ClInclude Include="..\..\src\haptic\windows\SDL_windowshaptic_c.h" />
<ClInclude Include="..\..\src\haptic\windows\SDL_xinputhaptic_c.h" /> <ClInclude Include="..\..\src\haptic\windows\SDL_xinputhaptic_c.h" />
<ClInclude Include="..\..\src\joystick\controller_type.h" /> <ClInclude Include="..\..\src\joystick\hidapi\controller_type.h" />
<ClInclude Include="..\..\src\joystick\hidapi\SDL_hidapijoystick_c.h" /> <ClInclude Include="..\..\src\joystick\hidapi\SDL_hidapijoystick_c.h" />
<ClInclude Include="..\..\src\joystick\SDL_joystick_c.h" /> <ClInclude Include="..\..\src\joystick\SDL_joystick_c.h" />
<ClInclude Include="..\..\src\joystick\SDL_sysjoystick.h" /> <ClInclude Include="..\..\src\joystick\SDL_sysjoystick.h" />
@ -419,12 +433,9 @@
<ClCompile Include="..\..\src\haptic\windows\SDL_xinputhaptic.c" /> <ClCompile Include="..\..\src\haptic\windows\SDL_xinputhaptic.c" />
<ClCompile Include="..\..\src\hidapi\windows\hid.c" /> <ClCompile Include="..\..\src\hidapi\windows\hid.c" />
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapijoystick.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_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_switch.c" />
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xbox360.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_hidapi_xboxone.c" />
<ClCompile Include="..\..\src\joystick\SDL_gamecontroller.c" /> <ClCompile Include="..\..\src\joystick\SDL_gamecontroller.c" />
<ClCompile Include="..\..\src\joystick\SDL_joystick.c" /> <ClCompile Include="..\..\src\joystick\SDL_joystick.c" />
@ -487,7 +498,6 @@
<ClCompile Include="..\..\src\stdlib\SDL_qsort.c" /> <ClCompile Include="..\..\src\stdlib\SDL_qsort.c" />
<ClCompile Include="..\..\src\stdlib\SDL_stdlib.c" /> <ClCompile Include="..\..\src\stdlib\SDL_stdlib.c" />
<ClCompile Include="..\..\src\stdlib\SDL_string.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\generic\SDL_syscond.c" />
<ClCompile Include="..\..\src\thread\SDL_thread.c" /> <ClCompile Include="..\..\src\thread\SDL_thread.c" />
<ClCompile Include="..\..\src\thread\windows\SDL_sysmutex.c" /> <ClCompile Include="..\..\src\thread\windows\SDL_sysmutex.c" />

View file

@ -259,7 +259,7 @@
<ClInclude Include="..\..\src\haptic\windows\SDL_dinputhaptic_c.h" /> <ClInclude Include="..\..\src\haptic\windows\SDL_dinputhaptic_c.h" />
<ClInclude Include="..\..\src\haptic\windows\SDL_windowshaptic_c.h" /> <ClInclude Include="..\..\src\haptic\windows\SDL_windowshaptic_c.h" />
<ClInclude Include="..\..\src\haptic\windows\SDL_xinputhaptic_c.h" /> <ClInclude Include="..\..\src\haptic\windows\SDL_xinputhaptic_c.h" />
<ClInclude Include="..\..\src\joystick\controller_type.h" /> <ClInclude Include="..\..\src\joystick\hidapi\controller_type.h" />
<ClInclude Include="..\..\src\joystick\hidapi\SDL_hidapijoystick_c.h" /> <ClInclude Include="..\..\src\joystick\hidapi\SDL_hidapijoystick_c.h" />
<ClInclude Include="..\..\src\joystick\SDL_joystick_c.h" /> <ClInclude Include="..\..\src\joystick\SDL_joystick_c.h" />
<ClInclude Include="..\..\src\joystick\SDL_sysjoystick.h" /> <ClInclude Include="..\..\src\joystick\SDL_sysjoystick.h" />
@ -360,12 +360,9 @@
<ClCompile Include="..\..\src\haptic\windows\SDL_windowshaptic.c" /> <ClCompile Include="..\..\src\haptic\windows\SDL_windowshaptic.c" />
<ClCompile Include="..\..\src\haptic\windows\SDL_xinputhaptic.c" /> <ClCompile Include="..\..\src\haptic\windows\SDL_xinputhaptic.c" />
<ClCompile Include="..\..\src\hidapi\windows\hid.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_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_switch.c" />
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xbox360.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_hidapi_xboxone.c" />
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapijoystick.c" /> <ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapijoystick.c" />
<ClCompile Include="..\..\src\joystick\SDL_gamecontroller.c" /> <ClCompile Include="..\..\src\joystick\SDL_gamecontroller.c" />
@ -429,7 +426,6 @@
<ClCompile Include="..\..\src\stdlib\SDL_qsort.c" /> <ClCompile Include="..\..\src\stdlib\SDL_qsort.c" />
<ClCompile Include="..\..\src\stdlib\SDL_stdlib.c" /> <ClCompile Include="..\..\src\stdlib\SDL_stdlib.c" />
<ClCompile Include="..\..\src\stdlib\SDL_string.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\generic\SDL_syscond.c" />
<ClCompile Include="..\..\src\thread\SDL_thread.c" /> <ClCompile Include="..\..\src\thread\SDL_thread.c" />
<ClCompile Include="..\..\src\thread\windows\SDL_sysmutex.c" /> <ClCompile Include="..\..\src\thread\windows\SDL_sysmutex.c" />

View file

@ -108,6 +108,7 @@
<StringPooling>true</StringPooling> <StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck> <BufferSecurityCheck>false</BufferSecurityCheck>
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>OldStyle</DebugInformationFormat> <DebugInformationFormat>OldStyle</DebugInformationFormat>
<OmitDefaultLibName>true</OmitDefaultLibName> <OmitDefaultLibName>true</OmitDefaultLibName>
@ -142,6 +143,7 @@
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck> <BufferSecurityCheck>false</BufferSecurityCheck>
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>OldStyle</DebugInformationFormat> <DebugInformationFormat>OldStyle</DebugInformationFormat>
<OmitDefaultLibName>true</OmitDefaultLibName> <OmitDefaultLibName>true</OmitDefaultLibName>

View file

@ -108,6 +108,7 @@
<StringPooling>true</StringPooling> <StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck> <BufferSecurityCheck>false</BufferSecurityCheck>
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>OldStyle</DebugInformationFormat> <DebugInformationFormat>OldStyle</DebugInformationFormat>
<OmitDefaultLibName>true</OmitDefaultLibName> <OmitDefaultLibName>true</OmitDefaultLibName>
@ -142,6 +143,7 @@
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck> <BufferSecurityCheck>false</BufferSecurityCheck>
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>OldStyle</DebugInformationFormat> <DebugInformationFormat>OldStyle</DebugInformationFormat>
<OmitDefaultLibName>true</OmitDefaultLibName> <OmitDefaultLibName>true</OmitDefaultLibName>

View file

@ -189,12 +189,6 @@
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies> <CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
<ReferenceOutputAssembly>true</ReferenceOutputAssembly> <ReferenceOutputAssembly>true</ReferenceOutputAssembly>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\..\SDLtest\SDLtest.vcxproj">
<Project>{da956fd3-e143-46f2-9fe5-c77bebc56b1a}</Project>
<Private>false</Private>
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="..\..\..\test\testgesture.c" /> <ClCompile Include="..\..\..\test\testgesture.c" />

View file

@ -1,45 +1,6 @@
This is a list of major changes in SDL's version history. This is a list of major changes in SDL's version history.
---------------------------------------------------------------------------
2.0.11/12:
---------------------------------------------------------------------------
General:
* Added SDL_LockTextureToSurface(), similar to SDL_LockTexture() but the locked area is exposed as a SDL surface.
---------------------------------------------------------------------------
2.0.10:
---------------------------------------------------------------------------
General:
* The SDL_RW* macros have been turned into functions that are available only in 2.0.10 and onward
* Added SDL_SIMDGetAlignment(), SDL_SIMDAlloc(), and SDL_SIMDFree(), to allocate memory aligned for SIMD operations for the current CPU
* Added SDL_RenderDrawPointF(), SDL_RenderDrawPointsF(), SDL_RenderDrawLineF(), SDL_RenderDrawLinesF(), SDL_RenderDrawRectF(), SDL_RenderDrawRectsF(), SDL_RenderFillRectF(), SDL_RenderFillRectsF(), SDL_RenderCopyF(), SDL_RenderCopyExF(), to allow floating point precision in the SDL rendering API.
* Added SDL_GetTouchDeviceType() to get the type of a touch device, which can be a touch screen or a trackpad in relative or absolute coordinate mode.
* The SDL rendering API now uses batched rendering by default, for improved performance
* Added SDL_RenderFlush() to force batched render commands to execute, if you're going to mix SDL rendering with native rendering
* Added the hint SDL_HINT_RENDER_BATCHING to control whether batching should be used for the rendering API. This defaults to "1" if you don't specify what rendering driver to use when creating the renderer.
* Added the hint SDL_HINT_EVENT_LOGGING to enable logging of SDL events for debugging purposes
* Added the hint SDL_HINT_GAMECONTROLLERCONFIG_FILE to specify a file that will be loaded at joystick initialization with game controller bindings
* Added the hint SDL_HINT_MOUSE_TOUCH_EVENTS to control whether SDL will synthesize touch events from mouse events
* Improved handling of malformed WAVE and BMP files, fixing potential security exploits
Linux:
* Removed the Mir video driver in favor of Wayland
iOS / tvOS:
* Added support for Xbox and PS4 wireless controllers in iOS 13 and tvOS 13
* Added support for text input using Bluetooth keyboards
Android:
* Added low latency audio using OpenSL ES
* Removed SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH (replaced by SDL_HINT_MOUSE_TOUCH_EVENTS and SDL_HINT_TOUCH_MOUSE_EVENTS)
SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH=1, should be replaced by setting both previous hints to 0.
SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH=0, should be replaced by setting both previous hints to 1.
* Added the hint SDL_HINT_ANDROID_BLOCK_ON_PAUSE to set whether the event loop will block itself when the app is paused.
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
2.0.9: 2.0.9:
--------------------------------------------------------------------------- ---------------------------------------------------------------------------

View file

@ -10,13 +10,6 @@
1D3623EC0D0F72F000981E51 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D3623EB0D0F72F000981E51 /* CoreGraphics.framework */; }; 1D3623EC0D0F72F000981E51 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D3623EB0D0F72F000981E51 /* CoreGraphics.framework */; };
1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; };
1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; };
F3F7590022AC5EC7001D97F2 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3F758FF22AC5EC7001D97F2 /* Metal.framework */; };
F3F7590122AC5F00001D97F2 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3F758FF22AC5EC7001D97F2 /* Metal.framework */; };
F3F7590222AC5F3D001D97F2 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3F758FF22AC5EC7001D97F2 /* Metal.framework */; };
F3F7590322AC5F71001D97F2 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3F758FF22AC5EC7001D97F2 /* Metal.framework */; };
F3F7590422AC5F8D001D97F2 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3F758FF22AC5EC7001D97F2 /* Metal.framework */; };
F3F7590522AC5FB3001D97F2 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3F758FF22AC5EC7001D97F2 /* Metal.framework */; };
F3F7590622AC5FD1001D97F2 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3F758FF22AC5EC7001D97F2 /* Metal.framework */; };
FA30DEB01BBF5A8F009C397F /* common.c in Sources */ = {isa = PBXBuildFile; fileRef = FD77A0060E26BC0500F39101 /* common.c */; }; FA30DEB01BBF5A8F009C397F /* common.c in Sources */ = {isa = PBXBuildFile; fileRef = FD77A0060E26BC0500F39101 /* common.c */; };
FA30DEB11BBF5A93009C397F /* happy.c in Sources */ = {isa = PBXBuildFile; fileRef = FD77A0080E26BC0500F39101 /* happy.c */; }; FA30DEB11BBF5A93009C397F /* happy.c in Sources */ = {isa = PBXBuildFile; fileRef = FD77A0080E26BC0500F39101 /* happy.c */; };
FA30DEB31BBF5AD7009C397F /* icon.bmp in Resources */ = {isa = PBXBuildFile; fileRef = FDB651CC0E43D19800F688B5 /* icon.bmp */; }; FA30DEB31BBF5AD7009C397F /* icon.bmp in Resources */ = {isa = PBXBuildFile; fileRef = FDB651CC0E43D19800F688B5 /* icon.bmp */; };
@ -47,6 +40,7 @@
FA8B4BA91967073D00F8EB7C /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA8B4BA21967070A00F8EB7C /* CoreMotion.framework */; }; FA8B4BA91967073D00F8EB7C /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA8B4BA21967070A00F8EB7C /* CoreMotion.framework */; };
FABA34D41D8B5E5600915323 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FABA34D31D8B5E5600915323 /* AVFoundation.framework */; }; FABA34D41D8B5E5600915323 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FABA34D31D8B5E5600915323 /* AVFoundation.framework */; };
FABA34D61D8B5E5A00915323 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FABA34D31D8B5E5600915323 /* AVFoundation.framework */; }; FABA34D61D8B5E5A00915323 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FABA34D31D8B5E5600915323 /* AVFoundation.framework */; };
FABA34D81D8B5E7700915323 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FABA34D71D8B5E7700915323 /* AVFoundation.framework */; };
FABA34D91D8B5E7B00915323 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FABA34D31D8B5E5600915323 /* AVFoundation.framework */; }; FABA34D91D8B5E7B00915323 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FABA34D31D8B5E5600915323 /* AVFoundation.framework */; };
FABA34DA1D8B5E7F00915323 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FABA34D31D8B5E5600915323 /* AVFoundation.framework */; }; FABA34DA1D8B5E7F00915323 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FABA34D31D8B5E5600915323 /* AVFoundation.framework */; };
FABA34DB1D8B5E8500915323 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FABA34D31D8B5E5600915323 /* AVFoundation.framework */; }; FABA34DB1D8B5E8500915323 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FABA34D31D8B5E5600915323 /* AVFoundation.framework */; };
@ -203,34 +197,6 @@
remoteGlobalIDString = FD6526620DE8FCCB002AD96B; remoteGlobalIDString = FD6526620DE8FCCB002AD96B;
remoteInfo = libSDL; remoteInfo = libSDL;
}; };
F3F758F722AC5E8F001D97F2 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = FD1B48920E313154007AB34E /* SDL.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 52ED1E5C222889500061FCE0;
remoteInfo = "libSDL-iOS-dylib";
};
F3F758F922AC5E8F001D97F2 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = FD1B48920E313154007AB34E /* SDL.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = F3E3C7572241389A007D243C;
remoteInfo = "libSDL-tvOS-dylib";
};
F3F758FB22AC5E8F001D97F2 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = FD1B48920E313154007AB34E /* SDL.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = F3E3C65222406928007D243C;
remoteInfo = "libSDLmain-iOS";
};
F3F758FD22AC5E8F001D97F2 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = FD1B48920E313154007AB34E /* SDL.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = F3E3C75F224138AE007D243C;
remoteInfo = "libSDLmain-tvOS";
};
FA30DEAB1BBF59D9009C397F /* PBXContainerItemProxy */ = { FA30DEAB1BBF59D9009C397F /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy; isa = PBXContainerItemProxy;
containerPortal = FD1B48920E313154007AB34E /* SDL.xcodeproj */; containerPortal = FD1B48920E313154007AB34E /* SDL.xcodeproj */;
@ -260,7 +226,6 @@
1D6058910D05DD3D006BFB54 /* Rectangles.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Rectangles.app; sourceTree = BUILT_PRODUCTS_DIR; }; 1D6058910D05DD3D006BFB54 /* Rectangles.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Rectangles.app; sourceTree = BUILT_PRODUCTS_DIR; };
1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; 8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
F3F758FF22AC5EC7001D97F2 /* Metal.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Metal.framework; path = System/Library/Frameworks/Metal.framework; sourceTree = SDKROOT; };
FA30DE961BBF59D9009C397F /* Happy-TV.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Happy-TV.app"; sourceTree = BUILT_PRODUCTS_DIR; }; FA30DE961BBF59D9009C397F /* Happy-TV.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Happy-TV.app"; sourceTree = BUILT_PRODUCTS_DIR; };
FA86C0361D9765BA009CB637 /* iOS Launch Screen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = "iOS Launch Screen.storyboard"; sourceTree = "<group>"; }; FA86C0361D9765BA009CB637 /* iOS Launch Screen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = "iOS Launch Screen.storyboard"; sourceTree = "<group>"; };
FA8B4BA21967070A00F8EB7C /* CoreMotion.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMotion.framework; path = System/Library/Frameworks/CoreMotion.framework; sourceTree = SDKROOT; }; FA8B4BA21967070A00F8EB7C /* CoreMotion.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMotion.framework; path = System/Library/Frameworks/CoreMotion.framework; sourceTree = SDKROOT; };
@ -306,18 +271,17 @@
isa = PBXFrameworksBuildPhase; isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
FD1B48DD0E313255007AB34E /* libSDL2.a in Frameworks */,
FDF0D7AC0E12D53800247964 /* AudioToolbox.framework in Frameworks */,
FABA34D41D8B5E5600915323 /* AVFoundation.framework in Frameworks */, FABA34D41D8B5E5600915323 /* AVFoundation.framework in Frameworks */,
FDF0D7AB0E12D53800247964 /* CoreAudio.framework in Frameworks */, FD1B48DD0E313255007AB34E /* libSDL2.a in Frameworks */,
1D3623EC0D0F72F000981E51 /* CoreGraphics.framework in Frameworks */,
FA8B4BA31967070A00F8EB7C /* CoreMotion.framework in Frameworks */,
1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */,
FAE0E96A1BAF96A00098DFA4 /* GameController.framework in Frameworks */, FAE0E96A1BAF96A00098DFA4 /* GameController.framework in Frameworks */,
F3F7590022AC5EC7001D97F2 /* Metal.framework in Frameworks */, FA8B4BA31967070A00F8EB7C /* CoreMotion.framework in Frameworks */,
FDF0D7AB0E12D53800247964 /* CoreAudio.framework in Frameworks */,
FDF0D7AC0E12D53800247964 /* AudioToolbox.framework in Frameworks */,
1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */,
1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */,
1D3623EC0D0F72F000981E51 /* CoreGraphics.framework in Frameworks */,
FDB96ED40DEFC9C700FAF19F /* OpenGLES.framework in Frameworks */, FDB96ED40DEFC9C700FAF19F /* OpenGLES.framework in Frameworks */,
FDB96EE00DEFC9DC00FAF19F /* QuartzCore.framework in Frameworks */, FDB96EE00DEFC9DC00FAF19F /* QuartzCore.framework in Frameworks */,
1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
@ -325,15 +289,16 @@
isa = PBXFrameworksBuildPhase; isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
FABA34D81D8B5E7700915323 /* AVFoundation.framework in Frameworks */,
FA30DEB71BBF5BB8009C397F /* libSDL2.a in Frameworks */, FA30DEB71BBF5BB8009C397F /* libSDL2.a in Frameworks */,
FA30DEC91BBF5C14009C397F /* AudioToolbox.framework in Frameworks */,
FA30DECF1BBF5C14009C397F /* CoreAudio.framework in Frameworks */,
FA30DECC1BBF5C14009C397F /* CoreGraphics.framework in Frameworks */,
FA30DECE1BBF5C14009C397F /* Foundation.framework in Frameworks */,
FA30DEC81BBF5C14009C397F /* GameController.framework in Frameworks */, FA30DEC81BBF5C14009C397F /* GameController.framework in Frameworks */,
FA30DEC91BBF5C14009C397F /* AudioToolbox.framework in Frameworks */,
FA30DECA1BBF5C14009C397F /* QuartzCore.framework in Frameworks */, FA30DECA1BBF5C14009C397F /* QuartzCore.framework in Frameworks */,
FA30DECB1BBF5C14009C397F /* OpenGLES.framework in Frameworks */, FA30DECB1BBF5C14009C397F /* OpenGLES.framework in Frameworks */,
FA30DECC1BBF5C14009C397F /* CoreGraphics.framework in Frameworks */,
FA30DECD1BBF5C14009C397F /* UIKit.framework in Frameworks */, FA30DECD1BBF5C14009C397F /* UIKit.framework in Frameworks */,
FA30DECE1BBF5C14009C397F /* Foundation.framework in Frameworks */,
FA30DECF1BBF5C14009C397F /* CoreAudio.framework in Frameworks */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
@ -341,18 +306,17 @@
isa = PBXFrameworksBuildPhase; isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
FD1B49980E313261007AB34E /* libSDL2.a in Frameworks */,
FDF0D7AA0E12D53500247964 /* AudioToolbox.framework in Frameworks */,
FABA34D61D8B5E5A00915323 /* AVFoundation.framework in Frameworks */, FABA34D61D8B5E5A00915323 /* AVFoundation.framework in Frameworks */,
FDF0D7A90E12D53500247964 /* CoreAudio.framework in Frameworks */, FD1B49980E313261007AB34E /* libSDL2.a in Frameworks */,
FD15FD6B0E086911003BDF25 /* CoreGraphics.framework in Frameworks */,
FA8B4BA41967071300F8EB7C /* CoreMotion.framework in Frameworks */,
FD15FD690E086911003BDF25 /* Foundation.framework in Frameworks */,
FAE0E96C1BAF96A90098DFA4 /* GameController.framework in Frameworks */, FAE0E96C1BAF96A90098DFA4 /* GameController.framework in Frameworks */,
F3F7590122AC5F00001D97F2 /* Metal.framework in Frameworks */, FA8B4BA41967071300F8EB7C /* CoreMotion.framework in Frameworks */,
FDF0D7A90E12D53500247964 /* CoreAudio.framework in Frameworks */,
FDF0D7AA0E12D53500247964 /* AudioToolbox.framework in Frameworks */,
FD15FD690E086911003BDF25 /* Foundation.framework in Frameworks */,
FD15FD6A0E086911003BDF25 /* UIKit.framework in Frameworks */,
FD15FD6B0E086911003BDF25 /* CoreGraphics.framework in Frameworks */,
FD15FD6C0E086911003BDF25 /* OpenGLES.framework in Frameworks */, FD15FD6C0E086911003BDF25 /* OpenGLES.framework in Frameworks */,
FD15FD6D0E086911003BDF25 /* QuartzCore.framework in Frameworks */, FD15FD6D0E086911003BDF25 /* QuartzCore.framework in Frameworks */,
FD15FD6A0E086911003BDF25 /* UIKit.framework in Frameworks */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
@ -360,18 +324,17 @@
isa = PBXFrameworksBuildPhase; isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
FD1B499C0E313269007AB34E /* libSDL2.a in Frameworks */,
FDF0D7A80E12D53200247964 /* AudioToolbox.framework in Frameworks */,
FABA34D91D8B5E7B00915323 /* AVFoundation.framework in Frameworks */, FABA34D91D8B5E7B00915323 /* AVFoundation.framework in Frameworks */,
FDF0D7A70E12D53200247964 /* CoreAudio.framework in Frameworks */, FD1B499C0E313269007AB34E /* libSDL2.a in Frameworks */,
FD5F9CEA0E0E0741008E885B /* CoreGraphics.framework in Frameworks */,
FA8B4BA51967071A00F8EB7C /* CoreMotion.framework in Frameworks */,
FD5F9CE80E0E0741008E885B /* Foundation.framework in Frameworks */,
FAE0E96D1BAF96AF0098DFA4 /* GameController.framework in Frameworks */, FAE0E96D1BAF96AF0098DFA4 /* GameController.framework in Frameworks */,
F3F7590222AC5F3D001D97F2 /* Metal.framework in Frameworks */, FA8B4BA51967071A00F8EB7C /* CoreMotion.framework in Frameworks */,
FDF0D7A70E12D53200247964 /* CoreAudio.framework in Frameworks */,
FDF0D7A80E12D53200247964 /* AudioToolbox.framework in Frameworks */,
FD5F9CEB0E0E0741008E885B /* OpenGLES.framework in Frameworks */, FD5F9CEB0E0E0741008E885B /* OpenGLES.framework in Frameworks */,
FD5F9CEC0E0E0741008E885B /* QuartzCore.framework in Frameworks */, FD5F9CEC0E0E0741008E885B /* QuartzCore.framework in Frameworks */,
FD5F9CE80E0E0741008E885B /* Foundation.framework in Frameworks */,
FD5F9CE90E0E0741008E885B /* UIKit.framework in Frameworks */, FD5F9CE90E0E0741008E885B /* UIKit.framework in Frameworks */,
FD5F9CEA0E0E0741008E885B /* CoreGraphics.framework in Frameworks */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
@ -379,18 +342,17 @@
isa = PBXFrameworksBuildPhase; isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
FDB652000E43D1F300F688B5 /* libSDL2.a in Frameworks */,
FDB652080E43D1F300F688B5 /* AudioToolbox.framework in Frameworks */,
FABA34DD1D8B5E8D00915323 /* AVFoundation.framework in Frameworks */, FABA34DD1D8B5E8D00915323 /* AVFoundation.framework in Frameworks */,
FDB652070E43D1F300F688B5 /* CoreAudio.framework in Frameworks */, FDB652000E43D1F300F688B5 /* libSDL2.a in Frameworks */,
FDB652040E43D1F300F688B5 /* CoreGraphics.framework in Frameworks */, FAE0E9711BAF96BB0098DFA4 /* GameController.framework in Frameworks */,
FA8B4BA91967073D00F8EB7C /* CoreMotion.framework in Frameworks */, FA8B4BA91967073D00F8EB7C /* CoreMotion.framework in Frameworks */,
FDB652020E43D1F300F688B5 /* Foundation.framework in Frameworks */, FDB652020E43D1F300F688B5 /* Foundation.framework in Frameworks */,
FAE0E9711BAF96BB0098DFA4 /* GameController.framework in Frameworks */, FDB652030E43D1F300F688B5 /* UIKit.framework in Frameworks */,
F3F7590622AC5FD1001D97F2 /* Metal.framework in Frameworks */, FDB652040E43D1F300F688B5 /* CoreGraphics.framework in Frameworks */,
FDB652050E43D1F300F688B5 /* OpenGLES.framework in Frameworks */, FDB652050E43D1F300F688B5 /* OpenGLES.framework in Frameworks */,
FDB652060E43D1F300F688B5 /* QuartzCore.framework in Frameworks */, FDB652060E43D1F300F688B5 /* QuartzCore.framework in Frameworks */,
FDB652030E43D1F300F688B5 /* UIKit.framework in Frameworks */, FDB652070E43D1F300F688B5 /* CoreAudio.framework in Frameworks */,
FDB652080E43D1F300F688B5 /* AudioToolbox.framework in Frameworks */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
@ -398,18 +360,17 @@
isa = PBXFrameworksBuildPhase; isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
FD1B499E0E31326C007AB34E /* libSDL2.a in Frameworks */,
FDF0D7960E12D52900247964 /* AudioToolbox.framework in Frameworks */,
FABA34DA1D8B5E7F00915323 /* AVFoundation.framework in Frameworks */, FABA34DA1D8B5E7F00915323 /* AVFoundation.framework in Frameworks */,
FDF0D7950E12D52900247964 /* CoreAudio.framework in Frameworks */, FD1B499E0E31326C007AB34E /* libSDL2.a in Frameworks */,
FDC202E80E107B1200ABAC90 /* CoreGraphics.framework in Frameworks */,
FA8B4BA61967072100F8EB7C /* CoreMotion.framework in Frameworks */,
FDC202E60E107B1200ABAC90 /* Foundation.framework in Frameworks */,
FAE0E96E1BAF96B10098DFA4 /* GameController.framework in Frameworks */, FAE0E96E1BAF96B10098DFA4 /* GameController.framework in Frameworks */,
F3F7590322AC5F71001D97F2 /* Metal.framework in Frameworks */, FA8B4BA61967072100F8EB7C /* CoreMotion.framework in Frameworks */,
FDF0D7950E12D52900247964 /* CoreAudio.framework in Frameworks */,
FDF0D7960E12D52900247964 /* AudioToolbox.framework in Frameworks */,
FDC202E60E107B1200ABAC90 /* Foundation.framework in Frameworks */,
FDC202E70E107B1200ABAC90 /* UIKit.framework in Frameworks */,
FDC202E80E107B1200ABAC90 /* CoreGraphics.framework in Frameworks */,
FDC202E90E107B1200ABAC90 /* OpenGLES.framework in Frameworks */, FDC202E90E107B1200ABAC90 /* OpenGLES.framework in Frameworks */,
FDC202EA0E107B1200ABAC90 /* QuartzCore.framework in Frameworks */, FDC202EA0E107B1200ABAC90 /* QuartzCore.framework in Frameworks */,
FDC202E70E107B1200ABAC90 /* UIKit.framework in Frameworks */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
@ -417,18 +378,17 @@
isa = PBXFrameworksBuildPhase; isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
FD1B49A20E313273007AB34E /* libSDL2.a in Frameworks */,
FDC52EDA0E2843D6008D768C /* AudioToolbox.framework in Frameworks */,
FABA34DC1D8B5E8900915323 /* AVFoundation.framework in Frameworks */, FABA34DC1D8B5E8900915323 /* AVFoundation.framework in Frameworks */,
FDC52ED90E2843D6008D768C /* CoreAudio.framework in Frameworks */, FD1B49A20E313273007AB34E /* libSDL2.a in Frameworks */,
FDC52ED60E2843D6008D768C /* CoreGraphics.framework in Frameworks */, FAE0E9701BAF96B80098DFA4 /* GameController.framework in Frameworks */,
FA8B4BA81967073400F8EB7C /* CoreMotion.framework in Frameworks */, FA8B4BA81967073400F8EB7C /* CoreMotion.framework in Frameworks */,
FDC52ED40E2843D6008D768C /* Foundation.framework in Frameworks */, FDC52ED40E2843D6008D768C /* Foundation.framework in Frameworks */,
FAE0E9701BAF96B80098DFA4 /* GameController.framework in Frameworks */, FDC52ED50E2843D6008D768C /* UIKit.framework in Frameworks */,
F3F7590522AC5FB3001D97F2 /* Metal.framework in Frameworks */, FDC52ED60E2843D6008D768C /* CoreGraphics.framework in Frameworks */,
FDC52ED70E2843D6008D768C /* OpenGLES.framework in Frameworks */, FDC52ED70E2843D6008D768C /* OpenGLES.framework in Frameworks */,
FDC52ED80E2843D6008D768C /* QuartzCore.framework in Frameworks */, FDC52ED80E2843D6008D768C /* QuartzCore.framework in Frameworks */,
FDC52ED50E2843D6008D768C /* UIKit.framework in Frameworks */, FDC52ED90E2843D6008D768C /* CoreAudio.framework in Frameworks */,
FDC52EDA0E2843D6008D768C /* AudioToolbox.framework in Frameworks */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
@ -436,18 +396,17 @@
isa = PBXFrameworksBuildPhase; isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
FD1B49A00E313270007AB34E /* libSDL2.a in Frameworks */,
FDF0D7230E12D31800247964 /* AudioToolbox.framework in Frameworks */,
FABA34DB1D8B5E8500915323 /* AVFoundation.framework in Frameworks */, FABA34DB1D8B5E8500915323 /* AVFoundation.framework in Frameworks */,
FDF0D71E0E12D2AB00247964 /* CoreAudio.framework in Frameworks */, FD1B49A00E313270007AB34E /* libSDL2.a in Frameworks */,
FDF0D69E0E12D05400247964 /* CoreGraphics.framework in Frameworks */, FAE0E96F1BAF96B50098DFA4 /* GameController.framework in Frameworks */,
FA8B4BA71967072800F8EB7C /* CoreMotion.framework in Frameworks */, FA8B4BA71967072800F8EB7C /* CoreMotion.framework in Frameworks */,
FDF0D69C0E12D05400247964 /* Foundation.framework in Frameworks */, FDF0D69C0E12D05400247964 /* Foundation.framework in Frameworks */,
FAE0E96F1BAF96B50098DFA4 /* GameController.framework in Frameworks */, FDF0D69D0E12D05400247964 /* UIKit.framework in Frameworks */,
F3F7590422AC5F8D001D97F2 /* Metal.framework in Frameworks */, FDF0D69E0E12D05400247964 /* CoreGraphics.framework in Frameworks */,
FDF0D69F0E12D05400247964 /* OpenGLES.framework in Frameworks */, FDF0D69F0E12D05400247964 /* OpenGLES.framework in Frameworks */,
FDF0D6A00E12D05400247964 /* QuartzCore.framework in Frameworks */, FDF0D6A00E12D05400247964 /* QuartzCore.framework in Frameworks */,
FDF0D69D0E12D05400247964 /* UIKit.framework in Frameworks */, FDF0D71E0E12D2AB00247964 /* CoreAudio.framework in Frameworks */,
FDF0D7230E12D31800247964 /* AudioToolbox.framework in Frameworks */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
@ -496,7 +455,6 @@
29B97323FDCFA39411CA2CEA /* Frameworks */ = { 29B97323FDCFA39411CA2CEA /* Frameworks */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
F3F758FF22AC5EC7001D97F2 /* Metal.framework */,
FABA34D71D8B5E7700915323 /* AVFoundation.framework */, FABA34D71D8B5E7700915323 /* AVFoundation.framework */,
FABA34D31D8B5E5600915323 /* AVFoundation.framework */, FABA34D31D8B5E5600915323 /* AVFoundation.framework */,
FAE0E9691BAF96A00098DFA4 /* GameController.framework */, FAE0E9691BAF96A00098DFA4 /* GameController.framework */,
@ -516,11 +474,7 @@
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
FD1B489E0E313154007AB34E /* libSDL2.a */, FD1B489E0E313154007AB34E /* libSDL2.a */,
F3F758F822AC5E8F001D97F2 /* libSDL2.dylib */,
FA30DEAC1BBF59D9009C397F /* libSDL2.a */, FA30DEAC1BBF59D9009C397F /* libSDL2.a */,
F3F758FA22AC5E8F001D97F2 /* libSDL2.dylib */,
F3F758FC22AC5E8F001D97F2 /* libSDLmain.a */,
F3F758FE22AC5E8F001D97F2 /* libSDLmain.a */,
); );
name = Products; name = Products;
sourceTree = "<group>"; sourceTree = "<group>";
@ -771,34 +725,6 @@
/* End PBXProject section */ /* End PBXProject section */
/* Begin PBXReferenceProxy section */ /* Begin PBXReferenceProxy section */
F3F758F822AC5E8F001D97F2 /* libSDL2.dylib */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libSDL2.dylib;
remoteRef = F3F758F722AC5E8F001D97F2 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
F3F758FA22AC5E8F001D97F2 /* libSDL2.dylib */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libSDL2.dylib;
remoteRef = F3F758F922AC5E8F001D97F2 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
F3F758FC22AC5E8F001D97F2 /* libSDLmain.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libSDLmain.a;
remoteRef = F3F758FB22AC5E8F001D97F2 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
F3F758FE22AC5E8F001D97F2 /* libSDLmain.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libSDLmain.a;
remoteRef = F3F758FD22AC5E8F001D97F2 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
FA30DEAC1BBF59D9009C397F /* libSDL2.a */ = { FA30DEAC1BBF59D9009C397F /* libSDL2.a */ = {
isa = PBXReferenceProxy; isa = PBXReferenceProxy;
fileType = archive.ar; fileType = archive.ar;
@ -1031,7 +957,6 @@
1D6058940D05DD3E006BFB54 /* Debug */ = { 1D6058940D05DD3E006BFB54 /* Debug */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist; INFOPLIST_FILE = Info.plist;
PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Rectangles; PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Rectangles;
PRODUCT_NAME = Rectangles; PRODUCT_NAME = Rectangles;
@ -1041,7 +966,6 @@
1D6058950D05DD3E006BFB54 /* Release */ = { 1D6058950D05DD3E006BFB54 /* Release */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist; INFOPLIST_FILE = Info.plist;
PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Rectangles; PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Rectangles;
PRODUCT_NAME = Rectangles; PRODUCT_NAME = Rectangles;
@ -1165,7 +1089,6 @@
FD15FCB50E086866003BDF25 /* Debug */ = { FD15FCB50E086866003BDF25 /* Debug */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
DEVELOPMENT_TEAM = "";
GCC_DYNAMIC_NO_PIC = NO; GCC_DYNAMIC_NO_PIC = NO;
INFOPLIST_FILE = Info.plist; INFOPLIST_FILE = Info.plist;
PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Happy; PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Happy;
@ -1177,7 +1100,6 @@
FD15FCB60E086866003BDF25 /* Release */ = { FD15FCB60E086866003BDF25 /* Release */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist; INFOPLIST_FILE = Info.plist;
PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Happy; PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Happy;
PRODUCT_NAME = Happy; PRODUCT_NAME = Happy;
@ -1188,7 +1110,6 @@
FD5F9BE70E0DEBEB008E885B /* Debug */ = { FD5F9BE70E0DEBEB008E885B /* Debug */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist; INFOPLIST_FILE = Info.plist;
PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Accel; PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Accel;
PRODUCT_NAME = Accel; PRODUCT_NAME = Accel;
@ -1199,7 +1120,6 @@
FD5F9BE80E0DEBEB008E885B /* Release */ = { FD5F9BE80E0DEBEB008E885B /* Release */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist; INFOPLIST_FILE = Info.plist;
PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Accel; PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Accel;
PRODUCT_NAME = Accel; PRODUCT_NAME = Accel;
@ -1210,7 +1130,6 @@
FDB6520A0E43D1F300F688B5 /* Debug */ = { FDB6520A0E43D1F300F688B5 /* Debug */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist; INFOPLIST_FILE = Info.plist;
PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Keyboard; PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Keyboard;
PRODUCT_NAME = Keyboard; PRODUCT_NAME = Keyboard;
@ -1221,7 +1140,6 @@
FDB6520B0E43D1F300F688B5 /* Release */ = { FDB6520B0E43D1F300F688B5 /* Release */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist; INFOPLIST_FILE = Info.plist;
PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Keyboard; PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Keyboard;
PRODUCT_NAME = Keyboard; PRODUCT_NAME = Keyboard;
@ -1232,7 +1150,6 @@
FDC202EC0E107B1200ABAC90 /* Debug */ = { FDC202EC0E107B1200ABAC90 /* Debug */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist; INFOPLIST_FILE = Info.plist;
PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Touch; PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Touch;
PRODUCT_NAME = Touch; PRODUCT_NAME = Touch;
@ -1243,7 +1160,6 @@
FDC202ED0E107B1200ABAC90 /* Release */ = { FDC202ED0E107B1200ABAC90 /* Release */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist; INFOPLIST_FILE = Info.plist;
PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Touch; PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Touch;
PRODUCT_NAME = Touch; PRODUCT_NAME = Touch;
@ -1278,7 +1194,6 @@
FDF0D6A20E12D05400247964 /* Debug */ = { FDF0D6A20E12D05400247964 /* Debug */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist; INFOPLIST_FILE = Info.plist;
PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Mixer; PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Mixer;
PRODUCT_NAME = Mixer; PRODUCT_NAME = Mixer;
@ -1289,7 +1204,6 @@
FDF0D6A30E12D05400247964 /* Release */ = { FDF0D6A30E12D05400247964 /* Release */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist; INFOPLIST_FILE = Info.plist;
PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Mixer; PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Mixer;
PRODUCT_NAME = Mixer; PRODUCT_NAME = Mixer;

1445
Xcode-iOS/SDL/SDL.xcodeproj/project.pbxproj Executable file → Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,80 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1020"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "C143576D1F4C4DAA000B792B"
BuildableName = "All-iOS"
BlueprintName = "All-iOS"
ReferencedContainer = "container:SDL.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "C143576D1F4C4DAA000B792B"
BuildableName = "All-iOS"
BlueprintName = "All-iOS"
ReferencedContainer = "container:SDL.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "C143576D1F4C4DAA000B792B"
BuildableName = "All-iOS"
BlueprintName = "All-iOS"
ReferencedContainer = "container:SDL.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View file

@ -1,80 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1020"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "C14357721F4C4F2A000B792B"
BuildableName = "All-tvOS"
BlueprintName = "All-tvOS"
ReferencedContainer = "container:SDL.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "C14357721F4C4F2A000B792B"
BuildableName = "All-tvOS"
BlueprintName = "All-tvOS"
ReferencedContainer = "container:SDL.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "C14357721F4C4F2A000B792B"
BuildableName = "All-tvOS"
BlueprintName = "All-tvOS"
ReferencedContainer = "container:SDL.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View file

@ -1,80 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1020"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "00B4F48B12F6A69C0084EC00"
BuildableName = "PrepareXcodeProjectTemplate"
BlueprintName = "PrepareXcodeProjectTemplate"
ReferencedContainer = "container:SDL.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "00B4F48B12F6A69C0084EC00"
BuildableName = "PrepareXcodeProjectTemplate"
BlueprintName = "PrepareXcodeProjectTemplate"
ReferencedContainer = "container:SDL.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "00B4F48B12F6A69C0084EC00"
BuildableName = "PrepareXcodeProjectTemplate"
BlueprintName = "PrepareXcodeProjectTemplate"
ReferencedContainer = "container:SDL.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View file

@ -1,80 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1020"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "52ED1D6B222889500061FCE0"
BuildableName = "libSDL2.dylib"
BlueprintName = "libSDL-iOS-dylib"
ReferencedContainer = "container:SDL.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "52ED1D6B222889500061FCE0"
BuildableName = "libSDL2.dylib"
BlueprintName = "libSDL-iOS-dylib"
ReferencedContainer = "container:SDL.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "52ED1D6B222889500061FCE0"
BuildableName = "libSDL2.dylib"
BlueprintName = "libSDL-iOS-dylib"
ReferencedContainer = "container:SDL.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View file

@ -1,80 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1020"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "FD6526620DE8FCCB002AD96B"
BuildableName = "libSDL2.a"
BlueprintName = "libSDL-iOS"
ReferencedContainer = "container:SDL.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "FD6526620DE8FCCB002AD96B"
BuildableName = "libSDL2.a"
BlueprintName = "libSDL-iOS"
ReferencedContainer = "container:SDL.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "FD6526620DE8FCCB002AD96B"
BuildableName = "libSDL2.a"
BlueprintName = "libSDL-iOS"
ReferencedContainer = "container:SDL.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View file

@ -1,80 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1020"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F3E3C6592241389A007D243C"
BuildableName = "libSDL2.dylib"
BlueprintName = "libSDL-tvOS-dylib"
ReferencedContainer = "container:SDL.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F3E3C6592241389A007D243C"
BuildableName = "libSDL2.dylib"
BlueprintName = "libSDL-tvOS-dylib"
ReferencedContainer = "container:SDL.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F3E3C6592241389A007D243C"
BuildableName = "libSDL2.dylib"
BlueprintName = "libSDL-tvOS-dylib"
ReferencedContainer = "container:SDL.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View file

@ -1,80 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1020"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "FAB598131BB5C1B100BE72C5"
BuildableName = "libSDL2.a"
BlueprintName = "libSDL-tvOS"
ReferencedContainer = "container:SDL.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "FAB598131BB5C1B100BE72C5"
BuildableName = "libSDL2.a"
BlueprintName = "libSDL-tvOS"
ReferencedContainer = "container:SDL.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "FAB598131BB5C1B100BE72C5"
BuildableName = "libSDL2.a"
BlueprintName = "libSDL-tvOS"
ReferencedContainer = "container:SDL.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View file

@ -1,80 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1020"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F3E3C56022406928007D243C"
BuildableName = "libSDLmain.a"
BlueprintName = "libSDLmain-iOS"
ReferencedContainer = "container:SDL.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F3E3C56022406928007D243C"
BuildableName = "libSDLmain.a"
BlueprintName = "libSDLmain-iOS"
ReferencedContainer = "container:SDL.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F3E3C56022406928007D243C"
BuildableName = "libSDLmain.a"
BlueprintName = "libSDLmain-iOS"
ReferencedContainer = "container:SDL.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View file

@ -1,80 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1020"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F3E3C758224138AE007D243C"
BuildableName = "libSDLmain.a"
BlueprintName = "libSDLmain-tvOS"
ReferencedContainer = "container:SDL.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F3E3C758224138AE007D243C"
BuildableName = "libSDLmain.a"
BlueprintName = "libSDLmain-tvOS"
ReferencedContainer = "container:SDL.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F3E3C758224138AE007D243C"
BuildableName = "libSDLmain.a"
BlueprintName = "libSDLmain-tvOS"
ReferencedContainer = "container:SDL.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View file

@ -11,7 +11,7 @@
<key>CFBundleIconFile</key> <key>CFBundleIconFile</key>
<string></string> <string></string>
<key>CFBundleIdentifier</key> <key>CFBundleIdentifier</key>
<string>com.yourcompany.${PRODUCT_NAME}</string> <string>com.yourcompany.${PRODUCT_NAME:identifier}</string>
<key>CFBundleInfoDictionaryVersion</key> <key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string> <string>6.0</string>
<key>CFBundleName</key> <key>CFBundleName</key>

File diff suppressed because it is too large Load diff

View file

@ -19,10 +19,10 @@
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>FMWK</string> <string>FMWK</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>2.0.12</string> <string>2.0.9</string>
<key>CFBundleSignature</key> <key>CFBundleSignature</key>
<string>SDLX</string> <string>SDLX</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>2.0.12</string> <string>2.0.9</string>
</dict> </dict>
</plist> </plist>

11780
Xcode/SDL/SDL.xcodeproj/project.pbxproj Executable file → Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,22 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(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>

View file

@ -1,6 +1,6 @@
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages

View file

@ -1,133 +0,0 @@
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
# ----------------------------------
AC_DEFUN([PKG_PROG_PKG_CONFIG],
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
fi
if test -n "$PKG_CONFIG"; then
_pkg_min_version=m4_default([$1], [0.9.0])
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
PKG_CONFIG=""
fi
fi[]dnl
])# PKG_PROG_PKG_CONFIG
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
#
# Check to see whether a particular set of modules exists. Similar
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
#
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
# only at the first occurence in configure.ac, so if the first place
# it's called might be skipped (such as if it is within an "if", you
# have to call PKG_CHECK_EXISTS manually
# --------------------------------------------------------------
AC_DEFUN([PKG_CHECK_EXISTS],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
if test -n "$PKG_CONFIG" && \
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
m4_default([$2], [:])
m4_ifvaln([$3], [else
$3])dnl
fi])
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
# ---------------------------------------------
m4_define([_PKG_CONFIG],
[if test -n "$$1"; then
pkg_cv_[]$1="$$1"
elif test -n "$PKG_CONFIG"; then
PKG_CHECK_EXISTS([$3],
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
[pkg_failed=yes])
else
pkg_failed=untried
fi[]dnl
])# _PKG_CONFIG
# _PKG_SHORT_ERRORS_SUPPORTED
# -----------------------------
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
_pkg_short_errors_supported=yes
else
_pkg_short_errors_supported=no
fi[]dnl
])# _PKG_SHORT_ERRORS_SUPPORTED
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
# [ACTION-IF-NOT-FOUND])
#
#
# Note that if there is a possibility the first call to
# PKG_CHECK_MODULES might not happen, you should be sure to include an
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
#
#
# --------------------------------------------------------------
AC_DEFUN([PKG_CHECK_MODULES],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
pkg_failed=no
AC_MSG_CHECKING([for $1])
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
and $1[]_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.])
if test $pkg_failed = yes; then
AC_MSG_RESULT([no])
_PKG_SHORT_ERRORS_SUPPORTED
if test $_pkg_short_errors_supported = yes; then
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
else
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
m4_default([$4], [AC_MSG_ERROR(
[Package requirements ($2) were not met:
$$1_PKG_ERRORS
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
_PKG_TEXT])dnl
])
elif test $pkg_failed = untried; then
AC_MSG_RESULT([no])
m4_default([$4], [AC_MSG_FAILURE(
[The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
_PKG_TEXT
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])dnl
])
else
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
AC_MSG_RESULT([yes])
$3
fi[]dnl
])# PKG_CHECK_MODULES

View file

@ -13,20 +13,15 @@ android {
if (buildAsApplication) { if (buildAsApplication) {
applicationId "org.libsdl.app" applicationId "org.libsdl.app"
} }
minSdkVersion 16 minSdkVersion 14
targetSdkVersion 26 targetSdkVersion 26
versionCode 1 versionCode 1
versionName "1.0" versionName "1.0"
externalNativeBuild { externalNativeBuild {
ndkBuild { ndkBuild {
arguments "APP_PLATFORM=android-16" arguments "APP_PLATFORM=android-14"
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64' 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 { buildTypes {
@ -43,9 +38,6 @@ android {
ndkBuild { ndkBuild {
path 'jni/Android.mk' path 'jni/Android.mk'
} }
// cmake {
// path 'jni/CMakeLists.txt'
// }
} }
} }

View file

@ -7,4 +7,4 @@
APP_ABI := armeabi-v7a arm64-v8a x86 x86_64 APP_ABI := armeabi-v7a arm64-v8a x86 x86_64
# Min runtime API level # Min runtime API level
APP_PLATFORM=android-16 APP_PLATFORM=android-14

View file

@ -1,20 +0,0 @@
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)

View file

@ -1,13 +0,0 @@
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)

View file

@ -17,31 +17,17 @@
android:required="false" /> android:required="false" />
<!-- Game controller support --> <!-- Game controller support -->
<uses-feature
android:name="android.hardware.bluetooth"
android:required="false" />
<uses-feature <uses-feature
android:name="android.hardware.gamepad" android:name="android.hardware.gamepad"
android:required="false" /> android:required="false" />
<uses-feature
android:name="android.hardware.usb.host"
android:required="false" />
<!-- External mouse input events --> <!-- External mouse input events -->
<uses-feature <uses-feature
android:name="android.hardware.type.pc" android:name="android.hardware.type.pc"
android:required="false" /> 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 --> <!-- Allow writing to external storage -->
<uses-permission android:name="android.permission.WRITE_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 --> <!-- Allow access to the vibrator -->
<uses-permission android:name="android.permission.VIBRATE" /> <uses-permission android:name="android.permission.VIBRATE" />
@ -68,9 +54,7 @@
<activity android:name="SDLActivity" <activity android:name="SDLActivity"
android:label="@string/app_name" android:label="@string/app_name"
android:alwaysRetainTaskState="true" android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:launchMode="singleInstance"
android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|keyboard|keyboardHidden|navigation"
> >
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />

View file

@ -1,7 +1,5 @@
package org.libsdl.app; package org.libsdl.app;
import android.hardware.usb.UsbDevice;
interface HIDDevice interface HIDDevice
{ {
public int getId(); public int getId();
@ -11,7 +9,6 @@ interface HIDDevice
public int getVersion(); public int getVersion();
public String getManufacturerName(); public String getManufacturerName();
public String getProductName(); public String getProductName();
public UsbDevice getDevice();
public boolean open(); public boolean open();
public int sendFeatureReport(byte[] report); public int sendFeatureReport(byte[] report);
public int sendOutputReport(byte[] report); public int sendOutputReport(byte[] report);

View file

@ -9,15 +9,15 @@ import android.bluetooth.BluetoothGattDescriptor;
import android.bluetooth.BluetoothManager; import android.bluetooth.BluetoothManager;
import android.bluetooth.BluetoothProfile; import android.bluetooth.BluetoothProfile;
import android.bluetooth.BluetoothGattService; import android.bluetooth.BluetoothGattService;
import android.hardware.usb.UsbDevice;
import android.os.Handler; import android.os.Handler;
import android.os.Looper; import android.os.Looper;
import android.util.Log; import android.util.Log;
import android.os.*;
//import com.android.internal.util.HexDump; //import com.android.internal.util.HexDump;
import java.lang.Runnable; import java.lang.Runnable;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.Arrays; import java.util.Arrays;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.UUID; import java.util.UUID;
@ -166,13 +166,13 @@ class HIDDeviceBLESteamController extends BluetoothGattCallback implements HIDDe
mHandler = new Handler(Looper.getMainLooper()); mHandler = new Handler(Looper.getMainLooper());
mGatt = connectGatt(); mGatt = connectGatt();
// final HIDDeviceBLESteamController finalThis = this; final HIDDeviceBLESteamController finalThis = this;
// mHandler.postDelayed(new Runnable() { mHandler.postDelayed(new Runnable() {
// @Override @Override
// public void run() { public void run() {
// finalThis.checkConnectionForChromebookIssue(); finalThis.checkConnectionForChromebookIssue();
// } }
// }, CHROMEBOOK_CONNECTION_CHECK_INTERVAL); }, CHROMEBOOK_CONNECTION_CHECK_INTERVAL);
} }
public String getIdentifier() { public String getIdentifier() {
@ -186,15 +186,12 @@ class HIDDeviceBLESteamController extends BluetoothGattCallback implements HIDDe
// Because on Chromebooks we show up as a dual-mode device, it will attempt to connect TRANSPORT_AUTO, which will use TRANSPORT_BREDR instead // Because on Chromebooks we show up as a dual-mode device, it will attempt to connect TRANSPORT_AUTO, which will use TRANSPORT_BREDR instead
// of TRANSPORT_LE. Let's force ourselves to connect low energy. // of TRANSPORT_LE. Let's force ourselves to connect low energy.
private BluetoothGatt connectGatt(boolean managed) { private BluetoothGatt connectGatt(boolean managed) {
if (Build.VERSION.SDK_INT >= 23) {
try { try {
return mDevice.connectGatt(mManager.getContext(), managed, this, TRANSPORT_LE); Method m = mDevice.getClass().getDeclaredMethod("connectGatt", Context.class, boolean.class, BluetoothGattCallback.class, int.class);
return (BluetoothGatt) m.invoke(mDevice, mManager.getContext(), managed, this, TRANSPORT_LE);
} catch (Exception e) { } catch (Exception e) {
return mDevice.connectGatt(mManager.getContext(), managed, this); return mDevice.connectGatt(mManager.getContext(), managed, this);
} }
} else {
return mDevice.connectGatt(mManager.getContext(), managed, this);
}
} }
private BluetoothGatt connectGatt() { private BluetoothGatt connectGatt() {
@ -470,7 +467,7 @@ class HIDDeviceBLESteamController extends BluetoothGattCallback implements HIDDe
// Only register controller with the native side once it has been fully configured // Only register controller with the native side once it has been fully configured
if (!isRegistered()) { if (!isRegistered()) {
Log.v(TAG, "Registering Steam Controller with ID: " + getId()); Log.v(TAG, "Registering Steam Controller with ID: " + getId());
mManager.HIDDeviceConnected(getId(), getIdentifier(), getVendorId(), getProductId(), getSerialNumber(), getVersion(), getManufacturerName(), getProductName(), 0, 0, 0, 0); mManager.HIDDeviceConnected(getId(), getIdentifier(), getVendorId(), getProductId(), getSerialNumber(), getVersion(), getManufacturerName(), getProductName(), 0);
setRegistered(); setRegistered();
} }
} }
@ -565,11 +562,6 @@ class HIDDeviceBLESteamController extends BluetoothGattCallback implements HIDDe
} }
@Override @Override
public UsbDevice getDevice() {
return null;
}
@Override
public boolean open() { public boolean open() {
return true; return true;
} }

View file

@ -19,9 +19,8 @@ import android.hardware.usb.*;
import android.os.Handler; import android.os.Handler;
import android.os.Looper; import android.os.Looper;
import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.Iterator; import java.util.ArrayList;
import java.util.List; import java.util.List;
public class HIDDeviceManager { public class HIDDeviceManager {
@ -51,6 +50,7 @@ public class HIDDeviceManager {
private Context mContext; private Context mContext;
private HashMap<Integer, HIDDevice> mDevicesById = new HashMap<Integer, HIDDevice>(); 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 HashMap<BluetoothDevice, HIDDeviceBLESteamController> mBluetoothDevices = new HashMap<BluetoothDevice, HIDDeviceBLESteamController>();
private int mNextDeviceId = 0; private int mNextDeviceId = 0;
private SharedPreferences mSharedPreferences = null; private SharedPreferences mSharedPreferences = null;
@ -241,20 +241,31 @@ public class HIDDeviceManager {
} }
} }
private boolean isHIDDeviceInterface(UsbDevice usbDevice, UsbInterface usbInterface) { 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);
if (usbInterface.getInterfaceClass() == UsbConstants.USB_CLASS_HID) { if (usbInterface.getInterfaceClass() == UsbConstants.USB_CLASS_HID) {
return true; return true;
} }
if (interface_number == 0) {
if (isXbox360Controller(usbDevice, usbInterface) || isXboxOneController(usbDevice, usbInterface)) { if (isXbox360Controller(usbDevice, usbInterface) || isXboxOneController(usbDevice, usbInterface)) {
return true; return true;
} }
}
return false; return false;
} }
private boolean isXbox360Controller(UsbDevice usbDevice, UsbInterface usbInterface) { private boolean isXbox360Controller(UsbDevice usbDevice, UsbInterface usbInterface) {
final int XB360_IFACE_SUBCLASS = 93; final int XB360_IFACE_SUBCLASS = 93;
final int XB360_IFACE_PROTOCOL = 1; // Wired final int XB360_IFACE_PROTOCOL = 1; // Wired only
final int XB360W_IFACE_PROTOCOL = 129; // Wireless
final int[] SUPPORTED_VENDORS = { final int[] SUPPORTED_VENDORS = {
0x0079, // GPD Win 2 0x0079, // GPD Win 2
0x044f, // Thrustmaster 0x044f, // Thrustmaster
@ -264,9 +275,8 @@ public class HIDDeviceManager {
0x06a3, // Saitek 0x06a3, // Saitek
0x0738, // Mad Catz 0x0738, // Mad Catz
0x07ff, // Mad Catz 0x07ff, // Mad Catz
0x0e6f, // PDP 0x0e6f, // Unknown
0x0f0d, // Hori 0x0f0d, // Hori
0x1038, // SteelSeries
0x11c9, // Nacon 0x11c9, // Nacon
0x12ab, // Unknown 0x12ab, // Unknown
0x1430, // RedOctane 0x1430, // RedOctane
@ -281,8 +291,7 @@ public class HIDDeviceManager {
if (usbInterface.getInterfaceClass() == UsbConstants.USB_CLASS_VENDOR_SPEC && if (usbInterface.getInterfaceClass() == UsbConstants.USB_CLASS_VENDOR_SPEC &&
usbInterface.getInterfaceSubclass() == XB360_IFACE_SUBCLASS && 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(); int vendor_id = usbDevice.getVendorId();
for (int supportedVid : SUPPORTED_VENDORS) { for (int supportedVid : SUPPORTED_VENDORS) {
if (vendor_id == supportedVid) { if (vendor_id == supportedVid) {
@ -299,15 +308,13 @@ public class HIDDeviceManager {
final int[] SUPPORTED_VENDORS = { final int[] SUPPORTED_VENDORS = {
0x045e, // Microsoft 0x045e, // Microsoft
0x0738, // Mad Catz 0x0738, // Mad Catz
0x0e6f, // PDP 0x0e6f, // Unknown
0x0f0d, // Hori 0x0f0d, // Hori
0x1532, // Razer Wildcat 0x1532, // Razer Wildcat
0x24c6, // PowerA 0x24c6, // PowerA
0x2e24, // Hyperkin
}; };
if (usbInterface.getId() == 0 && if (usbInterface.getInterfaceClass() == UsbConstants.USB_CLASS_VENDOR_SPEC &&
usbInterface.getInterfaceClass() == UsbConstants.USB_CLASS_VENDOR_SPEC &&
usbInterface.getInterfaceSubclass() == XB1_IFACE_SUBCLASS && usbInterface.getInterfaceSubclass() == XB1_IFACE_SUBCLASS &&
usbInterface.getInterfaceProtocol() == XB1_IFACE_PROTOCOL) { usbInterface.getInterfaceProtocol() == XB1_IFACE_PROTOCOL) {
int vendor_id = usbDevice.getVendorId(); int vendor_id = usbDevice.getVendorId();
@ -321,45 +328,45 @@ public class HIDDeviceManager {
} }
private void handleUsbDeviceAttached(UsbDevice usbDevice) { private void handleUsbDeviceAttached(UsbDevice usbDevice) {
if (isHIDDeviceUSB(usbDevice)) {
connectHIDDeviceUSB(usbDevice); connectHIDDeviceUSB(usbDevice);
} }
}
private void handleUsbDeviceDetached(UsbDevice usbDevice) { private void handleUsbDeviceDetached(UsbDevice usbDevice) {
List<Integer> devices = new ArrayList<Integer>(); HIDDeviceUSB device = mUSBDevices.get(usbDevice);
for (HIDDevice device : mDevicesById.values()) { if (device == null)
if (usbDevice.equals(device.getDevice())) { return;
devices.add(device.getId());
} int id = device.getId();
} mUSBDevices.remove(usbDevice);
for (int id : devices) {
HIDDevice device = mDevicesById.get(id);
mDevicesById.remove(id); mDevicesById.remove(id);
device.shutdown(); device.shutdown();
HIDDeviceDisconnected(id); HIDDeviceDisconnected(id);
} }
}
private void handleUsbDevicePermission(UsbDevice usbDevice, boolean permission_granted) { private void handleUsbDevicePermission(UsbDevice usbDevice, boolean permission_granted) {
for (HIDDevice device : mDevicesById.values()) { HIDDeviceUSB device = mUSBDevices.get(usbDevice);
if (usbDevice.equals(device.getDevice())) { if (device == null)
return;
boolean opened = false; boolean opened = false;
if (permission_granted) { if (permission_granted) {
opened = device.open(); opened = device.open();
} }
HIDDeviceOpenResult(device.getId(), opened); HIDDeviceOpenResult(device.getId(), opened);
} }
}
}
private void connectHIDDeviceUSB(UsbDevice usbDevice) { private void connectHIDDeviceUSB(UsbDevice usbDevice) {
synchronized (this) { synchronized (this) {
for (int interface_index = 0; interface_index < usbDevice.getInterfaceCount(); interface_index++) { for (int interface_number = 0; interface_number < usbDevice.getInterfaceCount(); interface_number++) {
UsbInterface usbInterface = usbDevice.getInterface(interface_index); if (isHIDDeviceInterface(usbDevice, interface_number)) {
if (isHIDDeviceInterface(usbDevice, usbInterface)) { HIDDeviceUSB device = new HIDDeviceUSB(this, usbDevice, interface_number);
HIDDeviceUSB device = new HIDDeviceUSB(this, usbDevice, interface_index);
int id = device.getId(); int id = device.getId();
mUSBDevices.put(usbDevice, device);
mDevicesById.put(id, device); mDevicesById.put(id, device);
HIDDeviceConnected(id, device.getIdentifier(), device.getVendorId(), device.getProductId(), device.getSerialNumber(), device.getVersion(), device.getManufacturerName(), device.getProductName(), usbInterface.getId(), usbInterface.getInterfaceClass(), usbInterface.getInterfaceSubclass(), usbInterface.getInterfaceProtocol()); HIDDeviceConnected(id, device.getIdentifier(), device.getVendorId(), device.getProductId(), device.getSerialNumber(), device.getVersion(), device.getManufacturerName(), device.getProductName(), interface_number);
break;
} }
} }
} }
@ -404,7 +411,7 @@ public class HIDDeviceManager {
if (mIsChromebook) { if (mIsChromebook) {
mHandler = new Handler(Looper.getMainLooper()); mHandler = new Handler(Looper.getMainLooper());
mLastBluetoothDevices = new ArrayList<BluetoothDevice>(); mLastBluetoothDevices = new ArrayList<>();
// final HIDDeviceManager finalThis = this; // final HIDDeviceManager finalThis = this;
// mHandler.postDelayed(new Runnable() { // mHandler.postDelayed(new Runnable() {
@ -432,8 +439,8 @@ public class HIDDeviceManager {
return; return;
} }
ArrayList<BluetoothDevice> disconnected = new ArrayList<BluetoothDevice>(); ArrayList<BluetoothDevice> disconnected = new ArrayList<>();
ArrayList<BluetoothDevice> connected = new ArrayList<BluetoothDevice>(); ArrayList<BluetoothDevice> connected = new ArrayList<>();
List<BluetoothDevice> currentConnected = mBluetoothManager.getConnectedDevices(BluetoothProfile.GATT); List<BluetoothDevice> currentConnected = mBluetoothManager.getConnectedDevices(BluetoothProfile.GATT);
@ -556,16 +563,11 @@ public class HIDDeviceManager {
////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////
public boolean openDevice(int deviceID) { 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 // 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(); UsbDevice usbDevice = device.getDevice();
if (usbDevice != null && !mUsbManager.hasPermission(usbDevice)) { if (!mUsbManager.hasPermission(usbDevice)) {
HIDDeviceOpenPending(deviceID); HIDDeviceOpenPending(deviceID);
try { try {
mUsbManager.requestPermission(usbDevice, PendingIntent.getBroadcast(mContext, 0, new Intent(HIDDeviceManager.ACTION_USB_PERMISSION), 0)); mUsbManager.requestPermission(usbDevice, PendingIntent.getBroadcast(mContext, 0, new Intent(HIDDeviceManager.ACTION_USB_PERMISSION), 0));
@ -575,8 +577,19 @@ public class HIDDeviceManager {
} }
return false; return false;
} }
break;
}
}
try { try {
Log.v(TAG, "openDevice deviceID=" + deviceID);
HIDDevice device;
device = getDevice(deviceID);
if (device == null) {
HIDDeviceDisconnected(deviceID);
return false;
}
return device.open(); return device.open();
} catch (Exception e) { } catch (Exception e) {
Log.e(TAG, "Got exception: " + Log.getStackTraceString(e)); Log.e(TAG, "Got exception: " + Log.getStackTraceString(e));
@ -586,7 +599,7 @@ public class HIDDeviceManager {
public int sendOutputReport(int deviceID, byte[] report) { public int sendOutputReport(int deviceID, byte[] report) {
try { try {
//Log.v(TAG, "sendOutputReport deviceID=" + deviceID + " length=" + report.length); Log.v(TAG, "sendOutputReport deviceID=" + deviceID + " length=" + report.length);
HIDDevice device; HIDDevice device;
device = getDevice(deviceID); device = getDevice(deviceID);
if (device == null) { if (device == null) {
@ -603,7 +616,7 @@ public class HIDDeviceManager {
public int sendFeatureReport(int deviceID, byte[] report) { public int sendFeatureReport(int deviceID, byte[] report) {
try { try {
//Log.v(TAG, "sendFeatureReport deviceID=" + deviceID + " length=" + report.length); Log.v(TAG, "sendFeatureReport deviceID=" + deviceID + " length=" + report.length);
HIDDevice device; HIDDevice device;
device = getDevice(deviceID); device = getDevice(deviceID);
if (device == null) { if (device == null) {
@ -620,7 +633,7 @@ public class HIDDeviceManager {
public boolean getFeatureReport(int deviceID, byte[] report) { public boolean getFeatureReport(int deviceID, byte[] report) {
try { try {
//Log.v(TAG, "getFeatureReport deviceID=" + deviceID); Log.v(TAG, "getFeatureReport deviceID=" + deviceID);
HIDDevice device; HIDDevice device;
device = getDevice(deviceID); device = getDevice(deviceID);
if (device == null) { if (device == null) {
@ -659,7 +672,7 @@ public class HIDDeviceManager {
private native void HIDDeviceRegisterCallback(); private native void HIDDeviceRegisterCallback();
private native void HIDDeviceReleaseCallback(); 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, int interface_class, int interface_subclass, int interface_protocol); 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 HIDDeviceOpenPending(int deviceID); native void HIDDeviceOpenPending(int deviceID);
native void HIDDeviceOpenResult(int deviceID, boolean opened); native void HIDDeviceOpenResult(int deviceID, boolean opened);
native void HIDDeviceDisconnected(int deviceID); native void HIDDeviceDisconnected(int deviceID);

View file

@ -11,7 +11,6 @@ class HIDDeviceUSB implements HIDDevice {
protected HIDDeviceManager mManager; protected HIDDeviceManager mManager;
protected UsbDevice mDevice; protected UsbDevice mDevice;
protected int mInterfaceIndex;
protected int mInterface; protected int mInterface;
protected int mDeviceId; protected int mDeviceId;
protected UsbDeviceConnection mConnection; protected UsbDeviceConnection mConnection;
@ -21,17 +20,16 @@ class HIDDeviceUSB implements HIDDevice {
protected boolean mRunning; protected boolean mRunning;
protected boolean mFrozen; protected boolean mFrozen;
public HIDDeviceUSB(HIDDeviceManager manager, UsbDevice usbDevice, int interface_index) { public HIDDeviceUSB(HIDDeviceManager manager, UsbDevice usbDevice, int interface_number) {
mManager = manager; mManager = manager;
mDevice = usbDevice; mDevice = usbDevice;
mInterfaceIndex = interface_index; mInterface = interface_number;
mInterface = mDevice.getInterface(mInterfaceIndex).getId();
mDeviceId = manager.getDeviceIDForIdentifier(getIdentifier()); mDeviceId = manager.getDeviceIDForIdentifier(getIdentifier());
mRunning = false; mRunning = false;
} }
public String getIdentifier() { public String getIdentifier() {
return String.format("%s/%x/%x/%d", mDevice.getDeviceName(), mDevice.getVendorId(), mDevice.getProductId(), mInterfaceIndex); return String.format("%s/%x/%x", mDevice.getDeviceName(), mDevice.getVendorId(), mDevice.getProductId());
} }
@Override @Override
@ -90,7 +88,6 @@ class HIDDeviceUSB implements HIDDevice {
return result; return result;
} }
@Override
public UsbDevice getDevice() { public UsbDevice getDevice() {
return mDevice; return mDevice;
} }
@ -107,15 +104,19 @@ class HIDDeviceUSB implements HIDDevice {
return false; return false;
} }
// Force claim our interface // Force claim all interfaces
UsbInterface iface = mDevice.getInterface(mInterfaceIndex); for (int i = 0; i < mDevice.getInterfaceCount(); i++) {
UsbInterface iface = mDevice.getInterface(i);
if (!mConnection.claimInterface(iface, true)) { if (!mConnection.claimInterface(iface, true)) {
Log.w(TAG, "Failed to claim interfaces on USB device " + getDeviceName()); Log.w(TAG, "Failed to claim interfaces on USB device " + getDeviceName());
close(); close();
return false; return false;
} }
}
// Find the endpoints // Find the endpoints
UsbInterface iface = mDevice.getInterface(mInterface);
for (int j = 0; j < iface.getEndpointCount(); j++) { for (int j = 0; j < iface.getEndpointCount(); j++) {
UsbEndpoint endpt = iface.getEndpoint(j); UsbEndpoint endpt = iface.getEndpoint(j);
switch (endpt.getDirection()) { switch (endpt.getDirection()) {
@ -165,7 +166,7 @@ class HIDDeviceUSB implements HIDDevice {
UsbConstants.USB_TYPE_CLASS | 0x01 /*RECIPIENT_INTERFACE*/ | UsbConstants.USB_DIR_OUT, UsbConstants.USB_TYPE_CLASS | 0x01 /*RECIPIENT_INTERFACE*/ | UsbConstants.USB_DIR_OUT,
0x09/*HID set_report*/, 0x09/*HID set_report*/,
(3/*HID feature*/ << 8) | report_number, (3/*HID feature*/ << 8) | report_number,
mInterface, 0,
report, offset, length, report, offset, length,
1000/*timeout millis*/); 1000/*timeout millis*/);
@ -209,7 +210,7 @@ class HIDDeviceUSB implements HIDDevice {
UsbConstants.USB_TYPE_CLASS | 0x01 /*RECIPIENT_INTERFACE*/ | UsbConstants.USB_DIR_IN, UsbConstants.USB_TYPE_CLASS | 0x01 /*RECIPIENT_INTERFACE*/ | UsbConstants.USB_DIR_IN,
0x01/*HID get_report*/, 0x01/*HID get_report*/,
(3/*HID feature*/ << 8) | report_number, (3/*HID feature*/ << 8) | report_number,
mInterface, 0,
report, offset, length, report, offset, length,
1000/*timeout millis*/); 1000/*timeout millis*/);
@ -249,8 +250,10 @@ class HIDDeviceUSB implements HIDDevice {
mInputThread = null; mInputThread = null;
} }
if (mConnection != null) { if (mConnection != null) {
UsbInterface iface = mDevice.getInterface(mInterfaceIndex); for (int i = 0; i < mDevice.getInterfaceCount(); i++) {
UsbInterface iface = mDevice.getInterface(i);
mConnection.releaseInterface(iface); mConnection.releaseInterface(iface);
}
mConnection.close(); mConnection.close();
mConnection = null; mConnection = null;
} }

View file

@ -37,8 +37,7 @@ import android.content.pm.ApplicationInfo;
public class SDLActivity extends Activity implements View.OnSystemUiVisibilityChangeListener { public class SDLActivity extends Activity implements View.OnSystemUiVisibilityChangeListener {
private static final String TAG = "SDL"; private static final String TAG = "SDL";
public static boolean mIsResumedCalled, mHasFocus; public static boolean mIsResumedCalled, mIsSurfaceReady, mHasFocus;
public static final boolean mHasMultiWindow = (Build.VERSION.SDK_INT >= 24);
// Cursor types // Cursor types
private static final int SDL_SYSTEM_CURSOR_NONE = -1; private static final int SDL_SYSTEM_CURSOR_NONE = -1;
@ -71,9 +70,15 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
public static NativeState mNextNativeState; public static NativeState mNextNativeState;
public static NativeState mCurrentNativeState; public static NativeState mCurrentNativeState;
public static boolean mExitCalledFromJava;
/** If shared libraries (e.g. SDL or the native application) could not be loaded. */ /** If shared libraries (e.g. SDL or the native application) could not be loaded. */
public static boolean mBrokenLibraries; public static boolean mBrokenLibraries;
// If we want to separate mouse and touch events.
// This is only toggled in native code when a hint is set!
public static boolean mSeparateMouseAndTouch;
// Main components // Main components
protected static SDLActivity mSingleton; protected static SDLActivity mSingleton;
protected static SDLSurface mSurface; protected static SDLSurface mSurface;
@ -81,7 +86,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
protected static boolean mScreenKeyboardShown; protected static boolean mScreenKeyboardShown;
protected static ViewGroup mLayout; protected static ViewGroup mLayout;
protected static SDLClipboardHandler mClipboardHandler; protected static SDLClipboardHandler mClipboardHandler;
protected static Hashtable<Integer, PointerIcon> mCursors; protected static Hashtable<Integer, Object> mCursors;
protected static int mLastCursorID; protected static int mLastCursorID;
protected static SDLGenericMotionListener_API12 mMotionListener; protected static SDLGenericMotionListener_API12 mMotionListener;
protected static HIDDeviceManager mHIDDeviceManager; protected static HIDDeviceManager mHIDDeviceManager;
@ -137,7 +142,6 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
*/ */
protected String[] getLibraries() { protected String[] getLibraries() {
return new String[] { return new String[] {
"hidapi",
"SDL2", "SDL2",
// "SDL2_image", // "SDL2_image",
// "SDL2_mixer", // "SDL2_mixer",
@ -172,11 +176,13 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
mTextEdit = null; mTextEdit = null;
mLayout = null; mLayout = null;
mClipboardHandler = null; mClipboardHandler = null;
mCursors = new Hashtable<Integer, PointerIcon>(); mCursors = new Hashtable<Integer, Object>();
mLastCursorID = 0; mLastCursorID = 0;
mSDLThread = null; mSDLThread = null;
mExitCalledFromJava = false;
mBrokenLibraries = false; mBrokenLibraries = false;
mIsResumedCalled = false; mIsResumedCalled = false;
mIsSurfaceReady = false;
mHasFocus = true; mHasFocus = true;
mNextNativeState = NativeState.INIT; mNextNativeState = NativeState.INIT;
mCurrentNativeState = NativeState.INIT; mCurrentNativeState = NativeState.INIT;
@ -190,12 +196,6 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
Log.v(TAG, "onCreate()"); Log.v(TAG, "onCreate()");
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
try {
Thread.currentThread().setName("SDLActivity");
} catch (Exception e) {
Log.v(TAG, "modify thread properties failed " + e.toString());
}
// Load shared libraries // Load shared libraries
String errorMsgBrokenLib = ""; String errorMsgBrokenLib = "";
try { try {
@ -243,7 +243,12 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
mSingleton = this; mSingleton = this;
SDL.setContext(this); SDL.setContext(this);
if (Build.VERSION.SDK_INT >= 11) {
mClipboardHandler = new SDLClipboardHandler_API11(); mClipboardHandler = new SDLClipboardHandler_API11();
} else {
/* Before API 11, no clipboard notification (eg no SDL_CLIPBOARDUPDATE) */
mClipboardHandler = new SDLClipboardHandler_Old();
}
mHIDDeviceManager = HIDDeviceManager.acquire(this); mHIDDeviceManager = HIDDeviceManager.acquire(this);
@ -255,7 +260,6 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
// Get our current screen orientation and pass it down. // Get our current screen orientation and pass it down.
mCurrentOrientation = SDLActivity.getCurrentOrientation(); mCurrentOrientation = SDLActivity.getCurrentOrientation();
// Only record current orientation
SDLActivity.onNativeOrientationChanged(mCurrentOrientation); SDLActivity.onNativeOrientationChanged(mCurrentOrientation);
setContentView(mLayout); setContentView(mLayout);
@ -275,7 +279,11 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
} }
} }
protected void pauseNativeThread() { // Events
@Override
protected void onPause() {
Log.v(TAG, "onPause()");
super.onPause();
mNextNativeState = NativeState.PAUSED; mNextNativeState = NativeState.PAUSED;
mIsResumedCalled = false; mIsResumedCalled = false;
@ -283,10 +291,17 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
return; return;
} }
if (mHIDDeviceManager != null) {
mHIDDeviceManager.setFrozen(true);
}
SDLActivity.handleNativeState(); SDLActivity.handleNativeState();
} }
protected void resumeNativeThread() { @Override
protected void onResume() {
Log.v(TAG, "onResume()");
super.onResume();
mNextNativeState = NativeState.RESUMED; mNextNativeState = NativeState.RESUMED;
mIsResumedCalled = true; mIsResumedCalled = true;
@ -294,52 +309,11 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
return; return;
} }
SDLActivity.handleNativeState();
}
// Events
@Override
protected void onPause() {
Log.v(TAG, "onPause()");
super.onPause();
if (mHIDDeviceManager != null) {
mHIDDeviceManager.setFrozen(true);
}
if (!mHasMultiWindow) {
pauseNativeThread();
}
}
@Override
protected void onResume() {
Log.v(TAG, "onResume()");
super.onResume();
if (mHIDDeviceManager != null) { if (mHIDDeviceManager != null) {
mHIDDeviceManager.setFrozen(false); mHIDDeviceManager.setFrozen(false);
} }
if (!mHasMultiWindow) {
resumeNativeThread();
}
}
@Override SDLActivity.handleNativeState();
protected void onStop() {
Log.v(TAG, "onStop()");
super.onStop();
if (mHasMultiWindow) {
pauseNativeThread();
}
}
@Override
protected void onStart() {
Log.v(TAG, "onStart()");
super.onStart();
if (mHasMultiWindow) {
resumeNativeThread();
}
} }
public static int getCurrentOrientation() { public static int getCurrentOrientation() {
@ -378,22 +352,16 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
return; return;
} }
mHasFocus = hasFocus; SDLActivity.mHasFocus = hasFocus;
if (hasFocus) { if (hasFocus) {
mNextNativeState = NativeState.RESUMED; mNextNativeState = NativeState.RESUMED;
SDLActivity.getMotionListener().reclaimRelativeMouseModeIfNeeded(); SDLActivity.getMotionListener().reclaimRelativeMouseModeIfNeeded();
SDLActivity.handleNativeState();
nativeFocusChanged(true);
} else { } else {
nativeFocusChanged(false);
if (!mHasMultiWindow) {
mNextNativeState = NativeState.PAUSED; mNextNativeState = NativeState.PAUSED;
}
SDLActivity.handleNativeState(); SDLActivity.handleNativeState();
} }
}
}
@Override @Override
public void onLowMemory() { public void onLowMemory() {
@ -418,25 +386,34 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
if (SDLActivity.mBrokenLibraries) { if (SDLActivity.mBrokenLibraries) {
super.onDestroy(); super.onDestroy();
// Reset everything in case the user re opens the app
SDLActivity.initialize();
return; return;
} }
mNextNativeState = NativeState.PAUSED;
SDLActivity.handleNativeState();
// Send a quit message to the application
SDLActivity.mExitCalledFromJava = true;
SDLActivity.nativeQuit();
// Now wait for the SDL thread to quit
if (SDLActivity.mSDLThread != null) { if (SDLActivity.mSDLThread != null) {
// Send Quit event to "SDLThread" thread
SDLActivity.nativeSendQuit();
// Wait for "SDLThread" thread to end
try { try {
SDLActivity.mSDLThread.join(); SDLActivity.mSDLThread.join();
} catch(Exception e) { } catch(Exception e) {
Log.v(TAG, "Problem stopping SDLThread: " + e); Log.v(TAG, "Problem stopping thread: " + e);
}
} }
SDLActivity.mSDLThread = null;
SDLActivity.nativeQuit(); //Log.v(TAG, "Finished waiting for SDL thread");
}
super.onDestroy(); super.onDestroy();
// Reset everything in case the user re opens the app
SDLActivity.initialize();
} }
@Override @Override
@ -453,10 +430,8 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
} }
// Default system back button behavior. // Default system back button behavior.
if (!isFinishing()) {
super.onBackPressed(); super.onBackPressed();
} }
}
// Called by JNI from SDL. // Called by JNI from SDL.
public static void manualBackButton() { public static void manualBackButton() {
@ -468,10 +443,8 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
runOnUiThread(new Runnable() { runOnUiThread(new Runnable() {
@Override @Override
public void run() { public void run() {
if (!SDLActivity.this.isFinishing()) {
SDLActivity.this.superOnBackPressed(); SDLActivity.this.superOnBackPressed();
} }
}
}); });
} }
@ -517,19 +490,16 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
// Try a transition to paused state // Try a transition to paused state
if (mNextNativeState == NativeState.PAUSED) { if (mNextNativeState == NativeState.PAUSED) {
if (mSDLThread != null) {
nativePause(); nativePause();
} if (mSurface != null)
if (mSurface != null) {
mSurface.handlePause(); mSurface.handlePause();
}
mCurrentNativeState = mNextNativeState; mCurrentNativeState = mNextNativeState;
return; return;
} }
// Try a transition to resumed state // Try a transition to resumed state
if (mNextNativeState == NativeState.RESUMED) { if (mNextNativeState == NativeState.RESUMED) {
if (mSurface.mIsSurfaceReady && mHasFocus && mIsResumedCalled) { if (mIsSurfaceReady && mHasFocus && mIsResumedCalled) {
if (mSDLThread == null) { if (mSDLThread == null) {
// This is the entry point to the C app. // This is the entry point to the C app.
// Start up the C app thread and enable sensor input for the first time // Start up the C app thread and enable sensor input for the first time
@ -538,24 +508,28 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
mSDLThread = new Thread(new SDLMain(), "SDLThread"); mSDLThread = new Thread(new SDLMain(), "SDLThread");
mSurface.enableSensor(Sensor.TYPE_ACCELEROMETER, true); mSurface.enableSensor(Sensor.TYPE_ACCELEROMETER, true);
mSDLThread.start(); mSDLThread.start();
// No nativeResume(), don't signal Android_ResumeSem
mSurface.handleResume();
} else {
nativeResume();
mSurface.handleResume();
} }
nativeResume();
mSurface.handleResume();
mCurrentNativeState = mNextNativeState; mCurrentNativeState = mNextNativeState;
} }
} }
} }
/* The native thread has finished */
public static void handleNativeExit() {
SDLActivity.mSDLThread = null;
if (mSingleton != null) {
mSingleton.finish();
}
}
// Messages from the SDLMain thread // Messages from the SDLMain thread
static final int COMMAND_CHANGE_TITLE = 1; static final int COMMAND_CHANGE_TITLE = 1;
static final int COMMAND_CHANGE_WINDOW_STYLE = 2; static final int COMMAND_CHANGE_WINDOW_STYLE = 2;
static final int COMMAND_TEXTEDIT_HIDE = 3; static final int COMMAND_TEXTEDIT_HIDE = 3;
static final int COMMAND_CHANGE_SURFACEVIEW_FORMAT = 4;
static final int COMMAND_SET_KEEP_SCREEN_ON = 5; static final int COMMAND_SET_KEEP_SCREEN_ON = 5;
protected static final int COMMAND_USER = 0x8000; protected static final int COMMAND_USER = 0x8000;
@ -637,8 +611,6 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
imm.hideSoftInputFromWindow(mTextEdit.getWindowToken(), 0); imm.hideSoftInputFromWindow(mTextEdit.getWindowToken(), 0);
mScreenKeyboardShown = false; mScreenKeyboardShown = false;
mSurface.requestFocus();
} }
break; break;
case COMMAND_SET_KEEP_SCREEN_ON: case COMMAND_SET_KEEP_SCREEN_ON:
@ -655,32 +627,6 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
} }
break; break;
} }
case COMMAND_CHANGE_SURFACEVIEW_FORMAT:
{
int format = (Integer) msg.obj;
int pf;
if (SDLActivity.mSurface == null) {
return;
}
SurfaceHolder holder = SDLActivity.mSurface.getHolder();
if (holder == null) {
return;
}
if (format == 1) {
pf = PixelFormat.RGBA_8888;
} else if (format == 2) {
pf = PixelFormat.RGBX_8888;
} else {
pf = PixelFormat.RGB_565;
}
holder.setFormat(pf);
break;
}
default: default:
if ((context instanceof SDLActivity) && !((SDLActivity) context).onUnhandledMessage(msg.arg1, msg.obj)) { if ((context instanceof SDLActivity) && !((SDLActivity) context).onUnhandledMessage(msg.arg1, msg.obj)) {
Log.e(TAG, "error handling message, command is " + msg.arg1); Log.e(TAG, "error handling message, command is " + msg.arg1);
@ -730,7 +676,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
} }
} }
if (bShouldWait && (SDLActivity.getContext() != null)) { if (bShouldWait) {
// We'll wait for the surfaceChanged() method, which will notify us // We'll wait for the surfaceChanged() method, which will notify us
// when called. That way, we know our current size is really the // when called. That way, we know our current size is really the
// size we need, instead of grabbing a size that's still got // size we need, instead of grabbing a size that's still got
@ -758,17 +704,13 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
public static native int nativeSetupJNI(); public static native int nativeSetupJNI();
public static native int nativeRunMain(String library, String function, Object arguments); public static native int nativeRunMain(String library, String function, Object arguments);
public static native void nativeLowMemory(); public static native void nativeLowMemory();
public static native void nativeSendQuit();
public static native void nativeQuit(); public static native void nativeQuit();
public static native void nativePause(); public static native void nativePause();
public static native void nativeResume(); public static native void nativeResume();
public static native void nativeFocusChanged(boolean hasFocus);
public static native void onNativeDropFile(String filename); public static native void onNativeDropFile(String filename);
public static native void nativeSetScreenResolution(int surfaceWidth, int surfaceHeight, int deviceWidth, int deviceHeight, int format, float rate); public static native void onNativeResize(int surfaceWidth, int surfaceHeight, int deviceWidth, int deviceHeight, int format, float rate);
public static native void onNativeResize();
public static native void onNativeKeyDown(int keycode); public static native void onNativeKeyDown(int keycode);
public static native void onNativeKeyUp(int keycode); public static native void onNativeKeyUp(int keycode);
public static native boolean onNativeSoftReturnKey();
public static native void onNativeKeyboardFocusLost(); public static native void onNativeKeyboardFocusLost();
public static native void onNativeMouse(int button, int action, float x, float y, boolean relative); public static native void onNativeMouse(int button, int action, float x, float y, boolean relative);
public static native void onNativeTouch(int touchDevId, int pointerFingerId, public static native void onNativeTouch(int touchDevId, int pointerFingerId,
@ -776,14 +718,11 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
float y, float p); float y, float p);
public static native void onNativeAccel(float x, float y, float z); public static native void onNativeAccel(float x, float y, float z);
public static native void onNativeClipboardChanged(); public static native void onNativeClipboardChanged();
public static native void onNativeSurfaceCreated();
public static native void onNativeSurfaceChanged(); public static native void onNativeSurfaceChanged();
public static native void onNativeSurfaceDestroyed(); public static native void onNativeSurfaceDestroyed();
public static native String nativeGetHint(String name); public static native String nativeGetHint(String name);
public static native void nativeSetenv(String name, String value); public static native void nativeSetenv(String name, String value);
public static native void onNativeOrientationChanged(int orientation); 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. * This method is called by SDL using JNI.
@ -818,101 +757,39 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
*/ */
public void setOrientationBis(int w, int h, boolean resizable, String hint) public void setOrientationBis(int w, int h, boolean resizable, String hint)
{ {
int orientation_landscape = -1; int orientation = -1;
int orientation_portrait = -1;
/* If set, hint "explicitly controls which UI orientations are allowed". */
if (hint.contains("LandscapeRight") && hint.contains("LandscapeLeft")) { if (hint.contains("LandscapeRight") && hint.contains("LandscapeLeft")) {
orientation_landscape = ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE; orientation = ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE;
} else if (hint.contains("LandscapeRight")) { } else if (hint.contains("LandscapeRight")) {
orientation_landscape = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE; orientation = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE;
} else if (hint.contains("LandscapeLeft")) { } else if (hint.contains("LandscapeLeft")) {
orientation_landscape = ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE; orientation = ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE;
} } else if (hint.contains("Portrait") && hint.contains("PortraitUpsideDown")) {
orientation = ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT;
if (hint.contains("Portrait") && hint.contains("PortraitUpsideDown")) {
orientation_portrait = ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT;
} else if (hint.contains("Portrait")) { } else if (hint.contains("Portrait")) {
orientation_portrait = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT; orientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT;
} else if (hint.contains("PortraitUpsideDown")) { } else if (hint.contains("PortraitUpsideDown")) {
orientation_portrait = ActivityInfo.SCREEN_ORIENTATION_REVERSE_PORTRAIT; orientation = ActivityInfo.SCREEN_ORIENTATION_REVERSE_PORTRAIT;
} }
boolean is_landscape_allowed = (orientation_landscape == -1 ? false : true); /* no valid hint */
boolean is_portrait_allowed = (orientation_portrait == -1 ? false : true); if (orientation == -1) {
int req = -1; /* Requested orientation */
/* No valid hint, nothing is explicitly allowed */
if (!is_portrait_allowed && !is_landscape_allowed) {
if (resizable) { if (resizable) {
/* All orientations are allowed */ /* no fixed orientation */
req = ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR;
} else { } else {
/* Fixed window and nothing specified. Get orientation from w/h of created window */ if (w > h) {
req = (w > h ? ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE : ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT); orientation = ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE;
}
} else { } else {
/* At least one orientation is allowed */ orientation = ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT;
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 {
/* 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() requestedOrientation=" + req + " width=" + w +" height="+ h +" resizable=" + resizable + " hint=" + hint); Log.v("SDL", "setOrientation() orientation=" + orientation + " width=" + w +" height="+ h +" resizable=" + resizable + " hint=" + hint);
mSingleton.setRequestedOrientation(req); if (orientation != -1) {
mSingleton.setRequestedOrientation(orientation);
} }
/**
* This method is called by SDL using JNI.
*/
public static void minimizeWindow() {
if (mSingleton == null) {
return;
}
Intent startMain = new Intent(Intent.ACTION_MAIN);
startMain.addCategory(Intent.CATEGORY_HOME);
startMain.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
mSingleton.startActivity(startMain);
}
/**
* This method is called by SDL using JNI.
*/
public static boolean shouldMinimizeOnFocusLoss() {
/*
if (Build.VERSION.SDK_INT >= 24) {
if (mSingleton == null) {
return true;
}
if (mSingleton.isInMultiWindowMode()) {
return false;
}
if (mSingleton.isInPictureInPictureMode()) {
return false;
}
}
return true;
*/
return false;
} }
/** /**
@ -1000,9 +877,6 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
if (Build.MANUFACTURER.equals("Amlogic") && Build.MODEL.equals("X96-W")) { if (Build.MANUFACTURER.equals("Amlogic") && Build.MODEL.equals("X96-W")) {
return true; return true;
} }
if (Build.MANUFACTURER.equals("Amlogic") && Build.MODEL.startsWith("TV")) {
return true;
}
return false; return false;
} }
@ -1027,9 +901,6 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
* This method is called by SDL using JNI. * This method is called by SDL using JNI.
*/ */
public static boolean isChromebook() { public static boolean isChromebook() {
if (getContext() == null) {
return false;
}
return getContext().getPackageManager().hasSystemFeature("org.chromium.arc.device_management"); return getContext().getPackageManager().hasSystemFeature("org.chromium.arc.device_management");
} }
@ -1105,14 +976,6 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
this.y = y; this.y = y;
this.w = w; this.w = w;
this.h = h; this.h = h;
/* Minimum size of 1 pixel, so it takes focus. */
if (this.w <= 0) {
this.w = 1;
}
if (this.h + HEIGHT_PADDING <= 0) {
this.h = 1 - HEIGHT_PADDING;
}
} }
@Override @Override
@ -1150,9 +1013,11 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
public static boolean isTextInputEvent(KeyEvent event) { public static boolean isTextInputEvent(KeyEvent event) {
// Key pressed with Ctrl should be sent as SDL_KEYDOWN/SDL_KEYUP and not SDL_TEXTINPUT // Key pressed with Ctrl should be sent as SDL_KEYDOWN/SDL_KEYUP and not SDL_TEXTINPUT
if (Build.VERSION.SDK_INT >= 11) {
if (event.isCtrlPressed()) { if (event.isCtrlPressed()) {
return false; return false;
} }
}
return event.isPrintingKey() || event.getKeyCode() == KeyEvent.KEYCODE_SPACE; return event.isPrintingKey() || event.getKeyCode() == KeyEvent.KEYCODE_SPACE;
} }
@ -1167,28 +1032,23 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
return SDLActivity.mSurface.getNativeSurface(); return SDLActivity.mSurface.getNativeSurface();
} }
/**
* This method is called by SDL using JNI.
*/
public static void setSurfaceViewFormat(int format) {
mSingleton.sendCommand(COMMAND_CHANGE_SURFACEVIEW_FORMAT, format);
return;
}
// Input // Input
/** /**
* This method is called by SDL using JNI. * This method is called by SDL using JNI.
* @return an array which may be empty but is never null.
*/ */
public static void initTouch() { public static int[] inputGetInputDeviceIds(int sources) {
int[] ids = InputDevice.getDeviceIds(); int[] ids = InputDevice.getDeviceIds();
int[] filtered = new int[ids.length];
int used = 0;
for (int i = 0; i < ids.length; ++i) { for (int i = 0; i < ids.length; ++i) {
InputDevice device = InputDevice.getDevice(ids[i]); InputDevice device = InputDevice.getDevice(ids[i]);
if (device != null && (device.getSources() & InputDevice.SOURCE_TOUCHSCREEN) != 0) { if ((device != null) && ((device.getSources() & sources) != 0)) {
nativeAddTouch(device.getId(), device.getName()); filtered[used++] = device.getId();
} }
} }
return Arrays.copyOf(filtered, used);
} }
// APK expansion files support // APK expansion files support
@ -1481,7 +1341,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
}; };
public void onSystemUiVisibilityChange(int visibility) { public void onSystemUiVisibilityChange(int visibility) {
if (SDLActivity.mFullscreenModeActive && ((visibility & View.SYSTEM_UI_FLAG_FULLSCREEN) == 0 || (visibility & View.SYSTEM_UI_FLAG_HIDE_NAVIGATION) == 0)) { if (SDLActivity.mFullscreenModeActive && (visibility & View.SYSTEM_UI_FLAG_FULLSCREEN) == 0 || (visibility & View.SYSTEM_UI_FLAG_HIDE_NAVIGATION) == 0) {
Handler handler = getWindow().getDecorView().getHandler(); Handler handler = getWindow().getDecorView().getHandler();
if (handler != null) { if (handler != null) {
@ -1519,16 +1379,15 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
public static int createCustomCursor(int[] colors, int width, int height, int hotSpotX, int hotSpotY) { public static int createCustomCursor(int[] colors, int width, int height, int hotSpotX, int hotSpotY) {
Bitmap bitmap = Bitmap.createBitmap(colors, width, height, Bitmap.Config.ARGB_8888); Bitmap bitmap = Bitmap.createBitmap(colors, width, height, Bitmap.Config.ARGB_8888);
++mLastCursorID; ++mLastCursorID;
// This requires API 24, so use reflection to implement this
if (Build.VERSION.SDK_INT >= 24) {
try { try {
mCursors.put(mLastCursorID, PointerIcon.create(bitmap, hotSpotX, hotSpotY)); Class PointerIconClass = Class.forName("android.view.PointerIcon");
Class[] arg_types = new Class[] { Bitmap.class, float.class, float.class };
Method create = PointerIconClass.getMethod("create", arg_types);
mCursors.put(mLastCursorID, create.invoke(null, bitmap, hotSpotX, hotSpotY));
} catch (Exception e) { } catch (Exception e) {
return 0; return 0;
} }
} else {
return 0;
}
return mLastCursorID; return mLastCursorID;
} }
@ -1536,16 +1395,14 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
* This method is called by SDL using JNI. * This method is called by SDL using JNI.
*/ */
public static boolean setCustomCursor(int cursorID) { public static boolean setCustomCursor(int cursorID) {
// This requires API 24, so use reflection to implement this
if (Build.VERSION.SDK_INT >= 24) {
try { try {
mSurface.setPointerIcon(mCursors.get(cursorID)); Class PointerIconClass = Class.forName("android.view.PointerIcon");
Method setPointerIcon = SDLSurface.class.getMethod("setPointerIcon", PointerIconClass);
setPointerIcon.invoke(mSurface, mCursors.get(cursorID));
} catch (Exception e) { } catch (Exception e) {
return false; return false;
} }
} else {
return false;
}
return true; return true;
} }
@ -1592,41 +1449,18 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
cursor_type = 1002; //PointerIcon.TYPE_HAND; cursor_type = 1002; //PointerIcon.TYPE_HAND;
break; break;
} }
if (Build.VERSION.SDK_INT >= 24) { // This requires API 24, so use reflection to implement this
try { try {
mSurface.setPointerIcon(PointerIcon.getSystemIcon(SDL.getContext(), cursor_type)); Class PointerIconClass = Class.forName("android.view.PointerIcon");
Class[] arg_types = new Class[] { Context.class, int.class };
Method getSystemIcon = PointerIconClass.getMethod("getSystemIcon", arg_types);
Method setPointerIcon = SDLSurface.class.getMethod("setPointerIcon", PointerIconClass);
setPointerIcon.invoke(mSurface, getSystemIcon.invoke(null, SDL.getContext(), cursor_type));
} catch (Exception e) { } catch (Exception e) {
return false; return false;
} }
}
return true; 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);
}
}
} }
/** /**
@ -1640,24 +1474,14 @@ class SDLMain implements Runnable {
String function = SDLActivity.mSingleton.getMainFunction(); String function = SDLActivity.mSingleton.getMainFunction();
String[] arguments = SDLActivity.mSingleton.getArguments(); String[] arguments = SDLActivity.mSingleton.getArguments();
try {
android.os.Process.setThreadPriority(android.os.Process.THREAD_PRIORITY_DISPLAY);
} catch (Exception e) {
Log.v("SDL", "modify thread properties failed " + e.toString());
}
Log.v("SDL", "Running main function " + function + " from library " + library); Log.v("SDL", "Running main function " + function + " from library " + library);
SDLActivity.nativeRunMain(library, function, arguments); SDLActivity.nativeRunMain(library, function, arguments);
Log.v("SDL", "Finished main function"); Log.v("SDL", "Finished main function");
if (SDLActivity.mSingleton == null || SDLActivity.mSingleton.isFinishing()) { // Native thread has finished, let's finish the Activity
// Activity is already being destroyed if (!SDLActivity.mExitCalledFromJava) {
} else { SDLActivity.handleNativeExit();
// Let's finish the Activity
SDLActivity.mSDLThread = null;
SDLActivity.mSingleton.finish();
} }
} }
} }
@ -1673,14 +1497,11 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
View.OnKeyListener, View.OnTouchListener, SensorEventListener { View.OnKeyListener, View.OnTouchListener, SensorEventListener {
// Sensors // Sensors
protected SensorManager mSensorManager; protected static SensorManager mSensorManager;
protected Display mDisplay; protected static Display mDisplay;
// Keep track of the surface size to normalize touch events // Keep track of the surface size to normalize touch events
protected float mWidth, mHeight; protected static float mWidth, mHeight;
// Is SurfaceView ready for rendering
public boolean mIsSurfaceReady;
// Startup // Startup
public SDLSurface(Context context) { public SDLSurface(Context context) {
@ -1696,13 +1517,13 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
mDisplay = ((WindowManager)context.getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay(); mDisplay = ((WindowManager)context.getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay();
mSensorManager = (SensorManager)context.getSystemService(Context.SENSOR_SERVICE); mSensorManager = (SensorManager)context.getSystemService(Context.SENSOR_SERVICE);
if (Build.VERSION.SDK_INT >= 12) {
setOnGenericMotionListener(SDLActivity.getMotionListener()); setOnGenericMotionListener(SDLActivity.getMotionListener());
}
// Some arbitrary defaults to avoid a potential division by zero // Some arbitrary defaults to avoid a potential division by zero
mWidth = 1.0f; mWidth = 1.0f;
mHeight = 1.0f; mHeight = 1.0f;
mIsSurfaceReady = false;
} }
public void handlePause() { public void handlePause() {
@ -1726,7 +1547,7 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
@Override @Override
public void surfaceCreated(SurfaceHolder holder) { public void surfaceCreated(SurfaceHolder holder) {
Log.v("SDL", "surfaceCreated()"); Log.v("SDL", "surfaceCreated()");
SDLActivity.onNativeSurfaceCreated(); holder.setType(SurfaceHolder.SURFACE_TYPE_GPU);
} }
// Called when we lose the surface // Called when we lose the surface
@ -1738,7 +1559,7 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
SDLActivity.mNextNativeState = SDLActivity.NativeState.PAUSED; SDLActivity.mNextNativeState = SDLActivity.NativeState.PAUSED;
SDLActivity.handleNativeState(); SDLActivity.handleNativeState();
mIsSurfaceReady = false; SDLActivity.mIsSurfaceReady = false;
SDLActivity.onNativeSurfaceDestroyed(); SDLActivity.onNativeSurfaceDestroyed();
} }
@ -1754,6 +1575,23 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
int sdlFormat = 0x15151002; // SDL_PIXELFORMAT_RGB565 by default int sdlFormat = 0x15151002; // SDL_PIXELFORMAT_RGB565 by default
switch (format) { switch (format) {
case PixelFormat.A_8:
Log.v("SDL", "pixel format A_8");
break;
case PixelFormat.LA_88:
Log.v("SDL", "pixel format LA_88");
break;
case PixelFormat.L_8:
Log.v("SDL", "pixel format L_8");
break;
case PixelFormat.RGBA_4444:
Log.v("SDL", "pixel format RGBA_4444");
sdlFormat = 0x15421002; // SDL_PIXELFORMAT_RGBA4444
break;
case PixelFormat.RGBA_5551:
Log.v("SDL", "pixel format RGBA_5551");
sdlFormat = 0x15441002; // SDL_PIXELFORMAT_RGBA5551
break;
case PixelFormat.RGBA_8888: case PixelFormat.RGBA_8888:
Log.v("SDL", "pixel format RGBA_8888"); Log.v("SDL", "pixel format RGBA_8888");
sdlFormat = 0x16462004; // SDL_PIXELFORMAT_RGBA8888 sdlFormat = 0x16462004; // SDL_PIXELFORMAT_RGBA8888
@ -1762,6 +1600,10 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
Log.v("SDL", "pixel format RGBX_8888"); Log.v("SDL", "pixel format RGBX_8888");
sdlFormat = 0x16261804; // SDL_PIXELFORMAT_RGBX8888 sdlFormat = 0x16261804; // SDL_PIXELFORMAT_RGBX8888
break; break;
case PixelFormat.RGB_332:
Log.v("SDL", "pixel format RGB_332");
sdlFormat = 0x14110801; // SDL_PIXELFORMAT_RGB332
break;
case PixelFormat.RGB_565: case PixelFormat.RGB_565:
Log.v("SDL", "pixel format RGB_565"); Log.v("SDL", "pixel format RGB_565");
sdlFormat = 0x15151002; // SDL_PIXELFORMAT_RGB565 sdlFormat = 0x15151002; // SDL_PIXELFORMAT_RGB565
@ -1798,11 +1640,8 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
Log.v("SDL", "Window size: " + width + "x" + height); Log.v("SDL", "Window size: " + width + "x" + height);
Log.v("SDL", "Device size: " + nDeviceWidth + "x" + nDeviceHeight); Log.v("SDL", "Device size: " + nDeviceWidth + "x" + nDeviceHeight);
SDLActivity.nativeSetScreenResolution(width, height, nDeviceWidth, nDeviceHeight, sdlFormat, mDisplay.getRefreshRate()); SDLActivity.onNativeResize(width, height, nDeviceWidth, nDeviceHeight, sdlFormat, mDisplay.getRefreshRate());
SDLActivity.onNativeResize();
// Prevent a screen distortion glitch,
// for instance when the device is in Landscape and a Portrait App is resumed.
boolean skip = false; boolean skip = false;
int requestedOrientation = SDLActivity.mSingleton.getRequestedOrientation(); int requestedOrientation = SDLActivity.mSingleton.getRequestedOrientation();
@ -1832,39 +1671,24 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
} }
} }
// Don't skip in MultiWindow.
if (skip) {
if (Build.VERSION.SDK_INT >= 24) {
if (SDLActivity.mSingleton.isInMultiWindowMode()) {
Log.v("SDL", "Don't skip in Multi-Window");
skip = false;
}
}
}
if (skip) { if (skip) {
Log.v("SDL", "Skip .. Surface is not ready."); Log.v("SDL", "Skip .. Surface is not ready.");
mIsSurfaceReady = false; SDLActivity.mIsSurfaceReady = false;
return; return;
} }
/* Surface is ready */
SDLActivity.mIsSurfaceReady = true;
/* If the surface has been previously destroyed by onNativeSurfaceDestroyed, recreate it here */ /* If the surface has been previously destroyed by onNativeSurfaceDestroyed, recreate it here */
SDLActivity.onNativeSurfaceChanged(); SDLActivity.onNativeSurfaceChanged();
/* Surface is ready */
mIsSurfaceReady = true;
SDLActivity.mNextNativeState = SDLActivity.NativeState.RESUMED;
SDLActivity.handleNativeState(); SDLActivity.handleNativeState();
} }
// Key events // Key events
@Override @Override
public boolean onKey(View v, int keyCode, KeyEvent event) { public boolean onKey(View v, int keyCode, KeyEvent event) {
int deviceId = event.getDeviceId();
int source = event.getSource();
// Dispatch the different events depending on where they come from // Dispatch the different events depending on where they come from
// Some SOURCE_JOYSTICK, SOURCE_DPAD or SOURCE_GAMEPAD are also SOURCE_KEYBOARD // Some SOURCE_JOYSTICK, SOURCE_DPAD or SOURCE_GAMEPAD are also SOURCE_KEYBOARD
// So, we try to process them as JOYSTICK/DPAD/GAMEPAD events first, if that fails we try them as KEYBOARD // So, we try to process them as JOYSTICK/DPAD/GAMEPAD events first, if that fails we try them as KEYBOARD
@ -1872,27 +1696,20 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
// Furthermore, it's possible a game controller has SOURCE_KEYBOARD and // Furthermore, it's possible a game controller has SOURCE_KEYBOARD and
// SOURCE_JOYSTICK, while its key events arrive from the keyboard source // SOURCE_JOYSTICK, while its key events arrive from the keyboard source
// So, retrieve the device itself and check all of its sources // So, retrieve the device itself and check all of its sources
if (SDLControllerManager.isDeviceSDLJoystick(deviceId)) { if (SDLControllerManager.isDeviceSDLJoystick(event.getDeviceId())) {
// Note that we process events with specific key codes here // Note that we process events with specific key codes here
if (event.getAction() == KeyEvent.ACTION_DOWN) { if (event.getAction() == KeyEvent.ACTION_DOWN) {
if (SDLControllerManager.onNativePadDown(deviceId, keyCode) == 0) { if (SDLControllerManager.onNativePadDown(event.getDeviceId(), keyCode) == 0) {
return true; return true;
} }
} else if (event.getAction() == KeyEvent.ACTION_UP) { } else if (event.getAction() == KeyEvent.ACTION_UP) {
if (SDLControllerManager.onNativePadUp(deviceId, keyCode) == 0) { if (SDLControllerManager.onNativePadUp(event.getDeviceId(), keyCode) == 0) {
return true; return true;
} }
} }
} }
if (source == InputDevice.SOURCE_UNKNOWN) { if ((event.getSource() & InputDevice.SOURCE_KEYBOARD) != 0) {
InputDevice device = InputDevice.getDevice(deviceId);
if (device != null) {
source = device.getSources();
}
}
if ((source & InputDevice.SOURCE_KEYBOARD) != 0) {
if (event.getAction() == KeyEvent.ACTION_DOWN) { if (event.getAction() == KeyEvent.ACTION_DOWN) {
//Log.v("SDL", "key down: " + keyCode); //Log.v("SDL", "key down: " + keyCode);
if (SDLActivity.isTextInputEvent(event)) { if (SDLActivity.isTextInputEvent(event)) {
@ -1908,7 +1725,7 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
} }
} }
if ((source & InputDevice.SOURCE_MOUSE) != 0) { if ((event.getSource() & InputDevice.SOURCE_MOUSE) != 0) {
// on some devices key events are sent for mouse BUTTON_BACK/FORWARD presses // on some devices key events are sent for mouse BUTTON_BACK/FORWARD presses
// they are ignored here because sending them as mouse input to SDL is messy // they are ignored here because sending them as mouse input to SDL is messy
if ((keyCode == KeyEvent.KEYCODE_BACK) || (keyCode == KeyEvent.KEYCODE_FORWARD)) { if ((keyCode == KeyEvent.KEYCODE_BACK) || (keyCode == KeyEvent.KEYCODE_FORWARD)) {
@ -1937,15 +1754,18 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
int i = -1; int i = -1;
float x,y,p; float x,y,p;
// !!! FIXME: dump this SDK check after 2.0.4 ships and require API14.
// 12290 = Samsung DeX mode desktop mouse // 12290 = Samsung DeX mode desktop mouse
// 12290 = 0x3002 = 0x2002 | 0x1002 = SOURCE_MOUSE | SOURCE_TOUCHSCREEN if ((event.getSource() == InputDevice.SOURCE_MOUSE || event.getSource() == 12290) && SDLActivity.mSeparateMouseAndTouch) {
// 0x2 = SOURCE_CLASS_POINTER if (Build.VERSION.SDK_INT < 14) {
if (event.getSource() == InputDevice.SOURCE_MOUSE || event.getSource() == (InputDevice.SOURCE_MOUSE | InputDevice.SOURCE_TOUCHSCREEN)) { mouseButton = 1; // all mouse buttons are the left button
} else {
try { try {
mouseButton = (Integer) event.getClass().getMethod("getButtonState").invoke(event); mouseButton = (Integer) event.getClass().getMethod("getButtonState").invoke(event);
} catch(Exception e) { } catch(Exception e) {
mouseButton = 1; // oh well. mouseButton = 1; // oh well.
} }
}
// We need to check if we're in relative mouse mode and get the axis offset rather than the x/y values // We need to check if we're in relative mouse mode and get the axis offset rather than the x/y values
// if we are. We'll leverage our existing mouse motion listener // if we are. We'll leverage our existing mouse motion listener
@ -2056,8 +1876,8 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
newOrientation = SDLActivity.SDL_ORIENTATION_LANDSCAPE_FLIPPED; newOrientation = SDLActivity.SDL_ORIENTATION_LANDSCAPE_FLIPPED;
break; break;
case Surface.ROTATION_180: case Surface.ROTATION_180:
x = -event.values[0]; x = -event.values[1];
y = -event.values[1]; y = -event.values[0];
newOrientation = SDLActivity.SDL_ORIENTATION_PORTRAIT_FLIPPED; newOrientation = SDLActivity.SDL_ORIENTATION_PORTRAIT_FLIPPED;
break; break;
default: default:
@ -2212,10 +2032,16 @@ class SDLInputConnection extends BaseInputConnection {
*/ */
if (event.getKeyCode() == KeyEvent.KEYCODE_ENTER) { if (event.getKeyCode() == KeyEvent.KEYCODE_ENTER) {
if (SDLActivity.onNativeSoftReturnKey()) { String imeHide = SDLActivity.nativeGetHint("SDL_RETURN_KEY_HIDES_IME");
if ((imeHide != null) && imeHide.equals("1")) {
Context c = SDL.getContext();
if (c instanceof SDLActivity) {
SDLActivity activity = (SDLActivity)c;
activity.sendCommand(SDLActivity.COMMAND_TEXTEDIT_HIDE, null);
return true; return true;
} }
} }
}
return super.sendKeyEvent(event); return super.sendKeyEvent(event);
@ -2226,11 +2052,6 @@ class SDLInputConnection extends BaseInputConnection {
for (int i = 0; i < text.length(); i++) { for (int i = 0; i < text.length(); i++) {
char c = text.charAt(i); char c = text.charAt(i);
if (c == '\n') {
if (SDLActivity.onNativeSoftReturnKey()) {
return true;
}
}
nativeGenerateScancodeForUnichar(c); nativeGenerateScancodeForUnichar(c);
} }
@ -2321,3 +2142,33 @@ class SDLClipboardHandler_API11 implements
} }
class SDLClipboardHandler_Old implements
SDLClipboardHandler {
protected android.text.ClipboardManager mClipMgrOld;
SDLClipboardHandler_Old() {
mClipMgrOld = (android.text.ClipboardManager) SDL.getContext().getSystemService(Context.CLIPBOARD_SERVICE);
}
@Override
public boolean clipboardHasText() {
return mClipMgrOld.hasText();
}
@Override
public String clipboardGetText() {
CharSequence text;
text = mClipMgrOld.getText();
if (text != null) {
return text.toString();
}
return null;
}
@Override
public void clipboardSetText(String string) {
mClipMgrOld.setText(string);
}
}

View file

@ -364,24 +364,5 @@ public class SDLAudioManager
} }
} }
/** This method is called by SDL using JNI. */
public static void audioSetThreadPriority(boolean iscapture, int device_id) {
try {
/* Set thread name */
if (iscapture) {
Thread.currentThread().setName("SDLAudioC" + device_id);
} else {
Thread.currentThread().setName("SDLAudioP" + device_id);
}
/* Set thread priority */
android.os.Process.setThreadPriority(android.os.Process.THREAD_PRIORITY_AUDIO);
} catch (Exception e) {
Log.v(TAG, "modify thread properties failed " + e.toString());
}
}
public static native int nativeSetupJNI(); public static native int nativeSetupJNI();
} }

View file

@ -39,8 +39,12 @@ public class SDLControllerManager
if (mJoystickHandler == null) { if (mJoystickHandler == null) {
if (Build.VERSION.SDK_INT >= 19) { if (Build.VERSION.SDK_INT >= 19) {
mJoystickHandler = new SDLJoystickHandler_API19(); mJoystickHandler = new SDLJoystickHandler_API19();
} else { } else if (Build.VERSION.SDK_INT >= 16) {
mJoystickHandler = new SDLJoystickHandler_API16(); mJoystickHandler = new SDLJoystickHandler_API16();
} else if (Build.VERSION.SDK_INT >= 12) {
mJoystickHandler = new SDLJoystickHandler_API12();
} else {
mJoystickHandler = new SDLJoystickHandler();
} }
} }
@ -99,8 +103,8 @@ public class SDLControllerManager
/* This is called for every button press, so let's not spam the logs */ /* This is called for every button press, so let's not spam the logs */
/** /**
if ((sources & InputDevice.SOURCE_CLASS_JOYSTICK) != 0) { if ((sources & InputDevice.SOURCE_CLASS_JOYSTICK) == InputDevice.SOURCE_CLASS_JOYSTICK) {
Log.v(TAG, "Input device " + device.getName() + " has class joystick."); Log.v(TAG, "Input device " + device.getName() + " is a joystick.");
} }
if ((sources & InputDevice.SOURCE_DPAD) == InputDevice.SOURCE_DPAD) { if ((sources & InputDevice.SOURCE_DPAD) == InputDevice.SOURCE_DPAD) {
Log.v(TAG, "Input device " + device.getName() + " is a dpad."); Log.v(TAG, "Input device " + device.getName() + " is a dpad.");
@ -110,7 +114,7 @@ public class SDLControllerManager
} }
**/ **/
return ((sources & InputDevice.SOURCE_CLASS_JOYSTICK) != 0 || return (((sources & InputDevice.SOURCE_CLASS_JOYSTICK) == InputDevice.SOURCE_CLASS_JOYSTICK) ||
((sources & InputDevice.SOURCE_DPAD) == InputDevice.SOURCE_DPAD) || ((sources & InputDevice.SOURCE_DPAD) == InputDevice.SOURCE_DPAD) ||
((sources & InputDevice.SOURCE_GAMEPAD) == InputDevice.SOURCE_GAMEPAD) ((sources & InputDevice.SOURCE_GAMEPAD) == InputDevice.SOURCE_GAMEPAD)
); );
@ -118,6 +122,7 @@ public class SDLControllerManager
} }
/* A null joystick handler for API level < 12 devices (the accelerometer is handled separately) */
class SDLJoystickHandler { class SDLJoystickHandler {
/** /**
@ -137,7 +142,7 @@ class SDLJoystickHandler {
} }
/* Actual joystick functionality available for API >= 12 devices */ /* Actual joystick functionality available for API >= 12 devices */
class SDLJoystickHandler_API16 extends SDLJoystickHandler { class SDLJoystickHandler_API12 extends SDLJoystickHandler {
static class SDLJoystick { static class SDLJoystick {
public int device_id; public int device_id;
@ -169,7 +174,7 @@ class SDLJoystickHandler_API16 extends SDLJoystickHandler {
private ArrayList<SDLJoystick> mJoysticks; private ArrayList<SDLJoystick> mJoysticks;
public SDLJoystickHandler_API16() { public SDLJoystickHandler_API12() {
mJoysticks = new ArrayList<SDLJoystick>(); mJoysticks = new ArrayList<SDLJoystick>();
} }
@ -273,12 +278,6 @@ class SDLJoystickHandler_API16 extends SDLJoystickHandler {
} }
public String getJoystickDescriptor(InputDevice joystickDevice) { public String getJoystickDescriptor(InputDevice joystickDevice) {
String desc = joystickDevice.getDescriptor();
if (desc != null && !desc.isEmpty()) {
return desc;
}
return joystickDevice.getName(); return joystickDevice.getName();
} }
public int getProductId(InputDevice joystickDevice) { public int getProductId(InputDevice joystickDevice) {
@ -292,6 +291,20 @@ class SDLJoystickHandler_API16 extends SDLJoystickHandler {
} }
} }
class SDLJoystickHandler_API16 extends SDLJoystickHandler_API12 {
@Override
public String getJoystickDescriptor(InputDevice joystickDevice) {
String desc = joystickDevice.getDescriptor();
if (desc != null && !desc.isEmpty()) {
return desc;
}
return super.getJoystickDescriptor(joystickDevice);
}
}
class SDLJoystickHandler_API19 extends SDLJoystickHandler_API16 { class SDLJoystickHandler_API19 extends SDLJoystickHandler_API16 {
@Override @Override
@ -469,6 +482,8 @@ class SDLHapticHandler {
// so the first controller seen by SDL matches what the receiver // so the first controller seen by SDL matches what the receiver
// considers to be the first controller // considers to be the first controller
if (Build.VERSION.SDK_INT >= 16)
{
for (int i = deviceIds.length - 1; i > -1; i--) { for (int i = deviceIds.length - 1; i > -1; i--) {
SDLHaptic haptic = getHaptic(deviceIds[i]); SDLHaptic haptic = getHaptic(deviceIds[i]);
if (haptic == null) { if (haptic == null) {
@ -484,11 +499,16 @@ class SDLHapticHandler {
} }
} }
} }
}
/* Check VIBRATOR_SERVICE */ /* Check VIBRATOR_SERVICE */
Vibrator vib = (Vibrator) SDL.getContext().getSystemService(Context.VIBRATOR_SERVICE); Vibrator vib = (Vibrator) SDL.getContext().getSystemService(Context.VIBRATOR_SERVICE);
if (vib != null) { if (vib != null) {
if (Build.VERSION.SDK_INT >= 11) {
hasVibratorService = vib.hasVibrator(); hasVibratorService = vib.hasVibrator();
} else {
hasVibratorService = true;
}
if (hasVibratorService) { if (hasVibratorService) {
SDLHaptic haptic = getHaptic(deviceId_VIBRATOR_SERVICE); SDLHaptic haptic = getHaptic(deviceId_VIBRATOR_SERVICE);
@ -555,6 +575,9 @@ class SDLGenericMotionListener_API12 implements View.OnGenericMotionListener {
return SDLControllerManager.handleJoystickMotionEvent(event); return SDLControllerManager.handleJoystickMotionEvent(event);
case InputDevice.SOURCE_MOUSE: case InputDevice.SOURCE_MOUSE:
if (!SDLActivity.mSeparateMouseAndTouch) {
break;
}
action = event.getActionMasked(); action = event.getActionMasked();
switch (action) { switch (action) {
case MotionEvent.ACTION_SCROLL: case MotionEvent.ACTION_SCROLL:
@ -617,22 +640,51 @@ class SDLGenericMotionListener_API24 extends SDLGenericMotionListener_API12 {
@Override @Override
public boolean onGenericMotion(View v, MotionEvent event) { public boolean onGenericMotion(View v, MotionEvent event) {
float x, y;
int action;
// Handle relative mouse mode switch ( event.getSource() ) {
if (mRelativeModeEnabled) { case InputDevice.SOURCE_JOYSTICK:
if (event.getSource() == InputDevice.SOURCE_MOUSE) { case InputDevice.SOURCE_GAMEPAD:
int action = event.getActionMasked(); case InputDevice.SOURCE_DPAD:
if (action == MotionEvent.ACTION_HOVER_MOVE) { return SDLControllerManager.handleJoystickMotionEvent(event);
float x = event.getAxisValue(MotionEvent.AXIS_RELATIVE_X);
float y = event.getAxisValue(MotionEvent.AXIS_RELATIVE_Y); case InputDevice.SOURCE_MOUSE:
SDLActivity.onNativeMouse(0, action, x, y, true); if (!SDLActivity.mSeparateMouseAndTouch) {
break;
}
action = event.getActionMasked();
switch (action) {
case MotionEvent.ACTION_SCROLL:
x = event.getAxisValue(MotionEvent.AXIS_HSCROLL, 0);
y = event.getAxisValue(MotionEvent.AXIS_VSCROLL, 0);
SDLActivity.onNativeMouse(0, action, x, y, false);
return true; return true;
case MotionEvent.ACTION_HOVER_MOVE:
if (mRelativeModeEnabled) {
x = event.getAxisValue(MotionEvent.AXIS_RELATIVE_X);
y = event.getAxisValue(MotionEvent.AXIS_RELATIVE_Y);
} }
} else {
x = event.getX(0);
y = event.getY(0);
} }
// Event was not managed, call SDLGenericMotionListener_API12 method SDLActivity.onNativeMouse(0, action, x, y, mRelativeModeEnabled);
return super.onGenericMotion(v, event); return true;
default:
break;
}
break;
default:
break;
}
// Event was not managed
return false;
} }
@Override @Override
@ -689,8 +741,11 @@ class SDLGenericMotionListener_API26 extends SDLGenericMotionListener_API24 {
return SDLControllerManager.handleJoystickMotionEvent(event); return SDLControllerManager.handleJoystickMotionEvent(event);
case InputDevice.SOURCE_MOUSE: case InputDevice.SOURCE_MOUSE:
// DeX desktop mouse cursor is a separate non-standard input type. case 12290: // DeX desktop mouse cursor is a separate non-standard input type.
case InputDevice.SOURCE_MOUSE | InputDevice.SOURCE_TOUCHSCREEN: if (!SDLActivity.mSeparateMouseAndTouch) {
break;
}
action = event.getActionMasked(); action = event.getActionMasked();
switch (action) { switch (action) {
case MotionEvent.ACTION_SCROLL: case MotionEvent.ACTION_SCROLL:
@ -711,6 +766,9 @@ class SDLGenericMotionListener_API26 extends SDLGenericMotionListener_API24 {
break; break;
case InputDevice.SOURCE_MOUSE_RELATIVE: case InputDevice.SOURCE_MOUSE_RELATIVE:
if (!SDLActivity.mSeparateMouseAndTouch) {
break;
}
action = event.getActionMasked(); action = event.getActionMasked();
switch (action) { switch (action) {
case MotionEvent.ACTION_SCROLL: case MotionEvent.ACTION_SCROLL:

View file

@ -69,6 +69,6 @@ ndk-build \
NDK_LIBS_OUT=$lib \ NDK_LIBS_OUT=$lib \
APP_BUILD_SCRIPT=Android.mk \ APP_BUILD_SCRIPT=Android.mk \
APP_ABI="armeabi-v7a arm64-v8a x86 x86_64" \ APP_ABI="armeabi-v7a arm64-v8a x86 x86_64" \
APP_PLATFORM=android-16 \ APP_PLATFORM=android-14 \
APP_MODULES="SDL2 SDL2_main" \ APP_MODULES="SDL2 SDL2_main" \
$ndk_args $ndk_args

View file

@ -7404,8 +7404,11 @@ func_mode_link ()
# Darwin ld doesn't like 0 for these options... # Darwin ld doesn't like 0 for these options...
func_arith $current + 1 func_arith $current + 1
minor_current=$func_arith_result minor_current=$func_arith_result
xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" #xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" #verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
# make the compatibility version match the Xcode project files, i.e. 1.0
xlcverstring="${wl}-compatibility_version 1.0 ${wl}-current_version ${wl}$minor_current.$revision"
verstring="-compatibility_version 1.0 -current_version $minor_current.$revision"
;; ;;
freebsd-aout) freebsd-aout)

View file

@ -1,42 +0,0 @@
#!/bin/bash
# This is the script buildbot.libsdl.org uses to cross-compile SDL2 from
# x86 Linux to OS/2, using OpenWatcom.
# The final zipfile can be unpacked on any machine that supports OpenWatcom
# (Windows, Linux, OS/2, etc). Point the compiler at the include directory
# and link against the SDL2.lib file. Ship the SDL2.dll with your app.
if [ -z "$WATCOM" ]; then
echo "This script expects \$WATCOM to be set to the OpenWatcom install dir." 1>&2
echo "This is often something like '/usr/local/share/watcom'" 1>&2
exit 1
fi
export PATH="$WATCOM/binl:$PATH"
ZIPFILE="$1"
if [ -z $1 ]; then
ZIPFILE=sdl-os2.zip
fi
ZIPDIR=SDL2-os2
set -e
set -x
cd `dirname "$0"`
cd ..
rm -f $ZIPFILE
wmake -f Makefile.os2
rm -rf $ZIPDIR
mkdir $ZIPDIR
chmod a+r SDL2.lib SDL2.dll
mv SDL2.lib SDL2.dll $ZIPDIR/
cp -R include $ZIPDIR/
zip -9r "$ZIPFILE" $ZIPDIR
wmake -f Makefile.os2 distclean
set +x
echo "All done. Final installable is in $ZIPFILE ...";

View file

@ -42,7 +42,7 @@ SYSROOT="/opt/rpi-sysroot"
export CC="ccache /opt/rpi-tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc --sysroot=$SYSROOT -I$SYSROOT/opt/vc/include -I$SYSROOT/usr/include -I$SYSROOT/opt/vc/include/interface/vcos/pthreads -I$SYSROOT/opt/vc/include/interface/vmcs_host/linux -L$SYSROOT/opt/vc/lib" export CC="ccache /opt/rpi-tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc --sysroot=$SYSROOT -I$SYSROOT/opt/vc/include -I$SYSROOT/usr/include -I$SYSROOT/opt/vc/include/interface/vcos/pthreads -I$SYSROOT/opt/vc/include/interface/vmcs_host/linux -L$SYSROOT/opt/vc/lib"
# -L$SYSROOT/usr/lib/arm-linux-gnueabihf" # -L$SYSROOT/usr/lib/arm-linux-gnueabihf"
# !!! FIXME: shouldn't have to --disable-* things here. # !!! FIXME: shouldn't have to --disable-* things here.
../configure --with-sysroot=$SYSROOT --host=arm-raspberry-linux-gnueabihf --prefix=$PWD/rpi-sdl2-installed --disable-pulseaudio --disable-esd --disable-video-wayland ../configure --with-sysroot=$SYSROOT --host=arm-raspberry-linux-gnueabihf --prefix=$PWD/rpi-sdl2-installed --disable-pulseaudio --disable-esd --disable-video-mir --disable-video-wayland
$MAKE $MAKE
$MAKE install $MAKE install
# Fix up a few things to a real install path on a real Raspberry Pi... # Fix up a few things to a real install path on a real Raspberry Pi...

View file

@ -39,7 +39,7 @@
# #
# Base version of SDL, used for packaging purposes # Base version of SDL, used for packaging purposes
$SDLVersion = "2.0.12" $SDLVersion = "2.0.9"
# Gets the .bat file that sets up an MSBuild environment, given one of # Gets the .bat file that sets up an MSBuild environment, given one of
# Visual Studio's, "PlatformToolset"s. # Visual Studio's, "PlatformToolset"s.

View file

@ -564,6 +564,46 @@ macro(CheckX11)
endif() endif()
endmacro() endmacro()
# Requires:
# - EGL
# - PkgCheckModules
# Optional:
# - MIR_SHARED opt
# - HAVE_DLOPEN opt
macro(CheckMir)
if(VIDEO_MIR)
find_library(MIR_LIB mirclient mircommon egl)
pkg_check_modules(MIR_TOOLKIT mirclient>=0.26 mircommon)
pkg_check_modules(EGL egl)
pkg_check_modules(XKB xkbcommon)
if (MIR_LIB AND MIR_TOOLKIT_FOUND AND EGL_FOUND AND XKB_FOUND)
set(HAVE_VIDEO_MIR TRUE)
set(HAVE_SDL_VIDEO TRUE)
file(GLOB MIR_SOURCES ${SDL2_SOURCE_DIR}/src/video/mir/*.c)
set(SOURCE_FILES ${SOURCE_FILES} ${MIR_SOURCES})
set(SDL_VIDEO_DRIVER_MIR 1)
list(APPEND EXTRA_CFLAGS ${MIR_TOOLKIT_CFLAGS} ${EGL_CFLAGS} ${XKB_CFLAGS})
if(MIR_SHARED)
if(NOT HAVE_DLOPEN)
message_warn("You must have SDL_LoadObject() support for dynamic Mir loading")
else()
FindLibraryAndSONAME(mirclient)
FindLibraryAndSONAME(xkbcommon)
set(SDL_VIDEO_DRIVER_MIR_DYNAMIC "\"${MIRCLIENT_LIB_SONAME}\"")
set(SDL_VIDEO_DRIVER_MIR_DYNAMIC_XKBCOMMON "\"${XKBCOMMON_LIB_SONAME}\"")
set(HAVE_MIR_SHARED TRUE)
endif()
else()
set(EXTRA_LIBS ${MIR_TOOLKIT_LIBRARIES} ${EXTRA_LIBS})
endif()
endif()
endif()
endmacro()
macro(WaylandProtocolGen _SCANNER _XML _PROTL) macro(WaylandProtocolGen _SCANNER _XML _PROTL)
set(_WAYLAND_PROT_C_CODE "${CMAKE_CURRENT_BINARY_DIR}/wayland-generated-protocols/${_PROTL}-protocol.c") set(_WAYLAND_PROT_C_CODE "${CMAKE_CURRENT_BINARY_DIR}/wayland-generated-protocols/${_PROTL}-protocol.c")
set(_WAYLAND_PROT_H_CODE "${CMAKE_CURRENT_BINARY_DIR}/wayland-generated-protocols/${_PROTL}-client-protocol.h") set(_WAYLAND_PROT_H_CODE "${CMAKE_CURRENT_BINARY_DIR}/wayland-generated-protocols/${_PROTL}-client-protocol.h")
@ -738,6 +778,29 @@ macro(CheckVivante)
endif(VIDEO_VIVANTE) endif(VIDEO_VIVANTE)
endmacro(CheckVivante) endmacro(CheckVivante)
# Requires:
# - n/a
macro(CheckMali)
if(VIDEO_MALI)
check_c_source_compiles("
#define LINUX
#define EGL_API_FB
#include <EGL/egl.h>
int main(int argc, char** argv) {}" HAVE_VIDEO_MALI_EGL_FB)
if(HAVE_VIDEO_MALI_EGL_FB)
set(HAVE_VIDEO_MALI TRUE)
set(HAVE_SDL_VIDEO TRUE)
file(GLOB MALI_SOURCES ${SDL2_SOURCE_DIR}/src/video/mali-fbdev/*.c)
set(SOURCE_FILES ${SOURCE_FILES} ${MALI_SOURCES})
set(SDL_VIDEO_DRIVER_MALI 1)
set(SDL_CFLAGS "${SDL_CFLAGS} -DLINUX -DEGL_API_FB")
list(APPEND EXTRA_LIBS EGL)
endif(HAVE_VIDEO_MALI_EGL_FB)
endif(VIDEO_MALI)
endmacro(CheckMali)
# Requires: # Requires:
# - nada # - nada
macro(CheckOpenGLX11) macro(CheckOpenGLX11)
@ -1065,44 +1128,6 @@ macro(CheckUSBHID)
endif() endif()
endmacro() endmacro()
# Check for HIDAPI joystick drivers. This is currently a Unix thing, not Windows or macOS!
macro(CheckHIDAPI)
if(HIDAPI)
if(HIDAPI_SKIP_LIBUSB)
set(HAVE_HIDAPI TRUE)
else()
set(HAVE_HIDAPI FALSE)
pkg_check_modules(LIBUSB libusb)
if (LIBUSB_FOUND)
check_include_file(libusb.h HAVE_LIBUSB_H ${LIBUSB_CFLAGS})
if (HAVE_LIBUSB_H)
set(HAVE_HIDAPI TRUE)
endif()
endif()
endif()
if(HAVE_HIDAPI)
set(SDL_JOYSTICK_HIDAPI 1)
set(HAVE_SDL_JOYSTICK TRUE)
file(GLOB HIDAPI_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/hidapi/*.c)
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)
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()
endmacro()
# Requires: # Requires:
# - n/a # - n/a
macro(CheckRPI) macro(CheckRPI)

2186
configure vendored

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

18
debian/changelog vendored
View file

@ -1,21 +1,3 @@
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 2019 08:48:47 -0800
libsdl2 (2.0.9) UNRELEASED; urgency=low libsdl2 (2.0.9) UNRELEASED; urgency=low
* Updated SDL to version 2.0.9 * Updated SDL to version 2.0.9

17
debian/control vendored
View file

@ -13,8 +13,6 @@ Build-Depends: debhelper (>= 9),
dpkg-dev (>= 1.16.1~), dpkg-dev (>= 1.16.1~),
fcitx-libs-dev [linux-any], fcitx-libs-dev [linux-any],
libasound2-dev [linux-any], libasound2-dev [linux-any],
libgl1-mesa-dev,
libpulse-dev,
libudev-dev [linux-any], libudev-dev [linux-any],
libdbus-1-dev [linux-any], libdbus-1-dev [linux-any],
libibus-1.0-dev[linux-any], libibus-1.0-dev[linux-any],
@ -30,16 +28,16 @@ Build-Depends: debhelper (>= 9),
libxxf86vm-dev libxxf86vm-dev
Homepage: http://www.libsdl.org/ Homepage: http://www.libsdl.org/
Package: libsdl2 Package: libsdl2-2.0-0
Architecture: any Architecture: any
Multi-Arch: same Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends} Pre-Depends: ${misc:Pre-Depends}
Depends: ${misc:Depends}, Depends: ${misc:Depends},
${shlibs:Depends}, ${shlibs:Depends},
libudev0 [linux-any], libudev0 | libudev1 [linux-any],
libdbus-1-3 [linux-any] libdbus-1-3 [linux-any]
Conflicts: libsdl-1.3-0 Conflicts: libsdl-1.3-0, libsdl2
Replaces: libsdl-1.3-0 Replaces: libsdl-1.3-0, libsdl2
Description: Simple DirectMedia Layer Description: Simple DirectMedia Layer
SDL is a library that allows programs portable low level access to SDL is a library that allows programs portable low level access to
a video framebuffer, audio output, mouse, and keyboard. a video framebuffer, audio output, mouse, and keyboard.
@ -51,9 +49,10 @@ Section: libdevel
Architecture: any Architecture: any
Multi-Arch: same Multi-Arch: same
Depends: ${misc:Depends}, Depends: ${misc:Depends},
libsdl2 (= ${binary:Version}), libsdl2-2.0-0 (= ${binary:Version}),
libc6-dev, libc6-dev,
libgl1-mesa-dev libgl1-mesa-dev,
libx11-dev
Conflicts: libsdl-1.3-dev Conflicts: libsdl-1.3-dev
Replaces: libsdl-1.3-dev Replaces: libsdl-1.3-dev
Description: Simple DirectMedia Layer development files Description: Simple DirectMedia Layer development files
@ -68,7 +67,7 @@ Section: debug
Architecture: any Architecture: any
Multi-Arch: same Multi-Arch: same
Depends: ${misc:Depends}, Depends: ${misc:Depends},
libsdl2 (= ${binary:Version}), libsdl2-2.0-0 (= ${binary:Version}),
Description: Simple DirectMedia Layer debug files Description: Simple DirectMedia Layer debug files
SDL is a library that allows programs portable low level access to a video SDL is a library that allows programs portable low level access to a video
framebuffer, audio output, mouse, and keyboard. framebuffer, audio output, mouse, and keyboard.

12
debian/copyright vendored
View file

@ -4,7 +4,7 @@ Upstream-Contact: Sam Lantinga <slouken@libsdl.org>
Source: http://www.libsdl.org/ Source: http://www.libsdl.org/
Files: * Files: *
Copyright: 1997-2020 Sam Lantinga <slouken@libsdl.org> Copyright: 1997-2018 Sam Lantinga <slouken@libsdl.org>
License: zlib/libpng License: zlib/libpng
Files: src/libm/* Files: src/libm/*
@ -12,7 +12,7 @@ Copyright: 1993 by Sun Microsystems, Inc. All rights reserved.
License: SunPro License: SunPro
Files: src/main/windows/SDL_windows_main.c Files: src/main/windows/SDL_windows_main.c
Copyright: 2020 Sam Lantinga Copyright: 2018 Sam Lantinga
License: PublicDomain_Sam_Lantinga License: PublicDomain_Sam_Lantinga
Comment: SDL_main.c, placed in the public domain by Sam Lantinga 4/13/98 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 License: BrownUn_UnCalifornia_ErikCorry
Files: src/test/SDL_test_md5.c Files: src/test/SDL_test_md5.c
Copyright: 1997-2020 Sam Lantinga <slouken@libsdl.org> Copyright: 1997-2018 Sam Lantinga <slouken@libsdl.org>
1990 RSA Data Security, Inc. 1990 RSA Data Security, Inc.
License: zlib/libpng and RSA_Data_Security License: zlib/libpng and RSA_Data_Security
@ -46,12 +46,12 @@ Copyright: 1994-2003 The XFree86 Project, Inc.
License: MIT/X11 License: MIT/X11
Files: test/testhaptic.c Files: test/testhaptic.c
Copyright: 1997-2020 Sam Lantinga <slouken@libsdl.org> Copyright: 1997-2018 Sam Lantinga <slouken@libsdl.org>
2008 Edgar Simo Serra 2008 Edgar Simo Serra
License: BSD_3_clause License: BSD_3_clause
Files: test/testrumble.c Files: test/testrumble.c
Copyright: 1997-2020 Sam Lantinga <slouken@libsdl.org> Copyright: 1997-2018 Sam Lantinga <slouken@libsdl.org>
2011 Edgar Simo Serra 2011 Edgar Simo Serra
License: BSD_3_clause 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 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Comment: Comment:
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
. .
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages

View file

@ -5,5 +5,4 @@ usr/lib/*/*.la
usr/lib/*/*.so usr/lib/*/*.so
usr/lib/*/pkgconfig/sdl2.pc usr/lib/*/pkgconfig/sdl2.pc
usr/lib/*/cmake/SDL2/sdl2-config.cmake usr/lib/*/cmake/SDL2/sdl2-config.cmake
usr/lib/*/cmake/SDL2/sdl2-config-version.cmake
usr/share/aclocal/sdl2.m4 usr/share/aclocal/sdl2.m4

21
debian/rules vendored
View file

@ -4,22 +4,11 @@ DEB_HOST_ARCH_CPU ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
confflags = --disable-rpath --disable-video-directfb \ confflags = --disable-rpath --disable-video-directfb \
--disable-nas --disable-esd --disable-arts --disable-nas --disable-esd --disable-arts \
--disable-alsa-shared --disable-pulseaudio-shared \
# These flags can be used to create a package directly linking with external libraries and having the appropriate package dependencies --disable-x11-shared --disable-video-opengl --enable-video-opengles --enable-video-mali \
#confflags += --disable-alsa-shared --disable-esd --disable-pulseaudio \
#confflags += --disable-arts-shared --disable-input-tslib
#confflags += --disable-directfb-shared
#confflags += --disable-esd-shared
#confflags += --disable-fusionsound-shared
#confflags += --disable-jack-shared
#confflags += --disable-kmsdrm-shared
#confflags += --disable-libsamplerate-shared
#confflags += --disable-nas-shared
#confflags += --disable-pulseaudio-shared
#confflags += --disable-sndio-shared
#confflags += --disable-wayland-shared
#confflags += --disable-x11-shared
%: %:
dh $@ --parallel dh $@ --parallel

View file

@ -20,7 +20,7 @@ https://developer.android.com/sdk/index.html
Android NDK r15c or later Android NDK r15c or later
https://developer.android.com/tools/sdk/ndk/index.html https://developer.android.com/tools/sdk/ndk/index.html
Minimum API level supported by SDL: 16 (Android 4.1) Minimum API level supported by SDL: 14 (Android 4.0.1)
================================================================================ ================================================================================
@ -82,23 +82,6 @@ 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 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: Here's an explanation of the files in the Android project, so you can customize them:
android-project/app android-project/app
@ -107,12 +90,10 @@ Here's an explanation of the files in the Android project, so you can customize
jni/ - directory holding native code jni/ - directory holding native code
jni/Application.mk - Application JNI settings, including target platform and STL library 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/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/ - (symlink to) directory holding the SDL library files
jni/SDL/Android.mk - Android makefile for creating the SDL shared library jni/SDL/Android.mk - Android makefile for creating the SDL shared library
jni/src/ - directory holding your C/C++ source 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/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/assets/ - directory holding asset files for your application
src/main/res/ - directory holding resources for your application src/main/res/ - directory holding resources for your application
src/main/res/mipmap-* - directories holding icons for different phone hardware src/main/res/mipmap-* - directories holding icons for different phone hardware
@ -193,7 +174,7 @@ http://ponystyle.com/blog/2010/03/26/dealing-with-asset-compression-in-android-a
Pause / Resume behaviour Pause / Resume behaviour
================================================================================ ================================================================================
If SDL_HINT_ANDROID_BLOCK_ON_PAUSE hint is set (the default), If SDL is compiled with SDL_ANDROID_BLOCK_ON_PAUSE defined (the default),
the event loop will block itself when the app is paused (ie, when the user the event loop will block itself when the app is paused (ie, when the user
returns to the main Android dashboard). Blocking is better in terms of battery returns to the main Android dashboard). Blocking is better in terms of battery
use, and it allows your app to spring back to life instantaneously after resume use, and it allows your app to spring back to life instantaneously after resume
@ -399,13 +380,13 @@ https://developer.nvidia.com/tegra-graphics-debugger
================================================================================ ================================================================================
Why is API level 16 the minimum required? Why is API level 14 the minimum required?
================================================================================ ================================================================================
The latest NDK toolchain doesn't support targeting earlier than API level 16. The latest NDK toolchain doesn't support targeting earlier than API level 14.
As of this writing, according to https://developer.android.com/about/dashboards/index.html As of this writing, according to https://developer.android.com/about/dashboards/index.html
about 99% of the Android devices accessing Google Play support API level 16 or about 99% of the Android devices accessing Google Play support API level 14 or
higher (January 2018). higher (October 2017).
================================================================================ ================================================================================
@ -427,24 +408,6 @@ screen each frame.
Reference: http://www.khronos.org/registry/egl/specs/EGLTechNote0001.html Reference: http://www.khronos.org/registry/egl/specs/EGLTechNote0001.html
================================================================================
Ending your application
================================================================================
Two legitimate ways:
- return from your main() function. Java side will automatically terminate the
Activity by calling Activity.finish().
- Android OS can decide to terminate your application by calling onDestroy()
(see Activity life cycle). Your application will receive a SDL_QUIT event you
can handle to save things and quit.
Don't call exit() as it stops the activity badly.
NB: "Back button" can be handled as a SDL_KEYDOWN/UP events, with Keycode
SDLK_AC_BACK, for any purpose.
================================================================================ ================================================================================
Known issues Known issues
================================================================================ ================================================================================

View file

@ -15,7 +15,7 @@ platforms:
* Linux * Linux
* VS.NET 2010 * VS.NET 2010
* MinGW and Msys * MinGW and Msys
* macOS, iOS, and tvOS, with support for XCode * OS X with support for XCode
================================================================================ ================================================================================
@ -30,55 +30,3 @@ Assuming the source for SDL is located at ~/sdl
cmake ../sdl cmake ../sdl
This will build the static and dynamic versions of SDL in the ~/build directory. 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`

View file

@ -25,6 +25,9 @@ fcitx-libs-dev libsamplerate0-dev libsndio-dev
Ubuntu 16.04+ can also add "libwayland-dev libxkbcommon-dev wayland-protocols" Ubuntu 16.04+ can also add "libwayland-dev libxkbcommon-dev wayland-protocols"
to that command line for Wayland support. to that command line for Wayland support.
Ubuntu 16.10 can also add "libmirclient-dev libxkbcommon-dev" to that command
line for Mir support.
NOTES: NOTES:
- This includes all the audio targets except arts, because Ubuntu pulled the - This includes all the audio targets except arts, because Ubuntu pulled the
artsc0-dev package, but in theory SDL still supports it. artsc0-dev package, but in theory SDL still supports it.

View file

@ -100,7 +100,7 @@ You should replace EXE_NAME with the name of the executable. APP_NAME is what
will be visible to the user in the Finder. Usually it will be the same will be visible to the user in the Finder. Usually it will be the same
as EXE_NAME but capitalized. E.g. if EXE_NAME is "testgame" then APP_NAME as EXE_NAME but capitalized. E.g. if EXE_NAME is "testgame" then APP_NAME
usually is "TestGame". You might also want to use `@PACKAGE@` to use the package usually is "TestGame". You might also want to use `@PACKAGE@` to use the package
name as specified in your configure.ac file. name as specified in your configure.in file.
If your project builds more than one application, you will have to do a bit If your project builds more than one application, you will have to do a bit
more. For each of your target applications, you need a separate rule. more. For each of your target applications, you need a separate rule.

View file

@ -13,7 +13,7 @@ There are two basic ways of building SDL at the moment:
1. The "UNIX" way: ./configure; make; make install 1. The "UNIX" way: ./configure; make; make install
If you have a GNUish system, then you might try this. Edit configure.ac, If you have a GNUish system, then you might try this. Edit configure.in,
take a look at the large section labelled: take a look at the large section labelled:
"Set up the configuration based on the host platform!" "Set up the configuration based on the host platform!"

View file

@ -296,7 +296,7 @@ A few files should be included directly in your app's MSVC project, specifically
included, mouse-position reporting may fail if and when the cursor is included, mouse-position reporting may fail if and when the cursor is
hidden, due to possible bugs/design-oddities in Windows itself.* hidden, due to possible bugs/design-oddities in Windows itself.*
To include these files for C/C++ projects: To include these files:
1. right-click on your project (again, in Visual C++'s Solution Explorer), 1. right-click on your project (again, in Visual C++'s Solution Explorer),
navigate to "Add", then choose "Existing Item...". navigate to "Add", then choose "Existing Item...".
@ -313,14 +313,11 @@ To include these files for C/C++ projects:
7. change the setting for "Consume Windows Runtime Extension" to "Yes (/ZW)". 7. change the setting for "Consume Windows Runtime Extension" to "Yes (/ZW)".
8. click the OK button. This will close the dialog. 8. click the OK button. This will close the dialog.
**NOTE: C++/CX compilation is currently required in at least one file of your **NOTE: C++/CX compilation is currently required in at least one file of your
app's project. This is to make sure that Visual C++'s linker builds a 'Windows app's project. This is to make sure that Visual C++'s linker builds a 'Windows
Metadata' file (.winmd) for your app. Not doing so can lead to build errors.** Metadata' file (.winmd) for your app. Not doing so can lead to build errors.**
For non-C++ projects, you will need to call SDL_WinRTRunApp from your language's
main function, and generate SDL2-WinRTResources.res manually by using `rc` via
the Developer Command Prompt and including it as a <Win32Resource> within the
first <PropertyGroup> block in your Visual Studio project file.
### 6. Add app code and assets ### ### 6. Add app code and assets ###

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -47,7 +47,6 @@
#include "SDL_loadso.h" #include "SDL_loadso.h"
#include "SDL_log.h" #include "SDL_log.h"
#include "SDL_messagebox.h" #include "SDL_messagebox.h"
#include "SDL_metal.h"
#include "SDL_mutex.h" #include "SDL_mutex.h"
#include "SDL_power.h" #include "SDL_power.h"
#include "SDL_render.h" #include "SDL_render.h"

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -162,29 +162,12 @@ extern DECLSPEC void SDLCALL SDL_MemoryBarrierAcquireFunction(void);
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("dmb ish" : : : "memory") #define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("dmb ish" : : : "memory")
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("dmb ish" : : : "memory") #define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("dmb ish" : : : "memory")
#elif defined(__GNUC__) && defined(__arm__) #elif defined(__GNUC__) && defined(__arm__)
#if 0 /* defined(__LINUX__) || defined(__ANDROID__) */ #if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7EM__) || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7S__)
/* Information from:
https://chromium.googlesource.com/chromium/chromium/+/trunk/base/atomicops_internals_arm_gcc.h#19
The Linux kernel provides a helper function which provides the right code for a memory barrier,
hard-coded at address 0xffff0fa0
*/
typedef void (*SDL_KernelMemoryBarrierFunc)();
#define SDL_MemoryBarrierRelease() ((SDL_KernelMemoryBarrierFunc)0xffff0fa0)()
#define SDL_MemoryBarrierAcquire() ((SDL_KernelMemoryBarrierFunc)0xffff0fa0)()
#elif 0 /* defined(__QNXNTO__) */
#include <sys/cpuinline.h>
#define SDL_MemoryBarrierRelease() __cpu_membarrier()
#define SDL_MemoryBarrierAcquire() __cpu_membarrier()
#else
#if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7EM__) || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7S__) || defined(__ARM_ARCH_8A__)
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("dmb ish" : : : "memory") #define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("dmb ish" : : : "memory")
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("dmb ish" : : : "memory") #define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("dmb ish" : : : "memory")
#elif defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_5TE__) #elif defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_5TE__)
#ifdef __thumb__ #ifdef __thumb__
/* The mcr instruction isn't available in thumb mode, use real functions */ /* The mcr instruction isn't available in thumb mode, use real functions */
#define SDL_MEMORY_BARRIER_USES_FUNCTION
#define SDL_MemoryBarrierRelease() SDL_MemoryBarrierReleaseFunction() #define SDL_MemoryBarrierRelease() SDL_MemoryBarrierReleaseFunction()
#define SDL_MemoryBarrierAcquire() SDL_MemoryBarrierAcquireFunction() #define SDL_MemoryBarrierAcquire() SDL_MemoryBarrierAcquireFunction()
#else #else
@ -194,7 +177,6 @@ typedef void (*SDL_KernelMemoryBarrierFunc)();
#else #else
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("" : : : "memory") #define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("" : : : "memory")
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("" : : : "memory") #define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("" : : : "memory")
#endif /* __LINUX__ || __ANDROID__ */
#endif /* __GNUC__ && __arm__ */ #endif /* __GNUC__ && __arm__ */
#else #else
#if (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x5120)) #if (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x5120))

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -420,56 +420,23 @@ extern DECLSPEC void SDLCALL SDL_PauseAudioDevice(SDL_AudioDeviceID dev,
/* @} *//* Pause audio functions */ /* @} *//* Pause audio functions */
/** /**
* \brief Load the audio data of a WAVE file into memory * This function loads a WAVE from the data source, automatically freeing
* * that source if \c freesrc is non-zero. For example, to load a WAVE file,
* Loading a WAVE file requires \c src, \c spec, \c audio_buf and \c audio_len * you could do:
* to be valid pointers. The entire data portion of the file is then loaded
* into memory and decoded if necessary.
*
* If \c freesrc is non-zero, the data source gets automatically closed and
* freed before the function returns.
*
* Supported are RIFF WAVE files with the formats PCM (8, 16, 24, and 32 bits),
* IEEE Float (32 bits), Microsoft ADPCM and IMA ADPCM (4 bits), and A-law and
* µ-law (8 bits). Other formats are currently unsupported and cause an error.
*
* If this function succeeds, the pointer returned by it is equal to \c spec
* and the pointer to the audio data allocated by the function is written to
* \c audio_buf and its length in bytes to \c audio_len. The \ref SDL_AudioSpec
* members \c freq, \c channels, and \c format are set to the values of the
* audio data in the buffer. The \c samples member is set to a sane default and
* all others are set to zero.
*
* It's necessary to use SDL_FreeWAV() to free the audio data returned in
* \c audio_buf when it is no longer used.
*
* Because of the underspecification of the Waveform format, there are many
* problematic files in the wild that cause issues with strict decoders. To
* provide compatibility with these files, this decoder is lenient in regards
* to the truncation of the file, the fact chunk, and the size of the RIFF
* chunk. The hints SDL_HINT_WAVE_RIFF_CHUNK_SIZE, SDL_HINT_WAVE_TRUNCATION,
* and SDL_HINT_WAVE_FACT_CHUNK can be used to tune the behavior of the
* loading process.
*
* Any file that is invalid (due to truncation, corruption, or wrong values in
* the headers), too big, or unsupported causes an error. Additionally, any
* critical I/O error from the data source will terminate the loading process
* with an error. The function returns NULL on error and in all cases (with the
* exception of \c src being NULL), an appropriate error message will be set.
*
* It is required that the data source supports seeking.
*
* Example:
* \code * \code
* SDL_LoadWAV_RW(SDL_RWFromFile("sample.wav", "rb"), 1, ...); * SDL_LoadWAV_RW(SDL_RWFromFile("sample.wav", "rb"), 1, ...);
* \endcode * \endcode
* *
* \param src The data source with the WAVE data * If this function succeeds, it returns the given SDL_AudioSpec,
* \param freesrc A integer value that makes the function close the data source if non-zero * filled with the audio data format of the wave data, and sets
* \param spec A pointer filled with the audio format of the audio data * \c *audio_buf to a malloc()'d buffer containing the audio data,
* \param audio_buf A pointer filled with the audio data allocated by the function * and sets \c *audio_len to the length of that audio buffer, in bytes.
* \param audio_len A pointer filled with the length of the audio data buffer in bytes * You need to free the audio buffer with SDL_FreeWAV() when you are
* \return NULL on error, or non-NULL on success. * done with it.
*
* This function returns NULL and sets the SDL error message if the
* wave file cannot be opened, uses an unknown data format, or is
* corrupt. Currently raw and MS-ADPCM WAVE files are supported.
*/ */
extern DECLSPEC SDL_AudioSpec *SDLCALL SDL_LoadWAV_RW(SDL_RWops * src, extern DECLSPEC SDL_AudioSpec *SDLCALL SDL_LoadWAV_RW(SDL_RWops * src,
int freesrc, int freesrc,

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -101,15 +101,6 @@ SDL_MostSignificantBitIndex32(Uint32 x)
#endif #endif
} }
SDL_FORCE_INLINE SDL_bool
SDL_HasExactlyOneBitSet32(Uint32 x)
{
if (x && !(x & (x - 1))) {
return SDL_TRUE;
}
return SDL_FALSE;
}
/* Ends C function definitions when using C++ */ /* Ends C function definitions when using C++ */
#ifdef __cplusplus #ifdef __cplusplus
} }

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -50,9 +50,6 @@ typedef enum
SDL_BLENDMODE_MOD = 0x00000004, /**< color modulate SDL_BLENDMODE_MOD = 0x00000004, /**< color modulate
dstRGB = srcRGB * dstRGB dstRGB = srcRGB * dstRGB
dstA = dstA */ dstA = dstA */
SDL_BLENDMODE_MUL = 0x00000008, /**< color multiply
dstRGB = (srcRGB * dstRGB) + (dstRGB * (1-srcA))
dstA = (srcA * dstA) + (dstA * (1-srcA)) */
SDL_BLENDMODE_INVALID = 0x7FFFFFFF SDL_BLENDMODE_INVALID = 0x7FFFFFFF
/* Additional custom blend modes can be returned by SDL_ComposeCustomBlendMode() */ /* Additional custom blend modes can be returned by SDL_ComposeCustomBlendMode() */
@ -93,12 +90,12 @@ typedef enum
/** /**
* \brief Create a custom blend mode, which may or may not be supported by a given renderer * \brief Create a custom blend mode, which may or may not be supported by a given renderer
* *
* \param srcColorFactor source color factor * \param srcColorFactor
* \param dstColorFactor destination color factor * \param dstColorFactor
* \param colorOperation color operation * \param colorOperation
* \param srcAlphaFactor source alpha factor * \param srcAlphaFactor
* \param dstAlphaFactor destination alpha factor * \param dstAlphaFactor
* \param alphaOperation alpha operation * \param alphaOperation
* *
* The result of the blend mode operation will be: * The result of the blend mode operation will be:
* dstRGB = dstRGB * dstColorFactor colorOperation srcRGB * srcColorFactor * dstRGB = dstRGB * dstColorFactor colorOperation srcRGB * srcColorFactor

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages

View file

@ -1,6 +1,7 @@
/* include/SDL_config.h. Generated from SDL_config.h.in by configure. */
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -22,34 +23,400 @@
#ifndef SDL_config_h_ #ifndef SDL_config_h_
#define SDL_config_h_ #define SDL_config_h_
#include "SDL_platform.h"
/** /**
* \file SDL_config.h * \file SDL_config.h.in
*
* This is a set of defines to configure the SDL features
*/ */
/* Add any platform that doesn't build using the configure system. */ /* General platform specific identifiers */
#if defined(__WIN32__) #include "SDL_platform.h"
#include "SDL_config_windows.h"
#elif defined(__WINRT__)
#include "SDL_config_winrt.h"
#elif defined(__MACOSX__)
#include "SDL_config_macosx.h"
#elif defined(__IPHONEOS__)
#include "SDL_config_iphoneos.h"
#elif defined(__ANDROID__)
#include "SDL_config_android.h"
#elif defined(__PSP__)
#include "SDL_config_psp.h"
#elif defined(__OS2__)
#include "SDL_config_os2.h"
#else
/* This is a minimal configuration just to get SDL running on new platforms. */
#include "SDL_config_minimal.h"
#endif /* platform config */
#ifdef USING_GENERATED_CONFIG_H /* Make sure that this isn't included by Visual C++ */
#error Wrong SDL_config.h, check your include path? #ifdef _MSC_VER
#error You should run hg revert SDL_config.h
#endif #endif
/* C language features */
/* #undef const */
/* #undef inline */
/* #undef volatile */
/* C datatypes */
#ifdef __LP64__
#define SIZEOF_VOIDP 8
#else
#define SIZEOF_VOIDP 4
#endif
#define HAVE_GCC_ATOMICS 1
/* #undef HAVE_GCC_SYNC_LOCK_TEST_AND_SET */
/* Comment this if you want to build without any C library requirements */
#define HAVE_LIBC 1
#if HAVE_LIBC
/* Useful headers */
#define STDC_HEADERS 1
#define HAVE_ALLOCA_H 1
#define HAVE_CTYPE_H 1
#define HAVE_FLOAT_H 1
#define HAVE_ICONV_H 1
#define HAVE_INTTYPES_H 1
#define HAVE_LIMITS_H 1
#define HAVE_MALLOC_H 1
#define HAVE_MATH_H 1
#define HAVE_MEMORY_H 1
#define HAVE_SIGNAL_H 1
#define HAVE_STDARG_H 1
#define HAVE_STDINT_H 1
#define HAVE_STDIO_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRINGS_H 1
#define HAVE_STRING_H 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_WCHAR_H 1
/* #undef HAVE_PTHREAD_NP_H */
/* #undef HAVE_LIBUNWIND_H */
/* C library functions */
#define HAVE_MALLOC 1
#define HAVE_CALLOC 1
#define HAVE_REALLOC 1
#define HAVE_FREE 1
#define HAVE_ALLOCA 1
#ifndef __WIN32__ /* Don't use C runtime versions of these on Windows */
#define HAVE_GETENV 1
#define HAVE_SETENV 1
#define HAVE_PUTENV 1
#define HAVE_UNSETENV 1
#endif
#define HAVE_QSORT 1
#define HAVE_ABS 1
#define HAVE_BCOPY 1
#define HAVE_MEMSET 1
#define HAVE_MEMCPY 1
#define HAVE_MEMMOVE 1
#define HAVE_MEMCMP 1
#define HAVE_WCSLEN 1
/* #undef HAVE_WCSLCPY */
/* #undef HAVE_WCSLCAT */
#define HAVE_WCSCMP 1
#define HAVE_STRLEN 1
/* #undef HAVE_STRLCPY */
/* #undef HAVE_STRLCAT */
/* #undef HAVE__STRREV */
/* #undef HAVE__STRUPR */
/* #undef HAVE__STRLWR */
/* #undef HAVE_INDEX */
/* #undef HAVE_RINDEX */
#define HAVE_STRCHR 1
#define HAVE_STRRCHR 1
#define HAVE_STRSTR 1
/* #undef HAVE_ITOA */
/* #undef HAVE__LTOA */
/* #undef HAVE__UITOA */
/* #undef HAVE__ULTOA */
#define HAVE_STRTOL 1
#define HAVE_STRTOUL 1
/* #undef HAVE__I64TOA */
/* #undef HAVE__UI64TOA */
#define HAVE_STRTOLL 1
#define HAVE_STRTOULL 1
#define HAVE_STRTOD 1
#define HAVE_ATOI 1
#define HAVE_ATOF 1
#define HAVE_STRCMP 1
#define HAVE_STRNCMP 1
/* #undef HAVE__STRICMP */
#define HAVE_STRCASECMP 1
/* #undef HAVE__STRNICMP */
#define HAVE_STRNCASECMP 1
/* #undef HAVE_SSCANF */
#define HAVE_VSSCANF 1
/* #undef HAVE_SNPRINTF */
#define HAVE_VSNPRINTF 1
#define HAVE_M_PI /**/
#define HAVE_ACOS 1
#define HAVE_ACOSF 1
#define HAVE_ASIN 1
#define HAVE_ASINF 1
#define HAVE_ATAN 1
#define HAVE_ATANF 1
#define HAVE_ATAN2 1
#define HAVE_ATAN2F 1
#define HAVE_CEIL 1
#define HAVE_CEILF 1
#define HAVE_COPYSIGN 1
#define HAVE_COPYSIGNF 1
#define HAVE_COS 1
#define HAVE_COSF 1
#define HAVE_EXP 1
#define HAVE_EXPF 1
#define HAVE_FABS 1
#define HAVE_FABSF 1
#define HAVE_FLOOR 1
#define HAVE_FLOORF 1
#define HAVE_FMOD 1
#define HAVE_FMODF 1
#define HAVE_LOG 1
#define HAVE_LOGF 1
#define HAVE_LOG10 1
#define HAVE_LOG10F 1
#define HAVE_POW 1
#define HAVE_POWF 1
#define HAVE_SCALBN 1
#define HAVE_SCALBNF 1
#define HAVE_SIN 1
#define HAVE_SINF 1
#define HAVE_SQRT 1
#define HAVE_SQRTF 1
#define HAVE_TAN 1
#define HAVE_TANF 1
#define HAVE_FOPEN64 1
#define HAVE_FSEEKO 1
#define HAVE_FSEEKO64 1
#define HAVE_SIGACTION 1
#define HAVE_SA_SIGACTION 1
#define HAVE_SETJMP 1
#define HAVE_NANOSLEEP 1
#define HAVE_SYSCONF 1
/* #undef HAVE_SYSCTLBYNAME */
#define HAVE_CLOCK_GETTIME 1
/* #undef HAVE_GETPAGESIZE */
#define HAVE_MPROTECT 1
#define HAVE_ICONV 1
#define HAVE_PTHREAD_SETNAME_NP 1
/* #undef HAVE_PTHREAD_SET_NAME_NP */
#define HAVE_SEM_TIMEDWAIT 1
#define HAVE_GETAUXVAL 1
#define HAVE_POLL 1
#else
#define HAVE_STDARG_H 1
#define HAVE_STDDEF_H 1
#define HAVE_STDINT_H 1
#endif /* HAVE_LIBC */
/* #undef HAVE_ALTIVEC_H */
#define HAVE_DBUS_DBUS_H 1
/* #undef HAVE_FCITX_FRONTEND_H */
/* #undef HAVE_IBUS_IBUS_H */
#define HAVE_IMMINTRIN_H 1
/* #undef HAVE_LIBSAMPLERATE_H */
#define HAVE_LIBUDEV_H 1
/* #undef HAVE_DDRAW_H */
/* #undef HAVE_DINPUT_H */
/* #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 */
/* #undef HAVE_XINPUT_STATE_EX */
/* SDL internal assertion support */
/* #undef SDL_DEFAULT_ASSERT_LEVEL */
/* Allow disabling of core subsystems */
/* #undef SDL_ATOMIC_DISABLED */
/* #undef SDL_AUDIO_DISABLED */
/* #undef SDL_CPUINFO_DISABLED */
/* #undef SDL_EVENTS_DISABLED */
/* #undef SDL_FILE_DISABLED */
/* #undef SDL_JOYSTICK_DISABLED */
/* #undef SDL_HAPTIC_DISABLED */
/* #undef SDL_SENSOR_DISABLED */
/* #undef SDL_LOADSO_DISABLED */
/* #undef SDL_RENDER_DISABLED */
/* #undef SDL_THREADS_DISABLED */
/* #undef SDL_TIMERS_DISABLED */
/* #undef SDL_VIDEO_DISABLED */
/* #undef SDL_POWER_DISABLED */
/* #undef SDL_FILESYSTEM_DISABLED */
/* Enable various audio drivers */
#define SDL_AUDIO_DRIVER_ALSA 1
/* #undef SDL_AUDIO_DRIVER_ALSA_DYNAMIC */
/* #undef SDL_AUDIO_DRIVER_ANDROID */
/* #undef SDL_AUDIO_DRIVER_ARTS */
/* #undef SDL_AUDIO_DRIVER_ARTS_DYNAMIC */
/* #undef SDL_AUDIO_DRIVER_COREAUDIO */
/* #undef SDL_AUDIO_DRIVER_DISK */
/* #undef SDL_AUDIO_DRIVER_DSOUND */
#define SDL_AUDIO_DRIVER_DUMMY 1
/* #undef SDL_AUDIO_DRIVER_EMSCRIPTEN */
/* #undef SDL_AUDIO_DRIVER_ESD */
/* #undef SDL_AUDIO_DRIVER_ESD_DYNAMIC */
/* #undef SDL_AUDIO_DRIVER_FUSIONSOUND */
/* #undef SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC */
/* #undef SDL_AUDIO_DRIVER_HAIKU */
/* #undef SDL_AUDIO_DRIVER_JACK */
/* #undef SDL_AUDIO_DRIVER_JACK_DYNAMIC */
/* #undef SDL_AUDIO_DRIVER_NACL */
/* #undef SDL_AUDIO_DRIVER_NAS */
/* #undef SDL_AUDIO_DRIVER_NAS_DYNAMIC */
/* #undef SDL_AUDIO_DRIVER_NETBSD */
/* #undef SDL_AUDIO_DRIVER_OSS */
/* #undef SDL_AUDIO_DRIVER_OSS_SOUNDCARD_H */
/* #undef SDL_AUDIO_DRIVER_PAUDIO */
#define SDL_AUDIO_DRIVER_PULSEAUDIO 1
#define SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC "libpulse-simple.so.0"
/* #undef SDL_AUDIO_DRIVER_QSA */
#define SDL_AUDIO_DRIVER_SNDIO 1
/* #undef SDL_AUDIO_DRIVER_SNDIO_DYNAMIC */
/* #undef SDL_AUDIO_DRIVER_SUNAUDIO */
/* #undef SDL_AUDIO_DRIVER_WASAPI */
/* #undef SDL_AUDIO_DRIVER_WINMM */
/* Enable various input drivers */
#define SDL_INPUT_LINUXEV 1
#define SDL_INPUT_LINUXKD 1
/* #undef SDL_INPUT_TSLIB */
/* #undef SDL_JOYSTICK_HAIKU */
/* #undef SDL_JOYSTICK_DINPUT */
/* #undef SDL_JOYSTICK_XINPUT */
/* #undef SDL_JOYSTICK_DUMMY */
/* #undef SDL_JOYSTICK_IOKIT */
#define SDL_JOYSTICK_LINUX 1
/* #undef SDL_JOYSTICK_ANDROID */
/* #undef SDL_JOYSTICK_WINMM */
/* #undef SDL_JOYSTICK_USBHID */
/* #undef SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H */
/* #undef SDL_JOYSTICK_HIDAPI */
/* #undef SDL_JOYSTICK_EMSCRIPTEN */
/* #undef SDL_HAPTIC_DUMMY */
/* #undef SDL_HAPTIC_ANDROID */
#define SDL_HAPTIC_LINUX 1
/* #undef SDL_HAPTIC_IOKIT */
/* #undef SDL_HAPTIC_DINPUT */
/* #undef SDL_HAPTIC_XINPUT */
/* Enable various sensor drivers */
/* #undef SDL_SENSOR_ANDROID */
#define SDL_SENSOR_DUMMY 1
/* Enable various shared object loading systems */
#define SDL_LOADSO_DLOPEN 1
/* #undef SDL_LOADSO_DUMMY */
/* #undef SDL_LOADSO_LDG */
/* #undef SDL_LOADSO_WINDOWS */
/* Enable various threading systems */
#define SDL_THREAD_PTHREAD 1
#define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX 1
/* #undef SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP */
/* #undef SDL_THREAD_WINDOWS */
/* Enable various timer systems */
/* #undef SDL_TIMER_HAIKU */
/* #undef SDL_TIMER_DUMMY */
#define SDL_TIMER_UNIX 1
/* #undef SDL_TIMER_WINDOWS */
/* Enable various video drivers */
/* #undef SDL_VIDEO_DRIVER_HAIKU */
/* #undef SDL_VIDEO_DRIVER_COCOA */
/* #undef SDL_VIDEO_DRIVER_DIRECTFB */
/* #undef SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC */
#define SDL_VIDEO_DRIVER_DUMMY 1
/* #undef SDL_VIDEO_DRIVER_WINDOWS */
/* #undef SDL_VIDEO_DRIVER_WAYLAND */
/* #undef SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH */
/* #undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC */
/* #undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_EGL */
/* #undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_CURSOR */
/* #undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON */
/* #undef SDL_VIDEO_DRIVER_MIR */
/* #undef SDL_VIDEO_DRIVER_MIR_DYNAMIC */
/* #undef SDL_VIDEO_DRIVER_MIR_DYNAMIC_XKBCOMMON */
#define SDL_VIDEO_DRIVER_X11 1
/* #undef SDL_VIDEO_DRIVER_RPI */
/* #undef SDL_VIDEO_DRIVER_KMSDRM */
/* #undef SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC */
/* #undef SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC_GBM */
/* #undef SDL_VIDEO_DRIVER_ANDROID */
/* #undef SDL_VIDEO_DRIVER_EMSCRIPTEN */
/* #undef SDL_VIDEO_DRIVER_MALI */
#define SDL_VIDEO_DRIVER_X11_DYNAMIC "libX11.so.6"
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT "libXext.so.6"
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XCURSOR "libXcursor.so.1"
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA "libXinerama.so.1"
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2 "libXi.so.6"
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR "libXrandr.so.2"
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS "libXss.so.1"
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE "libXxf86vm.so.1"
#define SDL_VIDEO_DRIVER_X11_XCURSOR 1
#define SDL_VIDEO_DRIVER_X11_XDBE 1
#define SDL_VIDEO_DRIVER_X11_XINERAMA 1
#define SDL_VIDEO_DRIVER_X11_XINPUT2 1
#define SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH 1
#define SDL_VIDEO_DRIVER_X11_XRANDR 1
#define SDL_VIDEO_DRIVER_X11_XSCRNSAVER 1
#define SDL_VIDEO_DRIVER_X11_XSHAPE 1
#define SDL_VIDEO_DRIVER_X11_XVIDMODE 1
#define SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS 1
#define SDL_VIDEO_DRIVER_X11_CONST_PARAM_XEXTADDDISPLAY 1
#define SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM 1
/* #undef SDL_VIDEO_DRIVER_NACL */
/* #undef SDL_VIDEO_DRIVER_VIVANTE */
/* #undef SDL_VIDEO_DRIVER_VIVANTE_VDK */
/* #undef SDL_VIDEO_DRIVER_QNX */
/* #undef SDL_VIDEO_RENDER_D3D */
/* #undef SDL_VIDEO_RENDER_D3D11 */
#define SDL_VIDEO_RENDER_OGL 1
/* #undef SDL_VIDEO_RENDER_OGL_ES */
#define SDL_VIDEO_RENDER_OGL_ES2 1
/* #undef SDL_VIDEO_RENDER_DIRECTFB */
/* #undef SDL_VIDEO_RENDER_METAL */
/* Enable OpenGL support */
#define SDL_VIDEO_OPENGL 1
/* #undef SDL_VIDEO_OPENGL_ES */
#define SDL_VIDEO_OPENGL_ES2 1
/* #undef SDL_VIDEO_OPENGL_BGL */
/* #undef SDL_VIDEO_OPENGL_CGL */
#define SDL_VIDEO_OPENGL_EGL 1
#define SDL_VIDEO_OPENGL_GLX 1
/* #undef SDL_VIDEO_OPENGL_WGL */
/* #undef SDL_VIDEO_OPENGL_OSMESA */
/* #undef SDL_VIDEO_OPENGL_OSMESA_DYNAMIC */
/* Enable Vulkan support */
/* #undef SDL_VIDEO_VULKAN */
/* Enable system power support */
#define SDL_POWER_LINUX 1
/* #undef SDL_POWER_WINDOWS */
/* #undef SDL_POWER_MACOSX */
/* #undef SDL_POWER_HAIKU */
/* #undef SDL_POWER_ANDROID */
/* #undef SDL_POWER_EMSCRIPTEN */
/* #undef SDL_POWER_HARDWIRED */
/* Enable system filesystem support */
/* #undef SDL_FILESYSTEM_HAIKU */
/* #undef SDL_FILESYSTEM_COCOA */
/* #undef SDL_FILESYSTEM_DUMMY */
#define SDL_FILESYSTEM_UNIX 1
/* #undef SDL_FILESYSTEM_WINDOWS */
/* #undef SDL_FILESYSTEM_NACL */
/* #undef SDL_FILESYSTEM_ANDROID */
/* #undef SDL_FILESYSTEM_EMSCRIPTEN */
/* Enable assembly routines */
#define SDL_ASSEMBLY_ROUTINES 1
/* #undef SDL_ALTIVEC_BLITTERS */
/* Enable ime support */
/* #undef SDL_USE_IME */
/* Enable dynamic udev support */
#define SDL_UDEV_DYNAMIC "libudev.so.1"
/* Enable dynamic libsamplerate support */
/* #undef SDL_LIBSAMPLERATE_DYNAMIC */
#endif /* SDL_config_h_ */ #endif /* SDL_config_h_ */

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -96,10 +96,7 @@
#cmakedefine HAVE_WCSLEN 1 #cmakedefine HAVE_WCSLEN 1
#cmakedefine HAVE_WCSLCPY 1 #cmakedefine HAVE_WCSLCPY 1
#cmakedefine HAVE_WCSLCAT 1 #cmakedefine HAVE_WCSLCAT 1
#cmakedefine HAVE_WCSDUP 1
#cmakedefine HAVE_WCSSTR 1
#cmakedefine HAVE_WCSCMP 1 #cmakedefine HAVE_WCSCMP 1
#cmakedefine HAVE_WCSNCMP 1
#cmakedefine HAVE_STRLEN 1 #cmakedefine HAVE_STRLEN 1
#cmakedefine HAVE_STRLCPY 1 #cmakedefine HAVE_STRLCPY 1
#cmakedefine HAVE_STRLCAT 1 #cmakedefine HAVE_STRLCAT 1
@ -111,8 +108,6 @@
#cmakedefine HAVE_STRCHR 1 #cmakedefine HAVE_STRCHR 1
#cmakedefine HAVE_STRRCHR 1 #cmakedefine HAVE_STRRCHR 1
#cmakedefine HAVE_STRSTR 1 #cmakedefine HAVE_STRSTR 1
#cmakedefine HAVE_STRTOK_R 1
#cmakedefine HAVE_STRTOK_S 1
#cmakedefine HAVE_ITOA 1 #cmakedefine HAVE_ITOA 1
#cmakedefine HAVE__LTOA 1 #cmakedefine HAVE__LTOA 1
#cmakedefine HAVE__UITOA 1 #cmakedefine HAVE__UITOA 1
@ -132,7 +127,6 @@
#cmakedefine HAVE_STRCASECMP 1 #cmakedefine HAVE_STRCASECMP 1
#cmakedefine HAVE__STRNICMP 1 #cmakedefine HAVE__STRNICMP 1
#cmakedefine HAVE_STRNCASECMP 1 #cmakedefine HAVE_STRNCASECMP 1
#cmakedefine HAVE_SSCANF 1
#cmakedefine HAVE_VSSCANF 1 #cmakedefine HAVE_VSSCANF 1
#cmakedefine HAVE_VSNPRINTF 1 #cmakedefine HAVE_VSNPRINTF 1
#cmakedefine HAVE_M_PI 1 #cmakedefine HAVE_M_PI 1
@ -190,7 +184,6 @@
#cmakedefine HAVE_SEM_TIMEDWAIT 1 #cmakedefine HAVE_SEM_TIMEDWAIT 1
#cmakedefine HAVE_GETAUXVAL 1 #cmakedefine HAVE_GETAUXVAL 1
#cmakedefine HAVE_POLL 1 #cmakedefine HAVE_POLL 1
#cmakedefine HAVE__EXIT 1
#elif __WIN32__ #elif __WIN32__
#cmakedefine HAVE_STDARG_H 1 #cmakedefine HAVE_STDARG_H 1
@ -217,6 +210,7 @@
#cmakedefine HAVE_XINPUT_H @HAVE_XINPUT_H@ #cmakedefine HAVE_XINPUT_H @HAVE_XINPUT_H@
#cmakedefine HAVE_DXGI_H @HAVE_DXGI_H@ #cmakedefine HAVE_DXGI_H @HAVE_DXGI_H@
#cmakedefine HAVE_ENDPOINTVOLUME_H @HAVE_ENDPOINTVOLUME_H@
#cmakedefine HAVE_MMDEVICEAPI_H @HAVE_MMDEVICEAPI_H@ #cmakedefine HAVE_MMDEVICEAPI_H @HAVE_MMDEVICEAPI_H@
#cmakedefine HAVE_AUDIOCLIENT_H @HAVE_AUDIOCLIENT_H@ #cmakedefine HAVE_AUDIOCLIENT_H @HAVE_AUDIOCLIENT_H@
@ -291,7 +285,6 @@
#cmakedefine SDL_JOYSTICK_WINMM @SDL_JOYSTICK_WINMM@ #cmakedefine SDL_JOYSTICK_WINMM @SDL_JOYSTICK_WINMM@
#cmakedefine SDL_JOYSTICK_USBHID @SDL_JOYSTICK_USBHID@ #cmakedefine SDL_JOYSTICK_USBHID @SDL_JOYSTICK_USBHID@
#cmakedefine SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H @SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H@ #cmakedefine SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H @SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H@
#cmakedefine SDL_JOYSTICK_HIDAPI @SDL_JOYSTICK_HIDAPI@
#cmakedefine SDL_JOYSTICK_EMSCRIPTEN @SDL_JOYSTICK_EMSCRIPTEN@ #cmakedefine SDL_JOYSTICK_EMSCRIPTEN @SDL_JOYSTICK_EMSCRIPTEN@
#cmakedefine SDL_HAPTIC_DUMMY @SDL_HAPTIC_DUMMY@ #cmakedefine SDL_HAPTIC_DUMMY @SDL_HAPTIC_DUMMY@
#cmakedefine SDL_HAPTIC_LINUX @SDL_HAPTIC_LINUX@ #cmakedefine SDL_HAPTIC_LINUX @SDL_HAPTIC_LINUX@
@ -299,11 +292,9 @@
#cmakedefine SDL_HAPTIC_DINPUT @SDL_HAPTIC_DINPUT@ #cmakedefine SDL_HAPTIC_DINPUT @SDL_HAPTIC_DINPUT@
#cmakedefine SDL_HAPTIC_XINPUT @SDL_HAPTIC_XINPUT@ #cmakedefine SDL_HAPTIC_XINPUT @SDL_HAPTIC_XINPUT@
#cmakedefine SDL_HAPTIC_ANDROID @SDL_HAPTIC_ANDROID@ #cmakedefine SDL_HAPTIC_ANDROID @SDL_HAPTIC_ANDROID@
#cmakedefine SDL_LIBUSB_DYNAMIC @SDL_LIBUSB_DYNAMIC@
/* Enable various sensor drivers */ /* Enable various sensor drivers */
#cmakedefine SDL_SENSOR_ANDROID @SDL_SENSOR_ANDROID@ #cmakedefine SDL_SENSOR_ANDROID @SDL_SENSOR_ANDROID@
#cmakedefine SDL_SENSOR_COREMOTION @SDL_SENSOR_COREMOTION@
#cmakedefine SDL_SENSOR_DUMMY @SDL_SENSOR_DUMMY@ #cmakedefine SDL_SENSOR_DUMMY @SDL_SENSOR_DUMMY@
/* Enable various shared object loading systems */ /* Enable various shared object loading systems */
@ -329,16 +320,15 @@
#cmakedefine SDL_VIDEO_DRIVER_ANDROID @SDL_VIDEO_DRIVER_ANDROID@ #cmakedefine SDL_VIDEO_DRIVER_ANDROID @SDL_VIDEO_DRIVER_ANDROID@
#cmakedefine SDL_VIDEO_DRIVER_HAIKU @SDL_VIDEO_DRIVER_HAIKU@ #cmakedefine SDL_VIDEO_DRIVER_HAIKU @SDL_VIDEO_DRIVER_HAIKU@
#cmakedefine SDL_VIDEO_DRIVER_COCOA @SDL_VIDEO_DRIVER_COCOA@ #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 @SDL_VIDEO_DRIVER_DIRECTFB@
#cmakedefine SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC @SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC@ #cmakedefine SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC @SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC@
#cmakedefine SDL_VIDEO_DRIVER_DUMMY @SDL_VIDEO_DRIVER_DUMMY@ #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_WINDOWS @SDL_VIDEO_DRIVER_WINDOWS@
#cmakedefine SDL_VIDEO_DRIVER_WAYLAND @SDL_VIDEO_DRIVER_WAYLAND@ #cmakedefine SDL_VIDEO_DRIVER_WAYLAND @SDL_VIDEO_DRIVER_WAYLAND@
#cmakedefine SDL_VIDEO_DRIVER_RPI @SDL_VIDEO_DRIVER_RPI@ #cmakedefine SDL_VIDEO_DRIVER_RPI @SDL_VIDEO_DRIVER_RPI@
#cmakedefine SDL_VIDEO_DRIVER_VIVANTE @SDL_VIDEO_DRIVER_VIVANTE@ #cmakedefine SDL_VIDEO_DRIVER_VIVANTE @SDL_VIDEO_DRIVER_VIVANTE@
#cmakedefine SDL_VIDEO_DRIVER_VIVANTE_VDK @SDL_VIDEO_DRIVER_VIVANTE_VDK@ #cmakedefine SDL_VIDEO_DRIVER_VIVANTE_VDK @SDL_VIDEO_DRIVER_VIVANTE_VDK@
#cmakedefine SDL_VIDEO_DRIVER_MALI @SDL_VIDEO_DRIVER_MALI@
#cmakedefine SDL_VIDEO_DRIVER_KMSDRM @SDL_VIDEO_DRIVER_KMSDRM@ #cmakedefine SDL_VIDEO_DRIVER_KMSDRM @SDL_VIDEO_DRIVER_KMSDRM@
#cmakedefine SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC @SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC@ #cmakedefine SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC @SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC@
@ -350,6 +340,9 @@
#cmakedefine SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_CURSOR @SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_CURSOR@ #cmakedefine SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_CURSOR @SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_CURSOR@
#cmakedefine SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON @SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON@ #cmakedefine SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON @SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON@
#cmakedefine SDL_VIDEO_DRIVER_MIR @SDL_VIDEO_DRIVER_MIR@
#cmakedefine SDL_VIDEO_DRIVER_MIR_DYNAMIC @SDL_VIDEO_DRIVER_MIR_DYNAMIC@
#cmakedefine SDL_VIDEO_DRIVER_MIR_DYNAMIC_XKBCOMMON @SDL_VIDEO_DRIVER_MIR_DYNAMIC_XKBCOMMON@
#cmakedefine SDL_VIDEO_DRIVER_EMSCRIPTEN @SDL_VIDEO_DRIVER_EMSCRIPTEN@ #cmakedefine SDL_VIDEO_DRIVER_EMSCRIPTEN @SDL_VIDEO_DRIVER_EMSCRIPTEN@
#cmakedefine SDL_VIDEO_DRIVER_X11 @SDL_VIDEO_DRIVER_X11@ #cmakedefine SDL_VIDEO_DRIVER_X11 @SDL_VIDEO_DRIVER_X11@
#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC @SDL_VIDEO_DRIVER_X11_DYNAMIC@ #cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC @SDL_VIDEO_DRIVER_X11_DYNAMIC@
@ -396,15 +389,11 @@
/* Enable Vulkan support */ /* Enable Vulkan support */
#cmakedefine SDL_VIDEO_VULKAN @SDL_VIDEO_VULKAN@ #cmakedefine SDL_VIDEO_VULKAN @SDL_VIDEO_VULKAN@
/* Enable Metal support */
#cmakedefine SDL_VIDEO_METAL @SDL_VIDEO_METAL@
/* Enable system power support */ /* Enable system power support */
#cmakedefine SDL_POWER_ANDROID @SDL_POWER_ANDROID@ #cmakedefine SDL_POWER_ANDROID @SDL_POWER_ANDROID@
#cmakedefine SDL_POWER_LINUX @SDL_POWER_LINUX@ #cmakedefine SDL_POWER_LINUX @SDL_POWER_LINUX@
#cmakedefine SDL_POWER_WINDOWS @SDL_POWER_WINDOWS@ #cmakedefine SDL_POWER_WINDOWS @SDL_POWER_WINDOWS@
#cmakedefine SDL_POWER_MACOSX @SDL_POWER_MACOSX@ #cmakedefine SDL_POWER_MACOSX @SDL_POWER_MACOSX@
#cmakedefine SDL_POWER_UIKIT @SDL_POWER_UIKIT@
#cmakedefine SDL_POWER_HAIKU @SDL_POWER_HAIKU@ #cmakedefine SDL_POWER_HAIKU @SDL_POWER_HAIKU@
#cmakedefine SDL_POWER_EMSCRIPTEN @SDL_POWER_EMSCRIPTEN@ #cmakedefine SDL_POWER_EMSCRIPTEN @SDL_POWER_EMSCRIPTEN@
#cmakedefine SDL_POWER_HARDWIRED @SDL_POWER_HARDWIRED@ #cmakedefine SDL_POWER_HARDWIRED @SDL_POWER_HARDWIRED@
@ -421,16 +410,11 @@
/* Enable assembly routines */ /* Enable assembly routines */
#cmakedefine SDL_ASSEMBLY_ROUTINES @SDL_ASSEMBLY_ROUTINES@ #cmakedefine SDL_ASSEMBLY_ROUTINES @SDL_ASSEMBLY_ROUTINES@
#cmakedefine SDL_ALTIVEC_BLITTERS @SDL_ALTIVEC_BLITTERS@ #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 */ /* Enable dynamic libsamplerate support */
#cmakedefine SDL_LIBSAMPLERATE_DYNAMIC @SDL_LIBSAMPLERATE_DYNAMIC@ #cmakedefine SDL_LIBSAMPLERATE_DYNAMIC @SDL_LIBSAMPLERATE_DYNAMIC@
/* Platform specific definitions */ /* Platform specific definitions */
#cmakedefine SDL_IPHONE_KEYBOARD @SDL_IPHONE_KEYBOARD@
#cmakedefine SDL_IPHONE_LAUNCHSCREEN @SDL_IPHONE_LAUNCHSCREEN@
#if !defined(__WIN32__) #if !defined(__WIN32__)
# if !defined(_STDINT_H_) && !defined(_STDINT_H) && !defined(HAVE_STDINT_H) && !defined(_HAVE_STDINT_H) # if !defined(_STDINT_H_) && !defined(_STDINT_H) && !defined(HAVE_STDINT_H) && !defined(_HAVE_STDINT_H)
typedef unsigned int size_t; typedef unsigned int size_t;

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -99,10 +99,7 @@
#undef HAVE_WCSLEN #undef HAVE_WCSLEN
#undef HAVE_WCSLCPY #undef HAVE_WCSLCPY
#undef HAVE_WCSLCAT #undef HAVE_WCSLCAT
#undef HAVE_WCSDUP
#undef HAVE_WCSSTR
#undef HAVE_WCSCMP #undef HAVE_WCSCMP
#undef HAVE_WCSNCMP
#undef HAVE_STRLEN #undef HAVE_STRLEN
#undef HAVE_STRLCPY #undef HAVE_STRLCPY
#undef HAVE_STRLCAT #undef HAVE_STRLCAT
@ -114,8 +111,6 @@
#undef HAVE_STRCHR #undef HAVE_STRCHR
#undef HAVE_STRRCHR #undef HAVE_STRRCHR
#undef HAVE_STRSTR #undef HAVE_STRSTR
#undef HAVE_STRTOK_R
#undef HAVE_STRTOK_S
#undef HAVE_ITOA #undef HAVE_ITOA
#undef HAVE__LTOA #undef HAVE__LTOA
#undef HAVE__UITOA #undef HAVE__UITOA
@ -194,7 +189,6 @@
#undef HAVE_SEM_TIMEDWAIT #undef HAVE_SEM_TIMEDWAIT
#undef HAVE_GETAUXVAL #undef HAVE_GETAUXVAL
#undef HAVE_POLL #undef HAVE_POLL
#undef HAVE__EXIT
#else #else
#define HAVE_STDARG_H 1 #define HAVE_STDARG_H 1
@ -215,6 +209,7 @@
#undef HAVE_DSOUND_H #undef HAVE_DSOUND_H
#undef HAVE_DXGI_H #undef HAVE_DXGI_H
#undef HAVE_XINPUT_H #undef HAVE_XINPUT_H
#undef HAVE_ENDPOINTVOLUME_H
#undef HAVE_MMDEVICEAPI_H #undef HAVE_MMDEVICEAPI_H
#undef HAVE_AUDIOCLIENT_H #undef HAVE_AUDIOCLIENT_H
#undef HAVE_XINPUT_GAMEPAD_EX #undef HAVE_XINPUT_GAMEPAD_EX
@ -332,6 +327,9 @@
#undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_EGL #undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_EGL
#undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_CURSOR #undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_CURSOR
#undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON #undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON
#undef SDL_VIDEO_DRIVER_MIR
#undef SDL_VIDEO_DRIVER_MIR_DYNAMIC
#undef SDL_VIDEO_DRIVER_MIR_DYNAMIC_XKBCOMMON
#undef SDL_VIDEO_DRIVER_X11 #undef SDL_VIDEO_DRIVER_X11
#undef SDL_VIDEO_DRIVER_RPI #undef SDL_VIDEO_DRIVER_RPI
#undef SDL_VIDEO_DRIVER_KMSDRM #undef SDL_VIDEO_DRIVER_KMSDRM
@ -339,6 +337,7 @@
#undef SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC_GBM #undef SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC_GBM
#undef SDL_VIDEO_DRIVER_ANDROID #undef SDL_VIDEO_DRIVER_ANDROID
#undef SDL_VIDEO_DRIVER_EMSCRIPTEN #undef SDL_VIDEO_DRIVER_EMSCRIPTEN
#undef SDL_VIDEO_DRIVER_MALI
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC #undef SDL_VIDEO_DRIVER_X11_DYNAMIC
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XCURSOR #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XCURSOR
@ -387,9 +386,6 @@
/* Enable Vulkan support */ /* Enable Vulkan support */
#undef SDL_VIDEO_VULKAN #undef SDL_VIDEO_VULKAN
/* Enable Metal support */
#undef SDL_VIDEO_METAL
/* Enable system power support */ /* Enable system power support */
#undef SDL_POWER_LINUX #undef SDL_POWER_LINUX
#undef SDL_POWER_WINDOWS #undef SDL_POWER_WINDOWS
@ -412,8 +408,6 @@
/* Enable assembly routines */ /* Enable assembly routines */
#undef SDL_ASSEMBLY_ROUTINES #undef SDL_ASSEMBLY_ROUTINES
#undef SDL_ALTIVEC_BLITTERS #undef SDL_ALTIVEC_BLITTERS
#undef SDL_ARM_SIMD_BLITTERS
#undef SDL_ARM_NEON_BLITTERS
/* Enable ime support */ /* Enable ime support */
#undef SDL_USE_IME #undef SDL_USE_IME
@ -421,9 +415,6 @@
/* Enable dynamic udev support */ /* Enable dynamic udev support */
#undef SDL_UDEV_DYNAMIC #undef SDL_UDEV_DYNAMIC
/* Enable dynamic libusb support */
#undef SDL_LIBUSB_DYNAMIC
/* Enable dynamic libsamplerate support */ /* Enable dynamic libsamplerate support */
#undef SDL_LIBSAMPLERATE_DYNAMIC #undef SDL_LIBSAMPLERATE_DYNAMIC

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -71,7 +71,6 @@
#define HAVE_STRCHR 1 #define HAVE_STRCHR 1
#define HAVE_STRRCHR 1 #define HAVE_STRRCHR 1
#define HAVE_STRSTR 1 #define HAVE_STRSTR 1
#define HAVE_STRTOK_R 1
#define HAVE_STRTOL 1 #define HAVE_STRTOL 1
#define HAVE_STRTOUL 1 #define HAVE_STRTOUL 1
#define HAVE_STRTOLL 1 #define HAVE_STRTOLL 1
@ -131,7 +130,6 @@
/* Enable various audio drivers */ /* Enable various audio drivers */
#define SDL_AUDIO_DRIVER_ANDROID 1 #define SDL_AUDIO_DRIVER_ANDROID 1
#define SDL_AUDIO_DRIVER_OPENSLES 1
#define SDL_AUDIO_DRIVER_DUMMY 1 #define SDL_AUDIO_DRIVER_DUMMY 1
/* Enable various input drivers */ /* Enable various input drivers */

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -71,7 +71,6 @@
#define HAVE_STRCHR 1 #define HAVE_STRCHR 1
#define HAVE_STRRCHR 1 #define HAVE_STRRCHR 1
#define HAVE_STRSTR 1 #define HAVE_STRSTR 1
#define HAVE_STRTOK_R 1
#define HAVE_STRTOL 1 #define HAVE_STRTOL 1
#define HAVE_STRTOUL 1 #define HAVE_STRTOUL 1
#define HAVE_STRTOLL 1 #define HAVE_STRTOLL 1
@ -138,7 +137,7 @@
/* Enable MFi joystick support */ /* Enable MFi joystick support */
#define SDL_JOYSTICK_MFI 1 #define SDL_JOYSTICK_MFI 1
#define SDL_JOYSTICK_HIDAPI 1 /*#define SDL_JOYSTICK_HIDAPI 1*/
#ifdef __TVOS__ #ifdef __TVOS__
#define SDL_SENSOR_DUMMY 1 #define SDL_SENSOR_DUMMY 1
@ -182,10 +181,6 @@
#define SDL_VIDEO_VULKAN 1 #define SDL_VIDEO_VULKAN 1
#endif #endif
#if SDL_PLATFORM_SUPPORTS_METAL
#define SDL_VIDEO_METAL 1
#endif
/* Enable system power support */ /* Enable system power support */
#define SDL_POWER_UIKIT 1 #define SDL_POWER_UIKIT 1

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -74,7 +74,6 @@
#define HAVE_STRCHR 1 #define HAVE_STRCHR 1
#define HAVE_STRRCHR 1 #define HAVE_STRRCHR 1
#define HAVE_STRSTR 1 #define HAVE_STRSTR 1
#define HAVE_STRTOK_R 1
#define HAVE_STRTOL 1 #define HAVE_STRTOL 1
#define HAVE_STRTOUL 1 #define HAVE_STRTOUL 1
#define HAVE_STRTOLL 1 #define HAVE_STRTOLL 1
@ -131,8 +130,6 @@
#define HAVE_SYSCONF 1 #define HAVE_SYSCONF 1
#define HAVE_SYSCTLBYNAME 1 #define HAVE_SYSCTLBYNAME 1
#define HAVE_GCC_ATOMICS 1
/* Enable various audio drivers */ /* Enable various audio drivers */
#define SDL_AUDIO_DRIVER_COREAUDIO 1 #define SDL_AUDIO_DRIVER_COREAUDIO 1
#define SDL_AUDIO_DRIVER_DISK 1 #define SDL_AUDIO_DRIVER_DISK 1
@ -160,13 +157,13 @@
#define SDL_VIDEO_DRIVER_COCOA 1 #define SDL_VIDEO_DRIVER_COCOA 1
#define SDL_VIDEO_DRIVER_DUMMY 1 #define SDL_VIDEO_DRIVER_DUMMY 1
#undef SDL_VIDEO_DRIVER_X11 #undef SDL_VIDEO_DRIVER_X11
#define SDL_VIDEO_DRIVER_X11_DYNAMIC "/opt/X11/lib/libX11.6.dylib" #define SDL_VIDEO_DRIVER_X11_DYNAMIC "/usr/X11R6/lib/libX11.6.dylib"
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT "/opt/X11/lib/libXext.6.dylib" #define SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT "/usr/X11R6/lib/libXext.6.dylib"
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA "/opt/X11/lib/libXinerama.1.dylib" #define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA "/usr/X11R6/lib/libXinerama.1.dylib"
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2 "/opt/X11/lib/libXi.6.dylib" #define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2 "/usr/X11R6/lib/libXi.6.dylib"
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR "/opt/X11/lib/libXrandr.2.dylib" #define SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR "/usr/X11R6/lib/libXrandr.2.dylib"
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS "/opt/X11/lib/libXss.1.dylib" #define SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS "/usr/X11R6/lib/libXss.1.dylib"
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE "/opt/X11/lib/libXxf86vm.1.dylib" #define SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE "/usr/X11R6/lib/libXxf86vm.1.dylib"
#define SDL_VIDEO_DRIVER_X11_XDBE 1 #define SDL_VIDEO_DRIVER_X11_XDBE 1
#define SDL_VIDEO_DRIVER_X11_XINERAMA 1 #define SDL_VIDEO_DRIVER_X11_XINERAMA 1
#define SDL_VIDEO_DRIVER_X11_XRANDR 1 #define SDL_VIDEO_DRIVER_X11_XRANDR 1
@ -194,15 +191,9 @@
#define SDL_VIDEO_RENDER_OGL_ES2 1 #define SDL_VIDEO_RENDER_OGL_ES2 1
#endif #endif
#ifndef SDL_VIDEO_RENDER_METAL
/* Metal only supported on 64-bit architectures with 10.11+ */ /* Metal only supported on 64-bit architectures with 10.11+ */
#if TARGET_CPU_X86_64 && (MAC_OS_X_VERSION_MAX_ALLOWED >= 101100) #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 #define SDL_VIDEO_RENDER_METAL 1
#else #else
#define SDL_VIDEO_RENDER_METAL 0 #define SDL_VIDEO_RENDER_METAL 0
@ -226,22 +217,13 @@
#define SDL_VIDEO_OPENGL_GLX 1 #define SDL_VIDEO_OPENGL_GLX 1
#endif #endif
/* Enable Vulkan and Metal support */ /* Enable Vulkan support */
#ifndef SDL_VIDEO_VULKAN /* Metal/MoltenVK/Vulkan only supported on 64-bit architectures with 10.11+ */
#if SDL_PLATFORM_SUPPORTS_METAL #if TARGET_CPU_X86_64 && (MAC_OS_X_VERSION_MAX_ALLOWED >= 101100)
#define SDL_VIDEO_VULKAN 1 #define SDL_VIDEO_VULKAN 1
#else #else
#define SDL_VIDEO_VULKAN 0 #define SDL_VIDEO_VULKAN 0
#endif #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 */ /* Enable system power support */
#define SDL_POWER_MACOSX 1 #define SDL_POWER_MACOSX 1

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -110,7 +110,6 @@
#define HAVE_STRCHR 1 #define HAVE_STRCHR 1
#define HAVE_STRRCHR 1 #define HAVE_STRRCHR 1
#define HAVE_STRSTR 1 #define HAVE_STRSTR 1
/* #undef HAVE_STRTOK_R */
#define HAVE_ITOA 1 #define HAVE_ITOA 1
#define HAVE__LTOA 1 #define HAVE__LTOA 1
#define HAVE__ULTOA 1 #define HAVE__ULTOA 1
@ -123,21 +122,12 @@
#define HAVE_STRTOD 1 #define HAVE_STRTOD 1
#define HAVE_ATOI 1 #define HAVE_ATOI 1
#define HAVE_ATOF 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_STRCMP 1
#define HAVE_STRNCMP 1 #define HAVE_STRNCMP 1
#define HAVE_STRICMP 1 #define HAVE_STRICMP 1
#define HAVE_STRCASECMP 1 #define HAVE_STRCASECMP 1
#define HAVE_STRNCASECMP 1 #define HAVE_STRNCASECMP 1
#define HAVE_SSCANF 1 #define HAVE_SSCANF 1
#define HAVE_VSSCANF 1
#define HAVE_SNPRINTF 1 #define HAVE_SNPRINTF 1
#define HAVE_VSNPRINTF 1 #define HAVE_VSNPRINTF 1
#define HAVE_SETJMP 1 #define HAVE_SETJMP 1

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -84,6 +84,7 @@ typedef unsigned int uintptr_t;
#define HAVE_XINPUT_H 1 #define HAVE_XINPUT_H 1
#define HAVE_MMDEVICEAPI_H 1 #define HAVE_MMDEVICEAPI_H 1
#define HAVE_AUDIOCLIENT_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 */ /* This is disabled by default to avoid C runtime dependencies and manifest requirements */
#ifdef HAVE_LIBC #ifdef HAVE_LIBC
@ -117,10 +118,6 @@ typedef unsigned int uintptr_t;
#define HAVE_STRCHR 1 #define HAVE_STRCHR 1
#define HAVE_STRRCHR 1 #define HAVE_STRRCHR 1
#define HAVE_STRSTR 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 */ /* These functions have security warnings, so we won't use them */
/* #undef HAVE__LTOA */ /* #undef HAVE__LTOA */
/* #undef HAVE__ULTOA */ /* #undef HAVE__ULTOA */

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -100,6 +100,7 @@ typedef unsigned int uintptr_t;
#define HAVE_MMDEVICEAPI_H 1 #define HAVE_MMDEVICEAPI_H 1
#define HAVE_AUDIOCLIENT_H 1 #define HAVE_AUDIOCLIENT_H 1
#define HAVE_ENDPOINTVOLUME_H 1
#define HAVE_LIBC 1 #define HAVE_LIBC 1
#define STDC_HEADERS 1 #define STDC_HEADERS 1
@ -130,7 +131,6 @@ typedef unsigned int uintptr_t;
#define HAVE_STRCHR 1 #define HAVE_STRCHR 1
#define HAVE_STRRCHR 1 #define HAVE_STRRCHR 1
#define HAVE_STRSTR 1 #define HAVE_STRSTR 1
#define HAVE_STRTOK_S 1
//#define HAVE_ITOA 1 // TODO, WinRT: consider using _itoa_s instead //#define HAVE_ITOA 1 // TODO, WinRT: consider using _itoa_s instead
//#define HAVE__LTOA 1 // TODO, WinRT: consider using _ltoa_s instead //#define HAVE__LTOA 1 // TODO, WinRT: consider using _ltoa_s instead
//#define HAVE__ULTOA 1 // TODO, WinRT: consider using _ultoa_s instead //#define HAVE__ULTOA 1 // TODO, WinRT: consider using _ultoa_s instead

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -67,7 +67,6 @@
#define HAVE_STRCHR 1 #define HAVE_STRCHR 1
#define HAVE_STRRCHR 1 #define HAVE_STRRCHR 1
#define HAVE_STRSTR 1 #define HAVE_STRSTR 1
#define HAVE_STRTOK_R 1
#define HAVE_STRTOL 1 #define HAVE_STRTOL 1
#define HAVE_STRTOUL 1 #define HAVE_STRTOUL 1
#define HAVE_STRTOLL 1 #define HAVE_STRTOLL 1

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -41,43 +41,24 @@
#else #else
#include <intrin.h> #include <intrin.h>
#ifndef _WIN64 #ifndef _WIN64
#ifndef __MMX__
#define __MMX__ #define __MMX__
#endif
#ifndef __3dNOW__
#define __3dNOW__ #define __3dNOW__
#endif #endif
#endif
#ifndef __SSE__
#define __SSE__ #define __SSE__
#endif
#ifndef __SSE2__
#define __SSE2__ #define __SSE2__
#endif
#endif /* __clang__ */ #endif /* __clang__ */
#elif defined(__MINGW64_VERSION_MAJOR) #elif defined(__MINGW64_VERSION_MAJOR)
#include <intrin.h> #include <intrin.h>
#else #else
/* altivec.h redefining bool causes a number of problems, see bugs 3993 and 4392, so you need to explicitly define SDL_ENABLE_ALTIVEC_H to have it included. */ #ifdef __ALTIVEC__
#if defined(HAVE_ALTIVEC_H) && defined(__ALTIVEC__) && !defined(__APPLE_ALTIVEC__) && defined(SDL_ENABLE_ALTIVEC_H) #if defined(HAVE_ALTIVEC_H) && !defined(__APPLE_ALTIVEC__) && !defined(SDL_DISABLE_ALTIVEC_H)
#include <altivec.h> #include <altivec.h>
#undef pixel
#undef bool
#endif #endif
#if !defined(SDL_DISABLE_ARM_NEON_H) #endif
# if defined(__ARM_NEON) #if defined(__ARM_NEON__) && !defined(SDL_DISABLE_ARM_NEON_H)
# include <arm_neon.h> #include <arm_neon.h>
# elif defined(__WINDOWS__) || defined(__WINRT__)
/* Visual Studio doesn't define __ARM_ARCH, but _M_ARM (if set, always 7), and _M_ARM64 (if set, always 1). */
# if defined(_M_ARM)
# include <armintr.h>
# include <arm_neon.h>
# define __ARM_NEON 1 /* Set __ARM_NEON so that it can be used elsewhere, at compile time */
# endif
# if defined (_M_ARM64)
# 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
#endif #endif
#if defined(__3dNOW__) && !defined(SDL_DISABLE_MM3DNOW_H) #if defined(__3dNOW__) && !defined(SDL_DISABLE_MM3DNOW_H)
#include <mm3dnow.h> #include <mm3dnow.h>
@ -186,11 +167,6 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX2(void);
*/ */
extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX512F(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. * This function returns true if the CPU has NEON (ARM SIMD) features.
*/ */
@ -201,69 +177,6 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasNEON(void);
*/ */
extern DECLSPEC int SDLCALL SDL_GetSystemRAM(void); extern DECLSPEC int SDLCALL SDL_GetSystemRAM(void);
/**
* \brief Report the alignment this system needs for SIMD allocations.
*
* This will return the minimum number of bytes to which a pointer must be
* aligned to be compatible with SIMD instructions on the current machine.
* For example, if the machine supports SSE only, it will return 16, but if
* it supports AVX-512F, it'll return 64 (etc). This only reports values for
* instruction sets SDL knows about, so if your SDL build doesn't have
* SDL_HasAVX512F(), then it might return 16 for the SSE support it sees and
* not 64 for the AVX-512 instructions that exist but SDL doesn't know about.
* Plan accordingly.
*/
extern DECLSPEC size_t SDLCALL SDL_SIMDGetAlignment(void);
/**
* \brief Allocate memory in a SIMD-friendly way.
*
* This will allocate a block of memory that is suitable for use with SIMD
* instructions. Specifically, it will be properly aligned and padded for
* the system's supported vector instructions.
*
* The memory returned will be padded such that it is safe to read or write
* an incomplete vector at the end of the memory block. This can be useful
* so you don't have to drop back to a scalar fallback at the end of your
* SIMD processing loop to deal with the final elements without overflowing
* the allocated buffer.
*
* You must free this memory with SDL_FreeSIMD(), not free() or SDL_free()
* or delete[], etc.
*
* Note that SDL will only deal with SIMD instruction sets it is aware of;
* for example, SDL 2.0.8 knows that SSE wants 16-byte vectors
* (SDL_HasSSE()), and AVX2 wants 32 bytes (SDL_HasAVX2()), but doesn't
* know that AVX-512 wants 64. To be clear: if you can't decide to use an
* instruction set with an SDL_Has*() function, don't use that instruction
* set with memory allocated through here.
*
* SDL_AllocSIMD(0) will return a non-NULL pointer, assuming the system isn't
* out of memory.
*
* \param len The length, in bytes, of the block to allocated. The actual
* allocated block might be larger due to padding, etc.
* \return Pointer to newly-allocated block, NULL if out of memory.
*
* \sa SDL_SIMDAlignment
* \sa SDL_SIMDFree
*/
extern DECLSPEC void * SDLCALL SDL_SIMDAlloc(const size_t len);
/**
* \brief Deallocate memory obtained from SDL_SIMDAlloc
*
* It is not valid to use this function on a pointer from anything but
* SDL_SIMDAlloc(). It can't be used on pointers from malloc, realloc,
* SDL_malloc, memalign, new[], etc.
*
* However, SDL_SIMDFree(NULL) is a legal no-op.
*
* \sa SDL_SIMDAlloc
*/
extern DECLSPEC void SDLCALL SDL_SIMDFree(void *ptr);
/* vi: set ts=4 sw=4 expandtab: */
/* Ends C function definitions when using C++ */ /* Ends C function definitions when using C++ */
#ifdef __cplusplus #ifdef __cplusplus
} }

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -29,6 +29,17 @@
#include <EGL/egl.h> #include <EGL/egl.h>
#include <EGL/eglext.h> #include <EGL/eglext.h>
#if defined(SDL_VIDEO_DRIVER_MALI)
#ifndef MALI_NATIVE_WINDOW_H
#define MALI_NATIVE_WINDOW_H
typedef struct Mali_native_window
{
unsigned short width;
unsigned short height;
} Mali_native_window;
#endif
#endif
#else /* _MSC_VER */ #else /* _MSC_VER */
/* EGL headers for Visual Studio */ /* EGL headers for Visual Studio */
@ -390,9 +401,6 @@ typedef enum {
#ifndef WIN32_LEAN_AND_MEAN #ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN 1 #define WIN32_LEAN_AND_MEAN 1
#endif #endif
#ifndef NOMINMAX /* don't define min() and max(). */
#define NOMINMAX
#endif
#include <windows.h> #include <windows.h>
#if __WINRT__ #if __WINRT__
@ -1672,5 +1680,4 @@ EGLAPI EGLuint64NV EGLAPIENTRY eglGetSystemTimeNV (void);
#endif /* __eglext_h_ */ #endif /* __eglext_h_ */
#endif /* _MSC_VER */ #endif /* _MSC_VER */

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -42,13 +42,10 @@
#ifdef __linux__ #ifdef __linux__
#include <endian.h> #include <endian.h>
#define SDL_BYTEORDER __BYTE_ORDER #define SDL_BYTEORDER __BYTE_ORDER
#elif defined(__OpenBSD__) #else /* __linux__ */
#include <endian.h>
#define SDL_BYTEORDER BYTE_ORDER
#else
#if defined(__hppa__) || \ #if defined(__hppa__) || \
defined(__m68k__) || defined(mc68000) || defined(_M_M68K) || \ defined(__m68k__) || defined(mc68000) || defined(_M_M68K) || \
(defined(__MIPS__) && defined(__MIPSEB__)) || \ (defined(__MIPS__) && defined(__MISPEB__)) || \
defined(__ppc__) || defined(__POWERPC__) || defined(_M_PPC) || \ defined(__ppc__) || defined(__POWERPC__) || defined(_M_PPC) || \
defined(__sparc__) defined(__sparc__)
#define SDL_BYTEORDER SDL_BIG_ENDIAN #define SDL_BYTEORDER SDL_BIG_ENDIAN

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -442,7 +442,6 @@ typedef struct SDL_TouchFingerEvent
float dx; /**< Normalized in the range -1...1 */ float dx; /**< Normalized in the range -1...1 */
float dy; /**< Normalized in the range -1...1 */ float dy; /**< Normalized in the range -1...1 */
float pressure; /**< Normalized in the range 0...1 */ float pressure; /**< Normalized in the range 0...1 */
Uint32 windowID; /**< The window underneath the finger, if any */
} SDL_TouchFingerEvent; } SDL_TouchFingerEvent;
@ -559,7 +558,7 @@ typedef union SDL_Event
{ {
Uint32 type; /**< Event type, shared with all events */ Uint32 type; /**< Event type, shared with all events */
SDL_CommonEvent common; /**< Common event data */ SDL_CommonEvent common; /**< Common event data */
SDL_DisplayEvent display; /**< Display event data */ SDL_DisplayEvent display; /**< Window event data */
SDL_WindowEvent window; /**< Window event data */ SDL_WindowEvent window; /**< Window event data */
SDL_KeyboardEvent key; /**< Keyboard event data */ SDL_KeyboardEvent key; /**< Keyboard event data */
SDL_TextEditingEvent edit; /**< Text editing event data */ SDL_TextEditingEvent edit; /**< Text editing event data */
@ -595,9 +594,6 @@ typedef union SDL_Event
Uint8 padding[56]; Uint8 padding[56];
} SDL_Event; } SDL_Event;
/* Make sure we haven't broken binary compatibility */
SDL_COMPILE_TIME_ASSERT(SDL_Event, sizeof(SDL_Event) == 56);
/* Function prototypes */ /* Function prototypes */

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -57,15 +57,6 @@ extern "C" {
struct _SDL_GameController; struct _SDL_GameController;
typedef struct _SDL_GameController 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 typedef enum
{ {
@ -184,12 +175,6 @@ extern DECLSPEC SDL_bool SDLCALL SDL_IsGameController(int joystick_index);
*/ */
extern DECLSPEC const char *SDLCALL SDL_GameControllerNameForIndex(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. * Get the mapping of a game controller.
* This can be called before any controllers are opened. * This can be called before any controllers are opened.
@ -214,21 +199,11 @@ extern DECLSPEC SDL_GameController *SDLCALL SDL_GameControllerOpen(int joystick_
*/ */
extern DECLSPEC SDL_GameController *SDLCALL SDL_GameControllerFromInstanceID(SDL_JoystickID joyid); 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 * Return the name for this currently opened controller
*/ */
extern DECLSPEC const char *SDLCALL SDL_GameControllerName(SDL_GameController *gamecontroller); 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 * Get the player index of an opened game controller, or -1 if it's not available
* *
@ -236,11 +211,6 @@ extern DECLSPEC SDL_GameControllerType SDLCALL SDL_GameControllerGetType(SDL_Gam
*/ */
extern DECLSPEC int SDLCALL SDL_GameControllerGetPlayerIndex(SDL_GameController *gamecontroller); 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. * Get the USB vendor ID of an opened controller, if available.
* If the vendor ID isn't available this function returns 0. * If the vendor ID isn't available this function returns 0.

View file

@ -1,6 +1,6 @@
/* /*
Simple DirectMedia Layer Simple DirectMedia Layer
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages 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