early-access version 1617
This commit is contained in:
parent
242b6f6b49
commit
f46563104f
510 changed files with 141726 additions and 62846 deletions
|
@ -274,9 +274,9 @@ if (ENABLE_SDL2)
|
|||
target_link_libraries(SDL2 INTERFACE "${SDL2_LIBRARY}")
|
||||
target_include_directories(SDL2 INTERFACE "${SDL2_INCLUDE_DIR}")
|
||||
else()
|
||||
find_package(SDL2 2.0.12)
|
||||
find_package(SDL2 2.0.14)
|
||||
|
||||
if(SDL2_FOUND)
|
||||
if (SDL2_FOUND)
|
||||
# Some installations don't set SDL2_LIBRARIES
|
||||
if("${SDL2_LIBRARIES}" STREQUAL "")
|
||||
message(WARNING "SDL2_LIBRARIES wasn't set, manually setting to SDL2::SDL2")
|
||||
|
@ -286,10 +286,10 @@ if (ENABLE_SDL2)
|
|||
include_directories(SYSTEM ${SDL2_INCLUDE_DIRS})
|
||||
add_library(SDL2 INTERFACE)
|
||||
target_link_libraries(SDL2 INTERFACE "${SDL2_LIBRARIES}")
|
||||
else()
|
||||
message(STATUS "SDL2 2.0.14 or newer not found, falling back to externals.")
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
set(SDL2_FOUND NO)
|
||||
endif()
|
||||
|
||||
# Install any missing dependencies with conan install
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
yuzu emulator early access
|
||||
=============
|
||||
|
||||
This is the source code for early-access 1615.
|
||||
This is the source code for early-access 1617.
|
||||
|
||||
## Legal Notice
|
||||
|
||||
|
|
3
externals/CMakeLists.txt
vendored
3
externals/CMakeLists.txt
vendored
|
@ -46,8 +46,7 @@ add_library(unicorn-headers INTERFACE)
|
|||
target_include_directories(unicorn-headers INTERFACE ./unicorn/include)
|
||||
|
||||
# SDL2
|
||||
if (NOT SDL2_FOUND)
|
||||
set(SDL2_FOUND YES)
|
||||
if (NOT SDL2_FOUND AND ENABLE_SDL2)
|
||||
add_subdirectory(SDL EXCLUDE_FROM_ALL)
|
||||
endif()
|
||||
|
||||
|
|
5
externals/SDL/Android.mk
vendored
5
externals/SDL/Android.mk
vendored
|
@ -33,7 +33,12 @@ LOCAL_SRC_FILES := \
|
|||
$(wildcard $(LOCAL_PATH)/src/joystick/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/joystick/android/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/joystick/hidapi/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/joystick/virtual/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/loadso/dlopen/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/locale/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/locale/android/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/misc/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/misc/android/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/power/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/power/android/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/filesystem/android/*.c) \
|
||||
|
|
348
externals/SDL/CMakeLists.txt
vendored
348
externals/SDL/CMakeLists.txt
vendored
|
@ -2,9 +2,21 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
|
|||
message(FATAL_ERROR "Prevented in-tree built. Please create a build directory outside of the SDL source code and call cmake from there")
|
||||
endif()
|
||||
|
||||
cmake_minimum_required(VERSION 2.8.11)
|
||||
cmake_minimum_required(VERSION 3.0.0)
|
||||
project(SDL2 C CXX)
|
||||
|
||||
if(WINDOWS_STORE)
|
||||
enable_language(CXX)
|
||||
cmake_minimum_required(VERSION 3.11)
|
||||
add_definitions(-DSDL_BUILDING_WINRT=1 -ZW)
|
||||
link_libraries(
|
||||
-nodefaultlib:vccorlib$<$<CONFIG:Debug>:d>
|
||||
-nodefaultlib:msvcrt$<$<CONFIG:Debug>:d>
|
||||
vccorlib$<$<CONFIG:Debug>:d>.lib
|
||||
msvcrt$<$<CONFIG:Debug>:d>.lib
|
||||
)
|
||||
endif()
|
||||
|
||||
# !!! FIXME: this should probably do "MACOSX_RPATH ON" as a target property
|
||||
# !!! FIXME: for the SDL2 shared library (so you get an
|
||||
# !!! FIXME: install_name ("soname") of "@rpath/libSDL-whatever.dylib"
|
||||
|
@ -15,7 +27,6 @@ project(SDL2 C CXX)
|
|||
# !!! FIXME: properly resolved.
|
||||
#cmake_policy(SET CMP0042 OLD)
|
||||
|
||||
include(CheckFunctionExists)
|
||||
include(CheckLibraryExists)
|
||||
include(CheckIncludeFiles)
|
||||
include(CheckIncludeFile)
|
||||
|
@ -42,12 +53,12 @@ include(${SDL2_SOURCE_DIR}/cmake/sdlchecks.cmake)
|
|||
# set SDL_BINARY_AGE and SDL_INTERFACE_AGE to 0.
|
||||
set(SDL_MAJOR_VERSION 2)
|
||||
set(SDL_MINOR_VERSION 0)
|
||||
set(SDL_MICRO_VERSION 12)
|
||||
set(SDL_MICRO_VERSION 14)
|
||||
set(SDL_INTERFACE_AGE 0)
|
||||
set(SDL_BINARY_AGE 12)
|
||||
set(SDL_BINARY_AGE 14)
|
||||
set(SDL_VERSION "${SDL_MAJOR_VERSION}.${SDL_MINOR_VERSION}.${SDL_MICRO_VERSION}")
|
||||
# the following should match the versions in Xcode project file:
|
||||
set(DYLIB_CURRENT_VERSION 12.0.0)
|
||||
set(DYLIB_CURRENT_VERSION 15.0.0)
|
||||
set(DYLIB_COMPATIBILITY_VERSION 1.0.0)
|
||||
|
||||
# Set defaults preventing destination file conflicts
|
||||
|
@ -161,7 +172,7 @@ endif()
|
|||
# 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)
|
||||
if((WINDOWS AND NOT WINDOWS_STORE) OR IOS OR TVOS OR ANDROID)
|
||||
set(HIDAPI_SKIP_LIBUSB TRUE)
|
||||
else()
|
||||
set(HIDAPI_SKIP_LIBUSB FALSE)
|
||||
|
@ -266,7 +277,7 @@ add_definitions(-DUSING_GENERATED_CONFIG_H)
|
|||
# General includes
|
||||
include_directories(${SDL2_BINARY_DIR}/include ${SDL2_SOURCE_DIR}/include)
|
||||
if(USE_GCC OR USE_CLANG)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -idirafter ${SDL2_SOURCE_DIR}/src/video/khronos")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -idirafter \"${SDL2_SOURCE_DIR}/src/video/khronos\"")
|
||||
else()
|
||||
include_directories(${SDL2_SOURCE_DIR}/src/video/khronos)
|
||||
endif()
|
||||
|
@ -308,7 +319,7 @@ endif()
|
|||
|
||||
set(SDL_SUBSYSTEMS
|
||||
Atomic Audio Video Render Events Joystick Haptic Power Threads Timers
|
||||
File Loadso CPUinfo Filesystem Dlopen Sensor)
|
||||
File Loadso CPUinfo Filesystem Dlopen Sensor Locale)
|
||||
foreach(_SUB ${SDL_SUBSYSTEMS})
|
||||
string(TOUPPER ${_SUB} _OPT)
|
||||
if (NOT DEFINED SDL_${_OPT}_ENABLED_BY_DEFAULT)
|
||||
|
@ -329,8 +340,8 @@ set_option(SSE "Use SSE assembly routines" ${OPT_DEF_ASM})
|
|||
set_option(SSE2 "Use SSE2 assembly routines" ${OPT_DEF_SSEMATH})
|
||||
set_option(SSE3 "Use SSE3 assembly routines" ${OPT_DEF_SSEMATH})
|
||||
set_option(ALTIVEC "Use Altivec assembly routines" ${OPT_DEF_ASM})
|
||||
set_option(ARMSIMD "use SIMD assembly blitters on ARM" ON)
|
||||
set_option(ARMNEON "use NEON assembly blitters on ARM" ON)
|
||||
set_option(ARMSIMD "use SIMD assembly blitters on ARM" OFF)
|
||||
set_option(ARMNEON "use NEON assembly blitters on ARM" OFF)
|
||||
set_option(DISKAUDIO "Support the disk writer audio driver" ON)
|
||||
set_option(DUMMYAUDIO "Support the dummy audio driver" ON)
|
||||
set_option(VIDEO_DIRECTFB "Use DirectFB video driver" OFF)
|
||||
|
@ -355,13 +366,13 @@ dep_option(ARTS_SHARED "Dynamically load aRts audio support" ON "ARTS" O
|
|||
set_option(NAS "Support the NAS audio API" ${UNIX_SYS})
|
||||
set_option(NAS_SHARED "Dynamically load NAS audio API" ${UNIX_SYS})
|
||||
set_option(SNDIO "Support the sndio audio API" ${UNIX_SYS})
|
||||
dep_option(SNDIO_SHARED "Dynamically load the sndio audio API" ${UNIX_SYS} ON "SNDIO" OFF)
|
||||
set_option(FUSIONSOUND "Use FusionSound audio driver" OFF)
|
||||
dep_option(FUSIONSOUND_SHARED "Dynamically load fusionsound audio support" ON "FUSIONSOUND" OFF)
|
||||
set_option(LIBSAMPLERATE "Use libsamplerate for audio rate conversion" ${UNIX_SYS})
|
||||
dep_option(LIBSAMPLERATE_SHARED "Dynamically load libsamplerate" ON "LIBSAMPLERATE" OFF)
|
||||
set_option(RPATH "Use an rpath when linking SDL" ${UNIX_SYS})
|
||||
set_option(CLOCK_GETTIME "Use clock_gettime() instead of gettimeofday()" OFF)
|
||||
set_option(INPUT_TSLIB "Use the Touchscreen library for input" ${UNIX_SYS})
|
||||
set_option(VIDEO_X11 "Use X11 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)
|
||||
|
@ -387,6 +398,7 @@ 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})
|
||||
set_option(JOYSTICK_VIRTUAL "Enable the virtual-joystick driver" ON)
|
||||
|
||||
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")
|
||||
|
@ -403,9 +415,14 @@ file(GLOB SOURCE_FILES
|
|||
${SDL2_SOURCE_DIR}/src/dynapi/*.c
|
||||
${SDL2_SOURCE_DIR}/src/events/*.c
|
||||
${SDL2_SOURCE_DIR}/src/file/*.c
|
||||
${SDL2_SOURCE_DIR}/src/haptic/*.c
|
||||
${SDL2_SOURCE_DIR}/src/libm/*.c
|
||||
${SDL2_SOURCE_DIR}/src/locale/*.c
|
||||
${SDL2_SOURCE_DIR}/src/misc/*.c
|
||||
${SDL2_SOURCE_DIR}/src/power/*.c
|
||||
${SDL2_SOURCE_DIR}/src/render/*.c
|
||||
${SDL2_SOURCE_DIR}/src/render/*/*.c
|
||||
${SDL2_SOURCE_DIR}/src/sensor/*.c
|
||||
${SDL2_SOURCE_DIR}/src/stdlib/*.c
|
||||
${SDL2_SOURCE_DIR}/src/thread/*.c
|
||||
${SDL2_SOURCE_DIR}/src/timer/*.c
|
||||
|
@ -760,13 +777,14 @@ if(LIBC)
|
|||
set(HAVE_SIGNAL_H 1)
|
||||
foreach(_FN
|
||||
malloc calloc realloc free qsort abs memset memcpy memmove memcmp
|
||||
wcslen wcslcpy wcslcat wcsdup wcsstr wcscmp wcsncmp
|
||||
wcslen wcsdup wcsstr wcscmp wcsncmp _wcsicmp _wcsnicmp
|
||||
strlen _strrev _strupr _strlwr strchr strrchr strstr itoa _ltoa
|
||||
_ultoa strtol strtoul strtoll strtod atoi atof strcmp strncmp
|
||||
_stricmp _strnicmp strtok_s sscanf
|
||||
acos acosf asin asinf atan atanf atan2 atan2f ceil ceilf
|
||||
copysign copysignf cos cosf exp expf fabs fabsf floor floorf fmod fmodf
|
||||
log logf log10 log10f pow powf scalbn scalbnf sin sinf sqrt sqrtf tan tanf)
|
||||
log logf log10 log10f pow powf scalbn scalbnf sin sinf sqrt sqrtf tan tanf
|
||||
trunc truncf)
|
||||
string(TOUPPER ${_FN} _UPPER)
|
||||
set(HAVE_${_UPPER} 1)
|
||||
endforeach()
|
||||
|
@ -787,7 +805,8 @@ if(LIBC)
|
|||
check_include_file("${_HEADER}" ${_HAVE_H})
|
||||
endforeach()
|
||||
|
||||
check_include_files("dlfcn.h;stdint.h;stddef.h;inttypes.h;stdlib.h;strings.h;string.h;float.h" STDC_HEADERS)
|
||||
set(STDC_HEADER_NAMES "stddef.h;stdarg.h;stdlib.h;string.h;stdio.h;wchar.h;float.h")
|
||||
check_include_files("${STDC_HEADER_NAMES}" STDC_HEADERS)
|
||||
check_type_size("size_t" SIZEOF_SIZE_T)
|
||||
check_symbol_exists(M_PI math.h HAVE_M_PI)
|
||||
# TODO: refine the mprotect check
|
||||
|
@ -801,14 +820,23 @@ if(LIBC)
|
|||
_uitoa _ultoa strtol strtoul _i64toa _ui64toa strtoll strtoull
|
||||
atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp
|
||||
wcscmp wcsdup wcslcat wcslcpy wcslen wcsncmp wcsstr
|
||||
sscanf vsscanf vsnprintf fopen64 fseeko fseeko64 sigaction setjmp
|
||||
nanosleep sysconf sysctlbyname getauxval poll _Exit
|
||||
wcscasecmp _wcsicmp wcsncasecmp _wcsnicmp
|
||||
sscanf vsscanf vsnprintf fopen64 fseeko fseeko64 _Exit
|
||||
)
|
||||
string(TOUPPER ${_FN} _UPPER)
|
||||
set(_HAVEVAR "HAVE_${_UPPER}")
|
||||
check_function_exists("${_FN}" ${_HAVEVAR})
|
||||
check_symbol_exists("${_FN}" "${STDC_HEADER_NAMES}" ${_HAVEVAR})
|
||||
endforeach()
|
||||
|
||||
check_symbol_exists(sigaction "signal.h" HAVE_SIGACTION)
|
||||
check_symbol_exists(setjmp "setjmp.h" HAVE_SETJMP)
|
||||
check_symbol_exists(nanosleep "time.h" HAVE_NANOSLEEP)
|
||||
check_symbol_exists(sysconf "unistd.h" HAVE_SYSCONF)
|
||||
check_symbol_exists(sysctlbyname "sys/types.h;sys/sysctl.h" HAVE_SYSCTLBYNAME)
|
||||
check_symbol_exists(getauxval "sys/auxv.h" HAVE_GETAUXVAL)
|
||||
check_symbol_exists(elf_aux_info "sys/auxv.h" HAVE_ELF_AUX_INFO)
|
||||
check_symbol_exists(poll "poll.h" HAVE_POLL)
|
||||
|
||||
check_library_exists(m pow "" HAVE_LIBM)
|
||||
if(HAVE_LIBM)
|
||||
set(CMAKE_REQUIRED_LIBRARIES m)
|
||||
|
@ -816,24 +844,32 @@ if(LIBC)
|
|||
atan atan2 atanf atan2f ceil ceilf copysign copysignf cos cosf
|
||||
exp expf fabs fabsf floor floorf fmod fmodf log logf log10 log10f
|
||||
pow powf scalbn scalbnf sin sinf sqrt sqrtf tan tanf acos acosf
|
||||
asin asinf)
|
||||
asin asinf trunc truncf)
|
||||
string(TOUPPER ${_FN} _UPPER)
|
||||
set(_HAVEVAR "HAVE_${_UPPER}")
|
||||
check_function_exists("${_FN}" ${_HAVEVAR})
|
||||
check_symbol_exists("${_FN}" "math.h" ${_HAVEVAR})
|
||||
endforeach()
|
||||
set(CMAKE_REQUIRED_LIBRARIES)
|
||||
list(APPEND EXTRA_LIBS m)
|
||||
endif()
|
||||
|
||||
check_library_exists(iconv iconv_open "" HAVE_LIBICONV)
|
||||
if(HAVE_LIBICONV)
|
||||
check_library_exists(c iconv_open "" HAVE_BUILTIN_ICONV)
|
||||
if(HAVE_BUILTIN_ICONV)
|
||||
set(HAVE_ICONV 1)
|
||||
elseif(HAVE_LIBICONV)
|
||||
list(APPEND EXTRA_LIBS iconv)
|
||||
set(HAVE_ICONV 1)
|
||||
endif()
|
||||
|
||||
if(NOT APPLE)
|
||||
check_include_file(alloca.h HAVE_ALLOCA_H)
|
||||
check_function_exists(alloca HAVE_ALLOCA)
|
||||
check_symbol_exists(alloca "alloca.h" HAVE_ALLOCA1)
|
||||
check_symbol_exists(alloca "stdlib.h" HAVE_ALLOCA2)
|
||||
check_symbol_exists(alloca "malloc.h" HAVE_ALLOCA3)
|
||||
if(HAVE_ALLOCA1 OR HAVE_ALLOCA2 OR HAVE_ALLOCA3)
|
||||
set(HAVE_ALLOCA 1)
|
||||
endif()
|
||||
else()
|
||||
set(HAVE_ALLOCA_H 1)
|
||||
set(HAVE_ALLOCA 1)
|
||||
|
@ -865,17 +901,9 @@ if(SDL_HAPTIC)
|
|||
# Haptic requires some private functions from the joystick subsystem.
|
||||
message_error("SDL_HAPTIC requires SDL_JOYSTICK, which is not enabled")
|
||||
endif()
|
||||
file(GLOB HAPTIC_SOURCES ${SDL2_SOURCE_DIR}/src/haptic/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${HAPTIC_SOURCES})
|
||||
endif()
|
||||
if(SDL_SENSOR)
|
||||
file(GLOB SENSOR_SOURCES ${SDL2_SOURCE_DIR}/src/sensor/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${SENSOR_SOURCES})
|
||||
endif()
|
||||
if(SDL_POWER)
|
||||
file(GLOB POWER_SOURCES ${SDL2_SOURCE_DIR}/src/power/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${POWER_SOURCES})
|
||||
endif()
|
||||
|
||||
|
||||
# TODO: in configure.ac, the test for LOADSO and SDL_DLOPEN is a bit weird:
|
||||
# if LOADSO is not wanted, SDL_LOADSO_DISABLED is set
|
||||
# If however on Unix or APPLE dlopen() is detected via CheckDLOPEN(),
|
||||
|
@ -905,6 +933,14 @@ if(SDL_DLOPEN)
|
|||
endif()
|
||||
endif()
|
||||
|
||||
if(SDL_JOYSTICK)
|
||||
if(JOYSTICK_VIRTUAL)
|
||||
set(SDL_JOYSTICK_VIRTUAL 1)
|
||||
file(GLOB JOYSTICK_VIRTUAL_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/virtual/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${JOYSTICK_VIRTUAL_SOURCES})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(SDL_VIDEO)
|
||||
if(VIDEO_DUMMY)
|
||||
set(SDL_VIDEO_DRIVER_DUMMY 1)
|
||||
|
@ -925,7 +961,11 @@ endif()
|
|||
# Platform-specific options and settings
|
||||
if(ANDROID)
|
||||
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} ${ANDROID_NDK}/sources/android/cpufeatures/cpu-features.c)
|
||||
|
||||
file(GLOB ANDROID_MISC_SOURCES ${SDL2_SOURCE_DIR}/src/misc/android/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${ANDROID_MISC_SOURCES})
|
||||
set(HAVE_SDL_MISC TRUE)
|
||||
|
||||
# SDL_spinlock.c Needs to be compiled in ARM mode.
|
||||
# There seems to be no better way currently to set the ARM mode.
|
||||
|
@ -976,6 +1016,11 @@ if(ANDROID)
|
|||
set(SOURCE_FILES ${SOURCE_FILES} ${ANDROID_POWER_SOURCES})
|
||||
set(HAVE_SDL_POWER TRUE)
|
||||
endif()
|
||||
if(SDL_LOCALE)
|
||||
file(GLOB ANDROID_LOCALE_SOURCES ${SDL2_SOURCE_DIR}/src/locale/android/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${ANDROID_LOCALE_SOURCES})
|
||||
set(HAVE_SDL_LOCALE TRUE)
|
||||
endif()
|
||||
if(SDL_TIMERS)
|
||||
set(SDL_TIMER_UNIX 1)
|
||||
file(GLOB TIMER_SOURCES ${SDL2_SOURCE_DIR}/src/timer/unix/*.c)
|
||||
|
@ -1066,6 +1111,11 @@ elseif(EMSCRIPTEN)
|
|||
set(SOURCE_FILES ${SOURCE_FILES} ${EM_POWER_SOURCES})
|
||||
set(HAVE_SDL_POWER TRUE)
|
||||
endif()
|
||||
if(SDL_LOCALE)
|
||||
file(GLOB LOCALE_SOURCES ${SDL2_SOURCE_DIR}/src/locale/emscripten/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${LOCALE_SOURCES})
|
||||
set(HAVE_SDL_LOCALE TRUE)
|
||||
endif()
|
||||
if(SDL_TIMERS)
|
||||
set(SDL_TIMER_UNIX 1)
|
||||
file(GLOB TIMER_SOURCES ${SDL2_SOURCE_DIR}/src/timer/unix/*.c)
|
||||
|
@ -1157,9 +1207,6 @@ elseif(UNIX AND NOT APPLE AND NOT ANDROID AND NOT RISCOS)
|
|||
ioctl(0, KDGKBENT, &kbe);
|
||||
}" HAVE_INPUT_KD)
|
||||
|
||||
file(GLOB CORE_LINUX_SOURCES ${SDL2_SOURCE_DIR}/src/core/linux/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${CORE_LINUX_SOURCES})
|
||||
|
||||
if(HAVE_INPUT_EVENTS)
|
||||
set(SDL_INPUT_LINUXEV 1)
|
||||
endif()
|
||||
|
@ -1176,6 +1223,12 @@ elseif(UNIX AND NOT APPLE AND NOT ANDROID AND NOT RISCOS)
|
|||
endif()
|
||||
|
||||
check_include_file("libudev.h" HAVE_LIBUDEV_H)
|
||||
check_include_file("sys/inotify.h" HAVE_SYS_INOTIFY_H)
|
||||
check_symbol_exists(inotify_init "sys/inotify.h" HAVE_INOTIFY_INIT)
|
||||
check_symbol_exists(inotify_init1 "sys/inotify.h" HAVE_INOTIFY_INIT1)
|
||||
if(HAVE_SYS_INOTIFY_H AND HAVE_INOTIFY_INIT)
|
||||
set(HAVE_INOTIFY 1)
|
||||
endif()
|
||||
|
||||
if(PKG_CONFIG_FOUND)
|
||||
pkg_search_module(DBUS dbus-1 dbus)
|
||||
|
@ -1183,6 +1236,8 @@ elseif(UNIX AND NOT APPLE AND NOT ANDROID AND NOT RISCOS)
|
|||
set(HAVE_DBUS_DBUS_H TRUE)
|
||||
include_directories(${DBUS_INCLUDE_DIRS})
|
||||
list(APPEND EXTRA_LIBS ${DBUS_LIBRARIES})
|
||||
# Fcitx need only dbus.
|
||||
set(HAVE_FCITX TRUE)
|
||||
endif()
|
||||
|
||||
pkg_search_module(IBUS ibus-1.0 ibus)
|
||||
|
@ -1190,7 +1245,11 @@ elseif(UNIX AND NOT APPLE AND NOT ANDROID AND NOT RISCOS)
|
|||
set(HAVE_IBUS_IBUS_H TRUE)
|
||||
include_directories(${IBUS_INCLUDE_DIRS})
|
||||
list(APPEND EXTRA_LIBS ${IBUS_LIBRARIES})
|
||||
add_definitions(-DSDL_USE_IME)
|
||||
endif()
|
||||
|
||||
if (HAVE_IBUS_IBUS_H OR HAVE_FCITX)
|
||||
set(SDL_USE_IME TRUE)
|
||||
add_definitions(-DSDL_USE_IME) # !!! FIXME: why isn't this a definition and not in SDL_config.h.cmake?
|
||||
endif()
|
||||
if(HAVE_LIBUNWIND_H)
|
||||
# We've already found the header, so REQUIRE the lib to be present
|
||||
|
@ -1200,17 +1259,36 @@ elseif(UNIX AND NOT APPLE AND NOT ANDROID AND NOT RISCOS)
|
|||
endif()
|
||||
endif()
|
||||
|
||||
check_include_file("fcitx/frontend.h" HAVE_FCITX_FRONTEND_H)
|
||||
endif()
|
||||
|
||||
if(INPUT_TSLIB)
|
||||
check_c_source_compiles("
|
||||
#include \"tslib.h\"
|
||||
int main(int argc, char** argv) { }" HAVE_INPUT_TSLIB)
|
||||
if(HAVE_INPUT_TSLIB)
|
||||
set(SDL_INPUT_TSLIB 1)
|
||||
list(APPEND EXTRA_LIBS ts)
|
||||
if(HAVE_DBUS_DBUS_H)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} "${SDL2_SOURCE_DIR}/src/core/linux/SDL_dbus.c")
|
||||
endif()
|
||||
|
||||
if(SDL_USE_IME)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} "${SDL2_SOURCE_DIR}/src/core/linux/SDL_ime.c")
|
||||
endif()
|
||||
|
||||
if(HAVE_IBUS_IBUS_H)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} "${SDL2_SOURCE_DIR}/src/core/linux/SDL_ibus.c")
|
||||
endif()
|
||||
|
||||
if(HAVE_FCITX)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} "${SDL2_SOURCE_DIR}/src/core/linux/SDL_fcitx.c")
|
||||
endif()
|
||||
|
||||
if(HAVE_LIBUDEV_H)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} "${SDL2_SOURCE_DIR}/src/core/linux/SDL_udev.c")
|
||||
endif()
|
||||
|
||||
if(HAVE_INPUT_EVENTS)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} "${SDL2_SOURCE_DIR}/src/core/linux/SDL_evdev.c")
|
||||
set(SOURCE_FILES ${SOURCE_FILES} "${SDL2_SOURCE_DIR}/src/core/linux/SDL_evdev_kbd.c")
|
||||
endif()
|
||||
|
||||
# Always compiled for Linux, unconditionally:
|
||||
set(SOURCE_FILES ${SOURCE_FILES} "${SDL2_SOURCE_DIR}/src/core/linux/SDL_evdev_capabilities.c")
|
||||
set(SOURCE_FILES ${SOURCE_FILES} "${SDL2_SOURCE_DIR}/src/core/linux/SDL_threadprio.c")
|
||||
|
||||
# src/core/unix/*.c is included in a generic if(UNIX) section, elsewhere.
|
||||
endif()
|
||||
|
||||
if(SDL_JOYSTICK)
|
||||
|
@ -1246,6 +1324,10 @@ elseif(UNIX AND NOT APPLE AND NOT ANDROID AND NOT RISCOS)
|
|||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DHAVE_LINUX_VERSION_H")
|
||||
endif()
|
||||
|
||||
file(GLOB MISC_SOURCES ${SDL2_SOURCE_DIR}/src/misc/unix/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${MISC_SOURCES})
|
||||
set(HAVE_SDL_MISC TRUE)
|
||||
|
||||
if(SDL_POWER)
|
||||
if(LINUX)
|
||||
set(SDL_POWER_LINUX 1)
|
||||
|
@ -1255,6 +1337,12 @@ elseif(UNIX AND NOT APPLE AND NOT ANDROID AND NOT RISCOS)
|
|||
endif()
|
||||
endif()
|
||||
|
||||
if(SDL_LOCALE)
|
||||
file(GLOB LOCALE_SOURCES ${SDL2_SOURCE_DIR}/src/locale/unix/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${LOCALE_SOURCES})
|
||||
set(HAVE_SDL_LOCALE TRUE)
|
||||
endif()
|
||||
|
||||
if(SDL_FILESYSTEM)
|
||||
set(SDL_FILESYSTEM_UNIX 1)
|
||||
file(GLOB FILESYSTEM_SOURCES ${SDL2_SOURCE_DIR}/src/filesystem/unix/*.c)
|
||||
|
@ -1269,8 +1357,8 @@ elseif(UNIX AND NOT APPLE AND NOT ANDROID AND NOT RISCOS)
|
|||
set(HAVE_SDL_TIMERS TRUE)
|
||||
endif()
|
||||
|
||||
if(RPATH)
|
||||
set(SDL_RLD_FLAGS "")
|
||||
set(SDL_RLD_FLAGS "")
|
||||
if(RPATH AND SDL_SHARED)
|
||||
if(BSDI OR FREEBSD OR LINUX OR NETBSD)
|
||||
set(CMAKE_REQUIRED_FLAGS "-Wl,--enable-new-dtags")
|
||||
check_c_compiler_flag("" HAVE_ENABLE_NEW_DTAGS)
|
||||
|
@ -1297,6 +1385,11 @@ elseif(WINDOWS)
|
|||
file(GLOB CORE_SOURCES ${SDL2_SOURCE_DIR}/src/core/windows/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${CORE_SOURCES})
|
||||
|
||||
if(WINDOWS_STORE)
|
||||
file(GLOB WINRT_SOURCE_FILES ${SDL2_SOURCE_DIR}/src/core/winrt/*.c ${SDL2_SOURCE_DIR}/src/core/winrt/*.cpp)
|
||||
list(APPEND SOURCE_FILES ${WINRT_SOURCE_FILES})
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
# Prevent codegen that would use the VC runtime libraries.
|
||||
set_property(DIRECTORY . APPEND PROPERTY COMPILE_OPTIONS "/GS-")
|
||||
|
@ -1305,6 +1398,10 @@ elseif(WINDOWS)
|
|||
endif()
|
||||
endif()
|
||||
|
||||
file(GLOB MISC_SOURCES ${SDL2_SOURCE_DIR}/src/misc/windows/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${MISC_SOURCES})
|
||||
set(HAVE_SDL_MISC TRUE)
|
||||
|
||||
# Check for DirectX
|
||||
if(DIRECTX)
|
||||
if(DEFINED MSVC_VERSION AND NOT ${MSVC_VERSION} LESS 1700)
|
||||
|
@ -1342,6 +1439,9 @@ elseif(WINDOWS)
|
|||
check_include_file(ddraw.h HAVE_DDRAW_H)
|
||||
check_include_file(dsound.h HAVE_DSOUND_H)
|
||||
check_include_file(dinput.h HAVE_DINPUT_H)
|
||||
if(WINDOWS_STORE OR VCPKG_TARGET_TRIPLET MATCHES "arm-windows")
|
||||
set(HAVE_DINPUT_H 0)
|
||||
endif()
|
||||
check_include_file(dxgi.h HAVE_DXGI_H)
|
||||
if(HAVE_D3D_H OR HAVE_D3D11_H OR HAVE_DDRAW_H OR HAVE_DSOUND_H OR HAVE_DINPUT_H)
|
||||
set(HAVE_DIRECTX TRUE)
|
||||
|
@ -1357,20 +1457,23 @@ elseif(WINDOWS)
|
|||
# headers needed elsewhere
|
||||
check_include_file(mmdeviceapi.h HAVE_MMDEVICEAPI_H)
|
||||
check_include_file(audioclient.h HAVE_AUDIOCLIENT_H)
|
||||
check_include_file(sensorsapi.h HAVE_SENSORSAPI_H)
|
||||
|
||||
if(SDL_AUDIO)
|
||||
if(NOT WINDOWS_STORE)
|
||||
set(SDL_AUDIO_DRIVER_WINMM 1)
|
||||
file(GLOB WINMM_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/winmm/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${WINMM_AUDIO_SOURCES})
|
||||
endif()
|
||||
set(HAVE_SDL_AUDIO TRUE)
|
||||
|
||||
if(HAVE_DSOUND_H)
|
||||
if(HAVE_DSOUND_H AND NOT WINDOWS_STORE)
|
||||
set(SDL_AUDIO_DRIVER_DSOUND 1)
|
||||
file(GLOB DSOUND_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/directsound/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${DSOUND_AUDIO_SOURCES})
|
||||
endif()
|
||||
|
||||
if(WASAPI AND HAVE_AUDIOCLIENT_H AND HAVE_MMDEVICEAPI_H)
|
||||
if(WASAPI AND HAVE_AUDIOCLIENT_H AND HAVE_MMDEVICEAPI_H AND NOT WINDOWS_STORE)
|
||||
set(SDL_AUDIO_DRIVER_WASAPI 1)
|
||||
file(GLOB WASAPI_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/wasapi/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${WASAPI_AUDIO_SOURCES})
|
||||
|
@ -1382,11 +1485,20 @@ elseif(WINDOWS)
|
|||
if(NOT SDL_LOADSO)
|
||||
message_error("SDL_VIDEO requires SDL_LOADSO, which is not enabled")
|
||||
endif()
|
||||
if(WINDOWS_STORE)
|
||||
set(SDL_VIDEO_DRIVER_WINRT 1)
|
||||
file(GLOB WIN_VIDEO_SOURCES
|
||||
${SDL2_SOURCE_DIR}/src/video/winrt/*.c
|
||||
${SDL2_SOURCE_DIR}/src/video/winrt/*.cpp
|
||||
${SDL2_SOURCE_DIR}/src/render/direct3d11/*.cpp
|
||||
)
|
||||
else()
|
||||
set(SDL_VIDEO_DRIVER_WINDOWS 1)
|
||||
file(GLOB WIN_VIDEO_SOURCES ${SDL2_SOURCE_DIR}/src/video/windows/*.c)
|
||||
endif()
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${WIN_VIDEO_SOURCES})
|
||||
|
||||
if(RENDER_D3D AND HAVE_D3D_H)
|
||||
if(RENDER_D3D AND HAVE_D3D_H AND NOT WINDOWS_STORE)
|
||||
set(SDL_VIDEO_RENDER_D3D 1)
|
||||
set(HAVE_RENDER_D3D TRUE)
|
||||
endif()
|
||||
|
@ -1408,21 +1520,45 @@ elseif(WINDOWS)
|
|||
set(HAVE_SDL_THREADS TRUE)
|
||||
endif()
|
||||
|
||||
if(SDL_SENSOR AND HAVE_SENSORSAPI_H)
|
||||
set(SDL_SENSOR_WINDOWS 1)
|
||||
set(HAVE_SDL_SENSORS TRUE)
|
||||
file(GLOB WINDOWS_SENSOR_SOURCES ${SDL2_SOURCE_DIR}/src/sensor/windows/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${WINDOWS_SENSOR_SOURCES})
|
||||
endif()
|
||||
|
||||
if(SDL_POWER)
|
||||
set(SDL_POWER_WINDOWS 1)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${SDL2_SOURCE_DIR}/src/power/windows/SDL_syspower.c)
|
||||
set(HAVE_SDL_POWER TRUE)
|
||||
if(WINDOWS_STORE)
|
||||
set(SDL_POWER_WINRT 1)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${SDL2_SOURCE_DIR}/src/power/winrt/SDL_syspower.cpp)
|
||||
else()
|
||||
set(SDL_POWER_WINDOWS 1)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${SDL2_SOURCE_DIR}/src/power/windows/SDL_syspower.c)
|
||||
set(HAVE_SDL_POWER TRUE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(SDL_LOCALE)
|
||||
file(GLOB LOCALE_SOURCES ${SDL2_SOURCE_DIR}/src/locale/windows/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${LOCALE_SOURCES})
|
||||
set(HAVE_SDL_LOCALE TRUE)
|
||||
endif()
|
||||
|
||||
if(SDL_FILESYSTEM)
|
||||
set(SDL_FILESYSTEM_WINDOWS 1)
|
||||
file(GLOB FILESYSTEM_SOURCES ${SDL2_SOURCE_DIR}/src/filesystem/windows/*.c)
|
||||
if(WINDOWS_STORE)
|
||||
file(GLOB FILESYSTEM_SOURCES ${SDL2_SOURCE_DIR}/src/filesystem/winrt/*.cpp)
|
||||
else()
|
||||
file(GLOB FILESYSTEM_SOURCES ${SDL2_SOURCE_DIR}/src/filesystem/windows/*.c)
|
||||
endif()
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${FILESYSTEM_SOURCES})
|
||||
set(HAVE_SDL_FILESYSTEM TRUE)
|
||||
endif()
|
||||
|
||||
# Libraries for Win32 native and MinGW
|
||||
list(APPEND EXTRA_LIBS user32 gdi32 winmm imm32 ole32 oleaut32 version uuid advapi32 setupapi shell32)
|
||||
if(NOT WINDOWS_STORE)
|
||||
list(APPEND EXTRA_LIBS user32 gdi32 winmm imm32 ole32 oleaut32 version uuid advapi32 setupapi shell32)
|
||||
endif()
|
||||
|
||||
# TODO: in configure.ac the check for timers is set on
|
||||
# cygwin | mingw32* - does this include mingw32CE?
|
||||
|
@ -1444,7 +1580,7 @@ elseif(WINDOWS)
|
|||
set(SOURCE_FILES ${SOURCE_FILES} ${CORE_SOURCES})
|
||||
|
||||
if(SDL_VIDEO)
|
||||
if(VIDEO_OPENGL)
|
||||
if(VIDEO_OPENGL AND NOT WINDOWS_STORE)
|
||||
set(SDL_VIDEO_OPENGL 1)
|
||||
set(SDL_VIDEO_OPENGL_WGL 1)
|
||||
set(SDL_VIDEO_RENDER_OGL 1)
|
||||
|
@ -1470,11 +1606,6 @@ elseif(WINDOWS)
|
|||
if(HAVE_DINPUT_H)
|
||||
set(SDL_JOYSTICK_DINPUT 1)
|
||||
list(APPEND EXTRA_LIBS dinput8)
|
||||
if(CMAKE_COMPILER_IS_MINGW)
|
||||
list(APPEND EXTRA_LIBS dxerr8)
|
||||
elseif (NOT USE_WINSDK_DIRECTX)
|
||||
list(APPEND EXTRA_LIBS dxerr)
|
||||
endif()
|
||||
endif()
|
||||
if(HAVE_XINPUT_H)
|
||||
set(SDL_JOYSTICK_XINPUT 1)
|
||||
|
@ -1537,6 +1668,10 @@ elseif(APPLE)
|
|||
message_error("SDL_FILE must be enabled to build on MacOS X")
|
||||
endif()
|
||||
|
||||
file(GLOB MISC_SOURCES ${SDL2_SOURCE_DIR}/src/misc/macosx/*.m)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${MISC_SOURCES})
|
||||
set(HAVE_SDL_MISC TRUE)
|
||||
|
||||
if(SDL_AUDIO)
|
||||
set(SDL_AUDIO_DRIVER_COREAUDIO 1)
|
||||
file(GLOB AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/coreaudio/*.m)
|
||||
|
@ -1566,7 +1701,8 @@ elseif(APPLE)
|
|||
set(SDL_FRAMEWORK_GAMECONTROLLER 1)
|
||||
set(HAVE_SDL_SENSORS 1)
|
||||
else()
|
||||
file(GLOB JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/darwin/*.c)
|
||||
file(GLOB JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/darwin/*.c ${SDL2_SOURCE_DIR}/src/joystick/iphoneos/*.m)
|
||||
# FIXME: add checks for SDL_JOYSTICK_MFI???
|
||||
set(SDL_JOYSTICK_IOKIT 1)
|
||||
set(SDL_FRAMEWORK_IOKIT 1)
|
||||
set(SDL_FRAMEWORK_FF 1)
|
||||
|
@ -1605,6 +1741,12 @@ elseif(APPLE)
|
|||
set(HAVE_SDL_POWER TRUE)
|
||||
endif()
|
||||
|
||||
if(SDL_LOCALE)
|
||||
file(GLOB LOCALE_SOURCES ${SDL2_SOURCE_DIR}/src/locale/macosx/*.m)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${LOCALE_SOURCES})
|
||||
set(HAVE_SDL_LOCALE TRUE)
|
||||
endif()
|
||||
|
||||
if(SDL_TIMERS)
|
||||
set(SDL_TIMER_UNIX 1)
|
||||
file(GLOB TIMER_SOURCES ${SDL2_SOURCE_DIR}/src/timer/unix/*.c)
|
||||
|
@ -1666,7 +1808,7 @@ elseif(APPLE)
|
|||
|
||||
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")
|
||||
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -ObjC")
|
||||
check_c_source_compiles("
|
||||
#include <AvailabilityMacros.h>
|
||||
#import <Metal/Metal.h>
|
||||
|
@ -1785,24 +1927,16 @@ elseif(APPLE)
|
|||
CheckPTHREAD()
|
||||
|
||||
elseif(HAIKU)
|
||||
file(GLOB MISC_SOURCES ${SDL2_SOURCE_DIR}/src/misc/haiku/*.cc)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${MISC_SOURCES})
|
||||
set(HAVE_SDL_MISC TRUE)
|
||||
|
||||
if(SDL_VIDEO)
|
||||
set(SDL_VIDEO_DRIVER_HAIKU 1)
|
||||
file(GLOB HAIKUVIDEO_SOURCES ${SDL2_SOURCE_DIR}/src/video/haiku/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${HAIKUVIDEO_SOURCES})
|
||||
set(HAVE_SDL_VIDEO TRUE)
|
||||
|
||||
set(SDL_FILESYSTEM_HAIKU 1)
|
||||
file(GLOB FILESYSTEM_SOURCES ${SDL2_SOURCE_DIR}/src/filesystem/haiku/*.cc)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${FILESYSTEM_SOURCES})
|
||||
set(HAVE_SDL_FILESYSTEM TRUE)
|
||||
|
||||
if(SDL_TIMERS)
|
||||
set(SDL_TIMER_HAIKU 1)
|
||||
file(GLOB TIMER_SOURCES ${SDL2_SOURCE_DIR}/src/timer/haiku/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${TIMER_SOURCES})
|
||||
set(HAVE_SDL_TIMERS TRUE)
|
||||
endif(SDL_TIMERS)
|
||||
|
||||
if(VIDEO_OPENGL)
|
||||
# TODO: Use FIND_PACKAGE(OpenGL) instead
|
||||
set(SDL_VIDEO_OPENGL 1)
|
||||
|
@ -1813,9 +1947,31 @@ elseif(HAIKU)
|
|||
endif()
|
||||
endif()
|
||||
|
||||
set(SDL_FILESYSTEM_HAIKU 1)
|
||||
file(GLOB FILESYSTEM_SOURCES ${SDL2_SOURCE_DIR}/src/filesystem/haiku/*.cc)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${FILESYSTEM_SOURCES})
|
||||
set(HAVE_SDL_FILESYSTEM TRUE)
|
||||
|
||||
if(SDL_TIMERS)
|
||||
set(SDL_TIMER_HAIKU 1)
|
||||
file(GLOB TIMER_SOURCES ${SDL2_SOURCE_DIR}/src/timer/haiku/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${TIMER_SOURCES})
|
||||
set(HAVE_SDL_TIMERS TRUE)
|
||||
endif()
|
||||
|
||||
if(SDL_LOCALE)
|
||||
file(GLOB LOCALE_SOURCES ${SDL2_SOURCE_DIR}/src/locale/haiku/*.cc)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${LOCALE_SOURCES})
|
||||
set(HAVE_SDL_LOCALE TRUE)
|
||||
endif()
|
||||
|
||||
CheckPTHREAD()
|
||||
|
||||
elseif(RISCOS)
|
||||
file(GLOB MISC_SOURCES ${SDL2_SOURCE_DIR}/src/misc/riscos/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${MISC_SOURCES})
|
||||
set(HAVE_SDL_MISC TRUE)
|
||||
|
||||
if(SDL_TIMERS)
|
||||
set(SDL_TIMER_UNIX 1)
|
||||
file(GLOB TIMER_SOURCES ${SDL2_SOURCE_DIR}/src/timer/unix/*.c)
|
||||
|
@ -1850,7 +2006,6 @@ endif()
|
|||
if(NOT HAVE_SDL_JOYSTICK)
|
||||
set(SDL_JOYSTICK_DUMMY 1)
|
||||
if(SDL_JOYSTICK AND NOT APPLE) # results in unresolved symbols on OSX
|
||||
|
||||
file(GLOB JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/dummy/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${JOYSTICK_SOURCES})
|
||||
endif()
|
||||
|
@ -1875,6 +2030,16 @@ if(NOT HAVE_SDL_FILESYSTEM)
|
|||
file(GLOB FILESYSTEM_SOURCES ${SDL2_SOURCE_DIR}/src/filesystem/dummy/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${FILESYSTEM_SOURCES})
|
||||
endif()
|
||||
if(NOT HAVE_SDL_LOCALE)
|
||||
set(SDL_LOCALE_DISABLED 1)
|
||||
file(GLOB LOCALE_SOURCES ${SDL2_SOURCE_DIR}/src/locale/dummy/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${LOCALE_SOURCES})
|
||||
endif()
|
||||
if(NOT HAVE_SDL_MISC)
|
||||
set(SDL_MISC_DISABLED 1)
|
||||
file(GLOB LOCALE_SOURCES ${SDL2_SOURCE_DIR}/src/misc/dummy/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${LOCALE_SOURCES})
|
||||
endif()
|
||||
|
||||
# We always need to have threads and timers around
|
||||
if(NOT HAVE_SDL_THREADS)
|
||||
|
@ -1916,10 +2081,12 @@ listtostr(EXTRA_CFLAGS _EXTRA_CFLAGS)
|
|||
set(EXTRA_CFLAGS ${_EXTRA_CFLAGS})
|
||||
|
||||
# Compat helpers for the configuration files
|
||||
if(NOT WINDOWS OR CYGWIN)
|
||||
if(NOT CMAKE_HOST_WIN32)
|
||||
# TODO: we need a Windows script, too
|
||||
execute_process(COMMAND sh ${SDL2_SOURCE_DIR}/build-scripts/updaterev.sh)
|
||||
|
||||
execute_process(COMMAND sh ${SDL2_SOURCE_DIR}/build-scripts/updaterev.sh
|
||||
WORKING_DIRECTORY ${SDL2_BINARY_DIR})
|
||||
endif()
|
||||
if(NOT WINDOWS OR CYGWIN)
|
||||
set(prefix ${CMAKE_INSTALL_PREFIX})
|
||||
set(exec_prefix "\${prefix}")
|
||||
set(libdir "\${exec_prefix}/lib${LIB_SUFFIX}")
|
||||
|
@ -1933,16 +2100,19 @@ if(NOT WINDOWS OR CYGWIN)
|
|||
set(ENABLE_STATIC_FALSE "")
|
||||
endif()
|
||||
if(SDL_SHARED)
|
||||
set(PKG_CONFIG_LIBS_PRIV "
|
||||
Libs.private:")
|
||||
set(ENABLE_SHARED_TRUE "")
|
||||
set(ENABLE_SHARED_FALSE "#")
|
||||
else()
|
||||
set(PKG_CONFIG_LIBS_PRIV "")
|
||||
set(ENABLE_SHARED_TRUE "#")
|
||||
set(ENABLE_SHARED_FALSE "")
|
||||
endif()
|
||||
|
||||
# Clean up the different lists
|
||||
listtostr(EXTRA_LIBS _EXTRA_LIBS "-l")
|
||||
set(SDL_STATIC_LIBS ${SDL_LIBS} ${EXTRA_LDFLAGS} ${_EXTRA_LIBS})
|
||||
set(SDL_STATIC_LIBS ${EXTRA_LDFLAGS} ${_EXTRA_LIBS})
|
||||
list(REMOVE_DUPLICATES SDL_STATIC_LIBS)
|
||||
listtostr(SDL_STATIC_LIBS _SDL_STATIC_LIBS)
|
||||
set(SDL_STATIC_LIBS ${_SDL_STATIC_LIBS})
|
||||
|
@ -2027,12 +2197,14 @@ endif()
|
|||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
|
||||
|
||||
# Always build SDLmain
|
||||
if(NOT WINDOWS_STORE)
|
||||
add_library(SDL2main STATIC ${SDLMAIN_SOURCES})
|
||||
target_include_directories(SDL2main PUBLIC "$<BUILD_INTERFACE:${SDL2_SOURCE_DIR}/include>" $<INSTALL_INTERFACE:include> $<INSTALL_INTERFACE:include/SDL2>)
|
||||
set(_INSTALL_LIBS "SDL2main")
|
||||
if (NOT ANDROID)
|
||||
set_target_properties(SDL2main PROPERTIES DEBUG_POSTFIX "${SDL_CMAKE_DEBUG_POSTFIX}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (ANDROID AND HAVE_HIDAPI)
|
||||
set(_INSTALL_LIBS ${_INSTALL_LIBS} "hidapi")
|
||||
|
@ -2050,6 +2222,10 @@ if(SDL_SHARED)
|
|||
SOVERSION ${LT_REVISION}
|
||||
OUTPUT_NAME "SDL2-${LT_RELEASE}")
|
||||
else()
|
||||
if(WINDOWS OR CYGWIN)
|
||||
set_target_properties(SDL2 PROPERTIES
|
||||
DEFINE_SYMBOL DLL_EXPORT)
|
||||
endif()
|
||||
set_target_properties(SDL2 PROPERTIES
|
||||
VERSION ${SDL_VERSION}
|
||||
SOVERSION ${LT_REVISION}
|
||||
|
@ -2062,9 +2238,11 @@ if(SDL_SHARED)
|
|||
set_target_properties(SDL2 PROPERTIES STATIC_LIBRARY_FLAGS "/NODEFAULTLIB")
|
||||
endif()
|
||||
set(_INSTALL_LIBS "SDL2" ${_INSTALL_LIBS})
|
||||
target_link_libraries(SDL2 ${EXTRA_LIBS} ${EXTRA_LDFLAGS})
|
||||
target_link_libraries(SDL2 PRIVATE ${EXTRA_LIBS} ${EXTRA_LDFLAGS})
|
||||
target_include_directories(SDL2 PUBLIC "$<BUILD_INTERFACE:${SDL2_SOURCE_DIR}/include>" $<INSTALL_INTERFACE:include> $<INSTALL_INTERFACE:include/SDL2>)
|
||||
if (NOT ANDROID)
|
||||
if(ANDROID)
|
||||
target_include_directories(SDL2 PRIVATE ${ANDROID_NDK}/sources/android/cpufeatures)
|
||||
else()
|
||||
set_target_properties(SDL2 PROPERTIES DEBUG_POSTFIX "${SDL_CMAKE_DEBUG_POSTFIX}")
|
||||
endif()
|
||||
if(IOS OR TVOS)
|
||||
|
@ -2110,7 +2288,9 @@ if(SDL_STATIC)
|
|||
set(_INSTALL_LIBS "SDL2-static" ${_INSTALL_LIBS})
|
||||
target_link_libraries(SDL2-static ${EXTRA_LIBS} ${EXTRA_LDFLAGS})
|
||||
target_include_directories(SDL2-static PUBLIC "$<BUILD_INTERFACE:${SDL2_SOURCE_DIR}/include>" $<INSTALL_INTERFACE:include> $<INSTALL_INTERFACE:include/SDL2>)
|
||||
if (NOT ANDROID)
|
||||
if(ANDROID)
|
||||
target_include_directories(SDL2-static PRIVATE ${ANDROID_NDK}/sources/android/cpufeatures)
|
||||
else()
|
||||
set_target_properties(SDL2-static PROPERTIES DEBUG_POSTFIX "${SDL_CMAKE_DEBUG_POSTFIX}")
|
||||
endif()
|
||||
if(IOS OR TVOS)
|
||||
|
|
7
externals/SDL/Makefile.in
vendored
7
externals/SDL/Makefile.in
vendored
|
@ -28,7 +28,7 @@ LIBTOOL = @LIBTOOL@
|
|||
INSTALL = @INSTALL@
|
||||
AR = @AR@
|
||||
RANLIB = @RANLIB@
|
||||
WINDRES = @WINDRES@
|
||||
RC = @RC@
|
||||
|
||||
TARGET = libSDL2.la
|
||||
OBJECTS = @OBJECTS@
|
||||
|
@ -55,6 +55,7 @@ RUN_CMD_CC = @echo " CC " $@;
|
|||
RUN_CMD_CXX = @echo " CXX " $@;
|
||||
RUN_CMD_LTLINK = @echo " LTLINK" $@;
|
||||
RUN_CMD_RANLIB = @echo " RANLIB" $@;
|
||||
RUN_CMD_RC = @echo " RC " $@;
|
||||
RUN_CMD_GEN = @echo " GEN " $@;
|
||||
LIBTOOL += --quiet
|
||||
endif
|
||||
|
@ -81,10 +82,12 @@ HDRS = \
|
|||
SDL_keyboard.h \
|
||||
SDL_keycode.h \
|
||||
SDL_loadso.h \
|
||||
SDL_locale.h \
|
||||
SDL_log.h \
|
||||
SDL_main.h \
|
||||
SDL_messagebox.h \
|
||||
SDL_metal.h \
|
||||
SDL_misc.h \
|
||||
SDL_mouse.h \
|
||||
SDL_mutex.h \
|
||||
SDL_name.h \
|
||||
|
@ -175,7 +178,7 @@ install-hdrs: update-revision
|
|||
$(INSTALL) -m 644 $(srcdir)/include/SDL_revision.h $(DESTDIR)$(includedir)/SDL2/SDL_revision.h; \
|
||||
fi
|
||||
|
||||
install-lib: $(objects) $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET) $(objects)/$(SDLTEST_TARGET)
|
||||
install-lib: $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET) $(objects)/$(SDLTEST_TARGET)
|
||||
$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)
|
||||
$(LIBTOOL) --mode=install $(INSTALL) $(objects)/$(TARGET) $(DESTDIR)$(libdir)/$(TARGET)
|
||||
$(LIBTOOL) --mode=install $(INSTALL) $(objects)/$(SDLMAIN_TARGET) $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET)
|
||||
|
|
33
externals/SDL/Makefile.os2
vendored
33
externals/SDL/Makefile.os2
vendored
|
@ -2,18 +2,17 @@
|
|||
# wmake -f Makefile.os2
|
||||
|
||||
LIBNAME = SDL2
|
||||
VERSION = 2.0.12
|
||||
VERSION = 2.0.14
|
||||
DESCRIPTION = Simple DirectMedia Layer 2
|
||||
|
||||
LIBHOME = .
|
||||
LIBPATH = $(LIBHOME)/lib
|
||||
DLLFILE = $(LIBHOME)/$(LIBNAME).dll
|
||||
LIBFILE = $(LIBHOME)/$(LIBNAME).lib
|
||||
LNKFILE = $(LIBNAME).lnk
|
||||
|
||||
INCPATH = -I"$(%WATCOM)/h/os2" -I"$(%WATCOM)/h"
|
||||
INCPATH+= -I"$(LIBHOME)/h"
|
||||
INCPATH+= -Iinclude
|
||||
INCPATH+= -I"src/core/os2" -I"src/core/os2/geniconv"
|
||||
|
||||
LIBM = libm.lib
|
||||
LIBS = mmpm2.lib libuls.lib libconv.lib $(LIBM)
|
||||
|
@ -21,6 +20,8 @@ LIBS = mmpm2.lib libuls.lib libconv.lib $(LIBM)
|
|||
CFLAGS = -bt=os2 -d0 -q -bm -5s -fp5 -fpi87 -sg -oteanbmier -ei
|
||||
# max warnings:
|
||||
CFLAGS+= -wx
|
||||
# newer OpenWatcom versions enable W303 by default
|
||||
CFLAGS+= -wcd=303
|
||||
# building dll:
|
||||
CFLAGS+= -bd
|
||||
# the include paths :
|
||||
|
@ -28,12 +29,18 @@ CFLAGS+= $(INCPATH)
|
|||
# building SDL itself (for DECLSPEC):
|
||||
CFLAGS+= -DBUILD_SDL
|
||||
|
||||
# Debug options:
|
||||
# - debug messages from OS/2 related code to stdout:
|
||||
#CFLAGS+= -DOS2DEBUG
|
||||
# - debug messages from OS/2 code via SDL_LogDebug():
|
||||
#CFLAGS+= -DOS2DEBUG=2
|
||||
|
||||
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_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 SDL_strtokr.c SDL_crc32.c
|
||||
SRCS+= SDL_cpuinfo.c SDL_atomic.c SDL_spinlock.c SDL_thread.c SDL_timer.c
|
||||
SRCS+= SDL_rwops.c SDL_power.c
|
||||
SRCS+= SDL_audio.c SDL_audiocvt.c SDL_audiodev.c SDL_audiotypecvt.c SDL_mixer.c SDL_wave.c
|
||||
|
@ -54,9 +61,17 @@ SRCS+= SDL_systimer.c
|
|||
SRCS+= SDL_sysloadso.c
|
||||
SRCS+= SDL_sysfilesystem.c
|
||||
SRCS+= SDL_syshaptic.c SDL_sysjoystick.c
|
||||
SRCS+= SDL_virtualjoystick.c
|
||||
SRCS+= SDL_dummyaudio.c SDL_diskaudio.c
|
||||
SRCS+= SDL_nullvideo.c SDL_nullframebuffer.c SDL_nullevents.c
|
||||
SRCS+= SDL_dummysensor.c
|
||||
SRCS+= SDL_locale.c SDL_syslocale.c
|
||||
SRCS+= SDL_url.c SDL_sysurl.c
|
||||
|
||||
SRCS+= SDL_os2.c geniconv.c os2cp.c os2iconv.c sys2utf8.c
|
||||
SRCS+= SDL_os2audio.c
|
||||
SRCS+= SDL_os2video.c SDL_os2util.c SDL_os2dive.c SDL_os2vman.c &
|
||||
SDL_os2mouse.c SDL_os2messagebox.c
|
||||
|
||||
SRCS+= SDL_dynapi.c
|
||||
|
||||
|
@ -67,8 +82,9 @@ MOBJS= $(MSRCS:.c=.obj)
|
|||
.extensions: .lib .dll .obj .c .asm
|
||||
|
||||
.c: ./src;./src/dynapi;./src/audio;./src/cpuinfo;./src/events;./src/file;./src/haptic;./src/joystick;./src/power;./src/render;./src/render/software;./src/sensor;./src/stdlib;./src/thread;./src/timer;./src/video;./src/video/yuv2rgb;./src/atomic;./src/audio/disk;
|
||||
.c: ./src/haptic/dummy;./src/joystick/dummy;./src/audio/dummy;./src/video/dummy;./src/sensor/dummy;
|
||||
.c: ./src/loadso/dummy;./src/filesystem/dummy;./src/timer/dummy;./src/thread/generic;
|
||||
.c: ./src/haptic/dummy;./src/joystick/dummy;./src/joystick/virtual;./src/audio/dummy;./src/video/dummy;./src/sensor/dummy;
|
||||
.c: ./src/core/os2;./src/core/os2/geniconv;./src/audio/os2;./src/loadso/os2;./src/filesystem/os2;./src/thread/os2;./src/timer/os2;./src/video/os2;
|
||||
.c: ./src/locale/;./src/locale/unix;./src/misc;./src/misc/dummy
|
||||
|
||||
all: $(DLLFILE) $(LIBFILE) .symbolic
|
||||
|
||||
|
@ -83,6 +99,9 @@ $(LIBFILE): $(DLLFILE)
|
|||
.c.obj:
|
||||
wcc386 $(CFLAGS) -fo=$^@ $<
|
||||
|
||||
SDL_syscond.obj: "src/thread/generic/SDL_syscond.c"
|
||||
wcc386 $(CFLAGS) -fo=$^@ $<
|
||||
|
||||
SDL_cpuinfo.obj: SDL_cpuinfo.c
|
||||
wcc386 $(CFLAGS) -wcd=200 -fo=$^@ $<
|
||||
|
||||
|
@ -114,13 +133,11 @@ $(LNKFILE):
|
|||
@%append $@ SYSTEM os2v2_dll INITINSTANCE TERMINSTANCE
|
||||
@%append $@ NAME $(DLLFILE)
|
||||
@for %i in ($(OBJS)) do @%append $@ FILE %i
|
||||
@%append $@ LIBPATH $(%LIB);$(LIBPATH)
|
||||
@for %i in ($(LIBS)) do @%append $@ LIB %i
|
||||
@%append $@ OPTION QUIET
|
||||
@%append $@ OPTION IMPF=$(LIBHOME)/$^&.exp
|
||||
@%append $@ OPTION MAP=$(LIBHOME)/$^&.map
|
||||
@%append $@ OPTION DESCRIPTION '@$#libsdl org:$(VERSION)$#@$(DESCRIPTION)'
|
||||
@%append $@ OPTION QUIET
|
||||
@%append $@ OPTION ELIMINATE
|
||||
@%append $@ OPTION MANYAUTODATA
|
||||
@%append $@ OPTION OSNAME='OS/2 and eComStation'
|
||||
|
|
|
@ -52,8 +52,10 @@
|
|||
<ClInclude Include="..\..\include\SDL_keyboard.h" />
|
||||
<ClInclude Include="..\..\include\SDL_keycode.h" />
|
||||
<ClInclude Include="..\..\include\SDL_loadso.h" />
|
||||
<ClInclude Include="..\..\include\SDL_locale.h" />
|
||||
<ClInclude Include="..\..\include\SDL_log.h" />
|
||||
<ClInclude Include="..\..\include\SDL_main.h" />
|
||||
<ClInclude Include="..\..\include\SDL_misc.h" />
|
||||
<ClInclude Include="..\..\include\SDL_mouse.h" />
|
||||
<ClInclude Include="..\..\include\SDL_mutex.h" />
|
||||
<ClInclude Include="..\..\include\SDL_name.h" />
|
||||
|
@ -114,9 +116,11 @@
|
|||
<ClInclude Include="..\..\src\joystick\SDL_gamecontrollerdb.h" />
|
||||
<ClInclude Include="..\..\src\joystick\SDL_joystick_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\SDL_sysjoystick.h" />
|
||||
<ClInclude Include="..\..\src\joystick\virtual\SDL_virtualjoystick_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\windows\SDL_dinputjoystick_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\windows\SDL_windowsjoystick_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\windows\SDL_xinputjoystick_c.h" />
|
||||
<ClInclude Include="..\..\src\locale\SDL_syslocale.h" />
|
||||
<ClInclude Include="..\..\src\render\direct3d11\SDL_render_winrt.h" />
|
||||
<ClInclude Include="..\..\src\render\direct3d11\SDL_shaders_d3d11.h" />
|
||||
<ClInclude Include="..\..\src\render\opengles2\SDL_gles2funcs.h" />
|
||||
|
@ -243,10 +247,22 @@
|
|||
<ClCompile Include="..\..\src\joystick\dummy\SDL_sysjoystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\SDL_gamecontroller.c" />
|
||||
<ClCompile Include="..\..\src\joystick\SDL_joystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\virtual\SDL_virtualjoystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\windows\SDL_dinputjoystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\windows\SDL_windowsjoystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\windows\SDL_xinputjoystick.c" />
|
||||
<ClCompile Include="..\..\src\loadso\windows\SDL_sysloadso.c" />
|
||||
<ClCompile Include="..\..\src\locale\SDL_locale.c" />
|
||||
<ClCompile Include="..\..\src\locale\winrt\SDL_syslocale.c" />
|
||||
<ClCompile Include="..\..\src\misc\SDL_url.c" />
|
||||
<ClCompile Include="..\..\src\misc\winrt\SDL_sysurl.cpp">
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</CompileAsWinRT>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\power\SDL_power.c" />
|
||||
<ClCompile Include="..\..\src\power\winrt\SDL_syspower.cpp" />
|
||||
<ClCompile Include="..\..\src\render\direct3d11\SDL_render_d3d11.c" />
|
||||
|
@ -279,6 +295,7 @@
|
|||
<ClCompile Include="..\..\src\SDL_log.c" />
|
||||
<ClCompile Include="..\..\src\sensor\dummy\SDL_dummysensor.c" />
|
||||
<ClCompile Include="..\..\src\sensor\SDL_sensor.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_crc32.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_getenv.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_iconv.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_malloc.c" />
|
||||
|
@ -491,7 +508,7 @@
|
|||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<CompileAsWinRT>false</CompileAsWinRT>
|
||||
<AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;SDL_BUILDING_WINRT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>DLL_EXPORT;_CRT_SECURE_NO_WARNINGS;SDL_BUILDING_WINRT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -505,7 +522,7 @@
|
|||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<CompileAsWinRT>false</CompileAsWinRT>
|
||||
<AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;SDL_BUILDING_WINRT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>DLL_EXPORT;_CRT_SECURE_NO_WARNINGS;SDL_BUILDING_WINRT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -519,7 +536,7 @@
|
|||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<CompileAsWinRT>false</CompileAsWinRT>
|
||||
<AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;SDL_BUILDING_WINRT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>DLL_EXPORT;_CRT_SECURE_NO_WARNINGS;SDL_BUILDING_WINRT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -533,7 +550,7 @@
|
|||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<CompileAsWinRT>false</CompileAsWinRT>
|
||||
<AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;SDL_BUILDING_WINRT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>DLL_EXPORT;_CRT_SECURE_NO_WARNINGS;SDL_BUILDING_WINRT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -547,7 +564,7 @@
|
|||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<CompileAsWinRT>false</CompileAsWinRT>
|
||||
<AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;SDL_BUILDING_WINRT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>DLL_EXPORT;_CRT_SECURE_NO_WARNINGS;SDL_BUILDING_WINRT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -561,7 +578,7 @@
|
|||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<CompileAsWinRT>false</CompileAsWinRT>
|
||||
<AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;SDL_BUILDING_WINRT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>DLL_EXPORT;_CRT_SECURE_NO_WARNINGS;SDL_BUILDING_WINRT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -573,4 +590,4 @@
|
|||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
|
|
|
@ -84,6 +84,9 @@
|
|||
<ClInclude Include="..\..\include\SDL_loadso.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_locale.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_log.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
|
@ -252,6 +255,9 @@
|
|||
<ClInclude Include="..\..\src\joystick\SDL_sysjoystick.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\joystick\virtual\SDL_virtualjoystick_c.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\joystick\windows\SDL_dinputjoystick_c.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
|
@ -318,6 +324,9 @@
|
|||
<ClInclude Include="..\..\src\SDL_internal.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\locale\SDL_syslocale.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\thread\SDL_systhread.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
|
@ -429,6 +438,9 @@
|
|||
<ClInclude Include="..\..\src\events\SDL_displayevents_c.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_misc.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\src\atomic\SDL_atomic.c">
|
||||
|
@ -533,6 +545,9 @@
|
|||
<ClCompile Include="..\..\src\joystick\SDL_joystick.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\joystick\virtual\SDL_virtualjoystick.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\joystick\windows\SDL_dinputjoystick.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
|
@ -608,6 +623,15 @@
|
|||
<ClCompile Include="..\..\src\SDL_log.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\locale\SDL_locale.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\locale\winrt\SDL_syslocale.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_crc32.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_getenv.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
|
@ -773,5 +797,11 @@
|
|||
<ClCompile Include="..\..\src\events\SDL_displayevents.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\misc\winrt\SDL_sysurl.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\misc\SDL_url.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
|
|
|
@ -44,8 +44,10 @@
|
|||
<ClInclude Include="..\..\include\SDL_keyboard.h" />
|
||||
<ClInclude Include="..\..\include\SDL_keycode.h" />
|
||||
<ClInclude Include="..\..\include\SDL_loadso.h" />
|
||||
<ClInclude Include="..\..\include\SDL_locale.h" />
|
||||
<ClInclude Include="..\..\include\SDL_log.h" />
|
||||
<ClInclude Include="..\..\include\SDL_main.h" />
|
||||
<ClInclude Include="..\..\include\SDL_misc.h" />
|
||||
<ClInclude Include="..\..\include\SDL_mouse.h" />
|
||||
<ClInclude Include="..\..\include\SDL_mutex.h" />
|
||||
<ClInclude Include="..\..\include\SDL_name.h" />
|
||||
|
@ -101,6 +103,7 @@
|
|||
<ClInclude Include="..\..\src\joystick\SDL_gamecontrollerdb.h" />
|
||||
<ClInclude Include="..\..\src\joystick\SDL_joystick_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\SDL_sysjoystick.h" />
|
||||
<ClInclude Include="..\..\src\joystick\virtual\SDL_virtualjoystick_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\windows\SDL_xinputjoystick_c.h" />
|
||||
<ClInclude Include="..\..\src\render\direct3d11\SDL_render_winrt.h" />
|
||||
<ClInclude Include="..\..\src\render\direct3d11\SDL_shaders_d3d11.h" />
|
||||
|
@ -123,6 +126,7 @@
|
|||
<ClInclude Include="..\..\src\SDL_fatal.h" />
|
||||
<ClInclude Include="..\..\src\SDL_hints_c.h" />
|
||||
<ClInclude Include="..\..\src\SDL_internal.h" />
|
||||
<ClInclude Include="..\..\src\locale\SDL_syslocale.h" />
|
||||
<ClInclude Include="..\..\src\sensor\dummy\SDL_dummysensor.h" />
|
||||
<ClInclude Include="..\..\src\sensor\SDL_sensor_c.h" />
|
||||
<ClInclude Include="..\..\src\sensor\SDL_syssensor.h" />
|
||||
|
@ -213,6 +217,7 @@
|
|||
<ClCompile Include="..\..\src\joystick\dummy\SDL_sysjoystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\SDL_gamecontroller.c" />
|
||||
<ClCompile Include="..\..\src\joystick\SDL_joystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\virtual\SDL_virtualjoystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\windows\SDL_xinputjoystick.c" />
|
||||
<ClCompile Include="..\..\src\loadso\windows\SDL_sysloadso.c" />
|
||||
<ClCompile Include="..\..\src\power\SDL_power.c" />
|
||||
|
@ -243,8 +248,18 @@
|
|||
<ClCompile Include="..\..\src\SDL_error.c" />
|
||||
<ClCompile Include="..\..\src\SDL_hints.c" />
|
||||
<ClCompile Include="..\..\src\SDL_log.c" />
|
||||
<ClCompile Include="..\..\src\locale\SDL_locale.c" />
|
||||
<ClCompile Include="..\..\src\locale\winrt\SDL_syslocale.c" />
|
||||
<ClCompile Include="..\..\src\misc\SDL_url.c" />
|
||||
<ClCompile Include="..\..\src\misc\winrt\SDL_sysurl.cpp">
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">true</CompileAsWinRT>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\sensor\dummy\SDL_dummysensor.c" />
|
||||
<ClCompile Include="..\..\src\sensor\SDL_sensor.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_crc32.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_getenv.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_iconv.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_malloc.c" />
|
||||
|
@ -410,7 +425,7 @@
|
|||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<CompileAsWinRT>false</CompileAsWinRT>
|
||||
<AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;SDL_BUILDING_WINRT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>DLL_EXPORT;_CRT_SECURE_NO_WARNINGS;SDL_BUILDING_WINRT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -424,7 +439,7 @@
|
|||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<CompileAsWinRT>false</CompileAsWinRT>
|
||||
<AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;SDL_BUILDING_WINRT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>DLL_EXPORT;_CRT_SECURE_NO_WARNINGS;SDL_BUILDING_WINRT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -438,7 +453,7 @@
|
|||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<CompileAsWinRT>false</CompileAsWinRT>
|
||||
<AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;SDL_BUILDING_WINRT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>DLL_EXPORT;_CRT_SECURE_NO_WARNINGS;SDL_BUILDING_WINRT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -452,7 +467,7 @@
|
|||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<CompileAsWinRT>false</CompileAsWinRT>
|
||||
<AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;SDL_BUILDING_WINRT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>DLL_EXPORT;_CRT_SECURE_NO_WARNINGS;SDL_BUILDING_WINRT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -464,4 +479,4 @@
|
|||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
|
|
|
@ -84,6 +84,9 @@
|
|||
<ClInclude Include="..\..\include\SDL_loadso.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_locale.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_log.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
|
@ -306,6 +309,9 @@
|
|||
<ClInclude Include="..\..\src\SDL_internal.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\locale\SDL_syslocale.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\thread\SDL_systhread.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
|
@ -369,6 +375,9 @@
|
|||
<ClInclude Include="..\..\src\video\winrt\SDL_winrtvideo_cpp.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\joystick\virtual\SDL_virtualjoystick_c.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\joystick\windows\SDL_xinputjoystick_c.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
|
@ -575,6 +584,15 @@
|
|||
<ClCompile Include="..\..\src\SDL_log.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\locale\SDL_locale.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\locale\winrt\SDL_syslocale.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_crc32.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_getenv.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
|
@ -692,6 +710,9 @@
|
|||
<ClCompile Include="..\..\src\video\winrt\SDL_winrtvideo.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\joystick\virtual\SDL_virtualjoystick.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\joystick\windows\SDL_xinputjoystick.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
|
@ -735,4 +756,4 @@
|
|||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
|
|
|
@ -52,8 +52,10 @@
|
|||
<ClInclude Include="..\..\include\SDL_keyboard.h" />
|
||||
<ClInclude Include="..\..\include\SDL_keycode.h" />
|
||||
<ClInclude Include="..\..\include\SDL_loadso.h" />
|
||||
<ClInclude Include="..\..\include\SDL_locale.h" />
|
||||
<ClInclude Include="..\..\include\SDL_log.h" />
|
||||
<ClInclude Include="..\..\include\SDL_main.h" />
|
||||
<ClInclude Include="..\..\include\SDL_misc.h" />
|
||||
<ClInclude Include="..\..\include\SDL_mouse.h" />
|
||||
<ClInclude Include="..\..\include\SDL_mutex.h" />
|
||||
<ClInclude Include="..\..\include\SDL_name.h" />
|
||||
|
@ -114,6 +116,7 @@
|
|||
<ClInclude Include="..\..\src\joystick\SDL_gamecontrollerdb.h" />
|
||||
<ClInclude Include="..\..\src\joystick\SDL_joystick_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\SDL_sysjoystick.h" />
|
||||
<ClInclude Include="..\..\src\joystick\virtual\SDL_virtualjoystick_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\windows\SDL_dinputjoystick_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\windows\SDL_windowsjoystick_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\windows\SDL_xinputjoystick_c.h" />
|
||||
|
@ -138,6 +141,7 @@
|
|||
<ClInclude Include="..\..\src\SDL_fatal.h" />
|
||||
<ClInclude Include="..\..\src\SDL_hints_c.h" />
|
||||
<ClInclude Include="..\..\src\SDL_internal.h" />
|
||||
<ClInclude Include="..\..\src\locale\SDL_syslocale.h" />
|
||||
<ClInclude Include="..\..\src\sensor\dummy\SDL_dummysensor.h" />
|
||||
<ClInclude Include="..\..\src\sensor\SDL_sensor_c.h" />
|
||||
<ClInclude Include="..\..\src\sensor\SDL_syssensor.h" />
|
||||
|
@ -241,6 +245,7 @@
|
|||
<ClCompile Include="..\..\src\joystick\dummy\SDL_sysjoystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\SDL_gamecontroller.c" />
|
||||
<ClCompile Include="..\..\src\joystick\SDL_joystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\virtual\SDL_virtualjoystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\windows\SDL_dinputjoystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\windows\SDL_windowsjoystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\windows\SDL_xinputjoystick.c" />
|
||||
|
@ -275,8 +280,20 @@
|
|||
<ClCompile Include="..\..\src\SDL_error.c" />
|
||||
<ClCompile Include="..\..\src\SDL_hints.c" />
|
||||
<ClCompile Include="..\..\src\SDL_log.c" />
|
||||
<ClInclude Include="..\..\src\locale\SDL_locale.c" />
|
||||
<ClInclude Include="..\..\src\locale\winrt\SDL_syslocale.c" />
|
||||
<ClCompile Include="..\..\src\misc\SDL_url.c" />
|
||||
<ClCompile Include="..\..\src\misc\winrt\SDL_sysurl.cpp">
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</CompileAsWinRT>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\sensor\dummy\SDL_dummysensor.c" />
|
||||
<ClCompile Include="..\..\src\sensor\SDL_sensor.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_crc32.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_getenv.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_iconv.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_malloc.c" />
|
||||
|
@ -487,13 +504,14 @@
|
|||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<CompileAsWinRT>false</CompileAsWinRT>
|
||||
<AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_WINDLL;_CRT_SECURE_NO_WARNINGS;SDL_BUILDING_WINRT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>DLL_EXPORT;_WINDLL;_CRT_SECURE_NO_WARNINGS;SDL_BUILDING_WINRT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
|
||||
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
|
||||
<AdditionalDependencies>xinput.lib;mmdevapi.lib;d2d1.lib;d3d11.lib;dxgi.lib;ole32.lib;windowscodecs.lib;dwrite.lib;kernel32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>vccorlibd.lib;msvcrtd.lib;xinput.lib;mmdevapi.lib;d2d1.lib;d3d11.lib;dxgi.lib;ole32.lib;windowscodecs.lib;dwrite.lib;kernel32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<IgnoreSpecificDefaultLibraries>vccorlibd;msvcrtd;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
|
@ -501,13 +519,14 @@
|
|||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<CompileAsWinRT>false</CompileAsWinRT>
|
||||
<AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_WINDLL;_CRT_SECURE_NO_WARNINGS;SDL_BUILDING_WINRT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>DLL_EXPORT;_WINDLL;_CRT_SECURE_NO_WARNINGS;SDL_BUILDING_WINRT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
|
||||
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
|
||||
<AdditionalDependencies>xinput.lib;mmdevapi.lib;d2d1.lib;d3d11.lib;dxgi.lib;ole32.lib;windowscodecs.lib;dwrite.lib;kernel32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>vccorlib.lib;msvcrt.lib;xinput.lib;mmdevapi.lib;d2d1.lib;d3d11.lib;dxgi.lib;ole32.lib;windowscodecs.lib;dwrite.lib;kernel32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<IgnoreSpecificDefaultLibraries>vccorlib;msvcrt;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|arm'">
|
||||
|
@ -515,13 +534,14 @@
|
|||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<CompileAsWinRT>false</CompileAsWinRT>
|
||||
<AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_WINDLL;_CRT_SECURE_NO_WARNINGS;SDL_BUILDING_WINRT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>DLL_EXPORT;_WINDLL;_CRT_SECURE_NO_WARNINGS;SDL_BUILDING_WINRT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
|
||||
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
|
||||
<AdditionalDependencies>xinput.lib;mmdevapi.lib;d2d1.lib;d3d11.lib;dxgi.lib;ole32.lib;windowscodecs.lib;dwrite.lib;kernel32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>vccorlibd.lib;msvcrtd.lib;xinput.lib;mmdevapi.lib;d2d1.lib;d3d11.lib;dxgi.lib;ole32.lib;windowscodecs.lib;dwrite.lib;kernel32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<IgnoreSpecificDefaultLibraries>vccorlibd;msvcrtd;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|arm'">
|
||||
|
@ -529,13 +549,14 @@
|
|||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<CompileAsWinRT>false</CompileAsWinRT>
|
||||
<AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_WINDLL;_CRT_SECURE_NO_WARNINGS;SDL_BUILDING_WINRT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>DLL_EXPORT;_WINDLL;_CRT_SECURE_NO_WARNINGS;SDL_BUILDING_WINRT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
|
||||
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
|
||||
<AdditionalDependencies>xinput.lib;mmdevapi.lib;d2d1.lib;d3d11.lib;dxgi.lib;ole32.lib;windowscodecs.lib;dwrite.lib;kernel32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>vccorlib.lib;msvcrt.lib;xinput.lib;mmdevapi.lib;d2d1.lib;d3d11.lib;dxgi.lib;ole32.lib;windowscodecs.lib;dwrite.lib;kernel32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<IgnoreSpecificDefaultLibraries>vccorlib;msvcrt;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
|
@ -543,13 +564,14 @@
|
|||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<CompileAsWinRT>false</CompileAsWinRT>
|
||||
<AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_WINDLL;_CRT_SECURE_NO_WARNINGS;SDL_BUILDING_WINRT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>DLL_EXPORT;_WINDLL;_CRT_SECURE_NO_WARNINGS;SDL_BUILDING_WINRT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
|
||||
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
|
||||
<AdditionalDependencies>xinput.lib;mmdevapi.lib;d2d1.lib;d3d11.lib;dxgi.lib;ole32.lib;windowscodecs.lib;dwrite.lib;kernel32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>vccorlibd.lib;msvcrtd.lib;xinput.lib;mmdevapi.lib;d2d1.lib;d3d11.lib;dxgi.lib;ole32.lib;windowscodecs.lib;dwrite.lib;kernel32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<IgnoreSpecificDefaultLibraries>vccorlibd;msvcrtd;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
|
@ -557,16 +579,17 @@
|
|||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<CompileAsWinRT>false</CompileAsWinRT>
|
||||
<AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_WINDLL;_CRT_SECURE_NO_WARNINGS;SDL_BUILDING_WINRT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>DLL_EXPORT;_WINDLL;_CRT_SECURE_NO_WARNINGS;SDL_BUILDING_WINRT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
|
||||
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
|
||||
<AdditionalDependencies>xinput.lib;mmdevapi.lib;d2d1.lib;d3d11.lib;dxgi.lib;ole32.lib;windowscodecs.lib;dwrite.lib;kernel32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>vccorlib.lib;msvcrt.lib;xinput.lib;mmdevapi.lib;d2d1.lib;d3d11.lib;dxgi.lib;ole32.lib;windowscodecs.lib;dwrite.lib;kernel32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<IgnoreSpecificDefaultLibraries>vccorlib;msvcrt;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
|
|
|
@ -84,6 +84,9 @@
|
|||
<ClInclude Include="..\..\include\SDL_loadso.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_locale.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_log.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
|
@ -306,6 +309,9 @@
|
|||
<ClInclude Include="..\..\src\SDL_internal.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\locale\SDL_syslocale.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\thread\SDL_thread_c.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
|
@ -372,6 +378,9 @@
|
|||
<ClInclude Include="..\..\src\core\windows\SDL_xinput.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\joystick\virtual\SDL_virtualjoystick_c.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\joystick\windows\SDL_windowsjoystick_c.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
|
@ -423,6 +432,12 @@
|
|||
<ClInclude Include="..\..\src\events\SDL_displayevents_c.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\locale\winrt\SDL_syslocale.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\locale\SDL_locale.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\src\atomic\SDL_atomic.c">
|
||||
|
@ -593,6 +608,9 @@
|
|||
<ClCompile Include="..\..\src\SDL_log.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_crc32.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_getenv.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
|
@ -713,6 +731,9 @@
|
|||
<ClCompile Include="..\..\src\core\windows\SDL_xinput.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\joystick\virtual\SDL_virtualjoystick.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\joystick\windows\SDL_windowsjoystick.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
|
@ -771,4 +792,4 @@
|
|||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
|
|
11
externals/SDL/VisualC/SDL.sln
vendored
11
externals/SDL/VisualC/SDL.sln
vendored
|
@ -52,6 +52,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testvulkan", "tests\testvul
|
|||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testyuv", "tests\testyuv\testyuv.vcxproj", "{40FB7794-D3C3-4CFE-BCF4-A80C97635682}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testsensor", "tests\testsensor\testsensor.vcxproj", "{C4E04D18-EF76-4B42-B4C2-16A1BACDC0A4}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
|
@ -260,6 +262,14 @@ Global
|
|||
{40FB7794-D3C3-4CFE-BCF4-A80C97635682}.Release|Win32.Build.0 = Release|Win32
|
||||
{40FB7794-D3C3-4CFE-BCF4-A80C97635682}.Release|x64.ActiveCfg = Release|x64
|
||||
{40FB7794-D3C3-4CFE-BCF4-A80C97635682}.Release|x64.Build.0 = Release|x64
|
||||
{C4E04D18-EF76-4B42-B4C2-16A1BACDC0A4}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{C4E04D18-EF76-4B42-B4C2-16A1BACDC0A4}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{C4E04D18-EF76-4B42-B4C2-16A1BACDC0A4}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{C4E04D18-EF76-4B42-B4C2-16A1BACDC0A4}.Debug|x64.Build.0 = Debug|x64
|
||||
{C4E04D18-EF76-4B42-B4C2-16A1BACDC0A4}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{C4E04D18-EF76-4B42-B4C2-16A1BACDC0A4}.Release|Win32.Build.0 = Release|Win32
|
||||
{C4E04D18-EF76-4B42-B4C2-16A1BACDC0A4}.Release|x64.ActiveCfg = Release|x64
|
||||
{C4E04D18-EF76-4B42-B4C2-16A1BACDC0A4}.Release|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
@ -287,5 +297,6 @@ Global
|
|||
{55812185-D13C-4022-9C81-32E0F4A08306} = {D69D5741-611F-4E14-8541-1FEE94F50B5A}
|
||||
{0D604DFD-AAB6-442C-9368-F91A344146AB} = {D69D5741-611F-4E14-8541-1FEE94F50B5A}
|
||||
{40FB7794-D3C3-4CFE-BCF4-A80C97635682} = {D69D5741-611F-4E14-8541-1FEE94F50B5A}
|
||||
{C4E04D18-EF76-4B42-B4C2-16A1BACDC0A4} = {D69D5741-611F-4E14-8541-1FEE94F50B5A}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
|
32
externals/SDL/VisualC/SDL/SDL.vcxproj
vendored
32
externals/SDL/VisualC/SDL/SDL.vcxproj
vendored
|
@ -96,7 +96,7 @@
|
|||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
<PreprocessorDefinitions>_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>DLL_EXPORT;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
|
||||
|
@ -127,7 +127,7 @@
|
|||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
<PreprocessorDefinitions>_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>DLL_EXPORT;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
|
@ -160,7 +160,7 @@
|
|||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
<PreprocessorDefinitions>NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>DLL_EXPORT;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
|
||||
|
@ -192,7 +192,7 @@
|
|||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
<PreprocessorDefinitions>NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>DLL_EXPORT;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
|
@ -239,9 +239,11 @@
|
|||
<ClInclude Include="..\..\include\SDL_keyboard.h" />
|
||||
<ClInclude Include="..\..\include\SDL_keycode.h" />
|
||||
<ClInclude Include="..\..\include\SDL_loadso.h" />
|
||||
<ClInclude Include="..\..\include\SDL_locale.h" />
|
||||
<ClInclude Include="..\..\include\SDL_log.h" />
|
||||
<ClInclude Include="..\..\include\SDL_main.h" />
|
||||
<ClInclude Include="..\..\include\SDL_messagebox.h" />
|
||||
<ClInclude Include="..\..\include\SDL_misc.h" />
|
||||
<ClInclude Include="..\..\include\SDL_mouse.h" />
|
||||
<ClInclude Include="..\..\include\SDL_mutex.h" />
|
||||
<ClInclude Include="..\..\include\SDL_name.h" />
|
||||
|
@ -297,6 +299,7 @@
|
|||
<ClInclude Include="..\..\src\audio\wasapi\SDL_wasapi.h" />
|
||||
<ClInclude Include="..\..\src\audio\winmm\SDL_winmm.h" />
|
||||
<ClInclude Include="..\..\src\core\windows\SDL_directx.h" />
|
||||
<ClInclude Include="..\..\src\core\windows\SDL_hid.h" />
|
||||
<ClInclude Include="..\..\src\core\windows\SDL_windows.h" />
|
||||
<ClInclude Include="..\..\src\core\windows\SDL_xinput.h" />
|
||||
<ClInclude Include="..\..\src\dynapi\SDL_dynapi.h" />
|
||||
|
@ -318,15 +321,20 @@
|
|||
<ClInclude Include="..\..\src\haptic\windows\SDL_dinputhaptic_c.h" />
|
||||
<ClInclude Include="..\..\src\haptic\windows\SDL_windowshaptic_c.h" />
|
||||
<ClInclude Include="..\..\src\haptic\windows\SDL_xinputhaptic_c.h" />
|
||||
<ClInclude Include="..\..\src\hidapi\hidapi\hidapi.h" />
|
||||
<ClInclude Include="..\..\src\joystick\controller_type.h" />
|
||||
<ClInclude Include="..\..\src\joystick\hidapi\SDL_hidapijoystick_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\SDL_gamecontrollerdb.h" />
|
||||
<ClInclude Include="..\..\src\joystick\SDL_joystick_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\SDL_sysjoystick.h" />
|
||||
<ClInclude Include="..\..\src\joystick\virtual\SDL_virtualjoystick_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\windows\SDL_dinputjoystick_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\windows\SDL_rawinputjoystick_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\windows\SDL_windowsjoystick_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\windows\SDL_xinputjoystick_c.h" />
|
||||
<ClInclude Include="..\..\src\libm\math_libm.h" />
|
||||
<ClInclude Include="..\..\src\libm\math_private.h" />
|
||||
<ClInclude Include="..\..\src\locale\SDL_syslocale.h" />
|
||||
<ClInclude Include="..\..\src\render\direct3d11\SDL_shaders_d3d11.h" />
|
||||
<ClInclude Include="..\..\src\render\direct3d\SDL_shaders_d3d.h" />
|
||||
<ClInclude Include="..\..\src\render\opengl\SDL_glfuncs.h" />
|
||||
|
@ -348,6 +356,7 @@
|
|||
<ClInclude Include="..\..\src\sensor\dummy\SDL_dummysensor.h" />
|
||||
<ClInclude Include="..\..\src\sensor\SDL_sensor_c.h" />
|
||||
<ClInclude Include="..\..\src\sensor\SDL_syssensor.h" />
|
||||
<ClInclude Include="..\..\src\sensor\windows\SDL_windowssensor.h" />
|
||||
<ClInclude Include="..\..\src\thread\SDL_systhread.h" />
|
||||
<ClInclude Include="..\..\src\thread\SDL_thread_c.h" />
|
||||
<ClInclude Include="..\..\src\thread\windows\SDL_systhread_c.h" />
|
||||
|
@ -397,6 +406,7 @@
|
|||
<ClCompile Include="..\..\src\audio\winmm\SDL_winmm.c" />
|
||||
<ClCompile Include="..\..\src\audio\wasapi\SDL_wasapi.c" />
|
||||
<ClCompile Include="..\..\src\audio\wasapi\SDL_wasapi_win32.c" />
|
||||
<ClCompile Include="..\..\src\core\windows\SDL_hid.c" />
|
||||
<ClCompile Include="..\..\src\core\windows\SDL_windows.c" />
|
||||
<ClCompile Include="..\..\src\core\windows\SDL_xinput.c" />
|
||||
<ClCompile Include="..\..\src\cpuinfo\SDL_cpuinfo.c" />
|
||||
|
@ -413,14 +423,17 @@
|
|||
<ClCompile Include="..\..\src\events\SDL_windowevents.c" />
|
||||
<ClCompile Include="..\..\src\file\SDL_rwops.c" />
|
||||
<ClCompile Include="..\..\src\filesystem\windows\SDL_sysfilesystem.c" />
|
||||
<ClCompile Include="..\..\src\haptic\dummy\SDL_syshaptic.c" />
|
||||
<ClCompile Include="..\..\src\haptic\SDL_haptic.c" />
|
||||
<ClCompile Include="..\..\src\haptic\windows\SDL_dinputhaptic.c" />
|
||||
<ClCompile Include="..\..\src\haptic\windows\SDL_windowshaptic.c" />
|
||||
<ClCompile Include="..\..\src\haptic\windows\SDL_xinputhaptic.c" />
|
||||
<ClCompile Include="..\..\src\hidapi\windows\hid.c" />
|
||||
<ClCompile Include="..\..\src\hidapi\SDL_hidapi.c" />
|
||||
<ClCompile Include="..\..\src\joystick\dummy\SDL_sysjoystick.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_ps5.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_rumble.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_switch.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xbox360.c" />
|
||||
|
@ -428,9 +441,12 @@
|
|||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xboxone.c" />
|
||||
<ClCompile Include="..\..\src\joystick\SDL_gamecontroller.c" />
|
||||
<ClCompile Include="..\..\src\joystick\SDL_joystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\virtual\SDL_virtualjoystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\windows\SDL_dinputjoystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\windows\SDL_mmjoystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\windows\SDL_rawinputjoystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\windows\SDL_windowsjoystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\windows\SDL_windows_gaming_input.c" />
|
||||
<ClCompile Include="..\..\src\joystick\windows\SDL_xinputjoystick.c" />
|
||||
<ClCompile Include="..\..\src\libm\e_atan2.c" />
|
||||
<ClCompile Include="..\..\src\libm\e_exp.c" />
|
||||
|
@ -453,6 +469,10 @@
|
|||
<ClCompile Include="..\..\src\libm\s_sin.c" />
|
||||
<ClCompile Include="..\..\src\libm\s_tan.c" />
|
||||
<ClCompile Include="..\..\src\loadso\windows\SDL_sysloadso.c" />
|
||||
<ClCompile Include="..\..\src\locale\SDL_locale.c" />
|
||||
<ClCompile Include="..\..\src\locale\windows\SDL_syslocale.c" />
|
||||
<ClCompile Include="..\..\src\misc\SDL_url.c" />
|
||||
<ClCompile Include="..\..\src\misc\windows\SDL_sysurl.c" />
|
||||
<ClCompile Include="..\..\src\power\SDL_power.c" />
|
||||
<ClCompile Include="..\..\src\power\windows\SDL_syspower.c" />
|
||||
<ClCompile Include="..\..\src\render\direct3d11\SDL_shaders_d3d11.c" />
|
||||
|
@ -481,6 +501,8 @@
|
|||
<ClCompile Include="..\..\src\SDL_log.c" />
|
||||
<ClCompile Include="..\..\src\sensor\dummy\SDL_dummysensor.c" />
|
||||
<ClCompile Include="..\..\src\sensor\SDL_sensor.c" />
|
||||
<ClCompile Include="..\..\src\sensor\windows\SDL_windowssensor.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_crc32.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_getenv.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_iconv.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_malloc.c" />
|
||||
|
|
26
externals/SDL/VisualC/SDL/SDL.vcxproj.filters
vendored
26
externals/SDL/VisualC/SDL/SDL.vcxproj.filters
vendored
|
@ -84,6 +84,9 @@
|
|||
<ClInclude Include="..\..\include\SDL_loadso.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_locale.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_log.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
|
@ -228,6 +231,7 @@
|
|||
<ClInclude Include="..\..\include\SDL_vulkan.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_misc.h" />
|
||||
<ClInclude Include="..\..\src\audio\directsound\SDL_directsound.h" />
|
||||
<ClInclude Include="..\..\src\audio\disk\SDL_diskaudio.h" />
|
||||
<ClInclude Include="..\..\src\audio\dummy\SDL_dummyaudio.h" />
|
||||
|
@ -259,15 +263,20 @@
|
|||
<ClInclude Include="..\..\src\haptic\windows\SDL_dinputhaptic_c.h" />
|
||||
<ClInclude Include="..\..\src\haptic\windows\SDL_windowshaptic_c.h" />
|
||||
<ClInclude Include="..\..\src\haptic\windows\SDL_xinputhaptic_c.h" />
|
||||
<ClInclude Include="..\..\src\hidapi\hidapi\hidapi.h" />
|
||||
<ClInclude Include="..\..\src\joystick\controller_type.h" />
|
||||
<ClInclude Include="..\..\src\joystick\hidapi\SDL_hidapijoystick_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\SDL_gamecontrollerdb.h" />
|
||||
<ClInclude Include="..\..\src\joystick\SDL_joystick_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\SDL_sysjoystick.h" />
|
||||
<ClInclude Include="..\..\src\joystick\virtual\SDL_virtualjoystick_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\windows\SDL_dinputjoystick_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\windows\SDL_rawinputjoystick_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\windows\SDL_windowsjoystick_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\windows\SDL_xinputjoystick_c.h" />
|
||||
<ClInclude Include="..\..\src\libm\math_libm.h" />
|
||||
<ClInclude Include="..\..\src\libm\math_private.h" />
|
||||
<ClInclude Include="..\..\src\locale\SDL_syslocale.h" />
|
||||
<ClInclude Include="..\..\src\render\direct3d\SDL_shaders_d3d.h" />
|
||||
<ClInclude Include="..\..\src\render\direct3d11\SDL_shaders_d3d11.h" />
|
||||
<ClInclude Include="..\..\src\render\opengl\SDL_glfuncs.h" />
|
||||
|
@ -289,6 +298,7 @@
|
|||
<ClInclude Include="..\..\src\sensor\dummy\SDL_dummysensor.h" />
|
||||
<ClInclude Include="..\..\src\sensor\SDL_sensor_c.h" />
|
||||
<ClInclude Include="..\..\src\sensor\SDL_syssensor.h" />
|
||||
<ClInclude Include="..\..\src\sensor\windows\SDL_windowssensor.h" />
|
||||
<ClInclude Include="..\..\src\thread\SDL_systhread.h" />
|
||||
<ClInclude Include="..\..\src\thread\SDL_thread_c.h" />
|
||||
<ClInclude Include="..\..\src\thread\windows\SDL_systhread_c.h" />
|
||||
|
@ -322,6 +332,7 @@
|
|||
<ClInclude Include="..\..\src\video\windows\SDL_windowswindow.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\wmmsg.h" />
|
||||
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb.h" />
|
||||
<ClInclude Include="..\..\src\core\windows\SDL_hid.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\src\atomic\SDL_atomic.c" />
|
||||
|
@ -339,6 +350,7 @@
|
|||
<ClCompile Include="..\..\src\audio\wasapi\SDL_wasapi.c" />
|
||||
<ClCompile Include="..\..\src\audio\wasapi\SDL_wasapi_win32.c" />
|
||||
<ClCompile Include="..\..\src\audio\winmm\SDL_winmm.c" />
|
||||
<ClCompile Include="..\..\src\core\windows\SDL_hid.c" />
|
||||
<ClCompile Include="..\..\src\core\windows\SDL_windows.c" />
|
||||
<ClCompile Include="..\..\src\core\windows\SDL_xinput.c" />
|
||||
<ClCompile Include="..\..\src\cpuinfo\SDL_cpuinfo.c" />
|
||||
|
@ -355,13 +367,16 @@
|
|||
<ClCompile Include="..\..\src\events\SDL_windowevents.c" />
|
||||
<ClCompile Include="..\..\src\file\SDL_rwops.c" />
|
||||
<ClCompile Include="..\..\src\filesystem\windows\SDL_sysfilesystem.c" />
|
||||
<ClCompile Include="..\..\src\haptic\dummy\SDL_syshaptic.c" />
|
||||
<ClCompile Include="..\..\src\haptic\SDL_haptic.c" />
|
||||
<ClCompile Include="..\..\src\haptic\windows\SDL_dinputhaptic.c" />
|
||||
<ClCompile Include="..\..\src\haptic\windows\SDL_windowshaptic.c" />
|
||||
<ClCompile Include="..\..\src\haptic\windows\SDL_xinputhaptic.c" />
|
||||
<ClCompile Include="..\..\src\hidapi\windows\hid.c" />
|
||||
<ClCompile Include="..\..\src\hidapi\SDL_hidapi.c" />
|
||||
<ClCompile Include="..\..\src\joystick\dummy\SDL_sysjoystick.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_ps5.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_rumble.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_switch.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xbox360.c" />
|
||||
|
@ -370,8 +385,11 @@
|
|||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapijoystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\SDL_gamecontroller.c" />
|
||||
<ClCompile Include="..\..\src\joystick\SDL_joystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\virtual\SDL_virtualjoystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\windows\SDL_dinputjoystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\windows\SDL_mmjoystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\windows\SDL_rawinputjoystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\windows\SDL_windows_gaming_input.c" />
|
||||
<ClCompile Include="..\..\src\joystick\windows\SDL_windowsjoystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\windows\SDL_xinputjoystick.c" />
|
||||
<ClCompile Include="..\..\src\libm\e_atan2.c" />
|
||||
|
@ -395,6 +413,10 @@
|
|||
<ClCompile Include="..\..\src\libm\s_sin.c" />
|
||||
<ClCompile Include="..\..\src\libm\s_tan.c" />
|
||||
<ClCompile Include="..\..\src\loadso\windows\SDL_sysloadso.c" />
|
||||
<ClCompile Include="..\..\src\locale\SDL_locale.c" />
|
||||
<ClCompile Include="..\..\src\locale\windows\SDL_syslocale.c" />
|
||||
<ClCompile Include="..\..\src\misc\SDL_url.c" />
|
||||
<ClCompile Include="..\..\src\misc\windows\SDL_sysurl.c" />
|
||||
<ClCompile Include="..\..\src\power\SDL_power.c" />
|
||||
<ClCompile Include="..\..\src\power\windows\SDL_syspower.c" />
|
||||
<ClCompile Include="..\..\src\render\direct3d\SDL_render_d3d.c" />
|
||||
|
@ -423,6 +445,8 @@
|
|||
<ClCompile Include="..\..\src\SDL_log.c" />
|
||||
<ClCompile Include="..\..\src\sensor\dummy\SDL_dummysensor.c" />
|
||||
<ClCompile Include="..\..\src\sensor\SDL_sensor.c" />
|
||||
<ClCompile Include="..\..\src\sensor\windows\SDL_windowssensor.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_crc32.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_getenv.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_iconv.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_malloc.c" />
|
||||
|
|
|
@ -242,6 +242,24 @@
|
|||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Copying %(Filename)%(Extension)</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">copy %(FullPath) $(ProjectDir)\
|
||||
</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="..\..\..\test\controllermap_back.bmp">
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Copying %(Filename)%(Extension)</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">copy %(FullPath) $(ProjectDir)\
|
||||
</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Copying %(Filename)%(Extension)</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">copy %(FullPath) $(ProjectDir)\
|
||||
</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Copying %(Filename)%(Extension)</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">copy %(FullPath) $(ProjectDir)\
|
||||
</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Copying %(Filename)%(Extension)</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">copy %(FullPath) $(ProjectDir)\
|
||||
</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
|
@ -252,4 +270,4 @@
|
|||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
|
|
|
@ -242,6 +242,24 @@
|
|||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Copying %(Filename)%(Extension)</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">copy %(FullPath) $(ProjectDir)\
|
||||
</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="..\..\..\test\controllermap_back.bmp">
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Copying %(Filename)%(Extension)</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">copy %(FullPath) $(ProjectDir)\
|
||||
</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Copying %(Filename)%(Extension)</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">copy %(FullPath) $(ProjectDir)\
|
||||
</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Copying %(Filename)%(Extension)</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">copy %(FullPath) $(ProjectDir)\
|
||||
</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Copying %(Filename)%(Extension)</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">copy %(FullPath) $(ProjectDir)\
|
||||
</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)\%(Filename)%(Extension);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
|
@ -252,4 +270,4 @@
|
|||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
|
|
199
externals/SDL/VisualC/tests/testsensor/testsensor.vcxproj
vendored
Executable file
199
externals/SDL/VisualC/tests/testsensor/testsensor.vcxproj
vendored
Executable file
|
@ -0,0 +1,199 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{C4E04D18-EF76-4B42-B4C2-16A1BACDC0A4}</ProjectGuid>
|
||||
<RootNamespace>testsensor</RootNamespace>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\$(Configuration)\</IntDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\</IntDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TargetEnvironment>Win32</TargetEnvironment>
|
||||
<TypeLibraryName>.\Debug/testsensor.tlb</TypeLibraryName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)/../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0409</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TargetEnvironment>X64</TargetEnvironment>
|
||||
<TypeLibraryName>.\Debug/testsensor.tlb</TypeLibraryName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)/../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0409</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TargetEnvironment>Win32</TargetEnvironment>
|
||||
<TypeLibraryName>.\Release/testsensor.tlb</TypeLibraryName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)/../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0409</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TargetEnvironment>X64</TargetEnvironment>
|
||||
<TypeLibraryName>.\Release/testsensor.tlb</TypeLibraryName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)/../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0409</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\SDL\SDL.vcxproj">
|
||||
<Project>{81ce8daf-ebb2-4761-8e45-b71abcca8c68}</Project>
|
||||
<Private>false</Private>
|
||||
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
|
||||
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\SDLmain\SDLmain.vcxproj">
|
||||
<Project>{da956fd3-e142-46f2-9dd5-c78bebb56b7a}</Project>
|
||||
<Private>false</Private>
|
||||
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
|
||||
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\test\testsensor.c" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
74
externals/SDL/WhatsNew.txt
vendored
74
externals/SDL/WhatsNew.txt
vendored
|
@ -1,6 +1,80 @@
|
|||
|
||||
This is a list of major changes in SDL's version history.
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
2.0.14:
|
||||
---------------------------------------------------------------------------
|
||||
General:
|
||||
* Added support for PS5 DualSense and Xbox Series X controllers to the HIDAPI controller driver
|
||||
* Added game controller button constants for paddles and new buttons
|
||||
* Added game controller functions to get additional information:
|
||||
* SDL_GameControllerGetSerial()
|
||||
* SDL_GameControllerHasAxis()
|
||||
* SDL_GameControllerHasButton()
|
||||
* SDL_GameControllerGetNumTouchpads()
|
||||
* SDL_GameControllerGetNumTouchpadFingers()
|
||||
* SDL_GameControllerGetTouchpadFinger()
|
||||
* SDL_GameControllerHasSensor()
|
||||
* SDL_GameControllerSetSensorEnabled()
|
||||
* SDL_GameControllerIsSensorEnabled()
|
||||
* SDL_GameControllerGetSensorData()
|
||||
* SDL_GameControllerRumbleTriggers()
|
||||
* SDL_GameControllerHasLED()
|
||||
* SDL_GameControllerSetLED()
|
||||
* Added the hint SDL_HINT_JOYSTICK_HIDAPI_PS5 to control whether the HIDAPI driver for PS5 controllers should be used.
|
||||
* Added joystick functions to get additional information:
|
||||
* SDL_JoystickGetSerial()
|
||||
* SDL_JoystickRumbleTriggers()
|
||||
* SDL_JoystickHasLED()
|
||||
* SDL_JoystickSetLED()
|
||||
* Added an API to allow the application to create virtual joysticks:
|
||||
* SDL_JoystickAttachVirtual()
|
||||
* SDL_JoystickDetachVirtual()
|
||||
* SDL_JoystickIsVirtual()
|
||||
* SDL_JoystickSetVirtualAxis()
|
||||
* SDL_JoystickSetVirtualButton()
|
||||
* SDL_JoystickSetVirtualHat()
|
||||
* Added SDL_LockSensors() and SDL_UnlockSensors() to guarantee exclusive access to the sensor list
|
||||
* Added SDL_HAPTIC_STEERING_AXIS to play an effect on the steering wheel
|
||||
* Added the hint SDL_HINT_MOUSE_RELATIVE_SCALING to control whether relative motion is scaled by the screen DPI or renderer logical size
|
||||
* The default value for SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS is now false for better compatibility with modern window managers
|
||||
* Added SDL_GetPreferredLocales() to get the application's current locale setting
|
||||
* Added the hint SDL_HINT_PREFERRED_LOCALES to override your application's default locale setting
|
||||
* Added SDL_OpenURL() to open a URL in the system's default browser
|
||||
* Added SDL_HasSurfaceRLE() to tell whether a surface is currently using RLE encoding
|
||||
* Added SDL_SIMDRealloc() to reallocate memory obtained from SDL_SIMDAlloc()
|
||||
* Added SDL_GetErrorMsg() to get the last error in a thread-safe way
|
||||
* Added SDL_crc32(), SDL_wcscasecmp(), SDL_wcsncasecmp(), SDL_trunc(), SDL_truncf()
|
||||
* Added clearer names for RGB pixel formats, e.g. SDL_PIXELFORMAT_XRGB8888, SDL_PIXELFORMAT_XBGR8888, etc.
|
||||
|
||||
Windows:
|
||||
* Added the RAWINPUT controller driver to support more than 4 Xbox controllers simultaneously
|
||||
* Added the hint SDL_HINT_JOYSTICK_RAWINPUT to control whether the RAWINPUT driver should be used
|
||||
* Added the hint SDL_HINT_JOYSTICK_HIDAPI_CORRELATE_XINPUT to control whether XInput and WGI should be used to for complete controller functionality with the RAWINPUT driver.
|
||||
|
||||
macOS:
|
||||
* Added the SDL_WINDOW_METAL flag to specify that a window should be created with a Metal view
|
||||
* Added SDL_Metal_GetLayer() to get the CAMetalLayer backing a Metal view
|
||||
* Added SDL_Metal_GetDrawableSize() to get the size of a window's drawable, in pixels
|
||||
|
||||
Linux:
|
||||
* Added the hint SDL_HINT_AUDIO_DEVICE_APP_NAME to specify the name that shows up in PulseAudio for your application
|
||||
* Added the hint SDL_HINT_AUDIO_DEVICE_STREAM_NAME to specify the name that shows up in PulseAudio associated with your audio stream
|
||||
* Added the hint SDL_HINT_LINUX_JOYSTICK_DEADZONES to control whether HID defined dead zones should be respected on Linux
|
||||
* Added the hint SDL_HINT_THREAD_PRIORITY_POLICY to specify the thread scheduler policy
|
||||
* Added the hint SDL_HINT_THREAD_FORCE_REALTIME_TIME_CRITICAL to allow time critical threads to use a realtime scheduling policy
|
||||
|
||||
Android:
|
||||
* Added SDL_AndroidRequestPermission() to request a specific system permission
|
||||
* Added the hint SDL_HINT_ANDROID_BLOCK_ON_PAUSE_PAUSEAUDIO to control whether audio will pause when the application goes intot he background
|
||||
|
||||
OS/2:
|
||||
* Added support for OS/2, see docs/README-os2.md for details
|
||||
|
||||
Emscripten (running in a web browser):
|
||||
* Added the hint SDL_HINT_EMSCRIPTEN_ASYNCIFY to control whether SDL should call emscripten_sleep internally
|
||||
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
2.0.12:
|
||||
---------------------------------------------------------------------------
|
||||
|
|
|
@ -10,6 +10,24 @@
|
|||
1D3623EC0D0F72F000981E51 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D3623EB0D0F72F000981E51 /* CoreGraphics.framework */; };
|
||||
1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; };
|
||||
1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; };
|
||||
F3A497102555EE4800E92A8B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A495992555ED0500E92A8B /* libSDL2.a */; };
|
||||
F3A4972F2555EE8A00E92A8B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A495992555ED0500E92A8B /* libSDL2.a */; };
|
||||
F3A497392555EEA900E92A8B /* CoreHaptics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A497382555EEA900E92A8B /* CoreHaptics.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
|
||||
F3A497422555EEBE00E92A8B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A495992555ED0500E92A8B /* libSDL2.a */; };
|
||||
F3A497432555EEC400E92A8B /* CoreHaptics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A497382555EEA900E92A8B /* CoreHaptics.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
|
||||
F3A497442555EECD00E92A8B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A495992555ED0500E92A8B /* libSDL2.a */; };
|
||||
F3A497452555EED500E92A8B /* CoreHaptics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A497382555EEA900E92A8B /* CoreHaptics.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
|
||||
F3A497462555EEDF00E92A8B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A4959B2555ED0500E92A8B /* libSDL2.a */; };
|
||||
F3A497482555EEEE00E92A8B /* CoreHaptics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A497472555EEEE00E92A8B /* CoreHaptics.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
|
||||
F3A497492555EF0B00E92A8B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A495992555ED0500E92A8B /* libSDL2.a */; };
|
||||
F3A4974A2555EF1200E92A8B /* CoreHaptics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A497382555EEA900E92A8B /* CoreHaptics.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
|
||||
F3A4974B2555EF1B00E92A8B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A495992555ED0500E92A8B /* libSDL2.a */; };
|
||||
F3A4974C2555EF2000E92A8B /* CoreHaptics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A497382555EEA900E92A8B /* CoreHaptics.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
|
||||
F3A4974D2555EF9500E92A8B /* CoreHaptics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A497382555EEA900E92A8B /* CoreHaptics.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
|
||||
F3A4974E2555EF9F00E92A8B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A495992555ED0500E92A8B /* libSDL2.a */; };
|
||||
F3A4974F2555EFA400E92A8B /* CoreHaptics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A497382555EEA900E92A8B /* CoreHaptics.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
|
||||
F3A497592555EFC300E92A8B /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A497582555EFC300E92A8B /* AVFoundation.framework */; };
|
||||
F3A497632555EFCF00E92A8B /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A497622555EFCF00E92A8B /* Metal.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 */; };
|
||||
|
@ -22,7 +40,6 @@
|
|||
FA30DEB31BBF5AD7009C397F /* icon.bmp in Resources */ = {isa = PBXBuildFile; fileRef = FDB651CC0E43D19800F688B5 /* icon.bmp */; };
|
||||
FA30DEB41BBF5ADD009C397F /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = FD925B180E0F276600E92347 /* Icon.png */; };
|
||||
FA30DEB61BBF5AE6009C397F /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = FD787AA00E22A5CC003E8E36 /* Default.png */; };
|
||||
FA30DEB71BBF5BB8009C397F /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FA30DEAC1BBF59D9009C397F /* libSDL2.a */; };
|
||||
FA30DEC81BBF5C14009C397F /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FAE0E9691BAF96A00098DFA4 /* GameController.framework */; };
|
||||
FA30DEC91BBF5C14009C397F /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDF0D7220E12D31800247964 /* AudioToolbox.framework */; };
|
||||
FA30DECA1BBF5C14009C397F /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDB96EDF0DEFC9DC00FAF19F /* QuartzCore.framework */; };
|
||||
|
@ -64,12 +81,6 @@
|
|||
FD15FD6B0E086911003BDF25 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D3623EB0D0F72F000981E51 /* CoreGraphics.framework */; };
|
||||
FD15FD6C0E086911003BDF25 /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDB96ED30DEFC9C700FAF19F /* OpenGLES.framework */; };
|
||||
FD15FD6D0E086911003BDF25 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDB96EDF0DEFC9DC00FAF19F /* QuartzCore.framework */; };
|
||||
FD1B48DD0E313255007AB34E /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B489E0E313154007AB34E /* libSDL2.a */; };
|
||||
FD1B49980E313261007AB34E /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B489E0E313154007AB34E /* libSDL2.a */; };
|
||||
FD1B499C0E313269007AB34E /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B489E0E313154007AB34E /* libSDL2.a */; };
|
||||
FD1B499E0E31326C007AB34E /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B489E0E313154007AB34E /* libSDL2.a */; };
|
||||
FD1B49A00E313270007AB34E /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B489E0E313154007AB34E /* libSDL2.a */; };
|
||||
FD1B49A20E313273007AB34E /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B489E0E313154007AB34E /* libSDL2.a */; };
|
||||
FD5F9CE80E0E0741008E885B /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; };
|
||||
FD5F9CE90E0E0741008E885B /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; };
|
||||
FD5F9CEA0E0E0741008E885B /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D3623EB0D0F72F000981E51 /* CoreGraphics.framework */; };
|
||||
|
@ -105,7 +116,6 @@
|
|||
FDB651FA0E43D1F300F688B5 /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = FD925B180E0F276600E92347 /* Icon.png */; };
|
||||
FDB651FB0E43D1F300F688B5 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = FD787AA00E22A5CC003E8E36 /* Default.png */; };
|
||||
FDB651FD0E43D1F300F688B5 /* common.c in Sources */ = {isa = PBXBuildFile; fileRef = FD77A0060E26BC0500F39101 /* common.c */; };
|
||||
FDB652000E43D1F300F688B5 /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B489E0E313154007AB34E /* libSDL2.a */; };
|
||||
FDB652020E43D1F300F688B5 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; };
|
||||
FDB652030E43D1F300F688B5 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; };
|
||||
FDB652040E43D1F300F688B5 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D3623EB0D0F72F000981E51 /* CoreGraphics.framework */; };
|
||||
|
@ -154,103 +164,96 @@
|
|||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
049F3694130CD86800FF080F /* PBXContainerItemProxy */ = {
|
||||
F3A495902555ED0500E92A8B /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = FD1B48920E313154007AB34E /* SDL.xcodeproj */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = FD6526620DE8FCCB002AD96B;
|
||||
remoteInfo = libSDL;
|
||||
};
|
||||
049F3696130CD87600FF080F /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = FD1B48920E313154007AB34E /* SDL.xcodeproj */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = FD6526620DE8FCCB002AD96B;
|
||||
remoteInfo = libSDL;
|
||||
};
|
||||
049F3698130CD87F00FF080F /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = FD1B48920E313154007AB34E /* SDL.xcodeproj */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = FD6526620DE8FCCB002AD96B;
|
||||
remoteInfo = libSDL;
|
||||
};
|
||||
049F369A130CD88800FF080F /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = FD1B48920E313154007AB34E /* SDL.xcodeproj */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = FD6526620DE8FCCB002AD96B;
|
||||
remoteInfo = libSDL;
|
||||
};
|
||||
049F369C130CD89000FF080F /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = FD1B48920E313154007AB34E /* SDL.xcodeproj */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = FD6526620DE8FCCB002AD96B;
|
||||
remoteInfo = libSDL;
|
||||
};
|
||||
049F369E130CD89800FF080F /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = FD1B48920E313154007AB34E /* SDL.xcodeproj */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = FD6526620DE8FCCB002AD96B;
|
||||
remoteInfo = libSDL;
|
||||
};
|
||||
049F36A0130CD8A000FF080F /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = FD1B48920E313154007AB34E /* SDL.xcodeproj */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = FD6526620DE8FCCB002AD96B;
|
||||
remoteInfo = libSDL;
|
||||
};
|
||||
F3F758F722AC5E8F001D97F2 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = FD1B48920E313154007AB34E /* SDL.xcodeproj */;
|
||||
containerPortal = F3A495802555ED0400E92A8B /* SDL.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = 52ED1E5C222889500061FCE0;
|
||||
remoteInfo = "libSDL-iOS-dylib";
|
||||
remoteGlobalIDString = BECDF66C0761BA81005FE872;
|
||||
remoteInfo = Framework;
|
||||
};
|
||||
F3F758F922AC5E8F001D97F2 /* PBXContainerItemProxy */ = {
|
||||
F3A495922555ED0500E92A8B /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = FD1B48920E313154007AB34E /* SDL.xcodeproj */;
|
||||
containerPortal = F3A495802555ED0400E92A8B /* SDL.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = F3E3C7572241389A007D243C;
|
||||
remoteInfo = "libSDL-tvOS-dylib";
|
||||
remoteGlobalIDString = A7D88B5423E2437C00DCD162;
|
||||
remoteInfo = "Framework-iOS";
|
||||
};
|
||||
F3F758FB22AC5E8F001D97F2 /* PBXContainerItemProxy */ = {
|
||||
F3A495942555ED0500E92A8B /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = FD1B48920E313154007AB34E /* SDL.xcodeproj */;
|
||||
containerPortal = F3A495802555ED0400E92A8B /* SDL.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = F3E3C65222406928007D243C;
|
||||
remoteInfo = "libSDLmain-iOS";
|
||||
remoteGlobalIDString = A7D88D1523E24BED00DCD162;
|
||||
remoteInfo = "Framework-tvOS";
|
||||
};
|
||||
F3F758FD22AC5E8F001D97F2 /* PBXContainerItemProxy */ = {
|
||||
F3A495962555ED0500E92A8B /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = FD1B48920E313154007AB34E /* SDL.xcodeproj */;
|
||||
containerPortal = F3A495802555ED0400E92A8B /* SDL.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = F3E3C75F224138AE007D243C;
|
||||
remoteInfo = "libSDLmain-tvOS";
|
||||
remoteGlobalIDString = BECDF6B30761BA81005FE872;
|
||||
remoteInfo = "Static Library";
|
||||
};
|
||||
FA30DEAB1BBF59D9009C397F /* PBXContainerItemProxy */ = {
|
||||
F3A495982555ED0500E92A8B /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = FD1B48920E313154007AB34E /* SDL.xcodeproj */;
|
||||
containerPortal = F3A495802555ED0400E92A8B /* SDL.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = FAB598141BB5C1B100BE72C5;
|
||||
remoteInfo = "libSDL-tv";
|
||||
remoteGlobalIDString = A7D88E5423E24D3B00DCD162;
|
||||
remoteInfo = "Static Library-iOS";
|
||||
};
|
||||
FA30DEAE1BBF5A69009C397F /* PBXContainerItemProxy */ = {
|
||||
F3A4959A2555ED0500E92A8B /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = FD1B48920E313154007AB34E /* SDL.xcodeproj */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = FAB598131BB5C1B100BE72C5;
|
||||
remoteInfo = "libSDL-tv";
|
||||
};
|
||||
FD1B489D0E313154007AB34E /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = FD1B48920E313154007AB34E /* SDL.xcodeproj */;
|
||||
containerPortal = F3A495802555ED0400E92A8B /* SDL.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = FD6526630DE8FCCB002AD96B;
|
||||
remoteInfo = StaticLib;
|
||||
remoteGlobalIDString = A769B23D23E259AE00872273;
|
||||
remoteInfo = "Static Library-tvOS";
|
||||
};
|
||||
F3A4959C2555ED0500E92A8B /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = F3A495802555ED0400E92A8B /* SDL.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = DB31407717554B71006C0E22;
|
||||
remoteInfo = "Shared Library";
|
||||
};
|
||||
F3A4959E2555ED0500E92A8B /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = F3A495802555ED0400E92A8B /* SDL.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = A75FCEB323E25AB700529352;
|
||||
remoteInfo = "Shared Library-iOS";
|
||||
};
|
||||
F3A495A02555ED0500E92A8B /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = F3A495802555ED0400E92A8B /* SDL.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = A75FD06C23E25AC700529352;
|
||||
remoteInfo = "Shared Library-tvOS";
|
||||
};
|
||||
F3A495A22555ED0500E92A8B /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = F3A495802555ED0400E92A8B /* SDL.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = BECDF6BE0761BA81005FE872;
|
||||
remoteInfo = "Standard DMG";
|
||||
};
|
||||
F3A495A42555ED0500E92A8B /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = F3A495802555ED0400E92A8B /* SDL.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = A75FDB8C23E4C74400529352;
|
||||
remoteInfo = hidapi;
|
||||
};
|
||||
F3A495A62555ED0500E92A8B /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = F3A495802555ED0400E92A8B /* SDL.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = A75FDB4923E399AC00529352;
|
||||
remoteInfo = "hidapi-iOS";
|
||||
};
|
||||
F3A495A82555ED0500E92A8B /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = F3A495802555ED0400E92A8B /* SDL.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = A75FDB6E23E3A2C900529352;
|
||||
remoteInfo = "hidapi-tvOS";
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
|
@ -260,6 +263,11 @@
|
|||
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; };
|
||||
8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
F3A495802555ED0400E92A8B /* SDL.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SDL.xcodeproj; path = ../../Xcode/SDL/SDL.xcodeproj; sourceTree = "<group>"; };
|
||||
F3A497382555EEA900E92A8B /* CoreHaptics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreHaptics.framework; path = System/Library/Frameworks/CoreHaptics.framework; sourceTree = SDKROOT; };
|
||||
F3A497472555EEEE00E92A8B /* CoreHaptics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreHaptics.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS14.0.sdk/System/Library/Frameworks/CoreHaptics.framework; sourceTree = DEVELOPER_DIR; };
|
||||
F3A497582555EFC300E92A8B /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS14.0.sdk/System/Library/Frameworks/AVFoundation.framework; sourceTree = DEVELOPER_DIR; };
|
||||
F3A497622555EFCF00E92A8B /* Metal.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Metal.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS14.0.sdk/System/Library/Frameworks/Metal.framework; sourceTree = DEVELOPER_DIR; };
|
||||
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; };
|
||||
FA86C0361D9765BA009CB637 /* iOS Launch Screen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = "iOS Launch Screen.storyboard"; sourceTree = "<group>"; };
|
||||
|
@ -268,7 +276,6 @@
|
|||
FABA34D71D8B5E7700915323 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS10.0.sdk/System/Library/Frameworks/AVFoundation.framework; sourceTree = DEVELOPER_DIR; };
|
||||
FAE0E9691BAF96A00098DFA4 /* GameController.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GameController.framework; path = System/Library/Frameworks/GameController.framework; sourceTree = SDKROOT; };
|
||||
FD15FCB20E086866003BDF25 /* Happy.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Happy.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
FD1B48920E313154007AB34E /* SDL.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SDL.xcodeproj; path = ../SDL/SDL.xcodeproj; sourceTree = SOURCE_ROOT; };
|
||||
FD5F9BE40E0DEBEA008E885B /* Accel.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Accel.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
FD77A0050E26BC0500F39101 /* accelerometer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = accelerometer.c; sourceTree = "<group>"; };
|
||||
FD77A0060E26BC0500F39101 /* common.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = common.c; sourceTree = "<group>"; };
|
||||
|
@ -306,11 +313,12 @@
|
|||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
FD1B48DD0E313255007AB34E /* libSDL2.a in Frameworks */,
|
||||
F3A497102555EE4800E92A8B /* libSDL2.a in Frameworks */,
|
||||
FDF0D7AC0E12D53800247964 /* AudioToolbox.framework in Frameworks */,
|
||||
FABA34D41D8B5E5600915323 /* AVFoundation.framework in Frameworks */,
|
||||
FDF0D7AB0E12D53800247964 /* CoreAudio.framework in Frameworks */,
|
||||
1D3623EC0D0F72F000981E51 /* CoreGraphics.framework in Frameworks */,
|
||||
F3A4974D2555EF9500E92A8B /* CoreHaptics.framework in Frameworks */,
|
||||
FA8B4BA31967070A00F8EB7C /* CoreMotion.framework in Frameworks */,
|
||||
1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */,
|
||||
FAE0E96A1BAF96A00098DFA4 /* GameController.framework in Frameworks */,
|
||||
|
@ -325,12 +333,15 @@
|
|||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
FA30DEB71BBF5BB8009C397F /* libSDL2.a in Frameworks */,
|
||||
F3A497462555EEDF00E92A8B /* libSDL2.a in Frameworks */,
|
||||
FA30DEC91BBF5C14009C397F /* AudioToolbox.framework in Frameworks */,
|
||||
F3A497592555EFC300E92A8B /* AVFoundation.framework in Frameworks */,
|
||||
FA30DECF1BBF5C14009C397F /* CoreAudio.framework in Frameworks */,
|
||||
FA30DECC1BBF5C14009C397F /* CoreGraphics.framework in Frameworks */,
|
||||
F3A497482555EEEE00E92A8B /* CoreHaptics.framework in Frameworks */,
|
||||
FA30DECE1BBF5C14009C397F /* Foundation.framework in Frameworks */,
|
||||
FA30DEC81BBF5C14009C397F /* GameController.framework in Frameworks */,
|
||||
F3A497632555EFCF00E92A8B /* Metal.framework in Frameworks */,
|
||||
FA30DECA1BBF5C14009C397F /* QuartzCore.framework in Frameworks */,
|
||||
FA30DECB1BBF5C14009C397F /* OpenGLES.framework in Frameworks */,
|
||||
FA30DECD1BBF5C14009C397F /* UIKit.framework in Frameworks */,
|
||||
|
@ -341,11 +352,12 @@
|
|||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
FD1B49980E313261007AB34E /* libSDL2.a in Frameworks */,
|
||||
F3A497442555EECD00E92A8B /* libSDL2.a in Frameworks */,
|
||||
FDF0D7AA0E12D53500247964 /* AudioToolbox.framework in Frameworks */,
|
||||
FABA34D61D8B5E5A00915323 /* AVFoundation.framework in Frameworks */,
|
||||
FDF0D7A90E12D53500247964 /* CoreAudio.framework in Frameworks */,
|
||||
FD15FD6B0E086911003BDF25 /* CoreGraphics.framework in Frameworks */,
|
||||
F3A497452555EED500E92A8B /* CoreHaptics.framework in Frameworks */,
|
||||
FA8B4BA41967071300F8EB7C /* CoreMotion.framework in Frameworks */,
|
||||
FD15FD690E086911003BDF25 /* Foundation.framework in Frameworks */,
|
||||
FAE0E96C1BAF96A90098DFA4 /* GameController.framework in Frameworks */,
|
||||
|
@ -360,11 +372,12 @@
|
|||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
FD1B499C0E313269007AB34E /* libSDL2.a in Frameworks */,
|
||||
F3A4972F2555EE8A00E92A8B /* libSDL2.a in Frameworks */,
|
||||
FDF0D7A80E12D53200247964 /* AudioToolbox.framework in Frameworks */,
|
||||
FABA34D91D8B5E7B00915323 /* AVFoundation.framework in Frameworks */,
|
||||
FDF0D7A70E12D53200247964 /* CoreAudio.framework in Frameworks */,
|
||||
FD5F9CEA0E0E0741008E885B /* CoreGraphics.framework in Frameworks */,
|
||||
F3A497392555EEA900E92A8B /* CoreHaptics.framework in Frameworks */,
|
||||
FA8B4BA51967071A00F8EB7C /* CoreMotion.framework in Frameworks */,
|
||||
FD5F9CE80E0E0741008E885B /* Foundation.framework in Frameworks */,
|
||||
FAE0E96D1BAF96AF0098DFA4 /* GameController.framework in Frameworks */,
|
||||
|
@ -379,11 +392,12 @@
|
|||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
FDB652000E43D1F300F688B5 /* libSDL2.a in Frameworks */,
|
||||
F3A497492555EF0B00E92A8B /* libSDL2.a in Frameworks */,
|
||||
FDB652080E43D1F300F688B5 /* AudioToolbox.framework in Frameworks */,
|
||||
FABA34DD1D8B5E8D00915323 /* AVFoundation.framework in Frameworks */,
|
||||
FDB652070E43D1F300F688B5 /* CoreAudio.framework in Frameworks */,
|
||||
FDB652040E43D1F300F688B5 /* CoreGraphics.framework in Frameworks */,
|
||||
F3A4974A2555EF1200E92A8B /* CoreHaptics.framework in Frameworks */,
|
||||
FA8B4BA91967073D00F8EB7C /* CoreMotion.framework in Frameworks */,
|
||||
FDB652020E43D1F300F688B5 /* Foundation.framework in Frameworks */,
|
||||
FAE0E9711BAF96BB0098DFA4 /* GameController.framework in Frameworks */,
|
||||
|
@ -398,11 +412,12 @@
|
|||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
FD1B499E0E31326C007AB34E /* libSDL2.a in Frameworks */,
|
||||
F3A4974E2555EF9F00E92A8B /* libSDL2.a in Frameworks */,
|
||||
FDF0D7960E12D52900247964 /* AudioToolbox.framework in Frameworks */,
|
||||
FABA34DA1D8B5E7F00915323 /* AVFoundation.framework in Frameworks */,
|
||||
FDF0D7950E12D52900247964 /* CoreAudio.framework in Frameworks */,
|
||||
FDC202E80E107B1200ABAC90 /* CoreGraphics.framework in Frameworks */,
|
||||
F3A4974F2555EFA400E92A8B /* CoreHaptics.framework in Frameworks */,
|
||||
FA8B4BA61967072100F8EB7C /* CoreMotion.framework in Frameworks */,
|
||||
FDC202E60E107B1200ABAC90 /* Foundation.framework in Frameworks */,
|
||||
FAE0E96E1BAF96B10098DFA4 /* GameController.framework in Frameworks */,
|
||||
|
@ -417,11 +432,12 @@
|
|||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
FD1B49A20E313273007AB34E /* libSDL2.a in Frameworks */,
|
||||
F3A497422555EEBE00E92A8B /* libSDL2.a in Frameworks */,
|
||||
FDC52EDA0E2843D6008D768C /* AudioToolbox.framework in Frameworks */,
|
||||
FABA34DC1D8B5E8900915323 /* AVFoundation.framework in Frameworks */,
|
||||
FDC52ED90E2843D6008D768C /* CoreAudio.framework in Frameworks */,
|
||||
FDC52ED60E2843D6008D768C /* CoreGraphics.framework in Frameworks */,
|
||||
F3A497432555EEC400E92A8B /* CoreHaptics.framework in Frameworks */,
|
||||
FA8B4BA81967073400F8EB7C /* CoreMotion.framework in Frameworks */,
|
||||
FDC52ED40E2843D6008D768C /* Foundation.framework in Frameworks */,
|
||||
FAE0E9701BAF96B80098DFA4 /* GameController.framework in Frameworks */,
|
||||
|
@ -436,11 +452,12 @@
|
|||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
FD1B49A00E313270007AB34E /* libSDL2.a in Frameworks */,
|
||||
F3A4974B2555EF1B00E92A8B /* libSDL2.a in Frameworks */,
|
||||
FDF0D7230E12D31800247964 /* AudioToolbox.framework in Frameworks */,
|
||||
FABA34DB1D8B5E8500915323 /* AVFoundation.framework in Frameworks */,
|
||||
FDF0D71E0E12D2AB00247964 /* CoreAudio.framework in Frameworks */,
|
||||
FDF0D69E0E12D05400247964 /* CoreGraphics.framework in Frameworks */,
|
||||
F3A4974C2555EF2000E92A8B /* CoreHaptics.framework in Frameworks */,
|
||||
FA8B4BA71967072800F8EB7C /* CoreMotion.framework in Frameworks */,
|
||||
FDF0D69C0E12D05400247964 /* Foundation.framework in Frameworks */,
|
||||
FAE0E96F1BAF96B50098DFA4 /* GameController.framework in Frameworks */,
|
||||
|
@ -472,8 +489,8 @@
|
|||
29B97314FDCFA39411CA2CEA /* CustomTemplate */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
F3A495802555ED0400E92A8B /* SDL.xcodeproj */,
|
||||
FA86C0361D9765BA009CB637 /* iOS Launch Screen.storyboard */,
|
||||
FD1B48920E313154007AB34E /* SDL.xcodeproj */,
|
||||
FD77A0040E26BC0500F39101 /* src */,
|
||||
29B97317FDCFA39411CA2CEA /* Resources */,
|
||||
29B97323FDCFA39411CA2CEA /* Frameworks */,
|
||||
|
@ -496,6 +513,10 @@
|
|||
29B97323FDCFA39411CA2CEA /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
F3A497622555EFCF00E92A8B /* Metal.framework */,
|
||||
F3A497582555EFC300E92A8B /* AVFoundation.framework */,
|
||||
F3A497382555EEA900E92A8B /* CoreHaptics.framework */,
|
||||
F3A497472555EEEE00E92A8B /* CoreHaptics.framework */,
|
||||
F3F758FF22AC5EC7001D97F2 /* Metal.framework */,
|
||||
FABA34D71D8B5E7700915323 /* AVFoundation.framework */,
|
||||
FABA34D31D8B5E5600915323 /* AVFoundation.framework */,
|
||||
|
@ -512,15 +533,22 @@
|
|||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
FD1B48930E313154007AB34E /* Products */ = {
|
||||
F3A495812555ED0400E92A8B /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
FD1B489E0E313154007AB34E /* libSDL2.a */,
|
||||
F3F758F822AC5E8F001D97F2 /* libSDL2.dylib */,
|
||||
FA30DEAC1BBF59D9009C397F /* libSDL2.a */,
|
||||
F3F758FA22AC5E8F001D97F2 /* libSDL2.dylib */,
|
||||
F3F758FC22AC5E8F001D97F2 /* libSDLmain.a */,
|
||||
F3F758FE22AC5E8F001D97F2 /* libSDLmain.a */,
|
||||
F3A495912555ED0500E92A8B /* SDL2.framework */,
|
||||
F3A495932555ED0500E92A8B /* SDL2.framework */,
|
||||
F3A495952555ED0500E92A8B /* SDL2.framework */,
|
||||
F3A495972555ED0500E92A8B /* libSDL2.a */,
|
||||
F3A495992555ED0500E92A8B /* libSDL2.a */,
|
||||
F3A4959B2555ED0500E92A8B /* libSDL2.a */,
|
||||
F3A4959D2555ED0500E92A8B /* libSDL2.dylib */,
|
||||
F3A4959F2555ED0500E92A8B /* libSDL2.dylib */,
|
||||
F3A495A12555ED0500E92A8B /* libSDL2.dylib */,
|
||||
F3A495A32555ED0500E92A8B /* SDL2 */,
|
||||
F3A495A52555ED0500E92A8B /* hidapi.framework */,
|
||||
F3A495A72555ED0500E92A8B /* hidapi.framework */,
|
||||
F3A495A92555ED0500E92A8B /* hidapi.framework */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
|
@ -588,7 +616,6 @@
|
|||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
049F3695130CD86800FF080F /* PBXTargetDependency */,
|
||||
);
|
||||
name = Rectangles;
|
||||
productName = SDLiPodTest;
|
||||
|
@ -606,7 +633,6 @@
|
|||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
FA30DEAF1BBF5A69009C397F /* PBXTargetDependency */,
|
||||
);
|
||||
name = "Happy-TV";
|
||||
productName = "Happy-TV";
|
||||
|
@ -624,7 +650,6 @@
|
|||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
049F3697130CD87600FF080F /* PBXTargetDependency */,
|
||||
);
|
||||
name = Happy;
|
||||
productName = BMPTest;
|
||||
|
@ -642,7 +667,6 @@
|
|||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
049F3699130CD87F00FF080F /* PBXTargetDependency */,
|
||||
);
|
||||
name = Accel;
|
||||
productName = Accelerometer;
|
||||
|
@ -660,7 +684,6 @@
|
|||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
049F36A1130CD8A000FF080F /* PBXTargetDependency */,
|
||||
);
|
||||
name = Keyboard;
|
||||
productName = Accelerometer;
|
||||
|
@ -678,7 +701,6 @@
|
|||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
049F369B130CD88800FF080F /* PBXTargetDependency */,
|
||||
);
|
||||
name = Touch;
|
||||
productName = Accelerometer;
|
||||
|
@ -696,7 +718,6 @@
|
|||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
049F369F130CD89800FF080F /* PBXTargetDependency */,
|
||||
);
|
||||
name = Fireworks;
|
||||
productName = Accelerometer;
|
||||
|
@ -714,7 +735,6 @@
|
|||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
049F369D130CD89000FF080F /* PBXTargetDependency */,
|
||||
);
|
||||
name = Mixer;
|
||||
productName = Accelerometer;
|
||||
|
@ -729,12 +749,32 @@
|
|||
attributes = {
|
||||
LastUpgradeCheck = 0630;
|
||||
TargetAttributes = {
|
||||
1D6058900D05DD3D006BFB54 = {
|
||||
DevelopmentTeam = MXGJJ98X76;
|
||||
};
|
||||
FA30DE951BBF59D9009C397F = {
|
||||
CreatedOnToolsVersion = 7.1;
|
||||
DevelopmentTeam = MXGJJ98X76;
|
||||
};
|
||||
FD15FCB10E086866003BDF25 = {
|
||||
DevelopmentTeam = MXGJJ98X76;
|
||||
};
|
||||
FD5F9BE30E0DEBEA008E885B = {
|
||||
DevelopmentTeam = MXGJJ98X76;
|
||||
};
|
||||
FDB651F70E43D1F300F688B5 = {
|
||||
DevelopmentTeam = MXGJJ98X76;
|
||||
};
|
||||
FDC202DD0E107B1200ABAC90 = {
|
||||
DevelopmentTeam = MXGJJ98X76;
|
||||
};
|
||||
FDC52EC60E2843D6008D768C = {
|
||||
DevelopmentTeam = MXGJJ98X76;
|
||||
ProvisioningStyle = Automatic;
|
||||
};
|
||||
FDF0D6920E12D05400247964 = {
|
||||
DevelopmentTeam = MXGJJ98X76;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Demos" */;
|
||||
|
@ -752,65 +792,114 @@
|
|||
projectDirPath = "";
|
||||
projectReferences = (
|
||||
{
|
||||
ProductGroup = FD1B48930E313154007AB34E /* Products */;
|
||||
ProjectRef = FD1B48920E313154007AB34E /* SDL.xcodeproj */;
|
||||
ProductGroup = F3A495812555ED0400E92A8B /* Products */;
|
||||
ProjectRef = F3A495802555ED0400E92A8B /* SDL.xcodeproj */;
|
||||
},
|
||||
);
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
1D6058900D05DD3D006BFB54 /* Rectangles */,
|
||||
FD5F9BE30E0DEBEA008E885B /* Accel */,
|
||||
FDC52EC60E2843D6008D768C /* Fireworks */,
|
||||
FD15FCB10E086866003BDF25 /* Happy */,
|
||||
FA30DE951BBF59D9009C397F /* Happy-TV */,
|
||||
FD5F9BE30E0DEBEA008E885B /* Accel */,
|
||||
FDC202DD0E107B1200ABAC90 /* Touch */,
|
||||
FDF0D6920E12D05400247964 /* Mixer */,
|
||||
FDC52EC60E2843D6008D768C /* Fireworks */,
|
||||
FDB651F70E43D1F300F688B5 /* Keyboard */,
|
||||
FDF0D6920E12D05400247964 /* Mixer */,
|
||||
1D6058900D05DD3D006BFB54 /* Rectangles */,
|
||||
FDC202DD0E107B1200ABAC90 /* Touch */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXReferenceProxy section */
|
||||
F3F758F822AC5E8F001D97F2 /* libSDL2.dylib */ = {
|
||||
F3A495912555ED0500E92A8B /* SDL2.framework */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = archive.ar;
|
||||
path = libSDL2.dylib;
|
||||
remoteRef = F3F758F722AC5E8F001D97F2 /* PBXContainerItemProxy */;
|
||||
fileType = wrapper.framework;
|
||||
path = SDL2.framework;
|
||||
remoteRef = F3A495902555ED0500E92A8B /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
F3F758FA22AC5E8F001D97F2 /* libSDL2.dylib */ = {
|
||||
F3A495932555ED0500E92A8B /* SDL2.framework */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = archive.ar;
|
||||
path = libSDL2.dylib;
|
||||
remoteRef = F3F758F922AC5E8F001D97F2 /* PBXContainerItemProxy */;
|
||||
fileType = wrapper.framework;
|
||||
path = SDL2.framework;
|
||||
remoteRef = F3A495922555ED0500E92A8B /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
F3F758FC22AC5E8F001D97F2 /* libSDLmain.a */ = {
|
||||
F3A495952555ED0500E92A8B /* SDL2.framework */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = archive.ar;
|
||||
path = libSDLmain.a;
|
||||
remoteRef = F3F758FB22AC5E8F001D97F2 /* PBXContainerItemProxy */;
|
||||
fileType = wrapper.framework;
|
||||
path = SDL2.framework;
|
||||
remoteRef = F3A495942555ED0500E92A8B /* 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 */ = {
|
||||
F3A495972555ED0500E92A8B /* libSDL2.a */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = archive.ar;
|
||||
path = libSDL2.a;
|
||||
remoteRef = FA30DEAB1BBF59D9009C397F /* PBXContainerItemProxy */;
|
||||
remoteRef = F3A495962555ED0500E92A8B /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
FD1B489E0E313154007AB34E /* libSDL2.a */ = {
|
||||
F3A495992555ED0500E92A8B /* libSDL2.a */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = archive.ar;
|
||||
path = libSDL2.a;
|
||||
remoteRef = FD1B489D0E313154007AB34E /* PBXContainerItemProxy */;
|
||||
remoteRef = F3A495982555ED0500E92A8B /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
F3A4959B2555ED0500E92A8B /* libSDL2.a */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = archive.ar;
|
||||
path = libSDL2.a;
|
||||
remoteRef = F3A4959A2555ED0500E92A8B /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
F3A4959D2555ED0500E92A8B /* libSDL2.dylib */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = "compiled.mach-o.dylib";
|
||||
path = libSDL2.dylib;
|
||||
remoteRef = F3A4959C2555ED0500E92A8B /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
F3A4959F2555ED0500E92A8B /* libSDL2.dylib */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = "compiled.mach-o.dylib";
|
||||
path = libSDL2.dylib;
|
||||
remoteRef = F3A4959E2555ED0500E92A8B /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
F3A495A12555ED0500E92A8B /* libSDL2.dylib */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = "compiled.mach-o.dylib";
|
||||
path = libSDL2.dylib;
|
||||
remoteRef = F3A495A02555ED0500E92A8B /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
F3A495A32555ED0500E92A8B /* SDL2 */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = "compiled.mach-o.executable";
|
||||
path = SDL2;
|
||||
remoteRef = F3A495A22555ED0500E92A8B /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
F3A495A52555ED0500E92A8B /* hidapi.framework */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = wrapper.framework;
|
||||
path = hidapi.framework;
|
||||
remoteRef = F3A495A42555ED0500E92A8B /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
F3A495A72555ED0500E92A8B /* hidapi.framework */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = wrapper.framework;
|
||||
path = hidapi.framework;
|
||||
remoteRef = F3A495A62555ED0500E92A8B /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
F3A495A92555ED0500E92A8B /* hidapi.framework */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = wrapper.framework;
|
||||
path = hidapi.framework;
|
||||
remoteRef = F3A495A82555ED0500E92A8B /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
/* End PBXReferenceProxy section */
|
||||
|
@ -984,54 +1073,10 @@
|
|||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
049F3695130CD86800FF080F /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
name = libSDL;
|
||||
targetProxy = 049F3694130CD86800FF080F /* PBXContainerItemProxy */;
|
||||
};
|
||||
049F3697130CD87600FF080F /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
name = libSDL;
|
||||
targetProxy = 049F3696130CD87600FF080F /* PBXContainerItemProxy */;
|
||||
};
|
||||
049F3699130CD87F00FF080F /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
name = libSDL;
|
||||
targetProxy = 049F3698130CD87F00FF080F /* PBXContainerItemProxy */;
|
||||
};
|
||||
049F369B130CD88800FF080F /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
name = libSDL;
|
||||
targetProxy = 049F369A130CD88800FF080F /* PBXContainerItemProxy */;
|
||||
};
|
||||
049F369D130CD89000FF080F /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
name = libSDL;
|
||||
targetProxy = 049F369C130CD89000FF080F /* PBXContainerItemProxy */;
|
||||
};
|
||||
049F369F130CD89800FF080F /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
name = libSDL;
|
||||
targetProxy = 049F369E130CD89800FF080F /* PBXContainerItemProxy */;
|
||||
};
|
||||
049F36A1130CD8A000FF080F /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
name = libSDL;
|
||||
targetProxy = 049F36A0130CD8A000FF080F /* PBXContainerItemProxy */;
|
||||
};
|
||||
FA30DEAF1BBF5A69009C397F /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
name = "libSDL-tv";
|
||||
targetProxy = FA30DEAE1BBF5A69009C397F /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
1D6058940D05DD3E006BFB54 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
DEVELOPMENT_TEAM = "";
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Rectangles;
|
||||
PRODUCT_NAME = Rectangles;
|
||||
|
@ -1041,7 +1086,6 @@
|
|||
1D6058950D05DD3E006BFB54 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
DEVELOPMENT_TEAM = "";
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Rectangles;
|
||||
PRODUCT_NAME = Rectangles;
|
||||
|
@ -1093,7 +1137,6 @@
|
|||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
|
@ -1139,7 +1182,6 @@
|
|||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
DEVELOPMENT_TEAM = "";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
|
@ -1165,7 +1207,6 @@
|
|||
FD15FCB50E086866003BDF25 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
DEVELOPMENT_TEAM = "";
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Happy;
|
||||
|
@ -1177,7 +1218,6 @@
|
|||
FD15FCB60E086866003BDF25 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
DEVELOPMENT_TEAM = "";
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Happy;
|
||||
PRODUCT_NAME = Happy;
|
||||
|
@ -1188,7 +1228,6 @@
|
|||
FD5F9BE70E0DEBEB008E885B /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
DEVELOPMENT_TEAM = "";
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Accel;
|
||||
PRODUCT_NAME = Accel;
|
||||
|
@ -1199,7 +1238,6 @@
|
|||
FD5F9BE80E0DEBEB008E885B /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
DEVELOPMENT_TEAM = "";
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Accel;
|
||||
PRODUCT_NAME = Accel;
|
||||
|
@ -1210,7 +1248,6 @@
|
|||
FDB6520A0E43D1F300F688B5 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
DEVELOPMENT_TEAM = "";
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Keyboard;
|
||||
PRODUCT_NAME = Keyboard;
|
||||
|
@ -1221,7 +1258,6 @@
|
|||
FDB6520B0E43D1F300F688B5 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
DEVELOPMENT_TEAM = "";
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Keyboard;
|
||||
PRODUCT_NAME = Keyboard;
|
||||
|
@ -1232,7 +1268,6 @@
|
|||
FDC202EC0E107B1200ABAC90 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
DEVELOPMENT_TEAM = "";
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Touch;
|
||||
PRODUCT_NAME = Touch;
|
||||
|
@ -1243,7 +1278,6 @@
|
|||
FDC202ED0E107B1200ABAC90 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
DEVELOPMENT_TEAM = "";
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Touch;
|
||||
PRODUCT_NAME = Touch;
|
||||
|
@ -1255,7 +1289,6 @@
|
|||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
DEVELOPMENT_TEAM = "";
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Fireworks;
|
||||
PRODUCT_NAME = Fireworks;
|
||||
|
@ -1267,7 +1300,6 @@
|
|||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
DEVELOPMENT_TEAM = "";
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Fireworks;
|
||||
PRODUCT_NAME = Fireworks;
|
||||
|
@ -1278,7 +1310,6 @@
|
|||
FDF0D6A20E12D05400247964 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
DEVELOPMENT_TEAM = "";
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Mixer;
|
||||
PRODUCT_NAME = Mixer;
|
||||
|
@ -1289,7 +1320,6 @@
|
|||
FDF0D6A30E12D05400247964 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
DEVELOPMENT_TEAM = "";
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Mixer;
|
||||
PRODUCT_NAME = Mixer;
|
||||
|
|
|
@ -11,8 +11,11 @@
|
|||
1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; };
|
||||
28FD15000DC6FC520079059D /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 28FD14FF0DC6FC520079059D /* OpenGLES.framework */; };
|
||||
28FD15080DC6FC5B0079059D /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 28FD15070DC6FC5B0079059D /* QuartzCore.framework */; };
|
||||
944A656F195747D90094A81E /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 944A656E1957463F0094A81E /* libSDL2.a */; };
|
||||
945C4F53195AF17F00DBBF61 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 945C4F52195AF17F00DBBF61 /* Default-568h@2x.png */; };
|
||||
F3A497AC2555F0BD00E92A8B /* CoreHaptics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A497AB2555F0BD00E92A8B /* CoreHaptics.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
|
||||
F3A497AD2555F0C000E92A8B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A4978F2555F07100E92A8B /* libSDL2.a */; };
|
||||
F3A497B02555F0FF00E92A8B /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A497AF2555F0FF00E92A8B /* Metal.framework */; };
|
||||
F3A497B32555F11600E92A8B /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A497B22555F11600E92A8B /* AVFoundation.framework */; };
|
||||
FA8B4B97196703B400F8EB7C /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA8B4B96196703B400F8EB7C /* CoreMotion.framework */; };
|
||||
FAE0E9651BAF967F0098DFA4 /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FAE0E9641BAF967F0098DFA4 /* GameController.framework */; };
|
||||
FD779EDE0E26BA1200F39101 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FD779EDD0E26BA1200F39101 /* CoreAudio.framework */; };
|
||||
|
@ -24,12 +27,96 @@
|
|||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
944A656D1957463F0094A81E /* PBXContainerItemProxy */ = {
|
||||
F3A497862555F07100E92A8B /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 944A65681957463F0094A81E /* SDL.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = FD6526630DE8FCCB002AD96B;
|
||||
remoteInfo = libSDL;
|
||||
remoteGlobalIDString = BECDF66C0761BA81005FE872;
|
||||
remoteInfo = Framework;
|
||||
};
|
||||
F3A497882555F07100E92A8B /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 944A65681957463F0094A81E /* SDL.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = A7D88B5423E2437C00DCD162;
|
||||
remoteInfo = "Framework-iOS";
|
||||
};
|
||||
F3A4978A2555F07100E92A8B /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 944A65681957463F0094A81E /* SDL.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = A7D88D1523E24BED00DCD162;
|
||||
remoteInfo = "Framework-tvOS";
|
||||
};
|
||||
F3A4978C2555F07100E92A8B /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 944A65681957463F0094A81E /* SDL.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = BECDF6B30761BA81005FE872;
|
||||
remoteInfo = "Static Library";
|
||||
};
|
||||
F3A4978E2555F07100E92A8B /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 944A65681957463F0094A81E /* SDL.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = A7D88E5423E24D3B00DCD162;
|
||||
remoteInfo = "Static Library-iOS";
|
||||
};
|
||||
F3A497902555F07100E92A8B /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 944A65681957463F0094A81E /* SDL.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = A769B23D23E259AE00872273;
|
||||
remoteInfo = "Static Library-tvOS";
|
||||
};
|
||||
F3A497922555F07100E92A8B /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 944A65681957463F0094A81E /* SDL.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = DB31407717554B71006C0E22;
|
||||
remoteInfo = "Shared Library";
|
||||
};
|
||||
F3A497942555F07100E92A8B /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 944A65681957463F0094A81E /* SDL.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = A75FCEB323E25AB700529352;
|
||||
remoteInfo = "Shared Library-iOS";
|
||||
};
|
||||
F3A497962555F07100E92A8B /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 944A65681957463F0094A81E /* SDL.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = A75FD06C23E25AC700529352;
|
||||
remoteInfo = "Shared Library-tvOS";
|
||||
};
|
||||
F3A497982555F07100E92A8B /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 944A65681957463F0094A81E /* SDL.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = BECDF6BE0761BA81005FE872;
|
||||
remoteInfo = "Standard DMG";
|
||||
};
|
||||
F3A4979A2555F07100E92A8B /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 944A65681957463F0094A81E /* SDL.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = A75FDB8C23E4C74400529352;
|
||||
remoteInfo = hidapi;
|
||||
};
|
||||
F3A4979C2555F07100E92A8B /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 944A65681957463F0094A81E /* SDL.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = A75FDB4923E399AC00529352;
|
||||
remoteInfo = "hidapi-iOS";
|
||||
};
|
||||
F3A4979E2555F07100E92A8B /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 944A65681957463F0094A81E /* SDL.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = A75FDB6E23E3A2C900529352;
|
||||
remoteInfo = "hidapi-tvOS";
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
|
@ -40,8 +127,11 @@
|
|||
28FD14FF0DC6FC520079059D /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; };
|
||||
28FD15070DC6FC5B0079059D /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
|
||||
8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
944A65681957463F0094A81E /* SDL.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SDL.xcodeproj; path = ../../SDL/SDL.xcodeproj; sourceTree = "<group>"; };
|
||||
944A65681957463F0094A81E /* SDL.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SDL.xcodeproj; path = ../../../Xcode/SDL/SDL.xcodeproj; sourceTree = "<group>"; };
|
||||
945C4F52195AF17F00DBBF61 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = "<group>"; };
|
||||
F3A497AB2555F0BD00E92A8B /* CoreHaptics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreHaptics.framework; path = System/Library/Frameworks/CoreHaptics.framework; sourceTree = SDKROOT; };
|
||||
F3A497AF2555F0FF00E92A8B /* Metal.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Metal.framework; path = System/Library/Frameworks/Metal.framework; sourceTree = SDKROOT; };
|
||||
F3A497B22555F11600E92A8B /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
|
||||
FA8B4B96196703B400F8EB7C /* CoreMotion.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMotion.framework; path = System/Library/Frameworks/CoreMotion.framework; sourceTree = SDKROOT; };
|
||||
FAE0E9641BAF967F0098DFA4 /* GameController.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GameController.framework; path = System/Library/Frameworks/GameController.framework; sourceTree = SDKROOT; };
|
||||
FD779EDD0E26BA1200F39101 /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; };
|
||||
|
@ -57,16 +147,19 @@
|
|||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
944A656F195747D90094A81E /* libSDL2.a in Frameworks */,
|
||||
FAE0E9651BAF967F0098DFA4 /* GameController.framework in Frameworks */,
|
||||
F3A497AD2555F0C000E92A8B /* libSDL2.a in Frameworks */,
|
||||
FD77A0850E26BDB800F39101 /* AudioToolbox.framework in Frameworks */,
|
||||
F3A497B32555F11600E92A8B /* AVFoundation.framework in Frameworks */,
|
||||
1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */,
|
||||
1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */,
|
||||
FD779EDE0E26BA1200F39101 /* CoreAudio.framework in Frameworks */,
|
||||
FDB8BFC60E5A0F6A00980157 /* CoreGraphics.framework in Frameworks */,
|
||||
F3A497AC2555F0BD00E92A8B /* CoreHaptics.framework in Frameworks */,
|
||||
FA8B4B97196703B400F8EB7C /* CoreMotion.framework in Frameworks */,
|
||||
FAE0E9651BAF967F0098DFA4 /* GameController.framework in Frameworks */,
|
||||
F3A497B02555F0FF00E92A8B /* Metal.framework in Frameworks */,
|
||||
28FD15000DC6FC520079059D /* OpenGLES.framework in Frameworks */,
|
||||
28FD15080DC6FC5B0079059D /* QuartzCore.framework in Frameworks */,
|
||||
FD779EDE0E26BA1200F39101 /* CoreAudio.framework in Frameworks */,
|
||||
FD77A0850E26BDB800F39101 /* AudioToolbox.framework in Frameworks */,
|
||||
FDB8BFC60E5A0F6A00980157 /* CoreGraphics.framework in Frameworks */,
|
||||
FA8B4B97196703B400F8EB7C /* CoreMotion.framework in Frameworks */,
|
||||
1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
@ -115,6 +208,9 @@
|
|||
29B97323FDCFA39411CA2CEA /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
F3A497B22555F11600E92A8B /* AVFoundation.framework */,
|
||||
F3A497AF2555F0FF00E92A8B /* Metal.framework */,
|
||||
F3A497AB2555F0BD00E92A8B /* CoreHaptics.framework */,
|
||||
FAE0E9641BAF967F0098DFA4 /* GameController.framework */,
|
||||
FA8B4B96196703B400F8EB7C /* CoreMotion.framework */,
|
||||
FDB8BFC50E5A0F6A00980157 /* CoreGraphics.framework */,
|
||||
|
@ -128,10 +224,22 @@
|
|||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
944A65691957463F0094A81E /* Products */ = {
|
||||
F3A497772555F07100E92A8B /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
944A656E1957463F0094A81E /* libSDL2.a */,
|
||||
F3A497872555F07100E92A8B /* SDL2.framework */,
|
||||
F3A497892555F07100E92A8B /* SDL2.framework */,
|
||||
F3A4978B2555F07100E92A8B /* SDL2.framework */,
|
||||
F3A4978D2555F07100E92A8B /* libSDL2.a */,
|
||||
F3A4978F2555F07100E92A8B /* libSDL2.a */,
|
||||
F3A497912555F07100E92A8B /* libSDL2.a */,
|
||||
F3A497932555F07100E92A8B /* libSDL2.dylib */,
|
||||
F3A497952555F07100E92A8B /* libSDL2.dylib */,
|
||||
F3A497972555F07100E92A8B /* libSDL2.dylib */,
|
||||
F3A497992555F07100E92A8B /* SDL2 */,
|
||||
F3A4979B2555F07100E92A8B /* hidapi.framework */,
|
||||
F3A4979D2555F07100E92A8B /* hidapi.framework */,
|
||||
F3A4979F2555F07100E92A8B /* hidapi.framework */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
|
@ -178,7 +286,7 @@
|
|||
projectDirPath = "";
|
||||
projectReferences = (
|
||||
{
|
||||
ProductGroup = 944A65691957463F0094A81E /* Products */;
|
||||
ProductGroup = F3A497772555F07100E92A8B /* Products */;
|
||||
ProjectRef = 944A65681957463F0094A81E /* SDL.xcodeproj */;
|
||||
},
|
||||
);
|
||||
|
@ -190,11 +298,95 @@
|
|||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXReferenceProxy section */
|
||||
944A656E1957463F0094A81E /* libSDL2.a */ = {
|
||||
F3A497872555F07100E92A8B /* SDL2.framework */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = wrapper.framework;
|
||||
path = SDL2.framework;
|
||||
remoteRef = F3A497862555F07100E92A8B /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
F3A497892555F07100E92A8B /* SDL2.framework */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = wrapper.framework;
|
||||
path = SDL2.framework;
|
||||
remoteRef = F3A497882555F07100E92A8B /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
F3A4978B2555F07100E92A8B /* SDL2.framework */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = wrapper.framework;
|
||||
path = SDL2.framework;
|
||||
remoteRef = F3A4978A2555F07100E92A8B /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
F3A4978D2555F07100E92A8B /* libSDL2.a */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = archive.ar;
|
||||
path = libSDL2.a;
|
||||
remoteRef = 944A656D1957463F0094A81E /* PBXContainerItemProxy */;
|
||||
remoteRef = F3A4978C2555F07100E92A8B /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
F3A4978F2555F07100E92A8B /* libSDL2.a */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = archive.ar;
|
||||
path = libSDL2.a;
|
||||
remoteRef = F3A4978E2555F07100E92A8B /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
F3A497912555F07100E92A8B /* libSDL2.a */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = archive.ar;
|
||||
path = libSDL2.a;
|
||||
remoteRef = F3A497902555F07100E92A8B /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
F3A497932555F07100E92A8B /* libSDL2.dylib */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = "compiled.mach-o.dylib";
|
||||
path = libSDL2.dylib;
|
||||
remoteRef = F3A497922555F07100E92A8B /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
F3A497952555F07100E92A8B /* libSDL2.dylib */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = "compiled.mach-o.dylib";
|
||||
path = libSDL2.dylib;
|
||||
remoteRef = F3A497942555F07100E92A8B /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
F3A497972555F07100E92A8B /* libSDL2.dylib */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = "compiled.mach-o.dylib";
|
||||
path = libSDL2.dylib;
|
||||
remoteRef = F3A497962555F07100E92A8B /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
F3A497992555F07100E92A8B /* SDL2 */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = "compiled.mach-o.executable";
|
||||
path = SDL2;
|
||||
remoteRef = F3A497982555F07100E92A8B /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
F3A4979B2555F07100E92A8B /* hidapi.framework */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = wrapper.framework;
|
||||
path = hidapi.framework;
|
||||
remoteRef = F3A4979A2555F07100E92A8B /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
F3A4979D2555F07100E92A8B /* hidapi.framework */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = wrapper.framework;
|
||||
path = hidapi.framework;
|
||||
remoteRef = F3A4979C2555F07100E92A8B /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
F3A4979F2555F07100E92A8B /* hidapi.framework */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = wrapper.framework;
|
||||
path = hidapi.framework;
|
||||
remoteRef = F3A4979E2555F07100E92A8B /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
/* End PBXReferenceProxy section */
|
||||
|
|
8
externals/SDL/Xcode-iOS/Test/Info.plist
vendored
8
externals/SDL/Xcode-iOS/Test/Info.plist
vendored
|
@ -18,9 +18,17 @@
|
|||
<string>${PRODUCT_NAME}</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>UIApplicationSupportsIndirectInputEvents</key>
|
||||
<true/>
|
||||
<key>NSBluetoothAlwaysUsageDescription</key>
|
||||
<string>Steam Link would like to use Bluetooth controllers for input.</string>
|
||||
<key>NSBluetoothPeripheralUsageDescription</key>
|
||||
<string>Steam Link would like to use Bluetooth controllers for input.</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
File diff suppressed because it is too large
Load diff
4
externals/SDL/Xcode/SDL/Info-Framework.plist
vendored
4
externals/SDL/Xcode/SDL/Info-Framework.plist
vendored
|
@ -19,10 +19,10 @@
|
|||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>2.0.12</string>
|
||||
<string>2.0.14</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>SDLX</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>2.0.12</string>
|
||||
<string>2.0.14</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
2196
externals/SDL/Xcode/SDL/SDL.xcodeproj/project.pbxproj
vendored
2196
externals/SDL/Xcode/SDL/SDL.xcodeproj/project.pbxproj
vendored
File diff suppressed because it is too large
Load diff
4
externals/SDL/acinclude/ac_check_define.m4
vendored
4
externals/SDL/acinclude/ac_check_define.m4
vendored
|
@ -1,4 +1,4 @@
|
|||
AC_DEFUN([AC_CHECK_DEFINE],[dnl
|
||||
AC_DEFUN([AC_CHECK_DEFINE],[AC_REQUIRE([AC_PROG_CPP])dnl
|
||||
AC_CACHE_CHECK(for $1 in $2, ac_cv_define_$1,
|
||||
AC_EGREP_CPP([YES_IS_DEFINED], [
|
||||
#include <$2>
|
||||
|
@ -11,4 +11,4 @@ YES_IS_DEFINED
|
|||
AC_DEFINE([HAVE_$1],[],[Added by AC_CHECK_DEFINE])
|
||||
fi
|
||||
])dnl
|
||||
AC_DEFINE([HAVE_$1],[],[Added by AC_CHECK_DEFINE])
|
||||
|
||||
|
|
6
externals/SDL/acinclude/alsa.m4
vendored
6
externals/SDL/acinclude/alsa.m4
vendored
|
@ -1,4 +1,3 @@
|
|||
##############################################################################
|
||||
dnl Configure Paths for Alsa
|
||||
dnl Some modifications by Richard Boulton <richard-alsa@tartarus.org>
|
||||
dnl Christopher Lansdown <lansdoct@cs.alfred.edu>
|
||||
|
@ -7,12 +6,13 @@ dnl Last modification: alsa.m4,v 1.23 2004/01/16 18:14:22 tiwai Exp
|
|||
dnl AM_PATH_ALSA([MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
|
||||
dnl Test for libasound, and define ALSA_CFLAGS and ALSA_LIBS as appropriate.
|
||||
dnl enables arguments --with-alsa-prefix=
|
||||
dnl --with-alsa-enc-prefix=
|
||||
dnl --with-alsa-inc-prefix=
|
||||
dnl --disable-alsatest
|
||||
dnl
|
||||
dnl For backwards compatibility, if ACTION_IF_NOT_FOUND is not specified,
|
||||
dnl and the alsa libraries are not found, a fatal AC_MSG_ERROR() will result.
|
||||
dnl
|
||||
|
||||
AC_DEFUN([AM_PATH_ALSA],
|
||||
[dnl Save the original CFLAGS, LDFLAGS, and LIBS
|
||||
alsa_save_CFLAGS="$CFLAGS"
|
||||
|
@ -62,7 +62,7 @@ LIBS="$ALSA_LIBS $LIBS"
|
|||
AC_MSG_RESULT($ALSA_LIBS)
|
||||
|
||||
dnl Check for a working version of libasound that is of the right version.
|
||||
min_alsa_version=ifelse([$1], ,0.1.1,$1)
|
||||
min_alsa_version=ifelse([$1], ,0.1.1, $1)
|
||||
AC_MSG_CHECKING(for libasound headers version >= $min_alsa_version)
|
||||
no_alsa=""
|
||||
alsa_min_major_version=`echo $min_alsa_version | \
|
||||
|
|
4
externals/SDL/acinclude/esd.m4
vendored
4
externals/SDL/acinclude/esd.m4
vendored
|
@ -1,7 +1,3 @@
|
|||
##############################################################################
|
||||
#
|
||||
# --- esd.m4 ---
|
||||
#
|
||||
# Configure paths for ESD
|
||||
# Manish Singh 98-9-30
|
||||
# stolen back from Frank Belew
|
||||
|
|
|
@ -70,7 +70,7 @@
|
|||
android:label="@string/app_name"
|
||||
android:alwaysRetainTaskState="true"
|
||||
android:launchMode="singleInstance"
|
||||
android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|keyboard|keyboardHidden|navigation"
|
||||
android:configChanges="layoutDirection|locale|orientation|uiMode|screenLayout|screenSize|smallestScreenSize|keyboard|keyboardHidden|navigation"
|
||||
>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
|
|
@ -353,9 +353,18 @@ public class HIDDeviceManager {
|
|||
|
||||
private void connectHIDDeviceUSB(UsbDevice usbDevice) {
|
||||
synchronized (this) {
|
||||
int interface_mask = 0;
|
||||
for (int interface_index = 0; interface_index < usbDevice.getInterfaceCount(); interface_index++) {
|
||||
UsbInterface usbInterface = usbDevice.getInterface(interface_index);
|
||||
if (isHIDDeviceInterface(usbDevice, usbInterface)) {
|
||||
// Check to see if we've already added this interface
|
||||
// This happens with the Xbox Series X controller which has a duplicate interface 0, which is inactive
|
||||
int interface_id = usbInterface.getId();
|
||||
if ((interface_mask & (1 << interface_id)) != 0) {
|
||||
continue;
|
||||
}
|
||||
interface_mask |= (1 << interface_id);
|
||||
|
||||
HIDDeviceUSB device = new HIDDeviceUSB(this, usbDevice, interface_index);
|
||||
int id = device.getId();
|
||||
mDevicesById.put(id, device);
|
||||
|
|
|
@ -53,7 +53,12 @@ class HIDDeviceUSB implements HIDDevice {
|
|||
public String getSerialNumber() {
|
||||
String result = null;
|
||||
if (Build.VERSION.SDK_INT >= 21) {
|
||||
result = mDevice.getSerialNumber();
|
||||
try {
|
||||
result = mDevice.getSerialNumber();
|
||||
}
|
||||
catch (SecurityException exception) {
|
||||
//Log.w(TAG, "App permissions mean we cannot get serial number for device " + getDeviceName() + " message: " + exception.getMessage());
|
||||
}
|
||||
}
|
||||
if (result == null) {
|
||||
result = "";
|
||||
|
|
|
@ -2,7 +2,8 @@ package org.libsdl.app;
|
|||
|
||||
import android.content.Context;
|
||||
|
||||
import java.lang.reflect.*;
|
||||
import java.lang.Class;
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
/**
|
||||
SDL library initialization
|
||||
|
@ -51,16 +52,16 @@ public class SDL {
|
|||
// To use ReLinker, just add it as a dependency. For more information, see
|
||||
// https://github.com/KeepSafe/ReLinker for ReLinker's repository.
|
||||
//
|
||||
Class relinkClass = mContext.getClassLoader().loadClass("com.getkeepsafe.relinker.ReLinker");
|
||||
Class relinkListenerClass = mContext.getClassLoader().loadClass("com.getkeepsafe.relinker.ReLinker$LoadListener");
|
||||
Class contextClass = mContext.getClassLoader().loadClass("android.content.Context");
|
||||
Class stringClass = mContext.getClassLoader().loadClass("java.lang.String");
|
||||
Class<?> relinkClass = mContext.getClassLoader().loadClass("com.getkeepsafe.relinker.ReLinker");
|
||||
Class<?> relinkListenerClass = mContext.getClassLoader().loadClass("com.getkeepsafe.relinker.ReLinker$LoadListener");
|
||||
Class<?> contextClass = mContext.getClassLoader().loadClass("android.content.Context");
|
||||
Class<?> stringClass = mContext.getClassLoader().loadClass("java.lang.String");
|
||||
|
||||
// Get a 'force' instance of the ReLinker, so we can ensure libraries are reinstalled if
|
||||
// they've changed during updates.
|
||||
Method forceMethod = relinkClass.getDeclaredMethod("force");
|
||||
Object relinkInstance = forceMethod.invoke(null);
|
||||
Class relinkInstanceClass = relinkInstance.getClass();
|
||||
Class<?> relinkInstanceClass = relinkInstance.getClass();
|
||||
|
||||
// Actually load the library!
|
||||
Method loadMethod = relinkInstanceClass.getDeclaredMethod("loadLibrary", contextClass, stringClass, stringClass, relinkListenerClass);
|
||||
|
@ -77,7 +78,7 @@ public class SDL {
|
|||
catch (final SecurityException se) {
|
||||
throw se;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected static Context mContext;
|
||||
|
|
|
@ -1,35 +1,61 @@
|
|||
package org.libsdl.app;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.Arrays;
|
||||
import java.util.Hashtable;
|
||||
import java.lang.reflect.Method;
|
||||
import java.lang.Math;
|
||||
|
||||
import android.app.*;
|
||||
import android.content.*;
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.Dialog;
|
||||
import android.app.UiModeManager;
|
||||
import android.content.ClipboardManager;
|
||||
import android.content.ClipData;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.ActivityInfo;
|
||||
import android.content.pm.ApplicationInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.res.Configuration;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.PixelFormat;
|
||||
import android.graphics.PorterDuff;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.hardware.Sensor;
|
||||
import android.hardware.SensorEvent;
|
||||
import android.hardware.SensorEventListener;
|
||||
import android.hardware.SensorManager;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.text.InputType;
|
||||
import android.view.*;
|
||||
import android.util.DisplayMetrics;
|
||||
import android.util.Log;
|
||||
import android.util.SparseArray;
|
||||
import android.view.Display;
|
||||
import android.view.Gravity;
|
||||
import android.view.InputDevice;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.PointerIcon;
|
||||
import android.view.Surface;
|
||||
import android.view.SurfaceHolder;
|
||||
import android.view.SurfaceView;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
import android.view.inputmethod.BaseInputConnection;
|
||||
import android.view.inputmethod.EditorInfo;
|
||||
import android.view.inputmethod.InputConnection;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.Button;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
import android.os.*;
|
||||
import android.util.DisplayMetrics;
|
||||
import android.util.Log;
|
||||
import android.util.SparseArray;
|
||||
import android.graphics.*;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.hardware.*;
|
||||
import android.content.pm.ActivityInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.pm.ApplicationInfo;
|
||||
|
||||
import java.util.Hashtable;
|
||||
import java.util.Locale;
|
||||
|
||||
|
||||
/**
|
||||
SDL Activity
|
||||
|
@ -41,7 +67,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
public static final boolean mHasMultiWindow = (Build.VERSION.SDK_INT >= 24);
|
||||
|
||||
// Cursor types
|
||||
private static final int SDL_SYSTEM_CURSOR_NONE = -1;
|
||||
// private static final int SDL_SYSTEM_CURSOR_NONE = -1;
|
||||
private static final int SDL_SYSTEM_CURSOR_ARROW = 0;
|
||||
private static final int SDL_SYSTEM_CURSOR_IBEAM = 1;
|
||||
private static final int SDL_SYSTEM_CURSOR_WAIT = 2;
|
||||
|
@ -62,6 +88,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
protected static final int SDL_ORIENTATION_PORTRAIT_FLIPPED = 4;
|
||||
|
||||
protected static int mCurrentOrientation;
|
||||
protected static Locale mCurrentLocale;
|
||||
|
||||
// Handle the state of the native layer
|
||||
public enum NativeState {
|
||||
|
@ -72,7 +99,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
public static NativeState mCurrentNativeState;
|
||||
|
||||
/** If shared libraries (e.g. SDL or the native application) could not be loaded. */
|
||||
public static boolean mBrokenLibraries;
|
||||
public static boolean mBrokenLibraries = true;
|
||||
|
||||
// Main components
|
||||
protected static SDLActivity mSingleton;
|
||||
|
@ -93,8 +120,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
if (mMotionListener == null) {
|
||||
if (Build.VERSION.SDK_INT >= 26) {
|
||||
mMotionListener = new SDLGenericMotionListener_API26();
|
||||
} else
|
||||
if (Build.VERSION.SDK_INT >= 24) {
|
||||
} else if (Build.VERSION.SDK_INT >= 24) {
|
||||
mMotionListener = new SDLGenericMotionListener_API24();
|
||||
} else {
|
||||
mMotionListener = new SDLGenericMotionListener_API12();
|
||||
|
@ -175,7 +201,6 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
mCursors = new Hashtable<Integer, PointerIcon>();
|
||||
mLastCursorID = 0;
|
||||
mSDLThread = null;
|
||||
mBrokenLibraries = false;
|
||||
mIsResumedCalled = false;
|
||||
mHasFocus = true;
|
||||
mNextNativeState = NativeState.INIT;
|
||||
|
@ -200,6 +225,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
String errorMsgBrokenLib = "";
|
||||
try {
|
||||
loadLibraries();
|
||||
mBrokenLibraries = false; /* success */
|
||||
} catch(UnsatisfiedLinkError e) {
|
||||
System.err.println(e.getMessage());
|
||||
mBrokenLibraries = true;
|
||||
|
@ -243,7 +269,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
mSingleton = this;
|
||||
SDL.setContext(this);
|
||||
|
||||
mClipboardHandler = new SDLClipboardHandler_API11();
|
||||
mClipboardHandler = new SDLClipboardHandler();
|
||||
|
||||
mHIDDeviceManager = HIDDeviceManager.acquire(this);
|
||||
|
||||
|
@ -258,6 +284,15 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
// Only record current orientation
|
||||
SDLActivity.onNativeOrientationChanged(mCurrentOrientation);
|
||||
|
||||
try {
|
||||
if (Build.VERSION.SDK_INT < 24) {
|
||||
mCurrentLocale = getContext().getResources().getConfiguration().locale;
|
||||
} else {
|
||||
mCurrentLocale = getContext().getResources().getConfiguration().getLocales().get(0);
|
||||
}
|
||||
} catch(Exception ignored) {
|
||||
}
|
||||
|
||||
setContentView(mLayout);
|
||||
|
||||
setWindowStyle(false);
|
||||
|
@ -407,6 +442,21 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
SDLActivity.nativeLowMemory();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConfigurationChanged(Configuration newConfig) {
|
||||
Log.v(TAG, "onConfigurationChanged()");
|
||||
super.onConfigurationChanged(newConfig);
|
||||
|
||||
if (SDLActivity.mBrokenLibraries) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (mCurrentLocale == null || !mCurrentLocale.equals(newConfig.locale)) {
|
||||
mCurrentLocale = newConfig.locale;
|
||||
SDLActivity.onNativeLocaleChanged();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
Log.v(TAG, "onDestroy()");
|
||||
|
@ -540,11 +590,10 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
mSDLThread.start();
|
||||
|
||||
// No nativeResume(), don't signal Android_ResumeSem
|
||||
mSurface.handleResume();
|
||||
} else {
|
||||
nativeResume();
|
||||
mSurface.handleResume();
|
||||
}
|
||||
mSurface.handleResume();
|
||||
|
||||
mCurrentNativeState = mNextNativeState;
|
||||
}
|
||||
|
@ -596,34 +645,32 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
}
|
||||
break;
|
||||
case COMMAND_CHANGE_WINDOW_STYLE:
|
||||
if (Build.VERSION.SDK_INT < 19) {
|
||||
// This version of Android doesn't support the immersive fullscreen mode
|
||||
break;
|
||||
}
|
||||
if (context instanceof Activity) {
|
||||
Window window = ((Activity) context).getWindow();
|
||||
if (window != null) {
|
||||
if ((msg.obj instanceof Integer) && (((Integer) msg.obj).intValue() != 0)) {
|
||||
int flags = View.SYSTEM_UI_FLAG_FULLSCREEN |
|
||||
if (Build.VERSION.SDK_INT >= 19) {
|
||||
if (context instanceof Activity) {
|
||||
Window window = ((Activity) context).getWindow();
|
||||
if (window != null) {
|
||||
if ((msg.obj instanceof Integer) && ((Integer) msg.obj != 0)) {
|
||||
int flags = View.SYSTEM_UI_FLAG_FULLSCREEN |
|
||||
View.SYSTEM_UI_FLAG_HIDE_NAVIGATION |
|
||||
View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY |
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN |
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION |
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.INVISIBLE;
|
||||
window.getDecorView().setSystemUiVisibility(flags);
|
||||
window.addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
|
||||
window.clearFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
|
||||
SDLActivity.mFullscreenModeActive = true;
|
||||
} else {
|
||||
int flags = View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_VISIBLE;
|
||||
window.getDecorView().setSystemUiVisibility(flags);
|
||||
window.addFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
|
||||
window.clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
|
||||
SDLActivity.mFullscreenModeActive = false;
|
||||
window.getDecorView().setSystemUiVisibility(flags);
|
||||
window.addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
|
||||
window.clearFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
|
||||
SDLActivity.mFullscreenModeActive = true;
|
||||
} else {
|
||||
int flags = View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_VISIBLE;
|
||||
window.getDecorView().setSystemUiVisibility(flags);
|
||||
window.addFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
|
||||
window.clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
|
||||
SDLActivity.mFullscreenModeActive = false;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Log.e(TAG, "error handling message, getContext() returned no Activity");
|
||||
}
|
||||
} else {
|
||||
Log.e(TAG, "error handling message, getContext() returned no Activity");
|
||||
}
|
||||
break;
|
||||
case COMMAND_TEXTEDIT_HIDE:
|
||||
|
@ -646,7 +693,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
if (context instanceof Activity) {
|
||||
Window window = ((Activity) context).getWindow();
|
||||
if (window != null) {
|
||||
if ((msg.obj instanceof Integer) && (((Integer) msg.obj).intValue() != 0)) {
|
||||
if ((msg.obj instanceof Integer) && ((Integer) msg.obj != 0)) {
|
||||
window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
|
||||
} else {
|
||||
window.clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
|
||||
|
@ -699,53 +746,53 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
msg.obj = data;
|
||||
boolean result = commandHandler.sendMessage(msg);
|
||||
|
||||
if ((Build.VERSION.SDK_INT >= 19) && (command == COMMAND_CHANGE_WINDOW_STYLE)) {
|
||||
// Ensure we don't return until the resize has actually happened,
|
||||
// or 500ms have passed.
|
||||
if (Build.VERSION.SDK_INT >= 19) {
|
||||
if (command == COMMAND_CHANGE_WINDOW_STYLE) {
|
||||
// Ensure we don't return until the resize has actually happened,
|
||||
// or 500ms have passed.
|
||||
|
||||
boolean bShouldWait = false;
|
||||
boolean bShouldWait = false;
|
||||
|
||||
if (data instanceof Integer) {
|
||||
// Let's figure out if we're already laid out fullscreen or not.
|
||||
Display display = ((WindowManager)getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay();
|
||||
android.util.DisplayMetrics realMetrics = new android.util.DisplayMetrics();
|
||||
display.getRealMetrics( realMetrics );
|
||||
if (data instanceof Integer) {
|
||||
// Let's figure out if we're already laid out fullscreen or not.
|
||||
Display display = ((WindowManager) getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay();
|
||||
DisplayMetrics realMetrics = new DisplayMetrics();
|
||||
display.getRealMetrics(realMetrics);
|
||||
|
||||
boolean bFullscreenLayout = ((realMetrics.widthPixels == mSurface.getWidth()) &&
|
||||
(realMetrics.heightPixels == mSurface.getHeight()));
|
||||
boolean bFullscreenLayout = ((realMetrics.widthPixels == mSurface.getWidth()) &&
|
||||
(realMetrics.heightPixels == mSurface.getHeight()));
|
||||
|
||||
if (((Integer)data).intValue() == 1) {
|
||||
// If we aren't laid out fullscreen or actively in fullscreen mode already, we're going
|
||||
// to change size and should wait for surfaceChanged() before we return, so the size
|
||||
// is right back in native code. If we're already laid out fullscreen, though, we're
|
||||
// not going to change size even if we change decor modes, so we shouldn't wait for
|
||||
// surfaceChanged() -- which may not even happen -- and should return immediately.
|
||||
bShouldWait = !bFullscreenLayout;
|
||||
}
|
||||
else {
|
||||
// If we're laid out fullscreen (even if the status bar and nav bar are present),
|
||||
// or are actively in fullscreen, we're going to change size and should wait for
|
||||
// surfaceChanged before we return, so the size is right back in native code.
|
||||
bShouldWait = bFullscreenLayout;
|
||||
}
|
||||
}
|
||||
|
||||
if (bShouldWait && (SDLActivity.getContext() != null)) {
|
||||
// We'll wait for the surfaceChanged() method, which will notify us
|
||||
// when called. That way, we know our current size is really the
|
||||
// size we need, instead of grabbing a size that's still got
|
||||
// the navigation and/or status bars before they're hidden.
|
||||
//
|
||||
// We'll wait for up to half a second, because some devices
|
||||
// take a surprisingly long time for the surface resize, but
|
||||
// then we'll just give up and return.
|
||||
//
|
||||
synchronized(SDLActivity.getContext()) {
|
||||
try {
|
||||
SDLActivity.getContext().wait(500);
|
||||
if ((Integer) data == 1) {
|
||||
// If we aren't laid out fullscreen or actively in fullscreen mode already, we're going
|
||||
// to change size and should wait for surfaceChanged() before we return, so the size
|
||||
// is right back in native code. If we're already laid out fullscreen, though, we're
|
||||
// not going to change size even if we change decor modes, so we shouldn't wait for
|
||||
// surfaceChanged() -- which may not even happen -- and should return immediately.
|
||||
bShouldWait = !bFullscreenLayout;
|
||||
} else {
|
||||
// If we're laid out fullscreen (even if the status bar and nav bar are present),
|
||||
// or are actively in fullscreen, we're going to change size and should wait for
|
||||
// surfaceChanged before we return, so the size is right back in native code.
|
||||
bShouldWait = bFullscreenLayout;
|
||||
}
|
||||
catch (InterruptedException ie) {
|
||||
ie.printStackTrace();
|
||||
}
|
||||
|
||||
if (bShouldWait && (SDLActivity.getContext() != null)) {
|
||||
// We'll wait for the surfaceChanged() method, which will notify us
|
||||
// when called. That way, we know our current size is really the
|
||||
// size we need, instead of grabbing a size that's still got
|
||||
// the navigation and/or status bars before they're hidden.
|
||||
//
|
||||
// We'll wait for up to half a second, because some devices
|
||||
// take a surprisingly long time for the surface resize, but
|
||||
// then we'll just give up and return.
|
||||
//
|
||||
synchronized (SDLActivity.getContext()) {
|
||||
try {
|
||||
SDLActivity.getContext().wait(500);
|
||||
} catch (InterruptedException ie) {
|
||||
ie.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -784,6 +831,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
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);
|
||||
public static native void onNativeLocaleChanged();
|
||||
|
||||
/**
|
||||
* This method is called by SDL using JNI.
|
||||
|
@ -838,9 +886,9 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
orientation_portrait = ActivityInfo.SCREEN_ORIENTATION_REVERSE_PORTRAIT;
|
||||
}
|
||||
|
||||
boolean is_landscape_allowed = (orientation_landscape == -1 ? false : true);
|
||||
boolean is_portrait_allowed = (orientation_portrait == -1 ? false : true);
|
||||
int req = -1; /* Requested orientation */
|
||||
boolean is_landscape_allowed = (orientation_landscape != -1);
|
||||
boolean is_portrait_allowed = (orientation_portrait != -1);
|
||||
int req; /* Requested orientation */
|
||||
|
||||
/* No valid hint, nothing is explicitly allowed */
|
||||
if (!is_portrait_allowed && !is_landscape_allowed) {
|
||||
|
@ -872,7 +920,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
}
|
||||
}
|
||||
|
||||
Log.v("SDL", "setOrientation() requestedOrientation=" + req + " width=" + w +" height="+ h +" resizable=" + resizable + " hint=" + hint);
|
||||
Log.v(TAG, "setOrientation() requestedOrientation=" + req + " width=" + w +" height="+ h +" resizable=" + resizable + " hint=" + hint);
|
||||
mSingleton.setRequestedOrientation(req);
|
||||
}
|
||||
|
||||
|
@ -976,7 +1024,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
if (mSingleton == null) {
|
||||
return false;
|
||||
}
|
||||
return mSingleton.sendCommand(command, Integer.valueOf(param));
|
||||
return mSingleton.sendCommand(command, param);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1000,30 +1048,30 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
if (Build.MANUFACTURER.equals("Amlogic") && Build.MODEL.equals("X96-W")) {
|
||||
return true;
|
||||
}
|
||||
if (Build.MANUFACTURER.equals("Amlogic") && Build.MODEL.startsWith("TV")) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return Build.MANUFACTURER.equals("Amlogic") && Build.MODEL.startsWith("TV");
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called by SDL using JNI.
|
||||
*/
|
||||
public static boolean isTablet() {
|
||||
public static double getDiagonal()
|
||||
{
|
||||
DisplayMetrics metrics = new DisplayMetrics();
|
||||
Activity activity = (Activity)getContext();
|
||||
if (activity == null) {
|
||||
return false;
|
||||
return 0.0;
|
||||
}
|
||||
activity.getWindowManager().getDefaultDisplay().getMetrics(metrics);
|
||||
|
||||
double dWidthInches = metrics.widthPixels / (double)metrics.xdpi;
|
||||
double dHeightInches = metrics.heightPixels / (double)metrics.ydpi;
|
||||
|
||||
double dDiagonal = Math.sqrt((dWidthInches * dWidthInches) + (dHeightInches * dHeightInches));
|
||||
return Math.sqrt((dWidthInches * dWidthInches) + (dHeightInches * dHeightInches));
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called by SDL using JNI.
|
||||
*/
|
||||
public static boolean isTablet() {
|
||||
// If our diagonal size is seven inches or greater, we consider ourselves a tablet.
|
||||
return (dDiagonal >= 7.0);
|
||||
return (getDiagonal() >= 7.0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1045,7 +1093,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
}
|
||||
try {
|
||||
final Configuration config = getContext().getResources().getConfiguration();
|
||||
final Class configClass = config.getClass();
|
||||
final Class<?> configClass = config.getClass();
|
||||
return configClass.getField("SEM_DESKTOP_MODE_ENABLED").getInt(configClass)
|
||||
== configClass.getField("semDesktopModeEnabled").getInt(config);
|
||||
} catch(Exception ignored) {
|
||||
|
@ -1065,6 +1113,10 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
*/
|
||||
public static boolean getManifestEnvironmentVariables() {
|
||||
try {
|
||||
if (getContext() == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
ApplicationInfo applicationInfo = getContext().getPackageManager().getApplicationInfo(getContext().getPackageName(), PackageManager.GET_META_DATA);
|
||||
Bundle bundle = applicationInfo.metaData;
|
||||
if (bundle == null) {
|
||||
|
@ -1082,7 +1134,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
/* environment variables set! */
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
Log.v("SDL", "exception " + e.toString());
|
||||
Log.v(TAG, "exception " + e.toString());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -1090,7 +1142,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
// This method is called by SDLControllerManager's API 26 Generic Motion Handler.
|
||||
public static View getContentView()
|
||||
{
|
||||
return mSingleton.mLayout;
|
||||
return mLayout;
|
||||
}
|
||||
|
||||
static class ShowTextInputTask implements Runnable {
|
||||
|
@ -1175,7 +1227,6 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
*/
|
||||
public static void setSurfaceViewFormat(int format) {
|
||||
mSingleton.sendCommand(COMMAND_CHANGE_SURFACEVIEW_FORMAT, format);
|
||||
return;
|
||||
}
|
||||
|
||||
// Input
|
||||
|
@ -1186,92 +1237,19 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
public static void initTouch() {
|
||||
int[] ids = InputDevice.getDeviceIds();
|
||||
|
||||
for (int i = 0; i < ids.length; ++i) {
|
||||
InputDevice device = InputDevice.getDevice(ids[i]);
|
||||
for (int id : ids) {
|
||||
InputDevice device = InputDevice.getDevice(id);
|
||||
if (device != null && (device.getSources() & InputDevice.SOURCE_TOUCHSCREEN) != 0) {
|
||||
nativeAddTouch(device.getId(), device.getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// APK expansion files support
|
||||
|
||||
/** com.android.vending.expansion.zipfile.ZipResourceFile object or null. */
|
||||
private static Object expansionFile;
|
||||
|
||||
/** com.android.vending.expansion.zipfile.ZipResourceFile's getInputStream() or null. */
|
||||
private static Method expansionFileMethod;
|
||||
|
||||
/**
|
||||
* This method is called by SDL using JNI.
|
||||
* @return an InputStream on success or null if no expansion file was used.
|
||||
* @throws IOException on errors. Message is set for the SDL error message.
|
||||
*/
|
||||
public static InputStream openAPKExpansionInputStream(String fileName) throws IOException {
|
||||
// Get a ZipResourceFile representing a merger of both the main and patch files
|
||||
if (expansionFile == null) {
|
||||
String mainHint = nativeGetHint("SDL_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION");
|
||||
if (mainHint == null) {
|
||||
return null; // no expansion use if no main version was set
|
||||
}
|
||||
String patchHint = nativeGetHint("SDL_ANDROID_APK_EXPANSION_PATCH_FILE_VERSION");
|
||||
if (patchHint == null) {
|
||||
return null; // no expansion use if no patch version was set
|
||||
}
|
||||
|
||||
Integer mainVersion;
|
||||
Integer patchVersion;
|
||||
try {
|
||||
mainVersion = Integer.valueOf(mainHint);
|
||||
patchVersion = Integer.valueOf(patchHint);
|
||||
} catch (NumberFormatException ex) {
|
||||
ex.printStackTrace();
|
||||
throw new IOException("No valid file versions set for APK expansion files", ex);
|
||||
}
|
||||
|
||||
try {
|
||||
// To avoid direct dependency on Google APK expansion library that is
|
||||
// not a part of Android SDK we access it using reflection
|
||||
expansionFile = Class.forName("com.android.vending.expansion.zipfile.APKExpansionSupport")
|
||||
.getMethod("getAPKExpansionZipFile", Context.class, int.class, int.class)
|
||||
.invoke(null, SDL.getContext(), mainVersion, patchVersion);
|
||||
|
||||
expansionFileMethod = expansionFile.getClass()
|
||||
.getMethod("getInputStream", String.class);
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
expansionFile = null;
|
||||
expansionFileMethod = null;
|
||||
throw new IOException("Could not access APK expansion support library", ex);
|
||||
}
|
||||
}
|
||||
|
||||
// Get an input stream for a known file inside the expansion file ZIPs
|
||||
InputStream fileStream;
|
||||
try {
|
||||
fileStream = (InputStream)expansionFileMethod.invoke(expansionFile, fileName);
|
||||
} catch (Exception ex) {
|
||||
// calling "getInputStream" failed
|
||||
ex.printStackTrace();
|
||||
throw new IOException("Could not open stream from APK expansion file", ex);
|
||||
}
|
||||
|
||||
if (fileStream == null) {
|
||||
// calling "getInputStream" was successful but null was returned
|
||||
throw new IOException("Could not find path in APK expansion file");
|
||||
}
|
||||
|
||||
return fileStream;
|
||||
}
|
||||
|
||||
// Messagebox
|
||||
|
||||
/** Result of current messagebox. Also used for blocking the calling thread. */
|
||||
protected final int[] messageboxSelection = new int[1];
|
||||
|
||||
/** Id of current dialog. */
|
||||
protected int dialogs = 0;
|
||||
|
||||
/**
|
||||
* This method is called by SDL using JNI.
|
||||
* Shows the messagebox from UI thread and block calling thread.
|
||||
|
@ -1315,7 +1293,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
showDialog(dialogs++, args);
|
||||
messageboxCreateAndShow(args);
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -1335,8 +1313,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
return messageboxSelection[0];
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Dialog onCreateDialog(int ignore, Bundle args) {
|
||||
protected void messageboxCreateAndShow(Bundle args) {
|
||||
|
||||
// TODO set values from "flags" to messagebox dialog
|
||||
|
||||
|
@ -1365,7 +1342,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
|
||||
// create dialog with title and a listener to wake up calling thread
|
||||
|
||||
final Dialog dialog = new Dialog(this);
|
||||
final AlertDialog dialog = new AlertDialog.Builder(this).create();
|
||||
dialog.setTitle(args.getString("title"));
|
||||
dialog.setCancelable(false);
|
||||
dialog.setOnDismissListener(new DialogInterface.OnDismissListener() {
|
||||
|
@ -1451,7 +1428,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
|
||||
// add content to dialog and return
|
||||
|
||||
dialog.setContentView(content);
|
||||
dialog.setView(content);
|
||||
dialog.setOnKeyListener(new Dialog.OnKeyListener() {
|
||||
@Override
|
||||
public boolean onKey(DialogInterface d, int keyCode, KeyEvent event) {
|
||||
|
@ -1466,20 +1443,22 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
}
|
||||
});
|
||||
|
||||
return dialog;
|
||||
dialog.show();
|
||||
}
|
||||
|
||||
private final Runnable rehideSystemUi = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
int flags = View.SYSTEM_UI_FLAG_FULLSCREEN |
|
||||
if (Build.VERSION.SDK_INT >= 19) {
|
||||
int flags = View.SYSTEM_UI_FLAG_FULLSCREEN |
|
||||
View.SYSTEM_UI_FLAG_HIDE_NAVIGATION |
|
||||
View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY |
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN |
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION |
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.INVISIBLE;
|
||||
|
||||
SDLActivity.this.getWindow().getDecorView().setSystemUiVisibility(flags);
|
||||
SDLActivity.this.getWindow().getDecorView().setSystemUiVisibility(flags);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -1624,11 +1603,32 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
|
||||
@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);
|
||||
boolean result = (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED);
|
||||
nativePermissionResult(requestCode, result);
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called by SDL using JNI.
|
||||
*/
|
||||
public static int openURL(String url)
|
||||
{
|
||||
try {
|
||||
Intent i = new Intent(Intent.ACTION_VIEW);
|
||||
i.setData(Uri.parse(url));
|
||||
|
||||
int flags = Intent.FLAG_ACTIVITY_NO_HISTORY | Intent.FLAG_ACTIVITY_MULTIPLE_TASK;
|
||||
if (Build.VERSION.SDK_INT >= 21) {
|
||||
flags |= Intent.FLAG_ACTIVITY_NEW_DOCUMENT;
|
||||
} else {
|
||||
flags |= Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET;
|
||||
}
|
||||
i.addFlags(flags);
|
||||
|
||||
mSingleton.startActivity(i);
|
||||
} catch (Exception ex) {
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1655,13 +1655,12 @@ class SDLMain implements Runnable {
|
|||
|
||||
Log.v("SDL", "Finished main function");
|
||||
|
||||
if (SDLActivity.mSingleton == null || SDLActivity.mSingleton.isFinishing()) {
|
||||
// Activity is already being destroyed
|
||||
} else {
|
||||
if (SDLActivity.mSingleton != null && !SDLActivity.mSingleton.isFinishing()) {
|
||||
// Let's finish the Activity
|
||||
SDLActivity.mSDLThread = null;
|
||||
SDLActivity.mSingleton.finish();
|
||||
}
|
||||
} // else: Activity is already being destroyed
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1786,13 +1785,13 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
|
|||
try
|
||||
{
|
||||
if (Build.VERSION.SDK_INT >= 17) {
|
||||
android.util.DisplayMetrics realMetrics = new android.util.DisplayMetrics();
|
||||
DisplayMetrics realMetrics = new DisplayMetrics();
|
||||
mDisplay.getRealMetrics( realMetrics );
|
||||
nDeviceWidth = realMetrics.widthPixels;
|
||||
nDeviceHeight = realMetrics.heightPixels;
|
||||
}
|
||||
} catch(Exception ignored) {
|
||||
}
|
||||
catch ( java.lang.Throwable throwable ) {}
|
||||
|
||||
synchronized(SDLActivity.getContext()) {
|
||||
// In case we're waiting on a size change after going fullscreen, send a notification.
|
||||
|
@ -1809,12 +1808,7 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
|
|||
boolean skip = false;
|
||||
int requestedOrientation = SDLActivity.mSingleton.getRequestedOrientation();
|
||||
|
||||
if (requestedOrientation == ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED)
|
||||
{
|
||||
// Accept any
|
||||
}
|
||||
else if (requestedOrientation == ActivityInfo.SCREEN_ORIENTATION_PORTRAIT || requestedOrientation == ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT)
|
||||
{
|
||||
if (requestedOrientation == ActivityInfo.SCREEN_ORIENTATION_PORTRAIT || requestedOrientation == ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT) {
|
||||
if (mWidth > mHeight) {
|
||||
skip = true;
|
||||
}
|
||||
|
@ -1868,6 +1862,19 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
|
|||
int deviceId = event.getDeviceId();
|
||||
int source = event.getSource();
|
||||
|
||||
if (source == InputDevice.SOURCE_UNKNOWN) {
|
||||
InputDevice device = InputDevice.getDevice(deviceId);
|
||||
if (device != null) {
|
||||
source = device.getSources();
|
||||
}
|
||||
}
|
||||
|
||||
// if (event.getAction() == KeyEvent.ACTION_DOWN) {
|
||||
// Log.v("SDL", "key down: " + keyCode + ", deviceId = " + deviceId + ", source = " + source);
|
||||
// } else if (event.getAction() == KeyEvent.ACTION_UP) {
|
||||
// Log.v("SDL", "key up: " + keyCode + ", deviceId = " + deviceId + ", source = " + source);
|
||||
// }
|
||||
|
||||
// Dispatch the different events depending on where they come from
|
||||
// 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
|
||||
|
@ -1888,24 +1895,14 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
|
|||
}
|
||||
}
|
||||
|
||||
if (source == InputDevice.SOURCE_UNKNOWN) {
|
||||
InputDevice device = InputDevice.getDevice(deviceId);
|
||||
if (device != null) {
|
||||
source = device.getSources();
|
||||
}
|
||||
}
|
||||
|
||||
if ((source & InputDevice.SOURCE_KEYBOARD) != 0) {
|
||||
if (event.getAction() == KeyEvent.ACTION_DOWN) {
|
||||
//Log.v("SDL", "key down: " + keyCode);
|
||||
if (SDLActivity.isTextInputEvent(event)) {
|
||||
SDLInputConnection.nativeCommitText(String.valueOf((char) event.getUnicodeChar()), 1);
|
||||
}
|
||||
SDLActivity.onNativeKeyDown(keyCode);
|
||||
return true;
|
||||
}
|
||||
else if (event.getAction() == KeyEvent.ACTION_UP) {
|
||||
//Log.v("SDL", "key up: " + keyCode);
|
||||
} else if (event.getAction() == KeyEvent.ACTION_UP) {
|
||||
SDLActivity.onNativeKeyUp(keyCode);
|
||||
return true;
|
||||
}
|
||||
|
@ -1932,22 +1929,34 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
|
|||
@Override
|
||||
public boolean onTouch(View v, MotionEvent event) {
|
||||
/* Ref: http://developer.android.com/training/gestures/multi.html */
|
||||
final int touchDevId = event.getDeviceId();
|
||||
int touchDevId = event.getDeviceId();
|
||||
final int pointerCount = event.getPointerCount();
|
||||
int action = event.getActionMasked();
|
||||
int pointerFingerId;
|
||||
int mouseButton;
|
||||
int i = -1;
|
||||
float x,y,p;
|
||||
|
||||
/*
|
||||
* Prevent id to be -1, since it's used in SDL internal for synthetic events
|
||||
* Appears when using Android emulator, eg:
|
||||
* adb shell input mouse tap 100 100
|
||||
* adb shell input touchscreen tap 100 100
|
||||
*/
|
||||
if (touchDevId < 0) {
|
||||
touchDevId -= 1;
|
||||
}
|
||||
|
||||
// 12290 = Samsung DeX mode desktop mouse
|
||||
// 12290 = 0x3002 = 0x2002 | 0x1002 = SOURCE_MOUSE | SOURCE_TOUCHSCREEN
|
||||
// 0x2 = SOURCE_CLASS_POINTER
|
||||
if (event.getSource() == InputDevice.SOURCE_MOUSE || event.getSource() == (InputDevice.SOURCE_MOUSE | InputDevice.SOURCE_TOUCHSCREEN)) {
|
||||
int mouseButton = 1;
|
||||
try {
|
||||
mouseButton = (Integer) event.getClass().getMethod("getButtonState").invoke(event);
|
||||
} catch(Exception e) {
|
||||
mouseButton = 1; // oh well.
|
||||
Object object = event.getClass().getMethod("getButtonState").invoke(event);
|
||||
if (object != null) {
|
||||
mouseButton = (Integer) object;
|
||||
}
|
||||
} catch(Exception ignored) {
|
||||
}
|
||||
|
||||
// We need to check if we're in relative mouse mode and get the axis offset rather than the x/y values
|
||||
|
@ -1978,6 +1987,7 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
|
|||
case MotionEvent.ACTION_DOWN:
|
||||
// Primary pointer up/down, the index is always zero
|
||||
i = 0;
|
||||
/* fallthrough */
|
||||
case MotionEvent.ACTION_POINTER_UP:
|
||||
case MotionEvent.ACTION_POINTER_DOWN:
|
||||
// Non primary pointer up/down
|
||||
|
@ -2044,7 +2054,7 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
|
|||
|
||||
// Since we may have an orientation set, we won't receive onConfigurationChanged events.
|
||||
// We thus should check here.
|
||||
int newOrientation = SDLActivity.SDL_ORIENTATION_UNKNOWN;
|
||||
int newOrientation;
|
||||
|
||||
float x, y;
|
||||
switch (mDisplay.getRotation()) {
|
||||
|
@ -2063,6 +2073,7 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
|
|||
y = -event.values[1];
|
||||
newOrientation = SDLActivity.SDL_ORIENTATION_PORTRAIT_FLIPPED;
|
||||
break;
|
||||
case Surface.ROTATION_0:
|
||||
default:
|
||||
x = event.values[0];
|
||||
y = event.values[1];
|
||||
|
@ -2109,8 +2120,7 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
|
|||
// Change our action value to what SDL's code expects.
|
||||
if (action == MotionEvent.ACTION_BUTTON_PRESS) {
|
||||
action = MotionEvent.ACTION_DOWN;
|
||||
}
|
||||
else if (action == MotionEvent.ACTION_BUTTON_RELEASE) {
|
||||
} else { /* MotionEvent.ACTION_BUTTON_RELEASE */
|
||||
action = MotionEvent.ACTION_UP;
|
||||
}
|
||||
|
||||
|
@ -2275,45 +2285,38 @@ class SDLInputConnection extends BaseInputConnection {
|
|||
}
|
||||
}
|
||||
|
||||
interface SDLClipboardHandler {
|
||||
class SDLClipboardHandler implements
|
||||
ClipboardManager.OnPrimaryClipChangedListener {
|
||||
|
||||
public boolean clipboardHasText();
|
||||
public String clipboardGetText();
|
||||
public void clipboardSetText(String string);
|
||||
protected ClipboardManager mClipMgr;
|
||||
|
||||
}
|
||||
|
||||
|
||||
class SDLClipboardHandler_API11 implements
|
||||
SDLClipboardHandler,
|
||||
android.content.ClipboardManager.OnPrimaryClipChangedListener {
|
||||
|
||||
protected android.content.ClipboardManager mClipMgr;
|
||||
|
||||
SDLClipboardHandler_API11() {
|
||||
mClipMgr = (android.content.ClipboardManager) SDL.getContext().getSystemService(Context.CLIPBOARD_SERVICE);
|
||||
SDLClipboardHandler() {
|
||||
mClipMgr = (ClipboardManager) SDL.getContext().getSystemService(Context.CLIPBOARD_SERVICE);
|
||||
mClipMgr.addPrimaryClipChangedListener(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean clipboardHasText() {
|
||||
return mClipMgr.hasText();
|
||||
return mClipMgr.hasPrimaryClip();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String clipboardGetText() {
|
||||
CharSequence text;
|
||||
text = mClipMgr.getText();
|
||||
if (text != null) {
|
||||
return text.toString();
|
||||
ClipData clip = mClipMgr.getPrimaryClip();
|
||||
if (clip != null) {
|
||||
ClipData.Item item = clip.getItemAt(0);
|
||||
if (item != null) {
|
||||
CharSequence text = item.getText();
|
||||
if (text != null) {
|
||||
return text.toString();
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clipboardSetText(String string) {
|
||||
mClipMgr.removePrimaryClipChangedListener(this);
|
||||
mClipMgr.setText(string);
|
||||
ClipData clip = ClipData.newPlainText(null, string);
|
||||
mClipMgr.setPrimaryClip(clip);
|
||||
mClipMgr.addPrimaryClipChangedListener(this);
|
||||
}
|
||||
|
||||
|
@ -2321,6 +2324,5 @@ class SDLClipboardHandler_API11 implements
|
|||
public void onPrimaryClipChanged() {
|
||||
SDLActivity.onNativeClipboardChanged();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
package org.libsdl.app;
|
||||
|
||||
import android.media.*;
|
||||
import android.media.AudioFormat;
|
||||
import android.media.AudioManager;
|
||||
import android.media.AudioRecord;
|
||||
import android.media.AudioTrack;
|
||||
import android.media.MediaRecorder;
|
||||
import android.os.Build;
|
||||
import android.util.Log;
|
||||
|
||||
|
@ -199,7 +203,6 @@ public class SDLAudioManager
|
|||
results[0] = mAudioRecord.getSampleRate();
|
||||
results[1] = mAudioRecord.getAudioFormat();
|
||||
results[2] = mAudioRecord.getChannelCount();
|
||||
results[3] = desiredFrames;
|
||||
|
||||
} else {
|
||||
if (mAudioTrack == null) {
|
||||
|
@ -223,8 +226,8 @@ public class SDLAudioManager
|
|||
results[0] = mAudioTrack.getSampleRate();
|
||||
results[1] = mAudioTrack.getAudioFormat();
|
||||
results[2] = mAudioTrack.getChannelCount();
|
||||
results[3] = desiredFrames;
|
||||
}
|
||||
results[3] = desiredFrames;
|
||||
|
||||
Log.v(TAG, "Opening " + (isCapture ? "capture" : "playback") + ", got " + results[3] + " frames of " + results[2] + " channel " + getAudioFormatString(results[1]) + " audio at " + results[0] + " Hz");
|
||||
|
||||
|
|
|
@ -6,9 +6,14 @@ import java.util.Comparator;
|
|||
import java.util.List;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.*;
|
||||
import android.view.*;
|
||||
import android.os.Build;
|
||||
import android.os.VibrationEffect;
|
||||
import android.os.Vibrator;
|
||||
import android.util.Log;
|
||||
import android.view.InputDevice;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
|
||||
|
||||
public class SDLControllerManager
|
||||
|
@ -98,7 +103,7 @@ public class SDLControllerManager
|
|||
int sources = device.getSources();
|
||||
|
||||
/* This is called for every button press, so let's not spam the logs */
|
||||
/**
|
||||
/*
|
||||
if ((sources & InputDevice.SOURCE_CLASS_JOYSTICK) != 0) {
|
||||
Log.v(TAG, "Input device " + device.getName() + " has class joystick.");
|
||||
}
|
||||
|
@ -108,7 +113,7 @@ public class SDLControllerManager
|
|||
if ((sources & InputDevice.SOURCE_GAMEPAD) == InputDevice.SOURCE_GAMEPAD) {
|
||||
Log.v(TAG, "Input device " + device.getName() + " is a gamepad.");
|
||||
}
|
||||
**/
|
||||
*/
|
||||
|
||||
return ((sources & InputDevice.SOURCE_CLASS_JOYSTICK) != 0 ||
|
||||
((sources & InputDevice.SOURCE_DPAD) == InputDevice.SOURCE_DPAD) ||
|
||||
|
@ -167,7 +172,7 @@ class SDLJoystickHandler_API16 extends SDLJoystickHandler {
|
|||
}
|
||||
}
|
||||
|
||||
private ArrayList<SDLJoystick> mJoysticks;
|
||||
private final ArrayList<SDLJoystick> mJoysticks;
|
||||
|
||||
public SDLJoystickHandler_API16() {
|
||||
|
||||
|
@ -177,13 +182,14 @@ class SDLJoystickHandler_API16 extends SDLJoystickHandler {
|
|||
@Override
|
||||
public void pollInputDevices() {
|
||||
int[] deviceIds = InputDevice.getDeviceIds();
|
||||
for(int i=0; i < deviceIds.length; ++i) {
|
||||
SDLJoystick joystick = getJoystick(deviceIds[i]);
|
||||
if (joystick == null) {
|
||||
joystick = new SDLJoystick();
|
||||
InputDevice joystickDevice = InputDevice.getDevice(deviceIds[i]);
|
||||
if (SDLControllerManager.isDeviceSDLJoystick(deviceIds[i])) {
|
||||
joystick.device_id = deviceIds[i];
|
||||
|
||||
for (int device_id : deviceIds) {
|
||||
if (SDLControllerManager.isDeviceSDLJoystick(device_id)) {
|
||||
SDLJoystick joystick = getJoystick(device_id);
|
||||
if (joystick == null) {
|
||||
InputDevice joystickDevice = InputDevice.getDevice(device_id);
|
||||
joystick = new SDLJoystick();
|
||||
joystick.device_id = device_id;
|
||||
joystick.name = joystickDevice.getName();
|
||||
joystick.desc = getJoystickDescriptor(joystickDevice);
|
||||
joystick.axes = new ArrayList<InputDevice.MotionRange>();
|
||||
|
@ -191,53 +197,57 @@ class SDLJoystickHandler_API16 extends SDLJoystickHandler {
|
|||
|
||||
List<InputDevice.MotionRange> ranges = joystickDevice.getMotionRanges();
|
||||
Collections.sort(ranges, new RangeComparator());
|
||||
for (InputDevice.MotionRange range : ranges ) {
|
||||
for (InputDevice.MotionRange range : ranges) {
|
||||
if ((range.getSource() & InputDevice.SOURCE_CLASS_JOYSTICK) != 0) {
|
||||
if (range.getAxis() == MotionEvent.AXIS_HAT_X ||
|
||||
range.getAxis() == MotionEvent.AXIS_HAT_Y) {
|
||||
if (range.getAxis() == MotionEvent.AXIS_HAT_X || range.getAxis() == MotionEvent.AXIS_HAT_Y) {
|
||||
joystick.hats.add(range);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
joystick.axes.add(range);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mJoysticks.add(joystick);
|
||||
SDLControllerManager.nativeAddJoystick(joystick.device_id, joystick.name, joystick.desc, getVendorId(joystickDevice), getProductId(joystickDevice), false, getButtonMask(joystickDevice), joystick.axes.size(), joystick.hats.size()/2, 0);
|
||||
SDLControllerManager.nativeAddJoystick(joystick.device_id, joystick.name, joystick.desc,
|
||||
getVendorId(joystickDevice), getProductId(joystickDevice), false,
|
||||
getButtonMask(joystickDevice), joystick.axes.size(), joystick.hats.size()/2, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Check removed devices */
|
||||
ArrayList<Integer> removedDevices = new ArrayList<Integer>();
|
||||
for(int i=0; i < mJoysticks.size(); i++) {
|
||||
int device_id = mJoysticks.get(i).device_id;
|
||||
int j;
|
||||
for (j=0; j < deviceIds.length; j++) {
|
||||
if (device_id == deviceIds[j]) break;
|
||||
ArrayList<Integer> removedDevices = null;
|
||||
for (SDLJoystick joystick : mJoysticks) {
|
||||
int device_id = joystick.device_id;
|
||||
int i;
|
||||
for (i = 0; i < deviceIds.length; i++) {
|
||||
if (device_id == deviceIds[i]) break;
|
||||
}
|
||||
if (j == deviceIds.length) {
|
||||
removedDevices.add(Integer.valueOf(device_id));
|
||||
if (i == deviceIds.length) {
|
||||
if (removedDevices == null) {
|
||||
removedDevices = new ArrayList<Integer>();
|
||||
}
|
||||
removedDevices.add(device_id);
|
||||
}
|
||||
}
|
||||
|
||||
for(int i=0; i < removedDevices.size(); i++) {
|
||||
int device_id = removedDevices.get(i).intValue();
|
||||
SDLControllerManager.nativeRemoveJoystick(device_id);
|
||||
for (int j=0; j < mJoysticks.size(); j++) {
|
||||
if (mJoysticks.get(j).device_id == device_id) {
|
||||
mJoysticks.remove(j);
|
||||
break;
|
||||
if (removedDevices != null) {
|
||||
for (int device_id : removedDevices) {
|
||||
SDLControllerManager.nativeRemoveJoystick(device_id);
|
||||
for (int i = 0; i < mJoysticks.size(); i++) {
|
||||
if (mJoysticks.get(i).device_id == device_id) {
|
||||
mJoysticks.remove(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected SDLJoystick getJoystick(int device_id) {
|
||||
for(int i=0; i < mJoysticks.size(); i++) {
|
||||
if (mJoysticks.get(i).device_id == device_id) {
|
||||
return mJoysticks.get(i);
|
||||
for (SDLJoystick joystick : mJoysticks) {
|
||||
if (joystick.device_id == device_id) {
|
||||
return joystick;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
@ -248,25 +258,21 @@ class SDLJoystickHandler_API16 extends SDLJoystickHandler {
|
|||
if ((event.getSource() & InputDevice.SOURCE_JOYSTICK) != 0) {
|
||||
int actionPointerIndex = event.getActionIndex();
|
||||
int action = event.getActionMasked();
|
||||
switch(action) {
|
||||
case MotionEvent.ACTION_MOVE:
|
||||
SDLJoystick joystick = getJoystick(event.getDeviceId());
|
||||
if ( joystick != null ) {
|
||||
for (int i = 0; i < joystick.axes.size(); i++) {
|
||||
InputDevice.MotionRange range = joystick.axes.get(i);
|
||||
/* Normalize the value to -1...1 */
|
||||
float value = ( event.getAxisValue( range.getAxis(), actionPointerIndex) - range.getMin() ) / range.getRange() * 2.0f - 1.0f;
|
||||
SDLControllerManager.onNativeJoy(joystick.device_id, i, value );
|
||||
}
|
||||
for (int i = 0; i < joystick.hats.size(); i+=2) {
|
||||
int hatX = Math.round(event.getAxisValue( joystick.hats.get(i).getAxis(), actionPointerIndex ) );
|
||||
int hatY = Math.round(event.getAxisValue( joystick.hats.get(i+1).getAxis(), actionPointerIndex ) );
|
||||
SDLControllerManager.onNativeHat(joystick.device_id, i/2, hatX, hatY );
|
||||
}
|
||||
if (action == MotionEvent.ACTION_MOVE) {
|
||||
SDLJoystick joystick = getJoystick(event.getDeviceId());
|
||||
if (joystick != null) {
|
||||
for (int i = 0; i < joystick.axes.size(); i++) {
|
||||
InputDevice.MotionRange range = joystick.axes.get(i);
|
||||
/* Normalize the value to -1...1 */
|
||||
float value = (event.getAxisValue(range.getAxis(), actionPointerIndex) - range.getMin()) / range.getRange() * 2.0f - 1.0f;
|
||||
SDLControllerManager.onNativeJoy(joystick.device_id, i, value);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
for (int i = 0; i < joystick.hats.size() / 2; i++) {
|
||||
int hatX = Math.round(event.getAxisValue(joystick.hats.get(2 * i).getAxis(), actionPointerIndex));
|
||||
int hatY = Math.round(event.getAxisValue(joystick.hats.get(2 * i + 1).getAxis(), actionPointerIndex));
|
||||
SDLControllerManager.onNativeHat(joystick.device_id, i, hatX, hatY);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
@ -432,13 +438,13 @@ class SDLHapticHandler_API26 extends SDLHapticHandler {
|
|||
|
||||
class SDLHapticHandler {
|
||||
|
||||
class SDLHaptic {
|
||||
static class SDLHaptic {
|
||||
public int device_id;
|
||||
public String name;
|
||||
public Vibrator vib;
|
||||
}
|
||||
|
||||
private ArrayList<SDLHaptic> mHaptics;
|
||||
private final ArrayList<SDLHaptic> mHaptics;
|
||||
|
||||
public SDLHapticHandler() {
|
||||
mHaptics = new ArrayList<SDLHaptic>();
|
||||
|
@ -504,37 +510,41 @@ class SDLHapticHandler {
|
|||
}
|
||||
|
||||
/* Check removed devices */
|
||||
ArrayList<Integer> removedDevices = new ArrayList<Integer>();
|
||||
for(int i=0; i < mHaptics.size(); i++) {
|
||||
int device_id = mHaptics.get(i).device_id;
|
||||
int j;
|
||||
for (j=0; j < deviceIds.length; j++) {
|
||||
if (device_id == deviceIds[j]) break;
|
||||
ArrayList<Integer> removedDevices = null;
|
||||
for (SDLHaptic haptic : mHaptics) {
|
||||
int device_id = haptic.device_id;
|
||||
int i;
|
||||
for (i = 0; i < deviceIds.length; i++) {
|
||||
if (device_id == deviceIds[i]) break;
|
||||
}
|
||||
|
||||
if (device_id == deviceId_VIBRATOR_SERVICE && hasVibratorService) {
|
||||
// don't remove the vibrator if it is still present
|
||||
} else if (j == deviceIds.length) {
|
||||
removedDevices.add(device_id);
|
||||
}
|
||||
if (device_id != deviceId_VIBRATOR_SERVICE || !hasVibratorService) {
|
||||
if (i == deviceIds.length) {
|
||||
if (removedDevices == null) {
|
||||
removedDevices = new ArrayList<Integer>();
|
||||
}
|
||||
removedDevices.add(device_id);
|
||||
}
|
||||
} // else: don't remove the vibrator if it is still present
|
||||
}
|
||||
|
||||
for(int i=0; i < removedDevices.size(); i++) {
|
||||
int device_id = removedDevices.get(i);
|
||||
SDLControllerManager.nativeRemoveHaptic(device_id);
|
||||
for (int j=0; j < mHaptics.size(); j++) {
|
||||
if (mHaptics.get(j).device_id == device_id) {
|
||||
mHaptics.remove(j);
|
||||
break;
|
||||
if (removedDevices != null) {
|
||||
for (int device_id : removedDevices) {
|
||||
SDLControllerManager.nativeRemoveHaptic(device_id);
|
||||
for (int i = 0; i < mHaptics.size(); i++) {
|
||||
if (mHaptics.get(i).device_id == device_id) {
|
||||
mHaptics.remove(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected SDLHaptic getHaptic(int device_id) {
|
||||
for(int i=0; i < mHaptics.size(); i++) {
|
||||
if (mHaptics.get(i).device_id == device_id) {
|
||||
return mHaptics.get(i);
|
||||
for (SDLHaptic haptic : mHaptics) {
|
||||
if (haptic.device_id == device_id) {
|
||||
return haptic;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
@ -655,8 +665,7 @@ class SDLGenericMotionListener_API24 extends SDLGenericMotionListener_API12 {
|
|||
public float getEventX(MotionEvent event) {
|
||||
if (mRelativeModeEnabled) {
|
||||
return event.getAxisValue(MotionEvent.AXIS_RELATIVE_X);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
return event.getX(0);
|
||||
}
|
||||
}
|
||||
|
@ -665,14 +674,12 @@ class SDLGenericMotionListener_API24 extends SDLGenericMotionListener_API12 {
|
|||
public float getEventY(MotionEvent event) {
|
||||
if (mRelativeModeEnabled) {
|
||||
return event.getAxisValue(MotionEvent.AXIS_RELATIVE_Y);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
return event.getY(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class SDLGenericMotionListener_API26 extends SDLGenericMotionListener_API24 {
|
||||
// Generic Motion (mouse hover, joystick...) events go here
|
||||
private boolean mRelativeModeEnabled;
|
||||
|
@ -753,15 +760,12 @@ class SDLGenericMotionListener_API26 extends SDLGenericMotionListener_API24 {
|
|||
if (!SDLActivity.isDeXMode() || (Build.VERSION.SDK_INT >= 27)) {
|
||||
if (enabled) {
|
||||
SDLActivity.getContentView().requestPointerCapture();
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
SDLActivity.getContentView().releasePointerCapture();
|
||||
}
|
||||
mRelativeModeEnabled = enabled;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -70,7 +70,7 @@
|
|||
android:label="@string/app_name"
|
||||
android:alwaysRetainTaskState="true"
|
||||
android:launchMode="singleInstance"
|
||||
android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|keyboard|keyboardHidden|navigation"
|
||||
android:configChanges="layoutDirection|locale|orientation|uiMode|screenLayout|screenSize|smallestScreenSize|keyboard|keyboardHidden|navigation"
|
||||
>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
|
|
@ -353,9 +353,18 @@ public class HIDDeviceManager {
|
|||
|
||||
private void connectHIDDeviceUSB(UsbDevice usbDevice) {
|
||||
synchronized (this) {
|
||||
int interface_mask = 0;
|
||||
for (int interface_index = 0; interface_index < usbDevice.getInterfaceCount(); interface_index++) {
|
||||
UsbInterface usbInterface = usbDevice.getInterface(interface_index);
|
||||
if (isHIDDeviceInterface(usbDevice, usbInterface)) {
|
||||
// Check to see if we've already added this interface
|
||||
// This happens with the Xbox Series X controller which has a duplicate interface 0, which is inactive
|
||||
int interface_id = usbInterface.getId();
|
||||
if ((interface_mask & (1 << interface_id)) != 0) {
|
||||
continue;
|
||||
}
|
||||
interface_mask |= (1 << interface_id);
|
||||
|
||||
HIDDeviceUSB device = new HIDDeviceUSB(this, usbDevice, interface_index);
|
||||
int id = device.getId();
|
||||
mDevicesById.put(id, device);
|
||||
|
|
|
@ -53,7 +53,12 @@ class HIDDeviceUSB implements HIDDevice {
|
|||
public String getSerialNumber() {
|
||||
String result = null;
|
||||
if (Build.VERSION.SDK_INT >= 21) {
|
||||
result = mDevice.getSerialNumber();
|
||||
try {
|
||||
result = mDevice.getSerialNumber();
|
||||
}
|
||||
catch (SecurityException exception) {
|
||||
//Log.w(TAG, "App permissions mean we cannot get serial number for device " + getDeviceName() + " message: " + exception.getMessage());
|
||||
}
|
||||
}
|
||||
if (result == null) {
|
||||
result = "";
|
||||
|
|
|
@ -2,7 +2,8 @@ package org.libsdl.app;
|
|||
|
||||
import android.content.Context;
|
||||
|
||||
import java.lang.reflect.*;
|
||||
import java.lang.Class;
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
/**
|
||||
SDL library initialization
|
||||
|
@ -51,16 +52,16 @@ public class SDL {
|
|||
// To use ReLinker, just add it as a dependency. For more information, see
|
||||
// https://github.com/KeepSafe/ReLinker for ReLinker's repository.
|
||||
//
|
||||
Class relinkClass = mContext.getClassLoader().loadClass("com.getkeepsafe.relinker.ReLinker");
|
||||
Class relinkListenerClass = mContext.getClassLoader().loadClass("com.getkeepsafe.relinker.ReLinker$LoadListener");
|
||||
Class contextClass = mContext.getClassLoader().loadClass("android.content.Context");
|
||||
Class stringClass = mContext.getClassLoader().loadClass("java.lang.String");
|
||||
Class<?> relinkClass = mContext.getClassLoader().loadClass("com.getkeepsafe.relinker.ReLinker");
|
||||
Class<?> relinkListenerClass = mContext.getClassLoader().loadClass("com.getkeepsafe.relinker.ReLinker$LoadListener");
|
||||
Class<?> contextClass = mContext.getClassLoader().loadClass("android.content.Context");
|
||||
Class<?> stringClass = mContext.getClassLoader().loadClass("java.lang.String");
|
||||
|
||||
// Get a 'force' instance of the ReLinker, so we can ensure libraries are reinstalled if
|
||||
// they've changed during updates.
|
||||
Method forceMethod = relinkClass.getDeclaredMethod("force");
|
||||
Object relinkInstance = forceMethod.invoke(null);
|
||||
Class relinkInstanceClass = relinkInstance.getClass();
|
||||
Class<?> relinkInstanceClass = relinkInstance.getClass();
|
||||
|
||||
// Actually load the library!
|
||||
Method loadMethod = relinkInstanceClass.getDeclaredMethod("loadLibrary", contextClass, stringClass, stringClass, relinkListenerClass);
|
||||
|
@ -77,7 +78,7 @@ public class SDL {
|
|||
catch (final SecurityException se) {
|
||||
throw se;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected static Context mContext;
|
||||
|
|
|
@ -1,35 +1,61 @@
|
|||
package org.libsdl.app;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.Arrays;
|
||||
import java.util.Hashtable;
|
||||
import java.lang.reflect.Method;
|
||||
import java.lang.Math;
|
||||
|
||||
import android.app.*;
|
||||
import android.content.*;
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.Dialog;
|
||||
import android.app.UiModeManager;
|
||||
import android.content.ClipboardManager;
|
||||
import android.content.ClipData;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.ActivityInfo;
|
||||
import android.content.pm.ApplicationInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.res.Configuration;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.PixelFormat;
|
||||
import android.graphics.PorterDuff;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.hardware.Sensor;
|
||||
import android.hardware.SensorEvent;
|
||||
import android.hardware.SensorEventListener;
|
||||
import android.hardware.SensorManager;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.text.InputType;
|
||||
import android.view.*;
|
||||
import android.util.DisplayMetrics;
|
||||
import android.util.Log;
|
||||
import android.util.SparseArray;
|
||||
import android.view.Display;
|
||||
import android.view.Gravity;
|
||||
import android.view.InputDevice;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.PointerIcon;
|
||||
import android.view.Surface;
|
||||
import android.view.SurfaceHolder;
|
||||
import android.view.SurfaceView;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
import android.view.inputmethod.BaseInputConnection;
|
||||
import android.view.inputmethod.EditorInfo;
|
||||
import android.view.inputmethod.InputConnection;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.Button;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
import android.os.*;
|
||||
import android.util.DisplayMetrics;
|
||||
import android.util.Log;
|
||||
import android.util.SparseArray;
|
||||
import android.graphics.*;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.hardware.*;
|
||||
import android.content.pm.ActivityInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.pm.ApplicationInfo;
|
||||
|
||||
import java.util.Hashtable;
|
||||
import java.util.Locale;
|
||||
|
||||
|
||||
/**
|
||||
SDL Activity
|
||||
|
@ -41,7 +67,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
public static final boolean mHasMultiWindow = (Build.VERSION.SDK_INT >= 24);
|
||||
|
||||
// Cursor types
|
||||
private static final int SDL_SYSTEM_CURSOR_NONE = -1;
|
||||
// private static final int SDL_SYSTEM_CURSOR_NONE = -1;
|
||||
private static final int SDL_SYSTEM_CURSOR_ARROW = 0;
|
||||
private static final int SDL_SYSTEM_CURSOR_IBEAM = 1;
|
||||
private static final int SDL_SYSTEM_CURSOR_WAIT = 2;
|
||||
|
@ -62,6 +88,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
protected static final int SDL_ORIENTATION_PORTRAIT_FLIPPED = 4;
|
||||
|
||||
protected static int mCurrentOrientation;
|
||||
protected static Locale mCurrentLocale;
|
||||
|
||||
// Handle the state of the native layer
|
||||
public enum NativeState {
|
||||
|
@ -72,7 +99,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
public static NativeState mCurrentNativeState;
|
||||
|
||||
/** If shared libraries (e.g. SDL or the native application) could not be loaded. */
|
||||
public static boolean mBrokenLibraries;
|
||||
public static boolean mBrokenLibraries = true;
|
||||
|
||||
// Main components
|
||||
protected static SDLActivity mSingleton;
|
||||
|
@ -93,8 +120,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
if (mMotionListener == null) {
|
||||
if (Build.VERSION.SDK_INT >= 26) {
|
||||
mMotionListener = new SDLGenericMotionListener_API26();
|
||||
} else
|
||||
if (Build.VERSION.SDK_INT >= 24) {
|
||||
} else if (Build.VERSION.SDK_INT >= 24) {
|
||||
mMotionListener = new SDLGenericMotionListener_API24();
|
||||
} else {
|
||||
mMotionListener = new SDLGenericMotionListener_API12();
|
||||
|
@ -175,7 +201,6 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
mCursors = new Hashtable<Integer, PointerIcon>();
|
||||
mLastCursorID = 0;
|
||||
mSDLThread = null;
|
||||
mBrokenLibraries = false;
|
||||
mIsResumedCalled = false;
|
||||
mHasFocus = true;
|
||||
mNextNativeState = NativeState.INIT;
|
||||
|
@ -200,6 +225,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
String errorMsgBrokenLib = "";
|
||||
try {
|
||||
loadLibraries();
|
||||
mBrokenLibraries = false; /* success */
|
||||
} catch(UnsatisfiedLinkError e) {
|
||||
System.err.println(e.getMessage());
|
||||
mBrokenLibraries = true;
|
||||
|
@ -243,7 +269,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
mSingleton = this;
|
||||
SDL.setContext(this);
|
||||
|
||||
mClipboardHandler = new SDLClipboardHandler_API11();
|
||||
mClipboardHandler = new SDLClipboardHandler();
|
||||
|
||||
mHIDDeviceManager = HIDDeviceManager.acquire(this);
|
||||
|
||||
|
@ -258,6 +284,15 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
// Only record current orientation
|
||||
SDLActivity.onNativeOrientationChanged(mCurrentOrientation);
|
||||
|
||||
try {
|
||||
if (Build.VERSION.SDK_INT < 24) {
|
||||
mCurrentLocale = getContext().getResources().getConfiguration().locale;
|
||||
} else {
|
||||
mCurrentLocale = getContext().getResources().getConfiguration().getLocales().get(0);
|
||||
}
|
||||
} catch(Exception ignored) {
|
||||
}
|
||||
|
||||
setContentView(mLayout);
|
||||
|
||||
setWindowStyle(false);
|
||||
|
@ -407,6 +442,21 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
SDLActivity.nativeLowMemory();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConfigurationChanged(Configuration newConfig) {
|
||||
Log.v(TAG, "onConfigurationChanged()");
|
||||
super.onConfigurationChanged(newConfig);
|
||||
|
||||
if (SDLActivity.mBrokenLibraries) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (mCurrentLocale == null || !mCurrentLocale.equals(newConfig.locale)) {
|
||||
mCurrentLocale = newConfig.locale;
|
||||
SDLActivity.onNativeLocaleChanged();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
Log.v(TAG, "onDestroy()");
|
||||
|
@ -540,11 +590,10 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
mSDLThread.start();
|
||||
|
||||
// No nativeResume(), don't signal Android_ResumeSem
|
||||
mSurface.handleResume();
|
||||
} else {
|
||||
nativeResume();
|
||||
mSurface.handleResume();
|
||||
}
|
||||
mSurface.handleResume();
|
||||
|
||||
mCurrentNativeState = mNextNativeState;
|
||||
}
|
||||
|
@ -596,34 +645,32 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
}
|
||||
break;
|
||||
case COMMAND_CHANGE_WINDOW_STYLE:
|
||||
if (Build.VERSION.SDK_INT < 19) {
|
||||
// This version of Android doesn't support the immersive fullscreen mode
|
||||
break;
|
||||
}
|
||||
if (context instanceof Activity) {
|
||||
Window window = ((Activity) context).getWindow();
|
||||
if (window != null) {
|
||||
if ((msg.obj instanceof Integer) && (((Integer) msg.obj).intValue() != 0)) {
|
||||
int flags = View.SYSTEM_UI_FLAG_FULLSCREEN |
|
||||
if (Build.VERSION.SDK_INT >= 19) {
|
||||
if (context instanceof Activity) {
|
||||
Window window = ((Activity) context).getWindow();
|
||||
if (window != null) {
|
||||
if ((msg.obj instanceof Integer) && ((Integer) msg.obj != 0)) {
|
||||
int flags = View.SYSTEM_UI_FLAG_FULLSCREEN |
|
||||
View.SYSTEM_UI_FLAG_HIDE_NAVIGATION |
|
||||
View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY |
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN |
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION |
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.INVISIBLE;
|
||||
window.getDecorView().setSystemUiVisibility(flags);
|
||||
window.addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
|
||||
window.clearFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
|
||||
SDLActivity.mFullscreenModeActive = true;
|
||||
} else {
|
||||
int flags = View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_VISIBLE;
|
||||
window.getDecorView().setSystemUiVisibility(flags);
|
||||
window.addFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
|
||||
window.clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
|
||||
SDLActivity.mFullscreenModeActive = false;
|
||||
window.getDecorView().setSystemUiVisibility(flags);
|
||||
window.addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
|
||||
window.clearFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
|
||||
SDLActivity.mFullscreenModeActive = true;
|
||||
} else {
|
||||
int flags = View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_VISIBLE;
|
||||
window.getDecorView().setSystemUiVisibility(flags);
|
||||
window.addFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
|
||||
window.clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
|
||||
SDLActivity.mFullscreenModeActive = false;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Log.e(TAG, "error handling message, getContext() returned no Activity");
|
||||
}
|
||||
} else {
|
||||
Log.e(TAG, "error handling message, getContext() returned no Activity");
|
||||
}
|
||||
break;
|
||||
case COMMAND_TEXTEDIT_HIDE:
|
||||
|
@ -646,7 +693,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
if (context instanceof Activity) {
|
||||
Window window = ((Activity) context).getWindow();
|
||||
if (window != null) {
|
||||
if ((msg.obj instanceof Integer) && (((Integer) msg.obj).intValue() != 0)) {
|
||||
if ((msg.obj instanceof Integer) && ((Integer) msg.obj != 0)) {
|
||||
window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
|
||||
} else {
|
||||
window.clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
|
||||
|
@ -699,53 +746,53 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
msg.obj = data;
|
||||
boolean result = commandHandler.sendMessage(msg);
|
||||
|
||||
if ((Build.VERSION.SDK_INT >= 19) && (command == COMMAND_CHANGE_WINDOW_STYLE)) {
|
||||
// Ensure we don't return until the resize has actually happened,
|
||||
// or 500ms have passed.
|
||||
if (Build.VERSION.SDK_INT >= 19) {
|
||||
if (command == COMMAND_CHANGE_WINDOW_STYLE) {
|
||||
// Ensure we don't return until the resize has actually happened,
|
||||
// or 500ms have passed.
|
||||
|
||||
boolean bShouldWait = false;
|
||||
boolean bShouldWait = false;
|
||||
|
||||
if (data instanceof Integer) {
|
||||
// Let's figure out if we're already laid out fullscreen or not.
|
||||
Display display = ((WindowManager)getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay();
|
||||
android.util.DisplayMetrics realMetrics = new android.util.DisplayMetrics();
|
||||
display.getRealMetrics( realMetrics );
|
||||
if (data instanceof Integer) {
|
||||
// Let's figure out if we're already laid out fullscreen or not.
|
||||
Display display = ((WindowManager) getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay();
|
||||
DisplayMetrics realMetrics = new DisplayMetrics();
|
||||
display.getRealMetrics(realMetrics);
|
||||
|
||||
boolean bFullscreenLayout = ((realMetrics.widthPixels == mSurface.getWidth()) &&
|
||||
(realMetrics.heightPixels == mSurface.getHeight()));
|
||||
boolean bFullscreenLayout = ((realMetrics.widthPixels == mSurface.getWidth()) &&
|
||||
(realMetrics.heightPixels == mSurface.getHeight()));
|
||||
|
||||
if (((Integer)data).intValue() == 1) {
|
||||
// If we aren't laid out fullscreen or actively in fullscreen mode already, we're going
|
||||
// to change size and should wait for surfaceChanged() before we return, so the size
|
||||
// is right back in native code. If we're already laid out fullscreen, though, we're
|
||||
// not going to change size even if we change decor modes, so we shouldn't wait for
|
||||
// surfaceChanged() -- which may not even happen -- and should return immediately.
|
||||
bShouldWait = !bFullscreenLayout;
|
||||
}
|
||||
else {
|
||||
// If we're laid out fullscreen (even if the status bar and nav bar are present),
|
||||
// or are actively in fullscreen, we're going to change size and should wait for
|
||||
// surfaceChanged before we return, so the size is right back in native code.
|
||||
bShouldWait = bFullscreenLayout;
|
||||
}
|
||||
}
|
||||
|
||||
if (bShouldWait && (SDLActivity.getContext() != null)) {
|
||||
// We'll wait for the surfaceChanged() method, which will notify us
|
||||
// when called. That way, we know our current size is really the
|
||||
// size we need, instead of grabbing a size that's still got
|
||||
// the navigation and/or status bars before they're hidden.
|
||||
//
|
||||
// We'll wait for up to half a second, because some devices
|
||||
// take a surprisingly long time for the surface resize, but
|
||||
// then we'll just give up and return.
|
||||
//
|
||||
synchronized(SDLActivity.getContext()) {
|
||||
try {
|
||||
SDLActivity.getContext().wait(500);
|
||||
if ((Integer) data == 1) {
|
||||
// If we aren't laid out fullscreen or actively in fullscreen mode already, we're going
|
||||
// to change size and should wait for surfaceChanged() before we return, so the size
|
||||
// is right back in native code. If we're already laid out fullscreen, though, we're
|
||||
// not going to change size even if we change decor modes, so we shouldn't wait for
|
||||
// surfaceChanged() -- which may not even happen -- and should return immediately.
|
||||
bShouldWait = !bFullscreenLayout;
|
||||
} else {
|
||||
// If we're laid out fullscreen (even if the status bar and nav bar are present),
|
||||
// or are actively in fullscreen, we're going to change size and should wait for
|
||||
// surfaceChanged before we return, so the size is right back in native code.
|
||||
bShouldWait = bFullscreenLayout;
|
||||
}
|
||||
catch (InterruptedException ie) {
|
||||
ie.printStackTrace();
|
||||
}
|
||||
|
||||
if (bShouldWait && (SDLActivity.getContext() != null)) {
|
||||
// We'll wait for the surfaceChanged() method, which will notify us
|
||||
// when called. That way, we know our current size is really the
|
||||
// size we need, instead of grabbing a size that's still got
|
||||
// the navigation and/or status bars before they're hidden.
|
||||
//
|
||||
// We'll wait for up to half a second, because some devices
|
||||
// take a surprisingly long time for the surface resize, but
|
||||
// then we'll just give up and return.
|
||||
//
|
||||
synchronized (SDLActivity.getContext()) {
|
||||
try {
|
||||
SDLActivity.getContext().wait(500);
|
||||
} catch (InterruptedException ie) {
|
||||
ie.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -784,6 +831,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
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);
|
||||
public static native void onNativeLocaleChanged();
|
||||
|
||||
/**
|
||||
* This method is called by SDL using JNI.
|
||||
|
@ -838,9 +886,9 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
orientation_portrait = ActivityInfo.SCREEN_ORIENTATION_REVERSE_PORTRAIT;
|
||||
}
|
||||
|
||||
boolean is_landscape_allowed = (orientation_landscape == -1 ? false : true);
|
||||
boolean is_portrait_allowed = (orientation_portrait == -1 ? false : true);
|
||||
int req = -1; /* Requested orientation */
|
||||
boolean is_landscape_allowed = (orientation_landscape != -1);
|
||||
boolean is_portrait_allowed = (orientation_portrait != -1);
|
||||
int req; /* Requested orientation */
|
||||
|
||||
/* No valid hint, nothing is explicitly allowed */
|
||||
if (!is_portrait_allowed && !is_landscape_allowed) {
|
||||
|
@ -872,7 +920,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
}
|
||||
}
|
||||
|
||||
Log.v("SDL", "setOrientation() requestedOrientation=" + req + " width=" + w +" height="+ h +" resizable=" + resizable + " hint=" + hint);
|
||||
Log.v(TAG, "setOrientation() requestedOrientation=" + req + " width=" + w +" height="+ h +" resizable=" + resizable + " hint=" + hint);
|
||||
mSingleton.setRequestedOrientation(req);
|
||||
}
|
||||
|
||||
|
@ -976,7 +1024,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
if (mSingleton == null) {
|
||||
return false;
|
||||
}
|
||||
return mSingleton.sendCommand(command, Integer.valueOf(param));
|
||||
return mSingleton.sendCommand(command, param);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1000,30 +1048,30 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
if (Build.MANUFACTURER.equals("Amlogic") && Build.MODEL.equals("X96-W")) {
|
||||
return true;
|
||||
}
|
||||
if (Build.MANUFACTURER.equals("Amlogic") && Build.MODEL.startsWith("TV")) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return Build.MANUFACTURER.equals("Amlogic") && Build.MODEL.startsWith("TV");
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called by SDL using JNI.
|
||||
*/
|
||||
public static boolean isTablet() {
|
||||
public static double getDiagonal()
|
||||
{
|
||||
DisplayMetrics metrics = new DisplayMetrics();
|
||||
Activity activity = (Activity)getContext();
|
||||
if (activity == null) {
|
||||
return false;
|
||||
return 0.0;
|
||||
}
|
||||
activity.getWindowManager().getDefaultDisplay().getMetrics(metrics);
|
||||
|
||||
double dWidthInches = metrics.widthPixels / (double)metrics.xdpi;
|
||||
double dHeightInches = metrics.heightPixels / (double)metrics.ydpi;
|
||||
|
||||
double dDiagonal = Math.sqrt((dWidthInches * dWidthInches) + (dHeightInches * dHeightInches));
|
||||
return Math.sqrt((dWidthInches * dWidthInches) + (dHeightInches * dHeightInches));
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called by SDL using JNI.
|
||||
*/
|
||||
public static boolean isTablet() {
|
||||
// If our diagonal size is seven inches or greater, we consider ourselves a tablet.
|
||||
return (dDiagonal >= 7.0);
|
||||
return (getDiagonal() >= 7.0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1045,7 +1093,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
}
|
||||
try {
|
||||
final Configuration config = getContext().getResources().getConfiguration();
|
||||
final Class configClass = config.getClass();
|
||||
final Class<?> configClass = config.getClass();
|
||||
return configClass.getField("SEM_DESKTOP_MODE_ENABLED").getInt(configClass)
|
||||
== configClass.getField("semDesktopModeEnabled").getInt(config);
|
||||
} catch(Exception ignored) {
|
||||
|
@ -1065,6 +1113,10 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
*/
|
||||
public static boolean getManifestEnvironmentVariables() {
|
||||
try {
|
||||
if (getContext() == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
ApplicationInfo applicationInfo = getContext().getPackageManager().getApplicationInfo(getContext().getPackageName(), PackageManager.GET_META_DATA);
|
||||
Bundle bundle = applicationInfo.metaData;
|
||||
if (bundle == null) {
|
||||
|
@ -1082,7 +1134,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
/* environment variables set! */
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
Log.v("SDL", "exception " + e.toString());
|
||||
Log.v(TAG, "exception " + e.toString());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -1090,7 +1142,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
// This method is called by SDLControllerManager's API 26 Generic Motion Handler.
|
||||
public static View getContentView()
|
||||
{
|
||||
return mSingleton.mLayout;
|
||||
return mLayout;
|
||||
}
|
||||
|
||||
static class ShowTextInputTask implements Runnable {
|
||||
|
@ -1175,7 +1227,6 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
*/
|
||||
public static void setSurfaceViewFormat(int format) {
|
||||
mSingleton.sendCommand(COMMAND_CHANGE_SURFACEVIEW_FORMAT, format);
|
||||
return;
|
||||
}
|
||||
|
||||
// Input
|
||||
|
@ -1186,92 +1237,19 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
public static void initTouch() {
|
||||
int[] ids = InputDevice.getDeviceIds();
|
||||
|
||||
for (int i = 0; i < ids.length; ++i) {
|
||||
InputDevice device = InputDevice.getDevice(ids[i]);
|
||||
for (int id : ids) {
|
||||
InputDevice device = InputDevice.getDevice(id);
|
||||
if (device != null && (device.getSources() & InputDevice.SOURCE_TOUCHSCREEN) != 0) {
|
||||
nativeAddTouch(device.getId(), device.getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// APK expansion files support
|
||||
|
||||
/** com.android.vending.expansion.zipfile.ZipResourceFile object or null. */
|
||||
private static Object expansionFile;
|
||||
|
||||
/** com.android.vending.expansion.zipfile.ZipResourceFile's getInputStream() or null. */
|
||||
private static Method expansionFileMethod;
|
||||
|
||||
/**
|
||||
* This method is called by SDL using JNI.
|
||||
* @return an InputStream on success or null if no expansion file was used.
|
||||
* @throws IOException on errors. Message is set for the SDL error message.
|
||||
*/
|
||||
public static InputStream openAPKExpansionInputStream(String fileName) throws IOException {
|
||||
// Get a ZipResourceFile representing a merger of both the main and patch files
|
||||
if (expansionFile == null) {
|
||||
String mainHint = nativeGetHint("SDL_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION");
|
||||
if (mainHint == null) {
|
||||
return null; // no expansion use if no main version was set
|
||||
}
|
||||
String patchHint = nativeGetHint("SDL_ANDROID_APK_EXPANSION_PATCH_FILE_VERSION");
|
||||
if (patchHint == null) {
|
||||
return null; // no expansion use if no patch version was set
|
||||
}
|
||||
|
||||
Integer mainVersion;
|
||||
Integer patchVersion;
|
||||
try {
|
||||
mainVersion = Integer.valueOf(mainHint);
|
||||
patchVersion = Integer.valueOf(patchHint);
|
||||
} catch (NumberFormatException ex) {
|
||||
ex.printStackTrace();
|
||||
throw new IOException("No valid file versions set for APK expansion files", ex);
|
||||
}
|
||||
|
||||
try {
|
||||
// To avoid direct dependency on Google APK expansion library that is
|
||||
// not a part of Android SDK we access it using reflection
|
||||
expansionFile = Class.forName("com.android.vending.expansion.zipfile.APKExpansionSupport")
|
||||
.getMethod("getAPKExpansionZipFile", Context.class, int.class, int.class)
|
||||
.invoke(null, SDL.getContext(), mainVersion, patchVersion);
|
||||
|
||||
expansionFileMethod = expansionFile.getClass()
|
||||
.getMethod("getInputStream", String.class);
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
expansionFile = null;
|
||||
expansionFileMethod = null;
|
||||
throw new IOException("Could not access APK expansion support library", ex);
|
||||
}
|
||||
}
|
||||
|
||||
// Get an input stream for a known file inside the expansion file ZIPs
|
||||
InputStream fileStream;
|
||||
try {
|
||||
fileStream = (InputStream)expansionFileMethod.invoke(expansionFile, fileName);
|
||||
} catch (Exception ex) {
|
||||
// calling "getInputStream" failed
|
||||
ex.printStackTrace();
|
||||
throw new IOException("Could not open stream from APK expansion file", ex);
|
||||
}
|
||||
|
||||
if (fileStream == null) {
|
||||
// calling "getInputStream" was successful but null was returned
|
||||
throw new IOException("Could not find path in APK expansion file");
|
||||
}
|
||||
|
||||
return fileStream;
|
||||
}
|
||||
|
||||
// Messagebox
|
||||
|
||||
/** Result of current messagebox. Also used for blocking the calling thread. */
|
||||
protected final int[] messageboxSelection = new int[1];
|
||||
|
||||
/** Id of current dialog. */
|
||||
protected int dialogs = 0;
|
||||
|
||||
/**
|
||||
* This method is called by SDL using JNI.
|
||||
* Shows the messagebox from UI thread and block calling thread.
|
||||
|
@ -1315,7 +1293,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
showDialog(dialogs++, args);
|
||||
messageboxCreateAndShow(args);
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -1335,8 +1313,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
return messageboxSelection[0];
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Dialog onCreateDialog(int ignore, Bundle args) {
|
||||
protected void messageboxCreateAndShow(Bundle args) {
|
||||
|
||||
// TODO set values from "flags" to messagebox dialog
|
||||
|
||||
|
@ -1365,7 +1342,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
|
||||
// create dialog with title and a listener to wake up calling thread
|
||||
|
||||
final Dialog dialog = new Dialog(this);
|
||||
final AlertDialog dialog = new AlertDialog.Builder(this).create();
|
||||
dialog.setTitle(args.getString("title"));
|
||||
dialog.setCancelable(false);
|
||||
dialog.setOnDismissListener(new DialogInterface.OnDismissListener() {
|
||||
|
@ -1451,7 +1428,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
|
||||
// add content to dialog and return
|
||||
|
||||
dialog.setContentView(content);
|
||||
dialog.setView(content);
|
||||
dialog.setOnKeyListener(new Dialog.OnKeyListener() {
|
||||
@Override
|
||||
public boolean onKey(DialogInterface d, int keyCode, KeyEvent event) {
|
||||
|
@ -1466,20 +1443,22 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
}
|
||||
});
|
||||
|
||||
return dialog;
|
||||
dialog.show();
|
||||
}
|
||||
|
||||
private final Runnable rehideSystemUi = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
int flags = View.SYSTEM_UI_FLAG_FULLSCREEN |
|
||||
if (Build.VERSION.SDK_INT >= 19) {
|
||||
int flags = View.SYSTEM_UI_FLAG_FULLSCREEN |
|
||||
View.SYSTEM_UI_FLAG_HIDE_NAVIGATION |
|
||||
View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY |
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN |
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION |
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.INVISIBLE;
|
||||
|
||||
SDLActivity.this.getWindow().getDecorView().setSystemUiVisibility(flags);
|
||||
SDLActivity.this.getWindow().getDecorView().setSystemUiVisibility(flags);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -1624,11 +1603,32 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
|
||||
@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);
|
||||
boolean result = (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED);
|
||||
nativePermissionResult(requestCode, result);
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called by SDL using JNI.
|
||||
*/
|
||||
public static int openURL(String url)
|
||||
{
|
||||
try {
|
||||
Intent i = new Intent(Intent.ACTION_VIEW);
|
||||
i.setData(Uri.parse(url));
|
||||
|
||||
int flags = Intent.FLAG_ACTIVITY_NO_HISTORY | Intent.FLAG_ACTIVITY_MULTIPLE_TASK;
|
||||
if (Build.VERSION.SDK_INT >= 21) {
|
||||
flags |= Intent.FLAG_ACTIVITY_NEW_DOCUMENT;
|
||||
} else {
|
||||
flags |= Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET;
|
||||
}
|
||||
i.addFlags(flags);
|
||||
|
||||
mSingleton.startActivity(i);
|
||||
} catch (Exception ex) {
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1655,13 +1655,12 @@ class SDLMain implements Runnable {
|
|||
|
||||
Log.v("SDL", "Finished main function");
|
||||
|
||||
if (SDLActivity.mSingleton == null || SDLActivity.mSingleton.isFinishing()) {
|
||||
// Activity is already being destroyed
|
||||
} else {
|
||||
if (SDLActivity.mSingleton != null && !SDLActivity.mSingleton.isFinishing()) {
|
||||
// Let's finish the Activity
|
||||
SDLActivity.mSDLThread = null;
|
||||
SDLActivity.mSingleton.finish();
|
||||
}
|
||||
} // else: Activity is already being destroyed
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1786,13 +1785,13 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
|
|||
try
|
||||
{
|
||||
if (Build.VERSION.SDK_INT >= 17) {
|
||||
android.util.DisplayMetrics realMetrics = new android.util.DisplayMetrics();
|
||||
DisplayMetrics realMetrics = new DisplayMetrics();
|
||||
mDisplay.getRealMetrics( realMetrics );
|
||||
nDeviceWidth = realMetrics.widthPixels;
|
||||
nDeviceHeight = realMetrics.heightPixels;
|
||||
}
|
||||
} catch(Exception ignored) {
|
||||
}
|
||||
catch ( java.lang.Throwable throwable ) {}
|
||||
|
||||
synchronized(SDLActivity.getContext()) {
|
||||
// In case we're waiting on a size change after going fullscreen, send a notification.
|
||||
|
@ -1809,12 +1808,7 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
|
|||
boolean skip = false;
|
||||
int requestedOrientation = SDLActivity.mSingleton.getRequestedOrientation();
|
||||
|
||||
if (requestedOrientation == ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED)
|
||||
{
|
||||
// Accept any
|
||||
}
|
||||
else if (requestedOrientation == ActivityInfo.SCREEN_ORIENTATION_PORTRAIT || requestedOrientation == ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT)
|
||||
{
|
||||
if (requestedOrientation == ActivityInfo.SCREEN_ORIENTATION_PORTRAIT || requestedOrientation == ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT) {
|
||||
if (mWidth > mHeight) {
|
||||
skip = true;
|
||||
}
|
||||
|
@ -1868,6 +1862,19 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
|
|||
int deviceId = event.getDeviceId();
|
||||
int source = event.getSource();
|
||||
|
||||
if (source == InputDevice.SOURCE_UNKNOWN) {
|
||||
InputDevice device = InputDevice.getDevice(deviceId);
|
||||
if (device != null) {
|
||||
source = device.getSources();
|
||||
}
|
||||
}
|
||||
|
||||
// if (event.getAction() == KeyEvent.ACTION_DOWN) {
|
||||
// Log.v("SDL", "key down: " + keyCode + ", deviceId = " + deviceId + ", source = " + source);
|
||||
// } else if (event.getAction() == KeyEvent.ACTION_UP) {
|
||||
// Log.v("SDL", "key up: " + keyCode + ", deviceId = " + deviceId + ", source = " + source);
|
||||
// }
|
||||
|
||||
// Dispatch the different events depending on where they come from
|
||||
// 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
|
||||
|
@ -1888,24 +1895,14 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
|
|||
}
|
||||
}
|
||||
|
||||
if (source == InputDevice.SOURCE_UNKNOWN) {
|
||||
InputDevice device = InputDevice.getDevice(deviceId);
|
||||
if (device != null) {
|
||||
source = device.getSources();
|
||||
}
|
||||
}
|
||||
|
||||
if ((source & InputDevice.SOURCE_KEYBOARD) != 0) {
|
||||
if (event.getAction() == KeyEvent.ACTION_DOWN) {
|
||||
//Log.v("SDL", "key down: " + keyCode);
|
||||
if (SDLActivity.isTextInputEvent(event)) {
|
||||
SDLInputConnection.nativeCommitText(String.valueOf((char) event.getUnicodeChar()), 1);
|
||||
}
|
||||
SDLActivity.onNativeKeyDown(keyCode);
|
||||
return true;
|
||||
}
|
||||
else if (event.getAction() == KeyEvent.ACTION_UP) {
|
||||
//Log.v("SDL", "key up: " + keyCode);
|
||||
} else if (event.getAction() == KeyEvent.ACTION_UP) {
|
||||
SDLActivity.onNativeKeyUp(keyCode);
|
||||
return true;
|
||||
}
|
||||
|
@ -1932,22 +1929,34 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
|
|||
@Override
|
||||
public boolean onTouch(View v, MotionEvent event) {
|
||||
/* Ref: http://developer.android.com/training/gestures/multi.html */
|
||||
final int touchDevId = event.getDeviceId();
|
||||
int touchDevId = event.getDeviceId();
|
||||
final int pointerCount = event.getPointerCount();
|
||||
int action = event.getActionMasked();
|
||||
int pointerFingerId;
|
||||
int mouseButton;
|
||||
int i = -1;
|
||||
float x,y,p;
|
||||
|
||||
/*
|
||||
* Prevent id to be -1, since it's used in SDL internal for synthetic events
|
||||
* Appears when using Android emulator, eg:
|
||||
* adb shell input mouse tap 100 100
|
||||
* adb shell input touchscreen tap 100 100
|
||||
*/
|
||||
if (touchDevId < 0) {
|
||||
touchDevId -= 1;
|
||||
}
|
||||
|
||||
// 12290 = Samsung DeX mode desktop mouse
|
||||
// 12290 = 0x3002 = 0x2002 | 0x1002 = SOURCE_MOUSE | SOURCE_TOUCHSCREEN
|
||||
// 0x2 = SOURCE_CLASS_POINTER
|
||||
if (event.getSource() == InputDevice.SOURCE_MOUSE || event.getSource() == (InputDevice.SOURCE_MOUSE | InputDevice.SOURCE_TOUCHSCREEN)) {
|
||||
int mouseButton = 1;
|
||||
try {
|
||||
mouseButton = (Integer) event.getClass().getMethod("getButtonState").invoke(event);
|
||||
} catch(Exception e) {
|
||||
mouseButton = 1; // oh well.
|
||||
Object object = event.getClass().getMethod("getButtonState").invoke(event);
|
||||
if (object != null) {
|
||||
mouseButton = (Integer) object;
|
||||
}
|
||||
} catch(Exception ignored) {
|
||||
}
|
||||
|
||||
// We need to check if we're in relative mouse mode and get the axis offset rather than the x/y values
|
||||
|
@ -1978,6 +1987,7 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
|
|||
case MotionEvent.ACTION_DOWN:
|
||||
// Primary pointer up/down, the index is always zero
|
||||
i = 0;
|
||||
/* fallthrough */
|
||||
case MotionEvent.ACTION_POINTER_UP:
|
||||
case MotionEvent.ACTION_POINTER_DOWN:
|
||||
// Non primary pointer up/down
|
||||
|
@ -2044,7 +2054,7 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
|
|||
|
||||
// Since we may have an orientation set, we won't receive onConfigurationChanged events.
|
||||
// We thus should check here.
|
||||
int newOrientation = SDLActivity.SDL_ORIENTATION_UNKNOWN;
|
||||
int newOrientation;
|
||||
|
||||
float x, y;
|
||||
switch (mDisplay.getRotation()) {
|
||||
|
@ -2063,6 +2073,7 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
|
|||
y = -event.values[1];
|
||||
newOrientation = SDLActivity.SDL_ORIENTATION_PORTRAIT_FLIPPED;
|
||||
break;
|
||||
case Surface.ROTATION_0:
|
||||
default:
|
||||
x = event.values[0];
|
||||
y = event.values[1];
|
||||
|
@ -2109,8 +2120,7 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
|
|||
// Change our action value to what SDL's code expects.
|
||||
if (action == MotionEvent.ACTION_BUTTON_PRESS) {
|
||||
action = MotionEvent.ACTION_DOWN;
|
||||
}
|
||||
else if (action == MotionEvent.ACTION_BUTTON_RELEASE) {
|
||||
} else { /* MotionEvent.ACTION_BUTTON_RELEASE */
|
||||
action = MotionEvent.ACTION_UP;
|
||||
}
|
||||
|
||||
|
@ -2275,45 +2285,38 @@ class SDLInputConnection extends BaseInputConnection {
|
|||
}
|
||||
}
|
||||
|
||||
interface SDLClipboardHandler {
|
||||
class SDLClipboardHandler implements
|
||||
ClipboardManager.OnPrimaryClipChangedListener {
|
||||
|
||||
public boolean clipboardHasText();
|
||||
public String clipboardGetText();
|
||||
public void clipboardSetText(String string);
|
||||
protected ClipboardManager mClipMgr;
|
||||
|
||||
}
|
||||
|
||||
|
||||
class SDLClipboardHandler_API11 implements
|
||||
SDLClipboardHandler,
|
||||
android.content.ClipboardManager.OnPrimaryClipChangedListener {
|
||||
|
||||
protected android.content.ClipboardManager mClipMgr;
|
||||
|
||||
SDLClipboardHandler_API11() {
|
||||
mClipMgr = (android.content.ClipboardManager) SDL.getContext().getSystemService(Context.CLIPBOARD_SERVICE);
|
||||
SDLClipboardHandler() {
|
||||
mClipMgr = (ClipboardManager) SDL.getContext().getSystemService(Context.CLIPBOARD_SERVICE);
|
||||
mClipMgr.addPrimaryClipChangedListener(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean clipboardHasText() {
|
||||
return mClipMgr.hasText();
|
||||
return mClipMgr.hasPrimaryClip();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String clipboardGetText() {
|
||||
CharSequence text;
|
||||
text = mClipMgr.getText();
|
||||
if (text != null) {
|
||||
return text.toString();
|
||||
ClipData clip = mClipMgr.getPrimaryClip();
|
||||
if (clip != null) {
|
||||
ClipData.Item item = clip.getItemAt(0);
|
||||
if (item != null) {
|
||||
CharSequence text = item.getText();
|
||||
if (text != null) {
|
||||
return text.toString();
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clipboardSetText(String string) {
|
||||
mClipMgr.removePrimaryClipChangedListener(this);
|
||||
mClipMgr.setText(string);
|
||||
ClipData clip = ClipData.newPlainText(null, string);
|
||||
mClipMgr.setPrimaryClip(clip);
|
||||
mClipMgr.addPrimaryClipChangedListener(this);
|
||||
}
|
||||
|
||||
|
@ -2321,6 +2324,5 @@ class SDLClipboardHandler_API11 implements
|
|||
public void onPrimaryClipChanged() {
|
||||
SDLActivity.onNativeClipboardChanged();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
package org.libsdl.app;
|
||||
|
||||
import android.media.*;
|
||||
import android.media.AudioFormat;
|
||||
import android.media.AudioManager;
|
||||
import android.media.AudioRecord;
|
||||
import android.media.AudioTrack;
|
||||
import android.media.MediaRecorder;
|
||||
import android.os.Build;
|
||||
import android.util.Log;
|
||||
|
||||
|
@ -199,7 +203,6 @@ public class SDLAudioManager
|
|||
results[0] = mAudioRecord.getSampleRate();
|
||||
results[1] = mAudioRecord.getAudioFormat();
|
||||
results[2] = mAudioRecord.getChannelCount();
|
||||
results[3] = desiredFrames;
|
||||
|
||||
} else {
|
||||
if (mAudioTrack == null) {
|
||||
|
@ -223,8 +226,8 @@ public class SDLAudioManager
|
|||
results[0] = mAudioTrack.getSampleRate();
|
||||
results[1] = mAudioTrack.getAudioFormat();
|
||||
results[2] = mAudioTrack.getChannelCount();
|
||||
results[3] = desiredFrames;
|
||||
}
|
||||
results[3] = desiredFrames;
|
||||
|
||||
Log.v(TAG, "Opening " + (isCapture ? "capture" : "playback") + ", got " + results[3] + " frames of " + results[2] + " channel " + getAudioFormatString(results[1]) + " audio at " + results[0] + " Hz");
|
||||
|
||||
|
|
|
@ -6,9 +6,14 @@ import java.util.Comparator;
|
|||
import java.util.List;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.*;
|
||||
import android.view.*;
|
||||
import android.os.Build;
|
||||
import android.os.VibrationEffect;
|
||||
import android.os.Vibrator;
|
||||
import android.util.Log;
|
||||
import android.view.InputDevice;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
|
||||
|
||||
public class SDLControllerManager
|
||||
|
@ -98,7 +103,7 @@ public class SDLControllerManager
|
|||
int sources = device.getSources();
|
||||
|
||||
/* This is called for every button press, so let's not spam the logs */
|
||||
/**
|
||||
/*
|
||||
if ((sources & InputDevice.SOURCE_CLASS_JOYSTICK) != 0) {
|
||||
Log.v(TAG, "Input device " + device.getName() + " has class joystick.");
|
||||
}
|
||||
|
@ -108,7 +113,7 @@ public class SDLControllerManager
|
|||
if ((sources & InputDevice.SOURCE_GAMEPAD) == InputDevice.SOURCE_GAMEPAD) {
|
||||
Log.v(TAG, "Input device " + device.getName() + " is a gamepad.");
|
||||
}
|
||||
**/
|
||||
*/
|
||||
|
||||
return ((sources & InputDevice.SOURCE_CLASS_JOYSTICK) != 0 ||
|
||||
((sources & InputDevice.SOURCE_DPAD) == InputDevice.SOURCE_DPAD) ||
|
||||
|
@ -167,7 +172,7 @@ class SDLJoystickHandler_API16 extends SDLJoystickHandler {
|
|||
}
|
||||
}
|
||||
|
||||
private ArrayList<SDLJoystick> mJoysticks;
|
||||
private final ArrayList<SDLJoystick> mJoysticks;
|
||||
|
||||
public SDLJoystickHandler_API16() {
|
||||
|
||||
|
@ -177,13 +182,14 @@ class SDLJoystickHandler_API16 extends SDLJoystickHandler {
|
|||
@Override
|
||||
public void pollInputDevices() {
|
||||
int[] deviceIds = InputDevice.getDeviceIds();
|
||||
for(int i=0; i < deviceIds.length; ++i) {
|
||||
SDLJoystick joystick = getJoystick(deviceIds[i]);
|
||||
if (joystick == null) {
|
||||
joystick = new SDLJoystick();
|
||||
InputDevice joystickDevice = InputDevice.getDevice(deviceIds[i]);
|
||||
if (SDLControllerManager.isDeviceSDLJoystick(deviceIds[i])) {
|
||||
joystick.device_id = deviceIds[i];
|
||||
|
||||
for (int device_id : deviceIds) {
|
||||
if (SDLControllerManager.isDeviceSDLJoystick(device_id)) {
|
||||
SDLJoystick joystick = getJoystick(device_id);
|
||||
if (joystick == null) {
|
||||
InputDevice joystickDevice = InputDevice.getDevice(device_id);
|
||||
joystick = new SDLJoystick();
|
||||
joystick.device_id = device_id;
|
||||
joystick.name = joystickDevice.getName();
|
||||
joystick.desc = getJoystickDescriptor(joystickDevice);
|
||||
joystick.axes = new ArrayList<InputDevice.MotionRange>();
|
||||
|
@ -191,53 +197,57 @@ class SDLJoystickHandler_API16 extends SDLJoystickHandler {
|
|||
|
||||
List<InputDevice.MotionRange> ranges = joystickDevice.getMotionRanges();
|
||||
Collections.sort(ranges, new RangeComparator());
|
||||
for (InputDevice.MotionRange range : ranges ) {
|
||||
for (InputDevice.MotionRange range : ranges) {
|
||||
if ((range.getSource() & InputDevice.SOURCE_CLASS_JOYSTICK) != 0) {
|
||||
if (range.getAxis() == MotionEvent.AXIS_HAT_X ||
|
||||
range.getAxis() == MotionEvent.AXIS_HAT_Y) {
|
||||
if (range.getAxis() == MotionEvent.AXIS_HAT_X || range.getAxis() == MotionEvent.AXIS_HAT_Y) {
|
||||
joystick.hats.add(range);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
joystick.axes.add(range);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mJoysticks.add(joystick);
|
||||
SDLControllerManager.nativeAddJoystick(joystick.device_id, joystick.name, joystick.desc, getVendorId(joystickDevice), getProductId(joystickDevice), false, getButtonMask(joystickDevice), joystick.axes.size(), joystick.hats.size()/2, 0);
|
||||
SDLControllerManager.nativeAddJoystick(joystick.device_id, joystick.name, joystick.desc,
|
||||
getVendorId(joystickDevice), getProductId(joystickDevice), false,
|
||||
getButtonMask(joystickDevice), joystick.axes.size(), joystick.hats.size()/2, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Check removed devices */
|
||||
ArrayList<Integer> removedDevices = new ArrayList<Integer>();
|
||||
for(int i=0; i < mJoysticks.size(); i++) {
|
||||
int device_id = mJoysticks.get(i).device_id;
|
||||
int j;
|
||||
for (j=0; j < deviceIds.length; j++) {
|
||||
if (device_id == deviceIds[j]) break;
|
||||
ArrayList<Integer> removedDevices = null;
|
||||
for (SDLJoystick joystick : mJoysticks) {
|
||||
int device_id = joystick.device_id;
|
||||
int i;
|
||||
for (i = 0; i < deviceIds.length; i++) {
|
||||
if (device_id == deviceIds[i]) break;
|
||||
}
|
||||
if (j == deviceIds.length) {
|
||||
removedDevices.add(Integer.valueOf(device_id));
|
||||
if (i == deviceIds.length) {
|
||||
if (removedDevices == null) {
|
||||
removedDevices = new ArrayList<Integer>();
|
||||
}
|
||||
removedDevices.add(device_id);
|
||||
}
|
||||
}
|
||||
|
||||
for(int i=0; i < removedDevices.size(); i++) {
|
||||
int device_id = removedDevices.get(i).intValue();
|
||||
SDLControllerManager.nativeRemoveJoystick(device_id);
|
||||
for (int j=0; j < mJoysticks.size(); j++) {
|
||||
if (mJoysticks.get(j).device_id == device_id) {
|
||||
mJoysticks.remove(j);
|
||||
break;
|
||||
if (removedDevices != null) {
|
||||
for (int device_id : removedDevices) {
|
||||
SDLControllerManager.nativeRemoveJoystick(device_id);
|
||||
for (int i = 0; i < mJoysticks.size(); i++) {
|
||||
if (mJoysticks.get(i).device_id == device_id) {
|
||||
mJoysticks.remove(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected SDLJoystick getJoystick(int device_id) {
|
||||
for(int i=0; i < mJoysticks.size(); i++) {
|
||||
if (mJoysticks.get(i).device_id == device_id) {
|
||||
return mJoysticks.get(i);
|
||||
for (SDLJoystick joystick : mJoysticks) {
|
||||
if (joystick.device_id == device_id) {
|
||||
return joystick;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
@ -248,25 +258,21 @@ class SDLJoystickHandler_API16 extends SDLJoystickHandler {
|
|||
if ((event.getSource() & InputDevice.SOURCE_JOYSTICK) != 0) {
|
||||
int actionPointerIndex = event.getActionIndex();
|
||||
int action = event.getActionMasked();
|
||||
switch(action) {
|
||||
case MotionEvent.ACTION_MOVE:
|
||||
SDLJoystick joystick = getJoystick(event.getDeviceId());
|
||||
if ( joystick != null ) {
|
||||
for (int i = 0; i < joystick.axes.size(); i++) {
|
||||
InputDevice.MotionRange range = joystick.axes.get(i);
|
||||
/* Normalize the value to -1...1 */
|
||||
float value = ( event.getAxisValue( range.getAxis(), actionPointerIndex) - range.getMin() ) / range.getRange() * 2.0f - 1.0f;
|
||||
SDLControllerManager.onNativeJoy(joystick.device_id, i, value );
|
||||
}
|
||||
for (int i = 0; i < joystick.hats.size(); i+=2) {
|
||||
int hatX = Math.round(event.getAxisValue( joystick.hats.get(i).getAxis(), actionPointerIndex ) );
|
||||
int hatY = Math.round(event.getAxisValue( joystick.hats.get(i+1).getAxis(), actionPointerIndex ) );
|
||||
SDLControllerManager.onNativeHat(joystick.device_id, i/2, hatX, hatY );
|
||||
}
|
||||
if (action == MotionEvent.ACTION_MOVE) {
|
||||
SDLJoystick joystick = getJoystick(event.getDeviceId());
|
||||
if (joystick != null) {
|
||||
for (int i = 0; i < joystick.axes.size(); i++) {
|
||||
InputDevice.MotionRange range = joystick.axes.get(i);
|
||||
/* Normalize the value to -1...1 */
|
||||
float value = (event.getAxisValue(range.getAxis(), actionPointerIndex) - range.getMin()) / range.getRange() * 2.0f - 1.0f;
|
||||
SDLControllerManager.onNativeJoy(joystick.device_id, i, value);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
for (int i = 0; i < joystick.hats.size() / 2; i++) {
|
||||
int hatX = Math.round(event.getAxisValue(joystick.hats.get(2 * i).getAxis(), actionPointerIndex));
|
||||
int hatY = Math.round(event.getAxisValue(joystick.hats.get(2 * i + 1).getAxis(), actionPointerIndex));
|
||||
SDLControllerManager.onNativeHat(joystick.device_id, i, hatX, hatY);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
@ -432,13 +438,13 @@ class SDLHapticHandler_API26 extends SDLHapticHandler {
|
|||
|
||||
class SDLHapticHandler {
|
||||
|
||||
class SDLHaptic {
|
||||
static class SDLHaptic {
|
||||
public int device_id;
|
||||
public String name;
|
||||
public Vibrator vib;
|
||||
}
|
||||
|
||||
private ArrayList<SDLHaptic> mHaptics;
|
||||
private final ArrayList<SDLHaptic> mHaptics;
|
||||
|
||||
public SDLHapticHandler() {
|
||||
mHaptics = new ArrayList<SDLHaptic>();
|
||||
|
@ -504,37 +510,41 @@ class SDLHapticHandler {
|
|||
}
|
||||
|
||||
/* Check removed devices */
|
||||
ArrayList<Integer> removedDevices = new ArrayList<Integer>();
|
||||
for(int i=0; i < mHaptics.size(); i++) {
|
||||
int device_id = mHaptics.get(i).device_id;
|
||||
int j;
|
||||
for (j=0; j < deviceIds.length; j++) {
|
||||
if (device_id == deviceIds[j]) break;
|
||||
ArrayList<Integer> removedDevices = null;
|
||||
for (SDLHaptic haptic : mHaptics) {
|
||||
int device_id = haptic.device_id;
|
||||
int i;
|
||||
for (i = 0; i < deviceIds.length; i++) {
|
||||
if (device_id == deviceIds[i]) break;
|
||||
}
|
||||
|
||||
if (device_id == deviceId_VIBRATOR_SERVICE && hasVibratorService) {
|
||||
// don't remove the vibrator if it is still present
|
||||
} else if (j == deviceIds.length) {
|
||||
removedDevices.add(device_id);
|
||||
}
|
||||
if (device_id != deviceId_VIBRATOR_SERVICE || !hasVibratorService) {
|
||||
if (i == deviceIds.length) {
|
||||
if (removedDevices == null) {
|
||||
removedDevices = new ArrayList<Integer>();
|
||||
}
|
||||
removedDevices.add(device_id);
|
||||
}
|
||||
} // else: don't remove the vibrator if it is still present
|
||||
}
|
||||
|
||||
for(int i=0; i < removedDevices.size(); i++) {
|
||||
int device_id = removedDevices.get(i);
|
||||
SDLControllerManager.nativeRemoveHaptic(device_id);
|
||||
for (int j=0; j < mHaptics.size(); j++) {
|
||||
if (mHaptics.get(j).device_id == device_id) {
|
||||
mHaptics.remove(j);
|
||||
break;
|
||||
if (removedDevices != null) {
|
||||
for (int device_id : removedDevices) {
|
||||
SDLControllerManager.nativeRemoveHaptic(device_id);
|
||||
for (int i = 0; i < mHaptics.size(); i++) {
|
||||
if (mHaptics.get(i).device_id == device_id) {
|
||||
mHaptics.remove(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected SDLHaptic getHaptic(int device_id) {
|
||||
for(int i=0; i < mHaptics.size(); i++) {
|
||||
if (mHaptics.get(i).device_id == device_id) {
|
||||
return mHaptics.get(i);
|
||||
for (SDLHaptic haptic : mHaptics) {
|
||||
if (haptic.device_id == device_id) {
|
||||
return haptic;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
@ -655,8 +665,7 @@ class SDLGenericMotionListener_API24 extends SDLGenericMotionListener_API12 {
|
|||
public float getEventX(MotionEvent event) {
|
||||
if (mRelativeModeEnabled) {
|
||||
return event.getAxisValue(MotionEvent.AXIS_RELATIVE_X);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
return event.getX(0);
|
||||
}
|
||||
}
|
||||
|
@ -665,14 +674,12 @@ class SDLGenericMotionListener_API24 extends SDLGenericMotionListener_API12 {
|
|||
public float getEventY(MotionEvent event) {
|
||||
if (mRelativeModeEnabled) {
|
||||
return event.getAxisValue(MotionEvent.AXIS_RELATIVE_Y);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
return event.getY(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class SDLGenericMotionListener_API26 extends SDLGenericMotionListener_API24 {
|
||||
// Generic Motion (mouse hover, joystick...) events go here
|
||||
private boolean mRelativeModeEnabled;
|
||||
|
@ -753,15 +760,12 @@ class SDLGenericMotionListener_API26 extends SDLGenericMotionListener_API24 {
|
|||
if (!SDLActivity.isDeXMode() || (Build.VERSION.SDK_INT >= 27)) {
|
||||
if (enabled) {
|
||||
SDLActivity.getContentView().requestPointerCapture();
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
SDLActivity.getContentView().releasePointerCapture();
|
||||
}
|
||||
mRelativeModeEnabled = enabled;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
47
externals/SDL/build-scripts/checker-buildbot.sh
vendored
47
externals/SDL/build-scripts/checker-buildbot.sh
vendored
|
@ -5,51 +5,10 @@
|
|||
# back to the buildmaster. You might find it useful too.
|
||||
|
||||
# Install Clang (you already have it on Mac OS X, apt-get install clang
|
||||
# on Ubuntu, etc),
|
||||
# or download checker at http://clang-analyzer.llvm.org/ and unpack it in
|
||||
# /usr/local ... update CHECKERDIR as appropriate.
|
||||
# on Ubuntu, etc), and make sure scan-build is in your $PATH.
|
||||
|
||||
FINALDIR="$1"
|
||||
|
||||
CHECKERDIR="/usr/local/checker-279"
|
||||
if [ ! -d "$CHECKERDIR" ]; then
|
||||
echo "$CHECKERDIR not found. Trying /usr/share/clang ..." 1>&2
|
||||
CHECKERDIR="/usr/share/clang/scan-build"
|
||||
fi
|
||||
|
||||
if [ ! -d "$CHECKERDIR" ]; then
|
||||
echo "$CHECKERDIR not found. Giving up." 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$MAKE" ]; then
|
||||
OSTYPE=`uname -s`
|
||||
if [ "$OSTYPE" == "Linux" ]; then
|
||||
NCPU=`cat /proc/cpuinfo |grep vendor_id |wc -l`
|
||||
let NCPU=$NCPU+1
|
||||
elif [ "$OSTYPE" = "Darwin" ]; then
|
||||
NCPU=`sysctl -n hw.ncpu`
|
||||
elif [ "$OSTYPE" = "SunOS" ]; then
|
||||
NCPU=`/usr/sbin/psrinfo |wc -l |sed -e 's/^ *//g;s/ *$//g'`
|
||||
else
|
||||
NCPU=1
|
||||
fi
|
||||
|
||||
if [ -z "$NCPU" ]; then
|
||||
NCPU=1
|
||||
elif [ "$NCPU" = "0" ]; then
|
||||
NCPU=1
|
||||
fi
|
||||
|
||||
MAKE="make -j$NCPU"
|
||||
fi
|
||||
|
||||
echo "\$MAKE is '$MAKE'"
|
||||
|
||||
# Unset $MAKE so submakes don't use it.
|
||||
MAKECOMMAND="$MAKE"
|
||||
unset MAKE
|
||||
|
||||
set -x
|
||||
set -e
|
||||
|
||||
|
@ -68,13 +27,13 @@ cd checker-buildbot
|
|||
# The -Wno-liblto is new since our checker-279 upgrade, I think; checker otherwise warns "libLTO.dylib relative to clang installed dir not found"
|
||||
|
||||
# You might want to do this for CMake-backed builds instead...
|
||||
PATH="$CHECKERDIR/bin:$PATH" scan-build -o analysis cmake -Wno-dev -DSDL_STATIC=OFF -DCMAKE_BUILD_TYPE=Debug -DASSERTIONS=enabled -DCMAKE_C_FLAGS="-Wno-deprecated-declarations" -DCMAKE_SHARED_LINKER_FLAGS="-Wno-liblto" ..
|
||||
scan-build -o analysis cmake -G Ninja -Wno-dev -DSDL_STATIC=OFF -DCMAKE_BUILD_TYPE=Debug -DASSERTIONS=enabled -DCMAKE_C_FLAGS="-Wno-deprecated-declarations" -DCMAKE_SHARED_LINKER_FLAGS="-Wno-liblto" ..
|
||||
|
||||
# ...or run configure without the scan-build wrapper...
|
||||
#CC="$CHECKERDIR/libexec/ccc-analyzer" CFLAGS="-O0 -Wno-deprecated-declarations" LDFLAGS="-Wno-liblto" ../configure --enable-assertions=enabled
|
||||
|
||||
rm -rf analysis
|
||||
PATH="$CHECKERDIR/bin:$PATH" scan-build -o analysis $MAKECOMMAND
|
||||
scan-build -o analysis ninja
|
||||
|
||||
if [ `ls -A analysis |wc -l` == 0 ] ; then
|
||||
mkdir analysis/zarro
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ -z "$SDKDIR" ]; then
|
||||
SDKDIR="/emsdk_portable"
|
||||
SDKDIR="/emsdk"
|
||||
fi
|
||||
|
||||
ENVSCRIPT="$SDKDIR/emsdk_env.sh"
|
||||
|
@ -55,7 +55,7 @@ mkdir buildbot
|
|||
pushd buildbot
|
||||
|
||||
echo "Configuring..."
|
||||
emconfigure ../configure --host=asmjs-unknown-emscripten --disable-assembly --disable-threads --disable-cpuinfo CFLAGS="-O2 -Wno-warn-absolute-paths -Wdeclaration-after-statement -Werror=declaration-after-statement" --prefix="$PWD/emscripten-sdl2-installed" || exit $?
|
||||
emconfigure ../configure --host=wasm-unknown-emscripten --disable-assembly --disable-threads --disable-cpuinfo CFLAGS="-O2 -Wno-warn-absolute-paths -Wdeclaration-after-statement -Werror=declaration-after-statement" --prefix="$PWD/emscripten-sdl2-installed" || exit $?
|
||||
|
||||
echo "Building..."
|
||||
emmake $MAKE || exit $?
|
||||
|
@ -67,9 +67,8 @@ emmake $MAKE install || exit $?
|
|||
perl -w -pi -e "s#$PWD/emscripten-sdl2-installed#/usr/local#g;" ./emscripten-sdl2-installed/lib/libSDL2.la ./emscripten-sdl2-installed/lib/pkgconfig/sdl2.pc ./emscripten-sdl2-installed/bin/sdl2-config
|
||||
mkdir -p ./usr
|
||||
mv ./emscripten-sdl2-installed ./usr/local
|
||||
tar -cJvvf $TARBALL usr
|
||||
popd
|
||||
tar -cJvvf $TARBALL -C buildbot usr
|
||||
rm -rf buildbot
|
||||
|
||||
exit 0
|
||||
|
||||
|
|
14
externals/SDL/build-scripts/iosbuild.sh
vendored
14
externals/SDL/build-scripts/iosbuild.sh
vendored
|
@ -11,7 +11,9 @@ fi
|
|||
SRC_DIR=$(cd `dirname $0`/..; pwd)
|
||||
if [ "$PWD" = "$SRC_DIR" ]; then
|
||||
PREFIX=$SRC_DIR/ios-build
|
||||
mkdir $PREFIX
|
||||
if [ ! -d "$PREFIX" ]; then
|
||||
mkdir $PREFIX
|
||||
fi
|
||||
else
|
||||
PREFIX=$PWD
|
||||
fi
|
||||
|
@ -87,7 +89,7 @@ then
|
|||
cd ${PREFIX}
|
||||
make clean
|
||||
../configure --build=x86_64-apple-${DARWIN} --host=i386-ios-${DARWIN} --disable-shared --prefix=${PREFIX}/platform/i386-sim "CC=${CC}" "CFLAGS=${CFLAGS} -mios-simulator-version-min=${MIN_SDK_VERSION} -arch i386 -isysroot ${IPHONESIMULATOR_SYSROOT}" "CXX=${CXX}" "CXXFLAGS=${CXXFLAGS} -mios-simulator-version-min=${MIN_SDK_VERSION} -arch i386 -isysroot ${IPHONESIMULATOR_SYSROOT}" LDFLAGS="-arch i386 -mios-simulator-version-min=${MIN_SDK_VERSION} ${LDFLAGS} -L${IPHONESIMULATOR_SYSROOT}/usr/lib/ -L${IPHONESIMULATOR_SYSROOT}/usr/lib/system" || exit 2
|
||||
cp $SRC_DIR/include/SDL_config_iphoneos.h include/SDL_config.h
|
||||
cp $SRC_DIR/include/SDL_config_iphoneos.h include/SDL_config.h
|
||||
make -j10 || exit 3
|
||||
make install
|
||||
) || exit $?
|
||||
|
@ -105,7 +107,7 @@ then
|
|||
cd ${PREFIX}
|
||||
make clean
|
||||
../configure --build=x86_64-apple-${DARWIN} --host=x86_64-ios-${DARWIN} --disable-shared --prefix=${PREFIX}/platform/x86_64-sim "CC=${CC}" "CFLAGS=${CFLAGS} -mios-simulator-version-min=${MIN_SDK_VERSION} -arch x86_64 -isysroot ${IPHONESIMULATOR_SYSROOT}" "CXX=${CXX}" "CXXFLAGS=${CXXFLAGS} -mios-simulator-version-min=${MIN_SDK_VERSION} -arch x86_64 -isysroot ${IPHONESIMULATOR_SYSROOT}" LDFLAGS="-arch x86_64 -mios-simulator-version-min=${MIN_SDK_VERSION} ${LDFLAGS} -L${IPHONESIMULATOR_SYSROOT}/usr/lib/ -L${IPHONESIMULATOR_SYSROOT}/usr/lib/system" || exit 2
|
||||
cp $SRC_DIR/include/SDL_config_iphoneos.h include/SDL_config.h
|
||||
cp $SRC_DIR/include/SDL_config_iphoneos.h include/SDL_config.h
|
||||
make -j$NJOB || exit 3
|
||||
make install
|
||||
) || exit $?
|
||||
|
@ -123,7 +125,7 @@ then
|
|||
cd ${PREFIX}
|
||||
make clean
|
||||
../configure --build=x86_64-apple-${DARWIN} --host=armv7-ios-${DARWIN} --disable-shared --prefix=${PREFIX}/platform/armv7-ios "CC=${CC}" "CFLAGS=${CFLAGS} -miphoneos-version-min=${MIN_SDK_VERSION} -arch armv7 -isysroot ${IPHONEOS_SYSROOT}" "CXX=${CXX}" "CXXFLAGS=${CXXFLAGS} -arch armv7 -isysroot ${IPHONEOS_SYSROOT}" LDFLAGS="-arch armv7 -miphoneos-version-min=${MIN_SDK_VERSION} ${LDFLAGS}" || exit 2
|
||||
cp $SRC_DIR/include/SDL_config_iphoneos.h include/SDL_config.h
|
||||
cp $SRC_DIR/include/SDL_config_iphoneos.h include/SDL_config.h
|
||||
make -j$NJOB || exit 3
|
||||
make install
|
||||
) || exit $?
|
||||
|
@ -141,7 +143,7 @@ then
|
|||
cd ${PREFIX}
|
||||
make clean
|
||||
../configure --build=x86_64-apple-${DARWIN} --host=armv7s-ios-${DARWIN} --disable-shared --prefix=${PREFIX}/platform/armv7s-ios "CC=${CC}" "CFLAGS=${CFLAGS} -miphoneos-version-min=${MIN_SDK_VERSION} -arch armv7s -isysroot ${IPHONEOS_SYSROOT}" "CXX=${CXX}" "CXXFLAGS=${CXXFLAGS} -miphoneos-version-min=${MIN_SDK_VERSION} -arch armv7s -isysroot ${IPHONEOS_SYSROOT}" LDFLAGS="-arch armv7s -miphoneos-version-min=${MIN_SDK_VERSION} ${LDFLAGS}" || exit 2
|
||||
cp $SRC_DIR/include/SDL_config_iphoneos.h include/SDL_config.h
|
||||
cp $SRC_DIR/include/SDL_config_iphoneos.h include/SDL_config.h
|
||||
make -j$NJOB || exit 3
|
||||
make install
|
||||
) || exit $?
|
||||
|
@ -159,7 +161,7 @@ then
|
|||
cd ${PREFIX}
|
||||
make clean
|
||||
../configure --build=x86_64-apple-${DARWIN} --host=arm-ios-${DARWIN} --disable-shared --prefix=${PREFIX}/platform/arm64-ios "CC=${CC}" "CFLAGS=${CFLAGS} -miphoneos-version-min=${MIN_SDK_VERSION} -arch arm64 -isysroot ${IPHONEOS_SYSROOT}" "CXX=${CXX}" "CXXFLAGS=${CXXFLAGS} -miphoneos-version-min=${MIN_SDK_VERSION} -arch arm64 -isysroot ${IPHONEOS_SYSROOT}" LDFLAGS="-arch arm64 -miphoneos-version-min=${MIN_SDK_VERSION} ${LDFLAGS}" || exit 2
|
||||
cp $SRC_DIR/include/SDL_config_iphoneos.h include/SDL_config.h
|
||||
cp $SRC_DIR/include/SDL_config_iphoneos.h include/SDL_config.h
|
||||
make -j$NJOB || exit 3
|
||||
make install
|
||||
) || exit $?
|
||||
|
|
9
externals/SDL/build-scripts/ltmain.sh
vendored
9
externals/SDL/build-scripts/ltmain.sh
vendored
|
@ -5099,14 +5099,7 @@ func_mode_link ()
|
|||
# we shouldn't force the makefile maintainer to figure out
|
||||
# which system we are compiling for in order to pass an extra
|
||||
# flag for every libtool invocation.
|
||||
# allow_undefined=no
|
||||
|
||||
# FIXME: Unfortunately, there are problems with the above when trying
|
||||
# to make a dll which has undefined symbols, in which case not
|
||||
# even a static library is built. For now, we need to specify
|
||||
# -no-undefined on the libtool link line when we can be certain
|
||||
# that all symbols are satisfied, otherwise we get a static library.
|
||||
allow_undefined=yes
|
||||
allow_undefined=no
|
||||
;;
|
||||
*)
|
||||
allow_undefined=yes
|
||||
|
|
6
externals/SDL/build-scripts/os2-buildbot.sh
vendored
6
externals/SDL/build-scripts/os2-buildbot.sh
vendored
|
@ -19,7 +19,7 @@ ZIPFILE="$1"
|
|||
if [ -z $1 ]; then
|
||||
ZIPFILE=sdl-os2.zip
|
||||
fi
|
||||
ZIPDIR=SDL2-os2
|
||||
ZIPDIR=buildbot/SDL
|
||||
|
||||
set -e
|
||||
set -x
|
||||
|
@ -30,11 +30,11 @@ cd ..
|
|||
rm -f $ZIPFILE
|
||||
wmake -f Makefile.os2
|
||||
rm -rf $ZIPDIR
|
||||
mkdir $ZIPDIR
|
||||
mkdir -p $ZIPDIR
|
||||
chmod a+r SDL2.lib SDL2.dll
|
||||
mv SDL2.lib SDL2.dll $ZIPDIR/
|
||||
cp -R include $ZIPDIR/
|
||||
zip -9r "$ZIPFILE" $ZIPDIR
|
||||
zip -9r "buildbot/$ZIPFILE" $ZIPDIR
|
||||
|
||||
wmake -f Makefile.os2 distclean
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ if [ "x$MAKE" == "x" ]; then
|
|||
MAKE="make -j$NCPU"
|
||||
fi
|
||||
|
||||
BUILDBOTDIR="raspberrypi-buildbot"
|
||||
BUILDBOTDIR="buildbot"
|
||||
PARENTDIR="$PWD"
|
||||
|
||||
set -e
|
||||
|
@ -49,10 +49,8 @@ $MAKE install
|
|||
perl -w -pi -e "s#$PWD/rpi-sdl2-installed#/usr/local#g;" ./rpi-sdl2-installed/lib/libSDL2.la ./rpi-sdl2-installed/lib/pkgconfig/sdl2.pc ./rpi-sdl2-installed/bin/sdl2-config
|
||||
mkdir -p ./usr
|
||||
mv ./rpi-sdl2-installed ./usr/local
|
||||
|
||||
tar -cJvvf $TARBALL usr
|
||||
popd
|
||||
tar -cJvvf $TARBALL -C $BUILDBOTDIR usr
|
||||
rm -rf $BUILDBOTDIR
|
||||
|
||||
set +x
|
||||
echo "All done. Final installable is in $TARBALL ...";
|
||||
|
|
22
externals/SDL/build-scripts/showrev.sh
vendored
22
externals/SDL/build-scripts/showrev.sh
vendored
|
@ -2,4 +2,24 @@
|
|||
#
|
||||
# Print the current source revision, if available
|
||||
|
||||
hg parents --template 'hg-{rev}:{node|short}' || (echo "hg-0:baadf00d"; exit 1)
|
||||
SDL_ROOT=$(dirname $0)/..
|
||||
cd $SDL_ROOT
|
||||
|
||||
if [ -x "$(command -v hg)" ]; then
|
||||
rev="$(hg parents --template 'hg-{rev}:{node|short}' 2>/dev/null)"
|
||||
if [ $? = 0 ]; then
|
||||
echo $rev
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -x "$(command -v p4)" ]; then
|
||||
rev="$(p4 changes -m1 ./...\#have 2>/dev/null| awk '{print $2}')"
|
||||
if [ $? = 0 ]; then
|
||||
echo $rev
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "hg-0:baadf00d"
|
||||
exit 1
|
||||
|
|
|
@ -1,38 +1,26 @@
|
|||
@echo off
|
||||
rem just a helper batch file for collecting up files and zipping them.
|
||||
rem usage: windows-buildbot-zipper.bat <zipfilename>
|
||||
rem usage: windows-buildbot-zipper.bat <target> <slndir> <zipfilename>
|
||||
rem must be run from root of SDL source tree.
|
||||
|
||||
IF EXIST VisualC\Win32\Release GOTO okaywin32dir
|
||||
IF EXIST %2\%1\Release GOTO okaydir
|
||||
echo Please run from root of source tree after doing a Release build.
|
||||
GOTO done
|
||||
|
||||
:okaywin32dir
|
||||
IF EXIST VisualC\x64\Release GOTO okaydirs
|
||||
echo Please run from root of source tree after doing a Release build.
|
||||
GOTO done
|
||||
|
||||
:okaydirs
|
||||
:okaydir
|
||||
erase /q /f /s zipper
|
||||
IF EXIST zipper GOTO zippermade
|
||||
mkdir zipper
|
||||
:zippermade
|
||||
mkdir zipper\SDL
|
||||
mkdir zipper\SDL\include
|
||||
mkdir zipper\SDL\lib
|
||||
copy include\*.h include\
|
||||
copy %2\%1\Release\SDL2.dll zipper\SDL\lib\
|
||||
copy %2\%1\Release\SDL2.lib zipper\SDL\lib\
|
||||
copy %2\%1\Release\SDL2main.lib zipper\SDL\lib\
|
||||
cd zipper
|
||||
mkdir SDL
|
||||
cd SDL
|
||||
mkdir include
|
||||
mkdir lib
|
||||
mkdir lib\win32
|
||||
mkdir lib\win64
|
||||
copy ..\..\include\*.h include\
|
||||
copy ..\..\VisualC\Win32\Release\SDL2.dll lib\win32\
|
||||
copy ..\..\VisualC\Win32\Release\SDL2.lib lib\win32\
|
||||
copy ..\..\VisualC\Win32\Release\SDL2main.lib lib\win32\
|
||||
copy ..\..\VisualC\x64\Release\SDL2.dll lib\win64\
|
||||
copy ..\..\VisualC\x64\Release\SDL2.lib lib\win64\
|
||||
copy ..\..\VisualC\x64\Release\SDL2main.lib lib\win64\
|
||||
cd ..
|
||||
zip -9r ..\%1 SDL
|
||||
zip -9r ..\%3 SDL
|
||||
cd ..
|
||||
erase /q /f /s zipper
|
||||
|
||||
|
|
2
externals/SDL/build-scripts/winrtbuild.ps1
vendored
2
externals/SDL/build-scripts/winrtbuild.ps1
vendored
|
@ -39,7 +39,7 @@
|
|||
#
|
||||
|
||||
# Base version of SDL, used for packaging purposes
|
||||
$SDLVersion = "2.0.12"
|
||||
$SDLVersion = "2.0.14"
|
||||
|
||||
# Gets the .bat file that sets up an MSBuild environment, given one of
|
||||
# Visual Studio's, "PlatformToolset"s.
|
||||
|
|
42
externals/SDL/cmake/sdlchecks.cmake
vendored
42
externals/SDL/cmake/sdlchecks.cmake
vendored
|
@ -30,7 +30,7 @@ macro(FindLibraryAndSONAME _LIB)
|
|||
endmacro()
|
||||
|
||||
macro(CheckDLOPEN)
|
||||
check_function_exists(dlopen HAVE_DLOPEN)
|
||||
check_symbol_exists(dlopen "dlfcn.h" HAVE_DLOPEN)
|
||||
if(NOT HAVE_DLOPEN)
|
||||
foreach(_LIBNAME dl tdl)
|
||||
check_library_exists("${_LIBNAME}" "dlopen" "" DLOPEN_LIB)
|
||||
|
@ -424,7 +424,7 @@ macro(CheckX11)
|
|||
set(X11_SHARED OFF)
|
||||
endif()
|
||||
|
||||
check_function_exists("shmat" HAVE_SHMAT)
|
||||
check_symbol_exists(shmat "sys/shm.h" HAVE_SHMAT)
|
||||
if(NOT HAVE_SHMAT)
|
||||
check_library_exists(ipc shmat "" HAVE_SHMAT)
|
||||
if(HAVE_SHMAT)
|
||||
|
@ -476,7 +476,7 @@ macro(CheckX11)
|
|||
set(SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS 1)
|
||||
endif()
|
||||
|
||||
check_function_exists(XkbKeycodeToKeysym SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM)
|
||||
check_symbol_exists(XkbKeycodeToKeysym "X11/Xlib.h;X11/XKBlib.h" SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM)
|
||||
|
||||
if(VIDEO_X11_XCURSOR AND HAVE_XCURSOR_H)
|
||||
set(HAVE_VIDEO_X11_XCURSOR TRUE)
|
||||
|
@ -593,7 +593,7 @@ endmacro()
|
|||
# - HAVE_DLOPEN opt
|
||||
macro(CheckWayland)
|
||||
if(VIDEO_WAYLAND)
|
||||
pkg_check_modules(WAYLAND wayland-client wayland-scanner wayland-protocols wayland-egl wayland-cursor egl xkbcommon)
|
||||
pkg_check_modules(WAYLAND wayland-client wayland-scanner wayland-egl wayland-cursor egl xkbcommon)
|
||||
|
||||
if(WAYLAND_FOUND)
|
||||
execute_process(
|
||||
|
@ -633,6 +633,7 @@ macro(CheckWayland)
|
|||
endforeach()
|
||||
|
||||
if(VIDEO_WAYLAND_QT_TOUCH)
|
||||
set(HAVE_VIDEO_WAYLAND_QT_TOUCH TRUE)
|
||||
set(SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH 1)
|
||||
endif()
|
||||
|
||||
|
@ -901,12 +902,14 @@ macro(CheckPTHREAD)
|
|||
endif()
|
||||
endif()
|
||||
|
||||
check_c_source_compiles("
|
||||
#include <pthread.h>
|
||||
#include <pthread_np.h>
|
||||
int main(int argc, char** argv) { return 0; }" HAVE_PTHREAD_NP_H)
|
||||
check_function_exists(pthread_setname_np HAVE_PTHREAD_SETNAME_NP)
|
||||
check_function_exists(pthread_set_name_np HAVE_PTHREAD_SET_NAME_NP)
|
||||
check_include_files("pthread.h" HAVE_PTHREAD_H)
|
||||
check_include_files("pthread_np.h" HAVE_PTHREAD_NP_H)
|
||||
if (HAVE_PTHREAD_H)
|
||||
check_symbol_exists(pthread_setname_np "pthread.h" HAVE_PTHREAD_SETNAME_NP)
|
||||
if (HAVE_PTHREAD_NP_H)
|
||||
check_symbol_exists(pthread_set_name_np "pthread.h;pthread_np.h" HAVE_PTHREAD_SET_NAME_NP)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(SOURCE_FILES ${SOURCE_FILES}
|
||||
${SDL2_SOURCE_DIR}/src/thread/pthread/SDL_systhread.c
|
||||
|
@ -970,8 +973,8 @@ macro(CheckUSBHID)
|
|||
#include <usb.h>
|
||||
#endif
|
||||
#ifdef __DragonFly__
|
||||
# include <bus/usb/usb.h>
|
||||
# include <bus/usb/usbhid.h>
|
||||
# include <bus/u4b/usb.h>
|
||||
# include <bus/u4b/usbhid.h>
|
||||
#else
|
||||
# include <dev/usb/usb.h>
|
||||
# include <dev/usb/usbhid.h>
|
||||
|
@ -996,8 +999,8 @@ macro(CheckUSBHID)
|
|||
#include <usb.h>
|
||||
#endif
|
||||
#ifdef __DragonFly__
|
||||
# include <bus/usb/usb.h>
|
||||
# include <bus/usb/usbhid.h>
|
||||
# include <bus/u4b/usb.h>
|
||||
# include <bus/u4b/usbhid.h>
|
||||
#else
|
||||
# include <dev/usb/usb.h>
|
||||
# include <dev/usb/usbhid.h>
|
||||
|
@ -1024,8 +1027,8 @@ macro(CheckUSBHID)
|
|||
#include <usb.h>
|
||||
#endif
|
||||
#ifdef __DragonFly__
|
||||
#include <bus/usb/usb.h>
|
||||
#include <bus/usb/usbhid.h>
|
||||
#include <bus/u4b/usb.h>
|
||||
#include <bus/u4b/usbhid.h>
|
||||
#else
|
||||
#include <dev/usb/usb.h>
|
||||
#include <dev/usb/usbhid.h>
|
||||
|
@ -1074,7 +1077,7 @@ macro(CheckHIDAPI)
|
|||
set(HAVE_HIDAPI TRUE)
|
||||
else()
|
||||
set(HAVE_HIDAPI FALSE)
|
||||
pkg_check_modules(LIBUSB libusb)
|
||||
pkg_check_modules(LIBUSB libusb-1.0)
|
||||
if (LIBUSB_FOUND)
|
||||
check_include_file(libusb.h HAVE_LIBUSB_H ${LIBUSB_CFLAGS})
|
||||
if (HAVE_LIBUSB_H)
|
||||
|
@ -1088,7 +1091,7 @@ macro(CheckHIDAPI)
|
|||
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")
|
||||
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)
|
||||
|
@ -1160,7 +1163,8 @@ macro(CheckKMSDRM)
|
|||
set(HAVE_SDL_VIDEO TRUE)
|
||||
|
||||
file(GLOB KMSDRM_SOURCES ${SDL2_SOURCE_DIR}/src/video/kmsdrm/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${KMSDRM_SOURCES})
|
||||
file(GLOB KMSDRM_LEGACY_SOURCES ${SDL2_SOURCE_DIR}/src/video/kmsdrm_legacy/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${KMSDRM_SOURCES} ${KMSDRM_LEGACY_SOURCES})
|
||||
|
||||
list(APPEND EXTRA_CFLAGS ${KMSDRM_CFLAGS})
|
||||
|
||||
|
|
1097
externals/SDL/configure
vendored
1097
externals/SDL/configure
vendored
File diff suppressed because it is too large
Load diff
420
externals/SDL/configure.ac
vendored
420
externals/SDL/configure.ac
vendored
|
@ -1,6 +1,7 @@
|
|||
dnl Process this file with autoconf to produce a configure script.
|
||||
AC_INIT(README.txt)
|
||||
AC_CONFIG_HEADER(include/SDL_config.h)
|
||||
AC_INIT
|
||||
AC_CONFIG_SRCDIR(README.txt)
|
||||
AC_CONFIG_HEADERS(include/SDL_config.h)
|
||||
AC_CONFIG_AUX_DIR(build-scripts)
|
||||
AC_CONFIG_MACRO_DIR([acinclude])
|
||||
|
||||
|
@ -20,9 +21,9 @@ dnl Set various version strings - taken gratefully from the GTk sources
|
|||
#
|
||||
SDL_MAJOR_VERSION=2
|
||||
SDL_MINOR_VERSION=0
|
||||
SDL_MICRO_VERSION=12
|
||||
SDL_MICRO_VERSION=14
|
||||
SDL_INTERFACE_AGE=0
|
||||
SDL_BINARY_AGE=12
|
||||
SDL_BINARY_AGE=14
|
||||
SDL_VERSION=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION.$SDL_MICRO_VERSION
|
||||
|
||||
AC_SUBST(SDL_MAJOR_VERSION)
|
||||
|
@ -34,6 +35,7 @@ AC_SUBST(SDL_VERSION)
|
|||
|
||||
# libtool versioning
|
||||
LT_INIT([win32-dll])
|
||||
LT_LANG([Windows Resource])
|
||||
|
||||
LT_RELEASE=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION
|
||||
LT_CURRENT=`expr $SDL_MICRO_VERSION - $SDL_INTERFACE_AGE`
|
||||
|
@ -50,12 +52,10 @@ dnl Detect the canonical build and host environments
|
|||
dnl AC_CANONICAL_HOST
|
||||
|
||||
dnl Check for tools
|
||||
AC_PROG_LIBTOOL
|
||||
AC_PROG_CC
|
||||
AC_PROG_CXX
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_MAKE_SET
|
||||
AC_CHECK_TOOL(WINDRES, [windres], [:])
|
||||
PKG_PROG_PKG_CONFIG
|
||||
|
||||
dnl Make sure that srcdir is a full pathname
|
||||
|
@ -69,7 +69,17 @@ case "$host" in
|
|||
esac
|
||||
|
||||
dnl Set up the compiler and linker flags
|
||||
INCLUDE="-I$srcdir/include -idirafter $srcdir/src/video/khronos"
|
||||
INCLUDE="-I$srcdir/include"
|
||||
|
||||
dnl Don't use our khronos headers on QNX.
|
||||
case "$host" in
|
||||
*-*-nto-qnx*)
|
||||
;;
|
||||
*)
|
||||
INCLUDE="$INCLUDE -idirafter $srcdir/src/video/khronos"
|
||||
;;
|
||||
esac
|
||||
|
||||
if test x$srcdir != x.; then
|
||||
INCLUDE="-Iinclude $INCLUDE"
|
||||
elif test -d .hg; then
|
||||
|
@ -335,10 +345,10 @@ if test x$enable_libc = xyes; then
|
|||
AC_DEFINE(HAVE_MPROTECT, 1, [ ])
|
||||
]),
|
||||
)
|
||||
AC_CHECK_FUNCS(malloc calloc realloc free getenv setenv putenv unsetenv qsort abs bcopy memset memcpy memmove wcslen wcslcpy wcslcat wcsdup wcsstr wcscmp wcsncmp strlen strlcpy strlcat _strrev _strupr _strlwr strchr strrchr strstr strtok_r itoa _ltoa _uitoa _ultoa strtol strtoul _i64toa _ui64toa strtoll strtoull atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp vsscanf vsnprintf fopen64 fseeko fseeko64 sigaction setjmp nanosleep sysconf sysctlbyname getauxval poll _Exit)
|
||||
AC_CHECK_FUNCS(malloc calloc realloc free getenv setenv putenv unsetenv qsort abs bcopy memset memcpy memmove wcslen wcslcpy wcslcat wcsdup wcsstr wcscmp wcsncmp wcscasecmp _wcsicmp wcsncasecmp _wcsnicmp strlen strlcpy strlcat _strrev _strupr _strlwr strchr strrchr strstr strtok_r itoa _ltoa _uitoa _ultoa strtol strtoul _i64toa _ui64toa strtoll strtoull atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp vsscanf vsnprintf fopen64 fseeko fseeko64 sigaction setjmp nanosleep sysconf sysctlbyname getauxval elf_aux_info poll _Exit)
|
||||
|
||||
AC_CHECK_LIB(m, pow, [LIBS="$LIBS -lm"; EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lm"])
|
||||
AC_CHECK_FUNCS(acos acosf asin asinf atan atanf atan2 atan2f ceil ceilf copysign copysignf cos cosf exp expf fabs fabsf floor floorf fmod fmodf log logf log10 log10f pow powf scalbn scalbnf sin sinf sqrt sqrtf tan tanf)
|
||||
AC_CHECK_FUNCS(acos acosf asin asinf atan atanf atan2 atan2f ceil ceilf copysign copysignf cos cosf exp expf fabs fabsf floor floorf trunc truncf fmod fmodf log logf log10 log10f pow powf scalbn scalbnf sin sinf sqrt sqrtf tan tanf)
|
||||
|
||||
AC_CHECK_LIB(iconv, iconv_open, [LIBS="$LIBS -liconv"; EXTRA_LDFLAGS="$EXTRA_LDFLAGS -liconv"])
|
||||
AC_CHECK_FUNCS(iconv)
|
||||
|
@ -402,6 +412,7 @@ SOURCES="$SOURCES $srcdir/src/file/*.c"
|
|||
SOURCES="$SOURCES $srcdir/src/haptic/*.c"
|
||||
SOURCES="$SOURCES $srcdir/src/joystick/*.c"
|
||||
SOURCES="$SOURCES $srcdir/src/libm/*.c"
|
||||
SOURCES="$SOURCES $srcdir/src/misc/*.c"
|
||||
SOURCES="$SOURCES $srcdir/src/power/*.c"
|
||||
#SOURCES="$SOURCES $srcdir/src/filesystem/*.c"
|
||||
SOURCES="$SOURCES $srcdir/src/render/*.c"
|
||||
|
@ -412,6 +423,7 @@ SOURCES="$SOURCES $srcdir/src/thread/*.c"
|
|||
SOURCES="$SOURCES $srcdir/src/timer/*.c"
|
||||
SOURCES="$SOURCES $srcdir/src/video/*.c"
|
||||
SOURCES="$SOURCES $srcdir/src/video/yuv2rgb/*.c"
|
||||
SOURCES="$SOURCES $srcdir/src/locale/*.c"
|
||||
|
||||
dnl Enable/disable various subsystems of the SDL library
|
||||
|
||||
|
@ -1217,7 +1229,7 @@ AS_HELP_STRING([--enable-fusionsound], [use FusionSound audio driver [[default=n
|
|||
AC_DEFINE(SDL_AUDIO_DRIVER_FUSIONSOUND, 1, [ ])
|
||||
SOURCES="$SOURCES $srcdir/src/audio/fusionsound/*.c"
|
||||
EXTRA_CFLAGS="$EXTRA_CFLAGS $FUSIONSOUND_CFLAGS"
|
||||
|
||||
|
||||
AC_ARG_ENABLE(fusionsound-shared,
|
||||
AS_HELP_STRING([--enable-fusionsound-shared], [dynamically load fusionsound audio support [[default=yes]]]),
|
||||
, enable_fusionsound_shared=yes)
|
||||
|
@ -1237,7 +1249,7 @@ AS_HELP_STRING([--enable-fusionsound-shared], [dynamically load fusionsound audi
|
|||
SUMMARY_audio="${SUMMARY_audio} fusionsound"
|
||||
fi
|
||||
AC_MSG_RESULT($fusionsound_shared)
|
||||
|
||||
|
||||
have_audio=yes
|
||||
fi
|
||||
fi
|
||||
|
@ -1307,13 +1319,13 @@ dnl Check for ARM instruction support using gas syntax
|
|||
CheckARM()
|
||||
{
|
||||
AC_ARG_ENABLE(arm-simd,
|
||||
AC_HELP_STRING([--enable-arm-simd], [use SIMD assembly blitters on ARM [[default=yes]]]),
|
||||
enable_arm_simd=$enableval, enable_arm_simd=yes)
|
||||
AS_HELP_STRING([--enable-arm-simd], [use SIMD assembly blitters on ARM [[default=no]]]),
|
||||
enable_arm_simd=$enableval, enable_arm_simd=no)
|
||||
if test x$enable_video = xyes -a x$enable_assembly = xyes -a x$enable_arm_simd = xyes; then
|
||||
save_CFLAGS="$CFLAGS"
|
||||
have_arm_simd=no
|
||||
CFLAGS="-x assembler-with-cpp $CFLAGS"
|
||||
|
||||
|
||||
AC_MSG_CHECKING(for ARM SIMD)
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
||||
.text
|
||||
|
@ -1328,12 +1340,11 @@ AC_HELP_STRING([--enable-arm-simd], [use SIMD assembly blitters on ARM [[default
|
|||
uqadd8 r0, r0, r0
|
||||
]])], have_arm_simd=yes)
|
||||
AC_MSG_RESULT($have_arm_simd)
|
||||
|
||||
|
||||
CFLAGS="$save_CFLAGS"
|
||||
|
||||
|
||||
if test x$have_arm_simd = xyes; then
|
||||
AC_DEFINE(SDL_ARM_SIMD_BLITTERS)
|
||||
dnl SOURCES="$SOURCES $srcdir/src/video/arm/pixman-arm-simd*.c"
|
||||
AC_DEFINE(SDL_ARM_SIMD_BLITTERS, 1, [ ])
|
||||
SOURCES="$SOURCES $srcdir/src/video/arm/pixman-arm-simd*.S"
|
||||
WARN_ABOUT_ARM_SIMD_ASM_MIT="yes"
|
||||
fi
|
||||
|
@ -1344,13 +1355,13 @@ dnl Check for ARM NEON instruction support using gas syntax
|
|||
CheckNEON()
|
||||
{
|
||||
AC_ARG_ENABLE(arm-neon,
|
||||
AC_HELP_STRING([--enable-arm-neon], [use NEON assembly blitters on ARM [[default=no]]]),
|
||||
AS_HELP_STRING([--enable-arm-neon], [use NEON assembly blitters on ARM [[default=no]]]),
|
||||
enable_arm_neon=$enableval, enable_arm_neon=no)
|
||||
if test x$enable_video = xyes -a x$enable_assembly = xyes -a x$enable_arm_neon = xyes; then
|
||||
save_CFLAGS="$CFLAGS"
|
||||
have_arm_neon=no
|
||||
CFLAGS="-x assembler-with-cpp $CFLAGS"
|
||||
|
||||
|
||||
AC_MSG_CHECKING(for ARM NEON)
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
||||
.text
|
||||
|
@ -1367,12 +1378,10 @@ AC_HELP_STRING([--enable-arm-neon], [use NEON assembly blitters on ARM [[default
|
|||
vmovn.u16 d0, q0
|
||||
]])], have_arm_neon=yes)
|
||||
AC_MSG_RESULT($have_arm_neon)
|
||||
|
||||
CFLAGS="$save_CFLAGS"
|
||||
|
||||
|
||||
if test x$have_arm_neon = xyes; then
|
||||
AC_DEFINE(SDL_ARM_NEON_BLITTERS)
|
||||
dnl SOURCES="$SOURCES $srcdir/src/video/arm/pixman-arm-neon*.c"
|
||||
AC_DEFINE(SDL_ARM_NEON_BLITTERS, 1, [ ])
|
||||
SOURCES="$SOURCES $srcdir/src/video/arm/pixman-arm-neon*.S"
|
||||
WARN_ABOUT_ARM_NEON_ASM_MIT="yes"
|
||||
fi
|
||||
|
@ -1526,7 +1535,7 @@ AS_HELP_STRING([--enable-video-wayland-qt-touch], [QtWayland server support for
|
|||
video_wayland=no
|
||||
if test x$video_opengl_egl = xyes && \
|
||||
test x$video_opengles_v2 = xyes; then
|
||||
if $PKG_CONFIG --exists wayland-client wayland-scanner wayland-protocols wayland-egl wayland-cursor egl xkbcommon ; then
|
||||
if $PKG_CONFIG --exists wayland-client wayland-scanner wayland-egl wayland-cursor egl xkbcommon ; then
|
||||
WAYLAND_CFLAGS=`$PKG_CONFIG --cflags wayland-client wayland-egl wayland-cursor xkbcommon`
|
||||
WAYLAND_LIBS=`$PKG_CONFIG --libs wayland-client wayland-egl wayland-cursor xkbcommon`
|
||||
WAYLAND_SCANNER=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`
|
||||
|
@ -1595,7 +1604,6 @@ AS_HELP_STRING([--enable-wayland-shared], [dynamically load Wayland support [[de
|
|||
fi
|
||||
}
|
||||
|
||||
|
||||
dnl Check for Native Client stuff
|
||||
CheckNativeClient()
|
||||
{
|
||||
|
@ -1622,7 +1630,6 @@ CheckNativeClient()
|
|||
])
|
||||
}
|
||||
|
||||
|
||||
CheckRPI()
|
||||
{
|
||||
AC_ARG_ENABLE(video-rpi,
|
||||
|
@ -1661,7 +1668,7 @@ AS_HELP_STRING([--enable-video-rpi], [use Raspberry Pi video driver [[default=ye
|
|||
|
||||
# Restore the compiler flags and libraries
|
||||
CFLAGS="$ac_save_cflags"; LIBS="$ac_save_libs"
|
||||
|
||||
|
||||
if test x$have_video_rpi = xyes; then
|
||||
CFLAGS="$CFLAGS $RPI_CFLAGS"
|
||||
SDL_CFLAGS="$SDL_CFLAGS $RPI_CFLAGS"
|
||||
|
@ -1927,7 +1934,7 @@ int event_type = XI_TouchBegin;
|
|||
XITouchClassInfo *t;
|
||||
],[
|
||||
have_xinput2_multitouch=yes
|
||||
AC_DEFINE([SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH], 1, [])
|
||||
AC_DEFINE([SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH], 1, [ ])
|
||||
SUMMARY_video_x11="${SUMMARY_video_x11} xinput2_multitouch"
|
||||
])
|
||||
AC_MSG_RESULT($have_xinput2_multitouch)
|
||||
|
@ -2129,7 +2136,7 @@ AS_HELP_STRING([--enable-video-cocoa], [use Cocoa video driver [[default=yes]]])
|
|||
CheckMETAL()
|
||||
{
|
||||
AC_ARG_ENABLE(video-metal,
|
||||
AC_HELP_STRING([--enable-video-metal], [include Metal support [[default=yes]]]),
|
||||
AS_HELP_STRING([--enable-video-metal], [include Metal support [[default=yes]]]),
|
||||
, enable_video_metal=yes)
|
||||
AC_ARG_ENABLE(render-metal,
|
||||
AS_HELP_STRING([--enable-render-metal], [enable the Metal render driver [[default=yes]]]),
|
||||
|
@ -2145,7 +2152,7 @@ AS_HELP_STRING([--enable-render-metal], [enable the Metal render driver [[defaul
|
|||
#import <Metal/Metal.h>
|
||||
#import <QuartzCore/CAMetalLayer.h>
|
||||
|
||||
#if !TARGET_CPU_X86_64
|
||||
#if TARGET_CPU_X86
|
||||
#error Metal doesn't work on this configuration
|
||||
#endif
|
||||
],[
|
||||
|
@ -2168,7 +2175,6 @@ AS_HELP_STRING([--enable-render-metal], [enable the Metal render driver [[defaul
|
|||
fi
|
||||
}
|
||||
|
||||
|
||||
dnl Find DirectFB
|
||||
CheckDirectFB()
|
||||
{
|
||||
|
@ -2233,8 +2239,8 @@ AS_HELP_STRING([--enable-video-kmsdrm], [use KMSDRM video driver [[default=no]]]
|
|||
if test x$enable_video = xyes -a x$enable_video_kmsdrm = xyes; then
|
||||
video_kmsdrm=no
|
||||
|
||||
PKG_CHECK_MODULES([LIBDRM], [libdrm >= 2.4.46], libdrm_avail=yes, libdrm_avail=no)
|
||||
PKG_CHECK_MODULES([LIBGBM], [gbm >= 9.0.0], libgbm_avail=yes, libgbm_avail=no)
|
||||
PKG_CHECK_MODULES([LIBDRM], [libdrm >= 1.4.82], libdrm_avail=yes, libdrm_avail=no)
|
||||
PKG_CHECK_MODULES([LIBGBM], [gbm >= 11.1.0], libgbm_avail=yes, libgbm_avail=no)
|
||||
|
||||
if test x$libdrm_avail = xyes -a x$libgbm_avail = xyes; then
|
||||
video_kmsdrm=yes
|
||||
|
@ -2247,6 +2253,7 @@ AS_HELP_STRING([--enable-kmsdrm-shared], [dynamically load kmsdrm support [[defa
|
|||
|
||||
AC_DEFINE(SDL_VIDEO_DRIVER_KMSDRM, 1, [ ])
|
||||
SOURCES="$SOURCES $srcdir/src/video/kmsdrm/*.c"
|
||||
SOURCES="$SOURCES $srcdir/src/video/kmsdrm_legacy/*.c"
|
||||
EXTRA_CFLAGS="$EXTRA_CFLAGS $LIBDRM_CFLAGS $LIBGBM_CFLAGS"
|
||||
|
||||
AC_MSG_CHECKING(for kmsdrm dynamic loading support)
|
||||
|
@ -2361,6 +2368,7 @@ CheckOpenGLESX11()
|
|||
#define LINUX
|
||||
#define EGL_API_FB
|
||||
#define MESA_EGL_NO_X11_HEADERS
|
||||
#define EGL_NO_X11
|
||||
#include <EGL/egl.h>
|
||||
#include <EGL/eglext.h>
|
||||
],[
|
||||
|
@ -2371,7 +2379,7 @@ CheckOpenGLESX11()
|
|||
if test x$video_opengl_egl = xyes; then
|
||||
AC_DEFINE(SDL_VIDEO_OPENGL_EGL, 1, [ ])
|
||||
fi
|
||||
|
||||
|
||||
if test x$enable_video_opengles1 = xyes; then
|
||||
AC_MSG_CHECKING(for OpenGL ES v1 headers)
|
||||
video_opengles_v1=no
|
||||
|
@ -2389,7 +2397,7 @@ CheckOpenGLESX11()
|
|||
SUMMARY_video="${SUMMARY_video} opengl_es1"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
if test x$enable_video_opengles2 = xyes; then
|
||||
AC_MSG_CHECKING(for OpenGL ES v2 headers)
|
||||
video_opengles_v2=no
|
||||
|
@ -2440,7 +2448,7 @@ CheckWINDOWSGLES()
|
|||
AC_DEFINE(SDL_VIDEO_OPENGL_EGL, 1, [ ])
|
||||
SUMMARY_video="${SUMMARY_video} opengl_es1"
|
||||
fi
|
||||
|
||||
|
||||
AC_MSG_CHECKING(for OpenGL ES v2 headers)
|
||||
video_opengles_v2=no
|
||||
AC_TRY_COMPILE([
|
||||
|
@ -2560,7 +2568,7 @@ CheckVulkan()
|
|||
#include <Metal/Metal.h>
|
||||
#include <QuartzCore/CAMetalLayer.h>
|
||||
|
||||
#if !TARGET_CPU_X86_64
|
||||
#if TARGET_CPU_X86
|
||||
#error Vulkan doesn't work on this configuration
|
||||
#endif
|
||||
],[
|
||||
|
@ -2630,6 +2638,27 @@ CheckInputKD()
|
|||
fi
|
||||
}
|
||||
|
||||
dnl See if we can use the FreeBSD kernel kbio.h header
|
||||
CheckInputKBIO()
|
||||
{
|
||||
AC_MSG_CHECKING(for FreeBSD kbio.h)
|
||||
use_input_kbio=no
|
||||
AC_TRY_COMPILE([
|
||||
#include <sys/kbio.h>
|
||||
#include <sys/ioctl.h>
|
||||
],[
|
||||
accentmap_t accTable;
|
||||
ioctl(0, KDENABIO, 1);
|
||||
],[
|
||||
use_input_kbio=yes
|
||||
])
|
||||
AC_MSG_RESULT($use_input_kbio)
|
||||
if test x$use_input_kbio = xyes; then
|
||||
AC_DEFINE(SDL_INPUT_FBSDKBIO, 1, [ ])
|
||||
SUMMARY_input="${SUMMARY_input} fbsdkbio"
|
||||
fi
|
||||
}
|
||||
|
||||
dnl See if the platform offers libudev for device enumeration and hotplugging.
|
||||
CheckLibUDev()
|
||||
{
|
||||
|
@ -2686,6 +2715,28 @@ AS_HELP_STRING([--enable-ime], [enable IME support [[default=yes]]]),
|
|||
fi
|
||||
}
|
||||
|
||||
dnl Check inotify presense
|
||||
CheckInotify()
|
||||
{
|
||||
save_LIBS="$LIBS"
|
||||
case "$host" in
|
||||
*-*-freebsd*) LIBS="$LIBS -linotify"
|
||||
;;
|
||||
esac
|
||||
AC_CHECK_HEADERS(sys/inotify.h, [have_inotify_inotify_h_hdr=yes])
|
||||
AC_CHECK_FUNCS(inotify_init, [have_inotify=yes])
|
||||
AC_CHECK_FUNCS(inotify_init1)
|
||||
if test x$have_inotify_inotify_h_hdr = xyes -a x$have_inotify = xyes; then
|
||||
AC_DEFINE(HAVE_INOTIFY, 1, [ ])
|
||||
case "$host" in
|
||||
*-*-freebsd*)
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -linotify"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
LIBS="$save_LIBS"
|
||||
}
|
||||
|
||||
dnl See if the platform has libibus IME support.
|
||||
CheckIBus()
|
||||
{
|
||||
|
@ -2699,9 +2750,6 @@ AS_HELP_STRING([--enable-ibus], [enable IBus support [[default=yes]]]),
|
|||
AC_CHECK_HEADER(ibus-1.0/ibus.h,
|
||||
have_ibus_ibus_h_hdr=yes,
|
||||
have_ibus_ibus_h_hdr=no)
|
||||
AC_CHECK_HEADER(sys/inotify.h,
|
||||
have_inotify_inotify_h_hdr=yes,
|
||||
have_inotify_inotify_h_hdr=no)
|
||||
CFLAGS="$save_CFLAGS"
|
||||
if test x$have_ibus_ibus_h_hdr = xyes; then
|
||||
if test x$enable_ime != xyes; then
|
||||
|
@ -2729,48 +2777,58 @@ CheckFcitx()
|
|||
AS_HELP_STRING([--enable-fcitx], [enable fcitx support [[default=yes]]]),
|
||||
, enable_fcitx=yes)
|
||||
if test x$enable_fcitx = xyes; then
|
||||
PKG_CHECK_MODULES([FCITX], [fcitx], have_fcitx=yes, have_fcitx=no)
|
||||
CFLAGS="$CFLAGS $FCITX_CFLAGS"
|
||||
AC_CHECK_HEADER(fcitx/frontend.h,
|
||||
have_fcitx_frontend_h_hdr=yes,
|
||||
have_fcitx_frontend_h_hdr=no)
|
||||
CFLAGS="$save_CFLAGS"
|
||||
if test x$have_fcitx_frontend_h_hdr = xyes; then
|
||||
if test x$enable_ime != xyes; then
|
||||
AC_MSG_WARN([IME support is required for fcitx.])
|
||||
have_fcitx_frontend_h_hdr=no
|
||||
elif test x$enable_dbus != xyes; then
|
||||
AC_MSG_WARN([DBus support is required for fcitx.])
|
||||
have_fcitx_frontend_h_hdr=no
|
||||
else
|
||||
AC_DEFINE(HAVE_FCITX_FRONTEND_H, 1, [ ])
|
||||
EXTRA_CFLAGS="$EXTRA_CFLAGS $FCITX_CFLAGS"
|
||||
SOURCES="$SOURCES $srcdir/src/core/linux/SDL_fcitx.c"
|
||||
fi
|
||||
AC_MSG_CHECKING(for fcitx support)
|
||||
have_fcitx=no
|
||||
if test x$enable_ime != xyes; then
|
||||
AC_MSG_WARN([IME support is required for fcitx.])
|
||||
elif test x$have_dbus_dbus_h_hdr != xyes; then
|
||||
AC_MSG_WARN([DBus support is required for fcitx.])
|
||||
else
|
||||
have_fcitx=yes
|
||||
AC_DEFINE(HAVE_FCITX, 1, [ ])
|
||||
SOURCES="$SOURCES $srcdir/src/core/linux/SDL_fcitx.c"
|
||||
fi
|
||||
AC_MSG_RESULT($have_fcitx)
|
||||
fi
|
||||
}
|
||||
|
||||
dnl See if we can use the Touchscreen input library
|
||||
CheckTslib()
|
||||
dnl Check to see if GameController framework support is desired
|
||||
CheckJoystickMFI()
|
||||
{
|
||||
AC_ARG_ENABLE(input-tslib,
|
||||
AS_HELP_STRING([--enable-input-tslib], [use the Touchscreen library for input [[default=yes]]]),
|
||||
, enable_input_tslib=yes)
|
||||
if test x$enable_input_tslib = xyes; then
|
||||
AC_MSG_CHECKING(for Touchscreen library support)
|
||||
enable_input_tslib=no
|
||||
AC_TRY_COMPILE([
|
||||
#include "tslib.h"
|
||||
AC_ARG_ENABLE(joystick-mfi,
|
||||
AS_HELP_STRING([--enable-joystick-mfi], [include macOS MFI joystick support [[default=yes]]]),
|
||||
, enable_joystick_mfi=yes)
|
||||
|
||||
if test x$enable_joystick_mfi = xyes; then
|
||||
save_CFLAGS="$CFLAGS"
|
||||
save_LDFLAGS="$LDFLAGS"
|
||||
dnl Work around that we don't have Objective-C support in autoconf
|
||||
CFLAGS="$CFLAGS -x objective-c -fobjc-weak"
|
||||
LDFLAGS="$LDFLAGS -Wl,-weak_framework,CoreHaptics -Wl,-weak_framework,GameController"
|
||||
AC_MSG_CHECKING(for GameController framework)
|
||||
enable_joystick_mfi=no
|
||||
AC_TRY_LINK([
|
||||
#include <AvailabilityMacros.h>
|
||||
#include <TargetConditionals.h>
|
||||
#import <GameController/GameController.h>
|
||||
],[
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED < 1080
|
||||
#error GameController framework doesn't work on this configuration
|
||||
#endif
|
||||
#if TARGET_CPU_X86
|
||||
#error GameController framework doesn't work on this configuration
|
||||
#endif
|
||||
],[
|
||||
enable_input_tslib=yes
|
||||
enable_joystick_mfi=yes
|
||||
])
|
||||
AC_MSG_RESULT($enable_input_tslib)
|
||||
if test x$enable_input_tslib = xyes; then
|
||||
AC_DEFINE(SDL_INPUT_TSLIB, 1, [ ])
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lts"
|
||||
SUMMARY_input="${SUMMARY_input} ts"
|
||||
CFLAGS="$save_CFLAGS"
|
||||
LDFLAGS="$save_LDFLAGS"
|
||||
|
||||
AC_MSG_RESULT($enable_joystick_mfi)
|
||||
if test x$enable_joystick_mfi = xyes; then
|
||||
AC_DEFINE(SDL_JOYSTICK_MFI, 1, [ ])
|
||||
EXTRA_CFLAGS="$EXTRA_CFLAGS -fobjc-weak -Wno-unused-command-line-argument"
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-weak_framework,CoreHaptics -Wl,-weak_framework,GameController"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
@ -3094,11 +3152,11 @@ XINPUT_STATE_EX s1;
|
|||
|
||||
AC_CHECK_HEADER(mmdeviceapi.h, have_wasapi=yes)
|
||||
if test x$have_wasapi = xyes; then
|
||||
AC_DEFINE(HAVE_MMDEVICEAPI_H,1,[])
|
||||
AC_DEFINE(HAVE_MMDEVICEAPI_H, 1, [ ])
|
||||
fi
|
||||
AC_CHECK_HEADER(audioclient.h,,have_wasapi=no)
|
||||
if test x$have_wasapi = xyes; then
|
||||
AC_DEFINE(HAVE_AUDIOCLIENT_H,1,[])
|
||||
AC_DEFINE(HAVE_AUDIOCLIENT_H, 1, [ ])
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(wasapi,
|
||||
|
@ -3140,7 +3198,7 @@ dnl Check for the usbhid(3) library on *BSD
|
|||
CheckUSBHID()
|
||||
{
|
||||
case "$host" in
|
||||
*-*-*bsd*)
|
||||
*-*-*bsd*|*-*-dragonfly*)
|
||||
if test x$enable_joystick = xyes; then
|
||||
AC_CHECK_LIB(usbhid, hid_init, have_libusbhid=yes)
|
||||
if test x$have_libusbhid = xyes; then
|
||||
|
@ -3152,7 +3210,7 @@ CheckUSBHID()
|
|||
AC_CHECK_HEADER(libusb.h, [USB_CFLAGS="-DHAVE_LIBUSB_H"])
|
||||
AC_CHECK_LIB(usb, hid_init, [USB_LIBS="$USB_LIBS -lusb"])
|
||||
fi
|
||||
|
||||
|
||||
save_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS $USB_CFLAGS"
|
||||
|
||||
|
@ -3164,8 +3222,8 @@ CheckUSBHID()
|
|||
#include <usb.h>
|
||||
#endif
|
||||
#ifdef __DragonFly__
|
||||
# include <bus/usb/usb.h>
|
||||
# include <bus/usb/usbhid.h>
|
||||
# include <bus/u4b/usb.h>
|
||||
# include <bus/u4b/usbhid.h>
|
||||
#else
|
||||
# include <dev/usb/usb.h>
|
||||
# include <dev/usb/usbhid.h>
|
||||
|
@ -3195,8 +3253,8 @@ CheckUSBHID()
|
|||
#include <usb.h>
|
||||
#endif
|
||||
#ifdef __DragonFly__
|
||||
# include <bus/usb/usb.h>
|
||||
# include <bus/usb/usbhid.h>
|
||||
# include <bus/u4b/usb.h>
|
||||
# include <bus/u4b/usbhid.h>
|
||||
#else
|
||||
# include <dev/usb/usb.h>
|
||||
# include <dev/usb/usbhid.h>
|
||||
|
@ -3218,7 +3276,7 @@ CheckUSBHID()
|
|||
USB_CFLAGS="$USB_CFLAGS -DUSBHID_UCR_DATA"
|
||||
fi
|
||||
AC_MSG_RESULT($have_usbhid_ucr_data)
|
||||
|
||||
|
||||
AC_MSG_CHECKING(for new usbhid API)
|
||||
have_usbhid_new=no
|
||||
AC_TRY_COMPILE([
|
||||
|
@ -3227,8 +3285,8 @@ CheckUSBHID()
|
|||
#include <usb.h>
|
||||
#endif
|
||||
#ifdef __DragonFly__
|
||||
#include <bus/usb/usb.h>
|
||||
#include <bus/usb/usbhid.h>
|
||||
#include <bus/u4b/usb.h>
|
||||
#include <bus/u4b/usbhid.h>
|
||||
#else
|
||||
#include <dev/usb/usb.h>
|
||||
#include <dev/usb/usbhid.h>
|
||||
|
@ -3280,50 +3338,54 @@ CheckUSBHID()
|
|||
dnl Check for HIDAPI joystick drivers
|
||||
CheckHIDAPI()
|
||||
{
|
||||
# The hidraw support doesn't catch Xbox, PS4 and Nintendo controllers,
|
||||
# so we'll just use libusb when it's available.
|
||||
case "$host" in
|
||||
# libusb does not support iOS
|
||||
arm*-apple-darwin* | *-ios-* )
|
||||
skiplibusb=yes
|
||||
;;
|
||||
# On the other hand, *BSD specifically uses libusb only
|
||||
*-*-*bsd* )
|
||||
onlylibusb=yes
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_ARG_ENABLE(hidapi,
|
||||
AS_HELP_STRING([--enable-hidapi], [use HIDAPI for low level joystick drivers [[default=no]]]),
|
||||
, enable_hidapi=no)
|
||||
AS_HELP_STRING([--enable-hidapi], [use HIDAPI for low level joystick drivers [[default=yes]]]),
|
||||
, enable_hidapi=yes)
|
||||
AC_ARG_ENABLE(hidapi-libusb,
|
||||
AS_HELP_STRING([--enable-hidapi-libusb], [use libusb for low level joystick drivers [[default=maybe]]]),
|
||||
, enable_hidapi_libusb=maybe)
|
||||
|
||||
if test x$enable_joystick = xyes -a x$enable_hidapi = xyes; then
|
||||
if test x$skiplibusb = xyes; then
|
||||
hidapi_support=yes
|
||||
else
|
||||
case "$host" in
|
||||
# libusb does not support iOS
|
||||
*-ios-* )
|
||||
enable_hidapi_libusb=no
|
||||
;;
|
||||
# On the other hand, *BSD specifically uses libusb only
|
||||
*-*-*bsd* )
|
||||
enable_hidapi_libusb=yes
|
||||
require_hidapi_libusb=yes
|
||||
;;
|
||||
# RAWINPUT is only available on Win32, but can be enabled if HIDAPI is
|
||||
*-*-cygwin* | *-*-mingw32*)
|
||||
enable_joystick_rawinput=yes
|
||||
;;
|
||||
esac
|
||||
|
||||
hidapi_support=yes
|
||||
if test x$enable_hidapi_libusb = xyes; then
|
||||
PKG_CHECK_MODULES([LIBUSB], [libusb-1.0], have_libusb=yes, have_libusb=no)
|
||||
save_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$save_CFLAGS $LIBUSB_CFLAGS"
|
||||
AC_CHECK_HEADER(libusb.h, have_libusb_h=yes)
|
||||
CFLAGS="$save_CFLAGS"
|
||||
if test x$have_libusb_h = xyes; then
|
||||
hidapi_support=yes
|
||||
elif test x$onlylibusb = xyes; then
|
||||
if test x$have_libusb_h = xno && test x$require_hidapi_libusb = xyes; then
|
||||
hidapi_support=no
|
||||
else
|
||||
hidapi_support=yes
|
||||
fi
|
||||
fi
|
||||
|
||||
if test x$hidapi_support = xyes; then
|
||||
AC_DEFINE(SDL_JOYSTICK_HIDAPI, 1, [ ])
|
||||
if test x$enable_joystick_rawinput = xyes; then
|
||||
AC_DEFINE(SDL_JOYSTICK_RAWINPUT, 1, [ ])
|
||||
fi
|
||||
EXTRA_CFLAGS="$EXTRA_CFLAGS -I$srcdir/src/hidapi/hidapi"
|
||||
SOURCES="$SOURCES $srcdir/src/joystick/hidapi/*.c"
|
||||
SOURCES="$SOURCES $srcdir/src/hidapi/SDL_hidapi.c"
|
||||
|
||||
if test x$have_libusb_h = xyes; then
|
||||
EXTRA_CFLAGS="$EXTRA_CFLAGS $LIBUSB_CFLAGS"
|
||||
if test x$onlylibusb = xyes; then
|
||||
SOURCES="$SOURCES $srcdir/src/hidapi/libusb/hid.c"
|
||||
if test x$require_hidapi_libusb = xyes; then
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS $LIBUSB_LIBS"
|
||||
else
|
||||
if test x$have_loadso != xyes; then
|
||||
|
@ -3410,7 +3472,18 @@ AS_HELP_STRING([--enable-foregrounding-signal], [number to use for magic foregro
|
|||
fi
|
||||
}
|
||||
|
||||
|
||||
dnl Set up the Virtual joystick driver.
|
||||
CheckVirtualJoystick()
|
||||
{
|
||||
AC_ARG_ENABLE(joystick-virtual,
|
||||
AS_HELP_STRING([--enable-joystick-virtual], [enable virtual joystick APIs [[default=yes]]]),
|
||||
, enable_joystick_virtual=yes)
|
||||
if test x$enable_joystick = xyes -a x$enable_joystick_virtual = xyes; then
|
||||
AC_DEFINE(SDL_JOYSTICK_VIRTUAL, 1, [ ])
|
||||
SOURCES="$SOURCES $srcdir/src/joystick/virtual/*.c"
|
||||
have_joystick_virtual=yes
|
||||
fi
|
||||
}
|
||||
|
||||
dnl Do this on all platforms, before everything else (other things might want to override it).
|
||||
CheckWarnAll
|
||||
|
@ -3419,6 +3492,8 @@ CheckNoStrictAliasing
|
|||
dnl Do this for every platform, but for some it doesn't mean anything, but better to catch it here anyhow.
|
||||
CheckEventSignals
|
||||
|
||||
have_locale=no
|
||||
|
||||
dnl Set up the configuration based on the host platform!
|
||||
case "$host" in
|
||||
*-*-linux*|*-*-uclinux*|*-*-gnu*|*-*-k*bsd*-gnu|*-*-bsdi*|*-*-freebsd*|*-*-dragonfly*|*-*-netbsd*|*-*-openbsd*|*-*-sysv5*|*-*-solaris*|*-*-hpux*|*-*-aix*|*-*-minix*|*-*-nto*)
|
||||
|
@ -3432,11 +3507,9 @@ case "$host" in
|
|||
EXTRA_CFLAGS="$EXTRA_CFLAGS $ANDROID_CFLAGS"
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -ldl -lGLESv1_CM -lGLESv2 -llog -landroid"
|
||||
SDLMAIN_SOURCES="$srcdir/src/main/android/*.c"
|
||||
|
||||
if test x$enable_video = xyes; then
|
||||
SOURCES="$SOURCES $srcdir/src/core/android/*.c $srcdir/src/video/android/*.c"
|
||||
# FIXME: confdefs? Not AC_DEFINE?
|
||||
$as_echo "#define SDL_VIDEO_DRIVER_ANDROID 1" >>confdefs.h
|
||||
AC_DEFINE(SDL_VIDEO_DRIVER_ANDROID, 1, [ ])
|
||||
SUMMARY_video="${SUMMARY_video} android"
|
||||
fi
|
||||
;;
|
||||
|
@ -3491,14 +3564,17 @@ case "$host" in
|
|||
CheckLibUDev
|
||||
CheckDBus
|
||||
CheckIME
|
||||
CheckInotify
|
||||
CheckIBus
|
||||
CheckFcitx
|
||||
case $ARCH in
|
||||
linux)
|
||||
CheckInputKD
|
||||
;;
|
||||
freebsd)
|
||||
CheckInputKBIO
|
||||
;;
|
||||
esac
|
||||
CheckTslib
|
||||
CheckUSBHID
|
||||
CheckHIDAPI
|
||||
CheckPTHREAD
|
||||
|
@ -3507,6 +3583,12 @@ case "$host" in
|
|||
CheckRPATH
|
||||
CheckVivanteVideo
|
||||
|
||||
SOURCES="$SOURCES $srcdir/src/misc/unix/*.c"
|
||||
have_misc=yes
|
||||
|
||||
SOURCES="$SOURCES $srcdir/src/locale/unix/*.c"
|
||||
have_locale=yes
|
||||
|
||||
# Set up files for the audio library
|
||||
if test x$enable_audio = xyes; then
|
||||
case $ARCH in
|
||||
|
@ -3548,6 +3630,14 @@ case "$host" in
|
|||
SOURCES="$SOURCES $srcdir/src/joystick/steam/*.c"
|
||||
have_joystick=yes
|
||||
;;
|
||||
freebsd)
|
||||
if test x$use_input_events = xyes; then
|
||||
AC_DEFINE(SDL_JOYSTICK_LINUX, 1, [ ])
|
||||
SOURCES="$SOURCES $srcdir/src/joystick/linux/*.c"
|
||||
SOURCES="$SOURCES $srcdir/src/joystick/steam/*.c"
|
||||
have_joystick=yes
|
||||
fi
|
||||
;;
|
||||
android)
|
||||
AC_DEFINE(SDL_JOYSTICK_ANDROID, 1, [ ])
|
||||
SOURCES="$SOURCES $srcdir/src/joystick/android/*.c"
|
||||
|
@ -3559,7 +3649,7 @@ case "$host" in
|
|||
# Set up files for the haptic library
|
||||
if test x$enable_haptic = xyes; then
|
||||
case $ARCH in
|
||||
linux)
|
||||
linux|freebsd)
|
||||
if test x$use_input_events = xyes; then
|
||||
AC_DEFINE(SDL_HAPTIC_LINUX, 1, [ ])
|
||||
SOURCES="$SOURCES $srcdir/src/haptic/linux/*.c"
|
||||
|
@ -3625,9 +3715,12 @@ case "$host" in
|
|||
fi
|
||||
# Set up files for evdev input
|
||||
if test x$use_input_events = xyes; then
|
||||
SOURCES="$SOURCES $srcdir/src/core/linux/SDL_evdev*.c"
|
||||
fi
|
||||
SOURCES="$SOURCES $srcdir/src/core/linux/SDL_evdev.c"
|
||||
SOURCES="$SOURCES $srcdir/src/core/linux/SDL_evdev_kbd.c"
|
||||
SOURCES="$SOURCES $srcdir/src/core/freebsd/SDL_evdev_kbd_freebsd.c"
|
||||
fi
|
||||
# Set up other core UNIX files
|
||||
SOURCES="$SOURCES $srcdir/src/core/linux/SDL_evdev_capabilities.c"
|
||||
SOURCES="$SOURCES $srcdir/src/core/linux/SDL_threadprio.c"
|
||||
SOURCES="$SOURCES $srcdir/src/core/unix/*.c"
|
||||
;;
|
||||
|
@ -3656,6 +3749,13 @@ case "$host" in
|
|||
# Set up the core platform files
|
||||
SOURCES="$SOURCES $srcdir/src/core/windows/*.c"
|
||||
|
||||
SOURCES="$SOURCES $srcdir/src/misc/windows/*.c"
|
||||
have_misc=yes
|
||||
|
||||
# Use the Windows locale APIs.
|
||||
SOURCES="$SOURCES $srcdir/src/locale/windows/*.c"
|
||||
have_locale=yes
|
||||
|
||||
# Set up files for the video library
|
||||
if test x$enable_video = xyes; then
|
||||
AC_DEFINE(SDL_VIDEO_DRIVER_WINDOWS, 1, [ ])
|
||||
|
@ -3718,11 +3818,23 @@ AS_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
|
|||
have_haptic=yes
|
||||
fi
|
||||
fi
|
||||
# Set up files for the sensor library
|
||||
AC_CHECK_HEADER(sensorsapi.h,have_winsensors=yes,have_winsensors=no)
|
||||
if test x$have_winsensors = xyes; then
|
||||
AC_DEFINE(HAVE_SENSORSAPI_H, 1, [ ])
|
||||
fi
|
||||
if test x$enable_sensor = xyes -a x$have_winsensors = xyes; then
|
||||
AC_DEFINE(SDL_SENSOR_WINDOWS, 1, [ ])
|
||||
SOURCES="$SOURCES $srcdir/src/sensor/windows/*.c"
|
||||
have_sensor=yes
|
||||
fi
|
||||
# Set up files for the power library
|
||||
if test x$enable_power = xyes; then
|
||||
AC_DEFINE(SDL_POWER_WINDOWS, 1, [ ])
|
||||
SOURCES="$SOURCES $srcdir/src/power/windows/SDL_syspower.c"
|
||||
have_power=yes
|
||||
fi
|
||||
# Set up files for the filesystem library
|
||||
if test x$enable_filesystem = xyes; then
|
||||
AC_DEFINE(SDL_FILESYSTEM_WINDOWS, 1, [ ])
|
||||
SOURCES="$SOURCES $srcdir/src/filesystem/windows/SDL_sysfilesystem.c"
|
||||
|
@ -3819,6 +3931,14 @@ AS_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
|
|||
SOURCES="$SOURCES $srcdir/src/filesystem/haiku/*.cc"
|
||||
have_filesystem=yes
|
||||
fi
|
||||
|
||||
SOURCES="$SOURCES $srcdir/src/misc/haiku/*.cc"
|
||||
have_misc=yes
|
||||
|
||||
# Set up files for the locale library
|
||||
SOURCES="$SOURCES $srcdir/src/locale/haiku/*.cc"
|
||||
have_locale=yes
|
||||
|
||||
# The Haiku platform requires special setup.
|
||||
SOURCES="$srcdir/src/main/haiku/*.cc $SOURCES"
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lroot -lbe -lmedia -lgame -ldevice -ltextencoding"
|
||||
|
@ -3826,7 +3946,7 @@ AS_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
|
|||
# other spins, like x86-64, use a more standard "libstdc++.so.*"
|
||||
AC_CHECK_FILE("/boot/system/lib/libstdc++.r4.so", EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lstdc++.r4", EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lstdc++")
|
||||
;;
|
||||
arm*-apple-darwin*|*-ios-*)
|
||||
*-ios-*)
|
||||
ARCH=ios
|
||||
|
||||
CheckVisibilityHidden
|
||||
|
@ -3839,6 +3959,13 @@ AS_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
|
|||
CheckVulkan
|
||||
CheckPTHREAD
|
||||
|
||||
SOURCES="$SOURCES $srcdir/src/misc/ios/*.m"
|
||||
have_misc=yes
|
||||
|
||||
# Set up files for the locale library
|
||||
SOURCES="$SOURCES $srcdir/src/locale/macosx/*.m"
|
||||
have_locale=yes
|
||||
|
||||
# Set up files for the audio library
|
||||
if test x$enable_audio = xyes; then
|
||||
AC_DEFINE(SDL_AUDIO_DRIVER_COREAUDIO, 1, [ ])
|
||||
|
@ -3852,6 +3979,9 @@ AS_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
|
|||
SOURCES="$SOURCES $srcdir/src/joystick/iphoneos/*.m"
|
||||
SOURCES="$SOURCES $srcdir/src/joystick/steam/*.c"
|
||||
have_joystick=yes
|
||||
else
|
||||
# Need this code for accelerometer as joystick support
|
||||
SOURCES="$SOURCES $srcdir/src/joystick/iphoneos/*.m"
|
||||
fi
|
||||
# Set up files for the haptic library
|
||||
#if test x$enable_haptic = xyes; then
|
||||
|
@ -3938,6 +4068,13 @@ AS_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
|
|||
CheckPTHREAD
|
||||
CheckHIDAPI
|
||||
|
||||
SOURCES="$SOURCES $srcdir/src/misc/macosx/*.m"
|
||||
have_misc=yes
|
||||
|
||||
# Set up files for the locale library
|
||||
SOURCES="$SOURCES $srcdir/src/locale/macosx/*.m"
|
||||
have_locale=yes
|
||||
|
||||
# Set up files for the audio library
|
||||
if test x$enable_audio = xyes; then
|
||||
AC_DEFINE(SDL_AUDIO_DRIVER_COREAUDIO, 1, [ ])
|
||||
|
@ -3950,6 +4087,8 @@ AS_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
|
|||
if test x$enable_joystick = xyes; then
|
||||
AC_DEFINE(SDL_JOYSTICK_IOKIT, 1, [ ])
|
||||
SOURCES="$SOURCES $srcdir/src/joystick/darwin/*.c"
|
||||
SOURCES="$SOURCES $srcdir/src/joystick/iphoneos/*.m"
|
||||
CheckJoystickMFI
|
||||
have_joystick=yes
|
||||
fi
|
||||
# Set up files for the haptic library
|
||||
|
@ -4008,7 +4147,7 @@ AS_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
|
|||
SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
|
||||
have_timers=yes
|
||||
fi
|
||||
|
||||
|
||||
if test x$enable_filesystem = xyes; then
|
||||
AC_DEFINE(SDL_FILESYSTEM_NACL, 1, [ ])
|
||||
SOURCES="$SOURCES $srcdir/src/filesystem/nacl/*.c"
|
||||
|
@ -4045,7 +4184,7 @@ AS_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
|
|||
SOURCES="$SOURCES $srcdir/src/power/emscripten/*.c"
|
||||
have_power=yes
|
||||
fi
|
||||
|
||||
|
||||
# Set up files for the power library
|
||||
if test x$enable_joystick = xyes; then
|
||||
AC_DEFINE(SDL_JOYSTICK_EMSCRIPTEN, 1, [ ])
|
||||
|
@ -4065,6 +4204,9 @@ AS_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
|
|||
SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
|
||||
have_timers=yes
|
||||
fi
|
||||
# Set up files for the locale library
|
||||
SOURCES="$SOURCES $srcdir/src/locale/emscripten/*.c"
|
||||
have_locale=yes
|
||||
;;
|
||||
*-*-riscos*)
|
||||
ARCH=riscos
|
||||
|
@ -4078,6 +4220,9 @@ AS_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
|
|||
CheckPTHREAD
|
||||
CheckClockGettime
|
||||
|
||||
SOURCES="$SOURCES $srcdir/src/misc/riscos/*.c"
|
||||
have_misc=yes
|
||||
|
||||
# Set up files for the timer library
|
||||
if test x$enable_timers = xyes; then
|
||||
AC_DEFINE(SDL_TIMER_UNIX, 1, [ ])
|
||||
|
@ -4092,6 +4237,9 @@ AS_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
|
|||
;;
|
||||
esac
|
||||
|
||||
dnl Permit use of virtual joystick APIs on any platform (subject to configure options)
|
||||
CheckVirtualJoystick
|
||||
|
||||
# Check whether to install sdl2-config
|
||||
AC_MSG_CHECKING(whether to install sdl2-config)
|
||||
AC_ARG_ENABLE([sdl2-config],
|
||||
|
@ -4110,6 +4258,12 @@ AC_SUBST([INSTALL_SDL2_CONFIG], [$enable_sdl2_config])
|
|||
|
||||
# Verify that we have all the platform specific files we need
|
||||
|
||||
if test x$have_misc != xyes; then
|
||||
SOURCES="$SOURCES $srcdir/src/misc/dummy/*.c"
|
||||
fi
|
||||
if test x$have_locale != xyes; then
|
||||
SOURCES="$SOURCES $srcdir/src/locale/dummy/*.c"
|
||||
fi
|
||||
if test x$have_joystick != xyes; then
|
||||
if test x$enable_joystick = xyes; then
|
||||
AC_DEFINE(SDL_JOYSTICK_DUMMY, 1, [ ])
|
||||
|
@ -4194,10 +4348,10 @@ GEN_OBJECTS=`echo "$GEN_SOURCES" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.l
|
|||
|
||||
VERSION_OBJECTS=`echo $VERSION_SOURCES`
|
||||
VERSION_DEPENDS=`echo $VERSION_SOURCES`
|
||||
VERSION_OBJECTS=`echo "$VERSION_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.rc,$(objects)/\1.o,g'`
|
||||
VERSION_OBJECTS=`echo "$VERSION_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.rc,$(objects)/\1.lo,g'`
|
||||
VERSION_DEPENDS=`echo "$VERSION_DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.rc,\\\\
|
||||
\\$(objects)/\\2.o: \\1/\\2.rc \\$(objects)/.created\\\\
|
||||
\\$(WINDRES) \\$< \\$@,g"`
|
||||
\\$(objects)/\\2.lo: \\1/\\2.rc \\$(objects)/.created\\\\
|
||||
\\$(RUN_CMD_RC)\\$(LIBTOOL) --mode=compile --tag=RC \\$(RC) -i \\$< -o \\$@,g"`
|
||||
|
||||
SDLMAIN_OBJECTS=`echo $SDLMAIN_SOURCES`
|
||||
SDLMAIN_DEPENDS=`echo $SDLMAIN_SOURCES`
|
||||
|
@ -4215,7 +4369,7 @@ SDLTEST_DEPENDS=`echo "$SDLTEST_DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.
|
|||
|
||||
# Set runtime shared library paths as needed
|
||||
|
||||
if test "x$enable_rpath" = "xyes"; then
|
||||
if test "x$enable_rpath" = "xyes" -a "x$enable_shared" = "xyes"; then
|
||||
if test $ARCH = bsdi -o $ARCH = freebsd -o $ARCH = linux -o $ARCH = netbsd; then
|
||||
SDL_RLD_FLAGS="-Wl,-rpath,\${libdir}"
|
||||
|
||||
|
@ -4239,7 +4393,7 @@ else
|
|||
SDL_RLD_FLAGS=""
|
||||
fi
|
||||
|
||||
SDL_STATIC_LIBS="$SDL_LIBS $EXTRA_LDFLAGS"
|
||||
SDL_STATIC_LIBS="$EXTRA_LDFLAGS"
|
||||
|
||||
dnl Expand the cflags and libraries needed by apps using SDL
|
||||
AC_SUBST(SDL_CFLAGS)
|
||||
|
@ -4247,9 +4401,12 @@ AC_SUBST(SDL_LIBS)
|
|||
AC_SUBST(SDL_STATIC_LIBS)
|
||||
AC_SUBST(SDL_RLD_FLAGS)
|
||||
if test x$enable_shared = xyes; then
|
||||
PKG_CONFIG_LIBS_PRIV="
|
||||
Libs.private:"
|
||||
ENABLE_SHARED_TRUE=
|
||||
ENABLE_SHARED_FALSE="#"
|
||||
else
|
||||
PKG_CONFIG_LIBS_PRIV=
|
||||
ENABLE_SHARED_TRUE="#"
|
||||
ENABLE_SHARED_FALSE=
|
||||
fi
|
||||
|
@ -4260,6 +4417,7 @@ else
|
|||
ENABLE_STATIC_TRUE="#"
|
||||
ENABLE_STATIC_FALSE=
|
||||
fi
|
||||
AC_SUBST(PKG_CONFIG_LIBS_PRIV)
|
||||
AC_SUBST(ENABLE_SHARED_TRUE)
|
||||
AC_SUBST(ENABLE_SHARED_FALSE)
|
||||
AC_SUBST(ENABLE_STATIC_TRUE)
|
||||
|
@ -4278,7 +4436,6 @@ AC_SUBST(BUILD_CFLAGS)
|
|||
AC_SUBST(EXTRA_CFLAGS)
|
||||
AC_SUBST(BUILD_LDFLAGS)
|
||||
AC_SUBST(EXTRA_LDFLAGS)
|
||||
AC_SUBST(WINDRES)
|
||||
AC_SUBST(WAYLAND_SCANNER)
|
||||
|
||||
cat >Makefile.rules <<__EOF__
|
||||
|
@ -4315,6 +4472,11 @@ if test x$have_x = xyes; then
|
|||
SUMMARY="${SUMMARY}X11 libraries :${SUMMARY_video_x11}\n"
|
||||
fi
|
||||
SUMMARY="${SUMMARY}Input drivers :${SUMMARY_input}\n"
|
||||
if test x$have_joystick_virtual = xyes; then
|
||||
SUMMARY="${SUMMARY}Enable virtual joystick APIs : YES\n"
|
||||
else
|
||||
SUMMARY="${SUMMARY}Enable virtual joystick APIs : NO\n"
|
||||
fi
|
||||
if test x$have_samplerate_h_hdr = xyes; then
|
||||
SUMMARY="${SUMMARY}Using libsamplerate : YES\n"
|
||||
else
|
||||
|
@ -4340,7 +4502,7 @@ if test x$have_ibus_ibus_h_hdr = xyes; then
|
|||
else
|
||||
SUMMARY="${SUMMARY}Using ibus : NO\n"
|
||||
fi
|
||||
if test x$have_fcitx_frontend_h_hdr = xyes; then
|
||||
if test x$have_fcitx = xyes; then
|
||||
SUMMARY="${SUMMARY}Using fcitx : YES\n"
|
||||
else
|
||||
SUMMARY="${SUMMARY}Using fcitx : NO\n"
|
||||
|
|
14
externals/SDL/debian/changelog
vendored
14
externals/SDL/debian/changelog
vendored
|
@ -1,6 +1,18 @@
|
|||
libsdl2 (2.0.14) UNRELEASED; urgency=low
|
||||
|
||||
* Updated SDL to version 2.0.14
|
||||
|
||||
-- Sam Lantinga <slouken@libsdl.org> Tue, 8 Dec 2020 17:54:33 -0800
|
||||
|
||||
libsdl2 (2.0.13) UNRELEASED; urgency=low
|
||||
|
||||
* Updated SDL to version 2.0.13 for development builds
|
||||
|
||||
-- Sam Lantinga <slouken@libsdl.org> Tue, 10 Mar 2020 18:24:22 -0800
|
||||
|
||||
libsdl2 (2.0.12) UNRELEASED; urgency=low
|
||||
|
||||
* Updated SDL to version 2.0.12 for development builds
|
||||
* Updated SDL to version 2.0.12
|
||||
|
||||
-- Sam Lantinga <slouken@libsdl.org> Sun, 1 Mar 2020 14:57:07 -0800
|
||||
|
||||
|
|
16
externals/SDL/docs/README-ios.md
vendored
16
externals/SDL/docs/README-ios.md
vendored
|
@ -228,6 +228,22 @@ Textures:
|
|||
Loading Shared Objects:
|
||||
This is disabled by default since it seems to break the terms of the iOS SDK agreement for iOS versions prior to iOS 8. It can be re-enabled in SDL_config_iphoneos.h.
|
||||
|
||||
==============================================================================
|
||||
Notes -- CoreBluetooth.framework
|
||||
==============================================================================
|
||||
|
||||
SDL_JOYSTICK_HIDAPI is disabled by default. It can give you access to a lot
|
||||
more game controller devices, but it requires permission from the user before
|
||||
your app will be able to talk to the Bluetooth hardware. "Made For iOS"
|
||||
branded controllers do not need this as we don't have to speak to them
|
||||
directly with raw bluetooth, so many apps can live without this.
|
||||
|
||||
You'll need to link with CoreBluetooth.framework and add something like this
|
||||
to your Info.plist:
|
||||
|
||||
<key>NSBluetoothPeripheralUsageDescription</key>
|
||||
<string>MyApp would like to remain connected to nearby bluetooth Game Controllers and Game Pads even when you're not using the app.</string>
|
||||
|
||||
==============================================================================
|
||||
Game Center
|
||||
==============================================================================
|
||||
|
|
15
externals/SDL/docs/README-linux.md
vendored
15
externals/SDL/docs/README-linux.md
vendored
|
@ -13,21 +13,18 @@ default configuration parameters.
|
|||
Build Dependencies
|
||||
================================================================================
|
||||
|
||||
Ubuntu 13.04, all available features enabled:
|
||||
Ubuntu 20.04, all available features enabled:
|
||||
|
||||
sudo apt-get install build-essential mercurial make cmake autoconf automake \
|
||||
libtool libasound2-dev libpulse-dev libaudio-dev libx11-dev libxext-dev \
|
||||
libxrandr-dev libxcursor-dev libxi-dev libxinerama-dev libxxf86vm-dev \
|
||||
libxss-dev libgl1-mesa-dev libesd0-dev libdbus-1-dev libudev-dev \
|
||||
libgles1-mesa-dev libgles2-mesa-dev libegl1-mesa-dev libibus-1.0-dev \
|
||||
fcitx-libs-dev libsamplerate0-dev libsndio-dev
|
||||
|
||||
Ubuntu 16.04+ can also add "libwayland-dev libxkbcommon-dev wayland-protocols"
|
||||
to that command line for Wayland support.
|
||||
libxss-dev libgl1-mesa-dev libdbus-1-dev libudev-dev libgles2-mesa-dev \
|
||||
libegl1-mesa-dev libibus-1.0-dev fcitx-libs-dev libsamplerate0-dev \
|
||||
libsndio-dev libwayland-dev libxkbcommon-dev
|
||||
|
||||
NOTES:
|
||||
- This includes all the audio targets except arts, because Ubuntu pulled the
|
||||
artsc0-dev package, but in theory SDL still supports it.
|
||||
- This includes all the audio targets except arts and esd, because Ubuntu
|
||||
(and/or Debian) pulled their packages, but in theory SDL still supports them.
|
||||
- libsamplerate0-dev lets SDL optionally link to libresamplerate at runtime
|
||||
for higher-quality audio resampling. SDL will work without it if the library
|
||||
is missing, so it's safe to build in support even if the end user doesn't
|
||||
|
|
54
externals/SDL/docs/README-os2.md
vendored
Executable file
54
externals/SDL/docs/README-os2.md
vendored
Executable file
|
@ -0,0 +1,54 @@
|
|||
Simple DirectMedia Layer 2 for OS/2 & eComStation
|
||||
================================================================================
|
||||
SDL port for OS/2, authored by Andrey Vasilkin <digi@os2.snc.ru>, 2016
|
||||
|
||||
|
||||
OpenGL, joystick and audio capture not supported by this port.
|
||||
|
||||
Additional environment variables (optional) for OS/2 version:
|
||||
|
||||
SDL_AUDIO_SHARE
|
||||
Values: 0 or 1, default is 0
|
||||
Initializes the device as shareable or exclusively acquired.
|
||||
|
||||
SDL_VIDEODRIVER
|
||||
Values: DIVE or VMAN, default is DIVE
|
||||
Use video subsystem: Direct interface video extensions (DIVE) or
|
||||
Video Manager (VMAN).
|
||||
|
||||
You may significantly increase video output speed with OS4 kernel and patched
|
||||
files vman.dll and dive.dll or with latest versions of ACPI support and video
|
||||
driver Panorama.
|
||||
|
||||
Latest versions of OS/4 kernel:
|
||||
http://gus.biysk.ru/os4/
|
||||
(Info: https://www.os2world.com/wiki/index.php/Phoenix_OS/4)
|
||||
|
||||
Patched files vman.dll and dive.dll:
|
||||
http://gus.biysk.ru/os4/test/pached_dll/PATCHED_DLL.RAR
|
||||
|
||||
|
||||
Compiling:
|
||||
----------
|
||||
|
||||
Open Watcom 1.9 or newer is tested. For the new Open Watcom V2 fork, see:
|
||||
https://github.com/open-watcom/ and https://open-watcom.github.io
|
||||
WATCOM ervironment variable must to be set to the Open Watcom install
|
||||
directory. To compile, run: wmake -f Makefile.os2
|
||||
|
||||
|
||||
Installing:
|
||||
-----------
|
||||
|
||||
- eComStation:
|
||||
|
||||
If you have previously installed SDL2, make a Backup copy of SDL2.dll
|
||||
located in D:\ecs\dll (where D: is disk on which installed eComStation).
|
||||
Stop all programs running with SDL2. Copy SDL2.dll to D:\ecs\dll
|
||||
|
||||
- OS/2:
|
||||
|
||||
Copy SDL2.dll to any directory on your LIBPATH. If you have a previous
|
||||
version installed, close all SDL2 applications before replacing the old
|
||||
copy. Also make sure that any other older versions of DLLs are removed
|
||||
from your system.
|
2
externals/SDL/include/SDL.h
vendored
2
externals/SDL/include/SDL.h
vendored
|
@ -59,6 +59,8 @@
|
|||
#include "SDL_timer.h"
|
||||
#include "SDL_version.h"
|
||||
#include "SDL_video.h"
|
||||
#include "SDL_locale.h"
|
||||
#include "SDL_misc.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
|
|
2
externals/SDL/include/SDL_assert.h
vendored
2
externals/SDL/include/SDL_assert.h
vendored
|
@ -53,6 +53,8 @@ assert can have unique static variables associated with it.
|
|||
#define SDL_TriggerBreakpoint() __debugbreak()
|
||||
#elif ( (!defined(__NACL__)) && ((defined(__GNUC__) || defined(__clang__)) && (defined(__i386__) || defined(__x86_64__))) )
|
||||
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "int $3\n\t" )
|
||||
#elif ( defined(__APPLE__) && defined(__arm64__) ) /* this might work on other ARM targets, but this is a known quantity... */
|
||||
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "brk #22\n\t" )
|
||||
#elif defined(__386__) && defined(__WATCOMC__)
|
||||
#define SDL_TriggerBreakpoint() { _asm { int 0x03 } }
|
||||
#elif defined(HAVE_SIGNAL_H) && !defined(__WATCOMC__)
|
||||
|
|
23
externals/SDL/include/SDL_config.h.cmake
vendored
23
externals/SDL/include/SDL_config.h.cmake
vendored
|
@ -100,6 +100,10 @@
|
|||
#cmakedefine HAVE_WCSSTR 1
|
||||
#cmakedefine HAVE_WCSCMP 1
|
||||
#cmakedefine HAVE_WCSNCMP 1
|
||||
#cmakedefine HAVE_WCSCASECMP 1
|
||||
#cmakedefine HAVE__WCSICMP 1
|
||||
#cmakedefine HAVE_WCSNCASECMP 1
|
||||
#cmakedefine HAVE__WCSNICMP 1
|
||||
#cmakedefine HAVE_STRLEN 1
|
||||
#cmakedefine HAVE_STRLCPY 1
|
||||
#cmakedefine HAVE_STRLCAT 1
|
||||
|
@ -172,6 +176,8 @@
|
|||
#cmakedefine HAVE_SQRTF 1
|
||||
#cmakedefine HAVE_TAN 1
|
||||
#cmakedefine HAVE_TANF 1
|
||||
#cmakedefine HAVE_TRUNC 1
|
||||
#cmakedefine HAVE_TRUNCF 1
|
||||
#cmakedefine HAVE_FOPEN64 1
|
||||
#cmakedefine HAVE_FSEEKO 1
|
||||
#cmakedefine HAVE_FSEEKO64 1
|
||||
|
@ -189,6 +195,7 @@
|
|||
#cmakedefine HAVE_PTHREAD_SET_NAME_NP 1
|
||||
#cmakedefine HAVE_SEM_TIMEDWAIT 1
|
||||
#cmakedefine HAVE_GETAUXVAL 1
|
||||
#cmakedefine HAVE_ELF_AUX_INFO 1
|
||||
#cmakedefine HAVE_POLL 1
|
||||
#cmakedefine HAVE__EXIT 1
|
||||
|
||||
|
@ -203,11 +210,15 @@
|
|||
|
||||
#cmakedefine HAVE_ALTIVEC_H 1
|
||||
#cmakedefine HAVE_DBUS_DBUS_H 1
|
||||
#cmakedefine HAVE_FCITX_FRONTEND_H 1
|
||||
#cmakedefine HAVE_FCITX 1
|
||||
#cmakedefine HAVE_IBUS_IBUS_H 1
|
||||
#cmakedefine HAVE_SYS_INOTIFY_H 1
|
||||
#cmakedefine HAVE_INOTIFY_INIT 1
|
||||
#cmakedefine HAVE_INOTIFY_INIT1 1
|
||||
#cmakedefine HAVE_INOTIFY 1
|
||||
#cmakedefine HAVE_IMMINTRIN_H 1
|
||||
#cmakedefine HAVE_LIBSAMPLERATE_H 1
|
||||
#cmakedefine HAVE_LIBUDEV_H 1
|
||||
#cmakedefine HAVE_LIBSAMPLERATE_H 1
|
||||
|
||||
#cmakedefine HAVE_D3D_H @HAVE_D3D_H@
|
||||
#cmakedefine HAVE_D3D11_H @HAVE_D3D11_H@
|
||||
|
@ -219,6 +230,7 @@
|
|||
|
||||
#cmakedefine HAVE_MMDEVICEAPI_H @HAVE_MMDEVICEAPI_H@
|
||||
#cmakedefine HAVE_AUDIOCLIENT_H @HAVE_AUDIOCLIENT_H@
|
||||
#cmakedefine HAVE_SENSORSAPI_H @HAVE_SENSORSAPI_H@
|
||||
|
||||
#cmakedefine HAVE_XINPUT_GAMEPAD_EX @HAVE_XINPUT_GAMEPAD_EX@
|
||||
#cmakedefine HAVE_XINPUT_STATE_EX @HAVE_XINPUT_STATE_EX@
|
||||
|
@ -279,7 +291,6 @@
|
|||
/* Enable various input drivers */
|
||||
#cmakedefine SDL_INPUT_LINUXEV @SDL_INPUT_LINUXEV@
|
||||
#cmakedefine SDL_INPUT_LINUXKD @SDL_INPUT_LINUXKD@
|
||||
#cmakedefine SDL_INPUT_TSLIB @SDL_INPUT_TSLIB@
|
||||
#cmakedefine SDL_JOYSTICK_ANDROID @SDL_JOYSTICK_ANDROID@
|
||||
#cmakedefine SDL_JOYSTICK_HAIKU @SDL_JOYSTICK_HAIKU@
|
||||
#cmakedefine SDL_JOYSTICK_DINPUT @SDL_JOYSTICK_DINPUT@
|
||||
|
@ -293,6 +304,7 @@
|
|||
#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_VIRTUAL @SDL_JOYSTICK_VIRTUAL@
|
||||
#cmakedefine SDL_HAPTIC_DUMMY @SDL_HAPTIC_DUMMY@
|
||||
#cmakedefine SDL_HAPTIC_LINUX @SDL_HAPTIC_LINUX@
|
||||
#cmakedefine SDL_HAPTIC_IOKIT @SDL_HAPTIC_IOKIT@
|
||||
|
@ -304,6 +316,7 @@
|
|||
/* Enable various sensor drivers */
|
||||
#cmakedefine SDL_SENSOR_ANDROID @SDL_SENSOR_ANDROID@
|
||||
#cmakedefine SDL_SENSOR_COREMOTION @SDL_SENSOR_COREMOTION@
|
||||
#cmakedefine SDL_SENSOR_WINDOWS @SDL_SENSOR_WINDOWS@
|
||||
#cmakedefine SDL_SENSOR_DUMMY @SDL_SENSOR_DUMMY@
|
||||
|
||||
/* Enable various shared object loading systems */
|
||||
|
@ -335,6 +348,7 @@
|
|||
#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_WINRT @SDL_VIDEO_DRIVER_WINRT@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_WAYLAND @SDL_VIDEO_DRIVER_WAYLAND@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_RPI @SDL_VIDEO_DRIVER_RPI@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_VIVANTE @SDL_VIDEO_DRIVER_VIVANTE@
|
||||
|
@ -403,6 +417,7 @@
|
|||
#cmakedefine SDL_POWER_ANDROID @SDL_POWER_ANDROID@
|
||||
#cmakedefine SDL_POWER_LINUX @SDL_POWER_LINUX@
|
||||
#cmakedefine SDL_POWER_WINDOWS @SDL_POWER_WINDOWS@
|
||||
#cmakedefine SDL_POWER_WINRT @SDL_POWER_WINRT@
|
||||
#cmakedefine SDL_POWER_MACOSX @SDL_POWER_MACOSX@
|
||||
#cmakedefine SDL_POWER_UIKIT @SDL_POWER_UIKIT@
|
||||
#cmakedefine SDL_POWER_HAIKU @SDL_POWER_HAIKU@
|
||||
|
@ -431,7 +446,7 @@
|
|||
#cmakedefine SDL_IPHONE_KEYBOARD @SDL_IPHONE_KEYBOARD@
|
||||
#cmakedefine SDL_IPHONE_LAUNCHSCREEN @SDL_IPHONE_LAUNCHSCREEN@
|
||||
|
||||
#if !defined(__WIN32__)
|
||||
#if !defined(__WIN32__) && !defined(__WINRT__)
|
||||
# if !defined(_STDINT_H_) && !defined(_STDINT_H) && !defined(HAVE_STDINT_H) && !defined(_HAVE_STDINT_H)
|
||||
typedef unsigned int size_t;
|
||||
typedef signed char int8_t;
|
||||
|
|
25
externals/SDL/include/SDL_config.h.in
vendored
25
externals/SDL/include/SDL_config.h.in
vendored
|
@ -103,6 +103,10 @@
|
|||
#undef HAVE_WCSSTR
|
||||
#undef HAVE_WCSCMP
|
||||
#undef HAVE_WCSNCMP
|
||||
#undef HAVE_WCSCASECMP
|
||||
#undef HAVE__WCSICMP
|
||||
#undef HAVE_WCSNCASECMP
|
||||
#undef HAVE__WCSNICMP
|
||||
#undef HAVE_STRLEN
|
||||
#undef HAVE_STRLCPY
|
||||
#undef HAVE_STRLCAT
|
||||
|
@ -176,6 +180,8 @@
|
|||
#undef HAVE_SQRTF
|
||||
#undef HAVE_TAN
|
||||
#undef HAVE_TANF
|
||||
#undef HAVE_TRUNC
|
||||
#undef HAVE_TRUNCF
|
||||
#undef HAVE_FOPEN64
|
||||
#undef HAVE_FSEEKO
|
||||
#undef HAVE_FSEEKO64
|
||||
|
@ -193,6 +199,7 @@
|
|||
#undef HAVE_PTHREAD_SET_NAME_NP
|
||||
#undef HAVE_SEM_TIMEDWAIT
|
||||
#undef HAVE_GETAUXVAL
|
||||
#undef HAVE_ELF_AUX_INFO
|
||||
#undef HAVE_POLL
|
||||
#undef HAVE__EXIT
|
||||
|
||||
|
@ -204,19 +211,26 @@
|
|||
|
||||
#undef HAVE_ALTIVEC_H
|
||||
#undef HAVE_DBUS_DBUS_H
|
||||
#undef HAVE_FCITX_FRONTEND_H
|
||||
#undef HAVE_FCITX
|
||||
#undef HAVE_SYS_INOTIFY_H
|
||||
#undef HAVE_INOTIFY_INIT
|
||||
#undef HAVE_INOTIFY_INIT1
|
||||
#undef HAVE_INOTIFY
|
||||
#undef HAVE_IBUS_IBUS_H
|
||||
#undef HAVE_IMMINTRIN_H
|
||||
#undef HAVE_LIBSAMPLERATE_H
|
||||
#undef HAVE_LIBUDEV_H
|
||||
#undef HAVE_LIBSAMPLERATE_H
|
||||
|
||||
#undef HAVE_DDRAW_H
|
||||
#undef HAVE_DINPUT_H
|
||||
#undef HAVE_DSOUND_H
|
||||
#undef HAVE_DXGI_H
|
||||
#undef HAVE_XINPUT_H
|
||||
|
||||
#undef HAVE_MMDEVICEAPI_H
|
||||
#undef HAVE_AUDIOCLIENT_H
|
||||
#undef HAVE_SENSORSAPI_H
|
||||
|
||||
#undef HAVE_XINPUT_GAMEPAD_EX
|
||||
#undef HAVE_XINPUT_STATE_EX
|
||||
|
||||
|
@ -276,20 +290,23 @@
|
|||
|
||||
/* Enable various input drivers */
|
||||
#undef SDL_INPUT_LINUXEV
|
||||
#undef SDL_INPUT_FBSDKBIO
|
||||
#undef SDL_INPUT_LINUXKD
|
||||
#undef SDL_INPUT_TSLIB
|
||||
#undef SDL_JOYSTICK_HAIKU
|
||||
#undef SDL_JOYSTICK_DINPUT
|
||||
#undef SDL_JOYSTICK_XINPUT
|
||||
#undef SDL_JOYSTICK_DUMMY
|
||||
#undef SDL_JOYSTICK_IOKIT
|
||||
#undef SDL_JOYSTICK_MFI
|
||||
#undef SDL_JOYSTICK_LINUX
|
||||
#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_RAWINPUT
|
||||
#undef SDL_JOYSTICK_EMSCRIPTEN
|
||||
#undef SDL_JOYSTICK_VIRTUAL
|
||||
#undef SDL_HAPTIC_DUMMY
|
||||
#undef SDL_HAPTIC_ANDROID
|
||||
#undef SDL_HAPTIC_LINUX
|
||||
|
@ -299,6 +316,8 @@
|
|||
|
||||
/* Enable various sensor drivers */
|
||||
#undef SDL_SENSOR_ANDROID
|
||||
#undef SDL_SENSOR_COREMOTION
|
||||
#undef SDL_SENSOR_WINDOWS
|
||||
#undef SDL_SENSOR_DUMMY
|
||||
|
||||
/* Enable various shared object loading systems */
|
||||
|
|
7
externals/SDL/include/SDL_config_android.h
vendored
7
externals/SDL/include/SDL_config_android.h
vendored
|
@ -121,6 +121,8 @@
|
|||
#define HAVE_SQRTF 1
|
||||
#define HAVE_TAN 1
|
||||
#define HAVE_TANF 1
|
||||
#define HAVE_TRUNC 1
|
||||
#define HAVE_TRUNCF 1
|
||||
#define HAVE_SIGACTION 1
|
||||
#define HAVE_SETJMP 1
|
||||
#define HAVE_NANOSLEEP 1
|
||||
|
@ -136,8 +138,9 @@
|
|||
|
||||
/* Enable various input drivers */
|
||||
#define SDL_JOYSTICK_ANDROID 1
|
||||
#define SDL_JOYSTICK_HIDAPI 1
|
||||
#define SDL_HAPTIC_ANDROID 1
|
||||
#define SDL_JOYSTICK_HIDAPI 1
|
||||
#define SDL_JOYSTICK_VIRTUAL 1
|
||||
#define SDL_HAPTIC_ANDROID 1
|
||||
|
||||
/* Enable sensor driver */
|
||||
#define SDL_SENSOR_ANDROID 1
|
||||
|
|
19
externals/SDL/include/SDL_config_iphoneos.h
vendored
19
externals/SDL/include/SDL_config_iphoneos.h
vendored
|
@ -122,6 +122,8 @@
|
|||
#define HAVE_SQRTF 1
|
||||
#define HAVE_TAN 1
|
||||
#define HAVE_TANF 1
|
||||
#define HAVE_TRUNC 1
|
||||
#define HAVE_TRUNCF 1
|
||||
#define HAVE_SIGACTION 1
|
||||
#define HAVE_SETJMP 1
|
||||
#define HAVE_NANOSLEEP 1
|
||||
|
@ -136,9 +138,11 @@
|
|||
/* Enable the stub haptic driver (src/haptic/dummy/\*.c) */
|
||||
#define SDL_HAPTIC_DUMMY 1
|
||||
|
||||
/* Enable MFi joystick support */
|
||||
/* Enable joystick support */
|
||||
/* Only enable HIDAPI support if you want to support Steam Controllers on iOS and tvOS */
|
||||
/*#define SDL_JOYSTICK_HIDAPI 1*/
|
||||
#define SDL_JOYSTICK_MFI 1
|
||||
#define SDL_JOYSTICK_HIDAPI 1
|
||||
#define SDL_JOYSTICK_VIRTUAL 1
|
||||
|
||||
#ifdef __TVOS__
|
||||
#define SDL_SENSOR_DUMMY 1
|
||||
|
@ -167,8 +171,10 @@
|
|||
#define SDL_VIDEO_RENDER_OGL_ES 1
|
||||
#define SDL_VIDEO_RENDER_OGL_ES2 1
|
||||
|
||||
/* Metal supported on 64-bit devices running iOS 8.0 and tvOS 9.0 and newer */
|
||||
#if !TARGET_OS_SIMULATOR && !TARGET_CPU_ARM && ((__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 90000))
|
||||
/* Metal supported on 64-bit devices running iOS 8.0 and tvOS 9.0 and newer
|
||||
Also supported in simulator from iOS 13.0 and tvOS 13.0
|
||||
*/
|
||||
#if (TARGET_OS_SIMULATOR && ((__IPHONE_OS_VERSION_MIN_REQUIRED >= 130000) || (__TV_OS_VERSION_MIN_REQUIRED >= 130000))) || (!TARGET_CPU_ARM && ((__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 90000)))
|
||||
#define SDL_PLATFORM_SUPPORTS_METAL 1
|
||||
#else
|
||||
#define SDL_PLATFORM_SUPPORTS_METAL 0
|
||||
|
@ -195,11 +201,6 @@
|
|||
/* enable iOS extended launch screen */
|
||||
#define SDL_IPHONE_LAUNCHSCREEN 1
|
||||
|
||||
/* Set max recognized G-force from accelerometer
|
||||
See src/joystick/uikit/SDL_sysjoystick.m for notes on why this is needed
|
||||
*/
|
||||
#define SDL_IPHONE_MAX_GFORCE 5.0
|
||||
|
||||
/* enable filesystem support */
|
||||
#define SDL_FILESYSTEM_COCOA 1
|
||||
|
||||
|
|
12
externals/SDL/include/SDL_config_macosx.h
vendored
12
externals/SDL/include/SDL_config_macosx.h
vendored
|
@ -125,6 +125,8 @@
|
|||
#define HAVE_SQRTF 1
|
||||
#define HAVE_TAN 1
|
||||
#define HAVE_TANF 1
|
||||
#define HAVE_TRUNC 1
|
||||
#define HAVE_TRUNCF 1
|
||||
#define HAVE_SIGACTION 1
|
||||
#define HAVE_SETJMP 1
|
||||
#define HAVE_NANOSLEEP 1
|
||||
|
@ -139,10 +141,16 @@
|
|||
#define SDL_AUDIO_DRIVER_DUMMY 1
|
||||
|
||||
/* Enable various input drivers */
|
||||
#define SDL_JOYSTICK_HIDAPI 1
|
||||
#define SDL_JOYSTICK_IOKIT 1
|
||||
#define SDL_JOYSTICK_HIDAPI 1
|
||||
#define SDL_JOYSTICK_VIRTUAL 1
|
||||
#define SDL_HAPTIC_IOKIT 1
|
||||
|
||||
/* The MFI controller support requires ARC Objective C runtime */
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1080 && !defined(__i386__)
|
||||
#define SDL_JOYSTICK_MFI 1
|
||||
#endif
|
||||
|
||||
/* Enable the dummy sensor driver */
|
||||
#define SDL_SENSOR_DUMMY 1
|
||||
|
||||
|
@ -195,7 +203,7 @@
|
|||
#endif
|
||||
|
||||
/* Metal only supported on 64-bit architectures with 10.11+ */
|
||||
#if TARGET_CPU_X86_64 && (MAC_OS_X_VERSION_MAX_ALLOWED >= 101100)
|
||||
#if TARGET_RT_64_BIT && (MAC_OS_X_VERSION_MAX_ALLOWED >= 101100)
|
||||
#define SDL_PLATFORM_SUPPORTS_METAL 1
|
||||
#else
|
||||
#define SDL_PLATFORM_SUPPORTS_METAL 0
|
||||
|
|
20
externals/SDL/include/SDL_config_os2.h
vendored
20
externals/SDL/include/SDL_config_os2.h
vendored
|
@ -27,14 +27,17 @@
|
|||
|
||||
#define SDL_AUDIO_DRIVER_DUMMY 1
|
||||
#define SDL_AUDIO_DRIVER_DISK 1
|
||||
#define SDL_AUDIO_DRIVER_OS2 1
|
||||
|
||||
#define SDL_POWER_DISABLED 1
|
||||
#define SDL_JOYSTICK_DISABLED 1
|
||||
#define SDL_HAPTIC_DISABLED 1
|
||||
/*#undef SDL_JOYSTICK_HIDAPI */
|
||||
/*#undef SDL_JOYSTICK_VIRTUAL */
|
||||
|
||||
#define SDL_SENSOR_DUMMY 1
|
||||
#define SDL_VIDEO_DRIVER_DUMMY 1
|
||||
#define SDL_VIDEO_DRIVER_OS2 1
|
||||
|
||||
/* Enable OpenGL support */
|
||||
/* #undef SDL_VIDEO_OPENGL */
|
||||
|
@ -42,18 +45,19 @@
|
|||
/* Enable Vulkan support */
|
||||
/* #undef SDL_VIDEO_VULKAN */
|
||||
|
||||
#define SDL_LOADSO_DISABLED 1
|
||||
#define SDL_THREADS_DISABLED 1
|
||||
#define SDL_TIMERS_DISABLED 1
|
||||
#define SDL_FILESYSTEM_DUMMY 1
|
||||
#define SDL_THREAD_OS2 1
|
||||
#define SDL_LOADSO_OS2 1
|
||||
#define SDL_TIMER_OS2 1
|
||||
#define SDL_FILESYSTEM_OS2 1
|
||||
|
||||
/* Enable assembly routines */
|
||||
#define SDL_ASSEMBLY_ROUTINES 1
|
||||
|
||||
/* #undef HAVE_LIBSAMPLERATE_H */
|
||||
/* use libsamplerate for audio rate conversion. */
|
||||
/*#define HAVE_LIBSAMPLERATE_H 1 */
|
||||
|
||||
/* Enable dynamic libsamplerate support */
|
||||
/* #undef SDL_LIBSAMPLERATE_DYNAMIC */
|
||||
#define SDL_LIBSAMPLERATE_DYNAMIC "SAMPRATE.DLL"
|
||||
|
||||
#define HAVE_LIBC 1
|
||||
|
||||
|
@ -99,6 +103,8 @@
|
|||
#define HAVE_WCSLCPY 1
|
||||
#define HAVE_WCSLCAT 1
|
||||
#define HAVE_WCSCMP 1
|
||||
#define HAVE__WCSICMP 1
|
||||
#define HAVE__WCSNICMP 1
|
||||
#define HAVE_STRLEN 1
|
||||
#define HAVE_STRLCPY 1
|
||||
#define HAVE_STRLCAT 1
|
||||
|
@ -176,5 +182,7 @@
|
|||
/* #undef HAVE_SQRTF */
|
||||
#define HAVE_TAN 1
|
||||
/* #undef HAVE_TANF */
|
||||
/* #undef HAVE_TRUNC */
|
||||
/* #undef HAVE_TRUNCF */
|
||||
|
||||
#endif /* SDL_config_os2_h_ */
|
||||
|
|
4
externals/SDL/include/SDL_config_pandora.h
vendored
4
externals/SDL/include/SDL_config_pandora.h
vendored
|
@ -102,6 +102,8 @@
|
|||
#define HAVE_SQRTF 1
|
||||
#define HAVE_TAN 1
|
||||
#define HAVE_TANF 1
|
||||
#define HAVE_TRUNC 1
|
||||
#define HAVE_TRUNCF 1
|
||||
#define HAVE_SIGACTION 1
|
||||
#define HAVE_SETJMP 1
|
||||
#define HAVE_NANOSLEEP 1
|
||||
|
@ -110,8 +112,8 @@
|
|||
#define SDL_AUDIO_DRIVER_OSS 1
|
||||
|
||||
#define SDL_INPUT_LINUXEV 1
|
||||
#define SDL_INPUT_TSLIB 1
|
||||
#define SDL_JOYSTICK_LINUX 1
|
||||
#define SDL_JOYSTICK_VIRTUAL 1
|
||||
#define SDL_HAPTIC_LINUX 1
|
||||
|
||||
#define SDL_SENSOR_DUMMY 1
|
||||
|
|
1
externals/SDL/include/SDL_config_psp.h
vendored
1
externals/SDL/include/SDL_config_psp.h
vendored
|
@ -136,6 +136,7 @@
|
|||
|
||||
/* Enable the PSP joystick driver (src/joystick/psp/\*.c) */
|
||||
#define SDL_JOYSTICK_PSP 1
|
||||
#define SDL_JOYSTICK_VIRTUAL 1
|
||||
|
||||
/* Enable the dummy sensor driver */
|
||||
#define SDL_SENSOR_DUMMY 1
|
||||
|
|
38
externals/SDL/include/SDL_config_windows.h
vendored
38
externals/SDL/include/SDL_config_windows.h
vendored
|
@ -84,6 +84,7 @@ typedef unsigned int uintptr_t;
|
|||
#define HAVE_XINPUT_H 1
|
||||
#define HAVE_MMDEVICEAPI_H 1
|
||||
#define HAVE_AUDIOCLIENT_H 1
|
||||
#define HAVE_SENSORSAPI_H
|
||||
|
||||
/* This is disabled by default to avoid C runtime dependencies and manifest requirements */
|
||||
#ifdef HAVE_LIBC
|
||||
|
@ -133,6 +134,8 @@ typedef unsigned int uintptr_t;
|
|||
#define HAVE_STRNCMP 1
|
||||
#define HAVE__STRICMP 1
|
||||
#define HAVE__STRNICMP 1
|
||||
#define HAVE__WCSICMP 1
|
||||
#define HAVE__WCSNICMP 1
|
||||
#define HAVE_ACOS 1
|
||||
#define HAVE_ACOSF 1
|
||||
#define HAVE_ASIN 1
|
||||
|
@ -172,6 +175,8 @@ typedef unsigned int uintptr_t;
|
|||
#define HAVE_VSSCANF 1
|
||||
#define HAVE_SCALBN 1
|
||||
#define HAVE_SCALBNF 1
|
||||
#define HAVE_TRUNC 1
|
||||
#define HAVE_TRUNCF 1
|
||||
#endif
|
||||
/* This function is available with at least the VC++ 2008 C runtime library */
|
||||
#if _MSC_VER >= 1400
|
||||
|
@ -186,6 +191,20 @@ typedef unsigned int uintptr_t;
|
|||
#define HAVE_STDDEF_H 1
|
||||
#endif
|
||||
|
||||
/* Check to see if we have Windows 10 build environment */
|
||||
#if _MSC_VER >= 1911 /* Visual Studio 15.3 */
|
||||
#include <sdkddkver.h>
|
||||
#if _WIN32_WINNT >= 0x0601 /* Windows 7 */
|
||||
#define SDL_WINDOWS7_SDK
|
||||
#endif
|
||||
#if _WIN32_WINNT >= 0x0602 /* Windows 8 */
|
||||
#define SDL_WINDOWS8_SDK
|
||||
#endif
|
||||
#if _WIN32_WINNT >= 0x0A00 /* Windows 10 */
|
||||
#define SDL_WINDOWS10_SDK
|
||||
#endif
|
||||
#endif /* _MSC_VER >= 1911 */
|
||||
|
||||
/* Enable various audio drivers */
|
||||
#define SDL_AUDIO_DRIVER_WASAPI 1
|
||||
#define SDL_AUDIO_DRIVER_DSOUND 1
|
||||
|
@ -195,13 +214,20 @@ typedef unsigned int uintptr_t;
|
|||
|
||||
/* Enable various input drivers */
|
||||
#define SDL_JOYSTICK_DINPUT 1
|
||||
#define SDL_JOYSTICK_XINPUT 1
|
||||
#define SDL_JOYSTICK_HIDAPI 1
|
||||
#ifndef __WINRT__
|
||||
#define SDL_JOYSTICK_RAWINPUT 1
|
||||
#endif
|
||||
#define SDL_JOYSTICK_VIRTUAL 1
|
||||
#ifdef SDL_WINDOWS10_SDK
|
||||
#define SDL_JOYSTICK_WGI 1
|
||||
#endif
|
||||
#define SDL_JOYSTICK_XINPUT 1
|
||||
#define SDL_HAPTIC_DINPUT 1
|
||||
#define SDL_HAPTIC_XINPUT 1
|
||||
|
||||
/* Enable the dummy sensor driver */
|
||||
#define SDL_SENSOR_DUMMY 1
|
||||
/* Enable the sensor driver */
|
||||
#define SDL_SENSOR_WINDOWS 1
|
||||
|
||||
/* Enable various shared object loading systems */
|
||||
#define SDL_LOADSO_WINDOWS 1
|
||||
|
@ -219,8 +245,8 @@ typedef unsigned int uintptr_t;
|
|||
#ifndef SDL_VIDEO_RENDER_D3D
|
||||
#define SDL_VIDEO_RENDER_D3D 1
|
||||
#endif
|
||||
#ifndef SDL_VIDEO_RENDER_D3D11
|
||||
#define SDL_VIDEO_RENDER_D3D11 0
|
||||
#ifdef SDL_WINDOWS7_SDK
|
||||
#define SDL_VIDEO_RENDER_D3D11 1
|
||||
#endif
|
||||
|
||||
/* Enable OpenGL support */
|
||||
|
@ -258,3 +284,5 @@ typedef unsigned int uintptr_t;
|
|||
#endif
|
||||
|
||||
#endif /* SDL_config_windows_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
|
3
externals/SDL/include/SDL_config_winrt.h
vendored
3
externals/SDL/include/SDL_config_winrt.h
vendored
|
@ -181,6 +181,8 @@ typedef unsigned int uintptr_t;
|
|||
#define HAVE_SQRTF 1
|
||||
#define HAVE_TAN 1
|
||||
#define HAVE_TANF 1
|
||||
#define HAVE_TRUNC 1
|
||||
#define HAVE_TRUNCF 1
|
||||
#define HAVE__FSEEKI64 1
|
||||
|
||||
/* Enable various audio drivers */
|
||||
|
@ -193,6 +195,7 @@ typedef unsigned int uintptr_t;
|
|||
#define SDL_JOYSTICK_DISABLED 1
|
||||
#define SDL_HAPTIC_DISABLED 1
|
||||
#else
|
||||
#define SDL_JOYSTICK_VIRTUAL 1
|
||||
#define SDL_JOYSTICK_XINPUT 1
|
||||
#define SDL_HAPTIC_XINPUT 1
|
||||
#endif
|
||||
|
|
4
externals/SDL/include/SDL_config_wiz.h
vendored
4
externals/SDL/include/SDL_config_wiz.h
vendored
|
@ -117,6 +117,8 @@
|
|||
#define HAVE_SQRTF 1
|
||||
#define HAVE_TAN 1
|
||||
#define HAVE_TANF 1
|
||||
#define HAVE_TRUNC 1
|
||||
#define HAVE_TRUNCF 1
|
||||
#define HAVE_SIGACTION 1
|
||||
#define HAVE_SETJMP 1
|
||||
#define HAVE_NANOSLEEP 1
|
||||
|
@ -126,8 +128,8 @@
|
|||
#define SDL_AUDIO_DRIVER_OSS 1
|
||||
|
||||
#define SDL_INPUT_LINUXEV 1
|
||||
#define SDL_INPUT_TSLIB 1
|
||||
#define SDL_JOYSTICK_LINUX 1
|
||||
#define SDL_JOYSTICK_VIRTUAL 1
|
||||
#define SDL_HAPTIC_LINUX 1
|
||||
|
||||
#define SDL_SENSOR_DUMMY 1
|
||||
|
|
24
externals/SDL/include/SDL_cpuinfo.h
vendored
24
externals/SDL/include/SDL_cpuinfo.h
vendored
|
@ -246,10 +246,33 @@ extern DECLSPEC size_t SDLCALL SDL_SIMDGetAlignment(void);
|
|||
* \return Pointer to newly-allocated block, NULL if out of memory.
|
||||
*
|
||||
* \sa SDL_SIMDAlignment
|
||||
* \sa SDL_SIMDRealloc
|
||||
* \sa SDL_SIMDFree
|
||||
*/
|
||||
extern DECLSPEC void * SDLCALL SDL_SIMDAlloc(const size_t len);
|
||||
|
||||
/**
|
||||
* \brief Reallocate 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.
|
||||
*
|
||||
* \param mem The pointer obtained from SDL_SIMDAlloc. This function also
|
||||
* accepts NULL, at which point this function is the same as
|
||||
* calling SDL_realloc with a NULL pointer.
|
||||
* \param len The length, in bytes, of the block to allocated. The actual
|
||||
* allocated block might be larger due to padding, etc. Passing 0
|
||||
* will return a non-NULL pointer, assuming the system isn't out of
|
||||
* memory.
|
||||
* \return Pointer to newly-reallocated block, NULL if out of memory.
|
||||
*
|
||||
* \sa SDL_SIMDAlignment
|
||||
* \sa SDL_SIMDAlloc
|
||||
* \sa SDL_SIMDFree
|
||||
*/
|
||||
extern DECLSPEC void * SDLCALL SDL_SIMDRealloc(void *mem, const size_t len);
|
||||
|
||||
/**
|
||||
* \brief Deallocate memory obtained from SDL_SIMDAlloc
|
||||
*
|
||||
|
@ -260,6 +283,7 @@ extern DECLSPEC void * SDLCALL SDL_SIMDAlloc(const size_t len);
|
|||
* However, SDL_SIMDFree(NULL) is a legal no-op.
|
||||
*
|
||||
* \sa SDL_SIMDAlloc
|
||||
* \sa SDL_SIMDRealloc
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_SIMDFree(void *ptr);
|
||||
|
||||
|
|
38
externals/SDL/include/SDL_error.h
vendored
38
externals/SDL/include/SDL_error.h
vendored
|
@ -37,9 +37,45 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
/* Public functions */
|
||||
/* SDL_SetError() unconditionally returns -1. */
|
||||
|
||||
|
||||
/**
|
||||
* \brief Set the error message for the current thread
|
||||
*
|
||||
* \return -1, there is no error handling for this function
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SetError(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(1);
|
||||
|
||||
/**
|
||||
* \brief Get the last error message that was set
|
||||
*
|
||||
* SDL API functions may set error messages and then succeed, so you should
|
||||
* only use the error value if a function fails.
|
||||
*
|
||||
* This returns a pointer to a static buffer for convenience and should not
|
||||
* be called by multiple threads simultaneously.
|
||||
*
|
||||
* \return a pointer to the last error message that was set
|
||||
*/
|
||||
extern DECLSPEC const char *SDLCALL SDL_GetError(void);
|
||||
|
||||
/**
|
||||
* \brief Get the last error message that was set for the current thread
|
||||
*
|
||||
* SDL API functions may set error messages and then succeed, so you should
|
||||
* only use the error value if a function fails.
|
||||
*
|
||||
* \param errstr A buffer to fill with the last error message that was set
|
||||
* for the current thread
|
||||
* \param maxlen The size of the buffer pointed to by the errstr parameter
|
||||
*
|
||||
* \return errstr
|
||||
*/
|
||||
extern DECLSPEC char * SDLCALL SDL_GetErrorMsg(char *errstr, int maxlen);
|
||||
|
||||
/**
|
||||
* \brief Clear the error message for the current thread
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_ClearError(void);
|
||||
|
||||
/**
|
||||
|
|
89
externals/SDL/include/SDL_events.h
vendored
89
externals/SDL/include/SDL_events.h
vendored
|
@ -85,6 +85,8 @@ typedef enum
|
|||
Called on Android in onResume()
|
||||
*/
|
||||
|
||||
SDL_LOCALECHANGED, /**< The user's locale preferences have changed. */
|
||||
|
||||
/* Display events */
|
||||
SDL_DISPLAYEVENT = 0x150, /**< Display state change */
|
||||
|
||||
|
@ -123,6 +125,10 @@ typedef enum
|
|||
SDL_CONTROLLERDEVICEADDED, /**< A new Game controller has been inserted into the system */
|
||||
SDL_CONTROLLERDEVICEREMOVED, /**< An opened Game controller has been removed */
|
||||
SDL_CONTROLLERDEVICEREMAPPED, /**< The controller mapping was updated */
|
||||
SDL_CONTROLLERTOUCHPADDOWN, /**< Game controller touchpad was touched */
|
||||
SDL_CONTROLLERTOUCHPADMOTION, /**< Game controller touchpad finger was moved */
|
||||
SDL_CONTROLLERTOUCHPADUP, /**< Game controller touchpad finger was lifted */
|
||||
SDL_CONTROLLERSENSORUPDATE, /**< Game controller sensor was updated */
|
||||
|
||||
/* Touch events */
|
||||
SDL_FINGERDOWN = 0x700,
|
||||
|
@ -413,6 +419,33 @@ typedef struct SDL_ControllerDeviceEvent
|
|||
Sint32 which; /**< The joystick device index for the ADDED event, instance id for the REMOVED or REMAPPED event */
|
||||
} SDL_ControllerDeviceEvent;
|
||||
|
||||
/**
|
||||
* \brief Game controller touchpad event structure (event.ctouchpad.*)
|
||||
*/
|
||||
typedef struct SDL_ControllerTouchpadEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_CONTROLLERTOUCHPADDOWN or ::SDL_CONTROLLERTOUCHPADMOTION or ::SDL_CONTROLLERTOUCHPADUP */
|
||||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
SDL_JoystickID which; /**< The joystick instance id */
|
||||
Sint32 touchpad; /**< The index of the touchpad */
|
||||
Sint32 finger; /**< The index of the finger on the touchpad */
|
||||
float x; /**< Normalized in the range 0...1 with 0 being on the left */
|
||||
float y; /**< Normalized in the range 0...1 with 0 being at the top */
|
||||
float pressure; /**< Normalized in the range 0...1 */
|
||||
} SDL_ControllerTouchpadEvent;
|
||||
|
||||
/**
|
||||
* \brief Game controller sensor event structure (event.csensor.*)
|
||||
*/
|
||||
typedef struct SDL_ControllerSensorEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_CONTROLLERSENSORUPDATE */
|
||||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
SDL_JoystickID which; /**< The joystick instance id */
|
||||
Sint32 sensor; /**< The type of the sensor, one of the values of ::SDL_SensorType */
|
||||
float data[3]; /**< Up to 3 values from the sensor, as defined in SDL_sensor.h */
|
||||
} SDL_ControllerSensorEvent;
|
||||
|
||||
/**
|
||||
* \brief Audio device event structure (event.adevice.*)
|
||||
*/
|
||||
|
@ -557,33 +590,35 @@ typedef struct SDL_SysWMEvent
|
|||
*/
|
||||
typedef union SDL_Event
|
||||
{
|
||||
Uint32 type; /**< Event type, shared with all events */
|
||||
SDL_CommonEvent common; /**< Common event data */
|
||||
SDL_DisplayEvent display; /**< Display event data */
|
||||
SDL_WindowEvent window; /**< Window event data */
|
||||
SDL_KeyboardEvent key; /**< Keyboard event data */
|
||||
SDL_TextEditingEvent edit; /**< Text editing event data */
|
||||
SDL_TextInputEvent text; /**< Text input event data */
|
||||
SDL_MouseMotionEvent motion; /**< Mouse motion event data */
|
||||
SDL_MouseButtonEvent button; /**< Mouse button event data */
|
||||
SDL_MouseWheelEvent wheel; /**< Mouse wheel event data */
|
||||
SDL_JoyAxisEvent jaxis; /**< Joystick axis event data */
|
||||
SDL_JoyBallEvent jball; /**< Joystick ball event data */
|
||||
SDL_JoyHatEvent jhat; /**< Joystick hat event data */
|
||||
SDL_JoyButtonEvent jbutton; /**< Joystick button event data */
|
||||
SDL_JoyDeviceEvent jdevice; /**< Joystick device change event data */
|
||||
SDL_ControllerAxisEvent caxis; /**< Game Controller axis event data */
|
||||
SDL_ControllerButtonEvent cbutton; /**< Game Controller button event data */
|
||||
SDL_ControllerDeviceEvent cdevice; /**< Game Controller device event data */
|
||||
SDL_AudioDeviceEvent adevice; /**< Audio device event data */
|
||||
SDL_SensorEvent sensor; /**< Sensor event data */
|
||||
SDL_QuitEvent quit; /**< Quit request event data */
|
||||
SDL_UserEvent user; /**< Custom event data */
|
||||
SDL_SysWMEvent syswm; /**< System dependent window event data */
|
||||
SDL_TouchFingerEvent tfinger; /**< Touch finger event data */
|
||||
SDL_MultiGestureEvent mgesture; /**< Gesture event data */
|
||||
SDL_DollarGestureEvent dgesture; /**< Gesture event data */
|
||||
SDL_DropEvent drop; /**< Drag and drop event data */
|
||||
Uint32 type; /**< Event type, shared with all events */
|
||||
SDL_CommonEvent common; /**< Common event data */
|
||||
SDL_DisplayEvent display; /**< Display event data */
|
||||
SDL_WindowEvent window; /**< Window event data */
|
||||
SDL_KeyboardEvent key; /**< Keyboard event data */
|
||||
SDL_TextEditingEvent edit; /**< Text editing event data */
|
||||
SDL_TextInputEvent text; /**< Text input event data */
|
||||
SDL_MouseMotionEvent motion; /**< Mouse motion event data */
|
||||
SDL_MouseButtonEvent button; /**< Mouse button event data */
|
||||
SDL_MouseWheelEvent wheel; /**< Mouse wheel event data */
|
||||
SDL_JoyAxisEvent jaxis; /**< Joystick axis event data */
|
||||
SDL_JoyBallEvent jball; /**< Joystick ball event data */
|
||||
SDL_JoyHatEvent jhat; /**< Joystick hat event data */
|
||||
SDL_JoyButtonEvent jbutton; /**< Joystick button event data */
|
||||
SDL_JoyDeviceEvent jdevice; /**< Joystick device change event data */
|
||||
SDL_ControllerAxisEvent caxis; /**< Game Controller axis event data */
|
||||
SDL_ControllerButtonEvent cbutton; /**< Game Controller button event data */
|
||||
SDL_ControllerDeviceEvent cdevice; /**< Game Controller device event data */
|
||||
SDL_ControllerTouchpadEvent ctouchpad; /**< Game Controller touchpad event data */
|
||||
SDL_ControllerSensorEvent csensor; /**< Game Controller sensor event data */
|
||||
SDL_AudioDeviceEvent adevice; /**< Audio device event data */
|
||||
SDL_SensorEvent sensor; /**< Sensor event data */
|
||||
SDL_QuitEvent quit; /**< Quit request event data */
|
||||
SDL_UserEvent user; /**< Custom event data */
|
||||
SDL_SysWMEvent syswm; /**< System dependent window event data */
|
||||
SDL_TouchFingerEvent tfinger; /**< Touch finger event data */
|
||||
SDL_MultiGestureEvent mgesture; /**< Gesture event data */
|
||||
SDL_DollarGestureEvent dgesture; /**< Gesture event data */
|
||||
SDL_DropEvent drop; /**< Drag and drop event data */
|
||||
|
||||
/* This is necessary for ABI compatibility between Visual C++ and GCC
|
||||
Visual C++ will respect the push pack pragma and use 52 bytes for
|
||||
|
|
139
externals/SDL/include/SDL_gamecontroller.h
vendored
139
externals/SDL/include/SDL_gamecontroller.h
vendored
|
@ -31,6 +31,7 @@
|
|||
#include "SDL_stdinc.h"
|
||||
#include "SDL_error.h"
|
||||
#include "SDL_rwops.h"
|
||||
#include "SDL_sensor.h"
|
||||
#include "SDL_joystick.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
|
@ -64,7 +65,9 @@ typedef enum
|
|||
SDL_CONTROLLER_TYPE_XBOXONE,
|
||||
SDL_CONTROLLER_TYPE_PS3,
|
||||
SDL_CONTROLLER_TYPE_PS4,
|
||||
SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_PRO
|
||||
SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_PRO,
|
||||
SDL_CONTROLLER_TYPE_VIRTUAL,
|
||||
SDL_CONTROLLER_TYPE_PS5
|
||||
} SDL_GameControllerType;
|
||||
|
||||
typedef enum
|
||||
|
@ -170,7 +173,7 @@ extern DECLSPEC char * SDLCALL SDL_GameControllerMappingForGUID(SDL_JoystickGUID
|
|||
*
|
||||
* \return the mapping string. Must be freed with SDL_free(). Returns NULL if no mapping is available
|
||||
*/
|
||||
extern DECLSPEC char * SDLCALL SDL_GameControllerMapping(SDL_GameController * gamecontroller);
|
||||
extern DECLSPEC char * SDLCALL SDL_GameControllerMapping(SDL_GameController *gamecontroller);
|
||||
|
||||
/**
|
||||
* Is the joystick on this index supported by the game controller interface?
|
||||
|
@ -245,19 +248,26 @@ extern DECLSPEC void SDLCALL SDL_GameControllerSetPlayerIndex(SDL_GameController
|
|||
* Get the USB vendor ID of an opened controller, if available.
|
||||
* If the vendor ID isn't available this function returns 0.
|
||||
*/
|
||||
extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetVendor(SDL_GameController * gamecontroller);
|
||||
extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetVendor(SDL_GameController *gamecontroller);
|
||||
|
||||
/**
|
||||
* Get the USB product ID of an opened controller, if available.
|
||||
* If the product ID isn't available this function returns 0.
|
||||
*/
|
||||
extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetProduct(SDL_GameController * gamecontroller);
|
||||
extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetProduct(SDL_GameController *gamecontroller);
|
||||
|
||||
/**
|
||||
* Get the product version of an opened controller, if available.
|
||||
* If the product version isn't available this function returns 0.
|
||||
*/
|
||||
extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetProductVersion(SDL_GameController * gamecontroller);
|
||||
extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetProductVersion(SDL_GameController *gamecontroller);
|
||||
|
||||
/**
|
||||
* Get the serial number of an opened controller, if available.
|
||||
*
|
||||
* Returns the serial number of the controller, or NULL if it is not available.
|
||||
*/
|
||||
extern DECLSPEC const char * SDLCALL SDL_GameControllerGetSerial(SDL_GameController *gamecontroller);
|
||||
|
||||
/**
|
||||
* Returns SDL_TRUE if the controller has been opened and currently connected,
|
||||
|
@ -328,6 +338,12 @@ extern DECLSPEC SDL_GameControllerButtonBind SDLCALL
|
|||
SDL_GameControllerGetBindForAxis(SDL_GameController *gamecontroller,
|
||||
SDL_GameControllerAxis axis);
|
||||
|
||||
/**
|
||||
* Return whether a game controller has a given axis
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL
|
||||
SDL_GameControllerHasAxis(SDL_GameController *gamecontroller, SDL_GameControllerAxis axis);
|
||||
|
||||
/**
|
||||
* Get the current state of an axis control on a game controller.
|
||||
*
|
||||
|
@ -337,8 +353,7 @@ SDL_GameControllerGetBindForAxis(SDL_GameController *gamecontroller,
|
|||
* The axis indices start at index 0.
|
||||
*/
|
||||
extern DECLSPEC Sint16 SDLCALL
|
||||
SDL_GameControllerGetAxis(SDL_GameController *gamecontroller,
|
||||
SDL_GameControllerAxis axis);
|
||||
SDL_GameControllerGetAxis(SDL_GameController *gamecontroller, SDL_GameControllerAxis axis);
|
||||
|
||||
/**
|
||||
* The list of buttons available from a controller
|
||||
|
@ -361,6 +376,12 @@ typedef enum
|
|||
SDL_CONTROLLER_BUTTON_DPAD_DOWN,
|
||||
SDL_CONTROLLER_BUTTON_DPAD_LEFT,
|
||||
SDL_CONTROLLER_BUTTON_DPAD_RIGHT,
|
||||
SDL_CONTROLLER_BUTTON_MISC1, /* Xbox Series X share button, PS5 microphone button, Nintendo Switch Pro capture button */
|
||||
SDL_CONTROLLER_BUTTON_PADDLE1, /* Xbox Elite paddle P1 */
|
||||
SDL_CONTROLLER_BUTTON_PADDLE2, /* Xbox Elite paddle P3 */
|
||||
SDL_CONTROLLER_BUTTON_PADDLE3, /* Xbox Elite paddle P2 */
|
||||
SDL_CONTROLLER_BUTTON_PADDLE4, /* Xbox Elite paddle P4 */
|
||||
SDL_CONTROLLER_BUTTON_TOUCHPAD, /* PS4/PS5 touchpad button */
|
||||
SDL_CONTROLLER_BUTTON_MAX
|
||||
} SDL_GameControllerButton;
|
||||
|
||||
|
@ -381,6 +402,11 @@ extern DECLSPEC SDL_GameControllerButtonBind SDLCALL
|
|||
SDL_GameControllerGetBindForButton(SDL_GameController *gamecontroller,
|
||||
SDL_GameControllerButton button);
|
||||
|
||||
/**
|
||||
* Return whether a game controller has a given button
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerHasButton(SDL_GameController *gamecontroller,
|
||||
SDL_GameControllerButton button);
|
||||
|
||||
/**
|
||||
* Get the current state of a button on a game controller.
|
||||
|
@ -391,7 +417,68 @@ extern DECLSPEC Uint8 SDLCALL SDL_GameControllerGetButton(SDL_GameController *ga
|
|||
SDL_GameControllerButton button);
|
||||
|
||||
/**
|
||||
* Trigger a rumble effect
|
||||
* Get the number of touchpads on a game controller.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GameControllerGetNumTouchpads(SDL_GameController *gamecontroller);
|
||||
|
||||
/**
|
||||
* Get the number of supported simultaneous fingers on a touchpad on a game controller.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GameControllerGetNumTouchpadFingers(SDL_GameController *gamecontroller, int touchpad);
|
||||
|
||||
/**
|
||||
* Get the current state of a finger on a touchpad on a game controller.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GameControllerGetTouchpadFinger(SDL_GameController *gamecontroller, int touchpad, int finger, Uint8 *state, float *x, float *y, float *pressure);
|
||||
|
||||
/**
|
||||
* Return whether a game controller has a particular sensor.
|
||||
*
|
||||
* \param gamecontroller The controller to query
|
||||
* \param type The type of sensor to query
|
||||
*
|
||||
* \return SDL_TRUE if the sensor exists, SDL_FALSE otherwise.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerHasSensor(SDL_GameController *gamecontroller, SDL_SensorType type);
|
||||
|
||||
/**
|
||||
* Set whether data reporting for a game controller sensor is enabled
|
||||
*
|
||||
* \param gamecontroller The controller to update
|
||||
* \param type The type of sensor to enable/disable
|
||||
* \param enabled Whether data reporting should be enabled
|
||||
*
|
||||
* \return 0 or -1 if an error occurred.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GameControllerSetSensorEnabled(SDL_GameController *gamecontroller, SDL_SensorType type, SDL_bool enabled);
|
||||
|
||||
/**
|
||||
* Query whether sensor data reporting is enabled for a game controller
|
||||
*
|
||||
* \param gamecontroller The controller to query
|
||||
* \param type The type of sensor to query
|
||||
*
|
||||
* \return SDL_TRUE if the sensor is enabled, SDL_FALSE otherwise.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerIsSensorEnabled(SDL_GameController *gamecontroller, SDL_SensorType type);
|
||||
|
||||
/**
|
||||
* Get the current state of a game controller sensor.
|
||||
*
|
||||
* The number of values and interpretation of the data is sensor dependent.
|
||||
* See SDL_sensor.h for the details for each type of sensor.
|
||||
*
|
||||
* \param gamecontroller The controller to query
|
||||
* \param type The type of sensor to query
|
||||
* \param data A pointer filled with the current sensor state
|
||||
* \param num_values The number of values to write to data
|
||||
*
|
||||
* \return 0 or -1 if an error occurred.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GameControllerGetSensorData(SDL_GameController *gamecontroller, SDL_SensorType type, float *data, int num_values);
|
||||
|
||||
/**
|
||||
* Start a rumble effect
|
||||
* Each call to this function cancels any previous rumble effect, and calling it with 0 intensity stops any rumbling.
|
||||
*
|
||||
* \param gamecontroller The controller to vibrate
|
||||
|
@ -399,10 +486,44 @@ extern DECLSPEC Uint8 SDLCALL SDL_GameControllerGetButton(SDL_GameController *ga
|
|||
* \param high_frequency_rumble The intensity of the high frequency (right) rumble motor, from 0 to 0xFFFF
|
||||
* \param duration_ms The duration of the rumble effect, in milliseconds
|
||||
*
|
||||
* \return 0, or -1 if rumble isn't supported on this joystick
|
||||
* \return 0, or -1 if rumble isn't supported on this controller
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GameControllerRumble(SDL_GameController *gamecontroller, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms);
|
||||
|
||||
/**
|
||||
* Start a rumble effect in the game controller's triggers
|
||||
* Each call to this function cancels any previous trigger rumble effect, and calling it with 0 intensity stops any rumbling.
|
||||
*
|
||||
* \param gamecontroller The controller to vibrate
|
||||
* \param left_rumble The intensity of the left trigger rumble motor, from 0 to 0xFFFF
|
||||
* \param right_rumble The intensity of the right trigger rumble motor, from 0 to 0xFFFF
|
||||
* \param duration_ms The duration of the rumble effect, in milliseconds
|
||||
*
|
||||
* \return 0, or -1 if rumble isn't supported on this controller
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GameControllerRumbleTriggers(SDL_GameController *gamecontroller, Uint16 left_rumble, Uint16 right_rumble, Uint32 duration_ms);
|
||||
|
||||
/**
|
||||
* Return whether a controller has an LED
|
||||
*
|
||||
* \param gamecontroller The controller to query
|
||||
*
|
||||
* \return SDL_TRUE, or SDL_FALSE if this controller does not have a modifiable LED
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerHasLED(SDL_GameController *gamecontroller);
|
||||
|
||||
/**
|
||||
* Update a controller's LED color.
|
||||
*
|
||||
* \param gamecontroller The controller to update
|
||||
* \param red The intensity of the red LED
|
||||
* \param green The intensity of the green LED
|
||||
* \param blue The intensity of the blue LED
|
||||
*
|
||||
* \return 0, or -1 if this controller does not have a modifiable LED
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GameControllerSetLED(SDL_GameController *gamecontroller, Uint8 red, Uint8 green, Uint8 blue);
|
||||
|
||||
/**
|
||||
* Close a controller previously opened with SDL_GameControllerOpen().
|
||||
*/
|
||||
|
|
9
externals/SDL/include/SDL_haptic.h
vendored
9
externals/SDL/include/SDL_haptic.h
vendored
|
@ -336,6 +336,14 @@ typedef struct _SDL_Haptic SDL_Haptic;
|
|||
*/
|
||||
#define SDL_HAPTIC_SPHERICAL 2
|
||||
|
||||
/**
|
||||
* \brief Use this value to play an effect on the steering wheel axis. This
|
||||
* provides better compatibility across platforms and devices as SDL will guess
|
||||
* the correct axis.
|
||||
* \sa SDL_HapticDirection
|
||||
*/
|
||||
#define SDL_HAPTIC_STEERING_AXIS 3
|
||||
|
||||
/* @} *//* Direction encodings */
|
||||
|
||||
/* @} *//* Haptic features */
|
||||
|
@ -444,6 +452,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
|
|||
* \sa SDL_HAPTIC_POLAR
|
||||
* \sa SDL_HAPTIC_CARTESIAN
|
||||
* \sa SDL_HAPTIC_SPHERICAL
|
||||
* \sa SDL_HAPTIC_STEERING_AXIS
|
||||
* \sa SDL_HapticEffect
|
||||
* \sa SDL_HapticNumAxes
|
||||
*/
|
||||
|
|
222
externals/SDL/include/SDL_hints.h
vendored
222
externals/SDL/include/SDL_hints.h
vendored
|
@ -314,6 +314,17 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE "SDL_MOUSE_RELATIVE_SPEED_SCALE"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether relative mouse motion is affected by renderer scaling
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - Relative motion is unaffected by DPI or renderer's logical size
|
||||
* "1" - Relative motion is scaled according to DPI scaling and logical size
|
||||
*
|
||||
* By default relative mouse deltas are affected by DPI and renderer scaling
|
||||
*/
|
||||
#define SDL_HINT_MOUSE_RELATIVE_SCALING "SDL_MOUSE_RELATIVE_SCALING"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether relative mouse mode is implemented using mouse warping
|
||||
*
|
||||
|
@ -358,7 +369,9 @@ extern "C" {
|
|||
#define SDL_HINT_MOUSE_TOUCH_EVENTS "SDL_MOUSE_TOUCH_EVENTS"
|
||||
|
||||
/**
|
||||
* \brief Minimize your SDL_Window if it loses key focus when in fullscreen mode. Defaults to true.
|
||||
* \brief Minimize your SDL_Window if it loses key focus when in fullscreen mode. Defaults to false.
|
||||
* \warning Before SDL 2.0.14, this defaulted to true! In 2.0.14, we're
|
||||
* seeing if "true" causes more problems than it solves in modern times.
|
||||
*
|
||||
*/
|
||||
#define SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS "SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS"
|
||||
|
@ -480,6 +493,7 @@ extern "C" {
|
|||
* XboxOne
|
||||
* PS3
|
||||
* PS4
|
||||
* PS5
|
||||
* SwitchPro
|
||||
*
|
||||
* This hint affects what driver is used, and must be set before calling SDL_Init(SDL_INIT_GAMECONTROLLER)
|
||||
|
@ -590,6 +604,17 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_JOYSTICK_HIDAPI_PS4 "SDL_JOYSTICK_HIDAPI_PS4"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the HIDAPI driver for PS5 controllers should be used.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - HIDAPI driver is not used
|
||||
* "1" - HIDAPI driver is used
|
||||
*
|
||||
* The default is the value of SDL_HINT_JOYSTICK_HIDAPI
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_HIDAPI_PS5 "SDL_JOYSTICK_HIDAPI_PS5"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether extended input reports should be used for PS4 controllers when using the HIDAPI driver.
|
||||
*
|
||||
|
@ -634,10 +659,23 @@ extern "C" {
|
|||
* "0" - HIDAPI driver is not used
|
||||
* "1" - HIDAPI driver is used
|
||||
*
|
||||
* The default is the value of SDL_HINT_JOYSTICK_HIDAPI
|
||||
* The default is "0" on Windows, otherwise the value of SDL_HINT_JOYSTICK_HIDAPI
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_HIDAPI_XBOX "SDL_JOYSTICK_HIDAPI_XBOX"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the HIDAPI driver for XBox controllers on Windows should pull correlated
|
||||
* data from XInput.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - HIDAPI Xbox driver will only use HIDAPI data
|
||||
* "1" - HIDAPI Xbox driver will also pull data from XInput, providing better trigger axes, guide button
|
||||
* presses, and rumble support
|
||||
*
|
||||
* The default is "1". This hint applies to any joysticks opened after setting the hint.
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_HIDAPI_CORRELATE_XINPUT "SDL_JOYSTICK_HIDAPI_CORRELATE_XINPUT"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the HIDAPI driver for Nintendo GameCube controllers should be used.
|
||||
*
|
||||
|
@ -660,6 +698,35 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_ENABLE_STEAM_CONTROLLERS "SDL_ENABLE_STEAM_CONTROLLERS"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the RAWINPUT joystick drivers should be used for better handling XInput-capable devices.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - RAWINPUT drivers are not used
|
||||
* "1" - RAWINPUT drivers are used (the default)
|
||||
*
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_RAWINPUT "SDL_JOYSTICK_RAWINPUT"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether a separate thread should be used
|
||||
* for handling joystick detection and raw input messages on Windows
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - A separate thread is not used (the default)
|
||||
* "1" - A separate thread is used for handling raw input messages
|
||||
*
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_THREAD "SDL_JOYSTICK_THREAD"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether joysticks on Linux adhere to their HID-defined deadzones or return unfiltered values.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - Return unfiltered joystick axis values (the default)
|
||||
* "1" - Return axis values with deadzones taken into account
|
||||
*/
|
||||
#define SDL_HINT_LINUX_JOYSTICK_DEADZONES "SDL_LINUX_JOYSTICK_DEADZONES"
|
||||
|
||||
/**
|
||||
* \brief If set to "0" then never set the top most bit on a SDL Window, even if the video mode expects it.
|
||||
|
@ -730,6 +797,42 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_THREAD_STACK_SIZE "SDL_THREAD_STACK_SIZE"
|
||||
|
||||
/**
|
||||
* \brief A string specifying additional information to use with SDL_SetThreadPriority.
|
||||
*
|
||||
* By default SDL_SetThreadPriority will make appropriate system changes in order to
|
||||
* apply a thread priority. For example on systems using pthreads the scheduler policy
|
||||
* is changed automatically to a policy that works well with a given priority.
|
||||
* Code which has specific requirements can override SDL's default behavior with this hint.
|
||||
*
|
||||
* pthread hint values are "current", "other", "fifo" and "rr".
|
||||
* Currently no other platform hint values are defined but may be in the future.
|
||||
*
|
||||
* \note On Linux, the kernel may send SIGKILL to realtime tasks which exceed the distro
|
||||
* configured execution budget for rtkit. This budget can be queried through RLIMIT_RTTIME
|
||||
* after calling SDL_SetThreadPriority().
|
||||
*/
|
||||
#define SDL_HINT_THREAD_PRIORITY_POLICY "SDL_THREAD_PRIORITY_POLICY"
|
||||
|
||||
/**
|
||||
* \brief Specifies whether SDL_THREAD_PRIORITY_TIME_CRITICAL should be treated as realtime.
|
||||
*
|
||||
* On some platforms, like Linux, a realtime priority thread may be subject to restrictions
|
||||
* that require special handling by the application. This hint exists to let SDL know that
|
||||
* the app is prepared to handle said restrictions.
|
||||
*
|
||||
* On Linux, SDL will apply the following configuration to any thread that becomes realtime:
|
||||
* * The SCHED_RESET_ON_FORK bit will be set on the scheduling policy,
|
||||
* * An RLIMIT_RTTIME budget will be configured to the rtkit specified limit.
|
||||
* * Exceeding this limit will result in the kernel sending SIGKILL to the app,
|
||||
* * Refer to the man pages for more information.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - default platform specific behaviour
|
||||
* "1" - Force SDL_THREAD_PRIORITY_TIME_CRITICAL to a realtime scheduling policy
|
||||
*/
|
||||
#define SDL_HINT_THREAD_FORCE_REALTIME_TIME_CRITICAL "SDL_THREAD_FORCE_REALTIME_TIME_CRITICAL"
|
||||
|
||||
/**
|
||||
* \brief If set to 1, then do not allow high-DPI windows. ("Retina" on Mac and iOS)
|
||||
*/
|
||||
|
@ -968,6 +1071,18 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_ANDROID_BLOCK_ON_PAUSE "SDL_ANDROID_BLOCK_ON_PAUSE"
|
||||
|
||||
/**
|
||||
* \brief A variable to control whether SDL will pause audio in background
|
||||
* (Requires SDL_ANDROID_BLOCK_ON_PAUSE as "Non blocking")
|
||||
*
|
||||
* The variable can be set to the following values:
|
||||
* "0" - Non paused.
|
||||
* "1" - Paused. (default)
|
||||
*
|
||||
* The value should be set before SDL is initialized.
|
||||
*/
|
||||
#define SDL_HINT_ANDROID_BLOCK_ON_PAUSE_PAUSEAUDIO "SDL_ANDROID_BLOCK_ON_PAUSE_PAUSEAUDIO"
|
||||
|
||||
/**
|
||||
* \brief A variable to control whether the return key on the soft keyboard
|
||||
* should hide the soft keyboard on Android and iOS.
|
||||
|
@ -994,10 +1109,26 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_EMSCRIPTEN_KEYBOARD_ELEMENT "SDL_EMSCRIPTEN_KEYBOARD_ELEMENT"
|
||||
|
||||
/**
|
||||
* \brief Disable giving back control to the browser automatically
|
||||
* when running with asyncify
|
||||
*
|
||||
* With -s ASYNCIFY, SDL2 calls emscripten_sleep during operations
|
||||
* such as refreshing the screen or polling events.
|
||||
*
|
||||
* This hint only applies to the emscripten platform
|
||||
*
|
||||
* The variable can be set to the following values:
|
||||
* "0" - Disable emscripten_sleep calls (if you give back browser control manually or use asyncify for other purposes)
|
||||
* "1" - Enable emscripten_sleep calls (the default)
|
||||
*/
|
||||
#define SDL_HINT_EMSCRIPTEN_ASYNCIFY "SDL_EMSCRIPTEN_ASYNCIFY"
|
||||
|
||||
/**
|
||||
* \brief Tell SDL not to catch the SIGINT or SIGTERM signals.
|
||||
*
|
||||
* This hint only applies to Unix-like platforms.
|
||||
* This hint only applies to Unix-like platforms, and should set before
|
||||
* any calls to SDL_Init()
|
||||
*
|
||||
* The variable can be set to the following values:
|
||||
* "0" - SDL will install a SIGINT and SIGTERM handler, and when it
|
||||
|
@ -1171,6 +1302,32 @@ extern "C" {
|
|||
#define SDL_HINT_RENDER_BATCHING "SDL_RENDER_BATCHING"
|
||||
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether SDL updates joystick state when getting input events
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
*
|
||||
* "0" - You'll call SDL_JoystickUpdate() manually
|
||||
* "1" - SDL will automatically call SDL_JoystickUpdate() (default)
|
||||
*
|
||||
* This hint can be toggled on and off at runtime.
|
||||
*/
|
||||
#define SDL_HINT_AUTO_UPDATE_JOYSTICKS "SDL_AUTO_UPDATE_JOYSTICKS"
|
||||
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether SDL updates sensor state when getting input events
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
*
|
||||
* "0" - You'll call SDL_SensorUpdate() manually
|
||||
* "1" - SDL will automatically call SDL_SensorUpdate() (default)
|
||||
*
|
||||
* This hint can be toggled on and off at runtime.
|
||||
*/
|
||||
#define SDL_HINT_AUTO_UPDATE_SENSORS "SDL_AUTO_UPDATE_SENSORS"
|
||||
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether SDL logs all events pushed onto its internal queue.
|
||||
*
|
||||
|
@ -1258,7 +1415,7 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_WAVE_FACT_CHUNK "SDL_WAVE_FACT_CHUNK"
|
||||
|
||||
/*
|
||||
/**
|
||||
* \brief Override for SDL_GetDisplayUsableBounds()
|
||||
*
|
||||
* If set, this hint will override the expected results for
|
||||
|
@ -1272,6 +1429,63 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_DISPLAY_USABLE_BOUNDS "SDL_DISPLAY_USABLE_BOUNDS"
|
||||
|
||||
/**
|
||||
* \brief Specify an application name for an audio device.
|
||||
*
|
||||
* Some audio backends (such as PulseAudio) allow you to describe your audio
|
||||
* stream. Among other things, this description might show up in a system
|
||||
* control panel that lets the user adjust the volume on specific audio
|
||||
* streams instead of using one giant master volume slider.
|
||||
*
|
||||
* This hints lets you transmit that information to the OS. The contents of
|
||||
* this hint are used while opening an audio device. You should use a string
|
||||
* that describes your program ("My Game 2: The Revenge")
|
||||
*
|
||||
* Setting this to "" or leaving it unset will have SDL use a reasonable
|
||||
* default: probably the application's name or "SDL Application" if SDL
|
||||
* doesn't have any better information.
|
||||
*
|
||||
* On targets where this is not supported, this hint does nothing.
|
||||
*/
|
||||
#define SDL_HINT_AUDIO_DEVICE_APP_NAME "SDL_AUDIO_DEVICE_APP_NAME"
|
||||
|
||||
/**
|
||||
* \brief Specify an application name for an audio device.
|
||||
*
|
||||
* Some audio backends (such as PulseAudio) allow you to describe your audio
|
||||
* stream. Among other things, this description might show up in a system
|
||||
* control panel that lets the user adjust the volume on specific audio
|
||||
* streams instead of using one giant master volume slider.
|
||||
*
|
||||
* This hints lets you transmit that information to the OS. The contents of
|
||||
* this hint are used while opening an audio device. You should use a string
|
||||
* that describes your what your program is playing ("audio stream" is
|
||||
* probably sufficient in many cases, but this could be useful for something
|
||||
* like "team chat" if you have a headset playing VoIP audio separately).
|
||||
*
|
||||
* Setting this to "" or leaving it unset will have SDL use a reasonable
|
||||
* default: "audio stream" or something similar.
|
||||
*
|
||||
* On targets where this is not supported, this hint does nothing.
|
||||
*/
|
||||
#define SDL_HINT_AUDIO_DEVICE_STREAM_NAME "SDL_AUDIO_DEVICE_STREAM_NAME"
|
||||
|
||||
|
||||
/**
|
||||
* \brief Override for SDL_GetPreferredLocales()
|
||||
*
|
||||
* If set, this will be favored over anything the OS might report for the
|
||||
* user's preferred locales. Changing this hint at runtime will not generate
|
||||
* a SDL_LOCALECHANGED event (but if you can change the hint, you can push
|
||||
* your own event, if you want).
|
||||
*
|
||||
* The format of this hint is a comma-separated list of language and locale,
|
||||
* combined with an underscore, as is a common format: "en_GB". Locale is
|
||||
* optional: "en". So you might have a list like this: "en_GB,jp,es_PT"
|
||||
*/
|
||||
#define SDL_HINT_PREFERRED_LOCALES "SDL_PREFERRED_LOCALES"
|
||||
|
||||
|
||||
/**
|
||||
* \brief An enumeration of hint priorities
|
||||
*/
|
||||
|
|
127
externals/SDL/include/SDL_joystick.h
vendored
127
externals/SDL/include/SDL_joystick.h
vendored
|
@ -105,6 +105,12 @@ typedef enum
|
|||
SDL_JOYSTICK_POWER_MAX
|
||||
} SDL_JoystickPowerLevel;
|
||||
|
||||
/* Set max recognized G-force from accelerometer
|
||||
See src/joystick/uikit/SDL_sysjoystick.m for notes on why this is needed
|
||||
*/
|
||||
#define SDL_IPHONE_MAX_GFORCE 5.0
|
||||
|
||||
|
||||
/* Function prototypes */
|
||||
|
||||
/**
|
||||
|
@ -199,51 +205,92 @@ extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickFromInstanceID(SDL_JoystickID
|
|||
*/
|
||||
extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickFromPlayerIndex(int player_index);
|
||||
|
||||
/**
|
||||
* Attaches a new virtual joystick.
|
||||
* Returns the joystick's device index, or -1 if an error occurred.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickAttachVirtual(SDL_JoystickType type,
|
||||
int naxes,
|
||||
int nbuttons,
|
||||
int nhats);
|
||||
|
||||
/**
|
||||
* Detaches a virtual joystick
|
||||
* Returns 0 on success, or -1 if an error occurred.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickDetachVirtual(int device_index);
|
||||
|
||||
/**
|
||||
* Indicates whether or not a virtual-joystick is at a given device index.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_JoystickIsVirtual(int device_index);
|
||||
|
||||
/**
|
||||
* Set values on an opened, virtual-joystick's controls.
|
||||
* Please note that values set here will not be applied until the next
|
||||
* call to SDL_JoystickUpdate, which can either be called directly,
|
||||
* or can be called indirectly through various other SDL APIS,
|
||||
* including, but not limited to the following: SDL_PollEvent,
|
||||
* SDL_PumpEvents, SDL_WaitEventTimeout, SDL_WaitEvent.
|
||||
*
|
||||
* Returns 0 on success, -1 on error.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickSetVirtualAxis(SDL_Joystick *joystick, int axis, Sint16 value);
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickSetVirtualButton(SDL_Joystick *joystick, int button, Uint8 value);
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickSetVirtualHat(SDL_Joystick *joystick, int hat, Uint8 value);
|
||||
|
||||
/**
|
||||
* Return the name for this currently opened joystick.
|
||||
* If no name can be found, this function returns NULL.
|
||||
*/
|
||||
extern DECLSPEC const char *SDLCALL SDL_JoystickName(SDL_Joystick * joystick);
|
||||
extern DECLSPEC const char *SDLCALL SDL_JoystickName(SDL_Joystick *joystick);
|
||||
|
||||
/**
|
||||
* Get the player index of an opened joystick, or -1 if it's not available
|
||||
*
|
||||
* For XInput controllers this returns the XInput user index.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickGetPlayerIndex(SDL_Joystick * joystick);
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickGetPlayerIndex(SDL_Joystick *joystick);
|
||||
|
||||
/**
|
||||
* Set the player index of an opened joystick
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_JoystickSetPlayerIndex(SDL_Joystick * joystick, int player_index);
|
||||
extern DECLSPEC void SDLCALL SDL_JoystickSetPlayerIndex(SDL_Joystick *joystick, int player_index);
|
||||
|
||||
/**
|
||||
* Return the GUID for this opened joystick
|
||||
*/
|
||||
extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetGUID(SDL_Joystick * joystick);
|
||||
extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetGUID(SDL_Joystick *joystick);
|
||||
|
||||
/**
|
||||
* Get the USB vendor ID of an opened joystick, if available.
|
||||
* If the vendor ID isn't available this function returns 0.
|
||||
*/
|
||||
extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetVendor(SDL_Joystick * joystick);
|
||||
extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetVendor(SDL_Joystick *joystick);
|
||||
|
||||
/**
|
||||
* Get the USB product ID of an opened joystick, if available.
|
||||
* If the product ID isn't available this function returns 0.
|
||||
*/
|
||||
extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetProduct(SDL_Joystick * joystick);
|
||||
extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetProduct(SDL_Joystick *joystick);
|
||||
|
||||
/**
|
||||
* Get the product version of an opened joystick, if available.
|
||||
* If the product version isn't available this function returns 0.
|
||||
*/
|
||||
extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetProductVersion(SDL_Joystick * joystick);
|
||||
extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetProductVersion(SDL_Joystick *joystick);
|
||||
|
||||
/**
|
||||
* Get the serial number of an opened joystick, if available.
|
||||
*
|
||||
* Returns the serial number of the joystick, or NULL if it is not available.
|
||||
*/
|
||||
extern DECLSPEC const char * SDLCALL SDL_JoystickGetSerial(SDL_Joystick *joystick);
|
||||
|
||||
/**
|
||||
* Get the type of an opened joystick.
|
||||
*/
|
||||
extern DECLSPEC SDL_JoystickType SDLCALL SDL_JoystickGetType(SDL_Joystick * joystick);
|
||||
extern DECLSPEC SDL_JoystickType SDLCALL SDL_JoystickGetType(SDL_Joystick *joystick);
|
||||
|
||||
/**
|
||||
* Return a string representation for this guid. pszGUID must point to at least 33 bytes
|
||||
|
@ -259,17 +306,17 @@ extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetGUIDFromString(const cha
|
|||
/**
|
||||
* Returns SDL_TRUE if the joystick has been opened and currently connected, or SDL_FALSE if it has not.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_JoystickGetAttached(SDL_Joystick * joystick);
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_JoystickGetAttached(SDL_Joystick *joystick);
|
||||
|
||||
/**
|
||||
* Get the instance ID of an opened joystick or -1 if the joystick is invalid.
|
||||
*/
|
||||
extern DECLSPEC SDL_JoystickID SDLCALL SDL_JoystickInstanceID(SDL_Joystick * joystick);
|
||||
extern DECLSPEC SDL_JoystickID SDLCALL SDL_JoystickInstanceID(SDL_Joystick *joystick);
|
||||
|
||||
/**
|
||||
* Get the number of general axis controls on a joystick.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickNumAxes(SDL_Joystick * joystick);
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickNumAxes(SDL_Joystick *joystick);
|
||||
|
||||
/**
|
||||
* Get the number of trackballs on a joystick.
|
||||
|
@ -277,17 +324,17 @@ extern DECLSPEC int SDLCALL SDL_JoystickNumAxes(SDL_Joystick * joystick);
|
|||
* Joystick trackballs have only relative motion events associated
|
||||
* with them and their state cannot be polled.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickNumBalls(SDL_Joystick * joystick);
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickNumBalls(SDL_Joystick *joystick);
|
||||
|
||||
/**
|
||||
* Get the number of POV hats on a joystick.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickNumHats(SDL_Joystick * joystick);
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickNumHats(SDL_Joystick *joystick);
|
||||
|
||||
/**
|
||||
* Get the number of buttons on a joystick.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickNumButtons(SDL_Joystick * joystick);
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickNumButtons(SDL_Joystick *joystick);
|
||||
|
||||
/**
|
||||
* Update the current state of the open joysticks.
|
||||
|
@ -317,7 +364,7 @@ extern DECLSPEC int SDLCALL SDL_JoystickEventState(int state);
|
|||
*
|
||||
* The axis indices start at index 0.
|
||||
*/
|
||||
extern DECLSPEC Sint16 SDLCALL SDL_JoystickGetAxis(SDL_Joystick * joystick,
|
||||
extern DECLSPEC Sint16 SDLCALL SDL_JoystickGetAxis(SDL_Joystick *joystick,
|
||||
int axis);
|
||||
|
||||
/**
|
||||
|
@ -329,7 +376,7 @@ extern DECLSPEC Sint16 SDLCALL SDL_JoystickGetAxis(SDL_Joystick * joystick,
|
|||
*
|
||||
* \return SDL_TRUE if this axis has any initial value, or SDL_FALSE if not.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_JoystickGetAxisInitialState(SDL_Joystick * joystick,
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_JoystickGetAxisInitialState(SDL_Joystick *joystick,
|
||||
int axis, Sint16 *state);
|
||||
|
||||
/**
|
||||
|
@ -363,7 +410,7 @@ extern DECLSPEC SDL_bool SDLCALL SDL_JoystickGetAxisInitialState(SDL_Joystick *
|
|||
* - ::SDL_HAT_LEFTUP
|
||||
* - ::SDL_HAT_LEFTDOWN
|
||||
*/
|
||||
extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetHat(SDL_Joystick * joystick,
|
||||
extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetHat(SDL_Joystick *joystick,
|
||||
int hat);
|
||||
|
||||
/**
|
||||
|
@ -373,7 +420,7 @@ extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetHat(SDL_Joystick * joystick,
|
|||
*
|
||||
* The ball indices start at index 0.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickGetBall(SDL_Joystick * joystick,
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickGetBall(SDL_Joystick *joystick,
|
||||
int ball, int *dx, int *dy);
|
||||
|
||||
/**
|
||||
|
@ -381,11 +428,11 @@ extern DECLSPEC int SDLCALL SDL_JoystickGetBall(SDL_Joystick * joystick,
|
|||
*
|
||||
* The button indices start at index 0.
|
||||
*/
|
||||
extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetButton(SDL_Joystick * joystick,
|
||||
extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetButton(SDL_Joystick *joystick,
|
||||
int button);
|
||||
|
||||
/**
|
||||
* Trigger a rumble effect
|
||||
* Start a rumble effect
|
||||
* Each call to this function cancels any previous rumble effect, and calling it with 0 intensity stops any rumbling.
|
||||
*
|
||||
* \param joystick The joystick to vibrate
|
||||
|
@ -395,17 +442,51 @@ extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetButton(SDL_Joystick * joystick,
|
|||
*
|
||||
* \return 0, or -1 if rumble isn't supported on this joystick
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickRumble(SDL_Joystick * joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms);
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms);
|
||||
|
||||
/**
|
||||
* Start a rumble effect in the joystick's triggers
|
||||
* Each call to this function cancels any previous trigger rumble effect, and calling it with 0 intensity stops any rumbling.
|
||||
*
|
||||
* \param joystick The joystick to vibrate
|
||||
* \param left_rumble The intensity of the left trigger rumble motor, from 0 to 0xFFFF
|
||||
* \param right_rumble The intensity of the right trigger rumble motor, from 0 to 0xFFFF
|
||||
* \param duration_ms The duration of the rumble effect, in milliseconds
|
||||
*
|
||||
* \return 0, or -1 if trigger rumble isn't supported on this joystick
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickRumbleTriggers(SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble, Uint32 duration_ms);
|
||||
|
||||
/**
|
||||
* Return whether a joystick has an LED
|
||||
*
|
||||
* \param joystick The joystick to query
|
||||
*
|
||||
* \return SDL_TRUE, or SDL_FALSE if this joystick does not have a modifiable LED
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_JoystickHasLED(SDL_Joystick *joystick);
|
||||
|
||||
/**
|
||||
* Update a joystick's LED color.
|
||||
*
|
||||
* \param joystick The joystick to update
|
||||
* \param red The intensity of the red LED
|
||||
* \param green The intensity of the green LED
|
||||
* \param blue The intensity of the blue LED
|
||||
*
|
||||
* \return 0, or -1 if this joystick does not have a modifiable LED
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickSetLED(SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue);
|
||||
|
||||
/**
|
||||
* Close a joystick previously opened with SDL_JoystickOpen().
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_JoystickClose(SDL_Joystick * joystick);
|
||||
extern DECLSPEC void SDLCALL SDL_JoystickClose(SDL_Joystick *joystick);
|
||||
|
||||
/**
|
||||
* Return the battery level of this joystick
|
||||
*/
|
||||
extern DECLSPEC SDL_JoystickPowerLevel SDLCALL SDL_JoystickCurrentPowerLevel(SDL_Joystick * joystick);
|
||||
extern DECLSPEC SDL_JoystickPowerLevel SDLCALL SDL_JoystickCurrentPowerLevel(SDL_Joystick *joystick);
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
|
|
14
externals/SDL/include/SDL_keycode.h
vendored
14
externals/SDL/include/SDL_keycode.h
vendored
|
@ -88,9 +88,11 @@ typedef enum
|
|||
SDLK_GREATER = '>',
|
||||
SDLK_QUESTION = '?',
|
||||
SDLK_AT = '@',
|
||||
|
||||
/*
|
||||
Skip uppercase letters
|
||||
*/
|
||||
|
||||
SDLK_LEFTBRACKET = '[',
|
||||
SDLK_BACKSLASH = '\\',
|
||||
SDLK_RIGHTBRACKET = ']',
|
||||
|
@ -336,13 +338,13 @@ typedef enum
|
|||
KMOD_NUM = 0x1000,
|
||||
KMOD_CAPS = 0x2000,
|
||||
KMOD_MODE = 0x4000,
|
||||
KMOD_RESERVED = 0x8000
|
||||
} SDL_Keymod;
|
||||
KMOD_RESERVED = 0x8000,
|
||||
|
||||
#define KMOD_CTRL (KMOD_LCTRL|KMOD_RCTRL)
|
||||
#define KMOD_SHIFT (KMOD_LSHIFT|KMOD_RSHIFT)
|
||||
#define KMOD_ALT (KMOD_LALT|KMOD_RALT)
|
||||
#define KMOD_GUI (KMOD_LGUI|KMOD_RGUI)
|
||||
KMOD_CTRL = KMOD_LCTRL | KMOD_RCTRL,
|
||||
KMOD_SHIFT = KMOD_LSHIFT | KMOD_RSHIFT,
|
||||
KMOD_ALT = KMOD_LALT | KMOD_RALT,
|
||||
KMOD_GUI = KMOD_LGUI | KMOD_RGUI
|
||||
} SDL_Keymod;
|
||||
|
||||
#endif /* SDL_keycode_h_ */
|
||||
|
||||
|
|
101
externals/SDL/include/SDL_locale.h
vendored
Executable file
101
externals/SDL/include/SDL_locale.h
vendored
Executable file
|
@ -0,0 +1,101 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file SDL_locale.h
|
||||
*
|
||||
* Include file for SDL locale services
|
||||
*/
|
||||
|
||||
#ifndef _SDL_locale_h
|
||||
#define _SDL_locale_h
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_error.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
/* *INDENT-OFF* */
|
||||
extern "C" {
|
||||
/* *INDENT-ON* */
|
||||
#endif
|
||||
|
||||
|
||||
typedef struct SDL_Locale
|
||||
{
|
||||
const char *language; /**< A language name, like "en" for English. */
|
||||
const char *country; /**< A country, like "US" for America. Can be NULL. */
|
||||
} SDL_Locale;
|
||||
|
||||
/**
|
||||
* \brief Report the user's preferred locale.
|
||||
*
|
||||
* This returns an array of SDL_Locale structs, the final item zeroed out.
|
||||
* When the caller is done with this array, it should call SDL_free() on
|
||||
* the returned value; all the memory involved is allocated in a single
|
||||
* block, so a single SDL_free() will suffice.
|
||||
*
|
||||
* Returned language strings are in the format xx, where 'xx' is an ISO-639
|
||||
* language specifier (such as "en" for English, "de" for German, etc).
|
||||
* Country strings are in the format YY, where "YY" is an ISO-3166 country
|
||||
* code (such as "US" for the United States, "CA" for Canada, etc). Country
|
||||
* might be NULL if there's no specific guidance on them (so you might get
|
||||
* { "en", "US" } for American English, but { "en", NULL } means "English
|
||||
* language, generically"). Language strings are never NULL, except to
|
||||
* terminate the array.
|
||||
*
|
||||
* Please note that not all of these strings are 2 characters; some are
|
||||
* three or more.
|
||||
*
|
||||
* The returned list of locales are in the order of the user's preference.
|
||||
* For example, a German citizen that is fluent in US English and knows
|
||||
* enough Japanese to navigate around Tokyo might have a list like:
|
||||
* { "de", "en_US", "jp", NULL }. Someone from England might prefer British
|
||||
* English (where "color" is spelled "colour", etc), but will settle for
|
||||
* anything like it: { "en_GB", "en", NULL }.
|
||||
*
|
||||
* This function returns NULL on error, including when the platform does not
|
||||
* supply this information at all.
|
||||
*
|
||||
* This might be a "slow" call that has to query the operating system. It's
|
||||
* best to ask for this once and save the results. However, this list can
|
||||
* change, usually because the user has changed a system preference outside
|
||||
* of your program; SDL will send an SDL_LOCALECHANGED event in this case,
|
||||
* if possible, and you can call this function again to get an updated copy
|
||||
* of preferred locales.
|
||||
*
|
||||
* \return array of locales, terminated with a locale with a NULL language
|
||||
* field. Will return NULL on error.
|
||||
*/
|
||||
extern DECLSPEC SDL_Locale * SDLCALL SDL_GetPreferredLocales(void);
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
/* *INDENT-OFF* */
|
||||
}
|
||||
/* *INDENT-ON* */
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_locale_h */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
44
externals/SDL/include/SDL_metal.h
vendored
44
externals/SDL/include/SDL_metal.h
vendored
|
@ -55,18 +55,13 @@ typedef void *SDL_MetalView;
|
|||
* On macOS, this does *not* associate a MTLDevice with the CAMetalLayer on its
|
||||
* own. It is up to user code to do that.
|
||||
*
|
||||
* The returned handle can be casted directly to a NSView or UIView, and the
|
||||
* CAMetalLayer can be accessed from the view's 'layer' property.
|
||||
* The returned handle can be casted directly to a NSView or UIView.
|
||||
* To access the backing CAMetalLayer, call SDL_Metal_GetLayer().
|
||||
*
|
||||
* \code
|
||||
* SDL_MetalView metalview = SDL_Metal_CreateView(window);
|
||||
* UIView *uiview = (__bridge UIView *)metalview;
|
||||
* CAMetalLayer *metallayer = (CAMetalLayer *)uiview.layer;
|
||||
* // [...]
|
||||
* SDL_Metal_DestroyView(metalview);
|
||||
* \endcode
|
||||
* \note \a window must be created with the SDL_WINDOW_METAL flag.
|
||||
*
|
||||
* \sa SDL_Metal_DestroyView
|
||||
* \sa SDL_Metal_GetLayer
|
||||
*/
|
||||
extern DECLSPEC SDL_MetalView SDLCALL SDL_Metal_CreateView(SDL_Window * window);
|
||||
|
||||
|
@ -80,6 +75,37 @@ extern DECLSPEC SDL_MetalView SDLCALL SDL_Metal_CreateView(SDL_Window * window);
|
|||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_Metal_DestroyView(SDL_MetalView view);
|
||||
|
||||
/**
|
||||
* \brief Get a pointer to the backing CAMetalLayer for the given view.
|
||||
*
|
||||
* \sa SDL_MetalCreateView
|
||||
*/
|
||||
extern DECLSPEC void *SDLCALL SDL_Metal_GetLayer(SDL_MetalView view);
|
||||
|
||||
/**
|
||||
* \brief Get the size of a window's underlying drawable in pixels (for use
|
||||
* with setting viewport, scissor & etc).
|
||||
*
|
||||
* \param window SDL_Window from which the drawable size should be queried
|
||||
* \param w Pointer to variable for storing the width in pixels,
|
||||
* may be NULL
|
||||
* \param h Pointer to variable for storing the height in pixels,
|
||||
* may be NULL
|
||||
*
|
||||
* This may differ from SDL_GetWindowSize() if we're rendering to a high-DPI
|
||||
* drawable, i.e. the window was created with SDL_WINDOW_ALLOW_HIGHDPI on a
|
||||
* platform with high-DPI support (Apple calls this "Retina"), and not disabled
|
||||
* by the \c SDL_HINT_VIDEO_HIGHDPI_DISABLED hint.
|
||||
*
|
||||
* \note On macOS high-DPI support must be enabled for an application by
|
||||
* setting NSHighResolutionCapable to true in its Info.plist.
|
||||
*
|
||||
* \sa SDL_GetWindowSize()
|
||||
* \sa SDL_CreateWindow()
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_Metal_GetDrawableSize(SDL_Window* window, int *w,
|
||||
int *h);
|
||||
|
||||
/* @} *//* Metal support functions */
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
|
|
75
externals/SDL/include/SDL_misc.h
vendored
Executable file
75
externals/SDL/include/SDL_misc.h
vendored
Executable file
|
@ -0,0 +1,75 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file SDL_misc.h
|
||||
*
|
||||
* \brief Include file for SDL API functions that don't fit elsewhere.
|
||||
*/
|
||||
|
||||
#ifndef SDL_misc_h_
|
||||
#define SDL_misc_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \brief Open an URL / URI in the browser or other
|
||||
*
|
||||
* Open a URL in a separate, system-provided application. How this works will
|
||||
* vary wildly depending on the platform. This will likely launch what
|
||||
* makes sense to handle a specific URL's protocol (a web browser for http://,
|
||||
* etc), but it might also be able to launch file managers for directories
|
||||
* and other things.
|
||||
*
|
||||
* What happens when you open a URL varies wildly as well: your game window
|
||||
* may lose focus (and may or may not lose focus if your game was fullscreen
|
||||
* or grabbing input at the time). On mobile devices, your app will likely
|
||||
* move to the background or your process might be paused. Any given platform
|
||||
* may or may not handle a given URL.
|
||||
*
|
||||
* If this is unimplemented (or simply unavailable) for a platform, this will
|
||||
* fail with an error. A successful result does not mean the URL loaded, just
|
||||
* that we launched something to handle it (or at least believe we did).
|
||||
*
|
||||
* All this to say: this function can be useful, but you should definitely
|
||||
* test it on every platform you target.
|
||||
*
|
||||
* \param url A valid URL to open.
|
||||
* \return 0 on success, or -1 on error.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_OpenURL(const char *url);
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* SDL_misc_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
18
externals/SDL/include/SDL_pixels.h
vendored
18
externals/SDL/include/SDL_pixels.h
vendored
|
@ -188,18 +188,22 @@ typedef enum
|
|||
SDL_PIXELFORMAT_RGB332 =
|
||||
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED8, SDL_PACKEDORDER_XRGB,
|
||||
SDL_PACKEDLAYOUT_332, 8, 1),
|
||||
SDL_PIXELFORMAT_RGB444 =
|
||||
SDL_PIXELFORMAT_XRGB4444 =
|
||||
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XRGB,
|
||||
SDL_PACKEDLAYOUT_4444, 12, 2),
|
||||
SDL_PIXELFORMAT_BGR444 =
|
||||
SDL_PIXELFORMAT_RGB444 = SDL_PIXELFORMAT_XRGB4444,
|
||||
SDL_PIXELFORMAT_XBGR4444 =
|
||||
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XBGR,
|
||||
SDL_PACKEDLAYOUT_4444, 12, 2),
|
||||
SDL_PIXELFORMAT_RGB555 =
|
||||
SDL_PIXELFORMAT_BGR444 = SDL_PIXELFORMAT_XBGR4444,
|
||||
SDL_PIXELFORMAT_XRGB1555 =
|
||||
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XRGB,
|
||||
SDL_PACKEDLAYOUT_1555, 15, 2),
|
||||
SDL_PIXELFORMAT_BGR555 =
|
||||
SDL_PIXELFORMAT_RGB555 = SDL_PIXELFORMAT_XRGB1555,
|
||||
SDL_PIXELFORMAT_XBGR1555 =
|
||||
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XBGR,
|
||||
SDL_PACKEDLAYOUT_1555, 15, 2),
|
||||
SDL_PIXELFORMAT_BGR555 = SDL_PIXELFORMAT_XBGR1555,
|
||||
SDL_PIXELFORMAT_ARGB4444 =
|
||||
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_ARGB,
|
||||
SDL_PACKEDLAYOUT_4444, 16, 2),
|
||||
|
@ -236,15 +240,17 @@ typedef enum
|
|||
SDL_PIXELFORMAT_BGR24 =
|
||||
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYU8, SDL_ARRAYORDER_BGR, 0,
|
||||
24, 3),
|
||||
SDL_PIXELFORMAT_RGB888 =
|
||||
SDL_PIXELFORMAT_XRGB8888 =
|
||||
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_XRGB,
|
||||
SDL_PACKEDLAYOUT_8888, 24, 4),
|
||||
SDL_PIXELFORMAT_RGB888 = SDL_PIXELFORMAT_XRGB8888,
|
||||
SDL_PIXELFORMAT_RGBX8888 =
|
||||
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_RGBX,
|
||||
SDL_PACKEDLAYOUT_8888, 24, 4),
|
||||
SDL_PIXELFORMAT_BGR888 =
|
||||
SDL_PIXELFORMAT_XBGR8888 =
|
||||
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_XBGR,
|
||||
SDL_PACKEDLAYOUT_8888, 24, 4),
|
||||
SDL_PIXELFORMAT_BGR888 = SDL_PIXELFORMAT_XBGR8888,
|
||||
SDL_PIXELFORMAT_BGRX8888 =
|
||||
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_BGRX,
|
||||
SDL_PACKEDLAYOUT_8888, 24, 4),
|
||||
|
|
10
externals/SDL/include/SDL_rwops.h
vendored
10
externals/SDL/include/SDL_rwops.h
vendored
|
@ -96,15 +96,7 @@ typedef struct SDL_RWops
|
|||
#if defined(__ANDROID__)
|
||||
struct
|
||||
{
|
||||
void *fileNameRef;
|
||||
void *inputStreamRef;
|
||||
void *readableByteChannelRef;
|
||||
void *readMethod;
|
||||
void *assetFileDescriptorRef;
|
||||
long position;
|
||||
long size;
|
||||
long offset;
|
||||
int fd;
|
||||
void *asset;
|
||||
} androidio;
|
||||
#elif defined(__WIN32__)
|
||||
struct
|
||||
|
|
32
externals/SDL/include/SDL_sensor.h
vendored
32
externals/SDL/include/SDL_sensor.h
vendored
|
@ -78,14 +78,16 @@ typedef enum
|
|||
* Accelerometer sensor
|
||||
*
|
||||
* The accelerometer returns the current acceleration in SI meters per
|
||||
* second squared. This includes gravity, so a device at rest will have
|
||||
* an acceleration of SDL_STANDARD_GRAVITY straight down.
|
||||
* second squared. This measurement includes the force of gravity, so
|
||||
* a device at rest will have an value of SDL_STANDARD_GRAVITY away
|
||||
* from the center of the earth.
|
||||
*
|
||||
* values[0]: Acceleration on the x axis
|
||||
* values[1]: Acceleration on the y axis
|
||||
* values[2]: Acceleration on the z axis
|
||||
*
|
||||
* For phones held in portrait mode, the axes are defined as follows:
|
||||
* For phones held in portrait mode and game controllers held in front of you,
|
||||
* the axes are defined as follows:
|
||||
* -X ... +X : left ... right
|
||||
* -Y ... +Y : bottom ... top
|
||||
* -Z ... +Z : farther ... closer
|
||||
|
@ -105,22 +107,36 @@ typedef enum
|
|||
* see positive rotation on that axis when it appeared to be rotating
|
||||
* counter-clockwise.
|
||||
*
|
||||
* values[0]: Angular speed around the x axis
|
||||
* values[1]: Angular speed around the y axis
|
||||
* values[2]: Angular speed around the z axis
|
||||
* values[0]: Angular speed around the x axis (pitch)
|
||||
* values[1]: Angular speed around the y axis (yaw)
|
||||
* values[2]: Angular speed around the z axis (roll)
|
||||
*
|
||||
* For phones held in portrait mode, the axes are defined as follows:
|
||||
* For phones held in portrait mode and game controllers held in front of you,
|
||||
* the axes are defined as follows:
|
||||
* -X ... +X : left ... right
|
||||
* -Y ... +Y : bottom ... top
|
||||
* -Z ... +Z : farther ... closer
|
||||
*
|
||||
* The axis data is not changed when the phone is rotated.
|
||||
* The axis data is not changed when the phone or controller is rotated.
|
||||
*
|
||||
* \sa SDL_GetDisplayOrientation()
|
||||
*/
|
||||
|
||||
/* Function prototypes */
|
||||
|
||||
/**
|
||||
* Locking for multi-threaded access to the sensor API
|
||||
*
|
||||
* If you are using the sensor API or handling events from multiple threads
|
||||
* you should use these locking functions to protect access to the sensors.
|
||||
*
|
||||
* In particular, you are guaranteed that the sensor list won't change, so
|
||||
* the API functions that take a sensor index will be valid, and sensor
|
||||
* events will not be delivered.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_LockSensors(void);
|
||||
extern DECLSPEC void SDLCALL SDL_UnlockSensors(void);
|
||||
|
||||
/**
|
||||
* \brief Count the number of sensors attached to the system right now
|
||||
*/
|
||||
|
|
32
externals/SDL/include/SDL_stdinc.h
vendored
32
externals/SDL/include/SDL_stdinc.h
vendored
|
@ -30,6 +30,12 @@
|
|||
|
||||
#include "SDL_config.h"
|
||||
|
||||
#ifdef __APPLE__
|
||||
#ifndef _DARWIN_C_SOURCE
|
||||
#define _DARWIN_C_SOURCE 1 /* for memset_pattern4() */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
@ -413,6 +419,8 @@ extern DECLSPEC int SDLCALL SDL_islower(int x);
|
|||
extern DECLSPEC int SDLCALL SDL_toupper(int x);
|
||||
extern DECLSPEC int SDLCALL SDL_tolower(int x);
|
||||
|
||||
extern DECLSPEC Uint32 SDLCALL SDL_crc32(Uint32 crc, const void *data, size_t len);
|
||||
|
||||
extern DECLSPEC void *SDLCALL SDL_memset(SDL_OUT_BYTECAP(len) void *dst, int c, size_t len);
|
||||
|
||||
#define SDL_zero(x) SDL_memset(&(x), 0, sizeof((x)))
|
||||
|
@ -463,6 +471,8 @@ extern DECLSPEC wchar_t *SDLCALL SDL_wcsstr(const wchar_t *haystack, const wchar
|
|||
|
||||
extern DECLSPEC int SDLCALL SDL_wcscmp(const wchar_t *str1, const wchar_t *str2);
|
||||
extern DECLSPEC int SDLCALL SDL_wcsncmp(const wchar_t *str1, const wchar_t *str2, size_t maxlen);
|
||||
extern DECLSPEC int SDLCALL SDL_wcscasecmp(const wchar_t *str1, const wchar_t *str2);
|
||||
extern DECLSPEC int SDLCALL SDL_wcsncasecmp(const wchar_t *str1, const wchar_t *str2, size_t len);
|
||||
|
||||
extern DECLSPEC size_t SDLCALL SDL_strlen(const char *str);
|
||||
extern DECLSPEC size_t SDLCALL SDL_strlcpy(SDL_OUT_Z_CAP(maxlen) char *dst, const char *src, size_t maxlen);
|
||||
|
@ -529,6 +539,8 @@ extern DECLSPEC double SDLCALL SDL_fabs(double x);
|
|||
extern DECLSPEC float SDLCALL SDL_fabsf(float x);
|
||||
extern DECLSPEC double SDLCALL SDL_floor(double x);
|
||||
extern DECLSPEC float SDLCALL SDL_floorf(float x);
|
||||
extern DECLSPEC double SDLCALL SDL_trunc(double x);
|
||||
extern DECLSPEC float SDLCALL SDL_truncf(float x);
|
||||
extern DECLSPEC double SDLCALL SDL_fmod(double x, double y);
|
||||
extern DECLSPEC float SDLCALL SDL_fmodf(float x, float y);
|
||||
extern DECLSPEC double SDLCALL SDL_log(double x);
|
||||
|
@ -575,6 +587,17 @@ extern DECLSPEC char *SDLCALL SDL_iconv_string(const char *tocode,
|
|||
/* force builds using Clang's static analysis tools to use literal C runtime
|
||||
here, since there are possibly tests that are ineffective otherwise. */
|
||||
#if defined(__clang_analyzer__) && !defined(SDL_DISABLE_ANALYZE_MACROS)
|
||||
|
||||
/* The analyzer knows about strlcpy even when the system doesn't provide it */
|
||||
#ifndef HAVE_STRLCPY
|
||||
size_t strlcpy(char* dst, const char* src, size_t size);
|
||||
#endif
|
||||
|
||||
/* The analyzer knows about strlcat even when the system doesn't provide it */
|
||||
#ifndef HAVE_STRLCAT
|
||||
size_t strlcat(char* dst, const char* src, size_t size);
|
||||
#endif
|
||||
|
||||
#define SDL_malloc malloc
|
||||
#define SDL_calloc calloc
|
||||
#define SDL_realloc realloc
|
||||
|
@ -583,16 +606,23 @@ extern DECLSPEC char *SDLCALL SDL_iconv_string(const char *tocode,
|
|||
#define SDL_memcpy memcpy
|
||||
#define SDL_memmove memmove
|
||||
#define SDL_memcmp memcmp
|
||||
#define SDL_strlen strlen
|
||||
#define SDL_strlcpy strlcpy
|
||||
#define SDL_strlcat strlcat
|
||||
#define SDL_strlen strlen
|
||||
#define SDL_wcslen wcslen
|
||||
#define SDL_wcslcpy wcslcpy
|
||||
#define SDL_wcslcat wcslcat
|
||||
#define SDL_strdup strdup
|
||||
#define SDL_wcsdup wcsdup
|
||||
#define SDL_strchr strchr
|
||||
#define SDL_strrchr strrchr
|
||||
#define SDL_strstr strstr
|
||||
#define SDL_wcsstr wcsstr
|
||||
#define SDL_strtokr strtok_r
|
||||
#define SDL_strcmp strcmp
|
||||
#define SDL_wcscmp wcscmp
|
||||
#define SDL_strncmp strncmp
|
||||
#define SDL_wcsncmp wcsncmp
|
||||
#define SDL_strcasecmp strcasecmp
|
||||
#define SDL_strncasecmp strncasecmp
|
||||
#define SDL_sscanf sscanf
|
||||
|
|
11
externals/SDL/include/SDL_surface.h
vendored
11
externals/SDL/include/SDL_surface.h
vendored
|
@ -80,7 +80,9 @@ typedef struct SDL_Surface
|
|||
|
||||
/** information needed for surfaces requiring locks */
|
||||
int locked; /**< Read-only */
|
||||
void *lock_data; /**< Read-only */
|
||||
|
||||
/** list of BlitMap that hold a reference to this surface */
|
||||
void *list_blitmap; /**< Private */
|
||||
|
||||
/** clipping information */
|
||||
SDL_Rect clip_rect; /**< Read-only */
|
||||
|
@ -235,6 +237,13 @@ extern DECLSPEC int SDLCALL SDL_SaveBMP_RW
|
|||
extern DECLSPEC int SDLCALL SDL_SetSurfaceRLE(SDL_Surface * surface,
|
||||
int flag);
|
||||
|
||||
/**
|
||||
* \brief Returns whether the surface is RLE enabled
|
||||
*
|
||||
* \return SDL_TRUE if the surface is RLE enabled, or SDL_FALSE if the surface is NULL or not RLE enabled
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasSurfaceRLE(SDL_Surface * surface);
|
||||
|
||||
/**
|
||||
* \brief Sets the color key (transparent pixel) in a blittable surface.
|
||||
*
|
||||
|
|
9
externals/SDL/include/SDL_system.h
vendored
9
externals/SDL/include/SDL_system.h
vendored
|
@ -123,6 +123,7 @@ extern DECLSPEC void * SDLCALL SDL_AndroidGetActivity(void);
|
|||
/**
|
||||
\brief Return API level of the current device
|
||||
|
||||
API level 30: Android 11
|
||||
API level 29: Android 10
|
||||
API level 28: Android 9
|
||||
API level 27: Android 8.1
|
||||
|
@ -198,6 +199,14 @@ extern DECLSPEC int SDLCALL SDL_AndroidGetExternalStorageState(void);
|
|||
*/
|
||||
extern DECLSPEC const char * SDLCALL SDL_AndroidGetExternalStoragePath(void);
|
||||
|
||||
/**
|
||||
\brief Request permissions at runtime.
|
||||
|
||||
This blocks the calling thread until the permission is granted or
|
||||
denied. Returns SDL_TRUE if the permission was granted.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_AndroidRequestPermission(const char *permission);
|
||||
|
||||
#endif /* __ANDROID__ */
|
||||
|
||||
/* Platform specific functions for WinRT */
|
||||
|
|
23
externals/SDL/include/SDL_syswm.h
vendored
23
externals/SDL/include/SDL_syswm.h
vendored
|
@ -106,6 +106,11 @@ typedef void *EGLSurface;
|
|||
#if defined(SDL_VIDEO_DRIVER_VIVANTE)
|
||||
#include "SDL_egl.h"
|
||||
#endif
|
||||
|
||||
#if defined(SDL_VIDEO_DRIVER_OS2)
|
||||
#define INCL_WIN
|
||||
#include <os2.h>
|
||||
#endif
|
||||
#endif /* SDL_PROTOTYPES_ONLY */
|
||||
|
||||
|
||||
|
@ -186,6 +191,16 @@ struct SDL_SysWMmsg
|
|||
int dummy;
|
||||
/* No Vivante window events yet */
|
||||
} vivante;
|
||||
#endif
|
||||
#if defined(SDL_VIDEO_DRIVER_OS2)
|
||||
struct
|
||||
{
|
||||
BOOL fFrame; /**< TRUE if hwnd is a frame window */
|
||||
HWND hwnd; /**< The window receiving the message */
|
||||
ULONG msg; /**< The message identifier */
|
||||
MPARAM mp1; /**< The first first message parameter */
|
||||
MPARAM mp2; /**< The second first message parameter */
|
||||
} os2;
|
||||
#endif
|
||||
/* Can't have an empty union */
|
||||
int dummy;
|
||||
|
@ -280,6 +295,14 @@ struct SDL_SysWMinfo
|
|||
} android;
|
||||
#endif
|
||||
|
||||
#if defined(SDL_VIDEO_DRIVER_OS2)
|
||||
struct
|
||||
{
|
||||
HWND hwnd; /**< The window handle */
|
||||
HWND hwndFrame; /**< The frame window handle */
|
||||
} os2;
|
||||
#endif
|
||||
|
||||
#if defined(SDL_VIDEO_DRIVER_VIVANTE)
|
||||
struct
|
||||
{
|
||||
|
|
5
externals/SDL/include/SDL_thread.h
vendored
5
externals/SDL/include/SDL_thread.h
vendored
|
@ -54,6 +54,11 @@ typedef unsigned int SDL_TLSID;
|
|||
/**
|
||||
* The SDL thread priority.
|
||||
*
|
||||
* SDL will make system changes as necessary in order to apply the thread priority.
|
||||
* Code which attempts to control thread state related to priority should be aware
|
||||
* that calling SDL_SetThreadPriority may alter such state.
|
||||
* SDL_HINT_THREAD_PRIORITY_POLICY can be used to control aspects of this behavior.
|
||||
*
|
||||
* \note On many systems you require special privileges to set high or time critical priority.
|
||||
*/
|
||||
typedef enum {
|
||||
|
|
2
externals/SDL/include/SDL_version.h
vendored
2
externals/SDL/include/SDL_version.h
vendored
|
@ -59,7 +59,7 @@ typedef struct SDL_version
|
|||
*/
|
||||
#define SDL_MAJOR_VERSION 2
|
||||
#define SDL_MINOR_VERSION 0
|
||||
#define SDL_PATCHLEVEL 12
|
||||
#define SDL_PATCHLEVEL 14
|
||||
|
||||
/**
|
||||
* \brief Macro to determine SDL version program was compiled against.
|
||||
|
|
13
externals/SDL/include/SDL_video.h
vendored
13
externals/SDL/include/SDL_video.h
vendored
|
@ -118,7 +118,8 @@ typedef enum
|
|||
SDL_WINDOW_UTILITY = 0x00020000, /**< window should be treated as a utility window */
|
||||
SDL_WINDOW_TOOLTIP = 0x00040000, /**< window should be treated as a tooltip */
|
||||
SDL_WINDOW_POPUP_MENU = 0x00080000, /**< window should be treated as a popup menu */
|
||||
SDL_WINDOW_VULKAN = 0x10000000 /**< window usable for Vulkan surface */
|
||||
SDL_WINDOW_VULKAN = 0x10000000, /**< window usable for Vulkan surface */
|
||||
SDL_WINDOW_METAL = 0x20000000 /**< window usable for Metal view */
|
||||
} SDL_WindowFlags;
|
||||
|
||||
/**
|
||||
|
@ -174,7 +175,9 @@ typedef enum
|
|||
typedef enum
|
||||
{
|
||||
SDL_DISPLAYEVENT_NONE, /**< Never used */
|
||||
SDL_DISPLAYEVENT_ORIENTATION /**< Display orientation has changed to data1 */
|
||||
SDL_DISPLAYEVENT_ORIENTATION, /**< Display orientation has changed to data1 */
|
||||
SDL_DISPLAYEVENT_CONNECTED, /**< Display has been added to the system */
|
||||
SDL_DISPLAYEVENT_DISCONNECTED /**< Display has been removed from the system */
|
||||
} SDL_DisplayEventID;
|
||||
|
||||
typedef enum
|
||||
|
@ -484,7 +487,8 @@ extern DECLSPEC Uint32 SDLCALL SDL_GetWindowPixelFormat(SDL_Window * window);
|
|||
* ::SDL_WINDOW_HIDDEN, ::SDL_WINDOW_BORDERLESS,
|
||||
* ::SDL_WINDOW_RESIZABLE, ::SDL_WINDOW_MAXIMIZED,
|
||||
* ::SDL_WINDOW_MINIMIZED, ::SDL_WINDOW_INPUT_GRABBED,
|
||||
* ::SDL_WINDOW_ALLOW_HIGHDPI, ::SDL_WINDOW_VULKAN.
|
||||
* ::SDL_WINDOW_ALLOW_HIGHDPI, ::SDL_WINDOW_VULKAN
|
||||
* ::SDL_WINDOW_METAL.
|
||||
*
|
||||
* \return The created window, or NULL if window creation failed.
|
||||
*
|
||||
|
@ -503,6 +507,9 @@ extern DECLSPEC Uint32 SDLCALL SDL_GetWindowPixelFormat(SDL_Window * window);
|
|||
* If SDL_WINDOW_VULKAN is specified and there isn't a working Vulkan driver,
|
||||
* SDL_CreateWindow() will fail because SDL_Vulkan_LoadLibrary() will fail.
|
||||
*
|
||||
* If SDL_WINDOW_METAL is specified on an OS that does not support Metal,
|
||||
* SDL_CreateWindow() will fail.
|
||||
*
|
||||
* \note On non-Apple devices, SDL requires you to either not link to the
|
||||
* Vulkan loader or link to a dynamic library version. This limitation
|
||||
* may be removed in a future version of SDL.
|
||||
|
|
14
externals/SDL/include/SDL_vulkan.h
vendored
14
externals/SDL/include/SDL_vulkan.h
vendored
|
@ -204,10 +204,9 @@ extern DECLSPEC void SDLCALL SDL_Vulkan_UnloadLibrary(void);
|
|||
*
|
||||
* \sa SDL_Vulkan_CreateSurface()
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_Vulkan_GetInstanceExtensions(
|
||||
SDL_Window *window,
|
||||
unsigned int *pCount,
|
||||
const char **pNames);
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_Vulkan_GetInstanceExtensions(SDL_Window *window,
|
||||
unsigned int *pCount,
|
||||
const char **pNames);
|
||||
|
||||
/**
|
||||
* \brief Create a Vulkan rendering surface for a window.
|
||||
|
@ -238,10 +237,9 @@ extern DECLSPEC SDL_bool SDLCALL SDL_Vulkan_GetInstanceExtensions(
|
|||
*
|
||||
* \sa SDL_Vulkan_GetInstanceExtensions()
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_Vulkan_CreateSurface(
|
||||
SDL_Window *window,
|
||||
VkInstance instance,
|
||||
VkSurfaceKHR* surface);
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_Vulkan_CreateSurface(SDL_Window *window,
|
||||
VkInstance instance,
|
||||
VkSurfaceKHR* surface);
|
||||
|
||||
/**
|
||||
* \brief Get the size of a window's underlying drawable in pixels (for use
|
||||
|
|
12
externals/SDL/include/begin_code.h
vendored
12
externals/SDL/include/begin_code.h
vendored
|
@ -51,15 +51,11 @@
|
|||
|
||||
/* Some compilers use a special export keyword */
|
||||
#ifndef DECLSPEC
|
||||
# if defined(__WIN32__) || defined(__WINRT__)
|
||||
# ifdef __BORLANDC__
|
||||
# ifdef BUILD_SDL
|
||||
# define DECLSPEC
|
||||
# else
|
||||
# define DECLSPEC __declspec(dllimport)
|
||||
# endif
|
||||
# else
|
||||
# if defined(__WIN32__) || defined(__WINRT__) || defined(__CYGWIN__)
|
||||
# ifdef DLL_EXPORT
|
||||
# define DECLSPEC __declspec(dllexport)
|
||||
# else
|
||||
# define DECLSPEC
|
||||
# endif
|
||||
# elif defined(__OS2__)
|
||||
# ifdef BUILD_SDL
|
||||
|
|
8
externals/SDL/sdl2-config.cmake.in
vendored
8
externals/SDL/sdl2-config.cmake.in
vendored
|
@ -15,25 +15,25 @@ if(NOT TARGET SDL2::SDL2)
|
|||
# This may require "libdir" beeing set (from above)
|
||||
string(REPLACE "-lSDL2 " "" SDL2_EXTRA_LINK_FLAGS "@SDL_RLD_FLAGS@ @SDL_LIBS@ ")
|
||||
string(STRIP "${SDL2_EXTRA_LINK_FLAGS}" SDL2_EXTRA_LINK_FLAGS)
|
||||
string(REPLACE "-lSDL2 " "" SDL2_EXTRA_LINK_FLAGS_STATIC "@SDL_RLD_FLAGS@ @SDL_STATIC_LIBS@ ")
|
||||
string(REPLACE "-lSDL2 " "" SDL2_EXTRA_LINK_FLAGS_STATIC "@SDL_STATIC_LIBS@ ")
|
||||
string(STRIP "${SDL2_EXTRA_LINK_FLAGS_STATIC}" SDL2_EXTRA_LINK_FLAGS_STATIC)
|
||||
|
||||
add_library(SDL2::SDL2 SHARED IMPORTED)
|
||||
set_target_properties(SDL2::SDL2 PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "@includedir@/SDL2"
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
|
||||
IMPORTED_LOCATION "@libdir@/libSDL2.so"
|
||||
IMPORTED_LOCATION "@libdir@/${CMAKE_SHARED_LIBRARY_PREFIX}SDL2${CMAKE_SHARED_LIBRARY_SUFFIX}"
|
||||
INTERFACE_LINK_LIBRARIES "${SDL2_EXTRA_LINK_FLAGS}")
|
||||
|
||||
add_library(SDL2::SDL2-static STATIC IMPORTED)
|
||||
set_target_properties(SDL2::SDL2-static PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "@includedir@/SDL2"
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
|
||||
IMPORTED_LOCATION "@libdir@/libSDL2.a"
|
||||
IMPORTED_LOCATION "@libdir@/${CMAKE_STATIC_LIBRARY_PREFIX}SDL2${CMAKE_STATIC_LIBRARY_SUFFIX}"
|
||||
INTERFACE_LINK_LIBRARIES "${SDL2_EXTRA_LINK_FLAGS_STATIC}")
|
||||
|
||||
add_library(SDL2::SDL2main STATIC IMPORTED)
|
||||
set_target_properties(SDL2::SDL2main PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
|
||||
IMPORTED_LOCATION "@libdir@/libSDL2main.a")
|
||||
IMPORTED_LOCATION "@libdir@/${CMAKE_STATIC_LIBRARY_PREFIX}SDL2main${CMAKE_STATIC_LIBRARY_SUFFIX}")
|
||||
endif()
|
||||
|
|
2
externals/SDL/sdl2-config.in
vendored
2
externals/SDL/sdl2-config.in
vendored
|
@ -49,7 +49,7 @@ while test $# -gt 0; do
|
|||
@ENABLE_SHARED_TRUE@ ;;
|
||||
@ENABLE_STATIC_TRUE@@ENABLE_SHARED_TRUE@ --static-libs)
|
||||
@ENABLE_STATIC_TRUE@@ENABLE_SHARED_FALSE@ --libs|--static-libs)
|
||||
@ENABLE_STATIC_TRUE@ echo -L@libdir@ @SDL_RLD_FLAGS@ @SDL_STATIC_LIBS@
|
||||
@ENABLE_STATIC_TRUE@ echo -L@libdir@ @SDL_LIBS@ @SDL_STATIC_LIBS@
|
||||
@ENABLE_STATIC_TRUE@ ;;
|
||||
*)
|
||||
echo "${usage}" 1>&2
|
||||
|
|
3
externals/SDL/sdl2.pc.in
vendored
3
externals/SDL/sdl2.pc.in
vendored
|
@ -10,6 +10,5 @@ Description: Simple DirectMedia Layer is a cross-platform multimedia library des
|
|||
Version: @SDL_VERSION@
|
||||
Requires:
|
||||
Conflicts:
|
||||
Libs: -L${libdir} @SDL_RLD_FLAGS@ @SDL_LIBS@
|
||||
Libs.private: @SDL_STATIC_LIBS@
|
||||
Libs: -L${libdir} @SDL_RLD_FLAGS@ @SDL_LIBS@ @PKG_CONFIG_LIBS_PRIV@ @SDL_STATIC_LIBS@
|
||||
Cflags: -I${includedir}/SDL2 @SDL_CFLAGS@
|
||||
|
|
17
externals/SDL/src/SDL.c
vendored
17
externals/SDL/src/SDL.c
vendored
|
@ -27,6 +27,12 @@
|
|||
#elif !defined(__WINRT__)
|
||||
#include <unistd.h> /* For _exit(), etc. */
|
||||
#endif
|
||||
#if defined(__OS2__)
|
||||
#include "core/os2/SDL_os2.h"
|
||||
#endif
|
||||
#if SDL_THREAD_OS2
|
||||
#include "thread/os2/SDL_systls_c.h"
|
||||
#endif
|
||||
|
||||
#if defined(__EMSCRIPTEN__)
|
||||
#include <emscripten.h>
|
||||
|
@ -159,6 +165,10 @@ SDL_InitSubSystem(Uint32 flags)
|
|||
flags |= SDL_INIT_EVENTS;
|
||||
}
|
||||
|
||||
#if SDL_THREAD_OS2
|
||||
SDL_OS2TLSAlloc(); /* thread/os2/SDL_systls.c */
|
||||
#endif
|
||||
|
||||
#if SDL_VIDEO_DRIVER_WINDOWS
|
||||
if ((flags & (SDL_INIT_HAPTIC|SDL_INIT_JOYSTICK))) {
|
||||
if (SDL_HelperWindowCreate() < 0) {
|
||||
|
@ -294,6 +304,13 @@ SDL_Init(Uint32 flags)
|
|||
void
|
||||
SDL_QuitSubSystem(Uint32 flags)
|
||||
{
|
||||
#if SDL_THREAD_OS2
|
||||
SDL_OS2TLSFree(); /* thread/os2/SDL_systls.c */
|
||||
#endif
|
||||
#if defined(__OS2__)
|
||||
SDL_OS2Quit();
|
||||
#endif
|
||||
|
||||
/* Shut down requested initialized subsystems */
|
||||
#if !SDL_SENSOR_DISABLED
|
||||
if ((flags & SDL_INIT_SENSOR)) {
|
||||
|
|
3
externals/SDL/src/SDL_dataqueue.c
vendored
3
externals/SDL/src/SDL_dataqueue.c
vendored
|
@ -18,11 +18,10 @@
|
|||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#include "./SDL_internal.h"
|
||||
|
||||
#include "SDL.h"
|
||||
#include "./SDL_dataqueue.h"
|
||||
#include "SDL_assert.h"
|
||||
|
||||
typedef struct SDL_DataQueuePacket
|
||||
{
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue