mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-03-22 08:41:08 +01:00
Compare commits
378 Commits
release-2.
...
release-2.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c49ecf6f7c | ||
|
|
da56cefa8b | ||
|
|
950f39e23b | ||
|
|
e542d1a36d | ||
|
|
f434a98c26 | ||
|
|
b43f427fa6 | ||
|
|
91820998fc | ||
|
|
df89abb23e | ||
|
|
e381a1599d | ||
|
|
14c55ac890 | ||
|
|
be8ef94f18 | ||
|
|
91da4963d3 | ||
|
|
b08bdc4401 | ||
|
|
14329256cb | ||
|
|
545febcf21 | ||
|
|
9987ca69f3 | ||
|
|
4d4e18c4bb | ||
|
|
04761d7d6b | ||
|
|
b699ddc0a9 | ||
|
|
f0549cc9c9 | ||
|
|
d7fa11204f | ||
|
|
e6068b5b15 | ||
|
|
c4918db580 | ||
|
|
4a50a04213 | ||
|
|
1ec56f7302 | ||
|
|
1fb20f0ab9 | ||
|
|
84e7832018 | ||
|
|
568068048f | ||
|
|
30def8e26b | ||
|
|
f677377339 | ||
|
|
eac3fd28d8 | ||
|
|
4db5e872aa | ||
|
|
3e3ce6e95c | ||
|
|
708ad1fd8d | ||
|
|
b0c48dd9dd | ||
|
|
7be4fca62c | ||
|
|
dae4a01361 | ||
|
|
ee97d4f4c1 | ||
|
|
703361e47d | ||
|
|
cbacb0f1ea | ||
|
|
e2ad654f2e | ||
|
|
cd63709ed8 | ||
|
|
8c41e2624e | ||
|
|
d8022d19b4 | ||
|
|
d9094421e1 | ||
|
|
9a98e4b647 | ||
|
|
0e5a3f6ecf | ||
|
|
acb05f50d8 | ||
|
|
eff5f65096 | ||
|
|
04cbf13261 | ||
|
|
0378529e1e | ||
|
|
f5a21ebf0c | ||
|
|
4679f6826d | ||
|
|
82c2f04e61 | ||
|
|
88b3252555 | ||
|
|
62f806ed6c | ||
|
|
337cea4411 | ||
|
|
1e728f5075 | ||
|
|
e4c9806f4f | ||
|
|
4d771c598a | ||
|
|
53260b31b5 | ||
|
|
3ac9e2aa4e | ||
|
|
367f9b915c | ||
|
|
f01cdcedbc | ||
|
|
a0c53668e6 | ||
|
|
41ee51b9a8 | ||
|
|
b60e5b82fb | ||
|
|
93fb710a46 | ||
|
|
1944556171 | ||
|
|
ae5317e844 | ||
|
|
679d355317 | ||
|
|
6e35e42145 | ||
|
|
922623e1b6 | ||
|
|
b251876126 | ||
|
|
0a7faa4ae5 | ||
|
|
de9f5415b3 | ||
|
|
95579f5f19 | ||
|
|
48f7e7f34d | ||
|
|
f8b4cd410b | ||
|
|
fb485986eb | ||
|
|
56ec349d2a | ||
|
|
e77ec88969 | ||
|
|
35422bd893 | ||
|
|
c17d62996f | ||
|
|
14d2ec80e7 | ||
|
|
9e8e0fb7b1 | ||
|
|
74638ea3c5 | ||
|
|
31596f23ce | ||
|
|
49803c8660 | ||
|
|
5454765a22 | ||
|
|
fde82e5972 | ||
|
|
cf7d64f266 | ||
|
|
b11c75e9f4 | ||
|
|
cf7460e477 | ||
|
|
9aa8a75d26 | ||
|
|
283680f2c1 | ||
|
|
f964ce03b4 | ||
|
|
20dfda4489 | ||
|
|
88f9f0307d | ||
|
|
7df0f4fdac | ||
|
|
d9fb77a3c1 | ||
|
|
bb5516ac8e | ||
|
|
7689162ca0 | ||
|
|
6eeb8593ba | ||
|
|
5342ae2bba | ||
|
|
d2131ac165 | ||
|
|
55b24b93b4 | ||
|
|
ffc19ee255 | ||
|
|
bc6c199790 | ||
|
|
8743e9759e | ||
|
|
69ab8541a9 | ||
|
|
d0e9a36460 | ||
|
|
d40657bfc9 | ||
|
|
e236e8435a | ||
|
|
60afec79bf | ||
|
|
7f9854b9b2 | ||
|
|
aa9683bb6f | ||
|
|
fb0e68ae0f | ||
|
|
870c44bfed | ||
|
|
da89b81c3c | ||
|
|
ef34704875 | ||
|
|
cd90e2ca58 | ||
|
|
e0fe8f3cb3 | ||
|
|
5febdfcece | ||
|
|
58021b3834 | ||
|
|
8aaef4b914 | ||
|
|
d07fe7ad95 | ||
|
|
e8b0859f17 | ||
|
|
600126c90e | ||
|
|
c19516b50c | ||
|
|
c179d3948a | ||
|
|
f6a537cbfa | ||
|
|
59a2d12cc3 | ||
|
|
305e5968aa | ||
|
|
5a34f1e3ee | ||
|
|
bab5b08437 | ||
|
|
6b3e893105 | ||
|
|
66294d31df | ||
|
|
e8a0e35e24 | ||
|
|
6a7b0c27af | ||
|
|
0b3a350c90 | ||
|
|
af823cc1d9 | ||
|
|
63848141c1 | ||
|
|
33381d3d10 | ||
|
|
afc1738ecb | ||
|
|
264b81b481 | ||
|
|
0cf1ae9d0b | ||
|
|
a0b3dcc26a | ||
|
|
80021c21b6 | ||
|
|
e987bedfe2 | ||
|
|
96259f1f85 | ||
|
|
963e74d68c | ||
|
|
c152e380be | ||
|
|
9753b9cc46 | ||
|
|
aae29c9ebd | ||
|
|
3634e563c4 | ||
|
|
34237b80f4 | ||
|
|
4ffcd88ca2 | ||
|
|
faf8f8b86b | ||
|
|
5ef8eb49be | ||
|
|
90a5607d32 | ||
|
|
207428b444 | ||
|
|
16ccff3c56 | ||
|
|
fda14741ac | ||
|
|
b6aaefc791 | ||
|
|
92396f7d74 | ||
|
|
404ba5eea8 | ||
|
|
87bc1fb552 | ||
|
|
044b00dcae | ||
|
|
a1ca84411e | ||
|
|
15b3794f11 | ||
|
|
09ab752aa3 | ||
|
|
a794126d56 | ||
|
|
a003fa0a05 | ||
|
|
df5d565f48 | ||
|
|
8adadf8f0e | ||
|
|
de5367a612 | ||
|
|
5901fe466b | ||
|
|
50d5002533 | ||
|
|
088070e5a8 | ||
|
|
f225af0c1e | ||
|
|
f1bc1c1274 | ||
|
|
38ae49880f | ||
|
|
7f4860e2be | ||
|
|
74e99f7416 | ||
|
|
b8ae2c1860 | ||
|
|
6f758ad25f | ||
|
|
e9f6805fc6 | ||
|
|
c6647bf9c9 | ||
|
|
bdbc06b027 | ||
|
|
c5bcefa7e8 | ||
|
|
7749ee2a43 | ||
|
|
3e5dbc694a | ||
|
|
7c3040e08a | ||
|
|
c2791fc60d | ||
|
|
2a4999b4bb | ||
|
|
109544ca04 | ||
|
|
b09b25f6e4 | ||
|
|
ad1e3c2a4c | ||
|
|
0d22559e30 | ||
|
|
5dfa4043a3 | ||
|
|
6b3f11e2a3 | ||
|
|
aeea6b9b1f | ||
|
|
90454b1ece | ||
|
|
7d3a7ef827 | ||
|
|
a2add1f683 | ||
|
|
3f5ff751fe | ||
|
|
aad340eb86 | ||
|
|
63107524f6 | ||
|
|
0903e83553 | ||
|
|
c88666580e | ||
|
|
641c674f2a | ||
|
|
51902010c6 | ||
|
|
dfbd7f65a9 | ||
|
|
ec74c318b9 | ||
|
|
2dc04b4c11 | ||
|
|
67a48ad13a | ||
|
|
e1ac643b32 | ||
|
|
67764070f0 | ||
|
|
b692c35237 | ||
|
|
941f8ecffd | ||
|
|
0b2863d45e | ||
|
|
a7c3d2af81 | ||
|
|
f159d798dd | ||
|
|
5930b50855 | ||
|
|
4f41f07d43 | ||
|
|
31b0224397 | ||
|
|
99759bac82 | ||
|
|
ab07ce1166 | ||
|
|
cf823094a2 | ||
|
|
28e0c0eef7 | ||
|
|
25a952e76f | ||
|
|
b37518b3d8 | ||
|
|
888bf1af69 | ||
|
|
f35e97ba8a | ||
|
|
d2042e1ed4 | ||
|
|
ba90412cda | ||
|
|
4cb84b8f4b | ||
|
|
257071fc20 | ||
|
|
550437edbe | ||
|
|
c0aa626ba3 | ||
|
|
941c5b4760 | ||
|
|
c0ac09edcc | ||
|
|
f59b0056d3 | ||
|
|
623a6defd3 | ||
|
|
56f44cfa0f | ||
|
|
e714f6590e | ||
|
|
a37d3e0b1e | ||
|
|
cc682f2013 | ||
|
|
f45f33bdc0 | ||
|
|
b4fe7412f9 | ||
|
|
4d4bb2b0ed | ||
|
|
e061a92dc9 | ||
|
|
8f0cc4a4b7 | ||
|
|
1089944bee | ||
|
|
862aa4b47d | ||
|
|
3a11bba267 | ||
|
|
c3178e67ca | ||
|
|
b5a420cb11 | ||
|
|
fd8e8f9f20 | ||
|
|
df0d3f1364 | ||
|
|
ff8c9538bc | ||
|
|
c74837fbb9 | ||
|
|
ff8c62f227 | ||
|
|
507e271b3e | ||
|
|
8857791627 | ||
|
|
013b146de9 | ||
|
|
949b8bd8c5 | ||
|
|
67f18a1973 | ||
|
|
cf7b94f292 | ||
|
|
7c2028f8e9 | ||
|
|
52857de251 | ||
|
|
3b173f818d | ||
|
|
58168a8c3c | ||
|
|
5f123e31a3 | ||
|
|
5a8ecf4e79 | ||
|
|
4773690d0f | ||
|
|
4f5bd53e8f | ||
|
|
915a7e0341 | ||
|
|
c8ac909674 | ||
|
|
e8237e2b02 | ||
|
|
c591429542 | ||
|
|
c70db0cabf | ||
|
|
59574fe2f0 | ||
|
|
fe6828272a | ||
|
|
5308a245a4 | ||
|
|
88dfa46644 | ||
|
|
a515853569 | ||
|
|
f1d8f5f7fd | ||
|
|
8b574dc43c | ||
|
|
74ec7cabdb | ||
|
|
9924a8e392 | ||
|
|
12ff19c035 | ||
|
|
08de74ec49 | ||
|
|
4a4bac95eb | ||
|
|
41da7b79c0 | ||
|
|
864b8f89fa | ||
|
|
1205978244 | ||
|
|
63317dfb17 | ||
|
|
fe196db774 | ||
|
|
db86e7a633 | ||
|
|
77709aecc7 | ||
|
|
7c5f3cf3cb | ||
|
|
113801b790 | ||
|
|
2dedbc7262 | ||
|
|
9d6ac3deff | ||
|
|
1d25135b71 | ||
|
|
03ff7dcf6b | ||
|
|
ff6aebc4a1 | ||
|
|
3d3870982c | ||
|
|
8325df25aa | ||
|
|
b3173d9d3b | ||
|
|
5d1d035705 | ||
|
|
361043a5f6 | ||
|
|
4d9a346927 | ||
|
|
c07656dbcb | ||
|
|
101544d6f0 | ||
|
|
0ad4b0b697 | ||
|
|
49881861b1 | ||
|
|
b7e88aaae0 | ||
|
|
cb0e614fb1 | ||
|
|
a07e5815a5 | ||
|
|
7832cb652e | ||
|
|
ed4fe4c9a0 | ||
|
|
e2ec1eb12e | ||
|
|
4df859c586 | ||
|
|
4718791f11 | ||
|
|
8543ad7df1 | ||
|
|
999af8099b | ||
|
|
e2619f1dcf | ||
|
|
425149f47b | ||
|
|
652d59fb3b | ||
|
|
c11ae93aed | ||
|
|
fe032ff4c9 | ||
|
|
a4d0571e4a | ||
|
|
eb14b635cd | ||
|
|
c04dca0dad | ||
|
|
0bade9b411 | ||
|
|
606c5a585c | ||
|
|
386790efbf | ||
|
|
8f780e76e1 | ||
|
|
f521b22eb5 | ||
|
|
db94dfb1d5 | ||
|
|
a1b8fa6071 | ||
|
|
a9ae1b508d | ||
|
|
b5d231eede | ||
|
|
432312561f | ||
|
|
816a6e68e5 | ||
|
|
dc8b55e50b | ||
|
|
2df59062dc | ||
|
|
5e8c81673f | ||
|
|
b7228bc51f | ||
|
|
9856d96777 | ||
|
|
6b5ed0fd49 | ||
|
|
6a0ef0cdbc | ||
|
|
4d78a99544 | ||
|
|
e14278ef6f | ||
|
|
b41b9d34c7 | ||
|
|
8e062f6925 | ||
|
|
d529b001bc | ||
|
|
f536fbea71 | ||
|
|
e20d4173bf | ||
|
|
1cfbe664f5 | ||
|
|
d401a77eff | ||
|
|
6d39e67bad | ||
|
|
0a5c10654c | ||
|
|
cc7b2fc512 | ||
|
|
129431b4f4 | ||
|
|
92847022f5 | ||
|
|
a2c1d83c02 | ||
|
|
a8ac588549 | ||
|
|
9e651b6915 | ||
|
|
2419d26724 | ||
|
|
e9b29ed007 | ||
|
|
ac2d1f6773 | ||
|
|
cef1c1c2ee | ||
|
|
003c0dce9c | ||
|
|
4f695bc5e5 |
@@ -112,6 +112,7 @@ test/testresample
|
||||
test/testrumble
|
||||
test/testscale
|
||||
test/testsem
|
||||
test/testsensor
|
||||
test/testshader
|
||||
test/testshape
|
||||
test/testsprite2
|
||||
|
||||
25
Android.mk
Executable file → Normal file
25
Android.mk
Executable file → Normal file
@@ -31,11 +31,13 @@ LOCAL_SRC_FILES := \
|
||||
$(wildcard $(LOCAL_PATH)/src/haptic/android/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/joystick/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/joystick/android/*.c) \
|
||||
$(LOCAL_PATH)/src/joystick/steam/SDL_steamcontroller.c \
|
||||
$(wildcard $(LOCAL_PATH)/src/joystick/hidapi/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/loadso/dlopen/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/power/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/power/android/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/filesystem/android/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/sensor/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/sensor/android/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/render/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/render/*/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/stdlib/*.c) \
|
||||
@@ -48,10 +50,14 @@ LOCAL_SRC_FILES := \
|
||||
$(wildcard $(LOCAL_PATH)/src/video/yuv2rgb/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/test/*.c))
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := hidapi
|
||||
|
||||
LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES
|
||||
LOCAL_LDLIBS := -ldl -lGLESv1_CM -lGLESv2 -llog -landroid
|
||||
|
||||
cmd-strip :=
|
||||
ifeq ($(NDK_DEBUG),1)
|
||||
cmd-strip :=
|
||||
endif
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
|
||||
@@ -86,4 +92,19 @@ LOCAL_MODULE_FILENAME := libSDL2main
|
||||
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
|
||||
###########################
|
||||
#
|
||||
# hidapi library
|
||||
#
|
||||
###########################
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_CPPFLAGS += -std=c++11
|
||||
|
||||
LOCAL_SRC_FILES := src/hidapi/android/hid.cpp
|
||||
|
||||
LOCAL_MODULE := libhidapi
|
||||
LOCAL_LDLIBS := -llog
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
|
||||
@@ -42,10 +42,13 @@ 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 8)
|
||||
set(SDL_MICRO_VERSION 9)
|
||||
set(SDL_INTERFACE_AGE 0)
|
||||
set(SDL_BINARY_AGE 8)
|
||||
set(SDL_BINARY_AGE 9)
|
||||
set(SDL_VERSION "${SDL_MAJOR_VERSION}.${SDL_MINOR_VERSION}.${SDL_MICRO_VERSION}")
|
||||
# the following should match the versions in Xcode project file:
|
||||
set(DYLIB_CURRENT_VERSION 10.0.0)
|
||||
set(DYLIB_COMPATIBILITY_VERSION 1.0.0)
|
||||
|
||||
# Set defaults preventing destination file conflicts
|
||||
set(SDL_CMAKE_DEBUG_POSTFIX "d"
|
||||
@@ -210,8 +213,14 @@ endif()
|
||||
set(SDL_LIBS "-lSDL2")
|
||||
set(SDL_CFLAGS "")
|
||||
|
||||
# Emscripten toolchain has a nonempty default value for this, and the checks
|
||||
# in this file need to change that, so remember the original value, and
|
||||
# When building shared lib for Windows with MinGW,
|
||||
# avoid the DLL having a "lib" prefix
|
||||
if(WINDOWS)
|
||||
set(CMAKE_SHARED_LIBRARY_PREFIX "")
|
||||
endif()
|
||||
|
||||
# Emscripten toolchain has a nonempty default value for this, and the checks
|
||||
# in this file need to change that, so remember the original value, and
|
||||
# restore back to that afterwards. For check_function_exists() to work in
|
||||
# Emscripten, this value must be at its default value.
|
||||
set(ORIG_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
|
||||
@@ -244,7 +253,7 @@ endif()
|
||||
set(OPT_DEF_ASM TRUE)
|
||||
if(EMSCRIPTEN)
|
||||
# Set up default values for the currently supported set of subsystems:
|
||||
# Emscripten/Javascript does not have assembly support, a dynamic library
|
||||
# Emscripten/Javascript does not have assembly support, a dynamic library
|
||||
# loading architecture, low-level CPU inspection or multithreading.
|
||||
set(OPT_DEF_ASM FALSE)
|
||||
set(SDL_SHARED_ENABLED_BY_DEFAULT OFF)
|
||||
@@ -261,7 +270,7 @@ endif()
|
||||
|
||||
set(SDL_SUBSYSTEMS
|
||||
Atomic Audio Video Render Events Joystick Haptic Power Threads Timers
|
||||
File Loadso CPUinfo Filesystem Dlopen)
|
||||
File Loadso CPUinfo Filesystem Dlopen Sensor)
|
||||
foreach(_SUB ${SDL_SUBSYSTEMS})
|
||||
string(TOUPPER ${_SUB} _OPT)
|
||||
if (NOT DEFINED SDL_${_OPT}_ENABLED_BY_DEFAULT)
|
||||
@@ -328,6 +337,7 @@ foreach(_SUB ${SDL_X11_OPTIONS})
|
||||
endforeach()
|
||||
set_option(VIDEO_COCOA "Use Cocoa video driver" ${APPLE})
|
||||
set_option(DIRECTX "Use DirectX for Windows audio/video" ${WINDOWS})
|
||||
set_option(WASAPI "Use the Windows WASAPI audio driver" ${WINDOWS})
|
||||
set_option(RENDER_D3D "Enable the Direct3D render driver" ${WINDOWS})
|
||||
set_option(VIDEO_VIVANTE "Use Vivante EGL video driver" ${UNIX_SYS})
|
||||
dep_option(VIDEO_VULKAN "Enable Vulkan support" ON "ANDROID OR APPLE OR LINUX OR WINDOWS" OFF)
|
||||
@@ -444,6 +454,8 @@ if(USE_GCC OR USE_CLANG)
|
||||
|
||||
if(APPLE)
|
||||
list(APPEND EXTRA_LDFLAGS "-Wl,-undefined,error")
|
||||
list(APPEND EXTRA_LDFLAGS "-Wl,-compatibility_version,${DYLIB_COMPATIBILITY_VERSION}")
|
||||
list(APPEND EXTRA_LDFLAGS "-Wl,-current_version,${DYLIB_CURRENT_VERSION}")
|
||||
else()
|
||||
set(CMAKE_REQUIRED_FLAGS "-Wl,--no-undefined")
|
||||
check_c_compiler_flag("" HAVE_NO_UNDEFINED)
|
||||
@@ -643,7 +655,7 @@ if(LIBC)
|
||||
_ultoa strtol strtoul strtoll strtod atoi atof strcmp strncmp
|
||||
_stricmp _strnicmp sscanf
|
||||
acos acosf asin asinf atan atanf atan2 atan2f ceil ceilf
|
||||
copysign copysignf cos cosf fabs fabsf floor floorf fmod fmodf
|
||||
copysign copysignf cos cosf exp expf fabs fabsf floor floorf fmod fmodf
|
||||
log logf log10 log10f pow powf scalbn scalbnf sin sinf sqrt sqrtf tan tanf)
|
||||
string(TOUPPER ${_FN} _UPPER)
|
||||
set(HAVE_${_UPPER} 1)
|
||||
@@ -743,6 +755,10 @@ if(SDL_HAPTIC)
|
||||
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})
|
||||
@@ -844,6 +860,12 @@ if(ANDROID)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${TIMER_SOURCES})
|
||||
set(HAVE_SDL_TIMERS TRUE)
|
||||
endif()
|
||||
if(SDL_SENSOR)
|
||||
set(SDL_SENSOR_ANDROID 1)
|
||||
set(HAVE_SDL_SENSORS TRUE)
|
||||
file(GLOB ANDROID_SENSOR_SOURCES ${SDL2_SOURCE_DIR}/src/sensor/android/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${ANDROID_SENSOR_SOURCES})
|
||||
endif()
|
||||
if(SDL_VIDEO)
|
||||
set(SDL_VIDEO_DRIVER_ANDROID 1)
|
||||
file(GLOB ANDROID_VIDEO_SOURCES ${SDL2_SOURCE_DIR}/src/video/android/*.c)
|
||||
@@ -1001,7 +1023,7 @@ elseif(UNIX AND NOT APPLE AND NOT ANDROID)
|
||||
#include <linux/kd.h>
|
||||
#include <linux/keyboard.h>
|
||||
|
||||
int main(int argc, char **argv)
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
struct kbentry kbe;
|
||||
kbe.kb_table = KG_CTRL;
|
||||
@@ -1042,6 +1064,12 @@ elseif(UNIX AND NOT APPLE AND NOT ANDROID)
|
||||
include_directories(${IBUS_INCLUDE_DIRS})
|
||||
list(APPEND EXTRA_LIBS ${IBUS_LIBRARIES})
|
||||
endif()
|
||||
if(HAVE_LIBUNWIND_H)
|
||||
# We've already found the header, so REQUIRE the lib to be present
|
||||
pkg_search_module(UNWIND REQUIRED libunwind)
|
||||
pkg_search_module(UNWIND_GENERIC REQUIRED libunwind-generic)
|
||||
list(APPEND EXTRA_LIBS ${UNWIND_LIBRARIES} ${UNWIND_GENERIC_LIBRARIES})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
check_include_file("fcitx/frontend.h" HAVE_FCITX_FRONTEND_H)
|
||||
@@ -1183,8 +1211,6 @@ elseif(WINDOWS)
|
||||
check_include_file(ddraw.h HAVE_DDRAW_H)
|
||||
check_include_file(dsound.h HAVE_DSOUND_H)
|
||||
check_include_file(dinput.h HAVE_DINPUT_H)
|
||||
check_include_file(mmdeviceapi.h HAVE_MMDEVICEAPI_H)
|
||||
check_include_file(audioclient.h HAVE_AUDIOCLIENT_H)
|
||||
check_include_file(dxgi.h HAVE_DXGI_H)
|
||||
if(HAVE_D3D_H OR HAVE_D3D11_H OR HAVE_DDRAW_H OR HAVE_DSOUND_H OR HAVE_DINPUT_H)
|
||||
set(HAVE_DIRECTX TRUE)
|
||||
@@ -1197,6 +1223,11 @@ elseif(WINDOWS)
|
||||
set(CMAKE_REQUIRED_FLAGS ${ORIG_CMAKE_REQUIRED_FLAGS})
|
||||
endif()
|
||||
|
||||
# headers needed elsewhere ...
|
||||
check_include_file(mmdeviceapi.h HAVE_MMDEVICEAPI_H)
|
||||
check_include_file(audioclient.h HAVE_AUDIOCLIENT_H)
|
||||
check_include_file(endpointvolume.h HAVE_ENDPOINTVOLUME_H)
|
||||
|
||||
if(SDL_AUDIO)
|
||||
set(SDL_AUDIO_DRIVER_WINMM 1)
|
||||
file(GLOB WINMM_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/winmm/*.c)
|
||||
@@ -1209,7 +1240,7 @@ elseif(WINDOWS)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${DSOUND_AUDIO_SOURCES})
|
||||
endif()
|
||||
|
||||
if(HAVE_AUDIOCLIENT_H AND HAVE_MMDEVICEAPI_H)
|
||||
if(WASAPI AND HAVE_AUDIOCLIENT_H AND HAVE_MMDEVICEAPI_H)
|
||||
set(SDL_AUDIO_DRIVER_WASAPI 1)
|
||||
file(GLOB WASAPI_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/wasapi/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${WASAPI_AUDIO_SOURCES})
|
||||
@@ -1261,7 +1292,7 @@ elseif(WINDOWS)
|
||||
endif()
|
||||
|
||||
# Libraries for Win32 native and MinGW
|
||||
list(APPEND EXTRA_LIBS user32 gdi32 winmm imm32 ole32 oleaut32 version uuid)
|
||||
list(APPEND EXTRA_LIBS user32 gdi32 winmm imm32 ole32 oleaut32 version uuid advapi32 shell32)
|
||||
|
||||
# TODO: in configure.in the check for timers is set on
|
||||
# cygwin | mingw32* - does this include mingw32CE?
|
||||
@@ -1527,6 +1558,7 @@ endif()
|
||||
|
||||
if(VIDEO_VULKAN)
|
||||
set(SDL_VIDEO_VULKAN 1)
|
||||
set(HAVE_VIDEO_VULKAN TRUE)
|
||||
endif()
|
||||
|
||||
# Dummies
|
||||
@@ -1538,7 +1570,7 @@ endif()
|
||||
# This leads to missing internal references on building, since the
|
||||
# src/X/*.c does not get included.
|
||||
if(NOT HAVE_SDL_JOYSTICK)
|
||||
set(SDL_JOYSTICK_DISABLED 1)
|
||||
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)
|
||||
@@ -1546,10 +1578,15 @@ if(NOT HAVE_SDL_JOYSTICK)
|
||||
endif()
|
||||
endif()
|
||||
if(NOT HAVE_SDL_HAPTIC)
|
||||
set(SDL_HAPTIC_DISABLED 1)
|
||||
set(SDL_HAPTIC_DUMMY 1)
|
||||
file(GLOB HAPTIC_SOURCES ${SDL2_SOURCE_DIR}/src/haptic/dummy/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${HAPTIC_SOURCES})
|
||||
endif()
|
||||
if(NOT HAVE_SDL_SENSORS)
|
||||
set(SDL_SENSOR_DUMMY 1)
|
||||
file(GLOB SENSORS_SOURCES ${SDL2_SOURCE_DIR}/src/sensor/dummy/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${SENSORS_SOURCES})
|
||||
endif()
|
||||
if(NOT HAVE_SDL_LOADSO)
|
||||
set(SDL_LOADSO_DISABLED 1)
|
||||
file(GLOB LOADSO_SOURCES ${SDL2_SOURCE_DIR}/src/loadso/dummy/*.c)
|
||||
@@ -1695,7 +1732,7 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
|
||||
|
||||
# Always build SDLmain
|
||||
add_library(SDL2main STATIC ${SDLMAIN_SOURCES})
|
||||
target_include_directories(SDL2main PUBLIC $<INSTALL_INTERFACE:include>)
|
||||
target_include_directories(SDL2main PUBLIC "$<BUILD_INTERFACE:${SDL2_SOURCE_DIR}/include>" $<INSTALL_INTERFACE:include/SDL2>)
|
||||
set(_INSTALL_LIBS "SDL2main")
|
||||
if (NOT ANDROID)
|
||||
set_target_properties(SDL2main PROPERTIES DEBUG_POSTFIX ${SDL_CMAKE_DEBUG_POSTFIX})
|
||||
@@ -1704,7 +1741,9 @@ endif()
|
||||
if(SDL_SHARED)
|
||||
add_library(SDL2 SHARED ${SOURCE_FILES} ${VERSION_SOURCES})
|
||||
if(APPLE)
|
||||
set_target_properties(SDL2 PROPERTIES MACOSX_RPATH 1)
|
||||
set_target_properties(SDL2 PROPERTIES
|
||||
MACOSX_RPATH 1
|
||||
OUTPUT_NAME "SDL2-${LT_RELEASE}")
|
||||
elseif(UNIX AND NOT ANDROID)
|
||||
set_target_properties(SDL2 PROPERTIES
|
||||
VERSION ${LT_VERSION}
|
||||
@@ -1724,7 +1763,7 @@ if(SDL_SHARED)
|
||||
endif()
|
||||
set(_INSTALL_LIBS "SDL2" ${_INSTALL_LIBS})
|
||||
target_link_libraries(SDL2 ${EXTRA_LIBS} ${EXTRA_LDFLAGS})
|
||||
target_include_directories(SDL2 PUBLIC $<INSTALL_INTERFACE:include>)
|
||||
target_include_directories(SDL2 PUBLIC "$<BUILD_INTERFACE:${SDL2_SOURCE_DIR}/include>" $<INSTALL_INTERFACE:include/SDL2>)
|
||||
if (NOT ANDROID)
|
||||
set_target_properties(SDL2 PROPERTIES DEBUG_POSTFIX ${SDL_CMAKE_DEBUG_POSTFIX})
|
||||
endif()
|
||||
@@ -1750,7 +1789,7 @@ if(SDL_STATIC)
|
||||
# libraries - do we need to consider this?
|
||||
set(_INSTALL_LIBS "SDL2-static" ${_INSTALL_LIBS})
|
||||
target_link_libraries(SDL2-static ${EXTRA_LIBS} ${EXTRA_LDFLAGS})
|
||||
target_include_directories(SDL2-static PUBLIC $<INSTALL_INTERFACE:include>)
|
||||
target_include_directories(SDL2-static PUBLIC "$<BUILD_INTERFACE:${SDL2_SOURCE_DIR}/include>" $<INSTALL_INTERFACE:include/SDL2>)
|
||||
if (NOT ANDROID)
|
||||
set_target_properties(SDL2-static PROPERTIES DEBUG_POSTFIX ${SDL_CMAKE_DEBUG_POSTFIX})
|
||||
endif()
|
||||
@@ -1761,7 +1800,7 @@ endif()
|
||||
if(SDL_TEST)
|
||||
file(GLOB TEST_SOURCES ${SDL2_SOURCE_DIR}/src/test/*.c)
|
||||
add_library(SDL2_test STATIC ${TEST_SOURCES})
|
||||
|
||||
|
||||
add_subdirectory(test)
|
||||
endif()
|
||||
|
||||
@@ -1808,18 +1847,23 @@ endforeach()
|
||||
list(APPEND INCLUDE_FILES ${BIN_INCLUDE_FILES})
|
||||
install(FILES ${INCLUDE_FILES} DESTINATION include/SDL2)
|
||||
|
||||
string(TOUPPER "${CMAKE_BUILD_TYPE}" UPPER_BUILD_TYPE)
|
||||
if (UPPER_BUILD_TYPE MATCHES DEBUG)
|
||||
set(SOPOSTFIX "${SDL_CMAKE_DEBUG_POSTFIX}")
|
||||
else()
|
||||
set(SOPOSTFIX "")
|
||||
endif()
|
||||
|
||||
if(NOT (WINDOWS OR CYGWIN))
|
||||
if(SDL_SHARED)
|
||||
if (APPLE)
|
||||
set(SOEXT "dylib")
|
||||
else()
|
||||
set(SOEXT "so")
|
||||
endif()
|
||||
set(SOEXT ${CMAKE_SHARED_LIBRARY_SUFFIX}) # ".so", ".dylib", etc.
|
||||
get_target_property(SONAME SDL2 OUTPUT_NAME)
|
||||
if(NOT ANDROID)
|
||||
install(CODE "
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink
|
||||
\"libSDL2-2.0.${SOEXT}\" \"libSDL2.${SOEXT}\")")
|
||||
install(FILES ${SDL2_BINARY_DIR}/libSDL2.${SOEXT} DESTINATION "lib${LIB_SUFFIX}")
|
||||
\"lib${SONAME}${SOPOSTFIX}${SOEXT}\" \"libSDL2${SOPOSTFIX}${SOEXT}\")"
|
||||
WORKING_DIR "${SDL2_BINARY_DIR}")
|
||||
install(FILES ${SDL2_BINARY_DIR}/libSDL2${SOPOSTFIX}${SOEXT} DESTINATION "lib${LIB_SUFFIX}")
|
||||
endif()
|
||||
endif()
|
||||
if(FREEBSD)
|
||||
|
||||
@@ -44,7 +44,7 @@ SDLTEST_OBJECTS = @SDLTEST_OBJECTS@
|
||||
|
||||
WAYLAND_SCANNER = @WAYLAND_SCANNER@
|
||||
|
||||
SRC_DIST = *.txt acinclude Android.mk autogen.sh android-project build-scripts cmake cmake_uninstall.cmake.in configure configure.in debian docs include Makefile.* sdl2-config.cmake.in sdl2-config.in sdl2.m4 sdl2.pc.in SDL2.spec.in SDL2Config.cmake src test VisualC.html VisualC VisualC-WinRT Xcode Xcode-iOS
|
||||
SRC_DIST = *.txt acinclude Android.mk autogen.sh android-project build-scripts cmake cmake_uninstall.cmake.in configure configure.in debian docs include Makefile.* sdl2-config.cmake.in sdl2-config.in sdl2.m4 sdl2.pc.in SDL2.spec.in SDL2Config.cmake src test VisualC.html VisualC VisualC-WinRT Xcode Xcode-iOS wayland-protocols
|
||||
GEN_DIST = SDL2.spec
|
||||
|
||||
ifneq ($V,1)
|
||||
@@ -101,6 +101,7 @@ HDRS = \
|
||||
SDL_render.h \
|
||||
SDL_rwops.h \
|
||||
SDL_scancode.h \
|
||||
SDL_sensor.h \
|
||||
SDL_shape.h \
|
||||
SDL_stdinc.h \
|
||||
SDL_surface.h \
|
||||
|
||||
@@ -22,6 +22,8 @@ SOURCES = \
|
||||
src/filesystem/dummy/*.c \
|
||||
src/render/*.c \
|
||||
src/render/software/*.c \
|
||||
src/sensor/*.c \
|
||||
src/sensor/dummy/*.c \
|
||||
src/stdlib/*.c \
|
||||
src/thread/*.c \
|
||||
src/thread/generic/*.c \
|
||||
|
||||
126
Makefile.os2
Normal file
126
Makefile.os2
Normal file
@@ -0,0 +1,126 @@
|
||||
# Open Watcom makefile to build SDL2.dll for OS/2:
|
||||
# wmake -f Makefile.os2
|
||||
|
||||
LIBNAME = SDL2
|
||||
VERSION = 2.0.9
|
||||
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
|
||||
|
||||
LIBS = mmpm2.lib libuls.lib libconv.lib
|
||||
|
||||
CFLAGS = -bt=os2 -d0 -q -bm -5s -fp5 -fpi87 -sg -oteanbmier -ei
|
||||
# max warnings:
|
||||
CFLAGS+= -wx
|
||||
# building dll:
|
||||
CFLAGS+= -bd
|
||||
# the include paths :
|
||||
CFLAGS+= $(INCPATH)
|
||||
# building SDL itself:
|
||||
CFLAGS+= -DBUILD_SDL
|
||||
|
||||
SRCS = SDL.c SDL_assert.c SDL_error.c SDL_log.c SDL_dataqueue.c SDL_hints.c
|
||||
SRCS+= SDL_getenv.c SDL_iconv.c SDL_malloc.c SDL_qsort.c SDL_stdlib.c SDL_string.c
|
||||
SRCS+= SDL_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
|
||||
SRCS+= SDL_events.c SDL_quit.c SDL_keyboard.c SDL_mouse.c SDL_windowevents.c &
|
||||
SDL_clipboardevents.c SDL_dropevents.c SDL_displayevents.c SDL_gesture.c &
|
||||
SDL_sensor.c SDL_touch.c
|
||||
SRCS+= SDL_haptic.c SDL_gamecontroller.c SDL_joystick.c
|
||||
SRCS+= SDL_render.c yuv_rgb.c SDL_yuv.c SDL_yuv_sw.c SDL_blendfillrect.c &
|
||||
SDL_blendline.c SDL_blendpoint.c SDL_drawline.c SDL_drawpoint.c &
|
||||
SDL_render_sw.c SDL_rotate.c
|
||||
SRCS+= SDL_blit.c SDL_blit_0.c SDL_blit_1.c SDL_blit_A.c SDL_blit_auto.c &
|
||||
SDL_blit_copy.c SDL_blit_N.c SDL_blit_slow.c SDL_fillrect.c SDL_bmp.c &
|
||||
SDL_pixels.c SDL_rect.c SDL_RLEaccel.c SDL_shape.c SDL_stretch.c &
|
||||
SDL_surface.c SDL_video.c SDL_clipboard.c SDL_vulkan_utils.c SDL_egl.c
|
||||
|
||||
SRCS+= SDL_syscond.c SDL_sysmutex.c SDL_syssem.c SDL_systhread.c SDL_systls.c
|
||||
SRCS+= SDL_systimer.c
|
||||
SRCS+= SDL_sysloadso.c
|
||||
SRCS+= SDL_sysfilesystem.c
|
||||
SRCS+= SDL_syshaptic.c SDL_sysjoystick.c
|
||||
SRCS+= SDL_dummyaudio.c SDL_diskaudio.c
|
||||
SRCS+= SDL_nullvideo.c SDL_nullframebuffer.c SDL_nullevents.c
|
||||
SRCS+= SDL_dummysensor.c
|
||||
|
||||
SRCS+= SDL_dynapi.c
|
||||
|
||||
OBJS = $(SRCS:.c=.obj)
|
||||
|
||||
.extensions:
|
||||
.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;
|
||||
|
||||
all: $(DLLFILE) $(LIBFILE) .symbolic
|
||||
|
||||
$(DLLFILE): $(OBJS) $(LNKFILE)
|
||||
@echo * Linking: $@
|
||||
wlink @$(LNKFILE)
|
||||
|
||||
$(LIBFILE): $(DLLFILE)
|
||||
@echo * Creating LIB file: $@
|
||||
wlib -q -b -n -c -pa -s -t -zld -ii -io $* $(DLLFILE)
|
||||
|
||||
.c.obj:
|
||||
wcc386 $(CFLAGS) -fo=$^@ $<
|
||||
|
||||
SDL_cpuinfo.obj: SDL_cpuinfo.c
|
||||
wcc386 $(CFLAGS) -wcd=200 -fo=$^@ $<
|
||||
|
||||
SDL_rwops.obj: SDL_rwops.c
|
||||
wcc386 $(CFLAGS) -wcd=136 -fo=$^@ $<
|
||||
|
||||
SDL_blendfillrect.obj: SDL_blendfillrect.c
|
||||
wcc386 $(CFLAGS) -wcd=200 -fo=$^@ $<
|
||||
|
||||
SDL_blendline.obj: SDL_blendline.c
|
||||
wcc386 $(CFLAGS) -wcd=200 -fo=$^@ $<
|
||||
|
||||
SDL_blendpoint.obj: SDL_blendpoint.c
|
||||
wcc386 $(CFLAGS) -wcd=200 -fo=$^@ $<
|
||||
|
||||
SDL_RLEaccel.obj: SDL_RLEaccel.c
|
||||
wcc386 $(CFLAGS) -wcd=201 -fo=$^@ $<
|
||||
|
||||
$(LNKFILE):
|
||||
@echo * Creating linker file: $@
|
||||
@%create $@
|
||||
@%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'
|
||||
@%append $@ OPTION SHOWDEAD
|
||||
|
||||
clean: .SYMBOLIC
|
||||
@ echo * Clean: $(LIBNAME)
|
||||
@if exist *.obj rm *.obj
|
||||
@if exist *.err rm *.err
|
||||
@if exist $(LNKFILE) rm $(LNKFILE)
|
||||
|
||||
distclean: .SYMBOLIC clean
|
||||
@if exist $(LIBHOME)/*.exp rm $(LIBHOME)/*.exp
|
||||
@if exist $(LIBHOME)/*.map rm $(LIBHOME)/*.map
|
||||
@if exist $(LIBFILE) rm $(LIBFILE)
|
||||
@if exist $(DLLFILE) rm $(DLLFILE)
|
||||
@@ -12,15 +12,38 @@ CFLAGS = -O3 -march=armv7-a -mcpu=cortex-a8 -mtune=cortex-a8 -mfloat-abi=softfp
|
||||
|
||||
TARGET = libSDL.a
|
||||
|
||||
SOURCES = ./src/*.c ./src/audio/*.c ./src/cpuinfo/*.c ./src/events/*.c \
|
||||
./src/file/*.c ./src/stdlib/*.c ./src/thread/*.c ./src/timer/*.c ./src/video/*.c \
|
||||
./src/joystick/*.c ./src/haptic/*.c ./src/power/*.c ./src/video/dummy/*.c ./src/audio/disk/*.c \
|
||||
./src/audio/dummy/*.c ./src/loadso/dlopen/*.c ./src/audio/dsp/*.c \
|
||||
./src/thread/pthread/SDL_systhread.c ./src/thread/pthread/SDL_syssem.c \
|
||||
./src/thread/pthread/SDL_sysmutex.c ./src/thread/pthread/SDL_syscond.c \
|
||||
./src/joystick/linux/*.c ./src/haptic/linux/*.c ./src/timer/unix/*.c \
|
||||
./src/atomic/*.c ./src/filesystem/unix/*.c \
|
||||
./src/video/pandora/SDL_pandora.o ./src/video/pandora/SDL_pandora_events.o ./src/video/x11/*.c
|
||||
SOURCES =
|
||||
./src/*.c \
|
||||
./src/atomic/*.c \
|
||||
./src/audio/*.c \
|
||||
./src/audio/disk/*.c \
|
||||
./src/audio/dsp/*.c \
|
||||
./src/audio/dummy/*.c \
|
||||
./src/cpuinfo/*.c \
|
||||
./src/events/*.c \
|
||||
./src/file/*.c \
|
||||
./src/filesystem/unix/*.c \
|
||||
./src/haptic/*.c \
|
||||
./src/haptic/linux/*.c \
|
||||
./src/joystick/*.c \
|
||||
./src/joystick/linux/*.c \
|
||||
./src/loadso/dlopen/*.c \
|
||||
./src/power/*.c \
|
||||
./src/sensor/*.c \
|
||||
./src/sensor/dummy/*.c \
|
||||
./src/stdlib/*.c \
|
||||
./src/thread/*.c \
|
||||
./src/thread/pthread/SDL_syscond.c \
|
||||
./src/thread/pthread/SDL_sysmutex.c \
|
||||
./src/thread/pthread/SDL_syssem.c \
|
||||
./src/thread/pthread/SDL_systhread.c \
|
||||
./src/timer/*.c \
|
||||
./src/timer/unix/*.c \
|
||||
./src/video/*.c \
|
||||
./src/video/dummy/*.c \
|
||||
./src/video/pandora/SDL_pandora.o \
|
||||
./src/video/pandora/SDL_pandora_events.o \
|
||||
./src/video/x11/*.c \
|
||||
|
||||
|
||||
OBJECTS = $(shell echo $(SOURCES) | sed -e 's,\.c,\.o,g')
|
||||
|
||||
@@ -42,6 +42,8 @@ OBJS= src/SDL.o \
|
||||
src/render/software/SDL_drawpoint.o \
|
||||
src/render/software/SDL_render_sw.o \
|
||||
src/render/software/SDL_rotate.o \
|
||||
src/sensor/SDL_sensor.o \
|
||||
src/sensor/dummy/SDL_dummysensor.o \
|
||||
src/stdlib/SDL_getenv.o \
|
||||
src/stdlib/SDL_iconv.o \
|
||||
src/stdlib/SDL_malloc.o \
|
||||
|
||||
35
Makefile.wiz
35
Makefile.wiz
@@ -12,14 +12,33 @@ CFLAGS = -Wall -fPIC -I./include -I$(WIZSDK)/include -DWIZ_GLES_LITE
|
||||
TARGET_STATIC = libSDL2.a
|
||||
TARGET_SHARED = libSDL2.so
|
||||
|
||||
SOURCES = ./src/*.c ./src/audio/*.c ./src/cpuinfo/*.c ./src/events/*.c \
|
||||
./src/file/*.c ./src/stdlib/*.c ./src/thread/*.c ./src/timer/*.c ./src/video/*.c \
|
||||
./src/joystick/*.c ./src/haptic/*.c ./src/video/dummy/*.c ./src/audio/disk/*.c \
|
||||
./src/audio/dummy/*.c ./src/loadso/dlopen/*.c ./src/audio/dsp/*.c \
|
||||
./src/thread/pthread/SDL_systhread.c ./src/thread/pthread/SDL_syssem.c \
|
||||
./src/thread/pthread/SDL_sysmutex.c ./src/thread/pthread/SDL_syscond.c \
|
||||
./src/joystick/linux/*.c ./src/haptic/linux/*.c ./src/timer/unix/*.c \
|
||||
./src/video/pandora/SDL_pandora.o ./src/video/pandora/SDL_pandora_events.o
|
||||
SOURCES = \
|
||||
./src/*.c \
|
||||
./src/audio/*.c \
|
||||
./src/audio/disk/*.c \
|
||||
./src/audio/dsp/*.c \
|
||||
./src/audio/dummy/*.c \
|
||||
./src/cpuinfo/*.c \
|
||||
./src/events/*.c \
|
||||
./src/file/*.c \
|
||||
./src/haptic/*.c \
|
||||
./src/haptic/linux/*.c \
|
||||
./src/joystick/*.c \
|
||||
./src/joystick/linux/*.c \
|
||||
./src/loadso/dlopen/*.c \
|
||||
./src/sensor/*.c \
|
||||
./src/sensor/dummy/*.c \
|
||||
./src/stdlib/*.c \
|
||||
./src/thread/*.c \
|
||||
./src/thread/pthread/SDL_syscond.c \
|
||||
./src/thread/pthread/SDL_sysmutex.c \
|
||||
./src/thread/pthread/SDL_syssem.c \
|
||||
./src/thread/pthread/SDL_systhread.c \
|
||||
./src/timer/*.c \
|
||||
./src/timer/unix/*.c \
|
||||
./src/video/*.c \
|
||||
./src/video/dummy/*.c \
|
||||
./src/video/pandora/*.c \
|
||||
|
||||
|
||||
OBJECTS = $(shell echo $(SOURCES) | sed -e 's,\.c,\.o,g')
|
||||
|
||||
@@ -67,6 +67,7 @@
|
||||
<ClInclude Include="..\..\include\SDL_revision.h" />
|
||||
<ClInclude Include="..\..\include\SDL_rwops.h" />
|
||||
<ClInclude Include="..\..\include\SDL_scancode.h" />
|
||||
<ClInclude Include="..\..\include\SDL_sensor.h" />
|
||||
<ClInclude Include="..\..\include\SDL_shape.h" />
|
||||
<ClInclude Include="..\..\include\SDL_stdinc.h" />
|
||||
<ClInclude Include="..\..\include\SDL_surface.h" />
|
||||
@@ -97,6 +98,7 @@
|
||||
<ClInclude Include="..\..\src\events\blank_cursor.h" />
|
||||
<ClInclude Include="..\..\src\events\default_cursor.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_clipboardevents_c.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_displayevents_c.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_dropevents_c.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_events_c.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_keyboard_c.h" />
|
||||
@@ -136,6 +138,9 @@
|
||||
<ClInclude Include="..\..\src\SDL_fatal.h" />
|
||||
<ClInclude Include="..\..\src\SDL_hints_c.h" />
|
||||
<ClInclude Include="..\..\src\SDL_internal.h" />
|
||||
<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\thread\SDL_systhread.h" />
|
||||
<ClInclude Include="..\..\src\thread\SDL_thread_c.h" />
|
||||
<ClInclude Include="..\..\src\thread\stdcpp\SDL_sysmutex_c.h" />
|
||||
@@ -212,6 +217,7 @@
|
||||
<ClCompile Include="..\..\src\cpuinfo\SDL_cpuinfo.c" />
|
||||
<ClCompile Include="..\..\src\dynapi\SDL_dynapi.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_clipboardevents.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_displayevents.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_dropevents.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_events.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_gesture.c" />
|
||||
@@ -271,6 +277,8 @@
|
||||
<ClCompile Include="..\..\src\SDL_error.c" />
|
||||
<ClCompile Include="..\..\src\SDL_hints.c" />
|
||||
<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_getenv.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_iconv.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_malloc.c" />
|
||||
|
||||
@@ -414,6 +414,21 @@
|
||||
<ClInclude Include="..\..\src\render\direct3d11\SDL_shaders_d3d11.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_sensor.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\sensor\SDL_sensor_c.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\sensor\SDL_syssensor.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\sensor\dummy\SDL_dummysensor.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\events\SDL_displayevents_c.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\src\atomic\SDL_atomic.c">
|
||||
@@ -746,5 +761,14 @@
|
||||
<ClCompile Include="..\..\src\render\direct3d11\SDL_shaders_d3d11.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\sensor\SDL_sensor.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\sensor\dummy\SDL_dummysensor.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\events\SDL_displayevents.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -59,6 +59,7 @@
|
||||
<ClInclude Include="..\..\include\SDL_revision.h" />
|
||||
<ClInclude Include="..\..\include\SDL_rwops.h" />
|
||||
<ClInclude Include="..\..\include\SDL_scancode.h" />
|
||||
<ClInclude Include="..\..\include\SDL_sensor.h" />
|
||||
<ClInclude Include="..\..\include\SDL_shape.h" />
|
||||
<ClInclude Include="..\..\include\SDL_stdinc.h" />
|
||||
<ClInclude Include="..\..\include\SDL_surface.h" />
|
||||
@@ -87,6 +88,7 @@
|
||||
<ClInclude Include="..\..\src\events\blank_cursor.h" />
|
||||
<ClInclude Include="..\..\src\events\default_cursor.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_clipboardevents_c.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_displayevents_c.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_dropevents_c.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_events_c.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_keyboard_c.h" />
|
||||
@@ -121,6 +123,9 @@
|
||||
<ClInclude Include="..\..\src\SDL_fatal.h" />
|
||||
<ClInclude Include="..\..\src\SDL_hints_c.h" />
|
||||
<ClInclude Include="..\..\src\SDL_internal.h" />
|
||||
<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\thread\SDL_systhread.h" />
|
||||
<ClInclude Include="..\..\src\thread\SDL_thread_c.h" />
|
||||
<ClInclude Include="..\..\src\thread\windows\SDL_systhread_c.h" />
|
||||
@@ -187,6 +192,7 @@
|
||||
<ClCompile Include="..\..\src\cpuinfo\SDL_cpuinfo.c" />
|
||||
<ClCompile Include="..\..\src\dynapi\SDL_dynapi.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_clipboardevents.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_displayevents.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_dropevents.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_events.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_gesture.c" />
|
||||
@@ -237,6 +243,8 @@
|
||||
<ClCompile Include="..\..\src\SDL_error.c" />
|
||||
<ClCompile Include="..\..\src\SDL_hints.c" />
|
||||
<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_getenv.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_iconv.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_malloc.c" />
|
||||
|
||||
@@ -387,7 +387,24 @@
|
||||
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\render\direct3d11\SDL_shaders_d3d11.h" />
|
||||
<ClInclude Include="..\..\src\render\direct3d11\SDL_shaders_d3d11.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\sensor\SDL_sensor_c.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\sensor\SDL_syssensor.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\sensor\dummy\SDL_dummysensor.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_sensor.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\events\SDL_displayevents_c.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\src\atomic\SDL_atomic.c">
|
||||
@@ -702,6 +719,17 @@
|
||||
<ClCompile Include="..\..\src\video\yuv2rgb\yuv_rgb.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\render\direct3d11\SDL_shaders_d3d11.c" />
|
||||
<ClCompile Include="..\..\src\render\direct3d11\SDL_shaders_d3d11.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\sensor\SDL_sensor.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\sensor\dummy\SDL_dummysensor.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\events\SDL_displayevents.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -67,6 +67,7 @@
|
||||
<ClInclude Include="..\..\include\SDL_revision.h" />
|
||||
<ClInclude Include="..\..\include\SDL_rwops.h" />
|
||||
<ClInclude Include="..\..\include\SDL_scancode.h" />
|
||||
<ClInclude Include="..\..\include\SDL_sensor.h" />
|
||||
<ClInclude Include="..\..\include\SDL_shape.h" />
|
||||
<ClInclude Include="..\..\include\SDL_stdinc.h" />
|
||||
<ClInclude Include="..\..\include\SDL_surface.h" />
|
||||
@@ -97,6 +98,7 @@
|
||||
<ClInclude Include="..\..\src\events\blank_cursor.h" />
|
||||
<ClInclude Include="..\..\src\events\default_cursor.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_clipboardevents_c.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_displayevents_c.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_dropevents_c.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_events_c.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_keyboard_c.h" />
|
||||
@@ -136,6 +138,9 @@
|
||||
<ClInclude Include="..\..\src\SDL_fatal.h" />
|
||||
<ClInclude Include="..\..\src\SDL_hints_c.h" />
|
||||
<ClInclude Include="..\..\src\SDL_internal.h" />
|
||||
<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\thread\SDL_thread_c.h" />
|
||||
<ClInclude Include="..\..\src\thread\windows\SDL_systhread_c.h" />
|
||||
<ClInclude Include="..\..\src\timer\SDL_timer_c.h" />
|
||||
@@ -210,6 +215,7 @@
|
||||
<ClCompile Include="..\..\src\cpuinfo\SDL_cpuinfo.c" />
|
||||
<ClCompile Include="..\..\src\dynapi\SDL_dynapi.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_clipboardevents.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_displayevents.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_dropevents.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_events.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_gesture.c" />
|
||||
@@ -269,6 +275,8 @@
|
||||
<ClCompile Include="..\..\src\SDL_error.c" />
|
||||
<ClCompile Include="..\..\src\SDL_hints.c" />
|
||||
<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_getenv.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_iconv.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_malloc.c" />
|
||||
|
||||
@@ -408,6 +408,21 @@
|
||||
<ClInclude Include="..\..\src\render\direct3d11\SDL_shaders_d3d11.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_sensor.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\sensor\SDL_sensor_c.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\sensor\SDL_syssensor.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\sensor\dummy\SDL_dummysensor.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\events\SDL_displayevents_c.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\src\atomic\SDL_atomic.c">
|
||||
@@ -743,5 +758,14 @@
|
||||
<ClCompile Include="..\..\src\render\direct3d11\SDL_shaders_d3d11.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\sensor\SDL_sensor.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\sensor\dummy\SDL_dummysensor.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\events\SDL_displayevents.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -80,6 +80,18 @@
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
|
||||
<LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">C:\Program Files %28x86%29\Microsoft DirectX SDK %28June 2010%29\Lib\x86;$(LibraryPath)</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<IncludePath>D:\dev\steam\rel\streaming_client\SDL\src\hidapi\hidapi;$(IncludePath)</IncludePath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<IncludePath>D:\dev\steam\rel\streaming_client\SDL\src\hidapi\hidapi;$(IncludePath)</IncludePath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<IncludePath>D:\dev\steam\rel\streaming_client\SDL\src\hidapi\hidapi;$(IncludePath)</IncludePath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<IncludePath>D:\dev\steam\rel\streaming_client\SDL\src\hidapi\hidapi;$(IncludePath)</IncludePath>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<PreBuildEvent>
|
||||
<Command>
|
||||
@@ -109,7 +121,7 @@
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>winmm.lib;imm32.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>setupapi.lib;winmm.lib;imm32.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
@@ -140,7 +152,7 @@
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>winmm.lib;imm32.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>setupapi.lib;winmm.lib;imm32.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
@@ -174,7 +186,7 @@
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>winmm.lib;imm32.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>setupapi.lib;winmm.lib;imm32.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
@@ -206,7 +218,7 @@
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>winmm.lib;imm32.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>setupapi.lib;winmm.lib;imm32.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
@@ -264,6 +276,7 @@
|
||||
<ClInclude Include="..\..\include\SDL_revision.h" />
|
||||
<ClInclude Include="..\..\include\SDL_rwops.h" />
|
||||
<ClInclude Include="..\..\include\SDL_scancode.h" />
|
||||
<ClInclude Include="..\..\include\SDL_sensor.h" />
|
||||
<ClInclude Include="..\..\include\SDL_shape.h" />
|
||||
<ClInclude Include="..\..\include\SDL_stdinc.h" />
|
||||
<ClInclude Include="..\..\include\SDL_surface.h" />
|
||||
@@ -306,6 +319,7 @@
|
||||
<ClInclude Include="..\..\src\events\blank_cursor.h" />
|
||||
<ClInclude Include="..\..\src\events\default_cursor.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_clipboardevents_c.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_displayevents_c.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_dropevents_c.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_events_c.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_gesture_c.h" />
|
||||
@@ -318,6 +332,8 @@
|
||||
<ClInclude Include="..\..\src\haptic\windows\SDL_dinputhaptic_c.h" />
|
||||
<ClInclude Include="..\..\src\haptic\windows\SDL_windowshaptic_c.h" />
|
||||
<ClInclude Include="..\..\src\haptic\windows\SDL_xinputhaptic_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\hidapi\controller_type.h" />
|
||||
<ClInclude Include="..\..\src\joystick\hidapi\SDL_hidapijoystick_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\SDL_joystick_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\SDL_sysjoystick.h" />
|
||||
<ClInclude Include="..\..\src\joystick\windows\SDL_dinputjoystick_c.h" />
|
||||
@@ -343,6 +359,9 @@
|
||||
<ClInclude Include="..\..\src\render\software\SDL_rotate.h" />
|
||||
<ClInclude Include="..\..\src\SDL_dataqueue.h" />
|
||||
<ClInclude Include="..\..\src\SDL_error_c.h" />
|
||||
<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\thread\SDL_systhread.h" />
|
||||
<ClInclude Include="..\..\src\thread\SDL_thread_c.h" />
|
||||
<ClInclude Include="..\..\src\thread\windows\SDL_systhread_c.h" />
|
||||
@@ -397,6 +416,7 @@
|
||||
<ClCompile Include="..\..\src\cpuinfo\SDL_cpuinfo.c" />
|
||||
<ClCompile Include="..\..\src\dynapi\SDL_dynapi.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_clipboardevents.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_displayevents.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_dropevents.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_events.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_gesture.c" />
|
||||
@@ -411,6 +431,12 @@
|
||||
<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\joystick\hidapi\SDL_hidapijoystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_ps4.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_switch.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xbox360.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xboxone.c" />
|
||||
<ClCompile Include="..\..\src\joystick\SDL_gamecontroller.c" />
|
||||
<ClCompile Include="..\..\src\joystick\SDL_joystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\windows\SDL_dinputjoystick.c" />
|
||||
@@ -418,6 +444,7 @@
|
||||
<ClCompile Include="..\..\src\joystick\windows\SDL_windowsjoystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\windows\SDL_xinputjoystick.c" />
|
||||
<ClCompile Include="..\..\src\libm\e_atan2.c" />
|
||||
<ClCompile Include="..\..\src\libm\e_exp.c" />
|
||||
<ClCompile Include="..\..\src\libm\e_fmod.c" />
|
||||
<ClCompile Include="..\..\src\libm\e_log.c" />
|
||||
<ClCompile Include="..\..\src\libm\e_log10.c" />
|
||||
@@ -463,6 +490,8 @@
|
||||
<ClCompile Include="..\..\src\SDL_error.c" />
|
||||
<ClCompile Include="..\..\src\SDL_hints.c" />
|
||||
<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_getenv.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_iconv.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_malloc.c" />
|
||||
@@ -522,4 +551,4 @@
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
@@ -1,460 +1,479 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="API Headers">
|
||||
<UniqueIdentifier>{395b3af0-33d0-411b-b153-de1676bf1ef8}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\include\begin_code.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\close_code.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_assert.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_atomic.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_audio.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_bits.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_blendmode.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_clipboard.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_config.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_config_windows.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_copying.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_cpuinfo.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_egl.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_endian.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_error.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_events.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_filesystem.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_gamecontroller.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_gesture.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_haptic.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_hints.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_joystick.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_keyboard.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_keycode.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_loadso.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_log.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_main.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_messagebox.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_mouse.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_mutex.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_name.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_opengl.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_opengl_glext.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_opengles.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_opengles2.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_opengles2_gl2.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_opengles2_gl2ext.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_opengles2_gl2platform.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_opengles2_khrplatform.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_pixels.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_platform.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_power.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_quit.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_rect.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_render.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_revision.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_rwops.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_scancode.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_shape.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_stdinc.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_surface.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_system.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_syswm.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_test.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_test_assert.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_test_common.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_test_compare.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_test_crc32.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_test_font.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_test_fuzzer.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_test_harness.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_test_images.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_test_log.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_test_md5.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_test_random.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_thread.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_timer.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_touch.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_types.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_version.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_video.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_vulkan.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\audio\directsound\SDL_directsound.h" />
|
||||
<ClInclude Include="..\..\src\audio\disk\SDL_diskaudio.h" />
|
||||
<ClInclude Include="..\..\src\audio\dummy\SDL_dummyaudio.h" />
|
||||
<ClInclude Include="..\..\src\audio\SDL_audio_c.h" />
|
||||
<ClInclude Include="..\..\src\audio\SDL_audiodev_c.h" />
|
||||
<ClInclude Include="..\..\src\audio\SDL_sysaudio.h" />
|
||||
<ClInclude Include="..\..\src\audio\SDL_wave.h" />
|
||||
<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_windows.h" />
|
||||
<ClInclude Include="..\..\src\core\windows\SDL_xinput.h" />
|
||||
<ClInclude Include="..\..\src\dynapi\SDL_dynapi.h" />
|
||||
<ClInclude Include="..\..\src\dynapi\SDL_dynapi_overrides.h" />
|
||||
<ClInclude Include="..\..\src\dynapi\SDL_dynapi_procs.h" />
|
||||
<ClInclude Include="..\..\src\events\blank_cursor.h" />
|
||||
<ClInclude Include="..\..\src\events\default_cursor.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_clipboardevents_c.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_dropevents_c.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_events_c.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_gesture_c.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_keyboard_c.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_mouse_c.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_sysevents.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_touch_c.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_windowevents_c.h" />
|
||||
<ClInclude Include="..\..\src\haptic\SDL_syshaptic.h" />
|
||||
<ClInclude Include="..\..\src\haptic\windows\SDL_dinputhaptic_c.h" />
|
||||
<ClInclude Include="..\..\src\haptic\windows\SDL_windowshaptic_c.h" />
|
||||
<ClInclude Include="..\..\src\haptic\windows\SDL_xinputhaptic_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\SDL_joystick_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\SDL_sysjoystick.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\libm\math_libm.h" />
|
||||
<ClInclude Include="..\..\src\libm\math_private.h" />
|
||||
<ClInclude Include="..\..\src\render\opengl\SDL_glfuncs.h" />
|
||||
<ClInclude Include="..\..\src\render\opengl\SDL_shaders_gl.h" />
|
||||
<ClInclude Include="..\..\src\render\opengles\SDL_glesfuncs.h" />
|
||||
<ClInclude Include="..\..\src\render\SDL_d3dmath.h" />
|
||||
<ClInclude Include="..\..\src\render\SDL_sysrender.h" />
|
||||
<ClInclude Include="..\..\src\render\SDL_yuv_sw_c.h" />
|
||||
<ClInclude Include="..\..\src\render\software\SDL_blendfillrect.h" />
|
||||
<ClInclude Include="..\..\src\render\software\SDL_blendline.h" />
|
||||
<ClInclude Include="..\..\src\render\software\SDL_blendpoint.h" />
|
||||
<ClInclude Include="..\..\src\render\software\SDL_draw.h" />
|
||||
<ClInclude Include="..\..\src\render\software\SDL_drawline.h" />
|
||||
<ClInclude Include="..\..\src\render\software\SDL_drawpoint.h" />
|
||||
<ClInclude Include="..\..\src\render\software\SDL_render_sw_c.h" />
|
||||
<ClInclude Include="..\..\src\render\software\SDL_rotate.h" />
|
||||
<ClInclude Include="..\..\src\SDL_dataqueue.h" />
|
||||
<ClInclude Include="..\..\src\SDL_error_c.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" />
|
||||
<ClInclude Include="..\..\src\timer\SDL_timer_c.h" />
|
||||
<ClInclude Include="..\..\src\video\dummy\SDL_nullevents_c.h" />
|
||||
<ClInclude Include="..\..\src\video\dummy\SDL_nullframebuffer_c.h" />
|
||||
<ClInclude Include="..\..\src\video\dummy\SDL_nullvideo.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_blit.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_blit_auto.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_blit_copy.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_blit_slow.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_pixels_c.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_rect_c.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_RLEaccel_c.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_shape_internals.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_sysvideo.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_vulkan_internal.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_vkeys.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowsclipboard.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowsevents.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowsframebuffer.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowskeyboard.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowsmessagebox.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowsmodes.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowsmouse.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowsopengl.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowsshape.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowsvideo.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowsvulkan.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowswindow.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\wmmsg.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_yuv_c.h" />
|
||||
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb.h" />
|
||||
<ClInclude Include="..\..\src\render\direct3d11\SDL_shaders_d3d11.h" />
|
||||
<ClInclude Include="..\..\src\render\direct3d\SDL_shaders_d3d.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\src\libm\e_atan2.c" />
|
||||
<ClCompile Include="..\..\src\libm\e_log.c" />
|
||||
<ClCompile Include="..\..\src\libm\e_log10.c" />
|
||||
<ClCompile Include="..\..\src\libm\e_pow.c" />
|
||||
<ClCompile Include="..\..\src\libm\e_rem_pio2.c" />
|
||||
<ClCompile Include="..\..\src\libm\e_sqrt.c" />
|
||||
<ClCompile Include="..\..\src\libm\k_cos.c" />
|
||||
<ClCompile Include="..\..\src\libm\k_rem_pio2.c" />
|
||||
<ClCompile Include="..\..\src\libm\k_sin.c" />
|
||||
<ClCompile Include="..\..\src\libm\k_tan.c" />
|
||||
<ClCompile Include="..\..\src\libm\s_atan.c" />
|
||||
<ClCompile Include="..\..\src\libm\s_copysign.c" />
|
||||
<ClCompile Include="..\..\src\libm\s_cos.c" />
|
||||
<ClCompile Include="..\..\src\libm\s_fabs.c" />
|
||||
<ClCompile Include="..\..\src\libm\s_floor.c" />
|
||||
<ClCompile Include="..\..\src\libm\s_scalbn.c" />
|
||||
<ClCompile Include="..\..\src\libm\s_sin.c" />
|
||||
<ClCompile Include="..\..\src\libm\s_tan.c" />
|
||||
<ClCompile Include="..\..\src\SDL.c" />
|
||||
<ClCompile Include="..\..\src\SDL_assert.c" />
|
||||
<ClCompile Include="..\..\src\atomic\SDL_atomic.c" />
|
||||
<ClCompile Include="..\..\src\audio\SDL_audio.c" />
|
||||
<ClCompile Include="..\..\src\audio\SDL_audiocvt.c" />
|
||||
<ClCompile Include="..\..\src\audio\SDL_audiodev.c" />
|
||||
<ClCompile Include="..\..\src\audio\SDL_audiotypecvt.c" />
|
||||
<ClCompile Include="..\..\src\render\software\SDL_blendfillrect.c" />
|
||||
<ClCompile Include="..\..\src\render\software\SDL_blendline.c" />
|
||||
<ClCompile Include="..\..\src\render\software\SDL_blendpoint.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_blit.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_blit_0.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_blit_1.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_blit_A.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_blit_auto.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_blit_copy.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_blit_N.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_blit_slow.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_bmp.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_clipboard.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_clipboardevents.c" />
|
||||
<ClCompile Include="..\..\src\cpuinfo\SDL_cpuinfo.c" />
|
||||
<ClCompile Include="..\..\src\render\SDL_d3dmath.c" />
|
||||
<ClCompile Include="..\..\src\haptic\windows\SDL_dinputhaptic.c" />
|
||||
<ClCompile Include="..\..\src\joystick\windows\SDL_dinputjoystick.c" />
|
||||
<ClCompile Include="..\..\src\audio\directsound\SDL_directsound.c" />
|
||||
<ClCompile Include="..\..\src\audio\disk\SDL_diskaudio.c" />
|
||||
<ClCompile Include="..\..\src\render\software\SDL_drawline.c" />
|
||||
<ClCompile Include="..\..\src\render\software\SDL_drawpoint.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_dropevents.c" />
|
||||
<ClCompile Include="..\..\src\audio\dummy\SDL_dummyaudio.c" />
|
||||
<ClCompile Include="..\..\src\dynapi\SDL_dynapi.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_egl.c" />
|
||||
<ClCompile Include="..\..\src\SDL_dataqueue.c" />
|
||||
<ClCompile Include="..\..\src\SDL_error.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_events.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_fillrect.c" />
|
||||
<ClCompile Include="..\..\src\joystick\SDL_gamecontroller.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_gesture.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_getenv.c" />
|
||||
<ClCompile Include="..\..\src\haptic\SDL_haptic.c" />
|
||||
<ClCompile Include="..\..\src\SDL_hints.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_iconv.c" />
|
||||
<ClCompile Include="..\..\src\joystick\SDL_joystick.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_keyboard.c" />
|
||||
<ClCompile Include="..\..\src\SDL_log.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_malloc.c" />
|
||||
<ClCompile Include="..\..\src\audio\SDL_mixer.c" />
|
||||
<ClCompile Include="..\..\src\joystick\windows\SDL_mmjoystick.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_mouse.c" />
|
||||
<ClCompile Include="..\..\src\video\dummy\SDL_nullevents.c" />
|
||||
<ClCompile Include="..\..\src\video\dummy\SDL_nullframebuffer.c" />
|
||||
<ClCompile Include="..\..\src\video\dummy\SDL_nullvideo.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_pixels.c" />
|
||||
<ClCompile Include="..\..\src\power\SDL_power.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_qsort.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_quit.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_rect.c" />
|
||||
<ClCompile Include="..\..\src\render\SDL_render.c" />
|
||||
<ClCompile Include="..\..\src\render\direct3d\SDL_render_d3d.c" />
|
||||
<ClCompile Include="..\..\src\render\direct3d11\SDL_render_d3d11.c" />
|
||||
<ClCompile Include="..\..\src\render\opengl\SDL_render_gl.c" />
|
||||
<ClCompile Include="..\..\src\render\opengles2\SDL_render_gles2.c" />
|
||||
<ClCompile Include="..\..\src\render\software\SDL_render_sw.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_RLEaccel.c" />
|
||||
<ClCompile Include="..\..\src\render\software\SDL_rotate.c" />
|
||||
<ClCompile Include="..\..\src\file\SDL_rwops.c" />
|
||||
<ClCompile Include="..\..\src\render\opengl\SDL_shaders_gl.c" />
|
||||
<ClCompile Include="..\..\src\render\opengles2\SDL_shaders_gles2.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_shape.c" />
|
||||
<ClCompile Include="..\..\src\atomic\SDL_spinlock.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_stdlib.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_stretch.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_string.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_surface.c" />
|
||||
<ClCompile Include="..\..\src\thread\generic\SDL_syscond.c" />
|
||||
<ClCompile Include="..\..\src\filesystem\windows\SDL_sysfilesystem.c" />
|
||||
<ClCompile Include="..\..\src\loadso\windows\SDL_sysloadso.c" />
|
||||
<ClCompile Include="..\..\src\thread\windows\SDL_sysmutex.c" />
|
||||
<ClCompile Include="..\..\src\power\windows\SDL_syspower.c" />
|
||||
<ClCompile Include="..\..\src\thread\windows\SDL_syssem.c" />
|
||||
<ClCompile Include="..\..\src\thread\windows\SDL_systhread.c" />
|
||||
<ClCompile Include="..\..\src\timer\windows\SDL_systimer.c" />
|
||||
<ClCompile Include="..\..\src\thread\windows\SDL_systls.c" />
|
||||
<ClCompile Include="..\..\src\thread\SDL_thread.c" />
|
||||
<ClCompile Include="..\..\src\timer\SDL_timer.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_touch.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_video.c" />
|
||||
<ClCompile Include="..\..\src\audio\SDL_wave.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_windowevents.c" />
|
||||
<ClCompile Include="..\..\src\core\windows\SDL_windows.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsclipboard.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsevents.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsframebuffer.c" />
|
||||
<ClCompile Include="..\..\src\haptic\windows\SDL_windowshaptic.c" />
|
||||
<ClCompile Include="..\..\src\joystick\windows\SDL_windowsjoystick.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowskeyboard.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsmessagebox.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsmodes.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsmouse.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsopengl.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsopengles.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsshape.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsvideo.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowswindow.c" />
|
||||
<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_xinput.c" />
|
||||
<ClCompile Include="..\..\src\haptic\windows\SDL_xinputhaptic.c" />
|
||||
<ClCompile Include="..\..\src\joystick\windows\SDL_xinputjoystick.c" />
|
||||
<ClCompile Include="..\..\src\render\SDL_yuv_sw.c" />
|
||||
<ClCompile Include="..\..\src\audio\wasapi\SDL_wasapi.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_vulkan_utils.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsvulkan.c" />
|
||||
<ClCompile Include="..\..\src\libm\e_fmod.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_yuv.c" />
|
||||
<ClCompile Include="..\..\src\video\yuv2rgb\yuv_rgb.c" />
|
||||
<ClCompile Include="..\..\src\render\direct3d11\SDL_shaders_d3d11.c" />
|
||||
<ClCompile Include="..\..\src\render\direct3d\SDL_shaders_d3d.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="..\..\src\main\windows\version.rc" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="API Headers">
|
||||
<UniqueIdentifier>{395b3af0-33d0-411b-b153-de1676bf1ef8}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\include\begin_code.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\close_code.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_assert.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_atomic.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_audio.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_bits.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_blendmode.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_clipboard.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_config.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_config_windows.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_copying.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_cpuinfo.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_egl.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_endian.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_error.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_events.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_filesystem.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_gamecontroller.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_gesture.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_haptic.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_hints.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_joystick.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_keyboard.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_keycode.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_loadso.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_log.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_main.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_messagebox.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_mouse.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_mutex.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_name.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_opengl.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_opengl_glext.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_opengles.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_opengles2.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_opengles2_gl2.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_opengles2_gl2ext.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_opengles2_gl2platform.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_opengles2_khrplatform.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_pixels.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_platform.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_power.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_quit.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_rect.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_render.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_revision.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_rwops.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_scancode.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_sensor.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_shape.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_stdinc.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_surface.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_system.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_syswm.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_test.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_test_assert.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_test_common.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_test_compare.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_test_crc32.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_test_font.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_test_fuzzer.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_test_harness.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_test_images.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_test_log.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_test_md5.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_test_random.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_thread.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_timer.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_touch.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_types.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_version.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_video.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_vulkan.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\audio\directsound\SDL_directsound.h" />
|
||||
<ClInclude Include="..\..\src\audio\disk\SDL_diskaudio.h" />
|
||||
<ClInclude Include="..\..\src\audio\dummy\SDL_dummyaudio.h" />
|
||||
<ClInclude Include="..\..\src\audio\SDL_audio_c.h" />
|
||||
<ClInclude Include="..\..\src\audio\SDL_audiodev_c.h" />
|
||||
<ClInclude Include="..\..\src\audio\SDL_sysaudio.h" />
|
||||
<ClInclude Include="..\..\src\audio\SDL_wave.h" />
|
||||
<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_windows.h" />
|
||||
<ClInclude Include="..\..\src\core\windows\SDL_xinput.h" />
|
||||
<ClInclude Include="..\..\src\dynapi\SDL_dynapi.h" />
|
||||
<ClInclude Include="..\..\src\dynapi\SDL_dynapi_overrides.h" />
|
||||
<ClInclude Include="..\..\src\dynapi\SDL_dynapi_procs.h" />
|
||||
<ClInclude Include="..\..\src\events\blank_cursor.h" />
|
||||
<ClInclude Include="..\..\src\events\default_cursor.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_clipboardevents_c.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_displayevents_c.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_dropevents_c.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_events_c.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_gesture_c.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_keyboard_c.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_mouse_c.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_sysevents.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_touch_c.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_windowevents_c.h" />
|
||||
<ClInclude Include="..\..\src\haptic\SDL_syshaptic.h" />
|
||||
<ClInclude Include="..\..\src\haptic\windows\SDL_dinputhaptic_c.h" />
|
||||
<ClInclude Include="..\..\src\haptic\windows\SDL_windowshaptic_c.h" />
|
||||
<ClInclude Include="..\..\src\haptic\windows\SDL_xinputhaptic_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\hidapi\controller_type.h" />
|
||||
<ClInclude Include="..\..\src\joystick\hidapi\SDL_hidapijoystick_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\SDL_joystick_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\SDL_sysjoystick.h" />
|
||||
<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\libm\math_libm.h" />
|
||||
<ClInclude Include="..\..\src\libm\math_private.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" />
|
||||
<ClInclude Include="..\..\src\render\opengl\SDL_shaders_gl.h" />
|
||||
<ClInclude Include="..\..\src\render\opengles\SDL_glesfuncs.h" />
|
||||
<ClInclude Include="..\..\src\render\SDL_d3dmath.h" />
|
||||
<ClInclude Include="..\..\src\render\SDL_sysrender.h" />
|
||||
<ClInclude Include="..\..\src\render\SDL_yuv_sw_c.h" />
|
||||
<ClInclude Include="..\..\src\render\software\SDL_blendfillrect.h" />
|
||||
<ClInclude Include="..\..\src\render\software\SDL_blendline.h" />
|
||||
<ClInclude Include="..\..\src\render\software\SDL_blendpoint.h" />
|
||||
<ClInclude Include="..\..\src\render\software\SDL_draw.h" />
|
||||
<ClInclude Include="..\..\src\render\software\SDL_drawline.h" />
|
||||
<ClInclude Include="..\..\src\render\software\SDL_drawpoint.h" />
|
||||
<ClInclude Include="..\..\src\render\software\SDL_render_sw_c.h" />
|
||||
<ClInclude Include="..\..\src\render\software\SDL_rotate.h" />
|
||||
<ClInclude Include="..\..\src\SDL_dataqueue.h" />
|
||||
<ClInclude Include="..\..\src\SDL_error_c.h" />
|
||||
<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\thread\SDL_systhread.h" />
|
||||
<ClInclude Include="..\..\src\thread\SDL_thread_c.h" />
|
||||
<ClInclude Include="..\..\src\thread\windows\SDL_systhread_c.h" />
|
||||
<ClInclude Include="..\..\src\timer\SDL_timer_c.h" />
|
||||
<ClInclude Include="..\..\src\video\dummy\SDL_nullevents_c.h" />
|
||||
<ClInclude Include="..\..\src\video\dummy\SDL_nullframebuffer_c.h" />
|
||||
<ClInclude Include="..\..\src\video\dummy\SDL_nullvideo.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_blit.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_blit_auto.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_blit_copy.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_blit_slow.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_pixels_c.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_rect_c.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_RLEaccel_c.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_shape_internals.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_sysvideo.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_vulkan_internal.h" />
|
||||
<ClInclude Include="..\..\src\video\SDL_yuv_c.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_vkeys.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowsclipboard.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowsevents.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowsframebuffer.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowskeyboard.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowsmessagebox.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowsmodes.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowsmouse.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowsopengl.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowsshape.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowsvideo.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowsvulkan.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\SDL_windowswindow.h" />
|
||||
<ClInclude Include="..\..\src\video\windows\wmmsg.h" />
|
||||
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\src\atomic\SDL_atomic.c" />
|
||||
<ClCompile Include="..\..\src\atomic\SDL_spinlock.c" />
|
||||
<ClCompile Include="..\..\src\audio\directsound\SDL_directsound.c" />
|
||||
<ClCompile Include="..\..\src\audio\disk\SDL_diskaudio.c" />
|
||||
<ClCompile Include="..\..\src\audio\dummy\SDL_dummyaudio.c" />
|
||||
<ClCompile Include="..\..\src\audio\SDL_audio.c" />
|
||||
<ClCompile Include="..\..\src\audio\SDL_audiocvt.c" />
|
||||
<ClCompile Include="..\..\src\audio\SDL_audiodev.c" />
|
||||
<ClCompile Include="..\..\src\audio\SDL_audiotypecvt.c" />
|
||||
<ClCompile Include="..\..\src\audio\SDL_mixer.c" />
|
||||
<ClCompile Include="..\..\src\audio\SDL_wave.c" />
|
||||
<ClCompile Include="..\..\src\audio\wasapi\SDL_wasapi.c" />
|
||||
<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_windows.c" />
|
||||
<ClCompile Include="..\..\src\core\windows\SDL_xinput.c" />
|
||||
<ClCompile Include="..\..\src\cpuinfo\SDL_cpuinfo.c" />
|
||||
<ClCompile Include="..\..\src\dynapi\SDL_dynapi.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_clipboardevents.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_displayevents.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_dropevents.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_events.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_gesture.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_keyboard.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_mouse.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_quit.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_touch.c" />
|
||||
<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\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\joystick\hidapi\SDL_hidapi_ps4.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_switch.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xbox360.c" />
|
||||
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xboxone.c" />
|
||||
<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\windows\SDL_dinputjoystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\windows\SDL_mmjoystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\windows\SDL_windowsjoystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\windows\SDL_xinputjoystick.c" />
|
||||
<ClCompile Include="..\..\src\libm\e_atan2.c" />
|
||||
<ClCompile Include="..\..\src\libm\e_exp.c" />
|
||||
<ClCompile Include="..\..\src\libm\e_fmod.c" />
|
||||
<ClCompile Include="..\..\src\libm\e_log.c" />
|
||||
<ClCompile Include="..\..\src\libm\e_log10.c" />
|
||||
<ClCompile Include="..\..\src\libm\e_pow.c" />
|
||||
<ClCompile Include="..\..\src\libm\e_rem_pio2.c" />
|
||||
<ClCompile Include="..\..\src\libm\e_sqrt.c" />
|
||||
<ClCompile Include="..\..\src\libm\k_cos.c" />
|
||||
<ClCompile Include="..\..\src\libm\k_rem_pio2.c" />
|
||||
<ClCompile Include="..\..\src\libm\k_sin.c" />
|
||||
<ClCompile Include="..\..\src\libm\k_tan.c" />
|
||||
<ClCompile Include="..\..\src\libm\s_atan.c" />
|
||||
<ClCompile Include="..\..\src\libm\s_copysign.c" />
|
||||
<ClCompile Include="..\..\src\libm\s_cos.c" />
|
||||
<ClCompile Include="..\..\src\libm\s_fabs.c" />
|
||||
<ClCompile Include="..\..\src\libm\s_floor.c" />
|
||||
<ClCompile Include="..\..\src\libm\s_scalbn.c" />
|
||||
<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\power\SDL_power.c" />
|
||||
<ClCompile Include="..\..\src\power\windows\SDL_syspower.c" />
|
||||
<ClCompile Include="..\..\src\render\direct3d\SDL_render_d3d.c" />
|
||||
<ClCompile Include="..\..\src\render\direct3d\SDL_shaders_d3d.c" />
|
||||
<ClCompile Include="..\..\src\render\direct3d11\SDL_render_d3d11.c" />
|
||||
<ClCompile Include="..\..\src\render\direct3d11\SDL_shaders_d3d11.c" />
|
||||
<ClCompile Include="..\..\src\render\opengl\SDL_render_gl.c" />
|
||||
<ClCompile Include="..\..\src\render\opengl\SDL_shaders_gl.c" />
|
||||
<ClCompile Include="..\..\src\render\opengles2\SDL_render_gles2.c" />
|
||||
<ClCompile Include="..\..\src\render\opengles2\SDL_shaders_gles2.c" />
|
||||
<ClCompile Include="..\..\src\render\SDL_d3dmath.c" />
|
||||
<ClCompile Include="..\..\src\render\SDL_render.c" />
|
||||
<ClCompile Include="..\..\src\render\SDL_yuv_sw.c" />
|
||||
<ClCompile Include="..\..\src\render\software\SDL_blendfillrect.c" />
|
||||
<ClCompile Include="..\..\src\render\software\SDL_blendline.c" />
|
||||
<ClCompile Include="..\..\src\render\software\SDL_blendpoint.c" />
|
||||
<ClCompile Include="..\..\src\render\software\SDL_drawline.c" />
|
||||
<ClCompile Include="..\..\src\render\software\SDL_drawpoint.c" />
|
||||
<ClCompile Include="..\..\src\render\software\SDL_render_sw.c" />
|
||||
<ClCompile Include="..\..\src\render\software\SDL_rotate.c" />
|
||||
<ClCompile Include="..\..\src\SDL.c" />
|
||||
<ClCompile Include="..\..\src\SDL_assert.c" />
|
||||
<ClCompile Include="..\..\src\SDL_dataqueue.c" />
|
||||
<ClCompile Include="..\..\src\SDL_error.c" />
|
||||
<ClCompile Include="..\..\src\SDL_hints.c" />
|
||||
<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_getenv.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_iconv.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_malloc.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_qsort.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_stdlib.c" />
|
||||
<ClCompile Include="..\..\src\stdlib\SDL_string.c" />
|
||||
<ClCompile Include="..\..\src\thread\generic\SDL_syscond.c" />
|
||||
<ClCompile Include="..\..\src\thread\SDL_thread.c" />
|
||||
<ClCompile Include="..\..\src\thread\windows\SDL_sysmutex.c" />
|
||||
<ClCompile Include="..\..\src\thread\windows\SDL_syssem.c" />
|
||||
<ClCompile Include="..\..\src\thread\windows\SDL_systhread.c" />
|
||||
<ClCompile Include="..\..\src\thread\windows\SDL_systls.c" />
|
||||
<ClCompile Include="..\..\src\timer\SDL_timer.c" />
|
||||
<ClCompile Include="..\..\src\timer\windows\SDL_systimer.c" />
|
||||
<ClCompile Include="..\..\src\video\dummy\SDL_nullevents.c" />
|
||||
<ClCompile Include="..\..\src\video\dummy\SDL_nullframebuffer.c" />
|
||||
<ClCompile Include="..\..\src\video\dummy\SDL_nullvideo.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_blit.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_blit_0.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_blit_1.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_blit_A.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_blit_auto.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_blit_copy.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_blit_N.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_blit_slow.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_bmp.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_clipboard.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_egl.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_fillrect.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_pixels.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_rect.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_RLEaccel.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_shape.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_stretch.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_surface.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_video.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_vulkan_utils.c" />
|
||||
<ClCompile Include="..\..\src\video\SDL_yuv.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsclipboard.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsevents.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsframebuffer.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowskeyboard.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsmessagebox.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsmodes.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsmouse.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsopengl.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsopengles.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsshape.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsvideo.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowsvulkan.c" />
|
||||
<ClCompile Include="..\..\src\video\windows\SDL_windowswindow.c" />
|
||||
<ClCompile Include="..\..\src\video\yuv2rgb\yuv_rgb.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="..\..\src\main\windows\version.rc" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?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">
|
||||
|
||||
@@ -1,355 +0,0 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9.00"
|
||||
Name="testvulkan"
|
||||
ProjectGUID="{0D604DFD-AAB6-442C-9368-F91A344146AB}"
|
||||
RootNamespace="testvulkan"
|
||||
TargetFrameworkVersion="131072"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
<Platform
|
||||
Name="x64"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
|
||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)\"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
MkTypLibCompatible="true"
|
||||
SuppressStartupBanner="true"
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName=".\Debug/testvulkan.tlb"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""$(SolutionDir)/../include""
|
||||
AdditionalUsingDirectories=""
|
||||
PreprocessorDefinitions="_DEBUG,WIN32,_WINDOWS,HAVE_OPENGL"
|
||||
RuntimeLibrary="2"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="1033"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|x64"
|
||||
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
|
||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)\"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
MkTypLibCompatible="true"
|
||||
SuppressStartupBanner="true"
|
||||
TargetEnvironment="3"
|
||||
TypeLibraryName=".\Debug/testvulkan.tlb"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""$(SolutionDir)/../include""
|
||||
AdditionalUsingDirectories=""
|
||||
PreprocessorDefinitions="_DEBUG,WIN32,_WINDOWS,HAVE_OPENGL"
|
||||
RuntimeLibrary="3"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="1033"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
|
||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)\"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
MkTypLibCompatible="true"
|
||||
SuppressStartupBanner="true"
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName=".\Release/testvulkan.tlb"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories=""$(SolutionDir)/../include""
|
||||
AdditionalUsingDirectories=""
|
||||
PreprocessorDefinitions="NDEBUG,WIN32,_WINDOWS,HAVE_OPENGL"
|
||||
RuntimeLibrary="2"
|
||||
WarningLevel="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="1033"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
SubSystem="2"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|x64"
|
||||
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
|
||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)\"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
MkTypLibCompatible="true"
|
||||
SuppressStartupBanner="true"
|
||||
TargetEnvironment="3"
|
||||
TypeLibraryName=".\Release/testvulkan.tlb"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories=""$(SolutionDir)/../include""
|
||||
AdditionalUsingDirectories=""
|
||||
PreprocessorDefinitions="NDEBUG,WIN32,_WINDOWS,HAVE_OPENGL"
|
||||
RuntimeLibrary="2"
|
||||
WarningLevel="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="1033"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
SubSystem="2"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
<ProjectReference
|
||||
ReferencedProjectIdentifier="{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}"
|
||||
CopyLocal="false"
|
||||
CopyLocalDependencies="false"
|
||||
CopyLocalSatelliteAssemblies="false"
|
||||
RelativePathToProject=".\SDL\SDL_VS2008.vcproj"
|
||||
/>
|
||||
<ProjectReference
|
||||
ReferencedProjectIdentifier="{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}"
|
||||
CopyLocal="false"
|
||||
CopyLocalDependencies="false"
|
||||
CopyLocalSatelliteAssemblies="false"
|
||||
RelativePathToProject=".\SDLmain\SDLmain_VS2008.vcproj"
|
||||
/>
|
||||
<ProjectReference
|
||||
ReferencedProjectIdentifier="{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}"
|
||||
CopyLocal="false"
|
||||
CopyLocalDependencies="false"
|
||||
CopyLocalSatelliteAssemblies="false"
|
||||
RelativePathToProject=".\SDLtest\SDLtest_VS2008.vcproj"
|
||||
/>
|
||||
</References>
|
||||
<Files>
|
||||
<File
|
||||
RelativePath="..\..\..\test\testvulkan.c"
|
||||
>
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
0
VisualC/visualtest/unittest/testquit/testquit_VS2012.vcxproj
Executable file → Normal file
0
VisualC/visualtest/unittest/testquit/testquit_VS2012.vcxproj
Executable file → Normal file
0
VisualC/visualtest/visualtest_VS2012.vcxproj
Executable file → Normal file
0
VisualC/visualtest/visualtest_VS2012.vcxproj
Executable file → Normal file
41
WhatsNew.txt
41
WhatsNew.txt
@@ -1,6 +1,47 @@
|
||||
|
||||
This is a list of major changes in SDL's version history.
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
2.0.9:
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
General:
|
||||
* Added a new sensor API, initialized by passing SDL_INIT_SENSOR to SDL_Init(), and defined in SDL_sensor.h
|
||||
* Added an event SDL_SENSORUPDATE which is sent when a sensor is updated
|
||||
* Added SDL_GetDisplayOrientation() to return the current display orientation
|
||||
* Added an event SDL_DISPLAYEVENT which is sent when the display orientation changes
|
||||
* Added HIDAPI joystick drivers for more consistent support for Xbox, PS4 and Nintendo Switch Pro controller support across platforms. (Thanks to Valve for contributing the PS4 and Nintendo Switch Pro controller support)
|
||||
* Added support for many other popular game controllers
|
||||
* Added SDL_JoystickGetDevicePlayerIndex(), SDL_JoystickGetPlayerIndex(), and SDL_GameControllerGetPlayerIndex() to get the player index for a controller. For XInput controllers this returns the XInput index for the controller.
|
||||
* Added SDL_GameControllerRumble() and SDL_JoystickRumble() which allow simple rumble without using the haptics API
|
||||
* Added SDL_GameControllerMappingForDeviceIndex() to get the mapping for a controller before it's opened
|
||||
* Added the hint SDL_HINT_MOUSE_DOUBLE_CLICK_TIME to control the mouse double-click time
|
||||
* Added the hint SDL_HINT_MOUSE_DOUBLE_CLICK_RADIUS to control the mouse double-click radius, in pixels
|
||||
* Added SDL_HasColorKey() to return whether a surface has a colorkey active
|
||||
* Added SDL_HasAVX512F() to return whether the CPU has AVX-512F features
|
||||
* Added SDL_IsTablet() to return whether the application is running on a tablet
|
||||
* Added SDL_THREAD_PRIORITY_TIME_CRITICAL for threads that must run at the highest priority
|
||||
|
||||
Mac OS X:
|
||||
* Fixed black screen at start on Mac OS X Mojave
|
||||
|
||||
Linux:
|
||||
* Added SDL_LinuxSetThreadPriority() to allow adjusting the thread priority of native threads using RealtimeKit if available.
|
||||
|
||||
iOS:
|
||||
* Fixed Asian IME input
|
||||
|
||||
Android:
|
||||
* Updated required Android SDK to API 26, to match Google's new App Store requirements
|
||||
* Added support for wired USB Xbox, PS4, and Nintendo Switch Pro controllers
|
||||
* Added support for relative mouse mode on Android 7.0 and newer (except where it's broken, on Chromebooks and when in DeX mode with Samsung Experience 9.0)
|
||||
* Added support for custom mouse cursors on Android 7.0 and newer
|
||||
* Added the hint SDL_HINT_ANDROID_TRAP_BACK_BUTTON to control whether the back button will back out of the app (the default) or be passed to the application as SDL_SCANCODE_AC_BACK
|
||||
* Added SDL_AndroidBackButton() to trigger the Android system back button behavior when handling the back button in the application
|
||||
* Added SDL_IsChromebook() to return whether the app is running in the Chromebook Android runtime
|
||||
* Added SDL_IsDeXMode() to return whether the app is running while docked in the Samsung DeX
|
||||
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
2.0.8:
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
2
Xcode-iOS/Demos/Demos.xcodeproj/project.pbxproj
Executable file → Normal file
2
Xcode-iOS/Demos/Demos.xcodeproj/project.pbxproj
Executable file → Normal file
@@ -975,6 +975,7 @@
|
||||
C01FCF4F08A954540054247B /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
HEADER_SEARCH_PATHS = ../../include;
|
||||
@@ -988,6 +989,7 @@
|
||||
C01FCF5008A954540054247B /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
HEADER_SEARCH_PATHS = ../../include;
|
||||
PRELINK_LIBS = "";
|
||||
|
||||
0
Xcode-iOS/Demos/data/bitmapfont/license.txt
Executable file → Normal file
0
Xcode-iOS/Demos/data/bitmapfont/license.txt
Executable file → Normal file
276
Xcode-iOS/SDL/SDL.xcodeproj/project.pbxproj
Executable file → Normal file
276
Xcode-iOS/SDL/SDL.xcodeproj/project.pbxproj
Executable file → Normal file
@@ -94,6 +94,7 @@
|
||||
4D75171A1EE1D32200820EEA /* SDL_uikitmetalview.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D7517191EE1D32200820EEA /* SDL_uikitmetalview.h */; };
|
||||
4D75171F1EE1D98200820EEA /* SDL_vulkan_internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D75171D1EE1D98200820EEA /* SDL_vulkan_internal.h */; };
|
||||
4D7517201EE1D98200820EEA /* SDL_vulkan_utils.c in Sources */ = {isa = PBXBuildFile; fileRef = 4D75171E1EE1D98200820EEA /* SDL_vulkan_utils.c */; };
|
||||
55FFA91A2122302B00D7CBED /* SDL_syspower.h in Headers */ = {isa = PBXBuildFile; fileRef = 55FFA9192122302B00D7CBED /* SDL_syspower.h */; };
|
||||
566726451DF72CF5001DD3DB /* SDL_dataqueue.c in Sources */ = {isa = PBXBuildFile; fileRef = 566726431DF72CF5001DD3DB /* SDL_dataqueue.c */; };
|
||||
566726461DF72CF5001DD3DB /* SDL_dataqueue.h in Headers */ = {isa = PBXBuildFile; fileRef = 566726441DF72CF5001DD3DB /* SDL_dataqueue.h */; };
|
||||
56A6702E18565E450007D20F /* SDL_internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 56A6702D18565E450007D20F /* SDL_internal.h */; };
|
||||
@@ -110,8 +111,11 @@
|
||||
56F9D5601DF73BA400C15B5D /* SDL_dataqueue.c in Sources */ = {isa = PBXBuildFile; fileRef = 566726431DF72CF5001DD3DB /* SDL_dataqueue.c */; };
|
||||
93CB792313FC5E5200BD3E05 /* SDL_uikitviewcontroller.h in Headers */ = {isa = PBXBuildFile; fileRef = 93CB792213FC5E5200BD3E05 /* SDL_uikitviewcontroller.h */; };
|
||||
93CB792613FC5F5300BD3E05 /* SDL_uikitviewcontroller.m in Sources */ = {isa = PBXBuildFile; fileRef = 93CB792513FC5F5300BD3E05 /* SDL_uikitviewcontroller.m */; };
|
||||
A7A9EEA91F702631002A5589 /* SDL_steamcontroller.c in Sources */ = {isa = PBXBuildFile; fileRef = A7A9EEA71F702631002A5589 /* SDL_steamcontroller.c */; };
|
||||
A7A9EEAA1F702631002A5589 /* SDL_steamcontroller.h in Headers */ = {isa = PBXBuildFile; fileRef = A7A9EEA81F702631002A5589 /* SDL_steamcontroller.h */; };
|
||||
A704172E20F7E74800A82227 /* controller_type.h in Headers */ = {isa = PBXBuildFile; fileRef = A704172D20F7E74800A82227 /* controller_type.h */; };
|
||||
A704172F20F7E76000A82227 /* SDL_gamecontroller.c in Sources */ = {isa = PBXBuildFile; fileRef = AA0AD06116647BBB00CE5896 /* SDL_gamecontroller.c */; };
|
||||
A7C19D29212E552C00DF2152 /* SDL_displayevents_c.h in Headers */ = {isa = PBXBuildFile; fileRef = A7C19D27212E552B00DF2152 /* SDL_displayevents_c.h */; };
|
||||
A7C19D2A212E552C00DF2152 /* SDL_displayevents.c in Sources */ = {isa = PBXBuildFile; fileRef = A7C19D28212E552B00DF2152 /* SDL_displayevents.c */; };
|
||||
A7C19D2B212E552C00DF2152 /* SDL_displayevents.c in Sources */ = {isa = PBXBuildFile; fileRef = A7C19D28212E552B00DF2152 /* SDL_displayevents.c */; };
|
||||
A7F629241FE06523002F9CC9 /* SDL_uikitmetalview.m in Sources */ = {isa = PBXBuildFile; fileRef = 4D7516F81EE1C28A00820EEA /* SDL_uikitmetalview.m */; };
|
||||
AA0AD06216647BBB00CE5896 /* SDL_gamecontroller.c in Sources */ = {isa = PBXBuildFile; fileRef = AA0AD06116647BBB00CE5896 /* SDL_gamecontroller.c */; };
|
||||
AA0AD06516647BD400CE5896 /* SDL_gamecontroller.h in Headers */ = {isa = PBXBuildFile; fileRef = AA0AD06416647BD400CE5896 /* SDL_gamecontroller.h */; };
|
||||
@@ -194,7 +198,30 @@
|
||||
AADC5A631FDA10C800960936 /* SDL_shaders_metal_ios.h in Headers */ = {isa = PBXBuildFile; fileRef = AADC5A611FDA10C800960936 /* SDL_shaders_metal_ios.h */; };
|
||||
AADC5A641FDA10C800960936 /* SDL_render_metal.m in Sources */ = {isa = PBXBuildFile; fileRef = AADC5A621FDA10C800960936 /* SDL_render_metal.m */; };
|
||||
AADC5A651FDA10CB00960936 /* SDL_render_metal.m in Sources */ = {isa = PBXBuildFile; fileRef = AADC5A621FDA10C800960936 /* SDL_render_metal.m */; };
|
||||
AAE7A4222041CCA90096E65A /* SDL_steamcontroller.c in Sources */ = {isa = PBXBuildFile; fileRef = A7A9EEA71F702631002A5589 /* SDL_steamcontroller.c */; };
|
||||
F30D9C99212CD0360047DF2E /* SDL_sensor.h in Headers */ = {isa = PBXBuildFile; fileRef = F30D9C98212CD0360047DF2E /* SDL_sensor.h */; };
|
||||
F30D9C9E212CD0990047DF2E /* SDL_sensor_c.h in Headers */ = {isa = PBXBuildFile; fileRef = F30D9C9B212CD0980047DF2E /* SDL_sensor_c.h */; };
|
||||
F30D9C9F212CD0990047DF2E /* SDL_syssensor.h in Headers */ = {isa = PBXBuildFile; fileRef = F30D9C9C212CD0990047DF2E /* SDL_syssensor.h */; };
|
||||
F30D9CA0212CD0990047DF2E /* SDL_sensor.c in Sources */ = {isa = PBXBuildFile; fileRef = F30D9C9D212CD0990047DF2E /* SDL_sensor.c */; };
|
||||
F30D9CA1212CD0990047DF2E /* SDL_sensor.c in Sources */ = {isa = PBXBuildFile; fileRef = F30D9C9D212CD0990047DF2E /* SDL_sensor.c */; };
|
||||
F30D9CA5212CD0BF0047DF2E /* SDL_coremotionsensor.m in Sources */ = {isa = PBXBuildFile; fileRef = F30D9CA3212CD0BF0047DF2E /* SDL_coremotionsensor.m */; };
|
||||
F30D9CA6212CD0BF0047DF2E /* SDL_coremotionsensor.m in Sources */ = {isa = PBXBuildFile; fileRef = F30D9CA3212CD0BF0047DF2E /* SDL_coremotionsensor.m */; };
|
||||
F30D9CA7212CD0BF0047DF2E /* SDL_coremotionsensor.h in Headers */ = {isa = PBXBuildFile; fileRef = F30D9CA4212CD0BF0047DF2E /* SDL_coremotionsensor.h */; };
|
||||
F30D9CC6212CE92C0047DF2E /* hid.m in Sources */ = {isa = PBXBuildFile; fileRef = F30D9CC5212CE92C0047DF2E /* hid.m */; };
|
||||
F30D9CC7212CE92C0047DF2E /* hid.m in Sources */ = {isa = PBXBuildFile; fileRef = F30D9CC5212CE92C0047DF2E /* hid.m */; };
|
||||
F36839CC214790950000F255 /* SDL_dummysensor.h in Headers */ = {isa = PBXBuildFile; fileRef = F36839CA214790950000F255 /* SDL_dummysensor.h */; };
|
||||
F36839CD214790950000F255 /* SDL_dummysensor.c in Sources */ = {isa = PBXBuildFile; fileRef = F36839CB214790950000F255 /* SDL_dummysensor.c */; };
|
||||
F36839CE214790950000F255 /* SDL_dummysensor.c in Sources */ = {isa = PBXBuildFile; fileRef = F36839CB214790950000F255 /* SDL_dummysensor.c */; };
|
||||
F3BDD79220F51CB8004ECBF3 /* SDL_hidapi_xbox360.c in Sources */ = {isa = PBXBuildFile; fileRef = F3BDD78B20F51CB8004ECBF3 /* SDL_hidapi_xbox360.c */; };
|
||||
F3BDD79320F51CB8004ECBF3 /* SDL_hidapi_xbox360.c in Sources */ = {isa = PBXBuildFile; fileRef = F3BDD78B20F51CB8004ECBF3 /* SDL_hidapi_xbox360.c */; };
|
||||
F3BDD79420F51CB8004ECBF3 /* SDL_hidapi_switch.c in Sources */ = {isa = PBXBuildFile; fileRef = F3BDD78C20F51CB8004ECBF3 /* SDL_hidapi_switch.c */; };
|
||||
F3BDD79520F51CB8004ECBF3 /* SDL_hidapi_switch.c in Sources */ = {isa = PBXBuildFile; fileRef = F3BDD78C20F51CB8004ECBF3 /* SDL_hidapi_switch.c */; };
|
||||
F3BDD79620F51CB8004ECBF3 /* SDL_hidapi_xboxone.c in Sources */ = {isa = PBXBuildFile; fileRef = F3BDD78D20F51CB8004ECBF3 /* SDL_hidapi_xboxone.c */; };
|
||||
F3BDD79720F51CB8004ECBF3 /* SDL_hidapi_xboxone.c in Sources */ = {isa = PBXBuildFile; fileRef = F3BDD78D20F51CB8004ECBF3 /* SDL_hidapi_xboxone.c */; };
|
||||
F3BDD79820F51CB8004ECBF3 /* SDL_hidapi_ps4.c in Sources */ = {isa = PBXBuildFile; fileRef = F3BDD78E20F51CB8004ECBF3 /* SDL_hidapi_ps4.c */; };
|
||||
F3BDD79920F51CB8004ECBF3 /* SDL_hidapi_ps4.c in Sources */ = {isa = PBXBuildFile; fileRef = F3BDD78E20F51CB8004ECBF3 /* SDL_hidapi_ps4.c */; };
|
||||
F3BDD79B20F51CB8004ECBF3 /* SDL_hidapijoystick_c.h in Headers */ = {isa = PBXBuildFile; fileRef = F3BDD79020F51CB8004ECBF3 /* SDL_hidapijoystick_c.h */; };
|
||||
F3BDD79C20F51CB8004ECBF3 /* SDL_hidapijoystick.c in Sources */ = {isa = PBXBuildFile; fileRef = F3BDD79120F51CB8004ECBF3 /* SDL_hidapijoystick.c */; };
|
||||
F3BDD79D20F51CB8004ECBF3 /* SDL_hidapijoystick.c in Sources */ = {isa = PBXBuildFile; fileRef = F3BDD79120F51CB8004ECBF3 /* SDL_hidapijoystick.c */; };
|
||||
FA1DC2721C62BE65008F99A0 /* SDL_uikitclipboard.h in Headers */ = {isa = PBXBuildFile; fileRef = FA1DC2701C62BE65008F99A0 /* SDL_uikitclipboard.h */; };
|
||||
FA1DC2731C62BE65008F99A0 /* SDL_uikitclipboard.m in Sources */ = {isa = PBXBuildFile; fileRef = FA1DC2711C62BE65008F99A0 /* SDL_uikitclipboard.m */; };
|
||||
FAB5981D1BB5C31500BE72C5 /* SDL_atomic.c in Sources */ = {isa = PBXBuildFile; fileRef = 04FFAB8912E23B8D00BA343D /* SDL_atomic.c */; };
|
||||
@@ -223,7 +250,6 @@
|
||||
FAB5984C1BB5C31600BE72C5 /* SDL_syshaptic.c in Sources */ = {isa = PBXBuildFile; fileRef = 047677B80EA76A31008ABAF1 /* SDL_syshaptic.c */; };
|
||||
FAB5984D1BB5C31600BE72C5 /* SDL_haptic.c in Sources */ = {isa = PBXBuildFile; fileRef = 047677B90EA76A31008ABAF1 /* SDL_haptic.c */; };
|
||||
FAB598501BB5C31600BE72C5 /* SDL_sysjoystick.m in Sources */ = {isa = PBXBuildFile; fileRef = FD689F000E26E5B600F90B21 /* SDL_sysjoystick.m */; };
|
||||
FAB598511BB5C31600BE72C5 /* SDL_gamecontroller.c in Sources */ = {isa = PBXBuildFile; fileRef = AA0AD06116647BBB00CE5896 /* SDL_gamecontroller.c */; };
|
||||
FAB598521BB5C31600BE72C5 /* SDL_joystick.c in Sources */ = {isa = PBXBuildFile; fileRef = FD5F9D1E0E0E08B3008E885B /* SDL_joystick.c */; };
|
||||
FAB598551BB5C31600BE72C5 /* SDL_sysloadso.c in Sources */ = {isa = PBXBuildFile; fileRef = 047AF1B20EA98D6C00811173 /* SDL_sysloadso.c */; };
|
||||
FAB598561BB5C31600BE72C5 /* SDL_sysloadso.c in Sources */ = {isa = PBXBuildFile; fileRef = FD8BD8190E27E25900B52CD5 /* SDL_sysloadso.c */; };
|
||||
@@ -380,21 +406,21 @@
|
||||
0442EC4E12FE1C1E004C9285 /* SDL_render_sw_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_render_sw_c.h; sourceTree = "<group>"; };
|
||||
0442EC4F12FE1C1E004C9285 /* SDL_render_sw.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_render_sw.c; sourceTree = "<group>"; };
|
||||
0442EC5212FE1C28004C9285 /* SDL_render_gles.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_render_gles.c; sourceTree = "<group>"; };
|
||||
0442EC5412FE1C3F004C9285 /* SDL_hints.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_hints.c; path = ../../src/SDL_hints.c; sourceTree = SOURCE_ROOT; };
|
||||
0442EC5412FE1C3F004C9285 /* SDL_hints.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_hints.c; sourceTree = "<group>"; };
|
||||
044E5FB711E606EB0076F181 /* SDL_clipboard.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_clipboard.c; sourceTree = "<group>"; };
|
||||
0463873A0F0B5B7D0041FD65 /* SDL_blit_slow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_blit_slow.h; sourceTree = "<group>"; };
|
||||
0463873E0F0B5B7D0041FD65 /* SDL_fillrect.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_fillrect.c; sourceTree = "<group>"; };
|
||||
047677B80EA76A31008ABAF1 /* SDL_syshaptic.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_syshaptic.c; sourceTree = "<group>"; };
|
||||
047677B90EA76A31008ABAF1 /* SDL_haptic.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_haptic.c; path = ../../src/haptic/SDL_haptic.c; sourceTree = SOURCE_ROOT; };
|
||||
047677BA0EA76A31008ABAF1 /* SDL_syshaptic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_syshaptic.h; path = ../../src/haptic/SDL_syshaptic.h; sourceTree = SOURCE_ROOT; };
|
||||
047677B90EA76A31008ABAF1 /* SDL_haptic.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_haptic.c; sourceTree = "<group>"; };
|
||||
047677BA0EA76A31008ABAF1 /* SDL_syshaptic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_syshaptic.h; sourceTree = "<group>"; };
|
||||
047AF1B20EA98D6C00811173 /* SDL_sysloadso.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_sysloadso.c; sourceTree = "<group>"; };
|
||||
04BA9D5F11EF474A00B60E01 /* SDL_gesture_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_gesture_c.h; sourceTree = "<group>"; };
|
||||
04BA9D6011EF474A00B60E01 /* SDL_gesture.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_gesture.c; sourceTree = "<group>"; };
|
||||
04BA9D6111EF474A00B60E01 /* SDL_touch_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_touch_c.h; sourceTree = "<group>"; };
|
||||
04BA9D6211EF474A00B60E01 /* SDL_touch.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_touch.c; sourceTree = "<group>"; };
|
||||
04BAC09A1300C1290055DE28 /* SDL_assert_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_assert_c.h; path = ../../src/SDL_assert_c.h; sourceTree = SOURCE_ROOT; };
|
||||
04BAC09B1300C1290055DE28 /* SDL_log.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_log.c; path = ../../src/SDL_log.c; sourceTree = SOURCE_ROOT; };
|
||||
04F2AF551104ABD200D6DDF7 /* SDL_assert.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_assert.c; path = ../../src/SDL_assert.c; sourceTree = SOURCE_ROOT; };
|
||||
04BAC09A1300C1290055DE28 /* SDL_assert_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_assert_c.h; sourceTree = "<group>"; };
|
||||
04BAC09B1300C1290055DE28 /* SDL_log.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_log.c; sourceTree = "<group>"; };
|
||||
04F2AF551104ABD200D6DDF7 /* SDL_assert.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_assert.c; sourceTree = "<group>"; };
|
||||
04F7806A12FB751400FC43C0 /* SDL_blendfillrect.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_blendfillrect.c; sourceTree = "<group>"; };
|
||||
04F7806B12FB751400FC43C0 /* SDL_blendfillrect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_blendfillrect.h; sourceTree = "<group>"; };
|
||||
04F7806C12FB751400FC43C0 /* SDL_blendline.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_blendline.c; sourceTree = "<group>"; };
|
||||
@@ -417,23 +443,25 @@
|
||||
4D7517191EE1D32200820EEA /* SDL_uikitmetalview.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_uikitmetalview.h; sourceTree = "<group>"; };
|
||||
4D75171D1EE1D98200820EEA /* SDL_vulkan_internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_vulkan_internal.h; sourceTree = "<group>"; };
|
||||
4D75171E1EE1D98200820EEA /* SDL_vulkan_utils.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_vulkan_utils.c; sourceTree = "<group>"; };
|
||||
566726431DF72CF5001DD3DB /* SDL_dataqueue.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_dataqueue.c; path = ../../src/SDL_dataqueue.c; sourceTree = "<group>"; };
|
||||
566726441DF72CF5001DD3DB /* SDL_dataqueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_dataqueue.h; path = ../../src/SDL_dataqueue.h; sourceTree = "<group>"; };
|
||||
56A6702D18565E450007D20F /* SDL_internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_internal.h; path = ../../src/SDL_internal.h; sourceTree = "<group>"; };
|
||||
56A6703118565E760007D20F /* SDL_dynapi_overrides.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_dynapi_overrides.h; path = ../../src/dynapi/SDL_dynapi_overrides.h; sourceTree = "<group>"; };
|
||||
56A6703218565E760007D20F /* SDL_dynapi_procs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_dynapi_procs.h; path = ../../src/dynapi/SDL_dynapi_procs.h; sourceTree = "<group>"; };
|
||||
56A6703318565E760007D20F /* SDL_dynapi.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_dynapi.c; path = ../../src/dynapi/SDL_dynapi.c; sourceTree = "<group>"; };
|
||||
56A6703418565E760007D20F /* SDL_dynapi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_dynapi.h; path = ../../src/dynapi/SDL_dynapi.h; sourceTree = "<group>"; };
|
||||
55FFA9192122302B00D7CBED /* SDL_syspower.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_syspower.h; sourceTree = "<group>"; };
|
||||
566726431DF72CF5001DD3DB /* SDL_dataqueue.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_dataqueue.c; sourceTree = "<group>"; };
|
||||
566726441DF72CF5001DD3DB /* SDL_dataqueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_dataqueue.h; sourceTree = "<group>"; };
|
||||
56A6702D18565E450007D20F /* SDL_internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_internal.h; sourceTree = "<group>"; };
|
||||
56A6703118565E760007D20F /* SDL_dynapi_overrides.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_dynapi_overrides.h; sourceTree = "<group>"; };
|
||||
56A6703218565E760007D20F /* SDL_dynapi_procs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_dynapi_procs.h; sourceTree = "<group>"; };
|
||||
56A6703318565E760007D20F /* SDL_dynapi.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_dynapi.c; sourceTree = "<group>"; };
|
||||
56A6703418565E760007D20F /* SDL_dynapi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_dynapi.h; sourceTree = "<group>"; };
|
||||
56C181DE17C44D5E00406AE3 /* SDL_filesystem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_filesystem.h; sourceTree = "<group>"; };
|
||||
56C181E117C44D7A00406AE3 /* SDL_sysfilesystem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SDL_sysfilesystem.m; path = ../../src/filesystem/cocoa/SDL_sysfilesystem.m; sourceTree = "<group>"; };
|
||||
56EA86F913E9EC2B002E47EB /* SDL_coreaudio.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SDL_coreaudio.m; path = coreaudio/SDL_coreaudio.m; sourceTree = "<group>"; };
|
||||
56EA86FA13E9EC2B002E47EB /* SDL_coreaudio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_coreaudio.h; path = coreaudio/SDL_coreaudio.h; sourceTree = "<group>"; };
|
||||
56ED04E0118A8EE200A56AA6 /* SDL_power.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_power.c; path = ../../src/power/SDL_power.c; sourceTree = SOURCE_ROOT; };
|
||||
56ED04E2118A8EFD00A56AA6 /* SDL_syspower.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SDL_syspower.m; path = ../../src/power/uikit/SDL_syspower.m; sourceTree = SOURCE_ROOT; };
|
||||
56C181E117C44D7A00406AE3 /* SDL_sysfilesystem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SDL_sysfilesystem.m; path = cocoa/SDL_sysfilesystem.m; sourceTree = "<group>"; };
|
||||
56EA86F913E9EC2B002E47EB /* SDL_coreaudio.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDL_coreaudio.m; sourceTree = "<group>"; };
|
||||
56EA86FA13E9EC2B002E47EB /* SDL_coreaudio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_coreaudio.h; sourceTree = "<group>"; };
|
||||
56ED04E0118A8EE200A56AA6 /* SDL_power.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_power.c; sourceTree = "<group>"; };
|
||||
56ED04E2118A8EFD00A56AA6 /* SDL_syspower.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDL_syspower.m; sourceTree = "<group>"; };
|
||||
93CB792213FC5E5200BD3E05 /* SDL_uikitviewcontroller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_uikitviewcontroller.h; sourceTree = "<group>"; };
|
||||
93CB792513FC5F5300BD3E05 /* SDL_uikitviewcontroller.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDL_uikitviewcontroller.m; sourceTree = "<group>"; };
|
||||
A7A9EEA71F702631002A5589 /* SDL_steamcontroller.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_steamcontroller.c; sourceTree = "<group>"; };
|
||||
A7A9EEA81F702631002A5589 /* SDL_steamcontroller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_steamcontroller.h; sourceTree = "<group>"; };
|
||||
A704172D20F7E74800A82227 /* controller_type.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = controller_type.h; sourceTree = "<group>"; };
|
||||
A7C19D27212E552B00DF2152 /* SDL_displayevents_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_displayevents_c.h; sourceTree = "<group>"; };
|
||||
A7C19D28212E552B00DF2152 /* SDL_displayevents.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_displayevents.c; sourceTree = "<group>"; };
|
||||
AA0AD06116647BBB00CE5896 /* SDL_gamecontroller.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_gamecontroller.c; sourceTree = "<group>"; };
|
||||
AA0AD06416647BD400CE5896 /* SDL_gamecontroller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_gamecontroller.h; sourceTree = "<group>"; };
|
||||
AA0F8494178D5F1A00823F9D /* SDL_systls.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_systls.c; sourceTree = "<group>"; };
|
||||
@@ -510,6 +538,21 @@
|
||||
AADA5B8E16CCAB7C00107CF7 /* SDL_bits.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_bits.h; sourceTree = "<group>"; };
|
||||
AADC5A611FDA10C800960936 /* SDL_shaders_metal_ios.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_shaders_metal_ios.h; sourceTree = "<group>"; };
|
||||
AADC5A621FDA10C800960936 /* SDL_render_metal.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDL_render_metal.m; sourceTree = "<group>"; };
|
||||
F30D9C98212CD0360047DF2E /* SDL_sensor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_sensor.h; sourceTree = "<group>"; };
|
||||
F30D9C9B212CD0980047DF2E /* SDL_sensor_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_sensor_c.h; sourceTree = "<group>"; };
|
||||
F30D9C9C212CD0990047DF2E /* SDL_syssensor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_syssensor.h; sourceTree = "<group>"; };
|
||||
F30D9C9D212CD0990047DF2E /* SDL_sensor.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_sensor.c; sourceTree = "<group>"; };
|
||||
F30D9CA3212CD0BF0047DF2E /* SDL_coremotionsensor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDL_coremotionsensor.m; sourceTree = "<group>"; };
|
||||
F30D9CA4212CD0BF0047DF2E /* SDL_coremotionsensor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_coremotionsensor.h; sourceTree = "<group>"; };
|
||||
F30D9CC5212CE92C0047DF2E /* hid.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = hid.m; sourceTree = "<group>"; };
|
||||
F36839CA214790950000F255 /* SDL_dummysensor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_dummysensor.h; sourceTree = "<group>"; };
|
||||
F36839CB214790950000F255 /* SDL_dummysensor.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_dummysensor.c; sourceTree = "<group>"; };
|
||||
F3BDD78B20F51CB8004ECBF3 /* SDL_hidapi_xbox360.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_hidapi_xbox360.c; sourceTree = "<group>"; };
|
||||
F3BDD78C20F51CB8004ECBF3 /* SDL_hidapi_switch.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_hidapi_switch.c; sourceTree = "<group>"; };
|
||||
F3BDD78D20F51CB8004ECBF3 /* SDL_hidapi_xboxone.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_hidapi_xboxone.c; sourceTree = "<group>"; };
|
||||
F3BDD78E20F51CB8004ECBF3 /* SDL_hidapi_ps4.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_hidapi_ps4.c; sourceTree = "<group>"; };
|
||||
F3BDD79020F51CB8004ECBF3 /* SDL_hidapijoystick_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_hidapijoystick_c.h; sourceTree = "<group>"; };
|
||||
F3BDD79120F51CB8004ECBF3 /* SDL_hidapijoystick.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_hidapijoystick.c; sourceTree = "<group>"; };
|
||||
FA1DC2701C62BE65008F99A0 /* SDL_uikitclipboard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_uikitclipboard.h; sourceTree = "<group>"; };
|
||||
FA1DC2711C62BE65008F99A0 /* SDL_uikitclipboard.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDL_uikitclipboard.m; sourceTree = "<group>"; };
|
||||
FAB598141BB5C1B100BE72C5 /* libSDL2.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libSDL2.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
@@ -567,9 +610,9 @@
|
||||
FD99B99B0DD52EDC00FB1D6B /* SDL_windowevents.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_windowevents.c; sourceTree = "<group>"; };
|
||||
FD99B99C0DD52EDC00FB1D6B /* SDL_windowevents_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_windowevents_c.h; sourceTree = "<group>"; };
|
||||
FD99B99E0DD52EDC00FB1D6B /* SDL_rwops.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_rwops.c; sourceTree = "<group>"; };
|
||||
FD99B9D40DD52EDC00FB1D6B /* SDL_error_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_error_c.h; path = ../../src/SDL_error_c.h; sourceTree = "<group>"; };
|
||||
FD99B9D50DD52EDC00FB1D6B /* SDL_error.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_error.c; path = ../../src/SDL_error.c; sourceTree = "<group>"; };
|
||||
FD99B9D80DD52EDC00FB1D6B /* SDL.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL.c; path = ../../src/SDL.c; sourceTree = "<group>"; };
|
||||
FD99B9D40DD52EDC00FB1D6B /* SDL_error_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_error_c.h; sourceTree = "<group>"; };
|
||||
FD99B9D50DD52EDC00FB1D6B /* SDL_error.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_error.c; sourceTree = "<group>"; };
|
||||
FD99B9D80DD52EDC00FB1D6B /* SDL.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL.c; sourceTree = "<group>"; };
|
||||
FD99BA070DD52EDC00FB1D6B /* SDL_syscond.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_syscond.c; sourceTree = "<group>"; };
|
||||
FD99BA080DD52EDC00FB1D6B /* SDL_sysmutex.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_sysmutex.c; sourceTree = "<group>"; };
|
||||
FD99BA090DD52EDC00FB1D6B /* SDL_sysmutex_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_sysmutex_c.h; sourceTree = "<group>"; };
|
||||
@@ -642,9 +685,8 @@
|
||||
04409BA412FA989600FB9AA8 /* SDL_yuv_sw_c.h */,
|
||||
04409BA512FA989600FB9AA8 /* SDL_yuv_sw.c */,
|
||||
);
|
||||
name = render;
|
||||
path = ../../src/render;
|
||||
sourceTree = SOURCE_ROOT;
|
||||
path = render;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
041B2CE812FA0F680087D585 /* opengles */ = {
|
||||
isa = PBXGroup;
|
||||
@@ -683,7 +725,7 @@
|
||||
047677B90EA76A31008ABAF1 /* SDL_haptic.c */,
|
||||
047677BA0EA76A31008ABAF1 /* SDL_syshaptic.h */,
|
||||
);
|
||||
name = haptic;
|
||||
path = haptic;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
047677B70EA76A31008ABAF1 /* dummy */ = {
|
||||
@@ -691,9 +733,8 @@
|
||||
children = (
|
||||
047677B80EA76A31008ABAF1 /* SDL_syshaptic.c */,
|
||||
);
|
||||
name = dummy;
|
||||
path = ../../src/haptic/dummy;
|
||||
sourceTree = SOURCE_ROOT;
|
||||
path = dummy;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
047AF1B10EA98D6C00811173 /* dummy */ = {
|
||||
isa = PBXGroup;
|
||||
@@ -709,9 +750,8 @@
|
||||
04FFAB8912E23B8D00BA343D /* SDL_atomic.c */,
|
||||
04FFAB8A12E23B8D00BA343D /* SDL_spinlock.c */,
|
||||
);
|
||||
name = atomic;
|
||||
path = ../../src/atomic;
|
||||
sourceTree = SOURCE_ROOT;
|
||||
path = atomic;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
19C28FACFE9D520D11CA2CBB /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
@@ -741,7 +781,7 @@
|
||||
56A6703318565E760007D20F /* SDL_dynapi.c */,
|
||||
56A6703418565E760007D20F /* SDL_dynapi.h */,
|
||||
);
|
||||
name = dynapi;
|
||||
path = dynapi;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
56C181E017C44D6900406AE3 /* filesystem */ = {
|
||||
@@ -749,7 +789,7 @@
|
||||
children = (
|
||||
56C181E117C44D7A00406AE3 /* SDL_sysfilesystem.m */,
|
||||
);
|
||||
name = filesystem;
|
||||
path = filesystem;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
56EA86F813E9EBF9002E47EB /* coreaudio */ = {
|
||||
@@ -758,7 +798,7 @@
|
||||
56EA86F913E9EC2B002E47EB /* SDL_coreaudio.m */,
|
||||
56EA86FA13E9EC2B002E47EB /* SDL_coreaudio.h */,
|
||||
);
|
||||
name = coreaudio;
|
||||
path = coreaudio;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
56ED04DE118A8E9A00A56AA6 /* power */ = {
|
||||
@@ -767,24 +807,16 @@
|
||||
56ED04E0118A8EE200A56AA6 /* SDL_power.c */,
|
||||
56ED04DF118A8EB700A56AA6 /* uikit */,
|
||||
);
|
||||
name = power;
|
||||
path = power;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
56ED04DF118A8EB700A56AA6 /* uikit */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
55FFA9192122302B00D7CBED /* SDL_syspower.h */,
|
||||
56ED04E2118A8EFD00A56AA6 /* SDL_syspower.m */,
|
||||
);
|
||||
name = uikit;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
A7A9EEA61F702607002A5589 /* steam */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
A7A9EEA71F702631002A5589 /* SDL_steamcontroller.c */,
|
||||
A7A9EEA81F702631002A5589 /* SDL_steamcontroller.h */,
|
||||
);
|
||||
path = steam;
|
||||
path = uikit;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
AA13B3521FB8B41700D9FEE6 /* yuv2rgb */ = {
|
||||
@@ -807,6 +839,65 @@
|
||||
path = metal;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
F30D9C9A212CD0590047DF2E /* sensor */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
F30D9CA2212CD09E0047DF2E /* coremotion */,
|
||||
F36839C9214790740000F255 /* dummy */,
|
||||
F30D9C9B212CD0980047DF2E /* SDL_sensor_c.h */,
|
||||
F30D9C9D212CD0990047DF2E /* SDL_sensor.c */,
|
||||
F30D9C9C212CD0990047DF2E /* SDL_syssensor.h */,
|
||||
);
|
||||
path = sensor;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
F30D9CA2212CD09E0047DF2E /* coremotion */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
F30D9CA4212CD0BF0047DF2E /* SDL_coremotionsensor.h */,
|
||||
F30D9CA3212CD0BF0047DF2E /* SDL_coremotionsensor.m */,
|
||||
);
|
||||
path = coremotion;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
F35CEA6E20F51B7F003ECE98 /* hidapi */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
F3BDD77420F51C18004ECBF3 /* ios */,
|
||||
);
|
||||
path = hidapi;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
F36839C9214790740000F255 /* dummy */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
F36839CB214790950000F255 /* SDL_dummysensor.c */,
|
||||
F36839CA214790950000F255 /* SDL_dummysensor.h */,
|
||||
);
|
||||
path = dummy;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
F3BDD77420F51C18004ECBF3 /* ios */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
F30D9CC5212CE92C0047DF2E /* hid.m */,
|
||||
);
|
||||
path = ios;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
F3BDD78A20F51C8D004ECBF3 /* hidapi */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
F3BDD78E20F51CB8004ECBF3 /* SDL_hidapi_ps4.c */,
|
||||
F3BDD78C20F51CB8004ECBF3 /* SDL_hidapi_switch.c */,
|
||||
F3BDD78B20F51CB8004ECBF3 /* SDL_hidapi_xbox360.c */,
|
||||
F3BDD78D20F51CB8004ECBF3 /* SDL_hidapi_xboxone.c */,
|
||||
F3BDD79020F51CB8004ECBF3 /* SDL_hidapijoystick_c.h */,
|
||||
F3BDD79120F51CB8004ECBF3 /* SDL_hidapijoystick.c */,
|
||||
);
|
||||
path = hidapi;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
FD3F4A6F0DEA620800C5B771 /* stdlib */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -817,23 +908,22 @@
|
||||
FD3F4A740DEA620800C5B771 /* SDL_stdlib.c */,
|
||||
FD3F4A750DEA620800C5B771 /* SDL_string.c */,
|
||||
);
|
||||
name = stdlib;
|
||||
path = ../../src/stdlib;
|
||||
sourceTree = SOURCE_ROOT;
|
||||
path = stdlib;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
FD5F9D080E0E08B3008E885B /* joystick */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
A7A9EEA61F702607002A5589 /* steam */,
|
||||
F3BDD78A20F51C8D004ECBF3 /* hidapi */,
|
||||
FD689EFF0E26E5B600F90B21 /* iphoneos */,
|
||||
A704172D20F7E74800A82227 /* controller_type.h */,
|
||||
AA0AD06116647BBB00CE5896 /* SDL_gamecontroller.c */,
|
||||
FD5F9D1E0E0E08B3008E885B /* SDL_joystick.c */,
|
||||
FD5F9D1F0E0E08B3008E885B /* SDL_joystick_c.h */,
|
||||
FD5F9D200E0E08B3008E885B /* SDL_sysjoystick.h */,
|
||||
);
|
||||
name = joystick;
|
||||
path = ../../src/joystick;
|
||||
sourceTree = SOURCE_ROOT;
|
||||
path = joystick;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
FD689EFF0E26E5B600F90B21 /* iphoneos */ = {
|
||||
isa = PBXGroup;
|
||||
@@ -884,9 +974,8 @@
|
||||
047AF1B10EA98D6C00811173 /* dummy */,
|
||||
FD8BD8180E27E25900B52CD5 /* dlopen */,
|
||||
);
|
||||
name = loadso;
|
||||
path = ../../src/loadso;
|
||||
sourceTree = SOURCE_ROOT;
|
||||
path = loadso;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
FD8BD8180E27E25900B52CD5 /* dlopen */ = {
|
||||
isa = PBXGroup;
|
||||
@@ -942,6 +1031,7 @@
|
||||
AA7558891595D55500BBD41B /* SDL_revision.h */,
|
||||
AA75588A1595D55500BBD41B /* SDL_rwops.h */,
|
||||
AA75588B1595D55500BBD41B /* SDL_scancode.h */,
|
||||
F30D9C98212CD0360047DF2E /* SDL_sensor.h */,
|
||||
AA75588C1595D55500BBD41B /* SDL_shape.h */,
|
||||
AA75588D1595D55500BBD41B /* SDL_stdinc.h */,
|
||||
AA75588E1595D55500BBD41B /* SDL_surface.h */,
|
||||
@@ -970,10 +1060,12 @@
|
||||
FD99B99D0DD52EDC00FB1D6B /* file */,
|
||||
56C181E017C44D6900406AE3 /* filesystem */,
|
||||
047677B60EA769DF008ABAF1 /* haptic */,
|
||||
F35CEA6E20F51B7F003ECE98 /* hidapi */,
|
||||
FD5F9D080E0E08B3008E885B /* joystick */,
|
||||
FD8BD8150E27E25900B52CD5 /* loadso */,
|
||||
56ED04DE118A8E9A00A56AA6 /* power */,
|
||||
041B2CE312FA0F680087D585 /* render */,
|
||||
F30D9C9A212CD0590047DF2E /* sensor */,
|
||||
FD3F4A6F0DEA620800C5B771 /* stdlib */,
|
||||
FD99B9E00DD52EDC00FB1D6B /* thread */,
|
||||
FD99BA1E0DD52EDC00FB1D6B /* timer */,
|
||||
@@ -990,6 +1082,7 @@
|
||||
FD99B9D80DD52EDC00FB1D6B /* SDL.c */,
|
||||
);
|
||||
name = "Library Source";
|
||||
path = ../../src;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
FD99B8FB0DD52EDC00FB1D6B /* audio */ = {
|
||||
@@ -1006,8 +1099,7 @@
|
||||
FD99B9530DD52EDC00FB1D6B /* SDL_wave.c */,
|
||||
FD99B9540DD52EDC00FB1D6B /* SDL_wave.h */,
|
||||
);
|
||||
name = audio;
|
||||
path = ../../src/audio;
|
||||
path = audio;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
FD99B91C0DD52EDC00FB1D6B /* dummy */ = {
|
||||
@@ -1024,8 +1116,7 @@
|
||||
children = (
|
||||
FD99B98B0DD52EDC00FB1D6B /* SDL_cpuinfo.c */,
|
||||
);
|
||||
name = cpuinfo;
|
||||
path = ../../src/cpuinfo;
|
||||
path = cpuinfo;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
FD99B98C0DD52EDC00FB1D6B /* events */ = {
|
||||
@@ -1038,6 +1129,8 @@
|
||||
FD99B9920DD52EDC00FB1D6B /* scancodes_xfree86.h */,
|
||||
0420496F11E6F03D007E7EC9 /* SDL_clipboardevents.c */,
|
||||
0420496E11E6F03D007E7EC9 /* SDL_clipboardevents_c.h */,
|
||||
A7C19D27212E552B00DF2152 /* SDL_displayevents_c.h */,
|
||||
A7C19D28212E552B00DF2152 /* SDL_displayevents.c */,
|
||||
AA704DD5162AA90A0076D1C1 /* SDL_dropevents.c */,
|
||||
AA704DD4162AA90A0076D1C1 /* SDL_dropevents_c.h */,
|
||||
FD99B9930DD52EDC00FB1D6B /* SDL_events.c */,
|
||||
@@ -1055,8 +1148,7 @@
|
||||
FD99B99B0DD52EDC00FB1D6B /* SDL_windowevents.c */,
|
||||
FD99B99C0DD52EDC00FB1D6B /* SDL_windowevents_c.h */,
|
||||
);
|
||||
name = events;
|
||||
path = ../../src/events;
|
||||
path = events;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
FD99B99D0DD52EDC00FB1D6B /* file */ = {
|
||||
@@ -1065,8 +1157,7 @@
|
||||
006E9885119552DD001DE610 /* cocoa */,
|
||||
FD99B99E0DD52EDC00FB1D6B /* SDL_rwops.c */,
|
||||
);
|
||||
name = file;
|
||||
path = ../../src/file;
|
||||
path = file;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
FD99B9E00DD52EDC00FB1D6B /* thread */ = {
|
||||
@@ -1077,8 +1168,7 @@
|
||||
FD99BA150DD52EDC00FB1D6B /* SDL_thread.c */,
|
||||
FD99BA160DD52EDC00FB1D6B /* SDL_thread_c.h */,
|
||||
);
|
||||
name = thread;
|
||||
path = ../../src/thread;
|
||||
path = thread;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
FD99BA060DD52EDC00FB1D6B /* pthread */ = {
|
||||
@@ -1102,8 +1192,7 @@
|
||||
FD99BA2E0DD52EDC00FB1D6B /* SDL_timer.c */,
|
||||
FD99BA2F0DD52EDC00FB1D6B /* SDL_timer_c.h */,
|
||||
);
|
||||
name = timer;
|
||||
path = ../../src/timer;
|
||||
path = timer;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
FD99BA300DD52EDC00FB1D6B /* unix */ = {
|
||||
@@ -1154,9 +1243,8 @@
|
||||
AA13B34F1FB8B3CC00D9FEE6 /* SDL_yuv.c */,
|
||||
AA13B3481FB8B27800D9FEE6 /* SDL_yuv_c.h */,
|
||||
);
|
||||
name = video;
|
||||
path = ../../src/video;
|
||||
sourceTree = SOURCE_ROOT;
|
||||
path = video;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
FDA685F40DF244C800F98A1A /* dummy */ = {
|
||||
isa = PBXGroup;
|
||||
@@ -1213,13 +1301,13 @@
|
||||
AA13B3591FB8B46400D9FEE6 /* yuv_rgb.h in Headers */,
|
||||
04F7807712FB751400FC43C0 /* SDL_blendfillrect.h in Headers */,
|
||||
04F7807912FB751400FC43C0 /* SDL_blendline.h in Headers */,
|
||||
F3BDD79B20F51CB8004ECBF3 /* SDL_hidapijoystick_c.h in Headers */,
|
||||
04F7807B12FB751400FC43C0 /* SDL_blendpoint.h in Headers */,
|
||||
04F7807C12FB751400FC43C0 /* SDL_draw.h in Headers */,
|
||||
04F7807E12FB751400FC43C0 /* SDL_drawline.h in Headers */,
|
||||
AA13B34E1FB8B27800D9FEE6 /* SDL_yuv_c.h in Headers */,
|
||||
04F7808012FB751400FC43C0 /* SDL_drawpoint.h in Headers */,
|
||||
04F7808412FB753F00FC43C0 /* SDL_nullframebuffer_c.h in Headers */,
|
||||
A7A9EEAA1F702631002A5589 /* SDL_steamcontroller.h in Headers */,
|
||||
0442EC5012FE1C1E004C9285 /* SDL_render_sw_c.h in Headers */,
|
||||
FA1DC2721C62BE65008F99A0 /* SDL_uikitclipboard.h in Headers */,
|
||||
0402A85A12FE70C600CECEE3 /* SDL_shaders_gles2.h in Headers */,
|
||||
@@ -1232,7 +1320,9 @@
|
||||
AA75589A1595D55500BBD41B /* SDL_assert.h in Headers */,
|
||||
AA75589B1595D55500BBD41B /* SDL_atomic.h in Headers */,
|
||||
AA75589C1595D55500BBD41B /* SDL_audio.h in Headers */,
|
||||
55FFA91A2122302B00D7CBED /* SDL_syspower.h in Headers */,
|
||||
AA75589D1595D55500BBD41B /* SDL_blendmode.h in Headers */,
|
||||
F30D9C9E212CD0990047DF2E /* SDL_sensor_c.h in Headers */,
|
||||
AA75589E1595D55500BBD41B /* SDL_clipboard.h in Headers */,
|
||||
AA75589F1595D55500BBD41B /* SDL_config_iphoneos.h in Headers */,
|
||||
AA7558A01595D55500BBD41B /* SDL_config.h in Headers */,
|
||||
@@ -1247,14 +1337,18 @@
|
||||
AA7558A71595D55500BBD41B /* SDL_haptic.h in Headers */,
|
||||
AA7558A81595D55500BBD41B /* SDL_hints.h in Headers */,
|
||||
566726461DF72CF5001DD3DB /* SDL_dataqueue.h in Headers */,
|
||||
F30D9C9F212CD0990047DF2E /* SDL_syssensor.h in Headers */,
|
||||
AA7558AA1595D55500BBD41B /* SDL_joystick.h in Headers */,
|
||||
AA13B34B1FB8B27800D9FEE6 /* SDL_shape_internals.h in Headers */,
|
||||
AA7558AB1595D55500BBD41B /* SDL_keyboard.h in Headers */,
|
||||
A704172E20F7E74800A82227 /* controller_type.h in Headers */,
|
||||
AA7558AC1595D55500BBD41B /* SDL_keycode.h in Headers */,
|
||||
AA7558AD1595D55500BBD41B /* SDL_loadso.h in Headers */,
|
||||
AA7558AE1595D55500BBD41B /* SDL_log.h in Headers */,
|
||||
F30D9CA7212CD0BF0047DF2E /* SDL_coremotionsensor.h in Headers */,
|
||||
AA7558AF1595D55500BBD41B /* SDL_main.h in Headers */,
|
||||
AA7558B01595D55500BBD41B /* SDL_mouse.h in Headers */,
|
||||
A7C19D29212E552C00DF2152 /* SDL_displayevents_c.h in Headers */,
|
||||
AA7558B11595D55500BBD41B /* SDL_mutex.h in Headers */,
|
||||
AA7558B21595D55500BBD41B /* SDL_name.h in Headers */,
|
||||
AA7558B31595D55500BBD41B /* SDL_opengl.h in Headers */,
|
||||
@@ -1275,6 +1369,7 @@
|
||||
FAD4F7021BA3C4E8008346CE /* SDL_sysjoystick_c.h in Headers */,
|
||||
AA7558C11595D55500BBD41B /* SDL_surface.h in Headers */,
|
||||
AA7558C21595D55500BBD41B /* SDL_system.h in Headers */,
|
||||
F30D9C99212CD0360047DF2E /* SDL_sensor.h in Headers */,
|
||||
AA7558C31595D55500BBD41B /* SDL_syswm.h in Headers */,
|
||||
AA7558C41595D55500BBD41B /* SDL_thread.h in Headers */,
|
||||
AA7558C51595D55500BBD41B /* SDL_timer.h in Headers */,
|
||||
@@ -1290,6 +1385,7 @@
|
||||
AA9FF9511637C6E5000DF050 /* SDL_messagebox.h in Headers */,
|
||||
AABCC3941640643D00AB8930 /* SDL_uikitmessagebox.h in Headers */,
|
||||
AA0AD06516647BD400CE5896 /* SDL_gamecontroller.h in Headers */,
|
||||
F36839CC214790950000F255 /* SDL_dummysensor.h in Headers */,
|
||||
AADA5B8F16CCAB7C00107CF7 /* SDL_bits.h in Headers */,
|
||||
56C181DF17C44D5E00406AE3 /* SDL_filesystem.h in Headers */,
|
||||
);
|
||||
@@ -1432,6 +1528,7 @@
|
||||
FAB598251BB5C31500BE72C5 /* SDL_audiocvt.c in Sources */,
|
||||
FAB598271BB5C31500BE72C5 /* SDL_audiotypecvt.c in Sources */,
|
||||
FAB598281BB5C31500BE72C5 /* SDL_mixer.c in Sources */,
|
||||
F3BDD79720F51CB8004ECBF3 /* SDL_hidapi_xboxone.c in Sources */,
|
||||
FAB5982A1BB5C31500BE72C5 /* SDL_wave.c in Sources */,
|
||||
FAFDF8C61D88D4530083E6F2 /* SDL_uikitclipboard.m in Sources */,
|
||||
FAB5982C1BB5C31500BE72C5 /* SDL_cpuinfo.c in Sources */,
|
||||
@@ -1442,10 +1539,13 @@
|
||||
A7F629241FE06523002F9CC9 /* SDL_uikitmetalview.m in Sources */,
|
||||
FAB5983C1BB5C31500BE72C5 /* SDL_gesture.c in Sources */,
|
||||
FAB5983E1BB5C31500BE72C5 /* SDL_keyboard.c in Sources */,
|
||||
F3BDD79520F51CB8004ECBF3 /* SDL_hidapi_switch.c in Sources */,
|
||||
FAB598401BB5C31500BE72C5 /* SDL_mouse.c in Sources */,
|
||||
A704172F20F7E76000A82227 /* SDL_gamecontroller.c in Sources */,
|
||||
FAB598421BB5C31500BE72C5 /* SDL_quit.c in Sources */,
|
||||
FAB598441BB5C31500BE72C5 /* SDL_touch.c in Sources */,
|
||||
FAB598461BB5C31500BE72C5 /* SDL_windowevents.c in Sources */,
|
||||
F30D9CC7212CE92C0047DF2E /* hid.m in Sources */,
|
||||
FAB598491BB5C31600BE72C5 /* SDL_rwopsbundlesupport.m in Sources */,
|
||||
FAB5984A1BB5C31600BE72C5 /* SDL_rwops.c in Sources */,
|
||||
FAB5984B1BB5C31600BE72C5 /* SDL_sysfilesystem.m in Sources */,
|
||||
@@ -1454,16 +1554,18 @@
|
||||
AADC5A5F1FDA105600960936 /* SDL_vulkan_utils.c in Sources */,
|
||||
AADC5A5E1FDA105300960936 /* SDL_yuv.c in Sources */,
|
||||
FAB5984D1BB5C31600BE72C5 /* SDL_haptic.c in Sources */,
|
||||
F3BDD79320F51CB8004ECBF3 /* SDL_hidapi_xbox360.c in Sources */,
|
||||
FAB598501BB5C31600BE72C5 /* SDL_sysjoystick.m in Sources */,
|
||||
FAB598511BB5C31600BE72C5 /* SDL_gamecontroller.c in Sources */,
|
||||
FAB598521BB5C31600BE72C5 /* SDL_joystick.c in Sources */,
|
||||
FAB598551BB5C31600BE72C5 /* SDL_sysloadso.c in Sources */,
|
||||
AADC5A651FDA10CB00960936 /* SDL_render_metal.m in Sources */,
|
||||
FAB598561BB5C31600BE72C5 /* SDL_sysloadso.c in Sources */,
|
||||
FAB598571BB5C31600BE72C5 /* SDL_power.c in Sources */,
|
||||
F30D9CA1212CD0990047DF2E /* SDL_sensor.c in Sources */,
|
||||
FAB598581BB5C31600BE72C5 /* SDL_syspower.m in Sources */,
|
||||
56F9D5601DF73BA400C15B5D /* SDL_dataqueue.c in Sources */,
|
||||
FAB598591BB5C31600BE72C5 /* SDL_render_gles.c in Sources */,
|
||||
F30D9CA6212CD0BF0047DF2E /* SDL_coremotionsensor.m in Sources */,
|
||||
FAB5985A1BB5C31600BE72C5 /* SDL_render_gles2.c in Sources */,
|
||||
FAB5985B1BB5C31600BE72C5 /* SDL_shaders_gles2.c in Sources */,
|
||||
FAB5985D1BB5C31600BE72C5 /* SDL_blendfillrect.c in Sources */,
|
||||
@@ -1479,19 +1581,22 @@
|
||||
FAB598731BB5C31600BE72C5 /* SDL_iconv.c in Sources */,
|
||||
FAB598741BB5C31600BE72C5 /* SDL_malloc.c in Sources */,
|
||||
FAB598751BB5C31600BE72C5 /* SDL_qsort.c in Sources */,
|
||||
F36839CE214790950000F255 /* SDL_dummysensor.c in Sources */,
|
||||
A7C19D2B212E552C00DF2152 /* SDL_displayevents.c in Sources */,
|
||||
FAB598761BB5C31600BE72C5 /* SDL_stdlib.c in Sources */,
|
||||
FAB598771BB5C31600BE72C5 /* SDL_string.c in Sources */,
|
||||
FAB598781BB5C31600BE72C5 /* SDL_syscond.c in Sources */,
|
||||
F3BDD79D20F51CB8004ECBF3 /* SDL_hidapijoystick.c in Sources */,
|
||||
AADC5A601FDA10A400960936 /* SDL_uikitvulkan.m in Sources */,
|
||||
FAB598791BB5C31600BE72C5 /* SDL_sysmutex.c in Sources */,
|
||||
FAB5987B1BB5C31600BE72C5 /* SDL_syssem.c in Sources */,
|
||||
FAB5987C1BB5C31600BE72C5 /* SDL_systhread.c in Sources */,
|
||||
AAE7A4222041CCA90096E65A /* SDL_steamcontroller.c in Sources */,
|
||||
FAB5987E1BB5C31600BE72C5 /* SDL_systls.c in Sources */,
|
||||
FAB598801BB5C31600BE72C5 /* SDL_thread.c in Sources */,
|
||||
FAB598821BB5C31600BE72C5 /* SDL_systimer.c in Sources */,
|
||||
FAB598831BB5C31600BE72C5 /* SDL_timer.c in Sources */,
|
||||
FAB598871BB5C31600BE72C5 /* SDL_uikitappdelegate.m in Sources */,
|
||||
F3BDD79920F51CB8004ECBF3 /* SDL_hidapi_ps4.c in Sources */,
|
||||
FAB598891BB5C31600BE72C5 /* SDL_uikitevents.m in Sources */,
|
||||
FAB5988B1BB5C31600BE72C5 /* SDL_uikitmessagebox.m in Sources */,
|
||||
FAB5988D1BB5C31600BE72C5 /* SDL_uikitmodes.m in Sources */,
|
||||
@@ -1535,7 +1640,7 @@
|
||||
files = (
|
||||
FD6526810DE8FCDD002AD96B /* SDL_systimer.c in Sources */,
|
||||
FD6526800DE8FCDD002AD96B /* SDL_timer.c in Sources */,
|
||||
A7A9EEA91F702631002A5589 /* SDL_steamcontroller.c in Sources */,
|
||||
F30D9CA5212CD0BF0047DF2E /* SDL_coremotionsensor.m in Sources */,
|
||||
FD3F4A7B0DEA620800C5B771 /* SDL_string.c in Sources */,
|
||||
FD6526660DE8FCDD002AD96B /* SDL_dummyaudio.c in Sources */,
|
||||
FD6526670DE8FCDD002AD96B /* SDL_audio.c in Sources */,
|
||||
@@ -1554,6 +1659,7 @@
|
||||
FD6526750DE8FCDD002AD96B /* SDL_windowevents.c in Sources */,
|
||||
4D7516FB1EE1C28A00820EEA /* SDL_uikitmetalview.m in Sources */,
|
||||
FD6526760DE8FCDD002AD96B /* SDL_rwops.c in Sources */,
|
||||
F30D9CC6212CE92C0047DF2E /* hid.m in Sources */,
|
||||
4D7517201EE1D98200820EEA /* SDL_vulkan_utils.c in Sources */,
|
||||
FD6526780DE8FCDD002AD96B /* SDL_error.c in Sources */,
|
||||
FD65267A0DE8FCDD002AD96B /* SDL.c in Sources */,
|
||||
@@ -1566,7 +1672,9 @@
|
||||
FD3F4A760DEA620800C5B771 /* SDL_getenv.c in Sources */,
|
||||
FD3F4A770DEA620800C5B771 /* SDL_iconv.c in Sources */,
|
||||
FD3F4A780DEA620800C5B771 /* SDL_malloc.c in Sources */,
|
||||
F3BDD79220F51CB8004ECBF3 /* SDL_hidapi_xbox360.c in Sources */,
|
||||
FD3F4A790DEA620800C5B771 /* SDL_qsort.c in Sources */,
|
||||
F3BDD79820F51CB8004ECBF3 /* SDL_hidapi_ps4.c in Sources */,
|
||||
FD3F4A7A0DEA620800C5B771 /* SDL_stdlib.c in Sources */,
|
||||
FDA6844D0DF2374E00F98A1A /* SDL_blit.c in Sources */,
|
||||
FDA6844F0DF2374E00F98A1A /* SDL_blit_0.c in Sources */,
|
||||
@@ -1595,15 +1703,18 @@
|
||||
FD689F1F0E26E5D900F90B21 /* SDL_uikitopengles.m in Sources */,
|
||||
FD689F210E26E5D900F90B21 /* SDL_uikitvideo.m in Sources */,
|
||||
FD689F230E26E5D900F90B21 /* SDL_uikitview.m in Sources */,
|
||||
A7C19D2A212E552C00DF2152 /* SDL_displayevents.c in Sources */,
|
||||
FD689F250E26E5D900F90B21 /* SDL_uikitwindow.m in Sources */,
|
||||
FD689F270E26E5D900F90B21 /* SDL_uikitopenglview.m in Sources */,
|
||||
FD689FCE0E26E9D400F90B21 /* SDL_uikitappdelegate.m in Sources */,
|
||||
FD8BD8250E27E25900B52CD5 /* SDL_sysloadso.c in Sources */,
|
||||
F3BDD79C20F51CB8004ECBF3 /* SDL_hidapijoystick.c in Sources */,
|
||||
047677BB0EA76A31008ABAF1 /* SDL_syshaptic.c in Sources */,
|
||||
047677BC0EA76A31008ABAF1 /* SDL_haptic.c in Sources */,
|
||||
047AF1B30EA98D6C00811173 /* SDL_sysloadso.c in Sources */,
|
||||
046387460F0B5B7D0041FD65 /* SDL_fillrect.c in Sources */,
|
||||
04F2AF561104ABD200D6DDF7 /* SDL_assert.c in Sources */,
|
||||
F3BDD79620F51CB8004ECBF3 /* SDL_hidapi_xboxone.c in Sources */,
|
||||
56ED04E1118A8EE200A56AA6 /* SDL_power.c in Sources */,
|
||||
56ED04E3118A8EFD00A56AA6 /* SDL_syspower.m in Sources */,
|
||||
006E9889119552DD001DE610 /* SDL_rwopsbundlesupport.m in Sources */,
|
||||
@@ -1626,9 +1737,12 @@
|
||||
0442EC5512FE1C3F004C9285 /* SDL_hints.c in Sources */,
|
||||
AA13B34A1FB8B27800D9FEE6 /* SDL_shape.c in Sources */,
|
||||
0402A85812FE70C600CECEE3 /* SDL_render_gles2.c in Sources */,
|
||||
F36839CD214790950000F255 /* SDL_dummysensor.c in Sources */,
|
||||
0402A85912FE70C600CECEE3 /* SDL_shaders_gles2.c in Sources */,
|
||||
04BAC09D1300C1290055DE28 /* SDL_log.c in Sources */,
|
||||
56EA86FB13E9EC2B002E47EB /* SDL_coreaudio.m in Sources */,
|
||||
F30D9CA0212CD0990047DF2E /* SDL_sensor.c in Sources */,
|
||||
F3BDD79420F51CB8004ECBF3 /* SDL_hidapi_switch.c in Sources */,
|
||||
93CB792613FC5F5300BD3E05 /* SDL_uikitviewcontroller.m in Sources */,
|
||||
AA628ADB159369E3005138DD /* SDL_rotate.c in Sources */,
|
||||
AA126AD51617C5E7005ABC8F /* SDL_uikitmodes.m in Sources */,
|
||||
@@ -1859,6 +1973,7 @@
|
||||
FD6526640DE8FCCB002AD96B /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = YES;
|
||||
@@ -1875,6 +1990,7 @@
|
||||
FD6526650DE8FCCB002AD96B /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = YES;
|
||||
|
||||
@@ -53,22 +53,22 @@
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
AA1EE4461760589B0029C7A5 /* libSDL2test.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libSDL2test.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
AA1EE454176059AB0029C7A5 /* SDL_test_common.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_common.c; path = ../../src/test/SDL_test_common.c; sourceTree = "<group>"; };
|
||||
AA1EE455176059AB0029C7A5 /* SDL_test_compare.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_compare.c; path = ../../src/test/SDL_test_compare.c; sourceTree = "<group>"; };
|
||||
AA1EE456176059AB0029C7A5 /* SDL_test_crc32.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_crc32.c; path = ../../src/test/SDL_test_crc32.c; sourceTree = "<group>"; };
|
||||
AA1EE457176059AB0029C7A5 /* SDL_test_font.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_font.c; path = ../../src/test/SDL_test_font.c; sourceTree = "<group>"; };
|
||||
AA1EE458176059AB0029C7A5 /* SDL_test_fuzzer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_fuzzer.c; path = ../../src/test/SDL_test_fuzzer.c; sourceTree = "<group>"; };
|
||||
AA1EE459176059AB0029C7A5 /* SDL_test_harness.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_harness.c; path = ../../src/test/SDL_test_harness.c; sourceTree = "<group>"; };
|
||||
AA1EE45A176059AB0029C7A5 /* SDL_test_imageBlit.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_imageBlit.c; path = ../../src/test/SDL_test_imageBlit.c; sourceTree = "<group>"; };
|
||||
AA1EE45B176059AB0029C7A5 /* SDL_test_imageBlitBlend.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_imageBlitBlend.c; path = ../../src/test/SDL_test_imageBlitBlend.c; sourceTree = "<group>"; };
|
||||
AA1EE45C176059AB0029C7A5 /* SDL_test_imageFace.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_imageFace.c; path = ../../src/test/SDL_test_imageFace.c; sourceTree = "<group>"; };
|
||||
AA1EE45D176059AB0029C7A5 /* SDL_test_imagePrimitives.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_imagePrimitives.c; path = ../../src/test/SDL_test_imagePrimitives.c; sourceTree = "<group>"; };
|
||||
AA1EE45E176059AB0029C7A5 /* SDL_test_imagePrimitivesBlend.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_imagePrimitivesBlend.c; path = ../../src/test/SDL_test_imagePrimitivesBlend.c; sourceTree = "<group>"; };
|
||||
AA1EE45F176059AB0029C7A5 /* SDL_test_log.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_log.c; path = ../../src/test/SDL_test_log.c; sourceTree = "<group>"; };
|
||||
AA1EE460176059AB0029C7A5 /* SDL_test_md5.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_md5.c; path = ../../src/test/SDL_test_md5.c; sourceTree = "<group>"; };
|
||||
AA1EE461176059AB0029C7A5 /* SDL_test_random.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_random.c; path = ../../src/test/SDL_test_random.c; sourceTree = "<group>"; };
|
||||
AAF02FFF1F9009B100B9A9FB /* SDL_test_memory.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_memory.c; path = ../../src/test/SDL_test_memory.c; sourceTree = "<group>"; };
|
||||
AAF030001F9009B100B9A9FB /* SDL_test_assert.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_assert.c; path = ../../src/test/SDL_test_assert.c; sourceTree = "<group>"; };
|
||||
AA1EE454176059AB0029C7A5 /* SDL_test_common.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_common.c; sourceTree = "<group>"; };
|
||||
AA1EE455176059AB0029C7A5 /* SDL_test_compare.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_compare.c; sourceTree = "<group>"; };
|
||||
AA1EE456176059AB0029C7A5 /* SDL_test_crc32.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_crc32.c; sourceTree = "<group>"; };
|
||||
AA1EE457176059AB0029C7A5 /* SDL_test_font.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_font.c; sourceTree = "<group>"; };
|
||||
AA1EE458176059AB0029C7A5 /* SDL_test_fuzzer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_fuzzer.c; sourceTree = "<group>"; };
|
||||
AA1EE459176059AB0029C7A5 /* SDL_test_harness.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_harness.c; sourceTree = "<group>"; };
|
||||
AA1EE45A176059AB0029C7A5 /* SDL_test_imageBlit.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_imageBlit.c; sourceTree = "<group>"; };
|
||||
AA1EE45B176059AB0029C7A5 /* SDL_test_imageBlitBlend.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_imageBlitBlend.c; sourceTree = "<group>"; };
|
||||
AA1EE45C176059AB0029C7A5 /* SDL_test_imageFace.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_imageFace.c; sourceTree = "<group>"; };
|
||||
AA1EE45D176059AB0029C7A5 /* SDL_test_imagePrimitives.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_imagePrimitives.c; sourceTree = "<group>"; };
|
||||
AA1EE45E176059AB0029C7A5 /* SDL_test_imagePrimitivesBlend.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_imagePrimitivesBlend.c; sourceTree = "<group>"; };
|
||||
AA1EE45F176059AB0029C7A5 /* SDL_test_log.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_log.c; sourceTree = "<group>"; };
|
||||
AA1EE460176059AB0029C7A5 /* SDL_test_md5.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_md5.c; sourceTree = "<group>"; };
|
||||
AA1EE461176059AB0029C7A5 /* SDL_test_random.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_random.c; sourceTree = "<group>"; };
|
||||
AAF02FFF1F9009B100B9A9FB /* SDL_test_memory.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_memory.c; sourceTree = "<group>"; };
|
||||
AAF030001F9009B100B9A9FB /* SDL_test_assert.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_assert.c; sourceTree = "<group>"; };
|
||||
FA3D98F81BC4E5A2002C96C8 /* libSDL2test-TV.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libSDL2test-TV.a"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
@@ -128,6 +128,7 @@
|
||||
AA1EE461176059AB0029C7A5 /* SDL_test_random.c */,
|
||||
);
|
||||
name = "Library Source";
|
||||
path = ../../src/test;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
0
Xcode-iOS/Template/SDL iOS Application/___PROJECTNAME___.xcodeproj/project.pbxproj
Executable file → Normal file
0
Xcode-iOS/Template/SDL iOS Application/___PROJECTNAME___.xcodeproj/project.pbxproj
Executable file → Normal file
86
Xcode-iOS/Test/TestiPhoneOS.xcodeproj/project.pbxproj
Executable file → Normal file
86
Xcode-iOS/Test/TestiPhoneOS.xcodeproj/project.pbxproj
Executable file → Normal file
@@ -419,52 +419,52 @@
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
046CEF8613254F23007AD51D /* testgesture.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = testgesture.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
046CEF8913254F63007AD51D /* testgesture.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testgesture.c; path = ../../test/testgesture.c; sourceTree = SOURCE_ROOT; };
|
||||
046CEF8913254F63007AD51D /* testgesture.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testgesture.c; sourceTree = "<group>"; };
|
||||
047A63ED13285C3200CD7973 /* checkkeys.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = checkkeys.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
047A63F013285CD100CD7973 /* checkkeys.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = checkkeys.c; path = ../../test/checkkeys.c; sourceTree = SOURCE_ROOT; };
|
||||
047A63F013285CD100CD7973 /* checkkeys.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = checkkeys.c; sourceTree = "<group>"; };
|
||||
1D6058910D05DD3D006BFB54 /* testwm2.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = testwm2.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
56ED050D118A8FE400A56AA6 /* testpower.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = testpower.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
56ED0510118A904200A56AA6 /* testpower.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testpower.c; path = ../../test/testpower.c; sourceTree = SOURCE_ROOT; };
|
||||
56ED0510118A904200A56AA6 /* testpower.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testpower.c; sourceTree = "<group>"; };
|
||||
AA13B3261FB8AEBC00D9FEE6 /* testyuv.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = testyuv.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
AA13B32E1FB8AF0C00D9FEE6 /* testyuv.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; name = testyuv.bmp; path = ../../test/testyuv.bmp; sourceTree = "<group>"; };
|
||||
AA13B35B1FB8B4D600D9FEE6 /* testyuv.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testyuv.c; path = ../../test/testyuv.c; sourceTree = "<group>"; };
|
||||
AA13B35E1FB8B50D00D9FEE6 /* testyuv_cvt.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testyuv_cvt.c; path = ../../test/testyuv_cvt.c; sourceTree = "<group>"; };
|
||||
AA13B32E1FB8AF0C00D9FEE6 /* testyuv.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; path = testyuv.bmp; sourceTree = "<group>"; };
|
||||
AA13B35B1FB8B4D600D9FEE6 /* testyuv.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testyuv.c; sourceTree = "<group>"; };
|
||||
AA13B35E1FB8B50D00D9FEE6 /* testyuv_cvt.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testyuv_cvt.c; sourceTree = "<group>"; };
|
||||
AA1EE44D176059220029C7A5 /* SDL2test.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SDL2test.xcodeproj; path = ../SDLtest/SDL2test.xcodeproj; sourceTree = "<group>"; };
|
||||
AA2F57A91FDB544800832AD7 /* Metal.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Metal.framework; path = System/Library/Frameworks/Metal.framework; sourceTree = SDKROOT; };
|
||||
AAE7DEEC14CBB1E100DF1A0E /* testscale.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = testscale.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
AAE7DF4514CBB43900DF1A0E /* testscale.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testscale.c; path = ../../test/testscale.c; sourceTree = "<group>"; };
|
||||
AAE7DF4514CBB43900DF1A0E /* testscale.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testscale.c; sourceTree = "<group>"; };
|
||||
AAE7DFB114CBB54E00DF1A0E /* testrendertarget.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = testrendertarget.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
AAE7DFB414CBB5F700DF1A0E /* testrendertarget.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testrendertarget.c; path = ../../test/testrendertarget.c; sourceTree = "<group>"; };
|
||||
FA0EF2221BAF43DE000E07A6 /* testgamecontroller.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testgamecontroller.c; path = ../../test/testgamecontroller.c; sourceTree = "<group>"; };
|
||||
FA0EF2281BAF4487000E07A6 /* axis.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; name = axis.bmp; path = ../../test/axis.bmp; sourceTree = "<group>"; };
|
||||
FA0EF2291BAF4487000E07A6 /* button.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; name = button.bmp; path = ../../test/button.bmp; sourceTree = "<group>"; };
|
||||
FA0EF22A1BAF4487000E07A6 /* controllermap.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; name = controllermap.bmp; path = ../../test/controllermap.bmp; sourceTree = "<group>"; };
|
||||
AAE7DFB414CBB5F700DF1A0E /* testrendertarget.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testrendertarget.c; sourceTree = "<group>"; };
|
||||
FA0EF2221BAF43DE000E07A6 /* testgamecontroller.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testgamecontroller.c; sourceTree = "<group>"; };
|
||||
FA0EF2281BAF4487000E07A6 /* axis.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; path = axis.bmp; sourceTree = "<group>"; };
|
||||
FA0EF2291BAF4487000E07A6 /* button.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; path = button.bmp; sourceTree = "<group>"; };
|
||||
FA0EF22A1BAF4487000E07A6 /* controllermap.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; path = controllermap.bmp; sourceTree = "<group>"; };
|
||||
FA3D99341BC4E644002C96C8 /* testgamecontroller-TV.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "testgamecontroller-TV.app"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
FA684F7A1BAF1A4400DCFD1A /* GameController.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GameController.framework; path = System/Library/Frameworks/GameController.framework; sourceTree = SDKROOT; };
|
||||
FA8B4BAC1967076F00F8EB7C /* CoreMotion.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMotion.framework; path = System/Library/Frameworks/CoreMotion.framework; sourceTree = SDKROOT; };
|
||||
FABA34761D8B4EAD00915323 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
|
||||
FABA34911D8B575200915323 /* testaudiocapture.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = testaudiocapture.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
FABA34931D8B578200915323 /* testaudiocapture.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testaudiocapture.c; path = ../../test/testaudiocapture.c; sourceTree = "<group>"; };
|
||||
FABA34931D8B578200915323 /* testaudiocapture.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testaudiocapture.c; sourceTree = "<group>"; };
|
||||
FABA34AA1D8B582100915323 /* loopwav-TV.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "loopwav-TV.app"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
FAE0E9931BAF9B230098DFA4 /* testgamecontroller.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = testgamecontroller.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
FD1B48AC0E3131CA007AB34E /* SDL.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SDL.xcodeproj; path = ../SDL/SDL.xcodeproj; sourceTree = SOURCE_ROOT; };
|
||||
FDA8A7410E2D0F1600EA573E /* testaudioinfo.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testaudioinfo.c; path = ../../test/testaudioinfo.c; sourceTree = SOURCE_ROOT; };
|
||||
FDA8A7470E2D0F1600EA573E /* testerror.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testerror.c; path = ../../test/testerror.c; sourceTree = SOURCE_ROOT; };
|
||||
FDA8A7480E2D0F1600EA573E /* testfile.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testfile.c; path = ../../test/testfile.c; sourceTree = SOURCE_ROOT; };
|
||||
FDA8A74C0E2D0F1600EA573E /* testthread.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testthread.c; path = ../../test/testthread.c; sourceTree = SOURCE_ROOT; };
|
||||
FDA8A74D0E2D0F1600EA573E /* testiconv.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testiconv.c; path = ../../test/testiconv.c; sourceTree = SOURCE_ROOT; };
|
||||
FDA8A74E0E2D0F1600EA573E /* testjoystick.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testjoystick.c; path = ../../test/testjoystick.c; sourceTree = SOURCE_ROOT; };
|
||||
FDA8A74F0E2D0F1600EA573E /* testkeys.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testkeys.c; path = ../../test/testkeys.c; sourceTree = SOURCE_ROOT; };
|
||||
FDA8A7510E2D0F1600EA573E /* testlock.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testlock.c; path = ../../test/testlock.c; sourceTree = SOURCE_ROOT; };
|
||||
FDA8A7540E2D0F1600EA573E /* testoverlay2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testoverlay2.c; path = ../../test/testoverlay2.c; sourceTree = SOURCE_ROOT; };
|
||||
FDA8A7560E2D0F1600EA573E /* testplatform.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testplatform.c; path = ../../test/testplatform.c; sourceTree = SOURCE_ROOT; };
|
||||
FDA8A7570E2D0F1600EA573E /* testsem.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testsem.c; path = ../../test/testsem.c; sourceTree = SOURCE_ROOT; };
|
||||
FDA8A7590E2D0F1600EA573E /* testsprite2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testsprite2.c; path = ../../test/testsprite2.c; sourceTree = SOURCE_ROOT; };
|
||||
FDA8A75A0E2D0F1600EA573E /* testtimer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testtimer.c; path = ../../test/testtimer.c; sourceTree = SOURCE_ROOT; };
|
||||
FDA8A75B0E2D0F1600EA573E /* testver.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testver.c; path = ../../test/testver.c; sourceTree = SOURCE_ROOT; };
|
||||
FDA8A75F0E2D0F1600EA573E /* testwm2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testwm2.c; path = ../../test/testwm2.c; sourceTree = SOURCE_ROOT; };
|
||||
FDA8A7610E2D0F1600EA573E /* torturethread.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = torturethread.c; path = ../../test/torturethread.c; sourceTree = SOURCE_ROOT; };
|
||||
FDA8A78B0E2D0F3D00EA573E /* loopwave.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = loopwave.c; path = ../../test/loopwave.c; sourceTree = SOURCE_ROOT; };
|
||||
FDA8A7410E2D0F1600EA573E /* testaudioinfo.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testaudioinfo.c; sourceTree = "<group>"; };
|
||||
FDA8A7470E2D0F1600EA573E /* testerror.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testerror.c; sourceTree = "<group>"; };
|
||||
FDA8A7480E2D0F1600EA573E /* testfile.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testfile.c; sourceTree = "<group>"; };
|
||||
FDA8A74C0E2D0F1600EA573E /* testthread.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testthread.c; sourceTree = "<group>"; };
|
||||
FDA8A74D0E2D0F1600EA573E /* testiconv.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testiconv.c; sourceTree = "<group>"; };
|
||||
FDA8A74E0E2D0F1600EA573E /* testjoystick.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testjoystick.c; sourceTree = "<group>"; };
|
||||
FDA8A74F0E2D0F1600EA573E /* testkeys.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testkeys.c; sourceTree = "<group>"; };
|
||||
FDA8A7510E2D0F1600EA573E /* testlock.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testlock.c; sourceTree = "<group>"; };
|
||||
FDA8A7540E2D0F1600EA573E /* testoverlay2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testoverlay2.c; sourceTree = "<group>"; };
|
||||
FDA8A7560E2D0F1600EA573E /* testplatform.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testplatform.c; sourceTree = "<group>"; };
|
||||
FDA8A7570E2D0F1600EA573E /* testsem.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testsem.c; sourceTree = "<group>"; };
|
||||
FDA8A7590E2D0F1600EA573E /* testsprite2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testsprite2.c; sourceTree = "<group>"; };
|
||||
FDA8A75A0E2D0F1600EA573E /* testtimer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testtimer.c; sourceTree = "<group>"; };
|
||||
FDA8A75B0E2D0F1600EA573E /* testver.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testver.c; sourceTree = "<group>"; };
|
||||
FDA8A75F0E2D0F1600EA573E /* testwm2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testwm2.c; sourceTree = "<group>"; };
|
||||
FDA8A7610E2D0F1600EA573E /* torturethread.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = torturethread.c; sourceTree = "<group>"; };
|
||||
FDA8A78B0E2D0F3D00EA573E /* loopwave.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = loopwave.c; sourceTree = "<group>"; };
|
||||
FDA8A8980E2D111A00EA573E /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
|
||||
FDA8A8990E2D111A00EA573E /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
|
||||
FDA8A89A0E2D111A00EA573E /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; };
|
||||
@@ -473,21 +473,21 @@
|
||||
FDA8A89D0E2D111A00EA573E /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
|
||||
FDA8A89E0E2D111A00EA573E /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; };
|
||||
FDA8AABB0E2D330F00EA573E /* loopwav.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = loopwav.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
FDA8AAD90E2D33B000EA573E /* icon.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; name = icon.bmp; path = ../../test/icon.bmp; sourceTree = SOURCE_ROOT; };
|
||||
FDA8AADA0E2D33BA00EA573E /* moose.dat */ = {isa = PBXFileReference; lastKnownFileType = file; name = moose.dat; path = ../../test/moose.dat; sourceTree = SOURCE_ROOT; };
|
||||
FDA8AADB0E2D33BA00EA573E /* picture.xbm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = picture.xbm; path = ../../test/picture.xbm; sourceTree = SOURCE_ROOT; };
|
||||
FDA8AADE0E2D33C100EA573E /* sample.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; name = sample.bmp; path = ../../test/sample.bmp; sourceTree = SOURCE_ROOT; };
|
||||
FDA8AAE20E2D33C600EA573E /* sample.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; name = sample.wav; path = ../../test/sample.wav; sourceTree = SOURCE_ROOT; };
|
||||
FDA8AAD90E2D33B000EA573E /* icon.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; path = icon.bmp; sourceTree = "<group>"; };
|
||||
FDA8AADA0E2D33BA00EA573E /* moose.dat */ = {isa = PBXFileReference; lastKnownFileType = file; path = moose.dat; sourceTree = "<group>"; };
|
||||
FDA8AADB0E2D33BA00EA573E /* picture.xbm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = picture.xbm; sourceTree = "<group>"; };
|
||||
FDA8AADE0E2D33C100EA573E /* sample.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; path = sample.bmp; sourceTree = "<group>"; };
|
||||
FDA8AAE20E2D33C600EA573E /* sample.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; path = sample.wav; sourceTree = "<group>"; };
|
||||
FDAAC3CD0E2D47E6001DB1D8 /* testaudioinfo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = testaudioinfo.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
FDAAC59B0E2D5429001DB1D8 /* testerror.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = testerror.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
FDAAC5C90E2D55B5001DB1D8 /* testfile.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = testfile.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
FDAAC6260E2D5914001DB1D8 /* testgles.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = testgles.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
FDAAC6290E2D5960001DB1D8 /* testgles.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testgles.c; path = ../../test/testgles.c; sourceTree = SOURCE_ROOT; };
|
||||
FDAAC6290E2D5960001DB1D8 /* testgles.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testgles.c; sourceTree = "<group>"; };
|
||||
FDC430000F0D866D009C87E1 /* torturethread.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = torturethread.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
FDC430090F0D86BF009C87E1 /* testdraw2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testdraw2.c; path = ../../test/testdraw2.c; sourceTree = SOURCE_ROOT; };
|
||||
FDC430090F0D86BF009C87E1 /* testdraw2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testdraw2.c; sourceTree = "<group>"; };
|
||||
FDD2C10A0E2E4F4B00B7A85F /* testthread.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = testthread.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
FDD2C1810E2E52C000B7A85F /* testiconv.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = testiconv.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
FDD2C18A0E2E52FE00B7A85F /* utf8.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = utf8.txt; path = ../../test/utf8.txt; sourceTree = SOURCE_ROOT; };
|
||||
FDD2C18A0E2E52FE00B7A85F /* utf8.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = utf8.txt; sourceTree = "<group>"; };
|
||||
FDD2C1A50E2E534F00B7A85F /* testjoystick.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = testjoystick.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
FDD2C45E0E2E773800B7A85F /* testkeys.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = testkeys.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
FDD2C47C0E2E77D700B7A85F /* testlock.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = testlock.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
@@ -1057,7 +1057,7 @@
|
||||
AA1EE44D176059220029C7A5 /* SDL2test.xcodeproj */,
|
||||
FD1B48AC0E3131CA007AB34E /* SDL.xcodeproj */,
|
||||
FDA8AAD60E2D339A00EA573E /* Resources */,
|
||||
FDA8A7C30E2D10FA00EA573E /* Linked Frameworks */,
|
||||
FDA8A7C30E2D10FA00EA573E /* Frameworks */,
|
||||
FDA8A73B0E2D0F0400EA573E /* src */,
|
||||
19C28FACFE9D520D11CA2CBB /* Products */,
|
||||
FABA34751D8B4EAC00915323 /* Frameworks */,
|
||||
@@ -1125,9 +1125,10 @@
|
||||
FDA8A7610E2D0F1600EA573E /* torturethread.c */,
|
||||
);
|
||||
name = src;
|
||||
path = ../../test;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
FDA8A7C30E2D10FA00EA573E /* Linked Frameworks */ = {
|
||||
FDA8A7C30E2D10FA00EA573E /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
FA684F7A1BAF1A4400DCFD1A /* GameController.framework */,
|
||||
@@ -1140,7 +1141,7 @@
|
||||
FDA8A89D0E2D111A00EA573E /* Foundation.framework */,
|
||||
FDA8A89E0E2D111A00EA573E /* CoreAudio.framework */,
|
||||
);
|
||||
name = "Linked Frameworks";
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
FDA8AAD60E2D339A00EA573E /* Resources */ = {
|
||||
@@ -1158,6 +1159,7 @@
|
||||
FDD2C18A0E2E52FE00B7A85F /* utf8.txt */,
|
||||
);
|
||||
name = Resources;
|
||||
path = ../../test;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
@@ -2324,6 +2326,7 @@
|
||||
C01FCF4F08A954540054247B /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
ENABLE_BITCODE = NO;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
@@ -2340,6 +2343,7 @@
|
||||
C01FCF5008A954540054247B /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
ENABLE_BITCODE = NO;
|
||||
HEADER_SEARCH_PATHS = ../../include;
|
||||
|
||||
@@ -19,10 +19,10 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>2.0.8</string>
|
||||
<string>2.0.9</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>SDLX</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>2.0.8</string>
|
||||
<string>2.0.9</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
377
Xcode/SDL/SDL.xcodeproj/project.pbxproj
Executable file → Normal file
377
Xcode/SDL/SDL.xcodeproj/project.pbxproj
Executable file → Normal file
File diff suppressed because it is too large
Load Diff
0
Xcode/SDL/pkg-support/SDL.info
Executable file → Normal file
0
Xcode/SDL/pkg-support/SDL.info
Executable file → Normal file
0
Xcode/SDL/pkg-support/resources/ReadMe.txt
Executable file → Normal file
0
Xcode/SDL/pkg-support/resources/ReadMe.txt
Executable file → Normal file
161
Xcode/SDLTest/SDLTest.xcodeproj/project.pbxproj
Executable file → Normal file
161
Xcode/SDLTest/SDLTest.xcodeproj/project.pbxproj
Executable file → Normal file
@@ -1134,36 +1134,36 @@
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
0017958C10741F7900F5D044 /* testatomic */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testatomic; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
0017958F1074216E00F5D044 /* testatomic.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testatomic.c; path = ../../test/testatomic.c; sourceTree = SOURCE_ROOT; };
|
||||
0017958F1074216E00F5D044 /* testatomic.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testatomic.c; sourceTree = "<group>"; };
|
||||
001795AD107421BF00F5D044 /* testaudioinfo */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testaudioinfo; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
001795B01074222D00F5D044 /* testaudioinfo.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testaudioinfo.c; path = ../../test/testaudioinfo.c; sourceTree = SOURCE_ROOT; };
|
||||
001795B01074222D00F5D044 /* testaudioinfo.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testaudioinfo.c; sourceTree = "<group>"; };
|
||||
0017972110742F3200F5D044 /* testgl2 */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testgl2; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
0017972710742FB900F5D044 /* testgl2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testgl2.c; path = ../../test/testgl2.c; sourceTree = SOURCE_ROOT; };
|
||||
0017972710742FB900F5D044 /* testgl2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testgl2.c; sourceTree = "<group>"; };
|
||||
00179748107430D600F5D044 /* testhaptic */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testhaptic; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
0017974E1074315700F5D044 /* testhaptic.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testhaptic.c; path = ../../test/testhaptic.c; sourceTree = SOURCE_ROOT; };
|
||||
0017974E1074315700F5D044 /* testhaptic.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testhaptic.c; sourceTree = "<group>"; };
|
||||
0017976E107431B300F5D044 /* testdraw2 */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testdraw2; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
001797711074320D00F5D044 /* testdraw2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testdraw2.c; path = ../../test/testdraw2.c; sourceTree = SOURCE_ROOT; };
|
||||
001797711074320D00F5D044 /* testdraw2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testdraw2.c; sourceTree = "<group>"; };
|
||||
0017978E107432AE00F5D044 /* testime */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testime; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
00179791107432FA00F5D044 /* testime.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testime.c; path = ../../test/testime.c; sourceTree = SOURCE_ROOT; };
|
||||
00179791107432FA00F5D044 /* testime.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testime.c; sourceTree = "<group>"; };
|
||||
001797AE1074334C00F5D044 /* testintersections */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testintersections; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
001797B31074339C00F5D044 /* testintersections.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testintersections.c; path = ../../test/testintersections.c; sourceTree = SOURCE_ROOT; };
|
||||
001797B31074339C00F5D044 /* testintersections.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testintersections.c; sourceTree = "<group>"; };
|
||||
001797D0107433C600F5D044 /* testloadso */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testloadso; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
001797D31074343E00F5D044 /* testloadso.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testloadso.c; path = ../../test/testloadso.c; sourceTree = SOURCE_ROOT; };
|
||||
001797D31074343E00F5D044 /* testloadso.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testloadso.c; sourceTree = "<group>"; };
|
||||
001798121074355200F5D044 /* testmultiaudio */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testmultiaudio; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
001798151074359B00F5D044 /* testmultiaudio.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testmultiaudio.c; path = ../../test/testmultiaudio.c; sourceTree = SOURCE_ROOT; };
|
||||
0017985A107436ED00F5D044 /* testnative.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testnative.c; path = ../../test/testnative.c; sourceTree = SOURCE_ROOT; };
|
||||
0017985B107436ED00F5D044 /* testnative.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = testnative.h; path = ../../test/testnative.h; sourceTree = SOURCE_ROOT; };
|
||||
0017985C107436ED00F5D044 /* testnativecocoa.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = testnativecocoa.m; path = ../../test/testnativecocoa.m; sourceTree = SOURCE_ROOT; };
|
||||
00179872107438D000F5D044 /* testnativex11.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testnativex11.c; path = ../../test/testnativex11.c; sourceTree = SOURCE_ROOT; };
|
||||
001798151074359B00F5D044 /* testmultiaudio.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testmultiaudio.c; sourceTree = "<group>"; };
|
||||
0017985A107436ED00F5D044 /* testnative.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testnative.c; sourceTree = "<group>"; };
|
||||
0017985B107436ED00F5D044 /* testnative.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = testnative.h; sourceTree = "<group>"; };
|
||||
0017985C107436ED00F5D044 /* testnativecocoa.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = testnativecocoa.m; sourceTree = "<group>"; };
|
||||
00179872107438D000F5D044 /* testnativex11.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testnativex11.c; sourceTree = "<group>"; };
|
||||
001798941074392D00F5D044 /* testnative */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testnative; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
001798B5107439DF00F5D044 /* testpower */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testpower; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
001798B910743A4900F5D044 /* testpower.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testpower.c; path = ../../test/testpower.c; sourceTree = SOURCE_ROOT; };
|
||||
001798B910743A4900F5D044 /* testpower.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testpower.c; sourceTree = "<group>"; };
|
||||
001798F210743BEC00F5D044 /* testresample */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testresample; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
001798F910743E9200F5D044 /* testresample.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testresample.c; path = ../../test/testresample.c; sourceTree = SOURCE_ROOT; };
|
||||
001798F910743E9200F5D044 /* testresample.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testresample.c; sourceTree = "<group>"; };
|
||||
0017991610743F1000F5D044 /* testsprite2 */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testsprite2; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
0017991910743F5300F5D044 /* testsprite2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testsprite2.c; path = ../../test/testsprite2.c; sourceTree = SOURCE_ROOT; };
|
||||
0017991910743F5300F5D044 /* testsprite2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testsprite2.c; sourceTree = "<group>"; };
|
||||
0017993810743FB700F5D044 /* testwm2 */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testwm2; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
0017993B10743FEF00F5D044 /* testwm2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testwm2.c; path = ../../test/testwm2.c; sourceTree = SOURCE_ROOT; };
|
||||
0017993B10743FEF00F5D044 /* testwm2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testwm2.c; sourceTree = "<group>"; };
|
||||
002A863B10730545007319AE /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = /System/Library/Frameworks/CoreAudio.framework; sourceTree = "<absolute>"; };
|
||||
002A863C10730545007319AE /* ForceFeedback.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ForceFeedback.framework; path = /System/Library/Frameworks/ForceFeedback.framework; sourceTree = "<absolute>"; };
|
||||
002A863D10730545007319AE /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = /System/Library/Frameworks/IOKit.framework; sourceTree = "<absolute>"; };
|
||||
@@ -1173,37 +1173,37 @@
|
||||
002A873910730675007319AE /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = "<absolute>"; };
|
||||
002F33A709CA188600EBEB88 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
|
||||
002F341209CA1BFF00EBEB88 /* testfile */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testfile; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
002F341709CA1C5B00EBEB88 /* testfile.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = testfile.c; path = ../../test/testfile.c; sourceTree = SOURCE_ROOT; };
|
||||
002F341709CA1C5B00EBEB88 /* testfile.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = testfile.c; sourceTree = "<group>"; };
|
||||
002F343109CA1F0300EBEB88 /* testiconv */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testiconv; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
002F343609CA1F6F00EBEB88 /* testiconv.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = testiconv.c; path = ../../test/testiconv.c; sourceTree = SOURCE_ROOT; };
|
||||
002F343609CA1F6F00EBEB88 /* testiconv.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = testiconv.c; sourceTree = "<group>"; };
|
||||
002F344D09CA1FB300EBEB88 /* testoverlay2 */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testoverlay2; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
002F345209CA201C00EBEB88 /* testoverlay2.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = testoverlay2.c; path = ../../test/testoverlay2.c; sourceTree = SOURCE_ROOT; };
|
||||
002F345209CA201C00EBEB88 /* testoverlay2.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = testoverlay2.c; sourceTree = "<group>"; };
|
||||
002F346A09CA204F00EBEB88 /* testplatform */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testplatform; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
002F346F09CA20A600EBEB88 /* testplatform.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = testplatform.c; path = ../../test/testplatform.c; sourceTree = SOURCE_ROOT; };
|
||||
002F346F09CA20A600EBEB88 /* testplatform.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = testplatform.c; sourceTree = "<group>"; };
|
||||
003FA63A093FFD41000C53B3 /* SDL.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SDL.xcodeproj; path = ../SDL/SDL.xcodeproj; sourceTree = SOURCE_ROOT; };
|
||||
00794E5D09D20839003FC8A1 /* icon.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; name = icon.bmp; path = ../../test/icon.bmp; sourceTree = SOURCE_ROOT; };
|
||||
00794E5E09D20839003FC8A1 /* moose.dat */ = {isa = PBXFileReference; lastKnownFileType = file; name = moose.dat; path = ../../test/moose.dat; sourceTree = SOURCE_ROOT; };
|
||||
00794E5F09D20839003FC8A1 /* picture.xbm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = picture.xbm; path = ../../test/picture.xbm; sourceTree = SOURCE_ROOT; };
|
||||
00794E6109D20839003FC8A1 /* sample.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; name = sample.bmp; path = ../../test/sample.bmp; sourceTree = SOURCE_ROOT; };
|
||||
00794E6209D20839003FC8A1 /* sample.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; name = sample.wav; path = ../../test/sample.wav; sourceTree = SOURCE_ROOT; };
|
||||
00794E6309D20839003FC8A1 /* utf8.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = utf8.txt; path = ../../test/utf8.txt; sourceTree = SOURCE_ROOT; };
|
||||
083E4872006D84C97F000001 /* loopwave.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = loopwave.c; path = ../../test/loopwave.c; sourceTree = SOURCE_ROOT; };
|
||||
083E4878006D85357F000001 /* testerror.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = testerror.c; path = ../../test/testerror.c; sourceTree = SOURCE_ROOT; };
|
||||
083E487E006D86A17F000001 /* testsem.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = testsem.c; path = ../../test/testsem.c; sourceTree = SOURCE_ROOT; };
|
||||
083E4880006D86A17F000001 /* testtimer.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = testtimer.c; path = ../../test/testtimer.c; sourceTree = SOURCE_ROOT; };
|
||||
083E4882006D86A17F000001 /* testver.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = testver.c; path = ../../test/testver.c; sourceTree = SOURCE_ROOT; };
|
||||
083E4887006D86A17F000001 /* torturethread.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = torturethread.c; path = ../../test/torturethread.c; sourceTree = SOURCE_ROOT; };
|
||||
092D6D10FFB30A2C7F000001 /* checkkeys.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = checkkeys.c; path = ../../test/checkkeys.c; sourceTree = SOURCE_ROOT; };
|
||||
092D6D58FFB311A97F000001 /* testthread.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = testthread.c; path = ../../test/testthread.c; sourceTree = SOURCE_ROOT; };
|
||||
092D6D62FFB312AA7F000001 /* testjoystick.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = testjoystick.c; path = ../../test/testjoystick.c; sourceTree = SOURCE_ROOT; };
|
||||
092D6D6CFFB313437F000001 /* testkeys.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = testkeys.c; path = ../../test/testkeys.c; sourceTree = SOURCE_ROOT; };
|
||||
092D6D75FFB313BB7F000001 /* testlock.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = testlock.c; path = ../../test/testlock.c; sourceTree = SOURCE_ROOT; };
|
||||
00794E5D09D20839003FC8A1 /* icon.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; path = icon.bmp; sourceTree = "<group>"; };
|
||||
00794E5E09D20839003FC8A1 /* moose.dat */ = {isa = PBXFileReference; lastKnownFileType = file; path = moose.dat; sourceTree = "<group>"; };
|
||||
00794E5F09D20839003FC8A1 /* picture.xbm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = picture.xbm; sourceTree = "<group>"; };
|
||||
00794E6109D20839003FC8A1 /* sample.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; path = sample.bmp; sourceTree = "<group>"; };
|
||||
00794E6209D20839003FC8A1 /* sample.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; path = sample.wav; sourceTree = "<group>"; };
|
||||
00794E6309D20839003FC8A1 /* utf8.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = utf8.txt; sourceTree = "<group>"; };
|
||||
083E4872006D84C97F000001 /* loopwave.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = loopwave.c; sourceTree = "<group>"; };
|
||||
083E4878006D85357F000001 /* testerror.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = testerror.c; sourceTree = "<group>"; };
|
||||
083E487E006D86A17F000001 /* testsem.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = testsem.c; sourceTree = "<group>"; };
|
||||
083E4880006D86A17F000001 /* testtimer.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = testtimer.c; sourceTree = "<group>"; };
|
||||
083E4882006D86A17F000001 /* testver.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = testver.c; sourceTree = "<group>"; };
|
||||
083E4887006D86A17F000001 /* torturethread.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = torturethread.c; sourceTree = "<group>"; };
|
||||
092D6D10FFB30A2C7F000001 /* checkkeys.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = checkkeys.c; sourceTree = "<group>"; };
|
||||
092D6D58FFB311A97F000001 /* testthread.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = testthread.c; sourceTree = "<group>"; };
|
||||
092D6D62FFB312AA7F000001 /* testjoystick.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = testjoystick.c; sourceTree = "<group>"; };
|
||||
092D6D6CFFB313437F000001 /* testkeys.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = testkeys.c; sourceTree = "<group>"; };
|
||||
092D6D75FFB313BB7F000001 /* testlock.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = testlock.c; sourceTree = "<group>"; };
|
||||
4537749212091504002F0F45 /* testshape */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testshape; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
453774A4120915E3002F0F45 /* testshape.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testshape.c; path = ../../test/testshape.c; sourceTree = SOURCE_ROOT; };
|
||||
453774A4120915E3002F0F45 /* testshape.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testshape.c; sourceTree = "<group>"; };
|
||||
66E88E5B203B733C0004D44E /* Metal.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Metal.framework; path = System/Library/Frameworks/Metal.framework; sourceTree = SDKROOT; };
|
||||
66E88E8A203B778F0004D44E /* testyuv_cvt.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = testyuv_cvt.c; path = ../../test/testyuv_cvt.c; sourceTree = "<group>"; };
|
||||
AAF02FF41F90089800B9A9FB /* SDL_test_memory.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_memory.c; path = ../../src/test/SDL_test_memory.c; sourceTree = "<group>"; };
|
||||
BBFC088E164C6820003E6A99 /* testgamecontroller.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testgamecontroller.c; path = ../../test/testgamecontroller.c; sourceTree = "<group>"; };
|
||||
66E88E8A203B778F0004D44E /* testyuv_cvt.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = testyuv_cvt.c; sourceTree = "<group>"; };
|
||||
AAF02FF41F90089800B9A9FB /* SDL_test_memory.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_memory.c; sourceTree = "<group>"; };
|
||||
BBFC088E164C6820003E6A99 /* testgamecontroller.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testgamecontroller.c; sourceTree = "<group>"; };
|
||||
BBFC08CD164C6862003E6A99 /* testgamecontroller */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testgamecontroller; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
BEC566B60761D90300A33029 /* checkkeys */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = checkkeys; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
BEC566D10761D90300A33029 /* loopwave */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = loopwave; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
@@ -1216,37 +1216,37 @@
|
||||
BEC567980761D90500A33029 /* testtimer */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testtimer; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
BEC567B20761D90500A33029 /* testversion */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testversion; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
BEC567F50761D90600A33029 /* torturethread */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = torturethread; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
DB0F48D717CA51D2008798C5 /* testdrawchessboard.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = testdrawchessboard.c; path = ../../test/testdrawchessboard.c; sourceTree = "<group>"; };
|
||||
DB0F48D817CA51D2008798C5 /* testfilesystem.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = testfilesystem.c; path = ../../test/testfilesystem.c; sourceTree = "<group>"; };
|
||||
DB0F48D717CA51D2008798C5 /* testdrawchessboard.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = testdrawchessboard.c; sourceTree = "<group>"; };
|
||||
DB0F48D817CA51D2008798C5 /* testfilesystem.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = testfilesystem.c; sourceTree = "<group>"; };
|
||||
DB0F48EC17CA51E5008798C5 /* testdrawchessboard */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testdrawchessboard; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
DB0F490117CA5212008798C5 /* testfilesystem */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testfilesystem; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
DB166CBB16A1C74100A1396C /* testgesture.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = testgesture.c; path = ../../test/testgesture.c; sourceTree = "<group>"; };
|
||||
DB166CBC16A1C74100A1396C /* testgles.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = testgles.c; path = ../../test/testgles.c; sourceTree = "<group>"; };
|
||||
DB166CBD16A1C74100A1396C /* testmessage.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = testmessage.c; path = ../../test/testmessage.c; sourceTree = "<group>"; };
|
||||
DB166CBF16A1C74100A1396C /* testrelative.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = testrelative.c; path = ../../test/testrelative.c; sourceTree = "<group>"; };
|
||||
DB166CC016A1C74100A1396C /* testrendercopyex.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = testrendercopyex.c; path = ../../test/testrendercopyex.c; sourceTree = "<group>"; };
|
||||
DB166CC116A1C74100A1396C /* testrendertarget.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = testrendertarget.c; path = ../../test/testrendertarget.c; sourceTree = "<group>"; };
|
||||
DB166CC216A1C74100A1396C /* testrumble.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = testrumble.c; path = ../../test/testrumble.c; sourceTree = "<group>"; };
|
||||
DB166CC316A1C74100A1396C /* testscale.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = testscale.c; path = ../../test/testscale.c; sourceTree = "<group>"; };
|
||||
DB166CC416A1C74100A1396C /* testshader.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = testshader.c; path = ../../test/testshader.c; sourceTree = "<group>"; };
|
||||
DB166CC516A1C74100A1396C /* testspriteminimal.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = testspriteminimal.c; path = ../../test/testspriteminimal.c; sourceTree = "<group>"; };
|
||||
DB166CC616A1C74100A1396C /* teststreaming.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = teststreaming.c; path = ../../test/teststreaming.c; sourceTree = "<group>"; };
|
||||
DB166CBB16A1C74100A1396C /* testgesture.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = testgesture.c; sourceTree = "<group>"; };
|
||||
DB166CBC16A1C74100A1396C /* testgles.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = testgles.c; sourceTree = "<group>"; };
|
||||
DB166CBD16A1C74100A1396C /* testmessage.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = testmessage.c; sourceTree = "<group>"; };
|
||||
DB166CBF16A1C74100A1396C /* testrelative.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = testrelative.c; sourceTree = "<group>"; };
|
||||
DB166CC016A1C74100A1396C /* testrendercopyex.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = testrendercopyex.c; sourceTree = "<group>"; };
|
||||
DB166CC116A1C74100A1396C /* testrendertarget.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = testrendertarget.c; sourceTree = "<group>"; };
|
||||
DB166CC216A1C74100A1396C /* testrumble.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = testrumble.c; sourceTree = "<group>"; };
|
||||
DB166CC316A1C74100A1396C /* testscale.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = testscale.c; sourceTree = "<group>"; };
|
||||
DB166CC416A1C74100A1396C /* testshader.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = testshader.c; sourceTree = "<group>"; };
|
||||
DB166CC516A1C74100A1396C /* testspriteminimal.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = testspriteminimal.c; sourceTree = "<group>"; };
|
||||
DB166CC616A1C74100A1396C /* teststreaming.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = teststreaming.c; sourceTree = "<group>"; };
|
||||
DB166D7F16A1D12400A1396C /* libSDL_test.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libSDL_test.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
DB166D8416A1D1A500A1396C /* SDL_test_assert.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_assert.c; path = ../../src/test/SDL_test_assert.c; sourceTree = "<group>"; };
|
||||
DB166D8516A1D1A500A1396C /* SDL_test_common.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_common.c; path = ../../src/test/SDL_test_common.c; sourceTree = "<group>"; };
|
||||
DB166D8616A1D1A500A1396C /* SDL_test_compare.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_compare.c; path = ../../src/test/SDL_test_compare.c; sourceTree = "<group>"; };
|
||||
DB166D8716A1D1A500A1396C /* SDL_test_crc32.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_crc32.c; path = ../../src/test/SDL_test_crc32.c; sourceTree = "<group>"; };
|
||||
DB166D8816A1D1A500A1396C /* SDL_test_font.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_font.c; path = ../../src/test/SDL_test_font.c; sourceTree = "<group>"; };
|
||||
DB166D8916A1D1A500A1396C /* SDL_test_fuzzer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_fuzzer.c; path = ../../src/test/SDL_test_fuzzer.c; sourceTree = "<group>"; };
|
||||
DB166D8A16A1D1A500A1396C /* SDL_test_harness.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_harness.c; path = ../../src/test/SDL_test_harness.c; sourceTree = "<group>"; };
|
||||
DB166D8B16A1D1A500A1396C /* SDL_test_imageBlit.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_imageBlit.c; path = ../../src/test/SDL_test_imageBlit.c; sourceTree = "<group>"; };
|
||||
DB166D8C16A1D1A500A1396C /* SDL_test_imageBlitBlend.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_imageBlitBlend.c; path = ../../src/test/SDL_test_imageBlitBlend.c; sourceTree = "<group>"; };
|
||||
DB166D8D16A1D1A500A1396C /* SDL_test_imageFace.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_imageFace.c; path = ../../src/test/SDL_test_imageFace.c; sourceTree = "<group>"; };
|
||||
DB166D8E16A1D1A500A1396C /* SDL_test_imagePrimitives.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_imagePrimitives.c; path = ../../src/test/SDL_test_imagePrimitives.c; sourceTree = "<group>"; };
|
||||
DB166D8F16A1D1A500A1396C /* SDL_test_imagePrimitivesBlend.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_imagePrimitivesBlend.c; path = ../../src/test/SDL_test_imagePrimitivesBlend.c; sourceTree = "<group>"; };
|
||||
DB166D9016A1D1A500A1396C /* SDL_test_log.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_log.c; path = ../../src/test/SDL_test_log.c; sourceTree = "<group>"; };
|
||||
DB166D9116A1D1A500A1396C /* SDL_test_md5.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_md5.c; path = ../../src/test/SDL_test_md5.c; sourceTree = "<group>"; };
|
||||
DB166D9216A1D1A500A1396C /* SDL_test_random.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_random.c; path = ../../src/test/SDL_test_random.c; sourceTree = "<group>"; };
|
||||
DB166D8416A1D1A500A1396C /* SDL_test_assert.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_assert.c; sourceTree = "<group>"; };
|
||||
DB166D8516A1D1A500A1396C /* SDL_test_common.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_common.c; sourceTree = "<group>"; };
|
||||
DB166D8616A1D1A500A1396C /* SDL_test_compare.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_compare.c; sourceTree = "<group>"; };
|
||||
DB166D8716A1D1A500A1396C /* SDL_test_crc32.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_crc32.c; sourceTree = "<group>"; };
|
||||
DB166D8816A1D1A500A1396C /* SDL_test_font.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_font.c; sourceTree = "<group>"; };
|
||||
DB166D8916A1D1A500A1396C /* SDL_test_fuzzer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_fuzzer.c; sourceTree = "<group>"; };
|
||||
DB166D8A16A1D1A500A1396C /* SDL_test_harness.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_harness.c; sourceTree = "<group>"; };
|
||||
DB166D8B16A1D1A500A1396C /* SDL_test_imageBlit.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_imageBlit.c; sourceTree = "<group>"; };
|
||||
DB166D8C16A1D1A500A1396C /* SDL_test_imageBlitBlend.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_imageBlitBlend.c; sourceTree = "<group>"; };
|
||||
DB166D8D16A1D1A500A1396C /* SDL_test_imageFace.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_imageFace.c; sourceTree = "<group>"; };
|
||||
DB166D8E16A1D1A500A1396C /* SDL_test_imagePrimitives.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_imagePrimitives.c; sourceTree = "<group>"; };
|
||||
DB166D8F16A1D1A500A1396C /* SDL_test_imagePrimitivesBlend.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_imagePrimitivesBlend.c; sourceTree = "<group>"; };
|
||||
DB166D9016A1D1A500A1396C /* SDL_test_log.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_log.c; sourceTree = "<group>"; };
|
||||
DB166D9116A1D1A500A1396C /* SDL_test_md5.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_md5.c; sourceTree = "<group>"; };
|
||||
DB166D9216A1D1A500A1396C /* SDL_test_random.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_random.c; sourceTree = "<group>"; };
|
||||
DB166DBF16A1D2F600A1396C /* testgesture */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testgesture; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
DB166DD516A1D36A00A1396C /* testmessage */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testmessage; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
DB166DEE16A1D50C00A1396C /* testrelative */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testrelative; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
@@ -1257,16 +1257,16 @@
|
||||
DB166E6816A1D6F300A1396C /* testshader */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testshader; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
DB166E7E16A1D78400A1396C /* testspriteminimal */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testspriteminimal; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
DB166E9116A1D78C00A1396C /* teststreaming */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = teststreaming; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
DB166ECF16A1D87000A1396C /* shapes */ = {isa = PBXFileReference; lastKnownFileType = folder; name = shapes; path = ../../test/shapes; sourceTree = "<group>"; };
|
||||
DB166ECF16A1D87000A1396C /* shapes */ = {isa = PBXFileReference; lastKnownFileType = folder; path = shapes; sourceTree = "<group>"; };
|
||||
DB445EF818184B7000B306B0 /* testdropfile.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = testdropfile.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
DB445EFA18184BB600B306B0 /* testdropfile.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testdropfile.c; path = ../../test/testdropfile.c; sourceTree = "<group>"; };
|
||||
DB445EFA18184BB600B306B0 /* testdropfile.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testdropfile.c; sourceTree = "<group>"; };
|
||||
DB89957E18A19ABA0092407C /* testhotplug */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testhotplug; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
DB89958318A19B130092407C /* testhotplug.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testhotplug.c; path = ../../test/testhotplug.c; sourceTree = "<group>"; };
|
||||
DBBC552C182831D700F3CA8D /* TestDropFile-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = "TestDropFile-Info.plist"; sourceTree = "<group>"; };
|
||||
DBEC54D11A1A811D005B1EAB /* controllermap.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = controllermap.c; path = ../../test/controllermap.c; sourceTree = "<group>"; };
|
||||
DBEC54D61A1A8145005B1EAB /* axis.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; name = axis.bmp; path = ../../test/axis.bmp; sourceTree = "<group>"; };
|
||||
DBEC54D71A1A8145005B1EAB /* button.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; name = button.bmp; path = ../../test/button.bmp; sourceTree = "<group>"; };
|
||||
DBEC54D81A1A8145005B1EAB /* controllermap.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; name = controllermap.bmp; path = ../../test/controllermap.bmp; sourceTree = "<group>"; };
|
||||
DB89958318A19B130092407C /* testhotplug.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testhotplug.c; sourceTree = "<group>"; };
|
||||
DBBC552C182831D700F3CA8D /* TestDropFile-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "TestDropFile-Info.plist"; sourceTree = SOURCE_ROOT; };
|
||||
DBEC54D11A1A811D005B1EAB /* controllermap.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = controllermap.c; sourceTree = "<group>"; };
|
||||
DBEC54D61A1A8145005B1EAB /* axis.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; path = axis.bmp; sourceTree = "<group>"; };
|
||||
DBEC54D71A1A8145005B1EAB /* button.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; path = button.bmp; sourceTree = "<group>"; };
|
||||
DBEC54D81A1A8145005B1EAB /* controllermap.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; path = controllermap.bmp; sourceTree = "<group>"; };
|
||||
DBEC54EA1A1A81C3005B1EAB /* controllermap */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = controllermap; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
FA73672219A54A90004122E4 /* CoreVideo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreVideo.framework; path = /System/Library/Frameworks/CoreVideo.framework; sourceTree = "<absolute>"; };
|
||||
/* End PBXFileReference section */
|
||||
@@ -2165,6 +2165,7 @@
|
||||
00794E6309D20839003FC8A1 /* utf8.txt */,
|
||||
);
|
||||
name = Resources;
|
||||
path = ../../test;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
08FB7794FE84155DC02AAC07 /* SDLTest */ = {
|
||||
@@ -2238,6 +2239,7 @@
|
||||
083E4887006D86A17F000001 /* torturethread.c */,
|
||||
);
|
||||
name = Source;
|
||||
path = ../../test;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1AB674ADFE9D54B511CA2CBB /* Products */ = {
|
||||
@@ -2323,6 +2325,7 @@
|
||||
DB166D9216A1D1A500A1396C /* SDL_test_random.c */,
|
||||
);
|
||||
name = SDL_Test;
|
||||
path = ../../src/test;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
@@ -4037,6 +4040,7 @@
|
||||
002A85B21073008E007319AE /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(SRCROOT)/../SDL/build/$(CONFIGURATION)",
|
||||
"$(HOME)/Library/Frameworks",
|
||||
@@ -4163,6 +4167,7 @@
|
||||
002A85D41073009D007319AE /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(SRCROOT)/../SDL/build/$(CONFIGURATION)",
|
||||
"$(HOME)/Library/Frameworks",
|
||||
|
||||
@@ -8,22 +8,21 @@ else {
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 19
|
||||
buildToolsVersion "26.0.1"
|
||||
compileSdkVersion 26
|
||||
defaultConfig {
|
||||
if (buildAsApplication) {
|
||||
applicationId "org.libsdl.app"
|
||||
}
|
||||
minSdkVersion 14
|
||||
targetSdkVersion 19
|
||||
targetSdkVersion 26
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
externalNativeBuild {
|
||||
ndkBuild {
|
||||
arguments "APP_PLATFORM=android-14"
|
||||
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
|
||||
}
|
||||
}
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
@@ -60,9 +59,5 @@ android {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile fileTree(include: ['*.jar'], dir: 'libs')
|
||||
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
|
||||
exclude group: 'com.android.support', module: 'support-annotations'
|
||||
})
|
||||
testCompile 'junit:junit:4.12'
|
||||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
||||
}
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
|
||||
# Uncomment this if you're using STL in your project
|
||||
# See CPLUSPLUS-SUPPORT.html in the NDK documentation for more information
|
||||
# APP_STL := stlport_static
|
||||
# You can find more information here:
|
||||
# https://developer.android.com/ndk/guides/cpp-support
|
||||
# APP_STL := c++_shared
|
||||
|
||||
APP_ABI := armeabi-v7a arm64-v8a x86 x86_64
|
||||
|
||||
|
||||
@@ -8,12 +8,24 @@
|
||||
android:versionName="1.0"
|
||||
android:installLocation="auto">
|
||||
|
||||
<!-- Android 4.0.1 -->
|
||||
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="16" />
|
||||
|
||||
<!-- OpenGL ES 2.0 -->
|
||||
<uses-feature android:glEsVersion="0x00020000" />
|
||||
|
||||
<!-- Touchscreen support -->
|
||||
<uses-feature
|
||||
android:name="android.hardware.touchscreen"
|
||||
android:required="false" />
|
||||
|
||||
<!-- Game controller support -->
|
||||
<uses-feature
|
||||
android:name="android.hardware.gamepad"
|
||||
android:required="false" />
|
||||
|
||||
<!-- External mouse input events -->
|
||||
<uses-feature
|
||||
android:name="android.hardware.type.pc"
|
||||
android:required="false" />
|
||||
|
||||
<!-- Allow writing to external storage -->
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
<!-- Allow access to the vibrator -->
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
package org.libsdl.app;
|
||||
|
||||
interface HIDDevice
|
||||
{
|
||||
public int getId();
|
||||
public int getVendorId();
|
||||
public int getProductId();
|
||||
public String getSerialNumber();
|
||||
public int getVersion();
|
||||
public String getManufacturerName();
|
||||
public String getProductName();
|
||||
public boolean open();
|
||||
public int sendFeatureReport(byte[] report);
|
||||
public int sendOutputReport(byte[] report);
|
||||
public boolean getFeatureReport(byte[] report);
|
||||
public void setFrozen(boolean frozen);
|
||||
public void close();
|
||||
public void shutdown();
|
||||
}
|
||||
@@ -0,0 +1,642 @@
|
||||
package org.libsdl.app;
|
||||
|
||||
import android.content.Context;
|
||||
import android.bluetooth.BluetoothDevice;
|
||||
import android.bluetooth.BluetoothGatt;
|
||||
import android.bluetooth.BluetoothGattCallback;
|
||||
import android.bluetooth.BluetoothGattCharacteristic;
|
||||
import android.bluetooth.BluetoothGattDescriptor;
|
||||
import android.bluetooth.BluetoothManager;
|
||||
import android.bluetooth.BluetoothProfile;
|
||||
import android.bluetooth.BluetoothGattService;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.util.Log;
|
||||
|
||||
//import com.android.internal.util.HexDump;
|
||||
|
||||
import java.lang.Runnable;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.Arrays;
|
||||
import java.util.LinkedList;
|
||||
import java.util.UUID;
|
||||
|
||||
class HIDDeviceBLESteamController extends BluetoothGattCallback implements HIDDevice {
|
||||
|
||||
private static final String TAG = "hidapi";
|
||||
private HIDDeviceManager mManager;
|
||||
private BluetoothDevice mDevice;
|
||||
private int mDeviceId;
|
||||
private BluetoothGatt mGatt;
|
||||
private boolean mIsRegistered = false;
|
||||
private boolean mIsConnected = false;
|
||||
private boolean mIsChromebook = false;
|
||||
private boolean mIsReconnecting = false;
|
||||
private boolean mFrozen = false;
|
||||
private LinkedList<GattOperation> mOperations;
|
||||
GattOperation mCurrentOperation = null;
|
||||
private Handler mHandler;
|
||||
|
||||
private static final int TRANSPORT_AUTO = 0;
|
||||
private static final int TRANSPORT_BREDR = 1;
|
||||
private static final int TRANSPORT_LE = 2;
|
||||
|
||||
private static final int CHROMEBOOK_CONNECTION_CHECK_INTERVAL = 10000;
|
||||
|
||||
static public final UUID steamControllerService = UUID.fromString("100F6C32-1735-4313-B402-38567131E5F3");
|
||||
static public final UUID inputCharacteristic = UUID.fromString("100F6C33-1735-4313-B402-38567131E5F3");
|
||||
static public final UUID reportCharacteristic = UUID.fromString("100F6C34-1735-4313-B402-38567131E5F3");
|
||||
static private final byte[] enterValveMode = new byte[] { (byte)0xC0, (byte)0x87, 0x03, 0x08, 0x07, 0x00 };
|
||||
|
||||
static class GattOperation {
|
||||
private enum Operation {
|
||||
CHR_READ,
|
||||
CHR_WRITE,
|
||||
ENABLE_NOTIFICATION
|
||||
}
|
||||
|
||||
Operation mOp;
|
||||
UUID mUuid;
|
||||
byte[] mValue;
|
||||
BluetoothGatt mGatt;
|
||||
boolean mResult = true;
|
||||
|
||||
private GattOperation(BluetoothGatt gatt, GattOperation.Operation operation, UUID uuid) {
|
||||
mGatt = gatt;
|
||||
mOp = operation;
|
||||
mUuid = uuid;
|
||||
}
|
||||
|
||||
private GattOperation(BluetoothGatt gatt, GattOperation.Operation operation, UUID uuid, byte[] value) {
|
||||
mGatt = gatt;
|
||||
mOp = operation;
|
||||
mUuid = uuid;
|
||||
mValue = value;
|
||||
}
|
||||
|
||||
public void run() {
|
||||
// This is executed in main thread
|
||||
BluetoothGattCharacteristic chr;
|
||||
|
||||
switch (mOp) {
|
||||
case CHR_READ:
|
||||
chr = getCharacteristic(mUuid);
|
||||
//Log.v(TAG, "Reading characteristic " + chr.getUuid());
|
||||
if (!mGatt.readCharacteristic(chr)) {
|
||||
Log.e(TAG, "Unable to read characteristic " + mUuid.toString());
|
||||
mResult = false;
|
||||
break;
|
||||
}
|
||||
mResult = true;
|
||||
break;
|
||||
case CHR_WRITE:
|
||||
chr = getCharacteristic(mUuid);
|
||||
//Log.v(TAG, "Writing characteristic " + chr.getUuid() + " value=" + HexDump.toHexString(value));
|
||||
chr.setValue(mValue);
|
||||
if (!mGatt.writeCharacteristic(chr)) {
|
||||
Log.e(TAG, "Unable to write characteristic " + mUuid.toString());
|
||||
mResult = false;
|
||||
break;
|
||||
}
|
||||
mResult = true;
|
||||
break;
|
||||
case ENABLE_NOTIFICATION:
|
||||
chr = getCharacteristic(mUuid);
|
||||
//Log.v(TAG, "Writing descriptor of " + chr.getUuid());
|
||||
if (chr != null) {
|
||||
BluetoothGattDescriptor cccd = chr.getDescriptor(UUID.fromString("00002902-0000-1000-8000-00805f9b34fb"));
|
||||
if (cccd != null) {
|
||||
int properties = chr.getProperties();
|
||||
byte[] value;
|
||||
if ((properties & BluetoothGattCharacteristic.PROPERTY_NOTIFY) == BluetoothGattCharacteristic.PROPERTY_NOTIFY) {
|
||||
value = BluetoothGattDescriptor.ENABLE_NOTIFICATION_VALUE;
|
||||
} else if ((properties & BluetoothGattCharacteristic.PROPERTY_INDICATE) == BluetoothGattCharacteristic.PROPERTY_INDICATE) {
|
||||
value = BluetoothGattDescriptor.ENABLE_INDICATION_VALUE;
|
||||
} else {
|
||||
Log.e(TAG, "Unable to start notifications on input characteristic");
|
||||
mResult = false;
|
||||
return;
|
||||
}
|
||||
|
||||
mGatt.setCharacteristicNotification(chr, true);
|
||||
cccd.setValue(value);
|
||||
if (!mGatt.writeDescriptor(cccd)) {
|
||||
Log.e(TAG, "Unable to write descriptor " + mUuid.toString());
|
||||
mResult = false;
|
||||
return;
|
||||
}
|
||||
mResult = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public boolean finish() {
|
||||
return mResult;
|
||||
}
|
||||
|
||||
private BluetoothGattCharacteristic getCharacteristic(UUID uuid) {
|
||||
BluetoothGattService valveService = mGatt.getService(steamControllerService);
|
||||
if (valveService == null)
|
||||
return null;
|
||||
return valveService.getCharacteristic(uuid);
|
||||
}
|
||||
|
||||
static public GattOperation readCharacteristic(BluetoothGatt gatt, UUID uuid) {
|
||||
return new GattOperation(gatt, Operation.CHR_READ, uuid);
|
||||
}
|
||||
|
||||
static public GattOperation writeCharacteristic(BluetoothGatt gatt, UUID uuid, byte[] value) {
|
||||
return new GattOperation(gatt, Operation.CHR_WRITE, uuid, value);
|
||||
}
|
||||
|
||||
static public GattOperation enableNotification(BluetoothGatt gatt, UUID uuid) {
|
||||
return new GattOperation(gatt, Operation.ENABLE_NOTIFICATION, uuid);
|
||||
}
|
||||
}
|
||||
|
||||
public HIDDeviceBLESteamController(HIDDeviceManager manager, BluetoothDevice device) {
|
||||
mManager = manager;
|
||||
mDevice = device;
|
||||
mDeviceId = mManager.getDeviceIDForIdentifier(getIdentifier());
|
||||
mIsRegistered = false;
|
||||
mIsChromebook = mManager.getContext().getPackageManager().hasSystemFeature("org.chromium.arc.device_management");
|
||||
mOperations = new LinkedList<GattOperation>();
|
||||
mHandler = new Handler(Looper.getMainLooper());
|
||||
|
||||
mGatt = connectGatt();
|
||||
final HIDDeviceBLESteamController finalThis = this;
|
||||
mHandler.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
finalThis.checkConnectionForChromebookIssue();
|
||||
}
|
||||
}, CHROMEBOOK_CONNECTION_CHECK_INTERVAL);
|
||||
}
|
||||
|
||||
public String getIdentifier() {
|
||||
return String.format("SteamController.%s", mDevice.getAddress());
|
||||
}
|
||||
|
||||
public BluetoothGatt getGatt() {
|
||||
return mGatt;
|
||||
}
|
||||
|
||||
// Because on Chromebooks we show up as a dual-mode device, it will attempt to connect TRANSPORT_AUTO, which will use TRANSPORT_BREDR instead
|
||||
// of TRANSPORT_LE. Let's force ourselves to connect low energy.
|
||||
private BluetoothGatt connectGatt(boolean managed) {
|
||||
try {
|
||||
Method m = mDevice.getClass().getDeclaredMethod("connectGatt", Context.class, boolean.class, BluetoothGattCallback.class, int.class);
|
||||
return (BluetoothGatt) m.invoke(mDevice, mManager.getContext(), managed, this, TRANSPORT_LE);
|
||||
} catch (Exception e) {
|
||||
return mDevice.connectGatt(mManager.getContext(), managed, this);
|
||||
}
|
||||
}
|
||||
|
||||
private BluetoothGatt connectGatt() {
|
||||
return connectGatt(false);
|
||||
}
|
||||
|
||||
protected int getConnectionState() {
|
||||
|
||||
Context context = mManager.getContext();
|
||||
if (context == null) {
|
||||
// We are lacking any context to get our Bluetooth information. We'll just assume disconnected.
|
||||
return BluetoothProfile.STATE_DISCONNECTED;
|
||||
}
|
||||
|
||||
BluetoothManager btManager = (BluetoothManager)context.getSystemService(Context.BLUETOOTH_SERVICE);
|
||||
if (btManager == null) {
|
||||
// This device doesn't support Bluetooth. We should never be here, because how did
|
||||
// we instantiate a device to start with?
|
||||
return BluetoothProfile.STATE_DISCONNECTED;
|
||||
}
|
||||
|
||||
return btManager.getConnectionState(mDevice, BluetoothProfile.GATT);
|
||||
}
|
||||
|
||||
public void reconnect() {
|
||||
|
||||
if (getConnectionState() != BluetoothProfile.STATE_CONNECTED) {
|
||||
mGatt.disconnect();
|
||||
mGatt = connectGatt();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
protected void checkConnectionForChromebookIssue() {
|
||||
if (!mIsChromebook) {
|
||||
// We only do this on Chromebooks, because otherwise it's really annoying to just attempt
|
||||
// over and over.
|
||||
return;
|
||||
}
|
||||
|
||||
int connectionState = getConnectionState();
|
||||
|
||||
switch (connectionState) {
|
||||
case BluetoothProfile.STATE_CONNECTED:
|
||||
if (!mIsConnected) {
|
||||
// We are in the Bad Chromebook Place. We can force a disconnect
|
||||
// to try to recover.
|
||||
Log.v(TAG, "Chromebook: We are in a very bad state; the controller shows as connected in the underlying Bluetooth layer, but we never received a callback. Forcing a reconnect.");
|
||||
mIsReconnecting = true;
|
||||
mGatt.disconnect();
|
||||
mGatt = connectGatt(false);
|
||||
break;
|
||||
}
|
||||
else if (!isRegistered()) {
|
||||
if (mGatt.getServices().size() > 0) {
|
||||
Log.v(TAG, "Chromebook: We are connected to a controller, but never got our registration. Trying to recover.");
|
||||
probeService(this);
|
||||
}
|
||||
else {
|
||||
Log.v(TAG, "Chromebook: We are connected to a controller, but never discovered services. Trying to recover.");
|
||||
mIsReconnecting = true;
|
||||
mGatt.disconnect();
|
||||
mGatt = connectGatt(false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else {
|
||||
Log.v(TAG, "Chromebook: We are connected, and registered. Everything's good!");
|
||||
return;
|
||||
}
|
||||
break;
|
||||
|
||||
case BluetoothProfile.STATE_DISCONNECTED:
|
||||
Log.v(TAG, "Chromebook: We have either been disconnected, or the Chromebook BtGatt.ContextMap bug has bitten us. Attempting a disconnect/reconnect, but we may not be able to recover.");
|
||||
|
||||
mIsReconnecting = true;
|
||||
mGatt.disconnect();
|
||||
mGatt = connectGatt(false);
|
||||
break;
|
||||
|
||||
case BluetoothProfile.STATE_CONNECTING:
|
||||
Log.v(TAG, "Chromebook: We're still trying to connect. Waiting a bit longer.");
|
||||
break;
|
||||
}
|
||||
|
||||
final HIDDeviceBLESteamController finalThis = this;
|
||||
mHandler.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
finalThis.checkConnectionForChromebookIssue();
|
||||
}
|
||||
}, CHROMEBOOK_CONNECTION_CHECK_INTERVAL);
|
||||
}
|
||||
|
||||
private boolean isRegistered() {
|
||||
return mIsRegistered;
|
||||
}
|
||||
|
||||
private void setRegistered() {
|
||||
mIsRegistered = true;
|
||||
}
|
||||
|
||||
private boolean probeService(HIDDeviceBLESteamController controller) {
|
||||
|
||||
if (isRegistered()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!mIsConnected) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Log.v(TAG, "probeService controller=" + controller);
|
||||
|
||||
for (BluetoothGattService service : mGatt.getServices()) {
|
||||
if (service.getUuid().equals(steamControllerService)) {
|
||||
Log.v(TAG, "Found Valve steam controller service " + service.getUuid());
|
||||
|
||||
for (BluetoothGattCharacteristic chr : service.getCharacteristics()) {
|
||||
if (chr.getUuid().equals(inputCharacteristic)) {
|
||||
Log.v(TAG, "Found input characteristic");
|
||||
// Start notifications
|
||||
BluetoothGattDescriptor cccd = chr.getDescriptor(UUID.fromString("00002902-0000-1000-8000-00805f9b34fb"));
|
||||
if (cccd != null) {
|
||||
enableNotification(chr.getUuid());
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if ((mGatt.getServices().size() == 0) && mIsChromebook && !mIsReconnecting) {
|
||||
Log.e(TAG, "Chromebook: Discovered services were empty; this almost certainly means the BtGatt.ContextMap bug has bitten us.");
|
||||
mIsConnected = false;
|
||||
mIsReconnecting = true;
|
||||
mGatt.disconnect();
|
||||
mGatt = connectGatt(false);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
private void finishCurrentGattOperation() {
|
||||
GattOperation op = null;
|
||||
synchronized (mOperations) {
|
||||
if (mCurrentOperation != null) {
|
||||
op = mCurrentOperation;
|
||||
mCurrentOperation = null;
|
||||
}
|
||||
}
|
||||
if (op != null) {
|
||||
boolean result = op.finish(); // TODO: Maybe in main thread as well?
|
||||
|
||||
// Our operation failed, let's add it back to the beginning of our queue.
|
||||
if (!result) {
|
||||
mOperations.addFirst(op);
|
||||
}
|
||||
}
|
||||
executeNextGattOperation();
|
||||
}
|
||||
|
||||
private void executeNextGattOperation() {
|
||||
synchronized (mOperations) {
|
||||
if (mCurrentOperation != null)
|
||||
return;
|
||||
|
||||
if (mOperations.isEmpty())
|
||||
return;
|
||||
|
||||
mCurrentOperation = mOperations.removeFirst();
|
||||
}
|
||||
|
||||
// Run in main thread
|
||||
mHandler.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
synchronized (mOperations) {
|
||||
if (mCurrentOperation == null) {
|
||||
Log.e(TAG, "Current operation null in executor?");
|
||||
return;
|
||||
}
|
||||
|
||||
mCurrentOperation.run();
|
||||
// now wait for the GATT callback and when it comes, finish this operation
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void queueGattOperation(GattOperation op) {
|
||||
synchronized (mOperations) {
|
||||
mOperations.add(op);
|
||||
}
|
||||
executeNextGattOperation();
|
||||
}
|
||||
|
||||
private void enableNotification(UUID chrUuid) {
|
||||
GattOperation op = HIDDeviceBLESteamController.GattOperation.enableNotification(mGatt, chrUuid);
|
||||
queueGattOperation(op);
|
||||
}
|
||||
|
||||
public void writeCharacteristic(UUID uuid, byte[] value) {
|
||||
GattOperation op = HIDDeviceBLESteamController.GattOperation.writeCharacteristic(mGatt, uuid, value);
|
||||
queueGattOperation(op);
|
||||
}
|
||||
|
||||
public void readCharacteristic(UUID uuid) {
|
||||
GattOperation op = HIDDeviceBLESteamController.GattOperation.readCharacteristic(mGatt, uuid);
|
||||
queueGattOperation(op);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
////////////// BluetoothGattCallback overridden methods
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
public void onConnectionStateChange(BluetoothGatt g, int status, int newState) {
|
||||
//Log.v(TAG, "onConnectionStateChange status=" + status + " newState=" + newState);
|
||||
mIsReconnecting = false;
|
||||
if (newState == 2) {
|
||||
mIsConnected = true;
|
||||
// Run directly, without GattOperation
|
||||
if (!isRegistered()) {
|
||||
mHandler.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
mGatt.discoverServices();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
else if (newState == 0) {
|
||||
mIsConnected = false;
|
||||
}
|
||||
|
||||
// Disconnection is handled in SteamLink using the ACTION_ACL_DISCONNECTED Intent.
|
||||
}
|
||||
|
||||
public void onServicesDiscovered(BluetoothGatt gatt, int status) {
|
||||
//Log.v(TAG, "onServicesDiscovered status=" + status);
|
||||
if (status == 0) {
|
||||
if (gatt.getServices().size() == 0) {
|
||||
Log.v(TAG, "onServicesDiscovered returned zero services; something has gone horribly wrong down in Android's Bluetooth stack.");
|
||||
mIsReconnecting = true;
|
||||
mIsConnected = false;
|
||||
gatt.disconnect();
|
||||
mGatt = connectGatt(false);
|
||||
}
|
||||
else {
|
||||
probeService(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void onCharacteristicRead(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic, int status) {
|
||||
//Log.v(TAG, "onCharacteristicRead status=" + status + " uuid=" + characteristic.getUuid());
|
||||
|
||||
if (characteristic.getUuid().equals(reportCharacteristic) && !mFrozen) {
|
||||
mManager.HIDDeviceFeatureReport(getId(), characteristic.getValue());
|
||||
}
|
||||
|
||||
finishCurrentGattOperation();
|
||||
}
|
||||
|
||||
public void onCharacteristicWrite(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic, int status) {
|
||||
//Log.v(TAG, "onCharacteristicWrite status=" + status + " uuid=" + characteristic.getUuid());
|
||||
|
||||
if (characteristic.getUuid().equals(reportCharacteristic)) {
|
||||
// Only register controller with the native side once it has been fully configured
|
||||
if (!isRegistered()) {
|
||||
Log.v(TAG, "Registering Steam Controller with ID: " + getId());
|
||||
mManager.HIDDeviceConnected(getId(), getIdentifier(), getVendorId(), getProductId(), getSerialNumber(), getVersion(), getManufacturerName(), getProductName(), 0);
|
||||
setRegistered();
|
||||
}
|
||||
}
|
||||
|
||||
finishCurrentGattOperation();
|
||||
}
|
||||
|
||||
public void onCharacteristicChanged(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic) {
|
||||
// Enable this for verbose logging of controller input reports
|
||||
//Log.v(TAG, "onCharacteristicChanged uuid=" + characteristic.getUuid() + " data=" + HexDump.dumpHexString(characteristic.getValue()));
|
||||
|
||||
if (characteristic.getUuid().equals(inputCharacteristic) && !mFrozen) {
|
||||
mManager.HIDDeviceInputReport(getId(), characteristic.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
public void onDescriptorRead(BluetoothGatt gatt, BluetoothGattDescriptor descriptor, int status) {
|
||||
//Log.v(TAG, "onDescriptorRead status=" + status);
|
||||
}
|
||||
|
||||
public void onDescriptorWrite(BluetoothGatt gatt, BluetoothGattDescriptor descriptor, int status) {
|
||||
BluetoothGattCharacteristic chr = descriptor.getCharacteristic();
|
||||
//Log.v(TAG, "onDescriptorWrite status=" + status + " uuid=" + chr.getUuid() + " descriptor=" + descriptor.getUuid());
|
||||
|
||||
if (chr.getUuid().equals(inputCharacteristic)) {
|
||||
boolean hasWrittenInputDescriptor = true;
|
||||
BluetoothGattCharacteristic reportChr = chr.getService().getCharacteristic(reportCharacteristic);
|
||||
if (reportChr != null) {
|
||||
Log.v(TAG, "Writing report characteristic to enter valve mode");
|
||||
reportChr.setValue(enterValveMode);
|
||||
gatt.writeCharacteristic(reportChr);
|
||||
}
|
||||
}
|
||||
|
||||
finishCurrentGattOperation();
|
||||
}
|
||||
|
||||
public void onReliableWriteCompleted(BluetoothGatt gatt, int status) {
|
||||
//Log.v(TAG, "onReliableWriteCompleted status=" + status);
|
||||
}
|
||||
|
||||
public void onReadRemoteRssi(BluetoothGatt gatt, int rssi, int status) {
|
||||
//Log.v(TAG, "onReadRemoteRssi status=" + status);
|
||||
}
|
||||
|
||||
public void onMtuChanged(BluetoothGatt gatt, int mtu, int status) {
|
||||
//Log.v(TAG, "onMtuChanged status=" + status);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//////// Public API
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@Override
|
||||
public int getId() {
|
||||
return mDeviceId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getVendorId() {
|
||||
// Valve Corporation
|
||||
final int VALVE_USB_VID = 0x28DE;
|
||||
return VALVE_USB_VID;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getProductId() {
|
||||
// We don't have an easy way to query from the Bluetooth device, but we know what it is
|
||||
final int D0G_BLE2_PID = 0x1106;
|
||||
return D0G_BLE2_PID;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSerialNumber() {
|
||||
// This will be read later via feature report by Steam
|
||||
return "12345";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getVersion() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getManufacturerName() {
|
||||
return "Valve Corporation";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getProductName() {
|
||||
return "Steam Controller";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean open() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int sendFeatureReport(byte[] report) {
|
||||
if (!isRegistered()) {
|
||||
Log.e(TAG, "Attempted sendFeatureReport before Steam Controller is registered!");
|
||||
if (mIsConnected) {
|
||||
probeService(this);
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
// We need to skip the first byte, as that doesn't go over the air
|
||||
byte[] actual_report = Arrays.copyOfRange(report, 1, report.length - 1);
|
||||
//Log.v(TAG, "sendFeatureReport " + HexDump.dumpHexString(actual_report));
|
||||
writeCharacteristic(reportCharacteristic, actual_report);
|
||||
return report.length;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int sendOutputReport(byte[] report) {
|
||||
if (!isRegistered()) {
|
||||
Log.e(TAG, "Attempted sendOutputReport before Steam Controller is registered!");
|
||||
if (mIsConnected) {
|
||||
probeService(this);
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
//Log.v(TAG, "sendFeatureReport " + HexDump.dumpHexString(report));
|
||||
writeCharacteristic(reportCharacteristic, report);
|
||||
return report.length;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getFeatureReport(byte[] report) {
|
||||
if (!isRegistered()) {
|
||||
Log.e(TAG, "Attempted getFeatureReport before Steam Controller is registered!");
|
||||
if (mIsConnected) {
|
||||
probeService(this);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
//Log.v(TAG, "getFeatureReport");
|
||||
readCharacteristic(reportCharacteristic);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void close() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFrozen(boolean frozen) {
|
||||
mFrozen = frozen;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void shutdown() {
|
||||
close();
|
||||
|
||||
BluetoothGatt g = mGatt;
|
||||
if (g != null) {
|
||||
g.disconnect();
|
||||
g.close();
|
||||
mGatt = null;
|
||||
}
|
||||
mManager = null;
|
||||
mIsRegistered = false;
|
||||
mIsConnected = false;
|
||||
mOperations.clear();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,682 @@
|
||||
package org.libsdl.app;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.PendingIntent;
|
||||
import android.bluetooth.BluetoothAdapter;
|
||||
import android.bluetooth.BluetoothDevice;
|
||||
import android.bluetooth.BluetoothManager;
|
||||
import android.bluetooth.BluetoothProfile;
|
||||
import android.util.Log;
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.hardware.usb.*;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class HIDDeviceManager {
|
||||
private static final String TAG = "hidapi";
|
||||
private static final String ACTION_USB_PERMISSION = "org.libsdl.app.USB_PERMISSION";
|
||||
|
||||
private static HIDDeviceManager sManager;
|
||||
private static int sManagerRefCount = 0;
|
||||
|
||||
public static HIDDeviceManager acquire(Context context) {
|
||||
if (sManagerRefCount == 0) {
|
||||
sManager = new HIDDeviceManager(context);
|
||||
}
|
||||
++sManagerRefCount;
|
||||
return sManager;
|
||||
}
|
||||
|
||||
public static void release(HIDDeviceManager manager) {
|
||||
if (manager == sManager) {
|
||||
--sManagerRefCount;
|
||||
if (sManagerRefCount == 0) {
|
||||
sManager.close();
|
||||
sManager = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private Context mContext;
|
||||
private HashMap<Integer, HIDDevice> mDevicesById = new HashMap<Integer, HIDDevice>();
|
||||
private HashMap<UsbDevice, HIDDeviceUSB> mUSBDevices = new HashMap<UsbDevice, HIDDeviceUSB>();
|
||||
private HashMap<BluetoothDevice, HIDDeviceBLESteamController> mBluetoothDevices = new HashMap<BluetoothDevice, HIDDeviceBLESteamController>();
|
||||
private int mNextDeviceId = 0;
|
||||
private SharedPreferences mSharedPreferences = null;
|
||||
private boolean mIsChromebook = false;
|
||||
private UsbManager mUsbManager;
|
||||
private Handler mHandler;
|
||||
private BluetoothManager mBluetoothManager;
|
||||
private List<BluetoothDevice> mLastBluetoothDevices;
|
||||
|
||||
private final BroadcastReceiver mUsbBroadcast = new BroadcastReceiver() {
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
String action = intent.getAction();
|
||||
if (action.equals(UsbManager.ACTION_USB_DEVICE_ATTACHED)) {
|
||||
UsbDevice usbDevice = intent.getParcelableExtra(UsbManager.EXTRA_DEVICE);
|
||||
handleUsbDeviceAttached(usbDevice);
|
||||
} else if (action.equals(UsbManager.ACTION_USB_DEVICE_DETACHED)) {
|
||||
UsbDevice usbDevice = intent.getParcelableExtra(UsbManager.EXTRA_DEVICE);
|
||||
handleUsbDeviceDetached(usbDevice);
|
||||
} else if (action.equals(HIDDeviceManager.ACTION_USB_PERMISSION)) {
|
||||
UsbDevice usbDevice = intent.getParcelableExtra(UsbManager.EXTRA_DEVICE);
|
||||
handleUsbDevicePermission(usbDevice, intent.getBooleanExtra(UsbManager.EXTRA_PERMISSION_GRANTED, false));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
private final BroadcastReceiver mBluetoothBroadcast = new BroadcastReceiver() {
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
String action = intent.getAction();
|
||||
// Bluetooth device was connected. If it was a Steam Controller, handle it
|
||||
if (action.equals(BluetoothDevice.ACTION_ACL_CONNECTED)) {
|
||||
BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
|
||||
Log.d(TAG, "Bluetooth device connected: " + device);
|
||||
|
||||
if (isSteamController(device)) {
|
||||
connectBluetoothDevice(device);
|
||||
}
|
||||
}
|
||||
|
||||
// Bluetooth device was disconnected, remove from controller manager (if any)
|
||||
if (action.equals(BluetoothDevice.ACTION_ACL_DISCONNECTED)) {
|
||||
BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
|
||||
Log.d(TAG, "Bluetooth device disconnected: " + device);
|
||||
|
||||
disconnectBluetoothDevice(device);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
private HIDDeviceManager(final Context context) {
|
||||
mContext = context;
|
||||
|
||||
// Make sure we have the HIDAPI library loaded with the native functions
|
||||
try {
|
||||
SDL.loadLibrary("hidapi");
|
||||
} catch (Throwable e) {
|
||||
Log.w(TAG, "Couldn't load hidapi: " + e.toString());
|
||||
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(context);
|
||||
builder.setCancelable(false);
|
||||
builder.setTitle("SDL HIDAPI Error");
|
||||
builder.setMessage("Please report the following error to the SDL maintainers: " + e.getMessage());
|
||||
builder.setNegativeButton("Quit", new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
try {
|
||||
// If our context is an activity, exit rather than crashing when we can't
|
||||
// call our native functions.
|
||||
Activity activity = (Activity)context;
|
||||
|
||||
activity.finish();
|
||||
}
|
||||
catch (ClassCastException cce) {
|
||||
// Context wasn't an activity, there's nothing we can do. Give up and return.
|
||||
}
|
||||
}
|
||||
});
|
||||
builder.show();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
HIDDeviceRegisterCallback();
|
||||
|
||||
mSharedPreferences = mContext.getSharedPreferences("hidapi", Context.MODE_PRIVATE);
|
||||
mIsChromebook = mContext.getPackageManager().hasSystemFeature("org.chromium.arc.device_management");
|
||||
|
||||
// if (shouldClear) {
|
||||
// SharedPreferences.Editor spedit = mSharedPreferences.edit();
|
||||
// spedit.clear();
|
||||
// spedit.commit();
|
||||
// }
|
||||
// else
|
||||
{
|
||||
mNextDeviceId = mSharedPreferences.getInt("next_device_id", 0);
|
||||
}
|
||||
|
||||
initializeUSB();
|
||||
initializeBluetooth();
|
||||
}
|
||||
|
||||
public Context getContext() {
|
||||
return mContext;
|
||||
}
|
||||
|
||||
public int getDeviceIDForIdentifier(String identifier) {
|
||||
SharedPreferences.Editor spedit = mSharedPreferences.edit();
|
||||
|
||||
int result = mSharedPreferences.getInt(identifier, 0);
|
||||
if (result == 0) {
|
||||
result = mNextDeviceId++;
|
||||
spedit.putInt("next_device_id", mNextDeviceId);
|
||||
}
|
||||
|
||||
spedit.putInt(identifier, result);
|
||||
spedit.commit();
|
||||
return result;
|
||||
}
|
||||
|
||||
private void initializeUSB() {
|
||||
mUsbManager = (UsbManager)mContext.getSystemService(Context.USB_SERVICE);
|
||||
|
||||
/*
|
||||
// Logging
|
||||
for (UsbDevice device : mUsbManager.getDeviceList().values()) {
|
||||
Log.i(TAG,"Path: " + device.getDeviceName());
|
||||
Log.i(TAG,"Manufacturer: " + device.getManufacturerName());
|
||||
Log.i(TAG,"Product: " + device.getProductName());
|
||||
Log.i(TAG,"ID: " + device.getDeviceId());
|
||||
Log.i(TAG,"Class: " + device.getDeviceClass());
|
||||
Log.i(TAG,"Protocol: " + device.getDeviceProtocol());
|
||||
Log.i(TAG,"Vendor ID " + device.getVendorId());
|
||||
Log.i(TAG,"Product ID: " + device.getProductId());
|
||||
Log.i(TAG,"Interface count: " + device.getInterfaceCount());
|
||||
Log.i(TAG,"---------------------------------------");
|
||||
|
||||
// Get interface details
|
||||
for (int index = 0; index < device.getInterfaceCount(); index++) {
|
||||
UsbInterface mUsbInterface = device.getInterface(index);
|
||||
Log.i(TAG," ***** *****");
|
||||
Log.i(TAG," Interface index: " + index);
|
||||
Log.i(TAG," Interface ID: " + mUsbInterface.getId());
|
||||
Log.i(TAG," Interface class: " + mUsbInterface.getInterfaceClass());
|
||||
Log.i(TAG," Interface subclass: " + mUsbInterface.getInterfaceSubclass());
|
||||
Log.i(TAG," Interface protocol: " + mUsbInterface.getInterfaceProtocol());
|
||||
Log.i(TAG," Endpoint count: " + mUsbInterface.getEndpointCount());
|
||||
|
||||
// Get endpoint details
|
||||
for (int epi = 0; epi < mUsbInterface.getEndpointCount(); epi++)
|
||||
{
|
||||
UsbEndpoint mEndpoint = mUsbInterface.getEndpoint(epi);
|
||||
Log.i(TAG," ++++ ++++ ++++");
|
||||
Log.i(TAG," Endpoint index: " + epi);
|
||||
Log.i(TAG," Attributes: " + mEndpoint.getAttributes());
|
||||
Log.i(TAG," Direction: " + mEndpoint.getDirection());
|
||||
Log.i(TAG," Number: " + mEndpoint.getEndpointNumber());
|
||||
Log.i(TAG," Interval: " + mEndpoint.getInterval());
|
||||
Log.i(TAG," Packet size: " + mEndpoint.getMaxPacketSize());
|
||||
Log.i(TAG," Type: " + mEndpoint.getType());
|
||||
}
|
||||
}
|
||||
}
|
||||
Log.i(TAG," No more devices connected.");
|
||||
*/
|
||||
|
||||
// Register for USB broadcasts and permission completions
|
||||
IntentFilter filter = new IntentFilter();
|
||||
filter.addAction(UsbManager.ACTION_USB_DEVICE_ATTACHED);
|
||||
filter.addAction(UsbManager.ACTION_USB_DEVICE_DETACHED);
|
||||
filter.addAction(HIDDeviceManager.ACTION_USB_PERMISSION);
|
||||
mContext.registerReceiver(mUsbBroadcast, filter);
|
||||
|
||||
for (UsbDevice usbDevice : mUsbManager.getDeviceList().values()) {
|
||||
handleUsbDeviceAttached(usbDevice);
|
||||
}
|
||||
}
|
||||
|
||||
UsbManager getUSBManager() {
|
||||
return mUsbManager;
|
||||
}
|
||||
|
||||
private void shutdownUSB() {
|
||||
try {
|
||||
mContext.unregisterReceiver(mUsbBroadcast);
|
||||
} catch (Exception e) {
|
||||
// We may not have registered, that's okay
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isHIDDeviceUSB(UsbDevice usbDevice) {
|
||||
for (int interface_number = 0; interface_number < usbDevice.getInterfaceCount(); ++interface_number) {
|
||||
if (isHIDDeviceInterface(usbDevice, interface_number)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean isHIDDeviceInterface(UsbDevice usbDevice, int interface_number) {
|
||||
UsbInterface usbInterface = usbDevice.getInterface(interface_number);
|
||||
if (usbInterface.getInterfaceClass() == UsbConstants.USB_CLASS_HID) {
|
||||
return true;
|
||||
}
|
||||
if (interface_number == 0) {
|
||||
if (isXbox360Controller(usbDevice, usbInterface) || isXboxOneController(usbDevice, usbInterface)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean isXbox360Controller(UsbDevice usbDevice, UsbInterface usbInterface) {
|
||||
final int XB360_IFACE_SUBCLASS = 93;
|
||||
final int XB360_IFACE_PROTOCOL = 1; // Wired only
|
||||
final int[] SUPPORTED_VENDORS = {
|
||||
0x0079, // GPD Win 2
|
||||
0x044f, // Thrustmaster
|
||||
0x045e, // Microsoft
|
||||
0x046d, // Logitech
|
||||
0x056e, // Elecom
|
||||
0x06a3, // Saitek
|
||||
0x0738, // Mad Catz
|
||||
0x07ff, // Mad Catz
|
||||
0x0e6f, // Unknown
|
||||
0x0f0d, // Hori
|
||||
0x11c9, // Nacon
|
||||
0x12ab, // Unknown
|
||||
0x1430, // RedOctane
|
||||
0x146b, // BigBen
|
||||
0x1532, // Razer Sabertooth
|
||||
0x15e4, // Numark
|
||||
0x162e, // Joytech
|
||||
0x1689, // Razer Onza
|
||||
0x1bad, // Harmonix
|
||||
0x24c6, // PowerA
|
||||
};
|
||||
|
||||
if (usbInterface.getInterfaceClass() == UsbConstants.USB_CLASS_VENDOR_SPEC &&
|
||||
usbInterface.getInterfaceSubclass() == XB360_IFACE_SUBCLASS &&
|
||||
usbInterface.getInterfaceProtocol() == XB360_IFACE_PROTOCOL) {
|
||||
int vendor_id = usbDevice.getVendorId();
|
||||
for (int supportedVid : SUPPORTED_VENDORS) {
|
||||
if (vendor_id == supportedVid) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean isXboxOneController(UsbDevice usbDevice, UsbInterface usbInterface) {
|
||||
final int XB1_IFACE_SUBCLASS = 71;
|
||||
final int XB1_IFACE_PROTOCOL = 208;
|
||||
final int[] SUPPORTED_VENDORS = {
|
||||
0x045e, // Microsoft
|
||||
0x0738, // Mad Catz
|
||||
0x0e6f, // Unknown
|
||||
0x0f0d, // Hori
|
||||
0x1532, // Razer Wildcat
|
||||
0x24c6, // PowerA
|
||||
};
|
||||
|
||||
if (usbInterface.getInterfaceClass() == UsbConstants.USB_CLASS_VENDOR_SPEC &&
|
||||
usbInterface.getInterfaceSubclass() == XB1_IFACE_SUBCLASS &&
|
||||
usbInterface.getInterfaceProtocol() == XB1_IFACE_PROTOCOL) {
|
||||
int vendor_id = usbDevice.getVendorId();
|
||||
for (int supportedVid : SUPPORTED_VENDORS) {
|
||||
if (vendor_id == supportedVid) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private void handleUsbDeviceAttached(UsbDevice usbDevice) {
|
||||
if (isHIDDeviceUSB(usbDevice)) {
|
||||
connectHIDDeviceUSB(usbDevice);
|
||||
}
|
||||
}
|
||||
|
||||
private void handleUsbDeviceDetached(UsbDevice usbDevice) {
|
||||
HIDDeviceUSB device = mUSBDevices.get(usbDevice);
|
||||
if (device == null)
|
||||
return;
|
||||
|
||||
int id = device.getId();
|
||||
mUSBDevices.remove(usbDevice);
|
||||
mDevicesById.remove(id);
|
||||
device.shutdown();
|
||||
HIDDeviceDisconnected(id);
|
||||
}
|
||||
|
||||
private void handleUsbDevicePermission(UsbDevice usbDevice, boolean permission_granted) {
|
||||
HIDDeviceUSB device = mUSBDevices.get(usbDevice);
|
||||
if (device == null)
|
||||
return;
|
||||
|
||||
boolean opened = false;
|
||||
if (permission_granted) {
|
||||
opened = device.open();
|
||||
}
|
||||
HIDDeviceOpenResult(device.getId(), opened);
|
||||
}
|
||||
|
||||
private void connectHIDDeviceUSB(UsbDevice usbDevice) {
|
||||
synchronized (this) {
|
||||
for (int interface_number = 0; interface_number < usbDevice.getInterfaceCount(); interface_number++) {
|
||||
if (isHIDDeviceInterface(usbDevice, interface_number)) {
|
||||
HIDDeviceUSB device = new HIDDeviceUSB(this, usbDevice, interface_number);
|
||||
int id = device.getId();
|
||||
mUSBDevices.put(usbDevice, device);
|
||||
mDevicesById.put(id, device);
|
||||
HIDDeviceConnected(id, device.getIdentifier(), device.getVendorId(), device.getProductId(), device.getSerialNumber(), device.getVersion(), device.getManufacturerName(), device.getProductName(), interface_number);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void initializeBluetooth() {
|
||||
Log.d(TAG, "Initializing Bluetooth");
|
||||
|
||||
if (mContext.getPackageManager().checkPermission(android.Manifest.permission.BLUETOOTH, mContext.getPackageName()) != PackageManager.PERMISSION_GRANTED) {
|
||||
Log.d(TAG, "Couldn't initialize Bluetooth, missing android.permission.BLUETOOTH");
|
||||
return;
|
||||
}
|
||||
|
||||
// Find bonded bluetooth controllers and create SteamControllers for them
|
||||
mBluetoothManager = (BluetoothManager)mContext.getSystemService(Context.BLUETOOTH_SERVICE);
|
||||
if (mBluetoothManager == null) {
|
||||
// This device doesn't support Bluetooth.
|
||||
return;
|
||||
}
|
||||
|
||||
BluetoothAdapter btAdapter = mBluetoothManager.getAdapter();
|
||||
if (btAdapter == null) {
|
||||
// This device has Bluetooth support in the codebase, but has no available adapters.
|
||||
return;
|
||||
}
|
||||
|
||||
// Get our bonded devices.
|
||||
for (BluetoothDevice device : btAdapter.getBondedDevices()) {
|
||||
|
||||
Log.d(TAG, "Bluetooth device available: " + device);
|
||||
if (isSteamController(device)) {
|
||||
connectBluetoothDevice(device);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// NOTE: These don't work on Chromebooks, to my undying dismay.
|
||||
IntentFilter filter = new IntentFilter();
|
||||
filter.addAction(BluetoothDevice.ACTION_ACL_CONNECTED);
|
||||
filter.addAction(BluetoothDevice.ACTION_ACL_DISCONNECTED);
|
||||
mContext.registerReceiver(mBluetoothBroadcast, filter);
|
||||
|
||||
if (mIsChromebook) {
|
||||
mHandler = new Handler(Looper.getMainLooper());
|
||||
mLastBluetoothDevices = new ArrayList<>();
|
||||
|
||||
// final HIDDeviceManager finalThis = this;
|
||||
// mHandler.postDelayed(new Runnable() {
|
||||
// @Override
|
||||
// public void run() {
|
||||
// finalThis.chromebookConnectionHandler();
|
||||
// }
|
||||
// }, 5000);
|
||||
}
|
||||
}
|
||||
|
||||
private void shutdownBluetooth() {
|
||||
try {
|
||||
mContext.unregisterReceiver(mBluetoothBroadcast);
|
||||
} catch (Exception e) {
|
||||
// We may not have registered, that's okay
|
||||
}
|
||||
}
|
||||
|
||||
// Chromebooks do not pass along ACTION_ACL_CONNECTED / ACTION_ACL_DISCONNECTED properly.
|
||||
// This function provides a sort of dummy version of that, watching for changes in the
|
||||
// connected devices and attempting to add controllers as things change.
|
||||
public void chromebookConnectionHandler() {
|
||||
if (!mIsChromebook) {
|
||||
return;
|
||||
}
|
||||
|
||||
ArrayList<BluetoothDevice> disconnected = new ArrayList<>();
|
||||
ArrayList<BluetoothDevice> connected = new ArrayList<>();
|
||||
|
||||
List<BluetoothDevice> currentConnected = mBluetoothManager.getConnectedDevices(BluetoothProfile.GATT);
|
||||
|
||||
for (BluetoothDevice bluetoothDevice : currentConnected) {
|
||||
if (!mLastBluetoothDevices.contains(bluetoothDevice)) {
|
||||
connected.add(bluetoothDevice);
|
||||
}
|
||||
}
|
||||
for (BluetoothDevice bluetoothDevice : mLastBluetoothDevices) {
|
||||
if (!currentConnected.contains(bluetoothDevice)) {
|
||||
disconnected.add(bluetoothDevice);
|
||||
}
|
||||
}
|
||||
|
||||
mLastBluetoothDevices = currentConnected;
|
||||
|
||||
for (BluetoothDevice bluetoothDevice : disconnected) {
|
||||
disconnectBluetoothDevice(bluetoothDevice);
|
||||
}
|
||||
for (BluetoothDevice bluetoothDevice : connected) {
|
||||
connectBluetoothDevice(bluetoothDevice);
|
||||
}
|
||||
|
||||
final HIDDeviceManager finalThis = this;
|
||||
mHandler.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
finalThis.chromebookConnectionHandler();
|
||||
}
|
||||
}, 10000);
|
||||
}
|
||||
|
||||
public boolean connectBluetoothDevice(BluetoothDevice bluetoothDevice) {
|
||||
Log.v(TAG, "connectBluetoothDevice device=" + bluetoothDevice);
|
||||
synchronized (this) {
|
||||
if (mBluetoothDevices.containsKey(bluetoothDevice)) {
|
||||
Log.v(TAG, "Steam controller with address " + bluetoothDevice + " already exists, attempting reconnect");
|
||||
|
||||
HIDDeviceBLESteamController device = mBluetoothDevices.get(bluetoothDevice);
|
||||
device.reconnect();
|
||||
|
||||
return false;
|
||||
}
|
||||
HIDDeviceBLESteamController device = new HIDDeviceBLESteamController(this, bluetoothDevice);
|
||||
int id = device.getId();
|
||||
mBluetoothDevices.put(bluetoothDevice, device);
|
||||
mDevicesById.put(id, device);
|
||||
|
||||
// The Steam Controller will mark itself connected once initialization is complete
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public void disconnectBluetoothDevice(BluetoothDevice bluetoothDevice) {
|
||||
synchronized (this) {
|
||||
HIDDeviceBLESteamController device = mBluetoothDevices.get(bluetoothDevice);
|
||||
if (device == null)
|
||||
return;
|
||||
|
||||
int id = device.getId();
|
||||
mBluetoothDevices.remove(bluetoothDevice);
|
||||
mDevicesById.remove(id);
|
||||
device.shutdown();
|
||||
HIDDeviceDisconnected(id);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isSteamController(BluetoothDevice bluetoothDevice) {
|
||||
// Sanity check. If you pass in a null device, by definition it is never a Steam Controller.
|
||||
if (bluetoothDevice == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// If the device has no local name, we really don't want to try an equality check against it.
|
||||
if (bluetoothDevice.getName() == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return bluetoothDevice.getName().equals("SteamController") && ((bluetoothDevice.getType() & BluetoothDevice.DEVICE_TYPE_LE) != 0);
|
||||
}
|
||||
|
||||
private void close() {
|
||||
shutdownUSB();
|
||||
shutdownBluetooth();
|
||||
synchronized (this) {
|
||||
for (HIDDevice device : mDevicesById.values()) {
|
||||
device.shutdown();
|
||||
}
|
||||
mDevicesById.clear();
|
||||
mBluetoothDevices.clear();
|
||||
HIDDeviceReleaseCallback();
|
||||
}
|
||||
}
|
||||
|
||||
public void setFrozen(boolean frozen) {
|
||||
synchronized (this) {
|
||||
for (HIDDevice device : mDevicesById.values()) {
|
||||
device.setFrozen(frozen);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
private HIDDevice getDevice(int id) {
|
||||
synchronized (this) {
|
||||
HIDDevice result = mDevicesById.get(id);
|
||||
if (result == null) {
|
||||
Log.v(TAG, "No device for id: " + id);
|
||||
Log.v(TAG, "Available devices: " + mDevicesById.keySet());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
////////// JNI interface functions
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
public boolean openDevice(int deviceID) {
|
||||
// Look to see if this is a USB device and we have permission to access it
|
||||
for (HIDDeviceUSB device : mUSBDevices.values()) {
|
||||
if (deviceID == device.getId()) {
|
||||
UsbDevice usbDevice = device.getDevice();
|
||||
if (!mUsbManager.hasPermission(usbDevice)) {
|
||||
HIDDeviceOpenPending(deviceID);
|
||||
try {
|
||||
mUsbManager.requestPermission(usbDevice, PendingIntent.getBroadcast(mContext, 0, new Intent(HIDDeviceManager.ACTION_USB_PERMISSION), 0));
|
||||
} catch (Exception e) {
|
||||
Log.v(TAG, "Couldn't request permission for USB device " + usbDevice);
|
||||
HIDDeviceOpenResult(deviceID, false);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
Log.v(TAG, "openDevice deviceID=" + deviceID);
|
||||
HIDDevice device;
|
||||
device = getDevice(deviceID);
|
||||
if (device == null) {
|
||||
HIDDeviceDisconnected(deviceID);
|
||||
return false;
|
||||
}
|
||||
|
||||
return device.open();
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, "Got exception: " + Log.getStackTraceString(e));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public int sendOutputReport(int deviceID, byte[] report) {
|
||||
try {
|
||||
Log.v(TAG, "sendOutputReport deviceID=" + deviceID + " length=" + report.length);
|
||||
HIDDevice device;
|
||||
device = getDevice(deviceID);
|
||||
if (device == null) {
|
||||
HIDDeviceDisconnected(deviceID);
|
||||
return -1;
|
||||
}
|
||||
|
||||
return device.sendOutputReport(report);
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, "Got exception: " + Log.getStackTraceString(e));
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
public int sendFeatureReport(int deviceID, byte[] report) {
|
||||
try {
|
||||
Log.v(TAG, "sendFeatureReport deviceID=" + deviceID + " length=" + report.length);
|
||||
HIDDevice device;
|
||||
device = getDevice(deviceID);
|
||||
if (device == null) {
|
||||
HIDDeviceDisconnected(deviceID);
|
||||
return -1;
|
||||
}
|
||||
|
||||
return device.sendFeatureReport(report);
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, "Got exception: " + Log.getStackTraceString(e));
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
public boolean getFeatureReport(int deviceID, byte[] report) {
|
||||
try {
|
||||
Log.v(TAG, "getFeatureReport deviceID=" + deviceID);
|
||||
HIDDevice device;
|
||||
device = getDevice(deviceID);
|
||||
if (device == null) {
|
||||
HIDDeviceDisconnected(deviceID);
|
||||
return false;
|
||||
}
|
||||
|
||||
return device.getFeatureReport(report);
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, "Got exception: " + Log.getStackTraceString(e));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public void closeDevice(int deviceID) {
|
||||
try {
|
||||
Log.v(TAG, "closeDevice deviceID=" + deviceID);
|
||||
HIDDevice device;
|
||||
device = getDevice(deviceID);
|
||||
if (device == null) {
|
||||
HIDDeviceDisconnected(deviceID);
|
||||
return;
|
||||
}
|
||||
|
||||
device.close();
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, "Got exception: " + Log.getStackTraceString(e));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/////////////// Native methods
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
private native void HIDDeviceRegisterCallback();
|
||||
private native void HIDDeviceReleaseCallback();
|
||||
|
||||
native void HIDDeviceConnected(int deviceID, String identifier, int vendorId, int productId, String serial_number, int release_number, String manufacturer_string, String product_string, int interface_number);
|
||||
native void HIDDeviceOpenPending(int deviceID);
|
||||
native void HIDDeviceOpenResult(int deviceID, boolean opened);
|
||||
native void HIDDeviceDisconnected(int deviceID);
|
||||
|
||||
native void HIDDeviceInputReport(int deviceID, byte[] report);
|
||||
native void HIDDeviceFeatureReport(int deviceID, byte[] report);
|
||||
}
|
||||
@@ -0,0 +1,307 @@
|
||||
package org.libsdl.app;
|
||||
|
||||
import android.hardware.usb.*;
|
||||
import android.os.Build;
|
||||
import android.util.Log;
|
||||
import java.util.Arrays;
|
||||
|
||||
class HIDDeviceUSB implements HIDDevice {
|
||||
|
||||
private static final String TAG = "hidapi";
|
||||
|
||||
protected HIDDeviceManager mManager;
|
||||
protected UsbDevice mDevice;
|
||||
protected int mInterface;
|
||||
protected int mDeviceId;
|
||||
protected UsbDeviceConnection mConnection;
|
||||
protected UsbEndpoint mInputEndpoint;
|
||||
protected UsbEndpoint mOutputEndpoint;
|
||||
protected InputThread mInputThread;
|
||||
protected boolean mRunning;
|
||||
protected boolean mFrozen;
|
||||
|
||||
public HIDDeviceUSB(HIDDeviceManager manager, UsbDevice usbDevice, int interface_number) {
|
||||
mManager = manager;
|
||||
mDevice = usbDevice;
|
||||
mInterface = interface_number;
|
||||
mDeviceId = manager.getDeviceIDForIdentifier(getIdentifier());
|
||||
mRunning = false;
|
||||
}
|
||||
|
||||
public String getIdentifier() {
|
||||
return String.format("%s/%x/%x", mDevice.getDeviceName(), mDevice.getVendorId(), mDevice.getProductId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getId() {
|
||||
return mDeviceId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getVendorId() {
|
||||
return mDevice.getVendorId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getProductId() {
|
||||
return mDevice.getProductId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSerialNumber() {
|
||||
String result = null;
|
||||
if (Build.VERSION.SDK_INT >= 21) {
|
||||
result = mDevice.getSerialNumber();
|
||||
}
|
||||
if (result == null) {
|
||||
result = "";
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getVersion() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getManufacturerName() {
|
||||
String result = null;
|
||||
if (Build.VERSION.SDK_INT >= 21) {
|
||||
result = mDevice.getManufacturerName();
|
||||
}
|
||||
if (result == null) {
|
||||
result = String.format("%x", getVendorId());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getProductName() {
|
||||
String result = null;
|
||||
if (Build.VERSION.SDK_INT >= 21) {
|
||||
result = mDevice.getProductName();
|
||||
}
|
||||
if (result == null) {
|
||||
result = String.format("%x", getProductId());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public UsbDevice getDevice() {
|
||||
return mDevice;
|
||||
}
|
||||
|
||||
public String getDeviceName() {
|
||||
return getManufacturerName() + " " + getProductName() + "(0x" + String.format("%x", getVendorId()) + "/0x" + String.format("%x", getProductId()) + ")";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean open() {
|
||||
mConnection = mManager.getUSBManager().openDevice(mDevice);
|
||||
if (mConnection == null) {
|
||||
Log.w(TAG, "Unable to open USB device " + getDeviceName());
|
||||
return false;
|
||||
}
|
||||
|
||||
// Force claim all interfaces
|
||||
for (int i = 0; i < mDevice.getInterfaceCount(); i++) {
|
||||
UsbInterface iface = mDevice.getInterface(i);
|
||||
|
||||
if (!mConnection.claimInterface(iface, true)) {
|
||||
Log.w(TAG, "Failed to claim interfaces on USB device " + getDeviceName());
|
||||
close();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Find the endpoints
|
||||
UsbInterface iface = mDevice.getInterface(mInterface);
|
||||
for (int j = 0; j < iface.getEndpointCount(); j++) {
|
||||
UsbEndpoint endpt = iface.getEndpoint(j);
|
||||
switch (endpt.getDirection()) {
|
||||
case UsbConstants.USB_DIR_IN:
|
||||
if (mInputEndpoint == null) {
|
||||
mInputEndpoint = endpt;
|
||||
}
|
||||
break;
|
||||
case UsbConstants.USB_DIR_OUT:
|
||||
if (mOutputEndpoint == null) {
|
||||
mOutputEndpoint = endpt;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Make sure the required endpoints were present
|
||||
if (mInputEndpoint == null || mOutputEndpoint == null) {
|
||||
Log.w(TAG, "Missing required endpoint on USB device " + getDeviceName());
|
||||
close();
|
||||
return false;
|
||||
}
|
||||
|
||||
// Start listening for input
|
||||
mRunning = true;
|
||||
mInputThread = new InputThread();
|
||||
mInputThread.start();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int sendFeatureReport(byte[] report) {
|
||||
int res = -1;
|
||||
int offset = 0;
|
||||
int length = report.length;
|
||||
boolean skipped_report_id = false;
|
||||
byte report_number = report[0];
|
||||
|
||||
if (report_number == 0x0) {
|
||||
++offset;
|
||||
--length;
|
||||
skipped_report_id = true;
|
||||
}
|
||||
|
||||
res = mConnection.controlTransfer(
|
||||
UsbConstants.USB_TYPE_CLASS | 0x01 /*RECIPIENT_INTERFACE*/ | UsbConstants.USB_DIR_OUT,
|
||||
0x09/*HID set_report*/,
|
||||
(3/*HID feature*/ << 8) | report_number,
|
||||
0,
|
||||
report, offset, length,
|
||||
1000/*timeout millis*/);
|
||||
|
||||
if (res < 0) {
|
||||
Log.w(TAG, "sendFeatureReport() returned " + res + " on device " + getDeviceName());
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (skipped_report_id) {
|
||||
++length;
|
||||
}
|
||||
return length;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int sendOutputReport(byte[] report) {
|
||||
int r = mConnection.bulkTransfer(mOutputEndpoint, report, report.length, 1000);
|
||||
if (r != report.length) {
|
||||
Log.w(TAG, "sendOutputReport() returned " + r + " on device " + getDeviceName());
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getFeatureReport(byte[] report) {
|
||||
int res = -1;
|
||||
int offset = 0;
|
||||
int length = report.length;
|
||||
boolean skipped_report_id = false;
|
||||
byte report_number = report[0];
|
||||
|
||||
if (report_number == 0x0) {
|
||||
/* Offset the return buffer by 1, so that the report ID
|
||||
will remain in byte 0. */
|
||||
++offset;
|
||||
--length;
|
||||
skipped_report_id = true;
|
||||
}
|
||||
|
||||
res = mConnection.controlTransfer(
|
||||
UsbConstants.USB_TYPE_CLASS | 0x01 /*RECIPIENT_INTERFACE*/ | UsbConstants.USB_DIR_IN,
|
||||
0x01/*HID get_report*/,
|
||||
(3/*HID feature*/ << 8) | report_number,
|
||||
0,
|
||||
report, offset, length,
|
||||
1000/*timeout millis*/);
|
||||
|
||||
if (res < 0) {
|
||||
Log.w(TAG, "getFeatureReport() returned " + res + " on device " + getDeviceName());
|
||||
return false;
|
||||
}
|
||||
|
||||
if (skipped_report_id) {
|
||||
++res;
|
||||
++length;
|
||||
}
|
||||
|
||||
byte[] data;
|
||||
if (res == length) {
|
||||
data = report;
|
||||
} else {
|
||||
data = Arrays.copyOfRange(report, 0, res);
|
||||
}
|
||||
mManager.HIDDeviceFeatureReport(mDeviceId, data);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void close() {
|
||||
mRunning = false;
|
||||
if (mInputThread != null) {
|
||||
while (mInputThread.isAlive()) {
|
||||
mInputThread.interrupt();
|
||||
try {
|
||||
mInputThread.join();
|
||||
} catch (InterruptedException e) {
|
||||
// Keep trying until we're done
|
||||
}
|
||||
}
|
||||
mInputThread = null;
|
||||
}
|
||||
if (mConnection != null) {
|
||||
for (int i = 0; i < mDevice.getInterfaceCount(); i++) {
|
||||
UsbInterface iface = mDevice.getInterface(i);
|
||||
mConnection.releaseInterface(iface);
|
||||
}
|
||||
mConnection.close();
|
||||
mConnection = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void shutdown() {
|
||||
close();
|
||||
mManager = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFrozen(boolean frozen) {
|
||||
mFrozen = frozen;
|
||||
}
|
||||
|
||||
protected class InputThread extends Thread {
|
||||
@Override
|
||||
public void run() {
|
||||
int packetSize = mInputEndpoint.getMaxPacketSize();
|
||||
byte[] packet = new byte[packetSize];
|
||||
while (mRunning) {
|
||||
int r;
|
||||
try
|
||||
{
|
||||
r = mConnection.bulkTransfer(mInputEndpoint, packet, packetSize, 1000);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.v(TAG, "Exception in UsbDeviceConnection bulktransfer: " + e);
|
||||
break;
|
||||
}
|
||||
if (r < 0) {
|
||||
// Could be a timeout or an I/O error
|
||||
}
|
||||
if (r > 0) {
|
||||
byte[] data;
|
||||
if (r == packetSize) {
|
||||
data = packet;
|
||||
} else {
|
||||
data = Arrays.copyOfRange(packet, 0, r);
|
||||
}
|
||||
|
||||
if (!mFrozen) {
|
||||
mManager.HIDDeviceInputReport(mDeviceId, data);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,8 @@ package org.libsdl.app;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import java.lang.reflect.*;
|
||||
|
||||
/**
|
||||
SDL library initialization
|
||||
*/
|
||||
@@ -33,5 +35,50 @@ public class SDL {
|
||||
return mContext;
|
||||
}
|
||||
|
||||
public static void loadLibrary(String libraryName) throws UnsatisfiedLinkError, SecurityException, NullPointerException {
|
||||
|
||||
if (libraryName == null) {
|
||||
throw new NullPointerException("No library name provided.");
|
||||
}
|
||||
|
||||
try {
|
||||
// Let's see if we have ReLinker available in the project. This is necessary for
|
||||
// some projects that have huge numbers of local libraries bundled, and thus may
|
||||
// trip a bug in Android's native library loader which ReLinker works around. (If
|
||||
// loadLibrary works properly, ReLinker will simply use the normal Android method
|
||||
// internally.)
|
||||
//
|
||||
// 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");
|
||||
|
||||
// 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();
|
||||
|
||||
// Actually load the library!
|
||||
Method loadMethod = relinkInstanceClass.getDeclaredMethod("loadLibrary", contextClass, stringClass, stringClass, relinkListenerClass);
|
||||
loadMethod.invoke(relinkInstance, mContext, libraryName, null, null);
|
||||
}
|
||||
catch (final Throwable e) {
|
||||
// Fall back
|
||||
try {
|
||||
System.loadLibrary(libraryName);
|
||||
}
|
||||
catch (final UnsatisfiedLinkError ule) {
|
||||
throw ule;
|
||||
}
|
||||
catch (final SecurityException se) {
|
||||
throw se;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected static Context mContext;
|
||||
}
|
||||
|
||||
@@ -3,7 +3,9 @@ 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.*;
|
||||
@@ -32,11 +34,34 @@ import android.content.pm.ApplicationInfo;
|
||||
/**
|
||||
SDL Activity
|
||||
*/
|
||||
public class SDLActivity extends Activity {
|
||||
public class SDLActivity extends Activity implements View.OnSystemUiVisibilityChangeListener {
|
||||
private static final String TAG = "SDL";
|
||||
|
||||
public static boolean mIsResumedCalled, mIsSurfaceReady, mHasFocus;
|
||||
|
||||
// Cursor types
|
||||
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;
|
||||
private static final int SDL_SYSTEM_CURSOR_CROSSHAIR = 3;
|
||||
private static final int SDL_SYSTEM_CURSOR_WAITARROW = 4;
|
||||
private static final int SDL_SYSTEM_CURSOR_SIZENWSE = 5;
|
||||
private static final int SDL_SYSTEM_CURSOR_SIZENESW = 6;
|
||||
private static final int SDL_SYSTEM_CURSOR_SIZEWE = 7;
|
||||
private static final int SDL_SYSTEM_CURSOR_SIZENS = 8;
|
||||
private static final int SDL_SYSTEM_CURSOR_SIZEALL = 9;
|
||||
private static final int SDL_SYSTEM_CURSOR_NO = 10;
|
||||
private static final int SDL_SYSTEM_CURSOR_HAND = 11;
|
||||
|
||||
protected static final int SDL_ORIENTATION_UNKNOWN = 0;
|
||||
protected static final int SDL_ORIENTATION_LANDSCAPE = 1;
|
||||
protected static final int SDL_ORIENTATION_LANDSCAPE_FLIPPED = 2;
|
||||
protected static final int SDL_ORIENTATION_PORTRAIT = 3;
|
||||
protected static final int SDL_ORIENTATION_PORTRAIT_FLIPPED = 4;
|
||||
|
||||
protected static int mCurrentOrientation;
|
||||
|
||||
// Handle the state of the native layer
|
||||
public enum NativeState {
|
||||
INIT, RESUMED, PAUSED
|
||||
@@ -61,11 +86,29 @@ public class SDLActivity extends Activity {
|
||||
protected static boolean mScreenKeyboardShown;
|
||||
protected static ViewGroup mLayout;
|
||||
protected static SDLClipboardHandler mClipboardHandler;
|
||||
|
||||
protected static Hashtable<Integer, Object> mCursors;
|
||||
protected static int mLastCursorID;
|
||||
protected static SDLGenericMotionListener_API12 mMotionListener;
|
||||
protected static HIDDeviceManager mHIDDeviceManager;
|
||||
|
||||
// This is what SDL runs in. It invokes SDL_main(), eventually
|
||||
protected static Thread mSDLThread;
|
||||
|
||||
protected static SDLGenericMotionListener_API12 getMotionListener() {
|
||||
if (mMotionListener == null) {
|
||||
if (Build.VERSION.SDK_INT >= 26) {
|
||||
mMotionListener = new SDLGenericMotionListener_API26();
|
||||
} else
|
||||
if (Build.VERSION.SDK_INT >= 24) {
|
||||
mMotionListener = new SDLGenericMotionListener_API24();
|
||||
} else {
|
||||
mMotionListener = new SDLGenericMotionListener_API12();
|
||||
}
|
||||
}
|
||||
|
||||
return mMotionListener;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns the name of the shared object with the application entry point
|
||||
* It can be overridden by derived classes.
|
||||
@@ -78,7 +121,7 @@ public class SDLActivity extends Activity {
|
||||
} else {
|
||||
library = "libmain.so";
|
||||
}
|
||||
return library;
|
||||
return getContext().getApplicationInfo().nativeLibraryDir + "/" + library;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -111,7 +154,7 @@ public class SDLActivity extends Activity {
|
||||
// Load the .so
|
||||
public void loadLibraries() {
|
||||
for (String lib : getLibraries()) {
|
||||
System.loadLibrary(lib);
|
||||
SDL.loadLibrary(lib);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -133,6 +176,8 @@ public class SDLActivity extends Activity {
|
||||
mTextEdit = null;
|
||||
mLayout = null;
|
||||
mClipboardHandler = null;
|
||||
mCursors = new Hashtable<Integer, Object>();
|
||||
mLastCursorID = 0;
|
||||
mSDLThread = null;
|
||||
mExitCalledFromJava = false;
|
||||
mBrokenLibraries = false;
|
||||
@@ -146,8 +191,8 @@ public class SDLActivity extends Activity {
|
||||
// Setup
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
Log.v(TAG, "Device: " + android.os.Build.DEVICE);
|
||||
Log.v(TAG, "Model: " + android.os.Build.MODEL);
|
||||
Log.v(TAG, "Device: " + Build.DEVICE);
|
||||
Log.v(TAG, "Model: " + Build.MODEL);
|
||||
Log.v(TAG, "onCreate()");
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
@@ -205,16 +250,24 @@ public class SDLActivity extends Activity {
|
||||
mClipboardHandler = new SDLClipboardHandler_Old();
|
||||
}
|
||||
|
||||
mHIDDeviceManager = HIDDeviceManager.acquire(this);
|
||||
|
||||
// Set up the surface
|
||||
mSurface = new SDLSurface(getApplication());
|
||||
|
||||
mLayout = new RelativeLayout(this);
|
||||
mLayout.addView(mSurface);
|
||||
|
||||
// Get our current screen orientation and pass it down.
|
||||
mCurrentOrientation = SDLActivity.getCurrentOrientation();
|
||||
SDLActivity.onNativeOrientationChanged(mCurrentOrientation);
|
||||
|
||||
setContentView(mLayout);
|
||||
|
||||
setWindowStyle(false);
|
||||
|
||||
getWindow().getDecorView().setOnSystemUiVisibilityChangeListener(this);
|
||||
|
||||
// Get filename from "Open with" of another application
|
||||
Intent intent = getIntent();
|
||||
if (intent != null && intent.getData() != null) {
|
||||
@@ -238,6 +291,10 @@ public class SDLActivity extends Activity {
|
||||
return;
|
||||
}
|
||||
|
||||
if (mHIDDeviceManager != null) {
|
||||
mHIDDeviceManager.setFrozen(true);
|
||||
}
|
||||
|
||||
SDLActivity.handleNativeState();
|
||||
}
|
||||
|
||||
@@ -252,9 +309,39 @@ public class SDLActivity extends Activity {
|
||||
return;
|
||||
}
|
||||
|
||||
if (mHIDDeviceManager != null) {
|
||||
mHIDDeviceManager.setFrozen(false);
|
||||
}
|
||||
|
||||
SDLActivity.handleNativeState();
|
||||
}
|
||||
|
||||
public static int getCurrentOrientation() {
|
||||
final Context context = SDLActivity.getContext();
|
||||
final Display display = ((WindowManager) context.getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay();
|
||||
|
||||
int result = SDL_ORIENTATION_UNKNOWN;
|
||||
|
||||
switch (display.getRotation()) {
|
||||
case Surface.ROTATION_0:
|
||||
result = SDL_ORIENTATION_PORTRAIT;
|
||||
break;
|
||||
|
||||
case Surface.ROTATION_90:
|
||||
result = SDL_ORIENTATION_LANDSCAPE;
|
||||
break;
|
||||
|
||||
case Surface.ROTATION_180:
|
||||
result = SDL_ORIENTATION_PORTRAIT_FLIPPED;
|
||||
break;
|
||||
|
||||
case Surface.ROTATION_270:
|
||||
result = SDL_ORIENTATION_LANDSCAPE_FLIPPED;
|
||||
break;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onWindowFocusChanged(boolean hasFocus) {
|
||||
@@ -268,6 +355,7 @@ public class SDLActivity extends Activity {
|
||||
SDLActivity.mHasFocus = hasFocus;
|
||||
if (hasFocus) {
|
||||
mNextNativeState = NativeState.RESUMED;
|
||||
SDLActivity.getMotionListener().reclaimRelativeMouseModeIfNeeded();
|
||||
} else {
|
||||
mNextNativeState = NativeState.PAUSED;
|
||||
}
|
||||
@@ -291,6 +379,11 @@ public class SDLActivity extends Activity {
|
||||
protected void onDestroy() {
|
||||
Log.v(TAG, "onDestroy()");
|
||||
|
||||
if (mHIDDeviceManager != null) {
|
||||
HIDDeviceManager.release(mHIDDeviceManager);
|
||||
mHIDDeviceManager = null;
|
||||
}
|
||||
|
||||
if (SDLActivity.mBrokenLibraries) {
|
||||
super.onDestroy();
|
||||
// Reset everything in case the user re opens the app
|
||||
@@ -323,6 +416,43 @@ public class SDLActivity extends Activity {
|
||||
SDLActivity.initialize();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
// Check if we want to block the back button in case of mouse right click.
|
||||
//
|
||||
// If we do, the normal hardware back button will no longer work and people have to use home,
|
||||
// but the mouse right click will work.
|
||||
//
|
||||
String trapBack = SDLActivity.nativeGetHint("SDL_ANDROID_TRAP_BACK_BUTTON");
|
||||
if ((trapBack != null) && trapBack.equals("1")) {
|
||||
// Exit and let the mouse handler handle this button (if appropriate)
|
||||
return;
|
||||
}
|
||||
|
||||
// Default system back button behavior.
|
||||
super.onBackPressed();
|
||||
}
|
||||
|
||||
// Called by JNI from SDL.
|
||||
public static void manualBackButton() {
|
||||
mSingleton.pressBackButton();
|
||||
}
|
||||
|
||||
// Used to get us onto the activity's main thread
|
||||
public void pressBackButton() {
|
||||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
SDLActivity.this.superOnBackPressed();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Used to access the system back behavior.
|
||||
public void superOnBackPressed() {
|
||||
super.onBackPressed();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean dispatchKeyEvent(KeyEvent event) {
|
||||
|
||||
@@ -390,7 +520,9 @@ public class SDLActivity extends Activity {
|
||||
/* The native thread has finished */
|
||||
public static void handleNativeExit() {
|
||||
SDLActivity.mSDLThread = null;
|
||||
mSingleton.finish();
|
||||
if (mSingleton != null) {
|
||||
mSingleton.finish();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -402,6 +534,8 @@ public class SDLActivity extends Activity {
|
||||
|
||||
protected static final int COMMAND_USER = 0x8000;
|
||||
|
||||
protected static boolean mFullscreenModeActive;
|
||||
|
||||
/**
|
||||
* This method is called by SDL if SDL did not handle a message itself.
|
||||
* This happens if a received message contains an unsupported command.
|
||||
@@ -440,30 +574,31 @@ public class SDLActivity extends Activity {
|
||||
// This version of Android doesn't support the immersive fullscreen mode
|
||||
break;
|
||||
}
|
||||
/* This needs more testing, per bug 4096 - Enabling fullscreen on Android causes the app to toggle fullscreen mode continuously in a loop
|
||||
***
|
||||
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_LAYOUT_STABLE |
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION |
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN |
|
||||
int flags = View.SYSTEM_UI_FLAG_FULLSCREEN |
|
||||
View.SYSTEM_UI_FLAG_HIDE_NAVIGATION |
|
||||
View.SYSTEM_UI_FLAG_FULLSCREEN |
|
||||
View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;
|
||||
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;
|
||||
window.getDecorView().setSystemUiVisibility(flags);
|
||||
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");
|
||||
}
|
||||
***/
|
||||
break;
|
||||
case COMMAND_TEXTEDIT_HIDE:
|
||||
if (mTextEdit != null) {
|
||||
@@ -508,7 +643,61 @@ public class SDLActivity extends Activity {
|
||||
Message msg = commandHandler.obtainMessage();
|
||||
msg.arg1 = command;
|
||||
msg.obj = data;
|
||||
return commandHandler.sendMessage(msg);
|
||||
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.
|
||||
|
||||
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 );
|
||||
|
||||
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) {
|
||||
// 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// C functions we call
|
||||
@@ -519,11 +708,11 @@ public class SDLActivity extends Activity {
|
||||
public static native void nativePause();
|
||||
public static native void nativeResume();
|
||||
public static native void onNativeDropFile(String filename);
|
||||
public static native void onNativeResize(int x, int y, int format, float rate);
|
||||
public static native void onNativeResize(int surfaceWidth, int surfaceHeight, int deviceWidth, int deviceHeight, int format, float rate);
|
||||
public static native void onNativeKeyDown(int keycode);
|
||||
public static native void onNativeKeyUp(int keycode);
|
||||
public static native void onNativeKeyboardFocusLost();
|
||||
public static native void onNativeMouse(int button, int action, float x, float y);
|
||||
public static native void onNativeMouse(int button, int action, float x, float y, boolean relative);
|
||||
public static native void onNativeTouch(int touchDevId, int pointerFingerId,
|
||||
int action, float x,
|
||||
float y, float p);
|
||||
@@ -533,6 +722,7 @@ public class SDLActivity extends Activity {
|
||||
public static native void onNativeSurfaceDestroyed();
|
||||
public static native String nativeGetHint(String name);
|
||||
public static native void nativeSetenv(String name, String value);
|
||||
public static native void onNativeOrientationChanged(int orientation);
|
||||
|
||||
/**
|
||||
* This method is called by SDL using JNI.
|
||||
@@ -602,7 +792,6 @@ public class SDLActivity extends Activity {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This method is called by SDL using JNI.
|
||||
*/
|
||||
@@ -621,6 +810,42 @@ public class SDLActivity extends Activity {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called by SDL using JNI.
|
||||
*/
|
||||
public static boolean supportsRelativeMouse()
|
||||
{
|
||||
// ChromeOS doesn't provide relative mouse motion via the Android 7 APIs
|
||||
if (isChromebook()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// DeX mode in Samsung Experience 9.0 and earlier doesn't support relative mice properly under
|
||||
// Android 7 APIs, and simply returns no data under Android 8 APIs.
|
||||
//
|
||||
// This is fixed in Samsung Experience 9.5, which corresponds to Android 8.1.0, and
|
||||
// thus SDK version 27. If we are in DeX mode and not API 27 or higher, as a result,
|
||||
// we should stick to relative mode.
|
||||
//
|
||||
if ((Build.VERSION.SDK_INT < 27) && isDeXMode()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return SDLActivity.getMotionListener().supportsRelativeMouse();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called by SDL using JNI.
|
||||
*/
|
||||
public static boolean setRelativeMouseEnabled(boolean enabled)
|
||||
{
|
||||
if (enabled && !supportsRelativeMouse()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return SDLActivity.getMotionListener().setRelativeMouseEnabled(enabled);
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called by SDL using JNI.
|
||||
*/
|
||||
@@ -643,7 +868,57 @@ public class SDLActivity extends Activity {
|
||||
*/
|
||||
public static boolean isAndroidTV() {
|
||||
UiModeManager uiModeManager = (UiModeManager) getContext().getSystemService(UI_MODE_SERVICE);
|
||||
return (uiModeManager.getCurrentModeType() == Configuration.UI_MODE_TYPE_TELEVISION);
|
||||
if (uiModeManager.getCurrentModeType() == Configuration.UI_MODE_TYPE_TELEVISION) {
|
||||
return true;
|
||||
}
|
||||
if (Build.MANUFACTURER.equals("MINIX") && Build.MODEL.equals("NEO-U1")) {
|
||||
return true;
|
||||
}
|
||||
if (Build.MANUFACTURER.equals("Amlogic") && Build.MODEL.equals("X96-W")) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called by SDL using JNI.
|
||||
*/
|
||||
public static boolean isTablet() {
|
||||
DisplayMetrics metrics = new DisplayMetrics();
|
||||
Activity activity = (Activity)getContext();
|
||||
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));
|
||||
|
||||
// If our diagonal size is seven inches or greater, we consider ourselves a tablet.
|
||||
return (dDiagonal >= 7.0);
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called by SDL using JNI.
|
||||
*/
|
||||
public static boolean isChromebook() {
|
||||
return getContext().getPackageManager().hasSystemFeature("org.chromium.arc.device_management");
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called by SDL using JNI.
|
||||
*/
|
||||
public static boolean isDeXMode() {
|
||||
if (Build.VERSION.SDK_INT < 24) {
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
final Configuration config = getContext().getResources().getConfiguration();
|
||||
final Class configClass = config.getClass();
|
||||
return configClass.getField("SEM_DESKTOP_MODE_ENABLED").getInt(configClass)
|
||||
== configClass.getField("semDesktopModeEnabled").getInt(config);
|
||||
} catch(Exception ignored) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -680,6 +955,12 @@ public class SDLActivity extends Activity {
|
||||
return false;
|
||||
}
|
||||
|
||||
// This method is called by SDLControllerManager's API 26 Generic Motion Handler.
|
||||
public static View getContentView()
|
||||
{
|
||||
return mSingleton.mLayout;
|
||||
}
|
||||
|
||||
static class ShowTextInputTask implements Runnable {
|
||||
/*
|
||||
* This is used to regulate the pan&scan method to have some offset from
|
||||
@@ -1045,13 +1326,39 @@ public class SDLActivity extends Activity {
|
||||
return dialog;
|
||||
}
|
||||
|
||||
private final Runnable rehideSystemUi = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
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);
|
||||
}
|
||||
};
|
||||
|
||||
public void onSystemUiVisibilityChange(int visibility) {
|
||||
if (SDLActivity.mFullscreenModeActive && (visibility & View.SYSTEM_UI_FLAG_FULLSCREEN) == 0 || (visibility & View.SYSTEM_UI_FLAG_HIDE_NAVIGATION) == 0) {
|
||||
|
||||
Handler handler = getWindow().getDecorView().getHandler();
|
||||
if (handler != null) {
|
||||
handler.removeCallbacks(rehideSystemUi); // Prevent a hide loop.
|
||||
handler.postDelayed(rehideSystemUi, 2000);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called by SDL using JNI.
|
||||
*/
|
||||
public static boolean clipboardHasText() {
|
||||
return mClipboardHandler.clipboardHasText();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This method is called by SDL using JNI.
|
||||
*/
|
||||
@@ -1065,6 +1372,95 @@ public class SDLActivity extends Activity {
|
||||
public static void clipboardSetText(String string) {
|
||||
mClipboardHandler.clipboardSetText(string);
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called by SDL using JNI.
|
||||
*/
|
||||
public static int createCustomCursor(int[] colors, int width, int height, int hotSpotX, int hotSpotY) {
|
||||
Bitmap bitmap = Bitmap.createBitmap(colors, width, height, Bitmap.Config.ARGB_8888);
|
||||
++mLastCursorID;
|
||||
// This requires API 24, so use reflection to implement this
|
||||
try {
|
||||
Class PointerIconClass = Class.forName("android.view.PointerIcon");
|
||||
Class[] arg_types = new Class[] { Bitmap.class, float.class, float.class };
|
||||
Method create = PointerIconClass.getMethod("create", arg_types);
|
||||
mCursors.put(mLastCursorID, create.invoke(null, bitmap, hotSpotX, hotSpotY));
|
||||
} catch (Exception e) {
|
||||
return 0;
|
||||
}
|
||||
return mLastCursorID;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called by SDL using JNI.
|
||||
*/
|
||||
public static boolean setCustomCursor(int cursorID) {
|
||||
// This requires API 24, so use reflection to implement this
|
||||
try {
|
||||
Class PointerIconClass = Class.forName("android.view.PointerIcon");
|
||||
Method setPointerIcon = SDLSurface.class.getMethod("setPointerIcon", PointerIconClass);
|
||||
setPointerIcon.invoke(mSurface, mCursors.get(cursorID));
|
||||
} catch (Exception e) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called by SDL using JNI.
|
||||
*/
|
||||
public static boolean setSystemCursor(int cursorID) {
|
||||
int cursor_type = 0; //PointerIcon.TYPE_NULL;
|
||||
switch (cursorID) {
|
||||
case SDL_SYSTEM_CURSOR_ARROW:
|
||||
cursor_type = 1000; //PointerIcon.TYPE_ARROW;
|
||||
break;
|
||||
case SDL_SYSTEM_CURSOR_IBEAM:
|
||||
cursor_type = 1008; //PointerIcon.TYPE_TEXT;
|
||||
break;
|
||||
case SDL_SYSTEM_CURSOR_WAIT:
|
||||
cursor_type = 1004; //PointerIcon.TYPE_WAIT;
|
||||
break;
|
||||
case SDL_SYSTEM_CURSOR_CROSSHAIR:
|
||||
cursor_type = 1007; //PointerIcon.TYPE_CROSSHAIR;
|
||||
break;
|
||||
case SDL_SYSTEM_CURSOR_WAITARROW:
|
||||
cursor_type = 1004; //PointerIcon.TYPE_WAIT;
|
||||
break;
|
||||
case SDL_SYSTEM_CURSOR_SIZENWSE:
|
||||
cursor_type = 1017; //PointerIcon.TYPE_TOP_LEFT_DIAGONAL_DOUBLE_ARROW;
|
||||
break;
|
||||
case SDL_SYSTEM_CURSOR_SIZENESW:
|
||||
cursor_type = 1016; //PointerIcon.TYPE_TOP_RIGHT_DIAGONAL_DOUBLE_ARROW;
|
||||
break;
|
||||
case SDL_SYSTEM_CURSOR_SIZEWE:
|
||||
cursor_type = 1014; //PointerIcon.TYPE_HORIZONTAL_DOUBLE_ARROW;
|
||||
break;
|
||||
case SDL_SYSTEM_CURSOR_SIZENS:
|
||||
cursor_type = 1015; //PointerIcon.TYPE_VERTICAL_DOUBLE_ARROW;
|
||||
break;
|
||||
case SDL_SYSTEM_CURSOR_SIZEALL:
|
||||
cursor_type = 1020; //PointerIcon.TYPE_GRAB;
|
||||
break;
|
||||
case SDL_SYSTEM_CURSOR_NO:
|
||||
cursor_type = 1012; //PointerIcon.TYPE_NO_DROP;
|
||||
break;
|
||||
case SDL_SYSTEM_CURSOR_HAND:
|
||||
cursor_type = 1002; //PointerIcon.TYPE_HAND;
|
||||
break;
|
||||
}
|
||||
// This requires API 24, so use reflection to implement this
|
||||
try {
|
||||
Class PointerIconClass = Class.forName("android.view.PointerIcon");
|
||||
Class[] arg_types = new Class[] { Context.class, int.class };
|
||||
Method getSystemIcon = PointerIconClass.getMethod("getSystemIcon", arg_types);
|
||||
Method setPointerIcon = SDLSurface.class.getMethod("setPointerIcon", PointerIconClass);
|
||||
setPointerIcon.invoke(mSurface, getSystemIcon.invoke(null, SDL.getContext(), cursor_type));
|
||||
} catch (Exception e) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1122,7 +1518,7 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
|
||||
mSensorManager = (SensorManager)context.getSystemService(Context.SENSOR_SERVICE);
|
||||
|
||||
if (Build.VERSION.SDK_INT >= 12) {
|
||||
setOnGenericMotionListener(new SDLGenericMotionListener_API12());
|
||||
setOnGenericMotionListener(SDLActivity.getMotionListener());
|
||||
}
|
||||
|
||||
// Some arbitrary defaults to avoid a potential division by zero
|
||||
@@ -1173,6 +1569,10 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
|
||||
int format, int width, int height) {
|
||||
Log.v("SDL", "surfaceChanged()");
|
||||
|
||||
if (SDLActivity.mSingleton == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
int sdlFormat = 0x15151002; // SDL_PIXELFORMAT_RGB565 by default
|
||||
switch (format) {
|
||||
case PixelFormat.A_8:
|
||||
@@ -1220,9 +1620,27 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
|
||||
|
||||
mWidth = width;
|
||||
mHeight = height;
|
||||
SDLActivity.onNativeResize(width, height, sdlFormat, mDisplay.getRefreshRate());
|
||||
Log.v("SDL", "Window size: " + width + "x" + height);
|
||||
int nDeviceWidth = width;
|
||||
int nDeviceHeight = height;
|
||||
try
|
||||
{
|
||||
if (Build.VERSION.SDK_INT >= 17) {
|
||||
android.util.DisplayMetrics realMetrics = new android.util.DisplayMetrics();
|
||||
mDisplay.getRealMetrics( realMetrics );
|
||||
nDeviceWidth = realMetrics.widthPixels;
|
||||
nDeviceHeight = realMetrics.heightPixels;
|
||||
}
|
||||
}
|
||||
catch ( java.lang.Throwable throwable ) {}
|
||||
|
||||
synchronized(SDLActivity.getContext()) {
|
||||
// In case we're waiting on a size change after going fullscreen, send a notification.
|
||||
SDLActivity.getContext().notifyAll();
|
||||
}
|
||||
|
||||
Log.v("SDL", "Window size: " + width + "x" + height);
|
||||
Log.v("SDL", "Device size: " + nDeviceWidth + "x" + nDeviceHeight);
|
||||
SDLActivity.onNativeResize(width, height, nDeviceWidth, nDeviceHeight, sdlFormat, mDisplay.getRefreshRate());
|
||||
|
||||
boolean skip = false;
|
||||
int requestedOrientation = SDLActivity.mSingleton.getRequestedOrientation();
|
||||
@@ -1337,7 +1755,8 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
|
||||
float x,y,p;
|
||||
|
||||
// !!! FIXME: dump this SDK check after 2.0.4 ships and require API14.
|
||||
if (event.getSource() == InputDevice.SOURCE_MOUSE && SDLActivity.mSeparateMouseAndTouch) {
|
||||
// 12290 = Samsung DeX mode desktop mouse
|
||||
if ((event.getSource() == InputDevice.SOURCE_MOUSE || event.getSource() == 12290) && SDLActivity.mSeparateMouseAndTouch) {
|
||||
if (Build.VERSION.SDK_INT < 14) {
|
||||
mouseButton = 1; // all mouse buttons are the left button
|
||||
} else {
|
||||
@@ -1347,7 +1766,14 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
|
||||
mouseButton = 1; // oh well.
|
||||
}
|
||||
}
|
||||
SDLActivity.onNativeMouse(mouseButton, action, event.getX(0), event.getY(0));
|
||||
|
||||
// We need to check if we're in relative mouse mode and get the axis offset rather than the x/y values
|
||||
// if we are. We'll leverage our existing mouse motion listener
|
||||
SDLGenericMotionListener_API12 motionListener = SDLActivity.getMotionListener();
|
||||
x = motionListener.getEventX(event);
|
||||
y = motionListener.getEventY(event);
|
||||
|
||||
SDLActivity.onNativeMouse(mouseButton, action, x, y, motionListener.inRelativeMode());
|
||||
} else {
|
||||
switch(action) {
|
||||
case MotionEvent.ACTION_MOVE:
|
||||
@@ -1432,30 +1858,90 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
|
||||
@Override
|
||||
public void onSensorChanged(SensorEvent event) {
|
||||
if (event.sensor.getType() == Sensor.TYPE_ACCELEROMETER) {
|
||||
|
||||
// Since we may have an orientation set, we won't receive onConfigurationChanged events.
|
||||
// We thus should check here.
|
||||
int newOrientation = SDLActivity.SDL_ORIENTATION_UNKNOWN;
|
||||
|
||||
float x, y;
|
||||
switch (mDisplay.getRotation()) {
|
||||
case Surface.ROTATION_90:
|
||||
x = -event.values[1];
|
||||
y = event.values[0];
|
||||
newOrientation = SDLActivity.SDL_ORIENTATION_LANDSCAPE;
|
||||
break;
|
||||
case Surface.ROTATION_270:
|
||||
x = event.values[1];
|
||||
y = -event.values[0];
|
||||
newOrientation = SDLActivity.SDL_ORIENTATION_LANDSCAPE_FLIPPED;
|
||||
break;
|
||||
case Surface.ROTATION_180:
|
||||
x = -event.values[1];
|
||||
y = -event.values[0];
|
||||
newOrientation = SDLActivity.SDL_ORIENTATION_PORTRAIT_FLIPPED;
|
||||
break;
|
||||
default:
|
||||
x = event.values[0];
|
||||
y = event.values[1];
|
||||
newOrientation = SDLActivity.SDL_ORIENTATION_PORTRAIT;
|
||||
break;
|
||||
}
|
||||
|
||||
if (newOrientation != SDLActivity.mCurrentOrientation) {
|
||||
SDLActivity.mCurrentOrientation = newOrientation;
|
||||
SDLActivity.onNativeOrientationChanged(newOrientation);
|
||||
}
|
||||
|
||||
SDLActivity.onNativeAccel(-x / SensorManager.GRAVITY_EARTH,
|
||||
y / SensorManager.GRAVITY_EARTH,
|
||||
event.values[2] / SensorManager.GRAVITY_EARTH);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// Captured pointer events for API 26.
|
||||
public boolean onCapturedPointerEvent(MotionEvent event)
|
||||
{
|
||||
int action = event.getActionMasked();
|
||||
|
||||
float x, y;
|
||||
switch (action) {
|
||||
case MotionEvent.ACTION_SCROLL:
|
||||
x = event.getAxisValue(MotionEvent.AXIS_HSCROLL, 0);
|
||||
y = event.getAxisValue(MotionEvent.AXIS_VSCROLL, 0);
|
||||
SDLActivity.onNativeMouse(0, action, x, y, false);
|
||||
return true;
|
||||
|
||||
case MotionEvent.ACTION_HOVER_MOVE:
|
||||
case MotionEvent.ACTION_MOVE:
|
||||
x = event.getX(0);
|
||||
y = event.getY(0);
|
||||
SDLActivity.onNativeMouse(0, action, x, y, true);
|
||||
return true;
|
||||
|
||||
case MotionEvent.ACTION_BUTTON_PRESS:
|
||||
case MotionEvent.ACTION_BUTTON_RELEASE:
|
||||
|
||||
// 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) {
|
||||
action = MotionEvent.ACTION_UP;
|
||||
}
|
||||
|
||||
x = event.getX(0);
|
||||
y = event.getY(0);
|
||||
int button = event.getButtonState();
|
||||
|
||||
SDLActivity.onNativeMouse(button, action, x, y, true);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* This is a fake invisible editor view that receives the input and defines the
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package org.libsdl.app;
|
||||
|
||||
import android.media.*;
|
||||
import android.os.Build;
|
||||
import android.util.Log;
|
||||
|
||||
public class SDLAudioManager
|
||||
@@ -17,41 +18,250 @@ public class SDLAudioManager
|
||||
|
||||
// Audio
|
||||
|
||||
/**
|
||||
* This method is called by SDL using JNI.
|
||||
*/
|
||||
public static int audioOpen(int sampleRate, boolean is16Bit, boolean isStereo, int desiredFrames) {
|
||||
int channelConfig = isStereo ? AudioFormat.CHANNEL_CONFIGURATION_STEREO : AudioFormat.CHANNEL_CONFIGURATION_MONO;
|
||||
int audioFormat = is16Bit ? AudioFormat.ENCODING_PCM_16BIT : AudioFormat.ENCODING_PCM_8BIT;
|
||||
int frameSize = (isStereo ? 2 : 1) * (is16Bit ? 2 : 1);
|
||||
protected static String getAudioFormatString(int audioFormat) {
|
||||
switch (audioFormat) {
|
||||
case AudioFormat.ENCODING_PCM_8BIT:
|
||||
return "8-bit";
|
||||
case AudioFormat.ENCODING_PCM_16BIT:
|
||||
return "16-bit";
|
||||
case AudioFormat.ENCODING_PCM_FLOAT:
|
||||
return "float";
|
||||
default:
|
||||
return Integer.toString(audioFormat);
|
||||
}
|
||||
}
|
||||
|
||||
Log.v(TAG, "SDL audio: wanted " + (isStereo ? "stereo" : "mono") + " " + (is16Bit ? "16-bit" : "8-bit") + " " + (sampleRate / 1000f) + "kHz, " + desiredFrames + " frames buffer");
|
||||
protected static int[] open(boolean isCapture, int sampleRate, int audioFormat, int desiredChannels, int desiredFrames) {
|
||||
int channelConfig;
|
||||
int sampleSize;
|
||||
int frameSize;
|
||||
|
||||
Log.v(TAG, "Opening " + (isCapture ? "capture" : "playback") + ", requested " + desiredFrames + " frames of " + desiredChannels + " channel " + getAudioFormatString(audioFormat) + " audio at " + sampleRate + " Hz");
|
||||
|
||||
/* On older devices let's use known good settings */
|
||||
if (Build.VERSION.SDK_INT < 21) {
|
||||
if (desiredChannels > 2) {
|
||||
desiredChannels = 2;
|
||||
}
|
||||
if (sampleRate < 8000) {
|
||||
sampleRate = 8000;
|
||||
} else if (sampleRate > 48000) {
|
||||
sampleRate = 48000;
|
||||
}
|
||||
}
|
||||
|
||||
if (audioFormat == AudioFormat.ENCODING_PCM_FLOAT) {
|
||||
int minSDKVersion = (isCapture ? 23 : 21);
|
||||
if (Build.VERSION.SDK_INT < minSDKVersion) {
|
||||
audioFormat = AudioFormat.ENCODING_PCM_16BIT;
|
||||
}
|
||||
}
|
||||
switch (audioFormat)
|
||||
{
|
||||
case AudioFormat.ENCODING_PCM_8BIT:
|
||||
sampleSize = 1;
|
||||
break;
|
||||
case AudioFormat.ENCODING_PCM_16BIT:
|
||||
sampleSize = 2;
|
||||
break;
|
||||
case AudioFormat.ENCODING_PCM_FLOAT:
|
||||
sampleSize = 4;
|
||||
break;
|
||||
default:
|
||||
Log.v(TAG, "Requested format " + audioFormat + ", getting ENCODING_PCM_16BIT");
|
||||
audioFormat = AudioFormat.ENCODING_PCM_16BIT;
|
||||
sampleSize = 2;
|
||||
break;
|
||||
}
|
||||
|
||||
if (isCapture) {
|
||||
switch (desiredChannels) {
|
||||
case 1:
|
||||
channelConfig = AudioFormat.CHANNEL_IN_MONO;
|
||||
break;
|
||||
case 2:
|
||||
channelConfig = AudioFormat.CHANNEL_IN_STEREO;
|
||||
break;
|
||||
default:
|
||||
Log.v(TAG, "Requested " + desiredChannels + " channels, getting stereo");
|
||||
desiredChannels = 2;
|
||||
channelConfig = AudioFormat.CHANNEL_IN_STEREO;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
switch (desiredChannels) {
|
||||
case 1:
|
||||
channelConfig = AudioFormat.CHANNEL_OUT_MONO;
|
||||
break;
|
||||
case 2:
|
||||
channelConfig = AudioFormat.CHANNEL_OUT_STEREO;
|
||||
break;
|
||||
case 3:
|
||||
channelConfig = AudioFormat.CHANNEL_OUT_STEREO | AudioFormat.CHANNEL_OUT_FRONT_CENTER;
|
||||
break;
|
||||
case 4:
|
||||
channelConfig = AudioFormat.CHANNEL_OUT_QUAD;
|
||||
break;
|
||||
case 5:
|
||||
channelConfig = AudioFormat.CHANNEL_OUT_QUAD | AudioFormat.CHANNEL_OUT_FRONT_CENTER;
|
||||
break;
|
||||
case 6:
|
||||
channelConfig = AudioFormat.CHANNEL_OUT_5POINT1;
|
||||
break;
|
||||
case 7:
|
||||
channelConfig = AudioFormat.CHANNEL_OUT_5POINT1 | AudioFormat.CHANNEL_OUT_BACK_CENTER;
|
||||
break;
|
||||
case 8:
|
||||
if (Build.VERSION.SDK_INT >= 23) {
|
||||
channelConfig = AudioFormat.CHANNEL_OUT_7POINT1_SURROUND;
|
||||
} else {
|
||||
Log.v(TAG, "Requested " + desiredChannels + " channels, getting 5.1 surround");
|
||||
desiredChannels = 6;
|
||||
channelConfig = AudioFormat.CHANNEL_OUT_5POINT1;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
Log.v(TAG, "Requested " + desiredChannels + " channels, getting stereo");
|
||||
desiredChannels = 2;
|
||||
channelConfig = AudioFormat.CHANNEL_OUT_STEREO;
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
Log.v(TAG, "Speaker configuration (and order of channels):");
|
||||
|
||||
if ((channelConfig & 0x00000004) != 0) {
|
||||
Log.v(TAG, " CHANNEL_OUT_FRONT_LEFT");
|
||||
}
|
||||
if ((channelConfig & 0x00000008) != 0) {
|
||||
Log.v(TAG, " CHANNEL_OUT_FRONT_RIGHT");
|
||||
}
|
||||
if ((channelConfig & 0x00000010) != 0) {
|
||||
Log.v(TAG, " CHANNEL_OUT_FRONT_CENTER");
|
||||
}
|
||||
if ((channelConfig & 0x00000020) != 0) {
|
||||
Log.v(TAG, " CHANNEL_OUT_LOW_FREQUENCY");
|
||||
}
|
||||
if ((channelConfig & 0x00000040) != 0) {
|
||||
Log.v(TAG, " CHANNEL_OUT_BACK_LEFT");
|
||||
}
|
||||
if ((channelConfig & 0x00000080) != 0) {
|
||||
Log.v(TAG, " CHANNEL_OUT_BACK_RIGHT");
|
||||
}
|
||||
if ((channelConfig & 0x00000100) != 0) {
|
||||
Log.v(TAG, " CHANNEL_OUT_FRONT_LEFT_OF_CENTER");
|
||||
}
|
||||
if ((channelConfig & 0x00000200) != 0) {
|
||||
Log.v(TAG, " CHANNEL_OUT_FRONT_RIGHT_OF_CENTER");
|
||||
}
|
||||
if ((channelConfig & 0x00000400) != 0) {
|
||||
Log.v(TAG, " CHANNEL_OUT_BACK_CENTER");
|
||||
}
|
||||
if ((channelConfig & 0x00000800) != 0) {
|
||||
Log.v(TAG, " CHANNEL_OUT_SIDE_LEFT");
|
||||
}
|
||||
if ((channelConfig & 0x00001000) != 0) {
|
||||
Log.v(TAG, " CHANNEL_OUT_SIDE_RIGHT");
|
||||
}
|
||||
*/
|
||||
}
|
||||
frameSize = (sampleSize * desiredChannels);
|
||||
|
||||
// Let the user pick a larger buffer if they really want -- but ye
|
||||
// gods they probably shouldn't, the minimums are horrifyingly high
|
||||
// latency already
|
||||
desiredFrames = Math.max(desiredFrames, (AudioTrack.getMinBufferSize(sampleRate, channelConfig, audioFormat) + frameSize - 1) / frameSize);
|
||||
int minBufferSize;
|
||||
if (isCapture) {
|
||||
minBufferSize = AudioRecord.getMinBufferSize(sampleRate, channelConfig, audioFormat);
|
||||
} else {
|
||||
minBufferSize = AudioTrack.getMinBufferSize(sampleRate, channelConfig, audioFormat);
|
||||
}
|
||||
desiredFrames = Math.max(desiredFrames, (minBufferSize + frameSize - 1) / frameSize);
|
||||
|
||||
if (mAudioTrack == null) {
|
||||
mAudioTrack = new AudioTrack(AudioManager.STREAM_MUSIC, sampleRate,
|
||||
channelConfig, audioFormat, desiredFrames * frameSize, AudioTrack.MODE_STREAM);
|
||||
int[] results = new int[4];
|
||||
|
||||
// Instantiating AudioTrack can "succeed" without an exception and the track may still be invalid
|
||||
// Ref: https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/media/java/android/media/AudioTrack.java
|
||||
// Ref: http://developer.android.com/reference/android/media/AudioTrack.html#getState()
|
||||
if (isCapture) {
|
||||
if (mAudioRecord == null) {
|
||||
mAudioRecord = new AudioRecord(MediaRecorder.AudioSource.DEFAULT, sampleRate,
|
||||
channelConfig, audioFormat, desiredFrames * frameSize);
|
||||
|
||||
if (mAudioTrack.getState() != AudioTrack.STATE_INITIALIZED) {
|
||||
Log.e(TAG, "Failed during initialization of Audio Track");
|
||||
mAudioTrack = null;
|
||||
return -1;
|
||||
// see notes about AudioTrack state in audioOpen(), above. Probably also applies here.
|
||||
if (mAudioRecord.getState() != AudioRecord.STATE_INITIALIZED) {
|
||||
Log.e(TAG, "Failed during initialization of AudioRecord");
|
||||
mAudioRecord.release();
|
||||
mAudioRecord = null;
|
||||
return null;
|
||||
}
|
||||
|
||||
mAudioRecord.startRecording();
|
||||
}
|
||||
|
||||
mAudioTrack.play();
|
||||
results[0] = mAudioRecord.getSampleRate();
|
||||
results[1] = mAudioRecord.getAudioFormat();
|
||||
results[2] = mAudioRecord.getChannelCount();
|
||||
results[3] = desiredFrames;
|
||||
|
||||
} else {
|
||||
if (mAudioTrack == null) {
|
||||
mAudioTrack = new AudioTrack(AudioManager.STREAM_MUSIC, sampleRate, channelConfig, audioFormat, desiredFrames * frameSize, AudioTrack.MODE_STREAM);
|
||||
|
||||
// Instantiating AudioTrack can "succeed" without an exception and the track may still be invalid
|
||||
// Ref: https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/media/java/android/media/AudioTrack.java
|
||||
// Ref: http://developer.android.com/reference/android/media/AudioTrack.html#getState()
|
||||
if (mAudioTrack.getState() != AudioTrack.STATE_INITIALIZED) {
|
||||
/* Try again, with safer values */
|
||||
|
||||
Log.e(TAG, "Failed during initialization of Audio Track");
|
||||
mAudioTrack.release();
|
||||
mAudioTrack = null;
|
||||
return null;
|
||||
}
|
||||
|
||||
mAudioTrack.play();
|
||||
}
|
||||
|
||||
results[0] = mAudioTrack.getSampleRate();
|
||||
results[1] = mAudioTrack.getAudioFormat();
|
||||
results[2] = mAudioTrack.getChannelCount();
|
||||
results[3] = desiredFrames;
|
||||
}
|
||||
|
||||
Log.v(TAG, "SDL audio: got " + ((mAudioTrack.getChannelCount() >= 2) ? "stereo" : "mono") + " " + ((mAudioTrack.getAudioFormat() == AudioFormat.ENCODING_PCM_16BIT) ? "16-bit" : "8-bit") + " " + (mAudioTrack.getSampleRate() / 1000f) + "kHz, " + desiredFrames + " frames buffer");
|
||||
Log.v(TAG, "Opening " + (isCapture ? "capture" : "playback") + ", got " + results[3] + " frames of " + results[2] + " channel " + getAudioFormatString(results[1]) + " audio at " + results[0] + " Hz");
|
||||
|
||||
return 0;
|
||||
return results;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called by SDL using JNI.
|
||||
*/
|
||||
public static int[] audioOpen(int sampleRate, int audioFormat, int desiredChannels, int desiredFrames) {
|
||||
return open(false, sampleRate, audioFormat, desiredChannels, desiredFrames);
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called by SDL using JNI.
|
||||
*/
|
||||
public static void audioWriteFloatBuffer(float[] buffer) {
|
||||
if (mAudioTrack == null) {
|
||||
Log.e(TAG, "Attempted to make audio call with uninitialized audio!");
|
||||
return;
|
||||
}
|
||||
|
||||
for (int i = 0; i < buffer.length;) {
|
||||
int result = mAudioTrack.write(buffer, i, buffer.length - i, AudioTrack.WRITE_BLOCKING);
|
||||
if (result > 0) {
|
||||
i += result;
|
||||
} else if (result == 0) {
|
||||
try {
|
||||
Thread.sleep(1);
|
||||
} catch(InterruptedException e) {
|
||||
// Nom nom
|
||||
}
|
||||
} else {
|
||||
Log.w(TAG, "SDL audio: error return from write(float)");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -63,7 +273,7 @@ public class SDLAudioManager
|
||||
return;
|
||||
}
|
||||
|
||||
for (int i = 0; i < buffer.length; ) {
|
||||
for (int i = 0; i < buffer.length;) {
|
||||
int result = mAudioTrack.write(buffer, i, buffer.length - i);
|
||||
if (result > 0) {
|
||||
i += result;
|
||||
@@ -109,53 +319,33 @@ public class SDLAudioManager
|
||||
/**
|
||||
* This method is called by SDL using JNI.
|
||||
*/
|
||||
public static int captureOpen(int sampleRate, boolean is16Bit, boolean isStereo, int desiredFrames) {
|
||||
int channelConfig = isStereo ? AudioFormat.CHANNEL_CONFIGURATION_STEREO : AudioFormat.CHANNEL_CONFIGURATION_MONO;
|
||||
int audioFormat = is16Bit ? AudioFormat.ENCODING_PCM_16BIT : AudioFormat.ENCODING_PCM_8BIT;
|
||||
int frameSize = (isStereo ? 2 : 1) * (is16Bit ? 2 : 1);
|
||||
public static int[] captureOpen(int sampleRate, int audioFormat, int desiredChannels, int desiredFrames) {
|
||||
return open(true, sampleRate, audioFormat, desiredChannels, desiredFrames);
|
||||
}
|
||||
|
||||
Log.v(TAG, "SDL capture: wanted " + (isStereo ? "stereo" : "mono") + " " + (is16Bit ? "16-bit" : "8-bit") + " " + (sampleRate / 1000f) + "kHz, " + desiredFrames + " frames buffer");
|
||||
|
||||
// Let the user pick a larger buffer if they really want -- but ye
|
||||
// gods they probably shouldn't, the minimums are horrifyingly high
|
||||
// latency already
|
||||
desiredFrames = Math.max(desiredFrames, (AudioRecord.getMinBufferSize(sampleRate, channelConfig, audioFormat) + frameSize - 1) / frameSize);
|
||||
|
||||
if (mAudioRecord == null) {
|
||||
mAudioRecord = new AudioRecord(MediaRecorder.AudioSource.DEFAULT, sampleRate,
|
||||
channelConfig, audioFormat, desiredFrames * frameSize);
|
||||
|
||||
// see notes about AudioTrack state in audioOpen(), above. Probably also applies here.
|
||||
if (mAudioRecord.getState() != AudioRecord.STATE_INITIALIZED) {
|
||||
Log.e(TAG, "Failed during initialization of AudioRecord");
|
||||
mAudioRecord.release();
|
||||
mAudioRecord = null;
|
||||
return -1;
|
||||
}
|
||||
|
||||
mAudioRecord.startRecording();
|
||||
}
|
||||
|
||||
Log.v(TAG, "SDL capture: got " + ((mAudioRecord.getChannelCount() >= 2) ? "stereo" : "mono") + " " + ((mAudioRecord.getAudioFormat() == AudioFormat.ENCODING_PCM_16BIT) ? "16-bit" : "8-bit") + " " + (mAudioRecord.getSampleRate() / 1000f) + "kHz, " + desiredFrames + " frames buffer");
|
||||
|
||||
return 0;
|
||||
/** This method is called by SDL using JNI. */
|
||||
public static int captureReadFloatBuffer(float[] buffer, boolean blocking) {
|
||||
return mAudioRecord.read(buffer, 0, buffer.length, blocking ? AudioRecord.READ_BLOCKING : AudioRecord.READ_NON_BLOCKING);
|
||||
}
|
||||
|
||||
/** This method is called by SDL using JNI. */
|
||||
public static int captureReadShortBuffer(short[] buffer, boolean blocking) {
|
||||
// !!! FIXME: this is available in API Level 23. Until then, we always block. :(
|
||||
//return mAudioRecord.read(buffer, 0, buffer.length, blocking ? AudioRecord.READ_BLOCKING : AudioRecord.READ_NON_BLOCKING);
|
||||
return mAudioRecord.read(buffer, 0, buffer.length);
|
||||
if (Build.VERSION.SDK_INT < 23) {
|
||||
return mAudioRecord.read(buffer, 0, buffer.length);
|
||||
} else {
|
||||
return mAudioRecord.read(buffer, 0, buffer.length, blocking ? AudioRecord.READ_BLOCKING : AudioRecord.READ_NON_BLOCKING);
|
||||
}
|
||||
}
|
||||
|
||||
/** This method is called by SDL using JNI. */
|
||||
public static int captureReadByteBuffer(byte[] buffer, boolean blocking) {
|
||||
// !!! FIXME: this is available in API Level 23. Until then, we always block. :(
|
||||
//return mAudioRecord.read(buffer, 0, buffer.length, blocking ? AudioRecord.READ_BLOCKING : AudioRecord.READ_NON_BLOCKING);
|
||||
return mAudioRecord.read(buffer, 0, buffer.length);
|
||||
if (Build.VERSION.SDK_INT < 23) {
|
||||
return mAudioRecord.read(buffer, 0, buffer.length);
|
||||
} else {
|
||||
return mAudioRecord.read(buffer, 0, buffer.length, blocking ? AudioRecord.READ_BLOCKING : AudioRecord.READ_NON_BLOCKING);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/** This method is called by SDL using JNI. */
|
||||
public static void audioClose() {
|
||||
if (mAudioTrack != null) {
|
||||
|
||||
@@ -11,13 +11,14 @@ import android.view.*;
|
||||
import android.util.Log;
|
||||
|
||||
|
||||
public class SDLControllerManager
|
||||
public class SDLControllerManager
|
||||
{
|
||||
|
||||
public static native int nativeSetupJNI();
|
||||
|
||||
public static native int nativeAddJoystick(int device_id, String name, String desc,
|
||||
int is_accelerometer, int nbuttons,
|
||||
int vendor_id, int product_id,
|
||||
boolean is_accelerometer, int button_mask,
|
||||
int naxes, int nhats, int nballs);
|
||||
public static native int nativeRemoveJoystick(int device_id);
|
||||
public static native int nativeAddHaptic(int device_id, String name);
|
||||
@@ -35,21 +36,25 @@ public class SDLControllerManager
|
||||
private static final String TAG = "SDLControllerManager";
|
||||
|
||||
public static void initialize() {
|
||||
mJoystickHandler = null;
|
||||
mHapticHandler = null;
|
||||
|
||||
SDLControllerManager.setup();
|
||||
}
|
||||
|
||||
public static void setup() {
|
||||
if (Build.VERSION.SDK_INT >= 16) {
|
||||
mJoystickHandler = new SDLJoystickHandler_API16();
|
||||
} else if (Build.VERSION.SDK_INT >= 12) {
|
||||
mJoystickHandler = new SDLJoystickHandler_API12();
|
||||
} else {
|
||||
mJoystickHandler = new SDLJoystickHandler();
|
||||
if (mJoystickHandler == null) {
|
||||
if (Build.VERSION.SDK_INT >= 19) {
|
||||
mJoystickHandler = new SDLJoystickHandler_API19();
|
||||
} else if (Build.VERSION.SDK_INT >= 16) {
|
||||
mJoystickHandler = new SDLJoystickHandler_API16();
|
||||
} else if (Build.VERSION.SDK_INT >= 12) {
|
||||
mJoystickHandler = new SDLJoystickHandler_API12();
|
||||
} else {
|
||||
mJoystickHandler = new SDLJoystickHandler();
|
||||
}
|
||||
}
|
||||
|
||||
if (mHapticHandler == null) {
|
||||
if (Build.VERSION.SDK_INT >= 26) {
|
||||
mHapticHandler = new SDLHapticHandler_API26();
|
||||
} else {
|
||||
mHapticHandler = new SDLHapticHandler();
|
||||
}
|
||||
}
|
||||
mHapticHandler = new SDLHapticHandler();
|
||||
}
|
||||
|
||||
// Joystick glue code, just a series of stubs that redirect to the SDLJoystickHandler instance
|
||||
@@ -74,8 +79,16 @@ public class SDLControllerManager
|
||||
/**
|
||||
* This method is called by SDL using JNI.
|
||||
*/
|
||||
public static void hapticRun(int device_id, int length) {
|
||||
mHapticHandler.run(device_id, length);
|
||||
public static void hapticRun(int device_id, float intensity, int length) {
|
||||
mHapticHandler.run(device_id, intensity, length);
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called by SDL using JNI.
|
||||
*/
|
||||
public static void hapticStop(int device_id)
|
||||
{
|
||||
mHapticHandler.stop(device_id);
|
||||
}
|
||||
|
||||
// Check if a given device is considered a possible SDL joystick
|
||||
@@ -141,7 +154,21 @@ class SDLJoystickHandler_API12 extends SDLJoystickHandler {
|
||||
static class RangeComparator implements Comparator<InputDevice.MotionRange> {
|
||||
@Override
|
||||
public int compare(InputDevice.MotionRange arg0, InputDevice.MotionRange arg1) {
|
||||
return arg0.getAxis() - arg1.getAxis();
|
||||
// Some controllers, like the Moga Pro 2, return AXIS_GAS (22) for right trigger and AXIS_BRAKE (23) for left trigger - swap them so they're sorted in the right order for SDL
|
||||
int arg0Axis = arg0.getAxis();
|
||||
int arg1Axis = arg1.getAxis();
|
||||
if (arg0Axis == MotionEvent.AXIS_GAS) {
|
||||
arg0Axis = MotionEvent.AXIS_BRAKE;
|
||||
} else if (arg0Axis == MotionEvent.AXIS_BRAKE) {
|
||||
arg0Axis = MotionEvent.AXIS_GAS;
|
||||
}
|
||||
if (arg1Axis == MotionEvent.AXIS_GAS) {
|
||||
arg1Axis = MotionEvent.AXIS_BRAKE;
|
||||
} else if (arg1Axis == MotionEvent.AXIS_BRAKE) {
|
||||
arg1Axis = MotionEvent.AXIS_GAS;
|
||||
}
|
||||
|
||||
return arg0Axis - arg1Axis;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -155,12 +182,7 @@ class SDLJoystickHandler_API12 extends SDLJoystickHandler {
|
||||
@Override
|
||||
public void pollInputDevices() {
|
||||
int[] deviceIds = InputDevice.getDeviceIds();
|
||||
// It helps processing the device ids in reverse order
|
||||
// For example, in the case of the XBox 360 wireless dongle,
|
||||
// so the first controller seen by SDL matches what the receiver
|
||||
// considers to be the first controller
|
||||
|
||||
for(int i=deviceIds.length-1; i>-1; i--) {
|
||||
for(int i=0; i < deviceIds.length; ++i) {
|
||||
SDLJoystick joystick = getJoystick(deviceIds[i]);
|
||||
if (joystick == null) {
|
||||
joystick = new SDLJoystick();
|
||||
@@ -187,8 +209,7 @@ class SDLJoystickHandler_API12 extends SDLJoystickHandler {
|
||||
}
|
||||
|
||||
mJoysticks.add(joystick);
|
||||
SDLControllerManager.nativeAddJoystick(joystick.device_id, joystick.name, joystick.desc, 0, -1,
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -259,9 +280,17 @@ class SDLJoystickHandler_API12 extends SDLJoystickHandler {
|
||||
public String getJoystickDescriptor(InputDevice joystickDevice) {
|
||||
return joystickDevice.getName();
|
||||
}
|
||||
public int getProductId(InputDevice joystickDevice) {
|
||||
return 0;
|
||||
}
|
||||
public int getVendorId(InputDevice joystickDevice) {
|
||||
return 0;
|
||||
}
|
||||
public int getButtonMask(InputDevice joystickDevice) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class SDLJoystickHandler_API16 extends SDLJoystickHandler_API12 {
|
||||
|
||||
@Override
|
||||
@@ -276,6 +305,144 @@ class SDLJoystickHandler_API16 extends SDLJoystickHandler_API12 {
|
||||
}
|
||||
}
|
||||
|
||||
class SDLJoystickHandler_API19 extends SDLJoystickHandler_API16 {
|
||||
|
||||
@Override
|
||||
public int getProductId(InputDevice joystickDevice) {
|
||||
return joystickDevice.getProductId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getVendorId(InputDevice joystickDevice) {
|
||||
return joystickDevice.getVendorId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getButtonMask(InputDevice joystickDevice) {
|
||||
int button_mask = 0;
|
||||
int[] keys = new int[] {
|
||||
KeyEvent.KEYCODE_BUTTON_A,
|
||||
KeyEvent.KEYCODE_BUTTON_B,
|
||||
KeyEvent.KEYCODE_BUTTON_X,
|
||||
KeyEvent.KEYCODE_BUTTON_Y,
|
||||
KeyEvent.KEYCODE_BACK,
|
||||
KeyEvent.KEYCODE_BUTTON_MODE,
|
||||
KeyEvent.KEYCODE_BUTTON_START,
|
||||
KeyEvent.KEYCODE_BUTTON_THUMBL,
|
||||
KeyEvent.KEYCODE_BUTTON_THUMBR,
|
||||
KeyEvent.KEYCODE_BUTTON_L1,
|
||||
KeyEvent.KEYCODE_BUTTON_R1,
|
||||
KeyEvent.KEYCODE_DPAD_UP,
|
||||
KeyEvent.KEYCODE_DPAD_DOWN,
|
||||
KeyEvent.KEYCODE_DPAD_LEFT,
|
||||
KeyEvent.KEYCODE_DPAD_RIGHT,
|
||||
KeyEvent.KEYCODE_BUTTON_SELECT,
|
||||
KeyEvent.KEYCODE_DPAD_CENTER,
|
||||
|
||||
// These don't map into any SDL controller buttons directly
|
||||
KeyEvent.KEYCODE_BUTTON_L2,
|
||||
KeyEvent.KEYCODE_BUTTON_R2,
|
||||
KeyEvent.KEYCODE_BUTTON_C,
|
||||
KeyEvent.KEYCODE_BUTTON_Z,
|
||||
KeyEvent.KEYCODE_BUTTON_1,
|
||||
KeyEvent.KEYCODE_BUTTON_2,
|
||||
KeyEvent.KEYCODE_BUTTON_3,
|
||||
KeyEvent.KEYCODE_BUTTON_4,
|
||||
KeyEvent.KEYCODE_BUTTON_5,
|
||||
KeyEvent.KEYCODE_BUTTON_6,
|
||||
KeyEvent.KEYCODE_BUTTON_7,
|
||||
KeyEvent.KEYCODE_BUTTON_8,
|
||||
KeyEvent.KEYCODE_BUTTON_9,
|
||||
KeyEvent.KEYCODE_BUTTON_10,
|
||||
KeyEvent.KEYCODE_BUTTON_11,
|
||||
KeyEvent.KEYCODE_BUTTON_12,
|
||||
KeyEvent.KEYCODE_BUTTON_13,
|
||||
KeyEvent.KEYCODE_BUTTON_14,
|
||||
KeyEvent.KEYCODE_BUTTON_15,
|
||||
KeyEvent.KEYCODE_BUTTON_16,
|
||||
};
|
||||
int[] masks = new int[] {
|
||||
(1 << 0), // A -> A
|
||||
(1 << 1), // B -> B
|
||||
(1 << 2), // X -> X
|
||||
(1 << 3), // Y -> Y
|
||||
(1 << 4), // BACK -> BACK
|
||||
(1 << 5), // MODE -> GUIDE
|
||||
(1 << 6), // START -> START
|
||||
(1 << 7), // THUMBL -> LEFTSTICK
|
||||
(1 << 8), // THUMBR -> RIGHTSTICK
|
||||
(1 << 9), // L1 -> LEFTSHOULDER
|
||||
(1 << 10), // R1 -> RIGHTSHOULDER
|
||||
(1 << 11), // DPAD_UP -> DPAD_UP
|
||||
(1 << 12), // DPAD_DOWN -> DPAD_DOWN
|
||||
(1 << 13), // DPAD_LEFT -> DPAD_LEFT
|
||||
(1 << 14), // DPAD_RIGHT -> DPAD_RIGHT
|
||||
(1 << 4), // SELECT -> BACK
|
||||
(1 << 0), // DPAD_CENTER -> A
|
||||
(1 << 15), // L2 -> ??
|
||||
(1 << 16), // R2 -> ??
|
||||
(1 << 17), // C -> ??
|
||||
(1 << 18), // Z -> ??
|
||||
(1 << 20), // 1 -> ??
|
||||
(1 << 21), // 2 -> ??
|
||||
(1 << 22), // 3 -> ??
|
||||
(1 << 23), // 4 -> ??
|
||||
(1 << 24), // 5 -> ??
|
||||
(1 << 25), // 6 -> ??
|
||||
(1 << 26), // 7 -> ??
|
||||
(1 << 27), // 8 -> ??
|
||||
(1 << 28), // 9 -> ??
|
||||
(1 << 29), // 10 -> ??
|
||||
(1 << 30), // 11 -> ??
|
||||
(1 << 31), // 12 -> ??
|
||||
// We're out of room...
|
||||
0xFFFFFFFF, // 13 -> ??
|
||||
0xFFFFFFFF, // 14 -> ??
|
||||
0xFFFFFFFF, // 15 -> ??
|
||||
0xFFFFFFFF, // 16 -> ??
|
||||
};
|
||||
boolean[] has_keys = joystickDevice.hasKeys(keys);
|
||||
for (int i = 0; i < keys.length; ++i) {
|
||||
if (has_keys[i]) {
|
||||
button_mask |= masks[i];
|
||||
}
|
||||
}
|
||||
return button_mask;
|
||||
}
|
||||
}
|
||||
|
||||
class SDLHapticHandler_API26 extends SDLHapticHandler {
|
||||
@Override
|
||||
public void run(int device_id, float intensity, int length) {
|
||||
SDLHaptic haptic = getHaptic(device_id);
|
||||
if (haptic != null) {
|
||||
Log.d("SDL", "Rtest: Vibe with intensity " + intensity + " for " + length);
|
||||
if (intensity == 0.0f) {
|
||||
stop(device_id);
|
||||
return;
|
||||
}
|
||||
|
||||
int vibeValue = Math.round(intensity * 255);
|
||||
|
||||
if (vibeValue > 255) {
|
||||
vibeValue = 255;
|
||||
}
|
||||
if (vibeValue < 1) {
|
||||
stop(device_id);
|
||||
return;
|
||||
}
|
||||
try {
|
||||
haptic.vib.vibrate(VibrationEffect.createOneShot(length, vibeValue));
|
||||
}
|
||||
catch (Exception e) {
|
||||
// Fall back to the generic method, which uses DEFAULT_AMPLITUDE, but works even if
|
||||
// something went horribly wrong with the Android 8.0 APIs.
|
||||
haptic.vib.vibrate(length);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class SDLHapticHandler {
|
||||
|
||||
class SDLHaptic {
|
||||
@@ -285,20 +452,27 @@ class SDLHapticHandler {
|
||||
}
|
||||
|
||||
private ArrayList<SDLHaptic> mHaptics;
|
||||
|
||||
|
||||
public SDLHapticHandler() {
|
||||
mHaptics = new ArrayList<SDLHaptic>();
|
||||
}
|
||||
|
||||
public void run(int device_id, int length) {
|
||||
public void run(int device_id, float intensity, int length) {
|
||||
SDLHaptic haptic = getHaptic(device_id);
|
||||
if (haptic != null) {
|
||||
haptic.vib.vibrate (length);
|
||||
haptic.vib.vibrate(length);
|
||||
}
|
||||
}
|
||||
|
||||
public void stop(int device_id) {
|
||||
SDLHaptic haptic = getHaptic(device_id);
|
||||
if (haptic != null) {
|
||||
haptic.vib.cancel();
|
||||
}
|
||||
}
|
||||
|
||||
public void pollHapticDevices() {
|
||||
|
||||
|
||||
final int deviceId_VIBRATOR_SERVICE = 999999;
|
||||
boolean hasVibratorService = false;
|
||||
|
||||
@@ -342,7 +516,7 @@ class SDLHapticHandler {
|
||||
haptic = new SDLHaptic();
|
||||
haptic.device_id = deviceId_VIBRATOR_SERVICE;
|
||||
haptic.name = "VIBRATOR_SERVICE";
|
||||
haptic.vib = vib;
|
||||
haptic.vib = vib;
|
||||
mHaptics.add(haptic);
|
||||
SDLControllerManager.nativeAddHaptic(haptic.device_id, haptic.name);
|
||||
}
|
||||
@@ -384,7 +558,7 @@ class SDLHapticHandler {
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class SDLGenericMotionListener_API12 implements View.OnGenericMotionListener {
|
||||
@@ -409,14 +583,14 @@ class SDLGenericMotionListener_API12 implements View.OnGenericMotionListener {
|
||||
case MotionEvent.ACTION_SCROLL:
|
||||
x = event.getAxisValue(MotionEvent.AXIS_HSCROLL, 0);
|
||||
y = event.getAxisValue(MotionEvent.AXIS_VSCROLL, 0);
|
||||
SDLActivity.onNativeMouse(0, action, x, y);
|
||||
SDLActivity.onNativeMouse(0, action, x, y, false);
|
||||
return true;
|
||||
|
||||
case MotionEvent.ACTION_HOVER_MOVE:
|
||||
x = event.getX(0);
|
||||
y = event.getY(0);
|
||||
|
||||
SDLActivity.onNativeMouse(0, action, x, y);
|
||||
SDLActivity.onNativeMouse(0, action, x, y, false);
|
||||
return true;
|
||||
|
||||
default:
|
||||
@@ -431,5 +605,242 @@ class SDLGenericMotionListener_API12 implements View.OnGenericMotionListener {
|
||||
// Event was not managed
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean supportsRelativeMouse() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean inRelativeMode() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean setRelativeMouseEnabled(boolean enabled) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public void reclaimRelativeMouseModeIfNeeded()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public float getEventX(MotionEvent event) {
|
||||
return event.getX(0);
|
||||
}
|
||||
|
||||
public float getEventY(MotionEvent event) {
|
||||
return event.getY(0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class SDLGenericMotionListener_API24 extends SDLGenericMotionListener_API12 {
|
||||
// Generic Motion (mouse hover, joystick...) events go here
|
||||
|
||||
private boolean mRelativeModeEnabled;
|
||||
|
||||
@Override
|
||||
public boolean onGenericMotion(View v, MotionEvent event) {
|
||||
float x, y;
|
||||
int action;
|
||||
|
||||
switch ( event.getSource() ) {
|
||||
case InputDevice.SOURCE_JOYSTICK:
|
||||
case InputDevice.SOURCE_GAMEPAD:
|
||||
case InputDevice.SOURCE_DPAD:
|
||||
return SDLControllerManager.handleJoystickMotionEvent(event);
|
||||
|
||||
case InputDevice.SOURCE_MOUSE:
|
||||
if (!SDLActivity.mSeparateMouseAndTouch) {
|
||||
break;
|
||||
}
|
||||
action = event.getActionMasked();
|
||||
switch (action) {
|
||||
case MotionEvent.ACTION_SCROLL:
|
||||
x = event.getAxisValue(MotionEvent.AXIS_HSCROLL, 0);
|
||||
y = event.getAxisValue(MotionEvent.AXIS_VSCROLL, 0);
|
||||
SDLActivity.onNativeMouse(0, action, x, y, false);
|
||||
return true;
|
||||
|
||||
case MotionEvent.ACTION_HOVER_MOVE:
|
||||
if (mRelativeModeEnabled) {
|
||||
x = event.getAxisValue(MotionEvent.AXIS_RELATIVE_X);
|
||||
y = event.getAxisValue(MotionEvent.AXIS_RELATIVE_Y);
|
||||
}
|
||||
else {
|
||||
x = event.getX(0);
|
||||
y = event.getY(0);
|
||||
}
|
||||
|
||||
SDLActivity.onNativeMouse(0, action, x, y, mRelativeModeEnabled);
|
||||
return true;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
// Event was not managed
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsRelativeMouse() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean inRelativeMode() {
|
||||
return mRelativeModeEnabled;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean setRelativeMouseEnabled(boolean enabled) {
|
||||
mRelativeModeEnabled = enabled;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getEventX(MotionEvent event) {
|
||||
if (mRelativeModeEnabled) {
|
||||
return event.getAxisValue(MotionEvent.AXIS_RELATIVE_X);
|
||||
}
|
||||
else {
|
||||
return event.getX(0);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getEventY(MotionEvent event) {
|
||||
if (mRelativeModeEnabled) {
|
||||
return event.getAxisValue(MotionEvent.AXIS_RELATIVE_Y);
|
||||
}
|
||||
else {
|
||||
return event.getY(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class SDLGenericMotionListener_API26 extends SDLGenericMotionListener_API24 {
|
||||
// Generic Motion (mouse hover, joystick...) events go here
|
||||
private boolean mRelativeModeEnabled;
|
||||
|
||||
@Override
|
||||
public boolean onGenericMotion(View v, MotionEvent event) {
|
||||
float x, y;
|
||||
int action;
|
||||
|
||||
switch ( event.getSource() ) {
|
||||
case InputDevice.SOURCE_JOYSTICK:
|
||||
case InputDevice.SOURCE_GAMEPAD:
|
||||
case InputDevice.SOURCE_DPAD:
|
||||
return SDLControllerManager.handleJoystickMotionEvent(event);
|
||||
|
||||
case InputDevice.SOURCE_MOUSE:
|
||||
case 12290: // DeX desktop mouse cursor is a separate non-standard input type.
|
||||
if (!SDLActivity.mSeparateMouseAndTouch) {
|
||||
break;
|
||||
}
|
||||
|
||||
action = event.getActionMasked();
|
||||
switch (action) {
|
||||
case MotionEvent.ACTION_SCROLL:
|
||||
x = event.getAxisValue(MotionEvent.AXIS_HSCROLL, 0);
|
||||
y = event.getAxisValue(MotionEvent.AXIS_VSCROLL, 0);
|
||||
SDLActivity.onNativeMouse(0, action, x, y, false);
|
||||
return true;
|
||||
|
||||
case MotionEvent.ACTION_HOVER_MOVE:
|
||||
x = event.getX(0);
|
||||
y = event.getY(0);
|
||||
SDLActivity.onNativeMouse(0, action, x, y, false);
|
||||
return true;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case InputDevice.SOURCE_MOUSE_RELATIVE:
|
||||
if (!SDLActivity.mSeparateMouseAndTouch) {
|
||||
break;
|
||||
}
|
||||
action = event.getActionMasked();
|
||||
switch (action) {
|
||||
case MotionEvent.ACTION_SCROLL:
|
||||
x = event.getAxisValue(MotionEvent.AXIS_HSCROLL, 0);
|
||||
y = event.getAxisValue(MotionEvent.AXIS_VSCROLL, 0);
|
||||
SDLActivity.onNativeMouse(0, action, x, y, false);
|
||||
return true;
|
||||
|
||||
case MotionEvent.ACTION_HOVER_MOVE:
|
||||
x = event.getX(0);
|
||||
y = event.getY(0);
|
||||
SDLActivity.onNativeMouse(0, action, x, y, true);
|
||||
return true;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
// Event was not managed
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsRelativeMouse() {
|
||||
return (!SDLActivity.isDeXMode() || (Build.VERSION.SDK_INT >= 27));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean inRelativeMode() {
|
||||
return mRelativeModeEnabled;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean setRelativeMouseEnabled(boolean enabled) {
|
||||
if (!SDLActivity.isDeXMode() || (Build.VERSION.SDK_INT >= 27)) {
|
||||
if (enabled) {
|
||||
SDLActivity.getContentView().requestPointerCapture();
|
||||
}
|
||||
else {
|
||||
SDLActivity.getContentView().releasePointerCapture();
|
||||
}
|
||||
mRelativeModeEnabled = enabled;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reclaimRelativeMouseModeIfNeeded()
|
||||
{
|
||||
if (mRelativeModeEnabled && !SDLActivity.isDeXMode()) {
|
||||
SDLActivity.getContentView().requestPointerCapture();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getEventX(MotionEvent event) {
|
||||
// Relative mouse in capture mode will only have relative for X/Y
|
||||
return event.getX(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getEventY(MotionEvent event) {
|
||||
// Relative mouse in capture mode will only have relative for X/Y
|
||||
return event.getY(0);
|
||||
}
|
||||
}
|
||||
@@ -3,9 +3,10 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
jcenter()
|
||||
google()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:2.3.3'
|
||||
classpath 'com.android.tools.build:gradle:3.2.0'
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
@@ -15,6 +16,7 @@ buildscript {
|
||||
allprojects {
|
||||
repositories {
|
||||
jcenter()
|
||||
google()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip
|
||||
|
||||
0
build-scripts/config.guess
vendored
Normal file → Executable file
0
build-scripts/config.guess
vendored
Normal file → Executable file
0
build-scripts/config.sub
vendored
Normal file → Executable file
0
build-scripts/config.sub
vendored
Normal file → Executable file
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
# install - install a program, script, or datafile
|
||||
|
||||
scriptversion=2005-02-02.21
|
||||
scriptversion=2011-11-20.07; # UTC
|
||||
|
||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||
@@ -35,42 +35,72 @@ scriptversion=2005-02-02.21
|
||||
# FSF changes to this file are in the public domain.
|
||||
#
|
||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||
# `make' implicit rules from creating a file called install from it
|
||||
# 'make' implicit rules from creating a file called install from it
|
||||
# when there is no Makefile.
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch. It can only install one file at a time, a restriction
|
||||
# shared with many OS's install programs.
|
||||
# from scratch.
|
||||
|
||||
nl='
|
||||
'
|
||||
IFS=" "" $nl"
|
||||
|
||||
# set DOITPROG to echo to test this script
|
||||
|
||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||
doit="${DOITPROG-}"
|
||||
doit=${DOITPROG-}
|
||||
if test -z "$doit"; then
|
||||
doit_exec=exec
|
||||
else
|
||||
doit_exec=$doit
|
||||
fi
|
||||
|
||||
# put in absolute paths if you don't have them in your path; or use env. vars.
|
||||
# Put in absolute file names if you don't have them in your path;
|
||||
# or use environment vars.
|
||||
|
||||
mvprog="${MVPROG-mv}"
|
||||
cpprog="${CPPROG-cp}"
|
||||
chmodprog="${CHMODPROG-chmod}"
|
||||
chownprog="${CHOWNPROG-chown}"
|
||||
chgrpprog="${CHGRPPROG-chgrp}"
|
||||
stripprog="${STRIPPROG-strip}"
|
||||
rmprog="${RMPROG-rm}"
|
||||
mkdirprog="${MKDIRPROG-mkdir}"
|
||||
chgrpprog=${CHGRPPROG-chgrp}
|
||||
chmodprog=${CHMODPROG-chmod}
|
||||
chownprog=${CHOWNPROG-chown}
|
||||
cmpprog=${CMPPROG-cmp}
|
||||
cpprog=${CPPROG-cp}
|
||||
mkdirprog=${MKDIRPROG-mkdir}
|
||||
mvprog=${MVPROG-mv}
|
||||
rmprog=${RMPROG-rm}
|
||||
stripprog=${STRIPPROG-strip}
|
||||
|
||||
posix_glob='?'
|
||||
initialize_posix_glob='
|
||||
test "$posix_glob" != "?" || {
|
||||
if (set -f) 2>/dev/null; then
|
||||
posix_glob=
|
||||
else
|
||||
posix_glob=:
|
||||
fi
|
||||
}
|
||||
'
|
||||
|
||||
posix_mkdir=
|
||||
|
||||
# Desired mode of installed file.
|
||||
mode=0755
|
||||
|
||||
chmodcmd="$chmodprog 0755"
|
||||
chowncmd=
|
||||
chgrpcmd=
|
||||
stripcmd=
|
||||
chmodcmd=$chmodprog
|
||||
chowncmd=
|
||||
mvcmd=$mvprog
|
||||
rmcmd="$rmprog -f"
|
||||
mvcmd="$mvprog"
|
||||
stripcmd=
|
||||
|
||||
src=
|
||||
dst=
|
||||
dir_arg=
|
||||
dstarg=
|
||||
dst_arg=
|
||||
|
||||
copy_on_change=false
|
||||
no_target_directory=
|
||||
|
||||
usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
|
||||
usage="\
|
||||
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
|
||||
or: $0 [OPTION]... SRCFILES... DIRECTORY
|
||||
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
|
||||
or: $0 [OPTION]... -d DIRECTORIES...
|
||||
@@ -80,108 +110,148 @@ In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
|
||||
In the 4th, create DIRECTORIES.
|
||||
|
||||
Options:
|
||||
-c (ignored)
|
||||
-d create directories instead of installing files.
|
||||
-g GROUP $chgrpprog installed files to GROUP.
|
||||
-m MODE $chmodprog installed files to MODE.
|
||||
-o USER $chownprog installed files to USER.
|
||||
-s $stripprog installed files.
|
||||
-t DIRECTORY install into DIRECTORY.
|
||||
-T report an error if DSTFILE is a directory.
|
||||
--help display this help and exit.
|
||||
--version display version info and exit.
|
||||
--help display this help and exit.
|
||||
--version display version info and exit.
|
||||
|
||||
-c (ignored)
|
||||
-C install only if different (preserve the last data modification time)
|
||||
-d create directories instead of installing files.
|
||||
-g GROUP $chgrpprog installed files to GROUP.
|
||||
-m MODE $chmodprog installed files to MODE.
|
||||
-o USER $chownprog installed files to USER.
|
||||
-s $stripprog installed files.
|
||||
-t DIRECTORY install into DIRECTORY.
|
||||
-T report an error if DSTFILE is a directory.
|
||||
|
||||
Environment variables override the default commands:
|
||||
CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
|
||||
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
|
||||
RMPROG STRIPPROG
|
||||
"
|
||||
|
||||
while test -n "$1"; do
|
||||
while test $# -ne 0; do
|
||||
case $1 in
|
||||
-c) shift
|
||||
continue;;
|
||||
-c) ;;
|
||||
|
||||
-d) dir_arg=true
|
||||
shift
|
||||
continue;;
|
||||
-C) copy_on_change=true;;
|
||||
|
||||
-d) dir_arg=true;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
shift;;
|
||||
|
||||
--help) echo "$usage"; exit $?;;
|
||||
|
||||
-m) chmodcmd="$chmodprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
-m) mode=$2
|
||||
case $mode in
|
||||
*' '* | *' '* | *'
|
||||
'* | *'*'* | *'?'* | *'['*)
|
||||
echo "$0: invalid mode: $mode" >&2
|
||||
exit 1;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
shift;;
|
||||
|
||||
-s) stripcmd=$stripprog
|
||||
shift
|
||||
continue;;
|
||||
-s) stripcmd=$stripprog;;
|
||||
|
||||
-t) dstarg=$2
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
-t) dst_arg=$2
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $dst_arg in
|
||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-T) no_target_directory=true
|
||||
shift
|
||||
continue;;
|
||||
-T) no_target_directory=true;;
|
||||
|
||||
--version) echo "$0 $scriptversion"; exit $?;;
|
||||
|
||||
*) # When -d is used, all remaining arguments are directories to create.
|
||||
# When -t is used, the destination is already specified.
|
||||
test -n "$dir_arg$dstarg" && break
|
||||
# Otherwise, the last argument is the destination. Remove it from $@.
|
||||
for arg
|
||||
do
|
||||
if test -n "$dstarg"; then
|
||||
# $@ is not empty: it contains at least $arg.
|
||||
set fnord "$@" "$dstarg"
|
||||
shift # fnord
|
||||
fi
|
||||
shift # arg
|
||||
dstarg=$arg
|
||||
done
|
||||
--) shift
|
||||
break;;
|
||||
|
||||
-*) echo "$0: invalid option: $1" >&2
|
||||
exit 1;;
|
||||
|
||||
*) break;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
if test -z "$1"; then
|
||||
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
|
||||
# When -d is used, all remaining arguments are directories to create.
|
||||
# When -t is used, the destination is already specified.
|
||||
# Otherwise, the last argument is the destination. Remove it from $@.
|
||||
for arg
|
||||
do
|
||||
if test -n "$dst_arg"; then
|
||||
# $@ is not empty: it contains at least $arg.
|
||||
set fnord "$@" "$dst_arg"
|
||||
shift # fnord
|
||||
fi
|
||||
shift # arg
|
||||
dst_arg=$arg
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $dst_arg in
|
||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
|
||||
if test $# -eq 0; then
|
||||
if test -z "$dir_arg"; then
|
||||
echo "$0: no input file specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
# It's OK to call `install-sh -d' without argument.
|
||||
# It's OK to call 'install-sh -d' without argument.
|
||||
# This can happen when creating conditional directories.
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if test -z "$dir_arg"; then
|
||||
do_exit='(exit $ret); exit $ret'
|
||||
trap "ret=129; $do_exit" 1
|
||||
trap "ret=130; $do_exit" 2
|
||||
trap "ret=141; $do_exit" 13
|
||||
trap "ret=143; $do_exit" 15
|
||||
|
||||
# Set umask so as not to create temps with too-generous modes.
|
||||
# However, 'strip' requires both read and write access to temps.
|
||||
case $mode in
|
||||
# Optimize common cases.
|
||||
*644) cp_umask=133;;
|
||||
*755) cp_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw='% 200'
|
||||
fi
|
||||
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
|
||||
*)
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw=,u+rw
|
||||
fi
|
||||
cp_umask=$mode$u_plus_rw;;
|
||||
esac
|
||||
fi
|
||||
|
||||
for src
|
||||
do
|
||||
# Protect names starting with `-'.
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $src in
|
||||
-*) src=./$src ;;
|
||||
-* | [=\(\)!]) src=./$src;;
|
||||
esac
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
dst=$src
|
||||
src=
|
||||
|
||||
if test -d "$dst"; then
|
||||
mkdircmd=:
|
||||
chmodcmd=
|
||||
else
|
||||
mkdircmd=$mkdirprog
|
||||
fi
|
||||
dstdir=$dst
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
@@ -190,71 +260,194 @@ do
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test -z "$dstarg"; then
|
||||
if test -z "$dst_arg"; then
|
||||
echo "$0: no destination specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
dst=$dstarg
|
||||
# Protect names starting with `-'.
|
||||
case $dst in
|
||||
-*) dst=./$dst ;;
|
||||
esac
|
||||
dst=$dst_arg
|
||||
|
||||
# If destination is a directory, append the input filename; won't work
|
||||
# if double slashes aren't ignored.
|
||||
if test -d "$dst"; then
|
||||
if test -n "$no_target_directory"; then
|
||||
echo "$0: $dstarg: Is a directory" >&2
|
||||
echo "$0: $dst_arg: Is a directory" >&2
|
||||
exit 1
|
||||
fi
|
||||
dst=$dst/`basename "$src"`
|
||||
dstdir=$dst
|
||||
dst=$dstdir/`basename "$src"`
|
||||
dstdir_status=0
|
||||
else
|
||||
# Prefer dirname, but fall back on a substitute if dirname fails.
|
||||
dstdir=`
|
||||
(dirname "$dst") 2>/dev/null ||
|
||||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
|
||||
X"$dst" : 'X\(//\)[^/]' \| \
|
||||
X"$dst" : 'X\(//\)$' \| \
|
||||
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
|
||||
echo X"$dst" |
|
||||
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\/\)[^/].*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\/\)$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\).*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
s/.*/./; q'
|
||||
`
|
||||
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
fi
|
||||
fi
|
||||
|
||||
# This sed command emulates the dirname command.
|
||||
dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'`
|
||||
obsolete_mkdir_used=false
|
||||
|
||||
# Make sure that the destination directory exists.
|
||||
if test $dstdir_status != 0; then
|
||||
case $posix_mkdir in
|
||||
'')
|
||||
# Create intermediate dirs using mode 755 as modified by the umask.
|
||||
# This is like FreeBSD 'install' as of 1997-10-28.
|
||||
umask=`umask`
|
||||
case $stripcmd.$umask in
|
||||
# Optimize common cases.
|
||||
*[2367][2367]) mkdir_umask=$umask;;
|
||||
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
|
||||
|
||||
# Skip lots of stat calls in the usual case.
|
||||
if test ! -d "$dstdir"; then
|
||||
defaultIFS='
|
||||
'
|
||||
IFS="${IFS-$defaultIFS}"
|
||||
*[0-7])
|
||||
mkdir_umask=`expr $umask + 22 \
|
||||
- $umask % 100 % 40 + $umask % 20 \
|
||||
- $umask % 10 % 4 + $umask % 2
|
||||
`;;
|
||||
*) mkdir_umask=$umask,go-w;;
|
||||
esac
|
||||
|
||||
oIFS=$IFS
|
||||
# Some sh's can't handle IFS=/ for some reason.
|
||||
IFS='%'
|
||||
set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
|
||||
shift
|
||||
IFS=$oIFS
|
||||
# With -d, create the new directory with the user-specified mode.
|
||||
# Otherwise, rely on $mkdir_umask.
|
||||
if test -n "$dir_arg"; then
|
||||
mkdir_mode=-m$mode
|
||||
else
|
||||
mkdir_mode=
|
||||
fi
|
||||
|
||||
pathcomp=
|
||||
posix_mkdir=false
|
||||
case $umask in
|
||||
*[123567][0-7][0-7])
|
||||
# POSIX mkdir -p sets u+wx bits regardless of umask, which
|
||||
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
|
||||
;;
|
||||
*)
|
||||
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
||||
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
|
||||
|
||||
while test $# -ne 0 ; do
|
||||
pathcomp=$pathcomp$1
|
||||
if (umask $mkdir_umask &&
|
||||
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
|
||||
then
|
||||
if test -z "$dir_arg" || {
|
||||
# Check for POSIX incompatibilities with -m.
|
||||
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
||||
# other-writable bit of parent directory when it shouldn't.
|
||||
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
||||
ls_ld_tmpdir=`ls -ld "$tmpdir"`
|
||||
case $ls_ld_tmpdir in
|
||||
d????-?r-*) different_mode=700;;
|
||||
d????-?--*) different_mode=755;;
|
||||
*) false;;
|
||||
esac &&
|
||||
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
|
||||
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
|
||||
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
||||
}
|
||||
}
|
||||
then posix_mkdir=:
|
||||
fi
|
||||
rmdir "$tmpdir/d" "$tmpdir"
|
||||
else
|
||||
# Remove any dirs left behind by ancient mkdir implementations.
|
||||
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
|
||||
fi
|
||||
trap '' 0;;
|
||||
esac;;
|
||||
esac
|
||||
|
||||
if
|
||||
$posix_mkdir && (
|
||||
umask $mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
|
||||
)
|
||||
then :
|
||||
else
|
||||
|
||||
# The umask is ridiculous, or mkdir does not conform to POSIX,
|
||||
# or it failed possibly due to a race condition. Create the
|
||||
# directory the slow way, step by step, checking for races as we go.
|
||||
|
||||
case $dstdir in
|
||||
/*) prefix='/';;
|
||||
[-=\(\)!]*) prefix='./';;
|
||||
*) prefix='';;
|
||||
esac
|
||||
|
||||
eval "$initialize_posix_glob"
|
||||
|
||||
oIFS=$IFS
|
||||
IFS=/
|
||||
$posix_glob set -f
|
||||
set fnord $dstdir
|
||||
shift
|
||||
if test ! -d "$pathcomp"; then
|
||||
$mkdirprog "$pathcomp"
|
||||
# mkdir can fail with a `File exist' error in case several
|
||||
# install-sh are creating the directory concurrently. This
|
||||
# is OK.
|
||||
test -d "$pathcomp" || exit
|
||||
$posix_glob set +f
|
||||
IFS=$oIFS
|
||||
|
||||
prefixes=
|
||||
|
||||
for d
|
||||
do
|
||||
test X"$d" = X && continue
|
||||
|
||||
prefix=$prefix$d
|
||||
if test -d "$prefix"; then
|
||||
prefixes=
|
||||
else
|
||||
if $posix_mkdir; then
|
||||
(umask=$mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
|
||||
# Don't fail if two instances are running concurrently.
|
||||
test -d "$prefix" || exit 1
|
||||
else
|
||||
case $prefix in
|
||||
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
|
||||
*) qprefix=$prefix;;
|
||||
esac
|
||||
prefixes="$prefixes '$qprefix'"
|
||||
fi
|
||||
fi
|
||||
prefix=$prefix/
|
||||
done
|
||||
|
||||
if test -n "$prefixes"; then
|
||||
# Don't fail if two instances are running concurrently.
|
||||
(umask $mkdir_umask &&
|
||||
eval "\$doit_exec \$mkdirprog $prefixes") ||
|
||||
test -d "$dstdir" || exit 1
|
||||
obsolete_mkdir_used=true
|
||||
fi
|
||||
pathcomp=$pathcomp/
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
$doit $mkdircmd "$dst" \
|
||||
&& { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
|
||||
&& { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
|
||||
&& { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
|
||||
&& { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
|
||||
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
|
||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
|
||||
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
|
||||
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
|
||||
else
|
||||
dstfile=`basename "$dst"`
|
||||
|
||||
# Make a couple of temp file names in the proper directory.
|
||||
dsttmp=$dstdir/_inst.$$_
|
||||
@@ -262,10 +455,9 @@ do
|
||||
|
||||
# Trap to clean up those temp files at exit.
|
||||
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
|
||||
trap '(exit $?); exit' 1 2 13 15
|
||||
|
||||
# Copy the file name to the temp name.
|
||||
$doit $cpprog "$src" "$dsttmp" &&
|
||||
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits.
|
||||
#
|
||||
@@ -273,51 +465,63 @@ do
|
||||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $cpprog $src $dsttmp" command.
|
||||
#
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
|
||||
&& { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
|
||||
&& { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
|
||||
&& { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
|
||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
|
||||
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
|
||||
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
{ $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \
|
||||
|| {
|
||||
# The rename failed, perhaps because mv can't rename something else
|
||||
# to itself, or perhaps because mv is so ancient that it does not
|
||||
# support -f.
|
||||
# If -C, don't bother to copy if it wouldn't change the file.
|
||||
if $copy_on_change &&
|
||||
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
|
||||
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
|
||||
|
||||
# Now remove or move aside any old file at destination location.
|
||||
# We try this two ways since rm can't unlink itself on some
|
||||
# systems and the destination file might be busy for other
|
||||
# reasons. In this case, the final cleanup might fail but the new
|
||||
# file should still install successfully.
|
||||
{
|
||||
if test -f "$dstdir/$dstfile"; then
|
||||
$doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
|
||||
|| $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
|
||||
|| {
|
||||
echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
|
||||
(exit 1); exit 1
|
||||
}
|
||||
else
|
||||
:
|
||||
fi
|
||||
} &&
|
||||
eval "$initialize_posix_glob" &&
|
||||
$posix_glob set -f &&
|
||||
set X $old && old=:$2:$4:$5:$6 &&
|
||||
set X $new && new=:$2:$4:$5:$6 &&
|
||||
$posix_glob set +f &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
$doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
|
||||
}
|
||||
}
|
||||
fi || { (exit 1); exit 1; }
|
||||
test "$old" = "$new" &&
|
||||
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
|
||||
then
|
||||
rm -f "$dsttmp"
|
||||
else
|
||||
# Rename the file to the real destination.
|
||||
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
|
||||
|
||||
# The rename failed, perhaps because mv can't rename something else
|
||||
# to itself, or perhaps because mv is so ancient that it does not
|
||||
# support -f.
|
||||
{
|
||||
# Now remove or move aside any old file at destination location.
|
||||
# We try this two ways since rm can't unlink itself on some
|
||||
# systems and the destination file might be busy for other
|
||||
# reasons. In this case, the final cleanup might fail but the new
|
||||
# file should still install successfully.
|
||||
{
|
||||
test ! -f "$dst" ||
|
||||
$doit $rmcmd -f "$dst" 2>/dev/null ||
|
||||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
|
||||
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
|
||||
} ||
|
||||
{ echo "$0: cannot unlink or rename $dst" >&2
|
||||
(exit 1); exit 1
|
||||
}
|
||||
} &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
$doit $mvcmd "$dsttmp" "$dst"
|
||||
}
|
||||
fi || exit 1
|
||||
|
||||
trap '' 0
|
||||
fi
|
||||
done
|
||||
|
||||
# The final little trick to "correctly" pass the exit status to the exit trap.
|
||||
{
|
||||
(exit 0); exit 0
|
||||
}
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
|
||||
@@ -7404,8 +7404,11 @@ func_mode_link ()
|
||||
# Darwin ld doesn't like 0 for these options...
|
||||
func_arith $current + 1
|
||||
minor_current=$func_arith_result
|
||||
xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
|
||||
verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
|
||||
#xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
|
||||
#verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
|
||||
# make the compatibility version match the Xcode project files, i.e. 1.0
|
||||
xlcverstring="${wl}-compatibility_version 1.0 ${wl}-current_version ${wl}$minor_current.$revision"
|
||||
verstring="-compatibility_version 1.0 -current_version $minor_current.$revision"
|
||||
;;
|
||||
|
||||
freebsd-aout)
|
||||
|
||||
@@ -1,29 +1,59 @@
|
||||
#! /bin/sh
|
||||
# mkinstalldirs --- make directory hierarchy
|
||||
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
|
||||
# Created: 1993-05-16
|
||||
# Public domain
|
||||
|
||||
scriptversion=2009-04-28.21; # UTC
|
||||
|
||||
# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
|
||||
# Created: 1993-05-16
|
||||
# Public domain.
|
||||
#
|
||||
# This file is maintained in Automake, please report
|
||||
# bugs to <bug-automake@gnu.org> or send patches to
|
||||
# <automake-patches@gnu.org>.
|
||||
|
||||
nl='
|
||||
'
|
||||
IFS=" "" $nl"
|
||||
errstatus=0
|
||||
dirmode=""
|
||||
dirmode=
|
||||
|
||||
usage="\
|
||||
Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
|
||||
Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
|
||||
|
||||
Create each directory DIR (with mode MODE, if specified), including all
|
||||
leading file name components.
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>."
|
||||
|
||||
# process command line arguments
|
||||
while test $# -gt 0 ; do
|
||||
case "${1}" in
|
||||
-h | --help | --h* ) # -h for help
|
||||
echo "${usage}" 1>&2; exit 0 ;;
|
||||
-m ) # -m PERM arg
|
||||
shift
|
||||
test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; }
|
||||
dirmode="${1}"
|
||||
shift ;;
|
||||
-- ) shift; break ;; # stop option processing
|
||||
-* ) echo "${usage}" 1>&2; exit 1 ;; # unknown option
|
||||
* ) break ;; # first non-opt arg
|
||||
esac
|
||||
case $1 in
|
||||
-h | --help | --h*) # -h for help
|
||||
echo "$usage"
|
||||
exit $?
|
||||
;;
|
||||
-m) # -m PERM arg
|
||||
shift
|
||||
test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
|
||||
dirmode=$1
|
||||
shift
|
||||
;;
|
||||
--version)
|
||||
echo "$0 $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
--) # stop option processing
|
||||
shift
|
||||
break
|
||||
;;
|
||||
-*) # unknown option
|
||||
echo "$usage" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
*) # first non-opt arg
|
||||
break
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
for file
|
||||
@@ -36,64 +66,97 @@ do
|
||||
done
|
||||
|
||||
case $# in
|
||||
0) exit 0 ;;
|
||||
0) exit 0 ;;
|
||||
esac
|
||||
|
||||
# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and
|
||||
# mkdir -p a/c at the same time, both will detect that a is missing,
|
||||
# one will create a, then the other will try to create a and die with
|
||||
# a "File exists" error. This is a problem when calling mkinstalldirs
|
||||
# from a parallel make. We use --version in the probe to restrict
|
||||
# ourselves to GNU mkdir, which is thread-safe.
|
||||
case $dirmode in
|
||||
'')
|
||||
if mkdir -p -- . 2>/dev/null; then
|
||||
echo "mkdir -p -- $*"
|
||||
exec mkdir -p -- "$@"
|
||||
fi ;;
|
||||
*)
|
||||
if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
|
||||
echo "mkdir -m $dirmode -p -- $*"
|
||||
exec mkdir -m "$dirmode" -p -- "$@"
|
||||
fi ;;
|
||||
'')
|
||||
if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
|
||||
echo "mkdir -p -- $*"
|
||||
exec mkdir -p -- "$@"
|
||||
else
|
||||
# On NextStep and OpenStep, the 'mkdir' command does not
|
||||
# recognize any option. It will interpret all options as
|
||||
# directories to create, and then abort because '.' already
|
||||
# exists.
|
||||
test -d ./-p && rmdir ./-p
|
||||
test -d ./--version && rmdir ./--version
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
|
||||
test ! -d ./--version; then
|
||||
echo "mkdir -m $dirmode -p -- $*"
|
||||
exec mkdir -m "$dirmode" -p -- "$@"
|
||||
else
|
||||
# Clean up after NextStep and OpenStep mkdir.
|
||||
for d in ./-m ./-p ./--version "./$dirmode";
|
||||
do
|
||||
test -d $d && rmdir $d
|
||||
done
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
for file
|
||||
do
|
||||
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
|
||||
shift
|
||||
case $file in
|
||||
/*) pathcomp=/ ;;
|
||||
*) pathcomp= ;;
|
||||
esac
|
||||
oIFS=$IFS
|
||||
IFS=/
|
||||
set fnord $file
|
||||
shift
|
||||
IFS=$oIFS
|
||||
|
||||
pathcomp=
|
||||
for d
|
||||
do
|
||||
pathcomp="$pathcomp$d"
|
||||
case "$pathcomp" in
|
||||
-* ) pathcomp=./$pathcomp ;;
|
||||
esac
|
||||
for d
|
||||
do
|
||||
test "x$d" = x && continue
|
||||
|
||||
if test ! -d "$pathcomp"; then
|
||||
echo "mkdir $pathcomp"
|
||||
pathcomp=$pathcomp$d
|
||||
case $pathcomp in
|
||||
-*) pathcomp=./$pathcomp ;;
|
||||
esac
|
||||
|
||||
mkdir "$pathcomp" || lasterr=$?
|
||||
if test ! -d "$pathcomp"; then
|
||||
echo "mkdir $pathcomp"
|
||||
|
||||
if test ! -d "$pathcomp"; then
|
||||
errstatus=$lasterr
|
||||
else
|
||||
if test ! -z "$dirmode"; then
|
||||
echo "chmod $dirmode $pathcomp"
|
||||
mkdir "$pathcomp" || lasterr=$?
|
||||
|
||||
lasterr=""
|
||||
chmod "$dirmode" "$pathcomp" || lasterr=$?
|
||||
if test ! -d "$pathcomp"; then
|
||||
errstatus=$lasterr
|
||||
else
|
||||
if test ! -z "$dirmode"; then
|
||||
echo "chmod $dirmode $pathcomp"
|
||||
lasterr=
|
||||
chmod "$dirmode" "$pathcomp" || lasterr=$?
|
||||
|
||||
if test ! -z "$lasterr"; then
|
||||
errstatus=$lasterr
|
||||
fi
|
||||
if test ! -z "$lasterr"; then
|
||||
errstatus=$lasterr
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
pathcomp="$pathcomp/"
|
||||
done
|
||||
pathcomp=$pathcomp/
|
||||
done
|
||||
done
|
||||
|
||||
exit $errstatus
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 3
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
# mkinstalldirs ends here
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
#
|
||||
|
||||
# Base version of SDL, used for packaging purposes
|
||||
$SDLVersion = "2.0.7"
|
||||
$SDLVersion = "2.0.9"
|
||||
|
||||
# Gets the .bat file that sets up an MSBuild environment, given one of
|
||||
# Visual Studio's, "PlatformToolset"s.
|
||||
|
||||
@@ -381,9 +381,21 @@ macro(CheckX11)
|
||||
FindLibraryAndSONAME("${_LIB}")
|
||||
endforeach()
|
||||
|
||||
find_path(X_INCLUDEDIR X11/Xlib.h)
|
||||
find_path(X_INCLUDEDIR X11/Xlib.h
|
||||
/usr/pkg/xorg/include
|
||||
/usr/X11R6/include
|
||||
/usr/X11R7/include
|
||||
/usr/local/include/X11
|
||||
/usr/include/X11
|
||||
/usr/openwin/include
|
||||
/usr/openwin/share/include
|
||||
/opt/graphics/OpenGL/include
|
||||
/opt/X11/include
|
||||
)
|
||||
|
||||
if(X_INCLUDEDIR)
|
||||
set(X_CFLAGS "-I${X_INCLUDEDIR}")
|
||||
list(APPEND EXTRA_CFLAGS "-I${X_INCLUDEDIR}")
|
||||
list(APPEND CMAKE_REQUIRED_INCLUDES "${X_INCLUDEDIR}")
|
||||
endif()
|
||||
|
||||
check_include_file(X11/Xcursor/Xcursor.h HAVE_XCURSOR_H)
|
||||
@@ -420,7 +432,7 @@ macro(CheckX11)
|
||||
endif()
|
||||
if(NOT HAVE_SHMAT)
|
||||
add_definitions(-DNO_SHARED_MEMORY)
|
||||
set(X_CFLAGS "${X_CFLAGS} -DNO_SHARED_MEMORY")
|
||||
list(APPEND EXTRA_CFLAGS "-DNO_SHARED_MEMORY")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -439,8 +451,6 @@ macro(CheckX11)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(SDL_CFLAGS "${SDL_CFLAGS} ${X_CFLAGS}")
|
||||
|
||||
set(CMAKE_REQUIRED_LIBRARIES ${X11_LIB} ${X11_LIB})
|
||||
check_c_source_compiles("
|
||||
#include <X11/Xlib.h>
|
||||
@@ -625,35 +635,6 @@ macro(CheckWayland)
|
||||
if(VIDEO_WAYLAND)
|
||||
pkg_check_modules(WAYLAND wayland-client wayland-scanner wayland-protocols wayland-egl wayland-cursor egl xkbcommon)
|
||||
|
||||
# We have to generate some protocol interface code for some various Wayland features.
|
||||
if(WAYLAND_FOUND)
|
||||
execute_process(
|
||||
COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=pkgdatadir wayland-client
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
|
||||
RESULT_VARIABLE WAYLAND_CORE_PROTOCOL_DIR_RC
|
||||
OUTPUT_VARIABLE WAYLAND_CORE_PROTOCOL_DIR
|
||||
ERROR_QUIET
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
if(NOT WAYLAND_CORE_PROTOCOL_DIR_RC EQUAL 0)
|
||||
set(WAYLAND_FOUND FALSE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WAYLAND_FOUND)
|
||||
execute_process(
|
||||
COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=pkgdatadir wayland-protocols
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
|
||||
RESULT_VARIABLE WAYLAND_PROTOCOLS_DIR_RC
|
||||
OUTPUT_VARIABLE WAYLAND_PROTOCOLS_DIR
|
||||
ERROR_QUIET
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
if(NOT WAYLAND_PROTOCOLS_DIR_RC EQUAL 0)
|
||||
set(WAYLAND_FOUND FALSE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WAYLAND_FOUND)
|
||||
execute_process(
|
||||
COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=wayland_scanner wayland-scanner
|
||||
@@ -685,11 +666,10 @@ macro(CheckWayland)
|
||||
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/wayland-generated-protocols")
|
||||
include_directories("${CMAKE_CURRENT_BINARY_DIR}/wayland-generated-protocols")
|
||||
|
||||
WaylandProtocolGen("${WAYLAND_SCANNER}" "${WAYLAND_CORE_PROTOCOL_DIR}/wayland.xml" "wayland")
|
||||
|
||||
foreach(_PROTL relative-pointer-unstable-v1 pointer-constraints-unstable-v1 xdg-shell-unstable-v6)
|
||||
string(REGEX REPLACE "\\-unstable\\-.*$" "" PROTSUBDIR ${_PROTL})
|
||||
WaylandProtocolGen("${WAYLAND_SCANNER}" "${WAYLAND_PROTOCOLS_DIR}/unstable/${PROTSUBDIR}/${_PROTL}.xml" "${_PROTL}")
|
||||
file(GLOB WAYLAND_PROTOCOLS_XML RELATIVE "${SDL2_SOURCE_DIR}/wayland-protocols/" "${SDL2_SOURCE_DIR}/wayland-protocols/*.xml")
|
||||
foreach(_XML ${WAYLAND_PROTOCOLS_XML})
|
||||
string(REGEX REPLACE "\\.xml$" "" _PROTL "${_XML}")
|
||||
WaylandProtocolGen("${WAYLAND_SCANNER}" "${SDL2_SOURCE_DIR}/wayland-protocols/${_XML}" "${_PROTL}")
|
||||
endforeach()
|
||||
|
||||
if(VIDEO_WAYLAND_QT_TOUCH)
|
||||
|
||||
349
configure
vendored
349
configure
vendored
@@ -785,6 +785,7 @@ enable_render
|
||||
enable_events
|
||||
enable_joystick
|
||||
enable_haptic
|
||||
enable_sensor
|
||||
enable_power
|
||||
enable_filesystem
|
||||
enable_threads
|
||||
@@ -866,7 +867,9 @@ enable_input_tslib
|
||||
enable_pthreads
|
||||
enable_pthread_sem
|
||||
enable_directx
|
||||
enable_wasapi
|
||||
enable_sdl_dlopen
|
||||
enable_hidapi
|
||||
enable_clock_gettime
|
||||
enable_rpath
|
||||
enable_render_d3d
|
||||
@@ -1521,6 +1524,7 @@ Optional Features:
|
||||
--enable-joystick Enable the joystick subsystem [[default=yes]]
|
||||
--enable-haptic Enable the haptic (force feedback) subsystem
|
||||
[[default=yes]]
|
||||
--enable-sensor Enable the sensor subsystem [[default=yes]]
|
||||
--enable-power Enable the power subsystem [[default=yes]]
|
||||
--enable-filesystem Enable the filesystem subsystem [[default=yes]]
|
||||
--enable-threads Enable the threading subsystem [[default=yes]]
|
||||
@@ -1572,7 +1576,7 @@ Optional Features:
|
||||
QtWayland server support for Wayland video driver
|
||||
[[default=yes]]
|
||||
--enable-wayland-shared dynamically load Wayland support [[default=maybe]]
|
||||
--enable-video-mir use Mir video driver [[default=yes]]
|
||||
--enable-video-mir use Mir video driver [[default=no]]
|
||||
--enable-mir-shared dynamically load Mir support [[default=maybe]]
|
||||
--enable-video-rpi use Raspberry Pi video driver [[default=yes]]
|
||||
--enable-video-x11 use X11 video driver [[default=yes]]
|
||||
@@ -1620,7 +1624,10 @@ Optional Features:
|
||||
[[default=yes]]
|
||||
--enable-pthread-sem use pthread semaphores [[default=yes]]
|
||||
--enable-directx use DirectX for Windows audio/video [[default=yes]]
|
||||
--enable-wasapi use the Windows WASAPI audio driver [[default=yes]]
|
||||
--enable-sdl-dlopen use dlopen for shared object loading [[default=yes]]
|
||||
--enable-hidapi use HIDAPI for low level joystick drivers
|
||||
[[default=no]]
|
||||
--enable-clock_gettime use clock_gettime() instead of gettimeofday() on
|
||||
UNIX [[default=yes]]
|
||||
--enable-rpath use an rpath when linking SDL [[default=yes]]
|
||||
@@ -2712,9 +2719,9 @@ orig_CFLAGS="$CFLAGS"
|
||||
#
|
||||
SDL_MAJOR_VERSION=2
|
||||
SDL_MINOR_VERSION=0
|
||||
SDL_MICRO_VERSION=8
|
||||
SDL_MICRO_VERSION=9
|
||||
SDL_INTERFACE_AGE=0
|
||||
SDL_BINARY_AGE=8
|
||||
SDL_BINARY_AGE=9
|
||||
SDL_VERSION=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION.$SDL_MICRO_VERSION
|
||||
|
||||
|
||||
@@ -15752,10 +15759,17 @@ EXTRA_LDFLAGS="$BASE_LDFLAGS"
|
||||
# fi
|
||||
#done
|
||||
SDL_CFLAGS="$BASE_CFLAGS"
|
||||
SDL_LIBS="-lSDL2 $BASE_LDFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $EXTRA_CFLAGS"
|
||||
CFLAGS="$CFLAGS $EXTRA_CFLAGS"
|
||||
LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS"
|
||||
SDL_LIBS="-lSDL2"
|
||||
if test "x$BASE_LDFLAGS" != x; then
|
||||
SDL_LIBS="$SDL_LIBS $BASE_LDFLAGS"
|
||||
fi
|
||||
if test "x$EXTRA_CFLAGS" != x; then
|
||||
CPPFLAGS="$CPPFLAGS $EXTRA_CFLAGS"
|
||||
CFLAGS="$CFLAGS $EXTRA_CFLAGS"
|
||||
fi
|
||||
if test "x$EXTRA_LDFLAGS" != x; then
|
||||
LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS"
|
||||
fi
|
||||
|
||||
base_libdir=`echo \${libdir} | sed 's/.*\/\(.*\)/\1/; q'`
|
||||
|
||||
@@ -16690,7 +16704,7 @@ if test "x$ac_cv_lib_m_pow" = xyes; then :
|
||||
LIBS="$LIBS -lm"; EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lm"
|
||||
fi
|
||||
|
||||
for ac_func in acos acosf asin asinf atan atanf atan2 atan2f ceil ceilf copysign copysignf cos cosf fabs fabsf floor floorf fmod fmodf log logf log10 log10f pow powf scalbn scalbnf sin sinf sqrt sqrtf tan tanf
|
||||
for ac_func in 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
|
||||
do :
|
||||
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
|
||||
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
|
||||
@@ -16764,7 +16778,7 @@ $as_echo "#define HAVE_SA_SIGACTION 1" >>confdefs.h
|
||||
fi
|
||||
|
||||
|
||||
for ac_header in libunwind.h
|
||||
for ac_header in libunwind.h
|
||||
do :
|
||||
ac_fn_c_check_header_mongrel "$LINENO" "libunwind.h" "ac_cv_header_libunwind_h" "$ac_includes_default"
|
||||
if test "x$ac_cv_header_libunwind_h" = xyes; then :
|
||||
@@ -16872,6 +16886,7 @@ SOURCES="$SOURCES $srcdir/src/power/*.c"
|
||||
#SOURCES="$SOURCES $srcdir/src/filesystem/*.c"
|
||||
SOURCES="$SOURCES $srcdir/src/render/*.c"
|
||||
SOURCES="$SOURCES $srcdir/src/render/*/*.c"
|
||||
SOURCES="$SOURCES $srcdir/src/sensor/*.c"
|
||||
SOURCES="$SOURCES $srcdir/src/stdlib/*.c"
|
||||
SOURCES="$SOURCES $srcdir/src/thread/*.c"
|
||||
SOURCES="$SOURCES $srcdir/src/timer/*.c"
|
||||
@@ -16977,6 +16992,20 @@ $as_echo "#define SDL_HAPTIC_DISABLED 1" >>confdefs.h
|
||||
else
|
||||
SUMMARY_modules="${SUMMARY_modules} haptic"
|
||||
fi
|
||||
# Check whether --enable-sensor was given.
|
||||
if test "${enable_sensor+set}" = set; then :
|
||||
enableval=$enable_sensor;
|
||||
else
|
||||
enable_sensor=yes
|
||||
fi
|
||||
|
||||
if test x$enable_sensor != xyes; then
|
||||
|
||||
$as_echo "#define SDL_SENSOR_DISABLED 1" >>confdefs.h
|
||||
|
||||
else
|
||||
SUMMARY_modules="${SUMMARY_modules} sensor"
|
||||
fi
|
||||
# Check whether --enable-power was given.
|
||||
if test "${enable_power+set}" = set; then :
|
||||
enableval=$enable_power;
|
||||
@@ -18368,7 +18397,7 @@ fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PulseAudio $PULSEAUDIO_REQUIRED_VERSION support" >&5
|
||||
$as_echo_n "checking for PulseAudio $PULSEAUDIO_REQUIRED_VERSION support... " >&6; }
|
||||
if test x$PKG_CONFIG != xno; then
|
||||
if $PKG_CONFIG --atleast-pkgconfig-version 0.7 && $PKG_CONFIG --atleast-version $PULSEAUDIO_REQUIRED_VERSION libpulse-simple; then
|
||||
if $PKG_CONFIG --atleast-pkgconfig-version 0.7 && $PKG_CONFIG --atleast-version $PULSEAUDIO_REQUIRED_VERSION libpulse-simple; then
|
||||
PULSEAUDIO_CFLAGS=`$PKG_CONFIG --cflags libpulse-simple`
|
||||
PULSEAUDIO_LIBS=`$PKG_CONFIG --libs libpulse-simple`
|
||||
audio_pulseaudio=yes
|
||||
@@ -19202,8 +19231,6 @@ $as_echo_n "checking for Wayland support... " >&6; }
|
||||
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`
|
||||
WAYLAND_CORE_PROTOCOL_DIR=`$PKG_CONFIG --variable=pkgdatadir wayland-client`
|
||||
WAYLAND_PROTOCOLS_DIR=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`
|
||||
video_wayland=yes
|
||||
fi
|
||||
fi
|
||||
@@ -19220,9 +19247,8 @@ $as_echo "#define SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
|
||||
WAYLAND_PROTOCOLS_UNSTABLE="relative-pointer-unstable-v1 pointer-constraints-unstable-v1 xdg-shell-unstable-v6"
|
||||
|
||||
SOURCES="$SOURCES $srcdir/src/video/wayland/*.c"
|
||||
WAYLAND_SOURCES="$srcdir/src/video/wayland/*.c"
|
||||
SOURCES="$SOURCES $WAYLAND_SOURCES"
|
||||
EXTRA_CFLAGS="$EXTRA_CFLAGS $WAYLAND_CFLAGS -I\$(gen)"
|
||||
# Check whether --enable-wayland-shared was given.
|
||||
if test "${enable_wayland_shared+set}" = set; then :
|
||||
@@ -19300,7 +19326,7 @@ CheckMir()
|
||||
if test "${enable_video_mir+set}" = set; then :
|
||||
enableval=$enable_video_mir;
|
||||
else
|
||||
enable_video_mir=yes
|
||||
enable_video_mir=no
|
||||
fi
|
||||
|
||||
|
||||
@@ -20457,7 +20483,7 @@ $as_echo_n "checking for XGenericEvent... " >&6; }
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
@@ -20801,13 +20827,13 @@ $as_echo "#define SDL_VIDEO_DRIVER_X11_XINPUT2 1" >>confdefs.h
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for xinput2 multitouch" >&5
|
||||
$as_echo_n "checking for xinput2 multitouch... " >&6; }
|
||||
have_xinput2_multitouch=no
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
have_xinput2_multitouch=no
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xproto.h>
|
||||
#include <X11/extensions/XInput2.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xproto.h>
|
||||
#include <X11/extensions/XInput2.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
@@ -20822,14 +20848,14 @@ XITouchClassInfo *t;
|
||||
_ACEOF
|
||||
if ac_fn_c_try_compile "$LINENO"; then :
|
||||
|
||||
have_xinput2_multitouch=yes
|
||||
$as_echo "#define SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH 1" >>confdefs.h
|
||||
have_xinput2_multitouch=yes
|
||||
$as_echo "#define SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH 1" >>confdefs.h
|
||||
|
||||
SUMMARY_video_x11="${SUMMARY_video_x11} xinput2_multitouch"
|
||||
SUMMARY_video_x11="${SUMMARY_video_x11} xinput2_multitouch"
|
||||
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_xinput2_multitouch" >&5
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_xinput2_multitouch" >&5
|
||||
$as_echo "$have_xinput2_multitouch" >&6; }
|
||||
fi
|
||||
# Check whether --enable-video-x11-xrandr was given.
|
||||
@@ -21475,6 +21501,9 @@ fi
|
||||
|
||||
$as_echo "#define SDL_VIDEO_DRIVER_DIRECTFB 1" >>confdefs.h
|
||||
|
||||
|
||||
$as_echo "#define SDL_VIDEO_RENDER_DIRECTFB 1" >>confdefs.h
|
||||
|
||||
SOURCES="$SOURCES $srcdir/src/video/directfb/*.c"
|
||||
EXTRA_CFLAGS="$EXTRA_CFLAGS $DIRECTFB_CFLAGS"
|
||||
|
||||
@@ -22018,6 +22047,24 @@ $as_echo "#define SDL_VIDEO_RENDER_OGL 1" >>confdefs.h
|
||||
fi
|
||||
}
|
||||
|
||||
CheckMacGLES()
|
||||
{
|
||||
if test x$enable_video = xyes -a x$enable_video_opengles = xyes; then
|
||||
video_opengl_egl=yes
|
||||
|
||||
$as_echo "#define SDL_VIDEO_OPENGL_EGL 1" >>confdefs.h
|
||||
|
||||
video_opengles_v2=yes
|
||||
|
||||
$as_echo "#define SDL_VIDEO_OPENGL_ES2 1" >>confdefs.h
|
||||
|
||||
|
||||
$as_echo "#define SDL_VIDEO_RENDER_OGL_ES2 1" >>confdefs.h
|
||||
|
||||
SUMMARY_video="${SUMMARY_video} opengl_es2"
|
||||
fi
|
||||
}
|
||||
|
||||
CheckEmscriptenGLES()
|
||||
{
|
||||
if test x$enable_video = xyes -a x$enable_video_opengles = xyes; then
|
||||
@@ -23118,20 +23165,6 @@ if test "x$ac_cv_header_xinput_h" = xyes; then :
|
||||
fi
|
||||
|
||||
|
||||
ac_fn_c_check_header_mongrel "$LINENO" "mmdeviceapi.h" "ac_cv_header_mmdeviceapi_h" "$ac_includes_default"
|
||||
if test "x$ac_cv_header_mmdeviceapi_h" = xyes; then :
|
||||
have_wasapi=yes
|
||||
fi
|
||||
|
||||
|
||||
ac_fn_c_check_header_mongrel "$LINENO" "audioclient.h" "ac_cv_header_audioclient_h" "$ac_includes_default"
|
||||
if test "x$ac_cv_header_audioclient_h" = xyes; then :
|
||||
|
||||
else
|
||||
have_wasapi=no
|
||||
fi
|
||||
|
||||
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
@@ -23218,6 +23251,45 @@ $as_echo "#define HAVE_XINPUT_STATE_EX 1" >>confdefs.h
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
ac_fn_c_check_header_mongrel "$LINENO" "mmdeviceapi.h" "ac_cv_header_mmdeviceapi_h" "$ac_includes_default"
|
||||
if test "x$ac_cv_header_mmdeviceapi_h" = xyes; then :
|
||||
have_wasapi=yes
|
||||
fi
|
||||
|
||||
|
||||
if test x$have_wasapi = xyes; then
|
||||
$as_echo "#define HAVE_MMDEVICEAPI_H 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
ac_fn_c_check_header_mongrel "$LINENO" "audioclient.h" "ac_cv_header_audioclient_h" "$ac_includes_default"
|
||||
if test "x$ac_cv_header_audioclient_h" = xyes; then :
|
||||
|
||||
else
|
||||
have_wasapi=no
|
||||
fi
|
||||
|
||||
|
||||
if test x$have_wasapi = xyes; then
|
||||
$as_echo "#define HAVE_AUDIOCLIENT_H 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
|
||||
ac_fn_c_check_header_mongrel "$LINENO" "endpointvolume.h" "ac_cv_header_endpointvolume_h" "$ac_includes_default"
|
||||
if test "x$ac_cv_header_endpointvolume_h" = xyes; then :
|
||||
$as_echo "#define HAVE_ENDPOINTVOLUME_H 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# Check whether --enable-wasapi was given.
|
||||
if test "${enable_wasapi+set}" = set; then :
|
||||
enableval=$enable_wasapi;
|
||||
else
|
||||
enable_wasapi=yes
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
CheckDLOPEN()
|
||||
@@ -23696,6 +23768,93 @@ $as_echo "#define SDL_JOYSTICK_USBHID 1" >>confdefs.h
|
||||
esac
|
||||
}
|
||||
|
||||
CheckHIDAPI()
|
||||
{
|
||||
# The hidraw support doesn't catch Xbox, PS4 and Nintendo controllers,
|
||||
# so we'll just use libusb when it's available.
|
||||
#
|
||||
# Except that libusb requires root permissions to open devices, so that's not generally useful, and we'll disable this by default.
|
||||
# Check whether --enable-hidapi was given.
|
||||
if test "${enable_hidapi+set}" = set; then :
|
||||
enableval=$enable_hidapi;
|
||||
else
|
||||
enable_hidapi=no
|
||||
fi
|
||||
|
||||
if test x$enable_joystick = xyes -a x$enable_hidapi = xyes; then
|
||||
hidapi_support=no
|
||||
# Extract the first word of "pkg-config", so it can be a program name with args.
|
||||
set dummy pkg-config; ac_word=$2
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
||||
$as_echo_n "checking for $ac_word... " >&6; }
|
||||
if ${ac_cv_path_PKG_CONFIG+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
case $PKG_CONFIG in
|
||||
[\\/]* | ?:[\\/]*)
|
||||
ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
|
||||
;;
|
||||
*)
|
||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
for as_dir in $PATH
|
||||
do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
IFS=$as_save_IFS
|
||||
|
||||
test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
|
||||
if test -n "$PKG_CONFIG"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
|
||||
$as_echo "$PKG_CONFIG" >&6; }
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
fi
|
||||
|
||||
|
||||
if test x$PKG_CONFIG != xno; then
|
||||
LIBUSB_CFLAGS=`$PKG_CONFIG --cflags libusb-1.0`
|
||||
LIBUSB_LDFLAGS=`$PKG_CONFIG --libs libusb-1.0`
|
||||
save_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$save_CFLAGS $LIBUSB_CFLAGS"
|
||||
ac_fn_c_check_header_mongrel "$LINENO" "libusb.h" "ac_cv_header_libusb_h" "$ac_includes_default"
|
||||
if test "x$ac_cv_header_libusb_h" = xyes; then :
|
||||
have_libusb_h=yes
|
||||
fi
|
||||
|
||||
|
||||
CFLAGS="$save_CFLAGS"
|
||||
fi
|
||||
if test x$have_libusb_h = xyes; then
|
||||
hidapi_support=yes
|
||||
|
||||
$as_echo "#define SDL_JOYSTICK_HIDAPI 1" >>confdefs.h
|
||||
|
||||
EXTRA_CFLAGS="$EXTRA_CFLAGS -I$srcdir/src/hidapi/hidapi"
|
||||
SOURCES="$SOURCES $srcdir/src/joystick/hidapi/*.c"
|
||||
SOURCES="$SOURCES $srcdir/src/hidapi/libusb/hid.c"
|
||||
EXTRA_CFLAGS="$EXTRA_CFLAGS $LIBUSB_CFLAGS"
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS $LIBUSB_LDFLAGS"
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hidapi support" >&5
|
||||
$as_echo_n "checking for hidapi support... " >&6; }
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hidapi_support" >&5
|
||||
$as_echo "$hidapi_support" >&6; }
|
||||
fi
|
||||
}
|
||||
|
||||
CheckClockGettime()
|
||||
{
|
||||
# Check whether --enable-clock_gettime was given.
|
||||
@@ -23907,6 +24066,7 @@ case "$host" in
|
||||
esac
|
||||
CheckTslib
|
||||
CheckUSBHID
|
||||
CheckHIDAPI
|
||||
CheckPTHREAD
|
||||
CheckClockGettime
|
||||
CheckLinuxVersion
|
||||
@@ -23995,6 +24155,18 @@ $as_echo "#define SDL_HAPTIC_ANDROID 1" >>confdefs.h
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
# Set up files for the sensor library
|
||||
if test x$enable_sensor = xyes; then
|
||||
case $ARCH in
|
||||
android)
|
||||
|
||||
$as_echo "#define SDL_SENSOR_ANDROID 1" >>confdefs.h
|
||||
|
||||
SOURCES="$SOURCES $srcdir/src/sensor/android/*.c"
|
||||
have_sensor=yes
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
# Set up files for the power library
|
||||
if test x$enable_power = xyes; then
|
||||
case $ARCH in
|
||||
@@ -24113,10 +24285,11 @@ $as_echo "#define SDL_AUDIO_DRIVER_DSOUND 1" >>confdefs.h
|
||||
|
||||
SOURCES="$SOURCES $srcdir/src/audio/directsound/*.c"
|
||||
fi
|
||||
if test x$have_wasapi = xyes; then
|
||||
if test x$have_wasapi = xyes -a x$enable_wasapi = xyes; then
|
||||
|
||||
$as_echo "#define SDL_AUDIO_DRIVER_WASAPI 1" >>confdefs.h
|
||||
|
||||
SUMMARY_audio="${SUMMARY_audio} wasapi"
|
||||
SOURCES="$SOURCES $srcdir/src/audio/wasapi/*.c"
|
||||
fi
|
||||
have_audio=yes
|
||||
@@ -24140,7 +24313,13 @@ $as_echo "#define SDL_JOYSTICK_DINPUT 1" >>confdefs.h
|
||||
$as_echo "#define SDL_JOYSTICK_WINMM 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
|
||||
$as_echo "#define SDL_JOYSTICK_HIDAPI 1" >>confdefs.h
|
||||
|
||||
SOURCES="$SOURCES $srcdir/src/joystick/windows/*.c"
|
||||
SOURCES="$SOURCES $srcdir/src/joystick/hidapi/*.c"
|
||||
SOURCES="$SOURCES $srcdir/src/hidapi/windows/hid.c"
|
||||
EXTRA_CFLAGS="$EXTRA_CFLAGS -I$srcdir/src/hidapi/hidapi"
|
||||
have_joystick=yes
|
||||
fi
|
||||
if test x$enable_haptic = xyes; then
|
||||
@@ -24204,7 +24383,7 @@ $as_echo "#define SDL_LOADSO_WINDOWS 1" >>confdefs.h
|
||||
else
|
||||
LIBUUID=-luuid
|
||||
fi
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lversion $LIBUUID -static-libgcc"
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lsetupapi -lversion $LIBUUID -static-libgcc"
|
||||
# The Windows platform requires special setup
|
||||
VERSION_SOURCES="$srcdir/src/main/windows/*.rc"
|
||||
SDLMAIN_SOURCES="$srcdir/src/main/windows/*.c"
|
||||
@@ -24461,6 +24640,7 @@ $as_echo "#define SDL_VIDEO_RENDER_OGL_ES2 1" >>confdefs.h
|
||||
CheckMETAL
|
||||
CheckX11
|
||||
CheckMacGL
|
||||
CheckMacGLES
|
||||
CheckOpenGLX11
|
||||
CheckVulkan
|
||||
CheckPTHREAD
|
||||
@@ -24480,7 +24660,13 @@ $as_echo "#define SDL_AUDIO_DRIVER_COREAUDIO 1" >>confdefs.h
|
||||
|
||||
$as_echo "#define SDL_JOYSTICK_IOKIT 1" >>confdefs.h
|
||||
|
||||
|
||||
$as_echo "#define SDL_JOYSTICK_HIDAPI 1" >>confdefs.h
|
||||
|
||||
SOURCES="$SOURCES $srcdir/src/joystick/darwin/*.c"
|
||||
SOURCES="$SOURCES $srcdir/src/joystick/hidapi/*.c"
|
||||
SOURCES="$SOURCES $srcdir/src/hidapi/mac/hid.c"
|
||||
EXTRA_CFLAGS="$EXTRA_CFLAGS -I$srcdir/src/hidapi/hidapi"
|
||||
have_joystick=yes
|
||||
fi
|
||||
# Set up files for the haptic library
|
||||
@@ -24633,7 +24819,7 @@ esac
|
||||
if test x$have_joystick != xyes; then
|
||||
if test x$enable_joystick = xyes; then
|
||||
|
||||
$as_echo "#define SDL_JOYSTICK_DISABLED 1" >>confdefs.h
|
||||
$as_echo "#define SDL_JOYSTICK_DUMMY 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
SOURCES="$SOURCES $srcdir/src/joystick/dummy/*.c"
|
||||
@@ -24641,11 +24827,19 @@ fi
|
||||
if test x$have_haptic != xyes; then
|
||||
if test x$enable_haptic = xyes; then
|
||||
|
||||
$as_echo "#define SDL_HAPTIC_DISABLED 1" >>confdefs.h
|
||||
$as_echo "#define SDL_HAPTIC_DUMMY 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
SOURCES="$SOURCES $srcdir/src/haptic/dummy/*.c"
|
||||
fi
|
||||
if test x$have_sensor != xyes; then
|
||||
if test x$enable_sensor = xyes; then
|
||||
|
||||
$as_echo "#define SDL_SENSOR_DUMMY 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
SOURCES="$SOURCES $srcdir/src/sensor/dummy/*.c"
|
||||
fi
|
||||
if test x$have_threads != xyes; then
|
||||
if test x$enable_threads = xyes; then
|
||||
|
||||
@@ -24684,54 +24878,27 @@ fi
|
||||
SDLTEST_SOURCES="$srcdir/src/test/*.c"
|
||||
|
||||
if test x$video_wayland = xyes; then
|
||||
WAYLAND_CORE_PROTOCOL_SOURCE='$(gen)/wayland-protocol.c'
|
||||
WAYLAND_CORE_PROTOCOL_HEADER='$(gen)/wayland-client-protocol.h'
|
||||
WAYLAND_PROTOCOLS_UNSTABLE_SOURCES=`echo $WAYLAND_PROTOCOLS_UNSTABLE |\
|
||||
sed 's,[^ ]\+,\\$(gen)/&-protocol.c,g'`
|
||||
WAYLAND_PROTOCOLS_UNSTABLE_HEADERS=`echo $WAYLAND_PROTOCOLS_UNSTABLE |\
|
||||
sed 's,[^ ]\+,\\$(gen)/&-client-protocol.h,g'`
|
||||
GEN_SOURCES="$GEN_SOURCES $WAYLAND_CORE_PROTOCOL_SOURCE $WAYLAND_PROTOCOLS_UNSTABLE_SOURCES"
|
||||
GEN_HEADERS="$GEN_HEADERS $WAYLAND_CORE_PROTOCOL_HEADER $WAYLAND_PROTOCOLS_UNSTABLE_HEADERS"
|
||||
WAYLAND_PROTOCOLS=`cd $srcdir/wayland-protocols ; for p in *.xml ; do echo -n "\$p" |sed 's,\\.xml\$, ,g' ; done`
|
||||
WAYLAND_PROTOCOLS_SOURCES=`for p in $WAYLAND_PROTOCOLS ; do echo -n "\\$(gen)/\$p-protocol.c " ; done`
|
||||
WAYLAND_PROTOCOLS_HEADERS=`for p in $WAYLAND_PROTOCOLS ; do echo -n "\\$(gen)/\$p-client-protocol.h " ; done`
|
||||
GEN_SOURCES="$GEN_SOURCES $WAYLAND_PROTOCOLS_SOURCES"
|
||||
GEN_HEADERS="$GEN_HEADERS $WAYLAND_PROTOCOLS_HEADERS"
|
||||
|
||||
WAYLAND_CORE_PROTOCOL_SOURCE_DEPENDS="
|
||||
$WAYLAND_CORE_PROTOCOL_SOURCE: $WAYLAND_CORE_PROTOCOL_DIR/wayland.xml
|
||||
\$(SHELL) \$(auxdir)/mkinstalldirs \$(gen)
|
||||
\$(RUN_CMD_GEN)\$(WAYLAND_SCANNER) code \$< \$@"
|
||||
|
||||
WAYLAND_CORE_PROTOCOL_HEADER_DEPENDS="
|
||||
$WAYLAND_CORE_PROTOCOL_HEADER: $WAYLAND_CORE_PROTOCOL_DIR/wayland.xml
|
||||
\$(SHELL) \$(auxdir)/mkinstalldirs \$(gen)
|
||||
\$(RUN_CMD_GEN)\$(WAYLAND_SCANNER) client-header \$< \$@"
|
||||
|
||||
WAYLAND_CORE_PROTOCOL_OBJECT="
|
||||
\$(objects)/`echo $WAYLAND_CORE_PROTOCOL_SOURCE | sed 's/\$(gen)\/\(.*\).c$/\1.lo/'`: $WAYLAND_CORE_PROTOCOL_SOURCE
|
||||
\$(RUN_CMD_CC)\$(LIBTOOL) --tag=CC --mode=compile \$(CC) \$(CFLAGS) \$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \$< -o \$@"
|
||||
|
||||
WAYLAND_PROTOCOLS_CLIENT_HEADER_UNSTABLE_DEPENDS=`for p in $WAYLAND_PROTOCOLS_UNSTABLE;\
|
||||
do echo ; echo \$p | sed\
|
||||
"s,^\\([a-z\\-]\\+\\)-unstable-\\(v[0-9]\+\\)\$,\\$(gen)/&-client-protocol.h: $WAYLAND_PROTOCOLS_DIR/unstable/\1/&.xml\\\\
|
||||
\\$(SHELL) \\$(auxdir)/mkinstalldirs \\$(gen)\\\\
|
||||
\\$(RUN_CMD_GEN)\\$(WAYLAND_SCANNER) client-header \\$< \\$@," ; done`
|
||||
|
||||
WAYLAND_PROTOCOLS_CODE_UNSTABLE_DEPENDS=`for p in $WAYLAND_PROTOCOLS_UNSTABLE;\
|
||||
do echo ; echo \$p | sed\
|
||||
"s,^\\([a-z\\-]\\+\\)-unstable-\\(v[0-9]\+\\)\$,\\$(gen)/&-protocol.c: $WAYLAND_PROTOCOLS_DIR/unstable/\1/&.xml\\\\
|
||||
\\$(SHELL) \\$(auxdir)/mkinstalldirs \\$(gen)\\\\
|
||||
\\$(RUN_CMD_GEN)\\$(WAYLAND_SCANNER) code \\$< \\$@," ; done`
|
||||
|
||||
WAYLAND_PROTOCOLS_OBJECTS_UNSTABLE=`for p in $WAYLAND_PROTOCOLS_UNSTABLE;\
|
||||
do echo ; echo \$p | sed\
|
||||
"s,^\\([a-z\\-]\\+\\)-unstable-\\(v[0-9]\+\\)\$,\\\$(objects)/&-protocol.lo: \\$(gen)/&-protocol.c \\$(gen)/&-client-protocol.h\\\\
|
||||
\\$(RUN_CMD_CC)\\$(LIBTOOL) --tag=CC --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@," ; done`
|
||||
|
||||
WAYLAND_PROTOCOLS_DEPENDS="
|
||||
$WAYLAND_CORE_PROTOCOL_SOURCE_DEPENDS
|
||||
$WAYLAND_CORE_PROTOCOL_HEADER_DEPENDS
|
||||
$WAYLAND_CORE_PROTOCOL_OBJECT
|
||||
$WAYLAND_PROTOCOLS_CLIENT_HEADER_UNSTABLE_DEPENDS
|
||||
$WAYLAND_PROTOCOLS_CODE_UNSTABLE_DEPENDS
|
||||
$WAYLAND_PROTOCOLS_OBJECTS_UNSTABLE
|
||||
"
|
||||
WAYLAND_PROTOCOLS_DEPENDS=`for p in $WAYLAND_PROTOCOLS ; do\
|
||||
echo ;\
|
||||
echo "\\$(gen)/\$p-client-protocol.h: \\$(srcdir)/wayland-protocols/\$p.xml" ;\
|
||||
echo " @\\$(SHELL) \\$(auxdir)/mkinstalldirs \\$(gen)" ;\
|
||||
echo " \\$(RUN_CMD_GEN)\\$(WAYLAND_SCANNER) client-header \\$< \\$@" ;\
|
||||
echo ;\
|
||||
echo "\\$(gen)/\$p-protocol.c: \\$(srcdir)/wayland-protocols/\$p.xml" ;\
|
||||
echo " @\\$(SHELL) \\$(auxdir)/mkinstalldirs \\$(gen)" ;\
|
||||
echo " \\$(RUN_CMD_GEN)\\$(WAYLAND_SCANNER) code \\$< \\$@" ;\
|
||||
echo ;\
|
||||
echo "\\$(objects)/\$p-protocol.lo: \\$(gen)/\$p-protocol.c \\$(gen)/\$p-client-protocol.h" ;\
|
||||
echo " \\$(RUN_CMD_CC)\\$(LIBTOOL) --tag=CC --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@" ;\
|
||||
done ;\
|
||||
echo ;\
|
||||
for s in $WAYLAND_SOURCES ; do echo -n "\$s:" ; for p in $WAYLAND_PROTOCOLS ; do echo -n " \\$(gen)/\$p-client-protocol.h" ; done ; echo ; done ; echo`
|
||||
fi
|
||||
|
||||
OBJECTS=`echo $SOURCES`
|
||||
|
||||
235
configure.in
235
configure.in
@@ -20,9 +20,9 @@ dnl Set various version strings - taken gratefully from the GTk sources
|
||||
#
|
||||
SDL_MAJOR_VERSION=2
|
||||
SDL_MINOR_VERSION=0
|
||||
SDL_MICRO_VERSION=8
|
||||
SDL_MICRO_VERSION=9
|
||||
SDL_INTERFACE_AGE=0
|
||||
SDL_BINARY_AGE=8
|
||||
SDL_BINARY_AGE=9
|
||||
SDL_VERSION=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION.$SDL_MICRO_VERSION
|
||||
|
||||
AC_SUBST(SDL_MAJOR_VERSION)
|
||||
@@ -123,10 +123,17 @@ EXTRA_LDFLAGS="$BASE_LDFLAGS"
|
||||
# fi
|
||||
#done
|
||||
SDL_CFLAGS="$BASE_CFLAGS"
|
||||
SDL_LIBS="-lSDL2 $BASE_LDFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $EXTRA_CFLAGS"
|
||||
CFLAGS="$CFLAGS $EXTRA_CFLAGS"
|
||||
LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS"
|
||||
SDL_LIBS="-lSDL2"
|
||||
if test "x$BASE_LDFLAGS" != x; then
|
||||
SDL_LIBS="$SDL_LIBS $BASE_LDFLAGS"
|
||||
fi
|
||||
if test "x$EXTRA_CFLAGS" != x; then
|
||||
CPPFLAGS="$CPPFLAGS $EXTRA_CFLAGS"
|
||||
CFLAGS="$CFLAGS $EXTRA_CFLAGS"
|
||||
fi
|
||||
if test "x$EXTRA_LDFLAGS" != x; then
|
||||
LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS"
|
||||
fi
|
||||
|
||||
dnl set this to use on systems that use lib64 instead of lib
|
||||
base_libdir=`echo \${libdir} | sed 's/.*\/\(.*\)/\1/; q'`
|
||||
@@ -271,14 +278,14 @@ if test x$enable_libc = xyes; then
|
||||
AC_CHECK_FUNCS(malloc calloc realloc free getenv setenv putenv unsetenv qsort abs bcopy memset memcpy memmove wcslen wcscmp strlen strlcpy strlcat _strrev _strupr _strlwr strchr strrchr strstr itoa _ltoa _uitoa _ultoa strtol strtoul _i64toa _ui64toa strtoll strtoull atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp vsscanf vsnprintf fopen64 fseeko fseeko64 sigaction setjmp nanosleep sysconf sysctlbyname getauxval poll)
|
||||
|
||||
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 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 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)
|
||||
|
||||
AC_CHECK_MEMBER(struct sigaction.sa_sigaction,[AC_DEFINE([HAVE_SA_SIGACTION], 1, [ ])], ,[#include <signal.h>])
|
||||
|
||||
dnl Check for additional non-standard headers
|
||||
dnl Check for additional non-standard headers
|
||||
AC_CHECK_HEADERS(libunwind.h)
|
||||
fi
|
||||
|
||||
@@ -339,6 +346,7 @@ SOURCES="$SOURCES $srcdir/src/power/*.c"
|
||||
#SOURCES="$SOURCES $srcdir/src/filesystem/*.c"
|
||||
SOURCES="$SOURCES $srcdir/src/render/*.c"
|
||||
SOURCES="$SOURCES $srcdir/src/render/*/*.c"
|
||||
SOURCES="$SOURCES $srcdir/src/sensor/*.c"
|
||||
SOURCES="$SOURCES $srcdir/src/stdlib/*.c"
|
||||
SOURCES="$SOURCES $srcdir/src/thread/*.c"
|
||||
SOURCES="$SOURCES $srcdir/src/timer/*.c"
|
||||
@@ -403,6 +411,14 @@ if test x$enable_haptic != xyes; then
|
||||
else
|
||||
SUMMARY_modules="${SUMMARY_modules} haptic"
|
||||
fi
|
||||
AC_ARG_ENABLE(sensor,
|
||||
AC_HELP_STRING([--enable-sensor], [Enable the sensor subsystem [[default=yes]]]),
|
||||
, enable_sensor=yes)
|
||||
if test x$enable_sensor != xyes; then
|
||||
AC_DEFINE(SDL_SENSOR_DISABLED, 1, [ ])
|
||||
else
|
||||
SUMMARY_modules="${SUMMARY_modules} sensor"
|
||||
fi
|
||||
AC_ARG_ENABLE(power,
|
||||
AC_HELP_STRING([--enable-power], [Enable the power subsystem [[default=yes]]]),
|
||||
, enable_power=yes)
|
||||
@@ -956,7 +972,7 @@ AC_HELP_STRING([--enable-pulseaudio], [use PulseAudio [[default=yes]]]),
|
||||
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
|
||||
AC_MSG_CHECKING(for PulseAudio $PULSEAUDIO_REQUIRED_VERSION support)
|
||||
if test x$PKG_CONFIG != xno; then
|
||||
if $PKG_CONFIG --atleast-pkgconfig-version 0.7 && $PKG_CONFIG --atleast-version $PULSEAUDIO_REQUIRED_VERSION libpulse-simple; then
|
||||
if $PKG_CONFIG --atleast-pkgconfig-version 0.7 && $PKG_CONFIG --atleast-version $PULSEAUDIO_REQUIRED_VERSION libpulse-simple; then
|
||||
PULSEAUDIO_CFLAGS=`$PKG_CONFIG --cflags libpulse-simple`
|
||||
PULSEAUDIO_LIBS=`$PKG_CONFIG --libs libpulse-simple`
|
||||
audio_pulseaudio=yes
|
||||
@@ -1396,8 +1412,6 @@ AC_HELP_STRING([--enable-video-wayland-qt-touch], [QtWayland server support for
|
||||
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`
|
||||
WAYLAND_CORE_PROTOCOL_DIR=`$PKG_CONFIG --variable=pkgdatadir wayland-client`
|
||||
WAYLAND_PROTOCOLS_DIR=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`
|
||||
video_wayland=yes
|
||||
fi
|
||||
fi
|
||||
@@ -1409,9 +1423,8 @@ AC_HELP_STRING([--enable-video-wayland-qt-touch], [QtWayland server support for
|
||||
AC_DEFINE(SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH, 1, [ ])
|
||||
fi
|
||||
|
||||
WAYLAND_PROTOCOLS_UNSTABLE="relative-pointer-unstable-v1 pointer-constraints-unstable-v1 xdg-shell-unstable-v6"
|
||||
|
||||
SOURCES="$SOURCES $srcdir/src/video/wayland/*.c"
|
||||
WAYLAND_SOURCES="$srcdir/src/video/wayland/*.c"
|
||||
SOURCES="$SOURCES $WAYLAND_SOURCES"
|
||||
EXTRA_CFLAGS="$EXTRA_CFLAGS $WAYLAND_CFLAGS -I\$(gen)"
|
||||
AC_ARG_ENABLE(wayland-shared,
|
||||
AC_HELP_STRING([--enable-wayland-shared], [dynamically load Wayland support [[default=maybe]]]),
|
||||
@@ -1744,7 +1757,7 @@ AC_HELP_STRING([--enable-x11-shared], [dynamically load X11 support [[default=ma
|
||||
AC_MSG_CHECKING([for XGenericEvent])
|
||||
have_XGenericEvent=no
|
||||
AC_TRY_COMPILE([
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xlib.h>
|
||||
],[
|
||||
Display *display;
|
||||
XEvent event;
|
||||
@@ -1858,20 +1871,20 @@ AC_HELP_STRING([--enable-video-x11-xinput], [enable X11 XInput extension for man
|
||||
SUMMARY_video_x11="${SUMMARY_video_x11} xinput2"
|
||||
AC_DEFINE(SDL_VIDEO_DRIVER_X11_XINPUT2, 1, [ ])
|
||||
AC_MSG_CHECKING(for xinput2 multitouch)
|
||||
have_xinput2_multitouch=no
|
||||
AC_TRY_COMPILE([
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xproto.h>
|
||||
#include <X11/extensions/XInput2.h>
|
||||
],[
|
||||
have_xinput2_multitouch=no
|
||||
AC_TRY_COMPILE([
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xproto.h>
|
||||
#include <X11/extensions/XInput2.h>
|
||||
],[
|
||||
int event_type = XI_TouchBegin;
|
||||
XITouchClassInfo *t;
|
||||
],[
|
||||
have_xinput2_multitouch=yes
|
||||
AC_DEFINE([SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH], 1, [])
|
||||
SUMMARY_video_x11="${SUMMARY_video_x11} xinput2_multitouch"
|
||||
])
|
||||
AC_MSG_RESULT($have_xinput2_multitouch)
|
||||
],[
|
||||
have_xinput2_multitouch=yes
|
||||
AC_DEFINE([SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH], 1, [])
|
||||
SUMMARY_video_x11="${SUMMARY_video_x11} xinput2_multitouch"
|
||||
])
|
||||
AC_MSG_RESULT($have_xinput2_multitouch)
|
||||
fi
|
||||
AC_ARG_ENABLE(video-x11-xrandr,
|
||||
AC_HELP_STRING([--enable-video-x11-xrandr], [enable X11 Xrandr extension for fullscreen [[default=yes]]]),
|
||||
@@ -2150,6 +2163,7 @@ AC_HELP_STRING([--enable-directfb-shared], [dynamically load directfb support [[
|
||||
, enable_directfb_shared=yes)
|
||||
|
||||
AC_DEFINE(SDL_VIDEO_DRIVER_DIRECTFB, 1, [ ])
|
||||
AC_DEFINE(SDL_VIDEO_RENDER_DIRECTFB, 1, [ ])
|
||||
SOURCES="$SOURCES $srcdir/src/video/directfb/*.c"
|
||||
EXTRA_CFLAGS="$EXTRA_CFLAGS $DIRECTFB_CFLAGS"
|
||||
|
||||
@@ -2462,6 +2476,19 @@ CheckMacGL()
|
||||
fi
|
||||
}
|
||||
|
||||
dnl Check for MacOS OpenGLES
|
||||
CheckMacGLES()
|
||||
{
|
||||
if test x$enable_video = xyes -a x$enable_video_opengles = xyes; then
|
||||
video_opengl_egl=yes
|
||||
AC_DEFINE(SDL_VIDEO_OPENGL_EGL, 1, [ ])
|
||||
video_opengles_v2=yes
|
||||
AC_DEFINE(SDL_VIDEO_OPENGL_ES2, 1, [ ])
|
||||
AC_DEFINE(SDL_VIDEO_RENDER_OGL_ES2, 1, [ ])
|
||||
SUMMARY_video="${SUMMARY_video} opengl_es2"
|
||||
fi
|
||||
}
|
||||
|
||||
CheckEmscriptenGLES()
|
||||
{
|
||||
if test x$enable_video = xyes -a x$enable_video_opengles = xyes; then
|
||||
@@ -3025,8 +3052,6 @@ AC_HELP_STRING([--enable-directx], [use DirectX for Windows audio/video [[defaul
|
||||
AC_CHECK_HEADER(dinput.h, have_dinput=yes)
|
||||
AC_CHECK_HEADER(dxgi.h, have_dxgi=yes)
|
||||
AC_CHECK_HEADER(xinput.h, have_xinput=yes)
|
||||
AC_CHECK_HEADER(mmdeviceapi.h, have_wasapi=yes)
|
||||
AC_CHECK_HEADER(audioclient.h,,have_wasapi=no)
|
||||
AC_TRY_COMPILE([
|
||||
#include <windows.h>
|
||||
#include <xinput.h>
|
||||
@@ -3071,6 +3096,21 @@ XINPUT_STATE_EX s1;
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
AC_CHECK_HEADER(mmdeviceapi.h, have_wasapi=yes)
|
||||
if test x$have_wasapi = xyes; then
|
||||
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,[])
|
||||
fi
|
||||
|
||||
AC_CHECK_HEADER(endpointvolume.h,AC_DEFINE(HAVE_ENDPOINTVOLUME_H,1,[]))
|
||||
|
||||
AC_ARG_ENABLE(wasapi,
|
||||
AC_HELP_STRING([--enable-wasapi], [use the Windows WASAPI audio driver [[default=yes]]]),
|
||||
, enable_wasapi=yes)
|
||||
}
|
||||
|
||||
dnl Check for the dlfcn.h interface for dynamically loading objects
|
||||
@@ -3244,6 +3284,41 @@ CheckUSBHID()
|
||||
esac
|
||||
}
|
||||
|
||||
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.
|
||||
#
|
||||
# Except that libusb requires root permissions to open devices, so that's not generally useful, and we'll disable this by default.
|
||||
AC_ARG_ENABLE(hidapi,
|
||||
AC_HELP_STRING([--enable-hidapi], [use HIDAPI for low level joystick drivers [[default=no]]]),
|
||||
, enable_hidapi=no)
|
||||
if test x$enable_joystick = xyes -a x$enable_hidapi = xyes; then
|
||||
hidapi_support=no
|
||||
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
|
||||
if test x$PKG_CONFIG != xno; then
|
||||
LIBUSB_CFLAGS=`$PKG_CONFIG --cflags libusb-1.0`
|
||||
LIBUSB_LDFLAGS=`$PKG_CONFIG --libs libusb-1.0`
|
||||
save_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$save_CFLAGS $LIBUSB_CFLAGS"
|
||||
AC_CHECK_HEADER(libusb.h, have_libusb_h=yes)
|
||||
CFLAGS="$save_CFLAGS"
|
||||
fi
|
||||
if test x$have_libusb_h = xyes; then
|
||||
hidapi_support=yes
|
||||
AC_DEFINE(SDL_JOYSTICK_HIDAPI, 1, [ ])
|
||||
EXTRA_CFLAGS="$EXTRA_CFLAGS -I$srcdir/src/hidapi/hidapi"
|
||||
SOURCES="$SOURCES $srcdir/src/joystick/hidapi/*.c"
|
||||
SOURCES="$SOURCES $srcdir/src/hidapi/libusb/hid.c"
|
||||
EXTRA_CFLAGS="$EXTRA_CFLAGS $LIBUSB_CFLAGS"
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS $LIBUSB_LDFLAGS"
|
||||
fi
|
||||
AC_MSG_CHECKING(for hidapi support)
|
||||
AC_MSG_RESULT($hidapi_support)
|
||||
fi
|
||||
}
|
||||
|
||||
dnl Check for clock_gettime()
|
||||
CheckClockGettime()
|
||||
{
|
||||
@@ -3365,6 +3440,7 @@ case "$host" in
|
||||
esac
|
||||
CheckTslib
|
||||
CheckUSBHID
|
||||
CheckHIDAPI
|
||||
CheckPTHREAD
|
||||
CheckClockGettime
|
||||
CheckLinuxVersion
|
||||
@@ -3437,6 +3513,16 @@ case "$host" in
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
# Set up files for the sensor library
|
||||
if test x$enable_sensor = xyes; then
|
||||
case $ARCH in
|
||||
android)
|
||||
AC_DEFINE(SDL_SENSOR_ANDROID, 1, [ ])
|
||||
SOURCES="$SOURCES $srcdir/src/sensor/android/*.c"
|
||||
have_sensor=yes
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
# Set up files for the power library
|
||||
if test x$enable_power = xyes; then
|
||||
case $ARCH in
|
||||
@@ -3531,8 +3617,9 @@ AC_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
|
||||
AC_DEFINE(SDL_AUDIO_DRIVER_DSOUND, 1, [ ])
|
||||
SOURCES="$SOURCES $srcdir/src/audio/directsound/*.c"
|
||||
fi
|
||||
if test x$have_wasapi = xyes; then
|
||||
if test x$have_wasapi = xyes -a x$enable_wasapi = xyes; then
|
||||
AC_DEFINE(SDL_AUDIO_DRIVER_WASAPI, 1, [ ])
|
||||
SUMMARY_audio="${SUMMARY_audio} wasapi"
|
||||
SOURCES="$SOURCES $srcdir/src/audio/wasapi/*.c"
|
||||
fi
|
||||
have_audio=yes
|
||||
@@ -3550,7 +3637,11 @@ AC_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
|
||||
else
|
||||
AC_DEFINE(SDL_JOYSTICK_WINMM, 1, [ ])
|
||||
fi
|
||||
AC_DEFINE(SDL_JOYSTICK_HIDAPI, 1, [ ])
|
||||
SOURCES="$SOURCES $srcdir/src/joystick/windows/*.c"
|
||||
SOURCES="$SOURCES $srcdir/src/joystick/hidapi/*.c"
|
||||
SOURCES="$SOURCES $srcdir/src/hidapi/windows/hid.c"
|
||||
EXTRA_CFLAGS="$EXTRA_CFLAGS -I$srcdir/src/hidapi/hidapi"
|
||||
have_joystick=yes
|
||||
fi
|
||||
if test x$enable_haptic = xyes; then
|
||||
@@ -3600,7 +3691,7 @@ AC_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
|
||||
else
|
||||
LIBUUID=-luuid
|
||||
fi
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lversion $LIBUUID -static-libgcc"
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lsetupapi -lversion $LIBUUID -static-libgcc"
|
||||
# The Windows platform requires special setup
|
||||
VERSION_SOURCES="$srcdir/src/main/windows/*.rc"
|
||||
SDLMAIN_SOURCES="$srcdir/src/main/windows/*.c"
|
||||
@@ -3773,6 +3864,7 @@ AC_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
|
||||
CheckMETAL
|
||||
CheckX11
|
||||
CheckMacGL
|
||||
CheckMacGLES
|
||||
CheckOpenGLX11
|
||||
CheckVulkan
|
||||
CheckPTHREAD
|
||||
@@ -3788,7 +3880,11 @@ AC_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
|
||||
# Set up files for the joystick library
|
||||
if test x$enable_joystick = xyes; then
|
||||
AC_DEFINE(SDL_JOYSTICK_IOKIT, 1, [ ])
|
||||
AC_DEFINE(SDL_JOYSTICK_HIDAPI, 1, [ ])
|
||||
SOURCES="$SOURCES $srcdir/src/joystick/darwin/*.c"
|
||||
SOURCES="$SOURCES $srcdir/src/joystick/hidapi/*.c"
|
||||
SOURCES="$SOURCES $srcdir/src/hidapi/mac/hid.c"
|
||||
EXTRA_CFLAGS="$EXTRA_CFLAGS -I$srcdir/src/hidapi/hidapi"
|
||||
have_joystick=yes
|
||||
fi
|
||||
# Set up files for the haptic library
|
||||
@@ -3916,16 +4012,22 @@ esac
|
||||
|
||||
if test x$have_joystick != xyes; then
|
||||
if test x$enable_joystick = xyes; then
|
||||
AC_DEFINE(SDL_JOYSTICK_DISABLED, 1, [ ])
|
||||
AC_DEFINE(SDL_JOYSTICK_DUMMY, 1, [ ])
|
||||
fi
|
||||
SOURCES="$SOURCES $srcdir/src/joystick/dummy/*.c"
|
||||
fi
|
||||
if test x$have_haptic != xyes; then
|
||||
if test x$enable_haptic = xyes; then
|
||||
AC_DEFINE(SDL_HAPTIC_DISABLED, 1, [ ])
|
||||
AC_DEFINE(SDL_HAPTIC_DUMMY, 1, [ ])
|
||||
fi
|
||||
SOURCES="$SOURCES $srcdir/src/haptic/dummy/*.c"
|
||||
fi
|
||||
if test x$have_sensor != xyes; then
|
||||
if test x$enable_sensor = xyes; then
|
||||
AC_DEFINE(SDL_SENSOR_DUMMY, 1, [ ])
|
||||
fi
|
||||
SOURCES="$SOURCES $srcdir/src/sensor/dummy/*.c"
|
||||
fi
|
||||
if test x$have_threads != xyes; then
|
||||
if test x$enable_threads = xyes; then
|
||||
AC_DEFINE(SDL_THREADS_DISABLED, 1, [ ])
|
||||
@@ -3956,54 +4058,27 @@ fi
|
||||
SDLTEST_SOURCES="$srcdir/src/test/*.c"
|
||||
|
||||
if test x$video_wayland = xyes; then
|
||||
WAYLAND_CORE_PROTOCOL_SOURCE='$(gen)/wayland-protocol.c'
|
||||
WAYLAND_CORE_PROTOCOL_HEADER='$(gen)/wayland-client-protocol.h'
|
||||
WAYLAND_PROTOCOLS_UNSTABLE_SOURCES=`echo $WAYLAND_PROTOCOLS_UNSTABLE |\
|
||||
sed 's,[[^ ]]\+,\\$(gen)/&-protocol.c,g'`
|
||||
WAYLAND_PROTOCOLS_UNSTABLE_HEADERS=`echo $WAYLAND_PROTOCOLS_UNSTABLE |\
|
||||
sed 's,[[^ ]]\+,\\$(gen)/&-client-protocol.h,g'`
|
||||
GEN_SOURCES="$GEN_SOURCES $WAYLAND_CORE_PROTOCOL_SOURCE $WAYLAND_PROTOCOLS_UNSTABLE_SOURCES"
|
||||
GEN_HEADERS="$GEN_HEADERS $WAYLAND_CORE_PROTOCOL_HEADER $WAYLAND_PROTOCOLS_UNSTABLE_HEADERS"
|
||||
WAYLAND_PROTOCOLS=`cd $srcdir/wayland-protocols ; for p in *.xml ; do echo -n "\$p" |sed 's,\\.xml\$, ,g' ; done`
|
||||
WAYLAND_PROTOCOLS_SOURCES=`for p in $WAYLAND_PROTOCOLS ; do echo -n "\\$(gen)/\$p-protocol.c " ; done`
|
||||
WAYLAND_PROTOCOLS_HEADERS=`for p in $WAYLAND_PROTOCOLS ; do echo -n "\\$(gen)/\$p-client-protocol.h " ; done`
|
||||
GEN_SOURCES="$GEN_SOURCES $WAYLAND_PROTOCOLS_SOURCES"
|
||||
GEN_HEADERS="$GEN_HEADERS $WAYLAND_PROTOCOLS_HEADERS"
|
||||
|
||||
WAYLAND_CORE_PROTOCOL_SOURCE_DEPENDS="
|
||||
$WAYLAND_CORE_PROTOCOL_SOURCE: $WAYLAND_CORE_PROTOCOL_DIR/wayland.xml
|
||||
\$(SHELL) \$(auxdir)/mkinstalldirs \$(gen)
|
||||
\$(RUN_CMD_GEN)\$(WAYLAND_SCANNER) code \$< \$@"
|
||||
|
||||
WAYLAND_CORE_PROTOCOL_HEADER_DEPENDS="
|
||||
$WAYLAND_CORE_PROTOCOL_HEADER: $WAYLAND_CORE_PROTOCOL_DIR/wayland.xml
|
||||
\$(SHELL) \$(auxdir)/mkinstalldirs \$(gen)
|
||||
\$(RUN_CMD_GEN)\$(WAYLAND_SCANNER) client-header \$< \$@"
|
||||
|
||||
WAYLAND_CORE_PROTOCOL_OBJECT="
|
||||
\$(objects)/`echo $WAYLAND_CORE_PROTOCOL_SOURCE | sed 's/\$(gen)\/\(.*\).c$/\1.lo/'`: $WAYLAND_CORE_PROTOCOL_SOURCE
|
||||
\$(RUN_CMD_CC)\$(LIBTOOL) --tag=CC --mode=compile \$(CC) \$(CFLAGS) \$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \$< -o \$@"
|
||||
|
||||
WAYLAND_PROTOCOLS_CLIENT_HEADER_UNSTABLE_DEPENDS=`for p in $WAYLAND_PROTOCOLS_UNSTABLE;\
|
||||
do echo ; echo \$p | sed\
|
||||
"s,^\\([[a-z\\-]]\\+\\)-unstable-\\(v[[0-9]]\+\\)\$,\\$(gen)/&-client-protocol.h: $WAYLAND_PROTOCOLS_DIR/unstable/\1/&.xml\\\\
|
||||
\\$(SHELL) \\$(auxdir)/mkinstalldirs \\$(gen)\\\\
|
||||
\\$(RUN_CMD_GEN)\\$(WAYLAND_SCANNER) client-header \\$< \\$@," ; done`
|
||||
|
||||
WAYLAND_PROTOCOLS_CODE_UNSTABLE_DEPENDS=`for p in $WAYLAND_PROTOCOLS_UNSTABLE;\
|
||||
do echo ; echo \$p | sed\
|
||||
"s,^\\([[a-z\\-]]\\+\\)-unstable-\\(v[[0-9]]\+\\)\$,\\$(gen)/&-protocol.c: $WAYLAND_PROTOCOLS_DIR/unstable/\1/&.xml\\\\
|
||||
\\$(SHELL) \\$(auxdir)/mkinstalldirs \\$(gen)\\\\
|
||||
\\$(RUN_CMD_GEN)\\$(WAYLAND_SCANNER) code \\$< \\$@," ; done`
|
||||
|
||||
WAYLAND_PROTOCOLS_OBJECTS_UNSTABLE=`for p in $WAYLAND_PROTOCOLS_UNSTABLE;\
|
||||
do echo ; echo \$p | sed\
|
||||
"s,^\\([[a-z\\-]]\\+\\)-unstable-\\(v[[0-9]]\+\\)\$,\\\$(objects)/&-protocol.lo: \\$(gen)/&-protocol.c \\$(gen)/&-client-protocol.h\\\\
|
||||
\\$(RUN_CMD_CC)\\$(LIBTOOL) --tag=CC --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@," ; done`
|
||||
|
||||
WAYLAND_PROTOCOLS_DEPENDS="
|
||||
$WAYLAND_CORE_PROTOCOL_SOURCE_DEPENDS
|
||||
$WAYLAND_CORE_PROTOCOL_HEADER_DEPENDS
|
||||
$WAYLAND_CORE_PROTOCOL_OBJECT
|
||||
$WAYLAND_PROTOCOLS_CLIENT_HEADER_UNSTABLE_DEPENDS
|
||||
$WAYLAND_PROTOCOLS_CODE_UNSTABLE_DEPENDS
|
||||
$WAYLAND_PROTOCOLS_OBJECTS_UNSTABLE
|
||||
"
|
||||
WAYLAND_PROTOCOLS_DEPENDS=`for p in $WAYLAND_PROTOCOLS ; do\
|
||||
echo ;\
|
||||
echo "\\$(gen)/\$p-client-protocol.h: \\$(srcdir)/wayland-protocols/\$p.xml" ;\
|
||||
echo " @\\$(SHELL) \\$(auxdir)/mkinstalldirs \\$(gen)" ;\
|
||||
echo " \\$(RUN_CMD_GEN)\\$(WAYLAND_SCANNER) client-header \\$< \\$@" ;\
|
||||
echo ;\
|
||||
echo "\\$(gen)/\$p-protocol.c: \\$(srcdir)/wayland-protocols/\$p.xml" ;\
|
||||
echo " @\\$(SHELL) \\$(auxdir)/mkinstalldirs \\$(gen)" ;\
|
||||
echo " \\$(RUN_CMD_GEN)\\$(WAYLAND_SCANNER) code \\$< \\$@" ;\
|
||||
echo ;\
|
||||
echo "\\$(objects)/\$p-protocol.lo: \\$(gen)/\$p-protocol.c \\$(gen)/\$p-client-protocol.h" ;\
|
||||
echo " \\$(RUN_CMD_CC)\\$(LIBTOOL) --tag=CC --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@" ;\
|
||||
done ;\
|
||||
echo ;\
|
||||
for s in $WAYLAND_SOURCES ; do echo -n "\$s:" ; for p in $WAYLAND_PROTOCOLS ; do echo -n " \\$(gen)/\$p-client-protocol.h" ; done ; echo ; done ; echo`
|
||||
fi
|
||||
|
||||
OBJECTS=`echo $SOURCES`
|
||||
|
||||
6
debian/changelog
vendored
6
debian/changelog
vendored
@@ -1,3 +1,9 @@
|
||||
libsdl2 (2.0.9) UNRELEASED; urgency=low
|
||||
|
||||
* Updated SDL to version 2.0.9
|
||||
|
||||
-- Sam Lantinga <slouken@libsdl.org> Wed, 26 Sep 2018 10:02:21 -0800
|
||||
|
||||
libsdl2 (2.0.8) UNRELEASED; urgency=low
|
||||
|
||||
* Updated SDL to version 2.0.8
|
||||
|
||||
@@ -14,10 +14,10 @@ supported, but you can use the "android-project-ant" directory as a template.
|
||||
Requirements
|
||||
================================================================================
|
||||
|
||||
Android SDK (version 19 or later)
|
||||
Android SDK (version 26 or later)
|
||||
https://developer.android.com/sdk/index.html
|
||||
|
||||
Android NDK r10e or later
|
||||
Android NDK r15c or later
|
||||
https://developer.android.com/tools/sdk/ndk/index.html
|
||||
|
||||
Minimum API level supported by SDL: 14 (Android 4.0.1)
|
||||
@@ -77,18 +77,16 @@ For more complex projects, follow these instructions:
|
||||
and rename it to the name of your project.
|
||||
2. Move or symlink this SDL directory into the "<project>/app/jni" directory
|
||||
3. Edit "<project>/app/jni/src/Android.mk" to include your source files
|
||||
4. Run 'ndk-build' (a script provided by the NDK). This compiles the C source
|
||||
|
||||
If you want to use Android Studio (recommended), skip to the Android Studio section below.
|
||||
4a. If you want to use Android Studio, simply open your <project> directory and start building.
|
||||
|
||||
5. Run './gradlew installDebug' in the project directory. This compiles the .java, creates an .apk with the native code embedded, and installs it on any connected Android device
|
||||
4b. If you want to build manually, run './gradlew installDebug' in the project directory. This compiles the .java, creates an .apk with the native code embedded, and installs it on any connected Android device
|
||||
|
||||
Here's an explanation of the files in the Android project, so you can customize them:
|
||||
|
||||
android-project/app
|
||||
build.gradle - build info including the application version and SDK
|
||||
src/main/AndroidManifest.xml - package manifest. Among others, it contains the class name
|
||||
of the main Activity and the package name of the application.
|
||||
src/main/AndroidManifest.xml - package manifest. Among others, it contains the class name of the main Activity and the package name of the application.
|
||||
jni/ - directory holding native code
|
||||
jni/Application.mk - Application JNI settings, including target platform and STL library
|
||||
jni/Android.mk - Android makefile that can call recursively the Android.mk files in all subdirectories
|
||||
@@ -216,26 +214,10 @@ detach it.
|
||||
You can use STL in your project by creating an Application.mk file in the jni
|
||||
folder and adding the following line:
|
||||
|
||||
APP_STL := stlport_static
|
||||
APP_STL := c++_shared
|
||||
|
||||
For more information check out CPLUSPLUS-SUPPORT.html in the NDK documentation.
|
||||
|
||||
|
||||
================================================================================
|
||||
Additional documentation
|
||||
================================================================================
|
||||
|
||||
The documentation in the NDK docs directory is very helpful in understanding the
|
||||
build process and how to work with native code on the Android platform.
|
||||
|
||||
The best place to start is with docs/OVERVIEW.TXT
|
||||
|
||||
|
||||
================================================================================
|
||||
Using Android Studio
|
||||
================================================================================
|
||||
|
||||
You can open your project directory with Android Studio and run it normally.
|
||||
For more information go here:
|
||||
https://developer.android.com/ndk/guides/cpp-support
|
||||
|
||||
|
||||
================================================================================
|
||||
@@ -291,7 +273,10 @@ You can see the complete command line that ndk-build is using by passing V=1 on
|
||||
|
||||
ndk-build V=1
|
||||
|
||||
If your application crashes in native code, you can use addr2line to convert the
|
||||
If your application crashes in native code, you can use ndk-stack to get a symbolic stack trace:
|
||||
https://developer.android.com/ndk/guides/ndk-stack
|
||||
|
||||
If you want to go through the process manually, you can use addr2line to convert the
|
||||
addresses in the stack trace to lines in your code.
|
||||
|
||||
For example, if your crash looks like this:
|
||||
|
||||
@@ -27,6 +27,16 @@ OpenGL ES 2.x, it usually comes pre-installed, but in any case:
|
||||
|
||||
sudo apt-get install libraspberrypi0 libraspberrypi-bin libraspberrypi-dev
|
||||
|
||||
|
||||
================================================================================
|
||||
NEON
|
||||
================================================================================
|
||||
|
||||
If your Pi has NEON support, make sure you add -mfpu=neon to your CFLAGS so
|
||||
that SDL will select some otherwise-disabled highly-optimized code. The
|
||||
original Pi units don't have NEON, the Pi2 probably does, and the Pi3
|
||||
definitely does.
|
||||
|
||||
================================================================================
|
||||
Cross compiling from x86 Linux
|
||||
================================================================================
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
#include "SDL_power.h"
|
||||
#include "SDL_render.h"
|
||||
#include "SDL_rwops.h"
|
||||
#include "SDL_sensor.h"
|
||||
#include "SDL_shape.h"
|
||||
#include "SDL_system.h"
|
||||
#include "SDL_thread.h"
|
||||
@@ -80,10 +81,11 @@ extern "C" {
|
||||
#define SDL_INIT_HAPTIC 0x00001000u
|
||||
#define SDL_INIT_GAMECONTROLLER 0x00002000u /**< SDL_INIT_GAMECONTROLLER implies SDL_INIT_JOYSTICK */
|
||||
#define SDL_INIT_EVENTS 0x00004000u
|
||||
#define SDL_INIT_SENSOR 0x00008000u
|
||||
#define SDL_INIT_NOPARACHUTE 0x00100000u /**< compatibility; this flag is ignored. */
|
||||
#define SDL_INIT_EVERYTHING ( \
|
||||
SDL_INIT_TIMER | SDL_INIT_AUDIO | SDL_INIT_VIDEO | SDL_INIT_EVENTS | \
|
||||
SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC | SDL_INIT_GAMECONTROLLER \
|
||||
SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC | SDL_INIT_GAMECONTROLLER | SDL_INIT_SENSOR \
|
||||
)
|
||||
/* @} */
|
||||
|
||||
|
||||
@@ -140,7 +140,8 @@ typedef Uint16 SDL_AudioFormat;
|
||||
#define SDL_AUDIO_ALLOW_FREQUENCY_CHANGE 0x00000001
|
||||
#define SDL_AUDIO_ALLOW_FORMAT_CHANGE 0x00000002
|
||||
#define SDL_AUDIO_ALLOW_CHANNELS_CHANGE 0x00000004
|
||||
#define SDL_AUDIO_ALLOW_ANY_CHANGE (SDL_AUDIO_ALLOW_FREQUENCY_CHANGE|SDL_AUDIO_ALLOW_FORMAT_CHANGE|SDL_AUDIO_ALLOW_CHANNELS_CHANGE)
|
||||
#define SDL_AUDIO_ALLOW_SAMPLES_CHANGE 0x00000008
|
||||
#define SDL_AUDIO_ALLOW_ANY_CHANGE (SDL_AUDIO_ALLOW_FREQUENCY_CHANGE|SDL_AUDIO_ALLOW_FORMAT_CHANGE|SDL_AUDIO_ALLOW_CHANNELS_CHANGE|SDL_AUDIO_ALLOW_SAMPLES_CHANGE)
|
||||
/* @} */
|
||||
|
||||
/* @} *//* Audio flags */
|
||||
|
||||
@@ -41,8 +41,10 @@
|
||||
#include "SDL_config_android.h"
|
||||
#elif defined(__PSP__)
|
||||
#include "SDL_config_psp.h"
|
||||
#elif defined(__OS2__)
|
||||
#include "SDL_config_os2.h"
|
||||
#else
|
||||
/* This is a minimal configuration just to get SDL running on new platforms */
|
||||
/* This is a minimal configuration just to get SDL running on new platforms. */
|
||||
#include "SDL_config_minimal.h"
|
||||
#endif /* platform config */
|
||||
|
||||
|
||||
@@ -144,6 +144,8 @@
|
||||
#cmakedefine HAVE_COPYSIGNF 1
|
||||
#cmakedefine HAVE_COS 1
|
||||
#cmakedefine HAVE_COSF 1
|
||||
#cmakedefine HAVE_EXP 1
|
||||
#cmakedefine HAVE_EXPF 1
|
||||
#cmakedefine HAVE_FABS 1
|
||||
#cmakedefine HAVE_FABSF 1
|
||||
#cmakedefine HAVE_FLOOR 1
|
||||
@@ -207,6 +209,11 @@
|
||||
#cmakedefine HAVE_DINPUT_H @HAVE_DINPUT_H@
|
||||
#cmakedefine HAVE_XINPUT_H @HAVE_XINPUT_H@
|
||||
#cmakedefine HAVE_DXGI_H @HAVE_DXGI_H@
|
||||
|
||||
#cmakedefine HAVE_ENDPOINTVOLUME_H @HAVE_ENDPOINTVOLUME_H@
|
||||
#cmakedefine HAVE_MMDEVICEAPI_H @HAVE_MMDEVICEAPI_H@
|
||||
#cmakedefine HAVE_AUDIOCLIENT_H @HAVE_AUDIOCLIENT_H@
|
||||
|
||||
#cmakedefine HAVE_XINPUT_GAMEPAD_EX @HAVE_XINPUT_GAMEPAD_EX@
|
||||
#cmakedefine HAVE_XINPUT_STATE_EX @HAVE_XINPUT_STATE_EX@
|
||||
|
||||
@@ -221,6 +228,7 @@
|
||||
#cmakedefine SDL_FILE_DISABLED @SDL_FILE_DISABLED@
|
||||
#cmakedefine SDL_JOYSTICK_DISABLED @SDL_JOYSTICK_DISABLED@
|
||||
#cmakedefine SDL_HAPTIC_DISABLED @SDL_HAPTIC_DISABLED@
|
||||
#cmakedefine SDL_SENSOR_DISABLED @SDL_SENSOR_DISABLED@
|
||||
#cmakedefine SDL_LOADSO_DISABLED @SDL_LOADSO_DISABLED@
|
||||
#cmakedefine SDL_RENDER_DISABLED @SDL_RENDER_DISABLED@
|
||||
#cmakedefine SDL_THREADS_DISABLED @SDL_THREADS_DISABLED@
|
||||
@@ -285,6 +293,10 @@
|
||||
#cmakedefine SDL_HAPTIC_XINPUT @SDL_HAPTIC_XINPUT@
|
||||
#cmakedefine SDL_HAPTIC_ANDROID @SDL_HAPTIC_ANDROID@
|
||||
|
||||
/* Enable various sensor drivers */
|
||||
#cmakedefine SDL_SENSOR_ANDROID @SDL_SENSOR_ANDROID@
|
||||
#cmakedefine SDL_SENSOR_DUMMY @SDL_SENSOR_DUMMY@
|
||||
|
||||
/* Enable various shared object loading systems */
|
||||
#cmakedefine SDL_LOADSO_DLOPEN @SDL_LOADSO_DLOPEN@
|
||||
#cmakedefine SDL_LOADSO_DUMMY @SDL_LOADSO_DUMMY@
|
||||
|
||||
@@ -149,6 +149,8 @@
|
||||
#undef HAVE_COPYSIGNF
|
||||
#undef HAVE_COS
|
||||
#undef HAVE_COSF
|
||||
#undef HAVE_EXP
|
||||
#undef HAVE_EXPF
|
||||
#undef HAVE_FABS
|
||||
#undef HAVE_FABSF
|
||||
#undef HAVE_FLOOR
|
||||
@@ -207,6 +209,9 @@
|
||||
#undef HAVE_DSOUND_H
|
||||
#undef HAVE_DXGI_H
|
||||
#undef HAVE_XINPUT_H
|
||||
#undef HAVE_ENDPOINTVOLUME_H
|
||||
#undef HAVE_MMDEVICEAPI_H
|
||||
#undef HAVE_AUDIOCLIENT_H
|
||||
#undef HAVE_XINPUT_GAMEPAD_EX
|
||||
#undef HAVE_XINPUT_STATE_EX
|
||||
|
||||
@@ -221,6 +226,7 @@
|
||||
#undef SDL_FILE_DISABLED
|
||||
#undef SDL_JOYSTICK_DISABLED
|
||||
#undef SDL_HAPTIC_DISABLED
|
||||
#undef SDL_SENSOR_DISABLED
|
||||
#undef SDL_LOADSO_DISABLED
|
||||
#undef SDL_RENDER_DISABLED
|
||||
#undef SDL_THREADS_DISABLED
|
||||
@@ -277,6 +283,7 @@
|
||||
#undef SDL_JOYSTICK_WINMM
|
||||
#undef SDL_JOYSTICK_USBHID
|
||||
#undef SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H
|
||||
#undef SDL_JOYSTICK_HIDAPI
|
||||
#undef SDL_JOYSTICK_EMSCRIPTEN
|
||||
#undef SDL_HAPTIC_DUMMY
|
||||
#undef SDL_HAPTIC_ANDROID
|
||||
@@ -285,6 +292,10 @@
|
||||
#undef SDL_HAPTIC_DINPUT
|
||||
#undef SDL_HAPTIC_XINPUT
|
||||
|
||||
/* Enable various sensor drivers */
|
||||
#undef SDL_SENSOR_ANDROID
|
||||
#undef SDL_SENSOR_DUMMY
|
||||
|
||||
/* Enable various shared object loading systems */
|
||||
#undef SDL_LOADSO_DLOPEN
|
||||
#undef SDL_LOADSO_DUMMY
|
||||
|
||||
@@ -98,6 +98,8 @@
|
||||
#define HAVE_COPYSIGNF 1
|
||||
#define HAVE_COS 1
|
||||
#define HAVE_COSF 1
|
||||
#define HAVE_EXP 1
|
||||
#define HAVE_EXPF 1
|
||||
#define HAVE_FABS 1
|
||||
#define HAVE_FABSF 1
|
||||
#define HAVE_FLOOR 1
|
||||
@@ -132,8 +134,12 @@
|
||||
|
||||
/* Enable various input drivers */
|
||||
#define SDL_JOYSTICK_ANDROID 1
|
||||
#define SDL_JOYSTICK_HIDAPI 1
|
||||
#define SDL_HAPTIC_ANDROID 1
|
||||
|
||||
/* Enable sensor driver */
|
||||
#define SDL_SENSOR_ANDROID 1
|
||||
|
||||
/* Enable various shared object loading systems */
|
||||
#define SDL_LOADSO_DLOPEN 1
|
||||
|
||||
|
||||
@@ -99,6 +99,8 @@
|
||||
#define HAVE_COPYSIGNF 1
|
||||
#define HAVE_COS 1
|
||||
#define HAVE_COSF 1
|
||||
#define HAVE_EXP 1
|
||||
#define HAVE_EXPF 1
|
||||
#define HAVE_FABS 1
|
||||
#define HAVE_FABSF 1
|
||||
#define HAVE_FLOOR 1
|
||||
@@ -135,6 +137,14 @@
|
||||
|
||||
/* Enable MFi joystick support */
|
||||
#define SDL_JOYSTICK_MFI 1
|
||||
/*#define SDL_JOYSTICK_HIDAPI 1*/
|
||||
|
||||
#ifdef __TVOS__
|
||||
#define SDL_SENSOR_DUMMY 1
|
||||
#else
|
||||
/* Enable the CoreMotion sensor driver */
|
||||
#define SDL_SENSOR_COREMOTION 1
|
||||
#endif
|
||||
|
||||
/* Enable Unix style SO loading */
|
||||
#define SDL_LOADSO_DLOPEN 1
|
||||
|
||||
@@ -102,6 +102,8 @@
|
||||
#define HAVE_COPYSIGNF 1
|
||||
#define HAVE_COS 1
|
||||
#define HAVE_COSF 1
|
||||
#define HAVE_EXP 1
|
||||
#define HAVE_EXPF 1
|
||||
#define HAVE_FABS 1
|
||||
#define HAVE_FABSF 1
|
||||
#define HAVE_FLOOR 1
|
||||
@@ -135,8 +137,12 @@
|
||||
|
||||
/* Enable various input drivers */
|
||||
#define SDL_JOYSTICK_IOKIT 1
|
||||
#define SDL_JOYSTICK_HIDAPI 1
|
||||
#define SDL_HAPTIC_IOKIT 1
|
||||
|
||||
/* Enable the dummy sensor driver */
|
||||
#define SDL_SENSOR_DUMMY 1
|
||||
|
||||
/* Enable various shared object loading systems */
|
||||
#define SDL_LOADSO_DLOPEN 1
|
||||
|
||||
|
||||
@@ -64,6 +64,9 @@ typedef unsigned long uintptr_t;
|
||||
/* Enable the stub haptic driver (src/haptic/dummy/\*.c) */
|
||||
#define SDL_HAPTIC_DISABLED 1
|
||||
|
||||
/* Enable the stub sensor driver (src/sensor/dummy/\*.c) */
|
||||
#define SDL_SENSOR_DISABLED 1
|
||||
|
||||
/* Enable the stub shared object loader (src/loadso/dummy/\*.c) */
|
||||
#define SDL_LOADSO_DISABLED 1
|
||||
|
||||
|
||||
170
include/SDL_config_os2.h
Normal file
170
include/SDL_config_os2.h
Normal file
@@ -0,0 +1,170 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
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.
|
||||
*/
|
||||
|
||||
#ifndef SDL_config_os2_h_
|
||||
#define SDL_config_os2_h_
|
||||
#define SDL_config_h_
|
||||
|
||||
#include "SDL_platform.h"
|
||||
|
||||
#define SDL_AUDIO_DRIVER_DUMMY 1
|
||||
#define SDL_AUDIO_DRIVER_DISK 1
|
||||
|
||||
#define SDL_POWER_DISABLED 1
|
||||
#define SDL_JOYSTICK_DISABLED 1
|
||||
#define SDL_HAPTIC_DISABLED 1
|
||||
/*#undef SDL_JOYSTICK_HIDAPI */
|
||||
|
||||
#define SDL_SENSOR_DUMMY 1
|
||||
#define SDL_VIDEO_DRIVER_DUMMY 1
|
||||
|
||||
/* Enable OpenGL support */
|
||||
/* #undef SDL_VIDEO_OPENGL */
|
||||
|
||||
/* 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
|
||||
|
||||
/* Enable assembly routines */
|
||||
#define SDL_ASSEMBLY_ROUTINES 1
|
||||
|
||||
/* #undef HAVE_LIBSAMPLERATE_H */
|
||||
|
||||
/* Enable dynamic libsamplerate support */
|
||||
/* #undef SDL_LIBSAMPLERATE_DYNAMIC */
|
||||
|
||||
#define HAVE_LIBC 1
|
||||
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
#define HAVE_STDIO_H 1
|
||||
#define STDC_HEADERS 1
|
||||
#define HAVE_STDLIB_H 1
|
||||
#define HAVE_STDARG_H 1
|
||||
#define HAVE_STDDEF_H 1
|
||||
#define HAVE_MALLOC_H 1
|
||||
#define HAVE_MEMORY_H 1
|
||||
#define HAVE_STRING_H 1
|
||||
#define HAVE_STRINGS_H 1
|
||||
#define HAVE_WCHAR_H 1
|
||||
#define HAVE_INTTYPES_H 1
|
||||
#define HAVE_STDINT_H 1
|
||||
#define HAVE_LIMITS_H 1
|
||||
#define HAVE_CTYPE_H 1
|
||||
#define HAVE_MATH_H 1
|
||||
#define HAVE_FLOAT_H 1
|
||||
#define HAVE_SIGNAL_H 1
|
||||
|
||||
#define HAVE_MALLOC 1
|
||||
#define HAVE_CALLOC 1
|
||||
#define HAVE_REALLOC 1
|
||||
#define HAVE_FREE 1
|
||||
#if defined(__WATCOMC__)
|
||||
#define HAVE__FSEEKI64 1
|
||||
#define HAVE__FTELLI64 1
|
||||
#endif
|
||||
#define HAVE_ALLOCA 1
|
||||
#define HAVE_GETENV 1
|
||||
#define HAVE_SETENV 1
|
||||
#define HAVE_PUTENV 1
|
||||
#define HAVE_QSORT 1
|
||||
#define HAVE_ABS 1
|
||||
#define HAVE_BCOPY 1
|
||||
#define HAVE_MEMSET 1
|
||||
#define HAVE_MEMCPY 1
|
||||
#define HAVE_MEMMOVE 1
|
||||
#define HAVE_MEMCMP 1
|
||||
#define HAVE_WCSLEN 1
|
||||
#define HAVE_WCSLCPY 1
|
||||
#define HAVE_WCSLCAT 1
|
||||
#define HAVE_WCSCMP 1
|
||||
#define HAVE_STRLEN 1
|
||||
#define HAVE_STRLCPY 1
|
||||
#define HAVE_STRLCAT 1
|
||||
#define HAVE__STRREV 1
|
||||
#define HAVE__STRUPR 1
|
||||
#define HAVE__STRLWR 1
|
||||
#define HAVE_INDEX 1
|
||||
#define HAVE_RINDEX 1
|
||||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRSTR 1
|
||||
#define HAVE_ITOA 1
|
||||
#define HAVE__LTOA 1
|
||||
#define HAVE__ULTOA 1
|
||||
#define HAVE_STRTOL 1
|
||||
#define HAVE_STRTOUL 1
|
||||
#define HAVE__I64TOA 1
|
||||
#define HAVE__UI64TOA 1
|
||||
#define HAVE_STRTOLL 1
|
||||
#define HAVE_STRTOULL 1
|
||||
#define HAVE_STRTOD 1
|
||||
#define HAVE_ATOI 1
|
||||
#define HAVE_ATOF 1
|
||||
#define HAVE_STRCMP 1
|
||||
#define HAVE_STRNCMP 1
|
||||
#define HAVE_STRICMP 1
|
||||
#define HAVE_STRCASECMP 1
|
||||
#define HAVE_STRNCASECMP 1
|
||||
#define HAVE_SSCANF 1
|
||||
#define HAVE_SNPRINTF 1
|
||||
#define HAVE_VSNPRINTF 1
|
||||
#define HAVE_SETJMP 1
|
||||
#define HAVE_ACOS 1
|
||||
/* #undef HAVE_ACOSF */
|
||||
#define HAVE_ASIN 1
|
||||
/* #undef HAVE_ASINF */
|
||||
#define HAVE_ATAN 1
|
||||
#define HAVE_ATAN2 1
|
||||
/* #undef HAVE_ATAN2F */
|
||||
#define HAVE_CEIL 1
|
||||
/* #undef HAVE_CEILF */
|
||||
/* #undef HAVE_COPYSIGN */
|
||||
/* #undef HAVE_COPYSIGNF */
|
||||
#define HAVE_COS 1
|
||||
/* #undef HAVE_COSF */
|
||||
#define HAVE_EXP 1
|
||||
/* #undef HAVE_EXPF */
|
||||
#define HAVE_FABS 1
|
||||
/* #undef HAVE_FABSF */
|
||||
#define HAVE_FLOOR 1
|
||||
/* #undef HAVE_FLOORF */
|
||||
#define HAVE_FMOD 1
|
||||
/* #undef HAVE_FMODF */
|
||||
#define HAVE_LOG 1
|
||||
/* #undef HAVE_LOGF */
|
||||
#define HAVE_LOG10 1
|
||||
/* #undef HAVE_LOG10F */
|
||||
#define HAVE_POW 1
|
||||
/* #undef HAVE_POWF */
|
||||
#define HAVE_SIN 1
|
||||
/* #undef HAVE_SINF */
|
||||
/* #undef HAVE_SCALBN */
|
||||
/* #undef HAVE_SCALBNF */
|
||||
#define HAVE_SQRT 1
|
||||
/* #undef HAVE_SQRTF */
|
||||
#define HAVE_TAN 1
|
||||
/* #undef HAVE_TANF */
|
||||
|
||||
#endif /* SDL_config_os2_h_ */
|
||||
@@ -90,6 +90,7 @@
|
||||
#define HAVE_COPYSIGN 1
|
||||
#define HAVE_COS 1
|
||||
#define HAVE_COSF 1
|
||||
#define HAVE_EXP 1
|
||||
#define HAVE_FABS 1
|
||||
#define HAVE_FLOOR 1
|
||||
#define HAVE_LOG 1
|
||||
@@ -113,6 +114,8 @@
|
||||
#define SDL_JOYSTICK_LINUX 1
|
||||
#define SDL_HAPTIC_LINUX 1
|
||||
|
||||
#define SDL_SENSOR_DUMMY 1
|
||||
|
||||
#define SDL_LOADSO_DLOPEN 1
|
||||
|
||||
#define SDL_THREAD_PTHREAD 1
|
||||
|
||||
@@ -97,6 +97,8 @@
|
||||
#define HAVE_COPYSIGNF 1
|
||||
#define HAVE_COS 1
|
||||
#define HAVE_COSF 1
|
||||
#define HAVE_EXP 1
|
||||
#define HAVE_EXPF 1
|
||||
#define HAVE_FABS 1
|
||||
#define HAVE_FABSF 1
|
||||
#define HAVE_FLOOR 1
|
||||
@@ -126,22 +128,25 @@
|
||||
/* PSP isn't that sophisticated */
|
||||
#define LACKS_SYS_MMAN_H 1
|
||||
|
||||
/* Enable the stub thread support (src/thread/psp/\*.c) */
|
||||
/* Enable the PSP thread support (src/thread/psp/\*.c) */
|
||||
#define SDL_THREAD_PSP 1
|
||||
|
||||
/* Enable the stub timer support (src/timer/psp/\*.c) */
|
||||
/* Enable the PSP timer support (src/timer/psp/\*.c) */
|
||||
#define SDL_TIMERS_PSP 1
|
||||
|
||||
/* Enable the stub joystick driver (src/joystick/psp/\*.c) */
|
||||
/* Enable the PSP joystick driver (src/joystick/psp/\*.c) */
|
||||
#define SDL_JOYSTICK_PSP 1
|
||||
|
||||
/* Enable the stub audio driver (src/audio/psp/\*.c) */
|
||||
/* Enable the dummy sensor driver */
|
||||
#define SDL_SENSOR_DUMMY 1
|
||||
|
||||
/* Enable the PSP audio driver (src/audio/psp/\*.c) */
|
||||
#define SDL_AUDIO_DRIVER_PSP 1
|
||||
|
||||
/* PSP video dirver */
|
||||
/* PSP video driver */
|
||||
#define SDL_VIDEO_DRIVER_PSP 1
|
||||
|
||||
/* PSP render dirver */
|
||||
/* PSP render driver */
|
||||
#define SDL_VIDEO_RENDER_PSP 1
|
||||
|
||||
#define SDL_POWER_PSP 1
|
||||
|
||||
@@ -82,6 +82,9 @@ typedef unsigned int uintptr_t;
|
||||
#define HAVE_DSOUND_H 1
|
||||
#define HAVE_DXGI_H 1
|
||||
#define HAVE_XINPUT_H 1
|
||||
#define HAVE_MMDEVICEAPI_H 1
|
||||
#define HAVE_AUDIOCLIENT_H 1
|
||||
#define HAVE_ENDPOINTVOLUME_H 1
|
||||
|
||||
/* This is disabled by default to avoid C runtime dependencies and manifest requirements */
|
||||
#ifdef HAVE_LIBC
|
||||
@@ -139,6 +142,8 @@ typedef unsigned int uintptr_t;
|
||||
#define HAVE__COPYSIGN 1
|
||||
#define HAVE_COS 1
|
||||
#define HAVE_COSF 1
|
||||
#define HAVE_EXP 1
|
||||
#define HAVE_EXPF 1
|
||||
#define HAVE_FABS 1
|
||||
#define HAVE_FABSF 1
|
||||
#define HAVE_FLOOR 1
|
||||
@@ -188,9 +193,13 @@ typedef unsigned int uintptr_t;
|
||||
/* Enable various input drivers */
|
||||
#define SDL_JOYSTICK_DINPUT 1
|
||||
#define SDL_JOYSTICK_XINPUT 1
|
||||
#define SDL_JOYSTICK_HIDAPI 1
|
||||
#define SDL_HAPTIC_DINPUT 1
|
||||
#define SDL_HAPTIC_XINPUT 1
|
||||
|
||||
/* Enable the dummy sensor driver */
|
||||
#define SDL_SENSOR_DUMMY 1
|
||||
|
||||
/* Enable various shared object loading systems */
|
||||
#define SDL_LOADSO_WINDOWS 1
|
||||
|
||||
|
||||
@@ -97,6 +97,11 @@ typedef unsigned int uintptr_t;
|
||||
#if WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP
|
||||
#define HAVE_XINPUT_H 1
|
||||
#endif
|
||||
|
||||
#define HAVE_MMDEVICEAPI_H 1
|
||||
#define HAVE_AUDIOCLIENT_H 1
|
||||
#define HAVE_ENDPOINTVOLUME_H 1
|
||||
|
||||
#define HAVE_LIBC 1
|
||||
#define STDC_HEADERS 1
|
||||
#define HAVE_CTYPE_H 1
|
||||
@@ -155,6 +160,8 @@ typedef unsigned int uintptr_t;
|
||||
#define HAVE__COPYSIGN 1
|
||||
#define HAVE_COS 1
|
||||
#define HAVE_COSF 1
|
||||
#define HAVE_EXP 1
|
||||
#define HAVE_EXPF 1
|
||||
#define HAVE_FABS 1
|
||||
#define HAVE_FABSF 1
|
||||
#define HAVE_FLOOR 1
|
||||
@@ -190,6 +197,9 @@ typedef unsigned int uintptr_t;
|
||||
#define SDL_HAPTIC_XINPUT 1
|
||||
#endif
|
||||
|
||||
/* Enable the dummy sensor driver */
|
||||
#define SDL_SENSOR_DUMMY 1
|
||||
|
||||
/* Enable various shared object loading systems */
|
||||
#define SDL_LOADSO_WINDOWS 1
|
||||
|
||||
|
||||
@@ -94,6 +94,8 @@
|
||||
#define HAVE_COPYSIGNF 1
|
||||
#define HAVE_COS 1
|
||||
#define HAVE_COSF 1
|
||||
#define HAVE_EXP 1
|
||||
#define HAVE_EXPF 1
|
||||
#define HAVE_FABS 1
|
||||
#define HAVE_FABSF 1
|
||||
#define HAVE_FLOOR 1
|
||||
@@ -127,6 +129,8 @@
|
||||
#define SDL_JOYSTICK_LINUX 1
|
||||
#define SDL_HAPTIC_LINUX 1
|
||||
|
||||
#define SDL_SENSOR_DUMMY 1
|
||||
|
||||
#define SDL_LOADSO_DLOPEN 1
|
||||
|
||||
#define SDL_THREAD_PTHREAD 1
|
||||
|
||||
@@ -51,16 +51,19 @@
|
||||
#include <intrin.h>
|
||||
#else
|
||||
#ifdef __ALTIVEC__
|
||||
#if HAVE_ALTIVEC_H && !defined(__APPLE_ALTIVEC__) && !defined(SDL_DISABLE_ALTIVEC_H)
|
||||
#if defined(HAVE_ALTIVEC_H) && !defined(__APPLE_ALTIVEC__) && !defined(SDL_DISABLE_ALTIVEC_H)
|
||||
#include <altivec.h>
|
||||
#undef pixel
|
||||
#undef bool
|
||||
#endif
|
||||
#endif
|
||||
#if defined(__ARM_NEON__) && !defined(SDL_DISABLE_ARM_NEON_H)
|
||||
#include <arm_neon.h>
|
||||
#endif
|
||||
#if defined(__3dNOW__) && !defined(SDL_DISABLE_MM3DNOW_H)
|
||||
#include <mm3dnow.h>
|
||||
#endif
|
||||
#if HAVE_IMMINTRIN_H && !defined(SDL_DISABLE_IMMINTRIN_H)
|
||||
#if defined(HAVE_IMMINTRIN_H) && !defined(SDL_DISABLE_IMMINTRIN_H)
|
||||
#include <immintrin.h>
|
||||
#else
|
||||
#if defined(__MMX__) && !defined(SDL_DISABLE_MMINTRIN_H)
|
||||
@@ -159,6 +162,11 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX(void);
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX2(void);
|
||||
|
||||
/**
|
||||
* This function returns true if the CPU has AVX-512F (foundation) features.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX512F(void);
|
||||
|
||||
/**
|
||||
* This function returns true if the CPU has NEON (ARM SIMD) features.
|
||||
*/
|
||||
@@ -169,7 +177,6 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasNEON(void);
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GetSystemRAM(void);
|
||||
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -85,6 +85,9 @@ typedef enum
|
||||
Called on Android in onResume()
|
||||
*/
|
||||
|
||||
/* Display events */
|
||||
SDL_DISPLAYEVENT = 0x150, /**< Display state change */
|
||||
|
||||
/* Window events */
|
||||
SDL_WINDOWEVENT = 0x200, /**< Window state change */
|
||||
SDL_SYSWMEVENT, /**< System specific event */
|
||||
@@ -144,6 +147,9 @@ typedef enum
|
||||
SDL_AUDIODEVICEADDED = 0x1100, /**< A new audio device is available */
|
||||
SDL_AUDIODEVICEREMOVED, /**< An audio device has been removed. */
|
||||
|
||||
/* Sensor events */
|
||||
SDL_SENSORUPDATE = 0x1200, /**< A sensor was updated */
|
||||
|
||||
/* Render events */
|
||||
SDL_RENDER_TARGETS_RESET = 0x2000, /**< The render targets have been reset and their contents need to be updated */
|
||||
SDL_RENDER_DEVICE_RESET, /**< The device has been reset and all textures need to be recreated */
|
||||
@@ -168,6 +174,21 @@ typedef struct SDL_CommonEvent
|
||||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
} SDL_CommonEvent;
|
||||
|
||||
/**
|
||||
* \brief Display state change event data (event.display.*)
|
||||
*/
|
||||
typedef struct SDL_DisplayEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_DISPLAYEVENT */
|
||||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
Uint32 display; /**< The associated display index */
|
||||
Uint8 event; /**< ::SDL_DisplayEventID */
|
||||
Uint8 padding1;
|
||||
Uint8 padding2;
|
||||
Uint8 padding3;
|
||||
Sint32 data1; /**< event dependent data */
|
||||
} SDL_DisplayEvent;
|
||||
|
||||
/**
|
||||
* \brief Window state change event data (event.window.*)
|
||||
*/
|
||||
@@ -471,6 +492,17 @@ typedef struct SDL_DropEvent
|
||||
} SDL_DropEvent;
|
||||
|
||||
|
||||
/**
|
||||
* \brief Sensor event structure (event.sensor.*)
|
||||
*/
|
||||
typedef struct SDL_SensorEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_SENSORUPDATE */
|
||||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
Sint32 which; /**< The instance ID of the sensor */
|
||||
float data[6]; /**< Up to 6 values from the sensor - additional values can be queried using SDL_SensorGetData() */
|
||||
} SDL_SensorEvent;
|
||||
|
||||
/**
|
||||
* \brief The "quit requested" event
|
||||
*/
|
||||
@@ -526,6 +558,7 @@ typedef union SDL_Event
|
||||
{
|
||||
Uint32 type; /**< Event type, shared with all events */
|
||||
SDL_CommonEvent common; /**< Common event data */
|
||||
SDL_DisplayEvent display; /**< Window event data */
|
||||
SDL_WindowEvent window; /**< Window event data */
|
||||
SDL_KeyboardEvent key; /**< Keyboard event data */
|
||||
SDL_TextEditingEvent edit; /**< Text editing event data */
|
||||
@@ -542,6 +575,7 @@ typedef union SDL_Event
|
||||
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 */
|
||||
|
||||
@@ -175,6 +175,14 @@ extern DECLSPEC SDL_bool SDLCALL SDL_IsGameController(int joystick_index);
|
||||
*/
|
||||
extern DECLSPEC const char *SDLCALL SDL_GameControllerNameForIndex(int joystick_index);
|
||||
|
||||
/**
|
||||
* Get the mapping of a game controller.
|
||||
* This can be called before any controllers are opened.
|
||||
*
|
||||
* \return the mapping string. Must be freed with SDL_free(). Returns NULL if no mapping is available
|
||||
*/
|
||||
extern DECLSPEC char *SDLCALL SDL_GameControllerMappingForDeviceIndex(int joystick_index);
|
||||
|
||||
/**
|
||||
* Open a game controller for use.
|
||||
* The index passed as an argument refers to the N'th game controller on the system.
|
||||
@@ -196,6 +204,13 @@ extern DECLSPEC SDL_GameController *SDLCALL SDL_GameControllerFromInstanceID(SDL
|
||||
*/
|
||||
extern DECLSPEC const char *SDLCALL SDL_GameControllerName(SDL_GameController *gamecontroller);
|
||||
|
||||
/**
|
||||
* Get the player index of an opened game controller, or -1 if it's not available
|
||||
*
|
||||
* For XInput controllers this returns the XInput user index.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GameControllerGetPlayerIndex(SDL_GameController *gamecontroller);
|
||||
|
||||
/**
|
||||
* Get the USB vendor ID of an opened controller, if available.
|
||||
* If the vendor ID isn't available this function returns 0.
|
||||
@@ -345,6 +360,19 @@ SDL_GameControllerGetBindForButton(SDL_GameController *gamecontroller,
|
||||
extern DECLSPEC Uint8 SDLCALL SDL_GameControllerGetButton(SDL_GameController *gamecontroller,
|
||||
SDL_GameControllerButton button);
|
||||
|
||||
/**
|
||||
* Trigger 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
|
||||
* \param low_frequency_rumble The intensity of the low frequency (left) rumble motor, from 0 to 0xFFFF
|
||||
* \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
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GameControllerRumble(SDL_GameController *gamecontroller, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms);
|
||||
|
||||
/**
|
||||
* Close a controller previously opened with SDL_GameControllerOpen().
|
||||
*/
|
||||
|
||||
@@ -117,6 +117,17 @@
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/* FIXME: For SDL 2.1, adjust all the magnitude variables to be Uint16 (0xFFFF).
|
||||
*
|
||||
* At the moment the magnitude variables are mixed between signed/unsigned, and
|
||||
* it is also not made clear that ALL of those variables expect a max of 0x7FFF.
|
||||
*
|
||||
* Some platforms may have higher precision than that (Linux FF, Windows XInput)
|
||||
* so we should fix the inconsistency in favor of higher possible precision,
|
||||
* adjusting for platforms that use different scales.
|
||||
* -flibit
|
||||
*/
|
||||
|
||||
/**
|
||||
* \typedef SDL_Haptic
|
||||
*
|
||||
@@ -656,8 +667,8 @@ typedef struct SDL_HapticRamp
|
||||
* This struct is exclusively for the ::SDL_HAPTIC_LEFTRIGHT effect.
|
||||
*
|
||||
* The Left/Right effect is used to explicitly control the large and small
|
||||
* motors, commonly found in modern game controllers. One motor is high
|
||||
* frequency, the other is low frequency.
|
||||
* motors, commonly found in modern game controllers. The small (right) motor
|
||||
* is high frequency, and the large (left) motor is low frequency.
|
||||
*
|
||||
* \sa SDL_HAPTIC_LEFTRIGHT
|
||||
* \sa SDL_HapticEffect
|
||||
@@ -668,7 +679,7 @@ typedef struct SDL_HapticLeftRight
|
||||
Uint16 type; /**< ::SDL_HAPTIC_LEFTRIGHT */
|
||||
|
||||
/* Replay */
|
||||
Uint32 length; /**< Duration of the effect. */
|
||||
Uint32 length; /**< Duration of the effect in milliseconds. */
|
||||
|
||||
/* Rumble */
|
||||
Uint16 large_magnitude; /**< Control of the large controller motor. */
|
||||
|
||||
@@ -262,6 +262,16 @@ extern "C" {
|
||||
*/
|
||||
#define SDL_HINT_GRAB_KEYBOARD "SDL_GRAB_KEYBOARD"
|
||||
|
||||
/**
|
||||
* \brief A variable setting the double click time, in milliseconds.
|
||||
*/
|
||||
#define SDL_HINT_MOUSE_DOUBLE_CLICK_TIME "SDL_MOUSE_DOUBLE_CLICK_TIME"
|
||||
|
||||
/**
|
||||
* \brief A variable setting the double click radius, in pixels.
|
||||
*/
|
||||
#define SDL_HINT_MOUSE_DOUBLE_CLICK_RADIUS "SDL_MOUSE_DOUBLE_CLICK_RADIUS"
|
||||
|
||||
/**
|
||||
* \brief A variable setting the speed scale for mouse motion, in floating point, when the mouse is not in relative mode
|
||||
*/
|
||||
@@ -329,7 +339,7 @@ extern "C" {
|
||||
#define SDL_HINT_IDLE_TIMER_DISABLED "SDL_IOS_IDLE_TIMER_DISABLED"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling which orientations are allowed on iOS.
|
||||
* \brief A variable controlling which orientations are allowed on iOS/Android.
|
||||
*
|
||||
* In some circumstances it is necessary to be able to explicitly control
|
||||
* which UI orientations are allowed.
|
||||
@@ -465,6 +475,88 @@ extern "C" {
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS "SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the HIDAPI joystick drivers should be used.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - HIDAPI drivers are not used
|
||||
* "1" - HIDAPI drivers are used (the default)
|
||||
*
|
||||
* This variable is the default for all drivers, but can be overridden by the hints for specific drivers below.
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_HIDAPI "SDL_JOYSTICK_HIDAPI"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the HIDAPI driver for PS4 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_PS4 "SDL_JOYSTICK_HIDAPI_PS4"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether extended input reports should be used for PS4 controllers when using the HIDAPI driver.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - extended reports are not enabled (the default)
|
||||
* "1" - extended reports
|
||||
*
|
||||
* Extended input reports allow rumble on Bluetooth PS4 controllers, but
|
||||
* break DirectInput handling for applications that don't use SDL.
|
||||
*
|
||||
* Once extended reports are enabled, they can not be disabled without
|
||||
* power cycling the controller.
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE "SDL_JOYSTICK_HIDAPI_PS4_RUMBLE"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the HIDAPI driver for Steam 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_STEAM "SDL_JOYSTICK_HIDAPI_STEAM"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the HIDAPI driver for Nintendo Switch 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_SWITCH "SDL_JOYSTICK_HIDAPI_SWITCH"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the HIDAPI driver for XBox 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_XBOX "SDL_JOYSTICK_HIDAPI_XBOX"
|
||||
|
||||
/**
|
||||
* \brief A variable that controls whether Steam Controllers should be exposed using the SDL joystick and game controller APIs
|
||||
*
|
||||
* The variable can be set to the following values:
|
||||
* "0" - Do not scan for Steam Controllers
|
||||
* "1" - Scan for Steam Controllers (the default)
|
||||
*
|
||||
* The default value is "1". This hint must be set before initializing the joystick subsystem.
|
||||
*/
|
||||
#define SDL_HINT_ENABLE_STEAM_CONTROLLERS "SDL_ENABLE_STEAM_CONTROLLERS"
|
||||
|
||||
|
||||
/**
|
||||
* \brief If set to "0" then never set the top most bit on a SDL Window, even if the video mode expects it.
|
||||
* This is a debugging aid for developers and not expected to be used by end users. The default is "1"
|
||||
@@ -527,6 +619,10 @@ extern "C" {
|
||||
* This is specially useful if you build SDL against a non glibc libc library (such as musl) which
|
||||
* provides a relatively small default thread stack size (a few kilobytes versus the default 8MB glibc uses).
|
||||
* Support for this hint is currently available only in the pthread, Windows, and PSP backend.
|
||||
*
|
||||
* Instead of this hint, in 2.0.9 and later, you can use
|
||||
* SDL_CreateThreadWithStackSize(). This hint only works with the classic
|
||||
* SDL_CreateThread().
|
||||
*/
|
||||
#define SDL_HINT_THREAD_STACK_SIZE "SDL_THREAD_STACK_SIZE"
|
||||
|
||||
@@ -752,6 +848,23 @@ extern "C" {
|
||||
*/
|
||||
#define SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH "SDL_ANDROID_SEPARATE_MOUSE_AND_TOUCH"
|
||||
|
||||
/**
|
||||
* \brief A variable to control whether we trap the Android back button to handle it manually.
|
||||
* This is necessary for the right mouse button to work on some Android devices, or
|
||||
* to be able to trap the back button for use in your code reliably. If set to true,
|
||||
* the back button will show up as an SDL_KEYDOWN / SDL_KEYUP pair with a keycode of
|
||||
* SDL_SCANCODE_AC_BACK.
|
||||
*
|
||||
* The variable can be set to the following values:
|
||||
* "0" - Back button will be handled as usual for system. (default)
|
||||
* "1" - Back button will be trapped, allowing you to handle the key press
|
||||
* manually. (This will also let right mouse click work on systems
|
||||
* where the right mouse button functions as back.)
|
||||
*
|
||||
* The value of this hint is used at runtime, so it can be changed at any time.
|
||||
*/
|
||||
#define SDL_HINT_ANDROID_TRAP_BACK_BUTTON "SDL_ANDROID_TRAP_BACK_BUTTON"
|
||||
|
||||
/**
|
||||
* \brief A variable to control whether the return key on the soft keyboard
|
||||
* should hide the soft keyboard on Android and iOS.
|
||||
|
||||
@@ -97,10 +97,10 @@ typedef enum
|
||||
typedef enum
|
||||
{
|
||||
SDL_JOYSTICK_POWER_UNKNOWN = -1,
|
||||
SDL_JOYSTICK_POWER_EMPTY,
|
||||
SDL_JOYSTICK_POWER_LOW,
|
||||
SDL_JOYSTICK_POWER_MEDIUM,
|
||||
SDL_JOYSTICK_POWER_FULL,
|
||||
SDL_JOYSTICK_POWER_EMPTY, /* <= 5% */
|
||||
SDL_JOYSTICK_POWER_LOW, /* <= 20% */
|
||||
SDL_JOYSTICK_POWER_MEDIUM, /* <= 70% */
|
||||
SDL_JOYSTICK_POWER_FULL, /* <= 100% */
|
||||
SDL_JOYSTICK_POWER_WIRED,
|
||||
SDL_JOYSTICK_POWER_MAX
|
||||
} SDL_JoystickPowerLevel;
|
||||
@@ -132,6 +132,12 @@ extern DECLSPEC int SDLCALL SDL_NumJoysticks(void);
|
||||
*/
|
||||
extern DECLSPEC const char *SDLCALL SDL_JoystickNameForIndex(int device_index);
|
||||
|
||||
/**
|
||||
* Get the player index of a joystick, or -1 if it's not available
|
||||
* This can be called before any joysticks are opened.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickGetDevicePlayerIndex(int device_index);
|
||||
|
||||
/**
|
||||
* Return the GUID for the joystick at this index
|
||||
* This can be called before any joysticks are opened.
|
||||
@@ -194,6 +200,13 @@ extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickFromInstanceID(SDL_JoystickID
|
||||
*/
|
||||
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);
|
||||
|
||||
/**
|
||||
* Return the GUID for this opened joystick
|
||||
*/
|
||||
@@ -361,6 +374,19 @@ extern DECLSPEC int SDLCALL SDL_JoystickGetBall(SDL_Joystick * joystick,
|
||||
extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetButton(SDL_Joystick * joystick,
|
||||
int button);
|
||||
|
||||
/**
|
||||
* Trigger 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
|
||||
* \param low_frequency_rumble The intensity of the low frequency (left) rumble motor, from 0 to 0xFFFF
|
||||
* \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
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickRumble(SDL_Joystick * joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms);
|
||||
|
||||
/**
|
||||
* Close a joystick previously opened with SDL_JoystickOpen().
|
||||
*/
|
||||
|
||||
251
include/SDL_sensor.h
Normal file
251
include/SDL_sensor.h
Normal file
@@ -0,0 +1,251 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
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_sensor.h
|
||||
*
|
||||
* Include file for SDL sensor event handling
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SDL_sensor_h
|
||||
#define _SDL_sensor_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
|
||||
|
||||
/**
|
||||
* \brief SDL_sensor.h
|
||||
*
|
||||
* In order to use these functions, SDL_Init() must have been called
|
||||
* with the ::SDL_INIT_SENSOR flag. This causes SDL to scan the system
|
||||
* for sensors, and load appropriate drivers.
|
||||
*/
|
||||
|
||||
struct _SDL_Sensor;
|
||||
typedef struct _SDL_Sensor SDL_Sensor;
|
||||
|
||||
/**
|
||||
* This is a unique ID for a sensor for the time it is connected to the system,
|
||||
* and is never reused for the lifetime of the application.
|
||||
*
|
||||
* The ID value starts at 0 and increments from there. The value -1 is an invalid ID.
|
||||
*/
|
||||
typedef Sint32 SDL_SensorID;
|
||||
|
||||
/* The different sensors defined by SDL
|
||||
*
|
||||
* Additional sensors may be available, using platform dependent semantics.
|
||||
*
|
||||
* Hare are the additional Android sensors:
|
||||
* https://developer.android.com/reference/android/hardware/SensorEvent.html#values
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
SDL_SENSOR_INVALID = -1, /**< Returned for an invalid sensor */
|
||||
SDL_SENSOR_UNKNOWN, /**< Unknown sensor type */
|
||||
SDL_SENSOR_ACCEL, /**< Accelerometer */
|
||||
SDL_SENSOR_GYRO /**< Gyroscope */
|
||||
} SDL_SensorType;
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* 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:
|
||||
* -X ... +X : left ... right
|
||||
* -Y ... +Y : bottom ... top
|
||||
* -Z ... +Z : farther ... closer
|
||||
*
|
||||
* The axis data is not changed when the phone is rotated.
|
||||
*
|
||||
* \sa SDL_GetDisplayOrientation()
|
||||
*/
|
||||
#define SDL_STANDARD_GRAVITY 9.80665f
|
||||
|
||||
/**
|
||||
* Gyroscope sensor
|
||||
*
|
||||
* The gyroscope returns the current rate of rotation in radians per second.
|
||||
* The rotation is positive in the counter-clockwise direction. That is,
|
||||
* an observer looking from a positive location on one of the axes would
|
||||
* 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
|
||||
*
|
||||
* For phones held in portrait mode, 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.
|
||||
*
|
||||
* \sa SDL_GetDisplayOrientation()
|
||||
*/
|
||||
|
||||
/* Function prototypes */
|
||||
|
||||
/**
|
||||
* \brief Count the number of sensors attached to the system right now
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_NumSensors(void);
|
||||
|
||||
/**
|
||||
* \brief Get the implementation dependent name of a sensor.
|
||||
*
|
||||
* This can be called before any sensors are opened.
|
||||
*
|
||||
* \return The sensor name, or NULL if device_index is out of range.
|
||||
*/
|
||||
extern DECLSPEC const char *SDLCALL SDL_SensorGetDeviceName(int device_index);
|
||||
|
||||
/**
|
||||
* \brief Get the type of a sensor.
|
||||
*
|
||||
* This can be called before any sensors are opened.
|
||||
*
|
||||
* \return The sensor type, or SDL_SENSOR_INVALID if device_index is out of range.
|
||||
*/
|
||||
extern DECLSPEC SDL_SensorType SDLCALL SDL_SensorGetDeviceType(int device_index);
|
||||
|
||||
/**
|
||||
* \brief Get the platform dependent type of a sensor.
|
||||
*
|
||||
* This can be called before any sensors are opened.
|
||||
*
|
||||
* \return The sensor platform dependent type, or -1 if device_index is out of range.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SensorGetDeviceNonPortableType(int device_index);
|
||||
|
||||
/**
|
||||
* \brief Get the instance ID of a sensor.
|
||||
*
|
||||
* This can be called before any sensors are opened.
|
||||
*
|
||||
* \return The sensor instance ID, or -1 if device_index is out of range.
|
||||
*/
|
||||
extern DECLSPEC SDL_SensorID SDLCALL SDL_SensorGetDeviceInstanceID(int device_index);
|
||||
|
||||
/**
|
||||
* \brief Open a sensor for use.
|
||||
*
|
||||
* The index passed as an argument refers to the N'th sensor on the system.
|
||||
*
|
||||
* \return A sensor identifier, or NULL if an error occurred.
|
||||
*/
|
||||
extern DECLSPEC SDL_Sensor *SDLCALL SDL_SensorOpen(int device_index);
|
||||
|
||||
/**
|
||||
* Return the SDL_Sensor associated with an instance id.
|
||||
*/
|
||||
extern DECLSPEC SDL_Sensor *SDLCALL SDL_SensorFromInstanceID(SDL_SensorID instance_id);
|
||||
|
||||
/**
|
||||
* \brief Get the implementation dependent name of a sensor.
|
||||
*
|
||||
* \return The sensor name, or NULL if the sensor is NULL.
|
||||
*/
|
||||
extern DECLSPEC const char *SDLCALL SDL_SensorGetName(SDL_Sensor *sensor);
|
||||
|
||||
/**
|
||||
* \brief Get the type of a sensor.
|
||||
*
|
||||
* This can be called before any sensors are opened.
|
||||
*
|
||||
* \return The sensor type, or SDL_SENSOR_INVALID if the sensor is NULL.
|
||||
*/
|
||||
extern DECLSPEC SDL_SensorType SDLCALL SDL_SensorGetType(SDL_Sensor *sensor);
|
||||
|
||||
/**
|
||||
* \brief Get the platform dependent type of a sensor.
|
||||
*
|
||||
* This can be called before any sensors are opened.
|
||||
*
|
||||
* \return The sensor platform dependent type, or -1 if the sensor is NULL.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SensorGetNonPortableType(SDL_Sensor *sensor);
|
||||
|
||||
/**
|
||||
* \brief Get the instance ID of a sensor.
|
||||
*
|
||||
* This can be called before any sensors are opened.
|
||||
*
|
||||
* \return The sensor instance ID, or -1 if the sensor is NULL.
|
||||
*/
|
||||
extern DECLSPEC SDL_SensorID SDLCALL SDL_SensorGetInstanceID(SDL_Sensor *sensor);
|
||||
|
||||
/**
|
||||
* Get the current state of an opened sensor.
|
||||
*
|
||||
* The number of values and interpretation of the data is sensor dependent.
|
||||
*
|
||||
* \param sensor The 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_SensorGetData(SDL_Sensor * sensor, float *data, int num_values);
|
||||
|
||||
/**
|
||||
* Close a sensor previously opened with SDL_SensorOpen()
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_SensorClose(SDL_Sensor * sensor);
|
||||
|
||||
/**
|
||||
* Update the current state of the open sensors.
|
||||
*
|
||||
* This is called automatically by the event loop if sensor events are enabled.
|
||||
*
|
||||
* This needs to be called from the thread that initialized the sensor subsystem.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_SensorUpdate(void);
|
||||
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
/* *INDENT-OFF* */
|
||||
}
|
||||
/* *INDENT-ON* */
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_sensor_h */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
@@ -86,6 +86,28 @@
|
||||
#ifdef HAVE_FLOAT_H
|
||||
# include <float.h>
|
||||
#endif
|
||||
#if defined(HAVE_ALLOCA) && !defined(alloca)
|
||||
# if defined(HAVE_ALLOCA_H)
|
||||
# include <alloca.h>
|
||||
# elif defined(__GNUC__)
|
||||
# define alloca __builtin_alloca
|
||||
# elif defined(_MSC_VER)
|
||||
# include <malloc.h>
|
||||
# define alloca _alloca
|
||||
# elif defined(__WATCOMC__)
|
||||
# include <malloc.h>
|
||||
# elif defined(__BORLANDC__)
|
||||
# include <malloc.h>
|
||||
# elif defined(__DMC__)
|
||||
# include <stdlib.h>
|
||||
# elif defined(__AIX__)
|
||||
#pragma alloca
|
||||
# elif defined(__MRC__)
|
||||
void *alloca(unsigned);
|
||||
# else
|
||||
char *alloca();
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* The number of elements in an array.
|
||||
@@ -328,28 +350,6 @@ SDL_COMPILE_TIME_ASSERT(enum, sizeof(SDL_DUMMY_ENUM) == sizeof(int));
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_ALLOCA) && !defined(alloca)
|
||||
# if defined(HAVE_ALLOCA_H)
|
||||
# include <alloca.h>
|
||||
# elif defined(__GNUC__)
|
||||
# define alloca __builtin_alloca
|
||||
# elif defined(_MSC_VER)
|
||||
# include <malloc.h>
|
||||
# define alloca _alloca
|
||||
# elif defined(__WATCOMC__)
|
||||
# include <malloc.h>
|
||||
# elif defined(__BORLANDC__)
|
||||
# include <malloc.h>
|
||||
# elif defined(__DMC__)
|
||||
# include <stdlib.h>
|
||||
# elif defined(__AIX__)
|
||||
#pragma alloca
|
||||
# elif defined(__MRC__)
|
||||
void *alloca(unsigned);
|
||||
# else
|
||||
char *alloca();
|
||||
# endif
|
||||
#endif
|
||||
#ifdef HAVE_ALLOCA
|
||||
#define SDL_stack_alloc(type, count) (type*)alloca(sizeof(type)*(count))
|
||||
#define SDL_stack_free(data)
|
||||
@@ -445,12 +445,12 @@ SDL_FORCE_INLINE void SDL_memset4(void *dst, Uint32 val, size_t dwords)
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
extern DECLSPEC void *SDLCALL SDL_memcpy(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len);
|
||||
|
||||
extern DECLSPEC void *SDLCALL SDL_memmove(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len);
|
||||
extern DECLSPEC int SDLCALL SDL_memcmp(const void *s1, const void *s2, size_t len);
|
||||
|
||||
extern DECLSPEC wchar_t *SDLCALL SDL_wcsdup(const wchar_t *wstr);
|
||||
extern DECLSPEC size_t SDLCALL SDL_wcslen(const wchar_t *wstr);
|
||||
extern DECLSPEC size_t SDLCALL SDL_wcslcpy(SDL_OUT_Z_CAP(maxlen) wchar_t *dst, const wchar_t *src, size_t maxlen);
|
||||
extern DECLSPEC size_t SDLCALL SDL_wcslcat(SDL_INOUT_Z_CAP(maxlen) wchar_t *dst, const wchar_t *src, size_t maxlen);
|
||||
@@ -514,6 +514,8 @@ extern DECLSPEC double SDLCALL SDL_copysign(double x, double y);
|
||||
extern DECLSPEC float SDLCALL SDL_copysignf(float x, float y);
|
||||
extern DECLSPEC double SDLCALL SDL_cos(double x);
|
||||
extern DECLSPEC float SDLCALL SDL_cosf(float x);
|
||||
extern DECLSPEC double SDLCALL SDL_exp(double x);
|
||||
extern DECLSPEC float SDLCALL SDL_expf(float x);
|
||||
extern DECLSPEC double SDLCALL SDL_fabs(double x);
|
||||
extern DECLSPEC float SDLCALL SDL_fabsf(float x);
|
||||
extern DECLSPEC double SDLCALL SDL_floor(double x);
|
||||
|
||||
@@ -248,6 +248,13 @@ extern DECLSPEC int SDLCALL SDL_SetSurfaceRLE(SDL_Surface * surface,
|
||||
extern DECLSPEC int SDLCALL SDL_SetColorKey(SDL_Surface * surface,
|
||||
int flag, Uint32 key);
|
||||
|
||||
/**
|
||||
* \brief Returns whether the surface has a color key
|
||||
*
|
||||
* \return SDL_TRUE if the surface has a color key, or SDL_FALSE if the surface is NULL or has no color key
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasColorKey(SDL_Surface * surface);
|
||||
|
||||
/**
|
||||
* \brief Gets the color key (transparent pixel) in a blittable surface.
|
||||
*
|
||||
|
||||
@@ -76,6 +76,18 @@ extern DECLSPEC SDL_bool SDLCALL SDL_DXGIGetOutputInfo( int displayIndex, int *a
|
||||
#endif /* __WIN32__ */
|
||||
|
||||
|
||||
/* Platform specific functions for Linux */
|
||||
#ifdef __LINUX__
|
||||
|
||||
/**
|
||||
\brief Sets the UNIX nice value for a thread, using setpriority() if possible, and RealtimeKit if available.
|
||||
|
||||
\return 0 on success, or -1 on error.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_LinuxSetThreadPriority(Sint64 threadID, int priority);
|
||||
|
||||
#endif /* __LINUX__ */
|
||||
|
||||
/* Platform specific functions for iOS */
|
||||
#if defined(__IPHONEOS__) && __IPHONEOS__
|
||||
|
||||
@@ -113,6 +125,21 @@ extern DECLSPEC void * SDLCALL SDL_AndroidGetActivity(void);
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_IsAndroidTV(void);
|
||||
|
||||
/**
|
||||
\brief Return true if the application is running on a Chromebook
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_IsChromebook(void);
|
||||
|
||||
/**
|
||||
\brief Return true is the application is running on a Samsung DeX docking station
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_IsDeXMode(void);
|
||||
|
||||
/**
|
||||
\brief Trigger the Android system back button behavior.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_AndroidBackButton(void);
|
||||
|
||||
/**
|
||||
See the official Android developer guide for more information:
|
||||
http://developer.android.com/guide/topics/data/data-storage.html
|
||||
@@ -236,6 +263,11 @@ extern DECLSPEC SDL_WinRT_DeviceFamily SDLCALL SDL_WinRTGetDeviceFamily();
|
||||
|
||||
#endif /* __WINRT__ */
|
||||
|
||||
/**
|
||||
\brief Return true if the current device is a tablet.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_IsTablet(void);
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -33,12 +33,6 @@
|
||||
#include "SDL_video.h"
|
||||
#include "SDL_version.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \file SDL_syswm.h
|
||||
*
|
||||
@@ -110,6 +104,12 @@ typedef void *EGLSurface;
|
||||
#include "SDL_egl.h"
|
||||
#endif
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* These are the various supported windowing subsystems
|
||||
*/
|
||||
|
||||
@@ -54,12 +54,13 @@ typedef unsigned int SDL_TLSID;
|
||||
/**
|
||||
* The SDL thread priority.
|
||||
*
|
||||
* \note On many systems you require special privileges to set high priority.
|
||||
* \note On many systems you require special privileges to set high or time critical priority.
|
||||
*/
|
||||
typedef enum {
|
||||
SDL_THREAD_PRIORITY_LOW,
|
||||
SDL_THREAD_PRIORITY_NORMAL,
|
||||
SDL_THREAD_PRIORITY_HIGH
|
||||
SDL_THREAD_PRIORITY_HIGH,
|
||||
SDL_THREAD_PRIORITY_TIME_CRITICAL
|
||||
} SDL_ThreadPriority;
|
||||
|
||||
/**
|
||||
@@ -105,14 +106,24 @@ SDL_CreateThread(SDL_ThreadFunction fn, const char *name, void *data,
|
||||
pfnSDL_CurrentBeginThread pfnBeginThread,
|
||||
pfnSDL_CurrentEndThread pfnEndThread);
|
||||
|
||||
extern DECLSPEC SDL_Thread *SDLCALL
|
||||
SDL_CreateThreadWithStackSize(int (SDLCALL * fn) (void *),
|
||||
const char *name, const size_t stacksize, void *data,
|
||||
pfnSDL_CurrentBeginThread pfnBeginThread,
|
||||
pfnSDL_CurrentEndThread pfnEndThread);
|
||||
|
||||
|
||||
/**
|
||||
* Create a thread.
|
||||
*/
|
||||
#if defined(SDL_CreateThread) && SDL_DYNAMIC_API
|
||||
#undef SDL_CreateThread
|
||||
#define SDL_CreateThread(fn, name, data) SDL_CreateThread_REAL(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthreadex, (pfnSDL_CurrentEndThread)_endthreadex)
|
||||
#undef SDL_CreateThreadWithStackSize
|
||||
#define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize_REAL(fn, name, stacksize, data, (pfnSDL_CurrentBeginThread)_beginthreadex, (pfnSDL_CurrentEndThread)_endthreadex)
|
||||
#else
|
||||
#define SDL_CreateThread(fn, name, data) SDL_CreateThread(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthreadex, (pfnSDL_CurrentEndThread)_endthreadex)
|
||||
#define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthreadex, (pfnSDL_CurrentEndThread)_endthreadex)
|
||||
#endif
|
||||
|
||||
#elif defined(__OS2__)
|
||||
@@ -132,15 +143,31 @@ extern DECLSPEC SDL_Thread *SDLCALL
|
||||
SDL_CreateThread(SDL_ThreadFunction fn, const char *name, void *data,
|
||||
pfnSDL_CurrentBeginThread pfnBeginThread,
|
||||
pfnSDL_CurrentEndThread pfnEndThread);
|
||||
extern DECLSPEC SDL_Thread *SDLCALL
|
||||
SDL_CreateThreadWithStackSize(SDL_ThreadFunction fn, const char *name, const size_t stacksize, void *data,
|
||||
pfnSDL_CurrentBeginThread pfnBeginThread,
|
||||
pfnSDL_CurrentEndThread pfnEndThread);
|
||||
#if defined(SDL_CreateThread) && SDL_DYNAMIC_API
|
||||
#undef SDL_CreateThread
|
||||
#define SDL_CreateThread(fn, name, data) SDL_CreateThread_REAL(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthread, (pfnSDL_CurrentEndThread)_endthread)
|
||||
#undef SDL_CreateThreadWithStackSize
|
||||
#define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize_REAL(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthread, (pfnSDL_CurrentEndThread)_endthread)
|
||||
#else
|
||||
#define SDL_CreateThread(fn, name, data) SDL_CreateThread(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthread, (pfnSDL_CurrentEndThread)_endthread)
|
||||
#define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize(fn, name, stacksize, data, (pfnSDL_CurrentBeginThread)_beginthread, (pfnSDL_CurrentEndThread)_endthread)
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
/**
|
||||
* Create a thread with a default stack size.
|
||||
*
|
||||
* This is equivalent to calling:
|
||||
* SDL_CreateThreadWithStackSize(fn, name, 0, data);
|
||||
*/
|
||||
extern DECLSPEC SDL_Thread *SDLCALL
|
||||
SDL_CreateThread(SDL_ThreadFunction fn, const char *name, void *data);
|
||||
|
||||
/**
|
||||
* Create a thread.
|
||||
*
|
||||
@@ -158,9 +185,17 @@ SDL_CreateThread(SDL_ThreadFunction fn, const char *name, void *data,
|
||||
* If a system imposes requirements, SDL will try to munge the string for
|
||||
* it (truncate, etc), but the original string contents will be available
|
||||
* from SDL_GetThreadName().
|
||||
*
|
||||
* The size (in bytes) of the new stack can be specified. Zero means "use
|
||||
* the system default" which might be wildly different between platforms
|
||||
* (x86 Linux generally defaults to eight megabytes, an embedded device
|
||||
* might be a few kilobytes instead).
|
||||
*
|
||||
* In SDL 2.1, stacksize will be folded into the original SDL_CreateThread
|
||||
* function.
|
||||
*/
|
||||
extern DECLSPEC SDL_Thread *SDLCALL
|
||||
SDL_CreateThread(SDL_ThreadFunction fn, const char *name, void *data);
|
||||
SDL_CreateThreadWithStackSize(SDL_ThreadFunction fn, const char *name, const size_t stacksize, void *data);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ typedef struct SDL_version
|
||||
*/
|
||||
#define SDL_MAJOR_VERSION 2
|
||||
#define SDL_MINOR_VERSION 0
|
||||
#define SDL_PATCHLEVEL 8
|
||||
#define SDL_PATCHLEVEL 9
|
||||
|
||||
/**
|
||||
* \brief Macro to determine SDL version program was compiled against.
|
||||
|
||||
@@ -169,6 +169,24 @@ typedef enum
|
||||
SDL_WINDOWEVENT_HIT_TEST /**< Window had a hit test that wasn't SDL_HITTEST_NORMAL. */
|
||||
} SDL_WindowEventID;
|
||||
|
||||
/**
|
||||
* \brief Event subtype for display events
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
SDL_DISPLAYEVENT_NONE, /**< Never used */
|
||||
SDL_DISPLAYEVENT_ORIENTATION /**< Display orientation has changed to data1 */
|
||||
} SDL_DisplayEventID;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
SDL_ORIENTATION_UNKNOWN, /**< The display orientation can't be determined */
|
||||
SDL_ORIENTATION_LANDSCAPE, /**< The display is in landscape mode, with the right side up, relative to portrait mode */
|
||||
SDL_ORIENTATION_LANDSCAPE_FLIPPED, /**< The display is in landscape mode, with the left side up, relative to portrait mode */
|
||||
SDL_ORIENTATION_PORTRAIT, /**< The display is in portrait mode */
|
||||
SDL_ORIENTATION_PORTRAIT_FLIPPED /**< The display is in portrait mode, upside down */
|
||||
} SDL_DisplayOrientation;
|
||||
|
||||
/**
|
||||
* \brief An opaque handle to an OpenGL context.
|
||||
*/
|
||||
@@ -316,18 +334,6 @@ extern DECLSPEC const char * SDLCALL SDL_GetDisplayName(int displayIndex);
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GetDisplayBounds(int displayIndex, SDL_Rect * rect);
|
||||
|
||||
/**
|
||||
* \brief Get the dots/pixels-per-inch for a display
|
||||
*
|
||||
* \note Diagonal, horizontal and vertical DPI can all be optionally
|
||||
* returned if the parameter is non-NULL.
|
||||
*
|
||||
* \return 0 on success, or -1 if no DPI information is available or the index is out of range.
|
||||
*
|
||||
* \sa SDL_GetNumVideoDisplays()
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GetDisplayDPI(int displayIndex, float * ddpi, float * hdpi, float * vdpi);
|
||||
|
||||
/**
|
||||
* \brief Get the usable desktop area represented by a display, with the
|
||||
* primary display located at 0,0
|
||||
@@ -347,6 +353,27 @@ extern DECLSPEC int SDLCALL SDL_GetDisplayDPI(int displayIndex, float * ddpi, fl
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GetDisplayUsableBounds(int displayIndex, SDL_Rect * rect);
|
||||
|
||||
/**
|
||||
* \brief Get the dots/pixels-per-inch for a display
|
||||
*
|
||||
* \note Diagonal, horizontal and vertical DPI can all be optionally
|
||||
* returned if the parameter is non-NULL.
|
||||
*
|
||||
* \return 0 on success, or -1 if no DPI information is available or the index is out of range.
|
||||
*
|
||||
* \sa SDL_GetNumVideoDisplays()
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GetDisplayDPI(int displayIndex, float * ddpi, float * hdpi, float * vdpi);
|
||||
|
||||
/**
|
||||
* \brief Get the orientation of a display
|
||||
*
|
||||
* \return The orientation of the display, or SDL_ORIENTATION_UNKNOWN if it isn't available.
|
||||
*
|
||||
* \sa SDL_GetNumVideoDisplays()
|
||||
*/
|
||||
extern DECLSPEC SDL_DisplayOrientation SDLCALL SDL_GetDisplayOrientation(int displayIndex);
|
||||
|
||||
/**
|
||||
* \brief Returns the number of available display modes.
|
||||
*
|
||||
|
||||
@@ -135,11 +135,11 @@ extern DECLSPEC void SDLCALL SDL_Vulkan_UnloadLibrary(void);
|
||||
* \brief Get the names of the Vulkan instance extensions needed to create
|
||||
* a surface with \c SDL_Vulkan_CreateSurface().
|
||||
*
|
||||
* \param [in] window Window for which the required Vulkan instance
|
||||
* \param [in] \c NULL or window Window for which the required Vulkan instance
|
||||
* extensions should be retrieved
|
||||
* \param [in,out] count pointer to an \c unsigned related to the number of
|
||||
* \param [in,out] pCount pointer to an \c unsigned related to the number of
|
||||
* required Vulkan instance extensions
|
||||
* \param [out] names \c NULL or a pointer to an array to be filled with the
|
||||
* \param [out] pNames \c NULL or a pointer to an array to be filled with the
|
||||
* required Vulkan instance extensions
|
||||
*
|
||||
* \return \c SDL_TRUE on success, \c SDL_FALSE on error.
|
||||
@@ -153,6 +153,10 @@ extern DECLSPEC void SDLCALL SDL_Vulkan_UnloadLibrary(void);
|
||||
* is smaller than the number of required extensions, \c SDL_FALSE will be
|
||||
* returned instead of \c SDL_TRUE, to indicate that not all the required
|
||||
* extensions were returned.
|
||||
*
|
||||
* \note If \c window is not NULL, it will be checked against its creation
|
||||
* flags to ensure that the Vulkan flag is present. This parameter
|
||||
* will be removed in a future major release.
|
||||
*
|
||||
* \note The returned list of extensions will contain \c VK_KHR_surface
|
||||
* and zero or more platform specific extensions
|
||||
@@ -160,12 +164,13 @@ extern DECLSPEC void SDLCALL SDL_Vulkan_UnloadLibrary(void);
|
||||
* \note The extension names queried here must be enabled when calling
|
||||
* VkCreateInstance, otherwise surface creation will fail.
|
||||
*
|
||||
* \note \c window should have been created with the \c SDL_WINDOW_VULKAN flag.
|
||||
* \note \c window should have been created with the \c SDL_WINDOW_VULKAN flag
|
||||
* or be \c NULL
|
||||
*
|
||||
* \code
|
||||
* unsigned int count;
|
||||
* // get count of required extensions
|
||||
* if(!SDL_Vulkan_GetInstanceExtensions(window, &count, NULL))
|
||||
* if(!SDL_Vulkan_GetInstanceExtensions(NULL, &count, NULL))
|
||||
* handle_error();
|
||||
*
|
||||
* static const char *const additionalExtensions[] =
|
||||
@@ -179,7 +184,7 @@ extern DECLSPEC void SDLCALL SDL_Vulkan_UnloadLibrary(void);
|
||||
* handle_error();
|
||||
*
|
||||
* // get names of required extensions
|
||||
* if(!SDL_Vulkan_GetInstanceExtensions(window, &count, names))
|
||||
* if(!SDL_Vulkan_GetInstanceExtensions(NULL, &count, names))
|
||||
* handle_error();
|
||||
*
|
||||
* // copy additional extensions after required extensions
|
||||
|
||||
48
src/SDL.c
48
src/SDL.c
@@ -33,6 +33,7 @@
|
||||
#include "events/SDL_events_c.h"
|
||||
#include "haptic/SDL_haptic_c.h"
|
||||
#include "joystick/SDL_joystick_c.h"
|
||||
#include "sensor/SDL_sensor_c.h"
|
||||
|
||||
/* Initialization/Cleanup routines */
|
||||
#if !SDL_TIMERS_DISABLED
|
||||
@@ -123,11 +124,11 @@ SDL_InitSubSystem(Uint32 flags)
|
||||
}
|
||||
|
||||
#if SDL_VIDEO_DRIVER_WINDOWS
|
||||
if ((flags & (SDL_INIT_HAPTIC|SDL_INIT_JOYSTICK))) {
|
||||
if (SDL_HelperWindowCreate() < 0) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
if ((flags & (SDL_INIT_HAPTIC|SDL_INIT_JOYSTICK))) {
|
||||
if (SDL_HelperWindowCreate() < 0) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !SDL_TIMERS_DISABLED
|
||||
@@ -232,6 +233,20 @@ SDL_InitSubSystem(Uint32 flags)
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Initialize the sensor subsystem */
|
||||
if ((flags & SDL_INIT_SENSOR)){
|
||||
#if !SDL_SENSOR_DISABLED
|
||||
if (SDL_PrivateShouldInitSubsystem(SDL_INIT_SENSOR)) {
|
||||
if (SDL_SensorInit() < 0) {
|
||||
return (-1);
|
||||
}
|
||||
}
|
||||
SDL_PrivateSubsystemRefCountIncr(SDL_INIT_SENSOR);
|
||||
#else
|
||||
return SDL_SetError("SDL not built with sensor support");
|
||||
#endif
|
||||
}
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
@@ -245,6 +260,15 @@ void
|
||||
SDL_QuitSubSystem(Uint32 flags)
|
||||
{
|
||||
/* Shut down requested initialized subsystems */
|
||||
#if !SDL_SENSOR_DISABLED
|
||||
if ((flags & SDL_INIT_SENSOR)) {
|
||||
if (SDL_PrivateShouldQuitSubsystem(SDL_INIT_SENSOR)) {
|
||||
SDL_SensorQuit();
|
||||
}
|
||||
SDL_PrivateSubsystemRefCountDecr(SDL_INIT_SENSOR);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !SDL_JOYSTICK_DISABLED
|
||||
if ((flags & SDL_INIT_GAMECONTROLLER)) {
|
||||
/* game controller implies joystick */
|
||||
@@ -451,6 +475,20 @@ SDL_GetPlatform()
|
||||
#endif
|
||||
}
|
||||
|
||||
SDL_bool
|
||||
SDL_IsTablet()
|
||||
{
|
||||
#if __ANDROID__
|
||||
extern SDL_bool SDL_IsAndroidTablet(void);
|
||||
return SDL_IsAndroidTablet();
|
||||
#elif __IPHONEOS__
|
||||
extern SDL_bool SDL_IsIPad(void);
|
||||
return SDL_IsIPad();
|
||||
#else
|
||||
return SDL_FALSE;
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined(__WIN32__)
|
||||
|
||||
#if (!defined(HAVE_LIBC) || defined(__WATCOMC__)) && !defined(SDL_STATIC_LIB)
|
||||
|
||||
@@ -120,10 +120,17 @@ static void SDL_GenerateAssertionReport(void)
|
||||
}
|
||||
|
||||
|
||||
static SDL_NORETURN void SDL_ExitProcess(int exitcode)
|
||||
#if defined(__WATCOMC__)
|
||||
#pragma aux SDL_ExitProcess aborts;
|
||||
#endif
|
||||
static void SDL_ExitProcess(int exitcode)
|
||||
{
|
||||
#ifdef __WIN32__
|
||||
ExitProcess(exitcode);
|
||||
/* "if you do not know the state of all threads in your process, it is
|
||||
better to call TerminateProcess than ExitProcess"
|
||||
https://msdn.microsoft.com/en-us/library/windows/desktop/ms682658(v=vs.85).aspx */
|
||||
TerminateProcess(GetCurrentProcess(), exitcode);
|
||||
|
||||
#elif defined(__EMSCRIPTEN__)
|
||||
emscripten_cancel_main_loop(); /* this should "kill" the app. */
|
||||
emscripten_force_exit(exitcode); /* this should "kill" the app. */
|
||||
@@ -134,7 +141,10 @@ static SDL_NORETURN void SDL_ExitProcess(int exitcode)
|
||||
}
|
||||
|
||||
|
||||
static SDL_NORETURN void SDL_AbortAssertion(void)
|
||||
#if defined(__WATCOMC__)
|
||||
#pragma aux SDL_AbortAssertion aborts;
|
||||
#endif
|
||||
static void SDL_AbortAssertion(void)
|
||||
{
|
||||
SDL_Quit();
|
||||
SDL_ExitProcess(42);
|
||||
|
||||
@@ -19,6 +19,11 @@
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef SDL_assert_c_h_
|
||||
#define SDL_assert_c_h_
|
||||
|
||||
extern void SDL_AssertionsQuit(void);
|
||||
|
||||
#endif /* SDL_assert_c_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
||||
@@ -53,10 +53,11 @@
|
||||
#endif
|
||||
|
||||
#if defined(__WATCOMC__) && defined(__386__)
|
||||
SDL_COMPILE_TIME_ASSERT(intsize, 4==sizeof(int));
|
||||
#define HAVE_WATCOM_ATOMICS
|
||||
extern _inline int _SDL_xchg_watcom(volatile int *a, int v);
|
||||
#pragma aux _SDL_xchg_watcom = \
|
||||
"xchg [ecx], eax" \
|
||||
"lock xchg [ecx], eax" \
|
||||
parm [ecx] [eax] \
|
||||
value [eax] \
|
||||
modify exact [eax];
|
||||
|
||||
@@ -32,11 +32,15 @@
|
||||
#include <atomic.h>
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_X64))
|
||||
#include <xmmintrin.h>
|
||||
#endif
|
||||
|
||||
#if defined(__WATCOMC__) && defined(__386__)
|
||||
SDL_COMPILE_TIME_ASSERT(locksize, 4==sizeof(SDL_SpinLock));
|
||||
extern _inline int _SDL_xchg_watcom(volatile int *a, int v);
|
||||
#pragma aux _SDL_xchg_watcom = \
|
||||
"xchg [ecx], eax" \
|
||||
"lock xchg [ecx], eax" \
|
||||
parm [ecx] [eax] \
|
||||
value [eax] \
|
||||
modify exact [eax];
|
||||
@@ -116,12 +120,32 @@ SDL_AtomicTryLock(SDL_SpinLock *lock)
|
||||
#endif
|
||||
}
|
||||
|
||||
/* "REP NOP" is PAUSE, coded for tools that don't know it by that name. */
|
||||
#if (defined(__GNUC__) || defined(__clang__)) && (defined(__i386__) || defined(__x86_64__))
|
||||
#define PAUSE_INSTRUCTION() __asm__ __volatile__("pause\n") /* Some assemblers can't do REP NOP, so go with PAUSE. */
|
||||
#elif defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_X64))
|
||||
#define PAUSE_INSTRUCTION() _mm_pause() /* this is actually "rep nop" and not a SIMD instruction. No inline asm in MSVC x86-64! */
|
||||
#elif defined(__WATCOMC__) && defined(__386__)
|
||||
/* watcom assembler rejects PAUSE if CPU < i686, and it refuses REP NOP as an invalid combination. Hardcode the bytes. */
|
||||
extern _inline void PAUSE_INSTRUCTION(void);
|
||||
#pragma aux PAUSE_INSTRUCTION = "db 0f3h,90h"
|
||||
#else
|
||||
#define PAUSE_INSTRUCTION()
|
||||
#endif
|
||||
|
||||
void
|
||||
SDL_AtomicLock(SDL_SpinLock *lock)
|
||||
{
|
||||
int iterations = 0;
|
||||
/* FIXME: Should we have an eventual timeout? */
|
||||
while (!SDL_AtomicTryLock(lock)) {
|
||||
SDL_Delay(0);
|
||||
if (iterations < 32) {
|
||||
iterations++;
|
||||
PAUSE_INSTRUCTION();
|
||||
} else {
|
||||
/* !!! FIXME: this doesn't definitely give up the current timeslice, it does different things on various platforms. */
|
||||
SDL_Delay(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -378,21 +378,57 @@ static int
|
||||
add_audio_device(const char *name, void *handle, SDL_AudioDeviceItem **devices, int *devCount)
|
||||
{
|
||||
int retval = -1;
|
||||
const size_t size = sizeof (SDL_AudioDeviceItem) + SDL_strlen(name) + 1;
|
||||
SDL_AudioDeviceItem *item = (SDL_AudioDeviceItem *) SDL_malloc(size);
|
||||
if (item == NULL) {
|
||||
return -1;
|
||||
}
|
||||
SDL_AudioDeviceItem *item;
|
||||
const SDL_AudioDeviceItem *i;
|
||||
int dupenum = 0;
|
||||
|
||||
SDL_assert(handle != NULL); /* we reserve NULL, audio backends can't use it. */
|
||||
SDL_assert(name != NULL);
|
||||
|
||||
item = (SDL_AudioDeviceItem *) SDL_malloc(sizeof (SDL_AudioDeviceItem));
|
||||
if (!item) {
|
||||
return SDL_OutOfMemory();
|
||||
}
|
||||
|
||||
item->original_name = SDL_strdup(name);
|
||||
if (!item->original_name) {
|
||||
SDL_free(item);
|
||||
return SDL_OutOfMemory();
|
||||
}
|
||||
|
||||
item->dupenum = 0;
|
||||
item->name = item->original_name;
|
||||
item->handle = handle;
|
||||
SDL_strlcpy(item->name, name, size - sizeof (SDL_AudioDeviceItem));
|
||||
|
||||
SDL_LockMutex(current_audio.detectionLock);
|
||||
|
||||
for (i = *devices; i != NULL; i = i->next) {
|
||||
if (SDL_strcmp(name, i->original_name) == 0) {
|
||||
dupenum = i->dupenum + 1;
|
||||
break; /* stop at the highest-numbered dupe. */
|
||||
}
|
||||
}
|
||||
|
||||
if (dupenum) {
|
||||
const size_t len = SDL_strlen(name) + 16;
|
||||
char *replacement = (char *) SDL_malloc(len);
|
||||
if (!replacement) {
|
||||
SDL_UnlockMutex(current_audio.detectionLock);
|
||||
SDL_free(item->original_name);
|
||||
SDL_free(item);
|
||||
SDL_OutOfMemory();
|
||||
return -1;
|
||||
}
|
||||
|
||||
SDL_snprintf(replacement, len, "%s (%d)", name, dupenum + 1);
|
||||
item->dupenum = dupenum;
|
||||
item->name = replacement;
|
||||
}
|
||||
|
||||
item->next = *devices;
|
||||
*devices = item;
|
||||
retval = (*devCount)++;
|
||||
retval = (*devCount)++; /* !!! FIXME: this should be an atomic increment */
|
||||
|
||||
SDL_UnlockMutex(current_audio.detectionLock);
|
||||
|
||||
return retval;
|
||||
@@ -420,6 +456,11 @@ free_device_list(SDL_AudioDeviceItem **devices, int *devCount)
|
||||
if (item->handle != NULL) {
|
||||
current_audio.impl.FreeDeviceHandle(item->handle);
|
||||
}
|
||||
/* these two pointers are the same if not a duplicate devname */
|
||||
if (item->name != item->original_name) {
|
||||
SDL_free(item->name);
|
||||
}
|
||||
SDL_free(item->original_name);
|
||||
SDL_free(item);
|
||||
}
|
||||
*devices = NULL;
|
||||
@@ -451,7 +492,11 @@ void SDL_OpenedAudioDeviceDisconnected(SDL_AudioDevice *device)
|
||||
SDL_assert(get_audio_device(device->id) == device);
|
||||
|
||||
if (!SDL_AtomicGet(&device->enabled)) {
|
||||
return;
|
||||
return; /* don't report disconnects more than once. */
|
||||
}
|
||||
|
||||
if (SDL_AtomicGet(&device->shutdown)) {
|
||||
return; /* don't report disconnect if we're trying to close device. */
|
||||
}
|
||||
|
||||
/* Ends the audio callback and mark the device as STOPPED, but the
|
||||
@@ -651,7 +696,7 @@ SDL_RunAudio(void *devicep)
|
||||
SDL_assert(!device->iscapture);
|
||||
|
||||
/* The audio mixing is always a high priority thread */
|
||||
SDL_SetThreadPriority(SDL_THREAD_PRIORITY_HIGH);
|
||||
SDL_SetThreadPriority(SDL_THREAD_PRIORITY_TIME_CRITICAL);
|
||||
|
||||
/* Perform any thread setup */
|
||||
device->threadid = SDL_ThreadID();
|
||||
@@ -832,6 +877,8 @@ SDL_CaptureAudio(void *devicep)
|
||||
}
|
||||
}
|
||||
|
||||
current_audio.impl.PrepareToClose(device);
|
||||
|
||||
current_audio.impl.FlushCapture(device);
|
||||
|
||||
current_audio.impl.ThreadDeinit(device);
|
||||
@@ -971,6 +1018,11 @@ clean_out_device_list(SDL_AudioDeviceItem **devices, int *devCount, SDL_bool *re
|
||||
} else {
|
||||
*devices = next;
|
||||
}
|
||||
/* these two pointers are the same if not a duplicate devname */
|
||||
if (item->name != item->original_name) {
|
||||
SDL_free(item->name);
|
||||
}
|
||||
SDL_free(item->original_name);
|
||||
SDL_free(item);
|
||||
}
|
||||
item = next;
|
||||
@@ -997,7 +1049,6 @@ SDL_GetNumAudioDevices(int iscapture)
|
||||
|
||||
if (!iscapture && current_audio.outputDevicesRemoved) {
|
||||
clean_out_device_list(¤t_audio.outputDevices, ¤t_audio.outputDeviceCount, ¤t_audio.outputDevicesRemoved);
|
||||
current_audio.outputDevicesRemoved = SDL_FALSE;
|
||||
}
|
||||
|
||||
retval = iscapture ? current_audio.inputDeviceCount : current_audio.outputDeviceCount;
|
||||
@@ -1054,16 +1105,14 @@ close_audio_device(SDL_AudioDevice * device)
|
||||
return;
|
||||
}
|
||||
|
||||
if (device->id > 0) {
|
||||
SDL_AudioDevice *opendev = open_devices[device->id - 1];
|
||||
SDL_assert((opendev == device) || (opendev == NULL));
|
||||
if (opendev == device) {
|
||||
open_devices[device->id - 1] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/* make sure the device is paused before we do anything else, so the
|
||||
audio callback definitely won't fire again. */
|
||||
current_audio.impl.LockDevice(device);
|
||||
SDL_AtomicSet(&device->paused, 1);
|
||||
SDL_AtomicSet(&device->shutdown, 1);
|
||||
SDL_AtomicSet(&device->enabled, 0);
|
||||
current_audio.impl.UnlockDevice(device);
|
||||
|
||||
if (device->thread != NULL) {
|
||||
SDL_WaitThread(device->thread, NULL);
|
||||
}
|
||||
@@ -1074,6 +1123,14 @@ close_audio_device(SDL_AudioDevice * device)
|
||||
SDL_free(device->work_buffer);
|
||||
SDL_FreeAudioStream(device->stream);
|
||||
|
||||
if (device->id > 0) {
|
||||
SDL_AudioDevice *opendev = open_devices[device->id - 1];
|
||||
SDL_assert((opendev == device) || (opendev == NULL));
|
||||
if (opendev == device) {
|
||||
open_devices[device->id - 1] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if (device->hidden != NULL) {
|
||||
current_audio.impl.CloseDevice(device);
|
||||
}
|
||||
@@ -1118,8 +1175,9 @@ prepare_audiospec(const SDL_AudioSpec * orig, SDL_AudioSpec * prepared)
|
||||
}
|
||||
case 1: /* Mono */
|
||||
case 2: /* Stereo */
|
||||
case 4: /* surround */
|
||||
case 6: /* surround with center and lfe */
|
||||
case 4: /* Quadrophonic */
|
||||
case 6: /* 5.1 surround */
|
||||
case 8: /* 7.1 surround */
|
||||
break;
|
||||
default:
|
||||
SDL_SetError("Unsupported number of audio channels.");
|
||||
@@ -1312,15 +1370,12 @@ open_audio_device(const char *devname, int iscapture,
|
||||
build_stream = SDL_TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
/* !!! FIXME in 2.1: add SDL_AUDIO_ALLOW_SAMPLES_CHANGE flag?
|
||||
As of 2.0.6, we will build a stream to buffer the difference between
|
||||
what the app wants to feed and the device wants to eat, so everyone
|
||||
gets their way. In prior releases, SDL would force the callback to
|
||||
feed at the rate the device requested, adjusted for resampling.
|
||||
*/
|
||||
if (device->spec.samples != obtained->samples) {
|
||||
build_stream = SDL_TRUE;
|
||||
if (allowed_changes & SDL_AUDIO_ALLOW_SAMPLES_CHANGE) {
|
||||
obtained->samples = device->spec.samples;
|
||||
} else {
|
||||
build_stream = SDL_TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
SDL_CalculateAudioSpec(obtained); /* recalc after possible changes. */
|
||||
|
||||
@@ -724,7 +724,7 @@ SDL_ResampleCVT(SDL_AudioCVT *cvt, const int chans, const SDL_AudioFormat format
|
||||
SDL_assert(format == AUDIO_F32SYS);
|
||||
|
||||
/* we keep no streaming state here, so pad with silence on both ends. */
|
||||
padding = (float *) SDL_calloc(paddingsamples, sizeof (float));
|
||||
padding = (float *) SDL_calloc(paddingsamples ? paddingsamples : 1, sizeof (float));
|
||||
if (!padding) {
|
||||
SDL_OutOfMemory();
|
||||
return;
|
||||
@@ -1291,7 +1291,7 @@ SDL_NewAudioStream(const SDL_AudioFormat src_format,
|
||||
retval->packetlen = packetlen;
|
||||
retval->rate_incr = ((double) dst_rate) / ((double) src_rate);
|
||||
retval->resampler_padding_samples = ResamplerPadding(retval->src_rate, retval->dst_rate) * pre_resample_channels;
|
||||
retval->resampler_padding = (float *) SDL_calloc(retval->resampler_padding_samples, sizeof (float));
|
||||
retval->resampler_padding = (float *) SDL_calloc(retval->resampler_padding_samples ? retval->resampler_padding_samples : 1, sizeof (float));
|
||||
|
||||
if (retval->resampler_padding == NULL) {
|
||||
SDL_FreeAudioStream(retval);
|
||||
|
||||
@@ -18,6 +18,10 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef SDL_audiodev_c_h_
|
||||
#define SDL_audiodev_c_h_
|
||||
|
||||
#include "SDL.h"
|
||||
#include "../SDL_internal.h"
|
||||
#include "SDL_sysaudio.h"
|
||||
@@ -35,4 +39,6 @@
|
||||
|
||||
extern void SDL_EnumUnixAudioDevices(const int classic, int (*test)(int));
|
||||
|
||||
#endif /* SDL_audiodev_c_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
||||
@@ -25,8 +25,10 @@
|
||||
#include "SDL_cpuinfo.h"
|
||||
#include "SDL_assert.h"
|
||||
|
||||
/* !!! FIXME: write NEON code. */
|
||||
#define HAVE_NEON_INTRINSICS 0
|
||||
/* !!! FIXME: disabled until we fix https://bugzilla.libsdl.org/show_bug.cgi?id=4186 */
|
||||
#if 0 /*def __ARM_NEON__*/
|
||||
#define HAVE_NEON_INTRINSICS 1
|
||||
#endif
|
||||
|
||||
#ifdef __SSE2__
|
||||
#define HAVE_SSE2_INTRINSICS 1
|
||||
@@ -62,7 +64,7 @@ SDL_AudioFilter SDL_Convert_F32_to_S32 = NULL;
|
||||
|
||||
#define DIVBY128 0.0078125f
|
||||
#define DIVBY32768 0.000030517578125f
|
||||
#define DIVBY2147483648 0.00000000046566128730773926
|
||||
#define DIVBY8388607 0.00000011920930376163766f
|
||||
|
||||
|
||||
#if NEED_SCALAR_CONVERTER_FALLBACKS
|
||||
@@ -152,7 +154,7 @@ SDL_Convert_S32_to_F32_Scalar(SDL_AudioCVT *cvt, SDL_AudioFormat format)
|
||||
LOG_DEBUG_CONVERT("AUDIO_S32", "AUDIO_F32");
|
||||
|
||||
for (i = cvt->len_cvt / sizeof (Sint32); i; --i, ++src, ++dst) {
|
||||
*dst = (float) (((double) *src) * DIVBY2147483648);
|
||||
*dst = ((float) (*src>>8)) * DIVBY8388607;
|
||||
}
|
||||
|
||||
if (cvt->filters[++cvt->filter_index]) {
|
||||
@@ -171,10 +173,10 @@ SDL_Convert_F32_to_S8_Scalar(SDL_AudioCVT *cvt, SDL_AudioFormat format)
|
||||
|
||||
for (i = cvt->len_cvt / sizeof (float); i; --i, ++src, ++dst) {
|
||||
const float sample = *src;
|
||||
if (sample > 1.0f) {
|
||||
if (sample >= 1.0f) {
|
||||
*dst = 127;
|
||||
} else if (sample < -1.0f) {
|
||||
*dst = -127;
|
||||
} else if (sample <= -1.0f) {
|
||||
*dst = -128;
|
||||
} else {
|
||||
*dst = (Sint8)(sample * 127.0f);
|
||||
}
|
||||
@@ -197,9 +199,9 @@ SDL_Convert_F32_to_U8_Scalar(SDL_AudioCVT *cvt, SDL_AudioFormat format)
|
||||
|
||||
for (i = cvt->len_cvt / sizeof (float); i; --i, ++src, ++dst) {
|
||||
const float sample = *src;
|
||||
if (sample > 1.0f) {
|
||||
if (sample >= 1.0f) {
|
||||
*dst = 255;
|
||||
} else if (sample < -1.0f) {
|
||||
} else if (sample <= -1.0f) {
|
||||
*dst = 0;
|
||||
} else {
|
||||
*dst = (Uint8)((sample + 1.0f) * 127.0f);
|
||||
@@ -223,10 +225,10 @@ SDL_Convert_F32_to_S16_Scalar(SDL_AudioCVT *cvt, SDL_AudioFormat format)
|
||||
|
||||
for (i = cvt->len_cvt / sizeof (float); i; --i, ++src, ++dst) {
|
||||
const float sample = *src;
|
||||
if (sample > 1.0f) {
|
||||
if (sample >= 1.0f) {
|
||||
*dst = 32767;
|
||||
} else if (sample < -1.0f) {
|
||||
*dst = -32767;
|
||||
} else if (sample <= -1.0f) {
|
||||
*dst = -32768;
|
||||
} else {
|
||||
*dst = (Sint16)(sample * 32767.0f);
|
||||
}
|
||||
@@ -249,9 +251,9 @@ SDL_Convert_F32_to_U16_Scalar(SDL_AudioCVT *cvt, SDL_AudioFormat format)
|
||||
|
||||
for (i = cvt->len_cvt / sizeof (float); i; --i, ++src, ++dst) {
|
||||
const float sample = *src;
|
||||
if (sample > 1.0f) {
|
||||
*dst = 65534;
|
||||
} else if (sample < -1.0f) {
|
||||
if (sample >= 1.0f) {
|
||||
*dst = 65535;
|
||||
} else if (sample <= -1.0f) {
|
||||
*dst = 0;
|
||||
} else {
|
||||
*dst = (Uint16)((sample + 1.0f) * 32767.0f);
|
||||
@@ -275,12 +277,12 @@ SDL_Convert_F32_to_S32_Scalar(SDL_AudioCVT *cvt, SDL_AudioFormat format)
|
||||
|
||||
for (i = cvt->len_cvt / sizeof (float); i; --i, ++src, ++dst) {
|
||||
const float sample = *src;
|
||||
if (sample > 1.0f) {
|
||||
if (sample >= 1.0f) {
|
||||
*dst = 2147483647;
|
||||
} else if (sample < -1.0f) {
|
||||
*dst = -2147483647;
|
||||
} else if (sample <= -1.0f) {
|
||||
*dst = (Sint32) -2147483648LL;
|
||||
} else {
|
||||
*dst = (Sint32)((double)sample * 2147483647.0);
|
||||
*dst = ((Sint32)(sample * 8388607.0f)) << 8;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -509,16 +511,6 @@ SDL_Convert_U16_to_F32_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format)
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(__GNUC__) && (__GNUC__ < 4)
|
||||
/* these were added as of gcc-4.0: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19418 */
|
||||
static inline __m128 _mm_castsi128_ps(__m128i __A) {
|
||||
return (__m128) __A;
|
||||
}
|
||||
static inline __m128i _mm_castps_si128(__m128 __A) {
|
||||
return (__m128i) __A;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void SDLCALL
|
||||
SDL_Convert_S32_to_F32_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format)
|
||||
{
|
||||
@@ -530,7 +522,7 @@ SDL_Convert_S32_to_F32_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format)
|
||||
|
||||
/* Get dst aligned to 16 bytes */
|
||||
for (i = cvt->len_cvt / sizeof (Sint32); i && (((size_t) dst) & 15); --i, ++src, ++dst) {
|
||||
*dst = (float) (((double) *src) * DIVBY2147483648);
|
||||
*dst = ((float) (*src>>8)) * DIVBY8388607;
|
||||
}
|
||||
|
||||
SDL_assert(!i || ((((size_t) dst) & 15) == 0));
|
||||
@@ -538,15 +530,11 @@ SDL_Convert_S32_to_F32_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format)
|
||||
|
||||
{
|
||||
/* Aligned! Do SSE blocks as long as we have 16 bytes available. */
|
||||
const __m128d divby2147483648 = _mm_set1_pd(DIVBY2147483648);
|
||||
const __m128 divby8388607 = _mm_set1_ps(DIVBY8388607);
|
||||
const __m128i *mmsrc = (const __m128i *) src;
|
||||
while (i >= 4) { /* 4 * sint32 */
|
||||
const __m128i ints = _mm_load_si128(mmsrc);
|
||||
/* bitshift the whole register over, so _mm_cvtepi32_pd can read the top ints in the bottom of the vector. */
|
||||
const __m128d doubles1 = _mm_mul_pd(_mm_cvtepi32_pd(_mm_srli_si128(ints, 8)), divby2147483648);
|
||||
const __m128d doubles2 = _mm_mul_pd(_mm_cvtepi32_pd(ints), divby2147483648);
|
||||
/* convert to float32, bitshift/or to get these into a vector to store. */
|
||||
_mm_store_ps(dst, _mm_castsi128_ps(_mm_or_si128(_mm_slli_si128(_mm_castps_si128(_mm_cvtpd_ps(doubles1)), 8), _mm_castps_si128(_mm_cvtpd_ps(doubles2)))));
|
||||
/* shift out lowest bits so int fits in a float32. Small precision loss, but much faster. */
|
||||
_mm_store_ps(dst, _mm_mul_ps(_mm_cvtepi32_ps(_mm_srai_epi32(_mm_load_si128(mmsrc), 8)), divby8388607));
|
||||
i -= 4; mmsrc++; dst += 4;
|
||||
}
|
||||
src = (const Sint32 *) mmsrc;
|
||||
@@ -554,7 +542,7 @@ SDL_Convert_S32_to_F32_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format)
|
||||
|
||||
/* Finish off any leftovers with scalar operations. */
|
||||
while (i) {
|
||||
*dst = (float) (((double) *src) * DIVBY2147483648);
|
||||
*dst = ((float) (*src>>8)) * DIVBY8388607;
|
||||
i--; src++; dst++;
|
||||
}
|
||||
|
||||
@@ -574,7 +562,14 @@ SDL_Convert_F32_to_S8_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format)
|
||||
|
||||
/* Get dst aligned to 16 bytes */
|
||||
for (i = cvt->len_cvt / sizeof (float); i && (((size_t) dst) & 15); --i, ++src, ++dst) {
|
||||
*dst = (Sint8) (*src * 127.0f);
|
||||
const float sample = *src;
|
||||
if (sample >= 1.0f) {
|
||||
*dst = 127;
|
||||
} else if (sample <= -1.0f) {
|
||||
*dst = -128;
|
||||
} else {
|
||||
*dst = (Sint8)(sample * 127.0f);
|
||||
}
|
||||
}
|
||||
|
||||
SDL_assert(!i || ((((size_t) dst) & 15) == 0));
|
||||
@@ -582,13 +577,15 @@ SDL_Convert_F32_to_S8_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format)
|
||||
/* Make sure src is aligned too. */
|
||||
if ((((size_t) src) & 15) == 0) {
|
||||
/* Aligned! Do SSE blocks as long as we have 16 bytes available. */
|
||||
const __m128 one = _mm_set1_ps(1.0f);
|
||||
const __m128 negone = _mm_set1_ps(-1.0f);
|
||||
const __m128 mulby127 = _mm_set1_ps(127.0f);
|
||||
__m128i *mmdst = (__m128i *) dst;
|
||||
while (i >= 16) { /* 16 * float32 */
|
||||
const __m128i ints1 = _mm_cvtps_epi32(_mm_mul_ps(_mm_load_ps(src), mulby127)); /* load 4 floats, convert to sint32 */
|
||||
const __m128i ints2 = _mm_cvtps_epi32(_mm_mul_ps(_mm_load_ps(src+4), mulby127)); /* load 4 floats, convert to sint32 */
|
||||
const __m128i ints3 = _mm_cvtps_epi32(_mm_mul_ps(_mm_load_ps(src+8), mulby127)); /* load 4 floats, convert to sint32 */
|
||||
const __m128i ints4 = _mm_cvtps_epi32(_mm_mul_ps(_mm_load_ps(src+12), mulby127)); /* load 4 floats, convert to sint32 */
|
||||
const __m128i ints1 = _mm_cvtps_epi32(_mm_mul_ps(_mm_min_ps(_mm_max_ps(negone, _mm_load_ps(src)), one), mulby127)); /* load 4 floats, clamp, convert to sint32 */
|
||||
const __m128i ints2 = _mm_cvtps_epi32(_mm_mul_ps(_mm_min_ps(_mm_max_ps(negone, _mm_load_ps(src+4)), one), mulby127)); /* load 4 floats, clamp, convert to sint32 */
|
||||
const __m128i ints3 = _mm_cvtps_epi32(_mm_mul_ps(_mm_min_ps(_mm_max_ps(negone, _mm_load_ps(src+8)), one), mulby127)); /* load 4 floats, clamp, convert to sint32 */
|
||||
const __m128i ints4 = _mm_cvtps_epi32(_mm_mul_ps(_mm_min_ps(_mm_max_ps(negone, _mm_load_ps(src+12)), one), mulby127)); /* load 4 floats, clamp, convert to sint32 */
|
||||
_mm_store_si128(mmdst, _mm_packs_epi16(_mm_packs_epi32(ints1, ints2), _mm_packs_epi32(ints3, ints4))); /* pack down, store out. */
|
||||
i -= 16; src += 16; mmdst++;
|
||||
}
|
||||
@@ -597,7 +594,14 @@ SDL_Convert_F32_to_S8_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format)
|
||||
|
||||
/* Finish off any leftovers with scalar operations. */
|
||||
while (i) {
|
||||
*dst = (Sint8) (*src * 127.0f);
|
||||
const float sample = *src;
|
||||
if (sample >= 1.0f) {
|
||||
*dst = 127;
|
||||
} else if (sample <= -1.0f) {
|
||||
*dst = -128;
|
||||
} else {
|
||||
*dst = (Sint8)(sample * 127.0f);
|
||||
}
|
||||
i--; src++; dst++;
|
||||
}
|
||||
|
||||
@@ -618,7 +622,14 @@ SDL_Convert_F32_to_U8_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format)
|
||||
|
||||
/* Get dst aligned to 16 bytes */
|
||||
for (i = cvt->len_cvt / sizeof (float); i && (((size_t) dst) & 15); --i, ++src, ++dst) {
|
||||
*dst = (Uint8) ((*src + 1.0f) * 127.0f);
|
||||
const float sample = *src;
|
||||
if (sample >= 1.0f) {
|
||||
*dst = 255;
|
||||
} else if (sample <= -1.0f) {
|
||||
*dst = 0;
|
||||
} else {
|
||||
*dst = (Uint8)((sample + 1.0f) * 127.0f);
|
||||
}
|
||||
}
|
||||
|
||||
SDL_assert(!i || ((((size_t) dst) & 15) == 0));
|
||||
@@ -626,14 +637,15 @@ SDL_Convert_F32_to_U8_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format)
|
||||
/* Make sure src is aligned too. */
|
||||
if ((((size_t) src) & 15) == 0) {
|
||||
/* Aligned! Do SSE blocks as long as we have 16 bytes available. */
|
||||
const __m128 add1 = _mm_set1_ps(1.0f);
|
||||
const __m128 one = _mm_set1_ps(1.0f);
|
||||
const __m128 negone = _mm_set1_ps(-1.0f);
|
||||
const __m128 mulby127 = _mm_set1_ps(127.0f);
|
||||
__m128i *mmdst = (__m128i *) dst;
|
||||
while (i >= 16) { /* 16 * float32 */
|
||||
const __m128i ints1 = _mm_cvtps_epi32(_mm_mul_ps(_mm_add_ps(_mm_load_ps(src), add1), mulby127)); /* load 4 floats, convert to sint32 */
|
||||
const __m128i ints2 = _mm_cvtps_epi32(_mm_mul_ps(_mm_add_ps(_mm_load_ps(src+4), add1), mulby127)); /* load 4 floats, convert to sint32 */
|
||||
const __m128i ints3 = _mm_cvtps_epi32(_mm_mul_ps(_mm_add_ps(_mm_load_ps(src+8), add1), mulby127)); /* load 4 floats, convert to sint32 */
|
||||
const __m128i ints4 = _mm_cvtps_epi32(_mm_mul_ps(_mm_add_ps(_mm_load_ps(src+12), add1), mulby127)); /* load 4 floats, convert to sint32 */
|
||||
const __m128i ints1 = _mm_cvtps_epi32(_mm_mul_ps(_mm_add_ps(_mm_min_ps(_mm_max_ps(negone, _mm_load_ps(src)), one), one), mulby127)); /* load 4 floats, clamp, convert to sint32 */
|
||||
const __m128i ints2 = _mm_cvtps_epi32(_mm_mul_ps(_mm_add_ps(_mm_min_ps(_mm_max_ps(negone, _mm_load_ps(src+4)), one), one), mulby127)); /* load 4 floats, clamp, convert to sint32 */
|
||||
const __m128i ints3 = _mm_cvtps_epi32(_mm_mul_ps(_mm_add_ps(_mm_min_ps(_mm_max_ps(negone, _mm_load_ps(src+8)), one), one), mulby127)); /* load 4 floats, clamp, convert to sint32 */
|
||||
const __m128i ints4 = _mm_cvtps_epi32(_mm_mul_ps(_mm_add_ps(_mm_min_ps(_mm_max_ps(negone, _mm_load_ps(src+12)), one), one), mulby127)); /* load 4 floats, clamp, convert to sint32 */
|
||||
_mm_store_si128(mmdst, _mm_packus_epi16(_mm_packs_epi32(ints1, ints2), _mm_packs_epi32(ints3, ints4))); /* pack down, store out. */
|
||||
i -= 16; src += 16; mmdst++;
|
||||
}
|
||||
@@ -642,7 +654,14 @@ SDL_Convert_F32_to_U8_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format)
|
||||
|
||||
/* Finish off any leftovers with scalar operations. */
|
||||
while (i) {
|
||||
*dst = (Uint8) ((*src + 1.0f) * 127.0f);
|
||||
const float sample = *src;
|
||||
if (sample >= 1.0f) {
|
||||
*dst = 255;
|
||||
} else if (sample <= -1.0f) {
|
||||
*dst = 0;
|
||||
} else {
|
||||
*dst = (Uint8)((sample + 1.0f) * 127.0f);
|
||||
}
|
||||
i--; src++; dst++;
|
||||
}
|
||||
|
||||
@@ -663,7 +682,14 @@ SDL_Convert_F32_to_S16_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format)
|
||||
|
||||
/* Get dst aligned to 16 bytes */
|
||||
for (i = cvt->len_cvt / sizeof (float); i && (((size_t) dst) & 15); --i, ++src, ++dst) {
|
||||
*dst = (Sint16) (*src * 32767.0f);
|
||||
const float sample = *src;
|
||||
if (sample >= 1.0f) {
|
||||
*dst = 32767;
|
||||
} else if (sample <= -1.0f) {
|
||||
*dst = -32768;
|
||||
} else {
|
||||
*dst = (Sint16)(sample * 32767.0f);
|
||||
}
|
||||
}
|
||||
|
||||
SDL_assert(!i || ((((size_t) dst) & 15) == 0));
|
||||
@@ -671,11 +697,13 @@ SDL_Convert_F32_to_S16_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format)
|
||||
/* Make sure src is aligned too. */
|
||||
if ((((size_t) src) & 15) == 0) {
|
||||
/* Aligned! Do SSE blocks as long as we have 16 bytes available. */
|
||||
const __m128 one = _mm_set1_ps(1.0f);
|
||||
const __m128 negone = _mm_set1_ps(-1.0f);
|
||||
const __m128 mulby32767 = _mm_set1_ps(32767.0f);
|
||||
__m128i *mmdst = (__m128i *) dst;
|
||||
while (i >= 8) { /* 8 * float32 */
|
||||
const __m128i ints1 = _mm_cvtps_epi32(_mm_mul_ps(_mm_load_ps(src), mulby32767)); /* load 4 floats, convert to sint32 */
|
||||
const __m128i ints2 = _mm_cvtps_epi32(_mm_mul_ps(_mm_load_ps(src+4), mulby32767)); /* load 4 floats, convert to sint32 */
|
||||
const __m128i ints1 = _mm_cvtps_epi32(_mm_mul_ps(_mm_min_ps(_mm_max_ps(negone, _mm_load_ps(src)), one), mulby32767)); /* load 4 floats, clamp, convert to sint32 */
|
||||
const __m128i ints2 = _mm_cvtps_epi32(_mm_mul_ps(_mm_min_ps(_mm_max_ps(negone, _mm_load_ps(src+4)), one), mulby32767)); /* load 4 floats, clamp, convert to sint32 */
|
||||
_mm_store_si128(mmdst, _mm_packs_epi32(ints1, ints2)); /* pack to sint16, store out. */
|
||||
i -= 8; src += 8; mmdst++;
|
||||
}
|
||||
@@ -684,7 +712,14 @@ SDL_Convert_F32_to_S16_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format)
|
||||
|
||||
/* Finish off any leftovers with scalar operations. */
|
||||
while (i) {
|
||||
*dst = (Sint16) (*src * 32767.0f);
|
||||
const float sample = *src;
|
||||
if (sample >= 1.0f) {
|
||||
*dst = 32767;
|
||||
} else if (sample <= -1.0f) {
|
||||
*dst = -32768;
|
||||
} else {
|
||||
*dst = (Sint16)(sample * 32767.0f);
|
||||
}
|
||||
i--; src++; dst++;
|
||||
}
|
||||
|
||||
@@ -705,7 +740,14 @@ SDL_Convert_F32_to_U16_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format)
|
||||
|
||||
/* Get dst aligned to 16 bytes */
|
||||
for (i = cvt->len_cvt / sizeof (float); i && (((size_t) dst) & 15); --i, ++src, ++dst) {
|
||||
*dst = (Uint16) ((*src + 1.0f) * 32767.0f);
|
||||
const float sample = *src;
|
||||
if (sample >= 1.0f) {
|
||||
*dst = 65535;
|
||||
} else if (sample <= -1.0f) {
|
||||
*dst = 0;
|
||||
} else {
|
||||
*dst = (Uint16)((sample + 1.0f) * 32767.0f);
|
||||
}
|
||||
}
|
||||
|
||||
SDL_assert(!i || ((((size_t) dst) & 15) == 0));
|
||||
@@ -722,10 +764,12 @@ SDL_Convert_F32_to_U16_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format)
|
||||
though it looks like dark magic. */
|
||||
const __m128 mulby32767 = _mm_set1_ps(32767.0f);
|
||||
const __m128i topbit = _mm_set1_epi16(-32768);
|
||||
const __m128 one = _mm_set1_ps(1.0f);
|
||||
const __m128 negone = _mm_set1_ps(-1.0f);
|
||||
__m128i *mmdst = (__m128i *) dst;
|
||||
while (i >= 8) { /* 8 * float32 */
|
||||
const __m128i ints1 = _mm_cvtps_epi32(_mm_mul_ps(_mm_load_ps(src), mulby32767)); /* load 4 floats, convert to sint32 */
|
||||
const __m128i ints2 = _mm_cvtps_epi32(_mm_mul_ps(_mm_load_ps(src+4), mulby32767)); /* load 4 floats, convert to sint32 */
|
||||
const __m128i ints1 = _mm_cvtps_epi32(_mm_mul_ps(_mm_min_ps(_mm_max_ps(negone, _mm_load_ps(src)), one), mulby32767)); /* load 4 floats, clamp, convert to sint32 */
|
||||
const __m128i ints2 = _mm_cvtps_epi32(_mm_mul_ps(_mm_min_ps(_mm_max_ps(negone, _mm_load_ps(src+4)), one), mulby32767)); /* load 4 floats, clamp, convert to sint32 */
|
||||
_mm_store_si128(mmdst, _mm_xor_si128(_mm_packs_epi32(ints1, ints2), topbit)); /* pack to sint16, xor top bit, store out. */
|
||||
i -= 8; src += 8; mmdst++;
|
||||
}
|
||||
@@ -734,7 +778,14 @@ SDL_Convert_F32_to_U16_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format)
|
||||
|
||||
/* Finish off any leftovers with scalar operations. */
|
||||
while (i) {
|
||||
*dst = (Uint16) ((*src + 1.0f) * 32767.0f);
|
||||
const float sample = *src;
|
||||
if (sample >= 1.0f) {
|
||||
*dst = 65535;
|
||||
} else if (sample <= -1.0f) {
|
||||
*dst = 0;
|
||||
} else {
|
||||
*dst = (Uint16)((sample + 1.0f) * 32767.0f);
|
||||
}
|
||||
i--; src++; dst++;
|
||||
}
|
||||
|
||||
@@ -755,7 +806,14 @@ SDL_Convert_F32_to_S32_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format)
|
||||
|
||||
/* Get dst aligned to 16 bytes */
|
||||
for (i = cvt->len_cvt / sizeof (float); i && (((size_t) dst) & 15); --i, ++src, ++dst) {
|
||||
*dst = (Sint32) (((double) *src) * 2147483647.0);
|
||||
const float sample = *src;
|
||||
if (sample >= 1.0f) {
|
||||
*dst = 2147483647;
|
||||
} else if (sample <= -1.0f) {
|
||||
*dst = (Sint32) -2147483648LL;
|
||||
} else {
|
||||
*dst = ((Sint32)(sample * 8388607.0f)) << 8;
|
||||
}
|
||||
}
|
||||
|
||||
SDL_assert(!i || ((((size_t) dst) & 15) == 0));
|
||||
@@ -763,14 +821,12 @@ SDL_Convert_F32_to_S32_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format)
|
||||
|
||||
{
|
||||
/* Aligned! Do SSE blocks as long as we have 16 bytes available. */
|
||||
const __m128d mulby2147483647 = _mm_set1_pd(2147483647.0);
|
||||
const __m128 one = _mm_set1_ps(1.0f);
|
||||
const __m128 negone = _mm_set1_ps(-1.0f);
|
||||
const __m128 mulby8388607 = _mm_set1_ps(8388607.0f);
|
||||
__m128i *mmdst = (__m128i *) dst;
|
||||
while (i >= 4) { /* 4 * float32 */
|
||||
const __m128 floats = _mm_load_ps(src);
|
||||
/* bitshift the whole register over, so _mm_cvtps_pd can read the top floats in the bottom of the vector. */
|
||||
const __m128d doubles1 = _mm_mul_pd(_mm_cvtps_pd(_mm_castsi128_ps(_mm_srli_si128(_mm_castps_si128(floats), 8))), mulby2147483647);
|
||||
const __m128d doubles2 = _mm_mul_pd(_mm_cvtps_pd(floats), mulby2147483647);
|
||||
_mm_store_si128(mmdst, _mm_or_si128(_mm_slli_si128(_mm_cvtpd_epi32(doubles1), 8), _mm_cvtpd_epi32(doubles2)));
|
||||
_mm_store_si128(mmdst, _mm_slli_epi32(_mm_cvtps_epi32(_mm_mul_ps(_mm_min_ps(_mm_max_ps(negone, _mm_load_ps(src)), one), mulby8388607)), 8)); /* load 4 floats, clamp, convert to sint32 */
|
||||
i -= 4; src += 4; mmdst++;
|
||||
}
|
||||
dst = (Sint32 *) mmdst;
|
||||
@@ -778,7 +834,14 @@ SDL_Convert_F32_to_S32_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format)
|
||||
|
||||
/* Finish off any leftovers with scalar operations. */
|
||||
while (i) {
|
||||
*dst = (Sint32) (((double) *src) * 2147483647.0);
|
||||
const float sample = *src;
|
||||
if (sample >= 1.0f) {
|
||||
*dst = 2147483647;
|
||||
} else if (sample <= -1.0f) {
|
||||
*dst = (Sint32) -2147483648LL;
|
||||
} else {
|
||||
*dst = ((Sint32)(sample * 8388607.0f)) << 8;
|
||||
}
|
||||
i--; src++; dst++;
|
||||
}
|
||||
|
||||
@@ -789,6 +852,538 @@ SDL_Convert_F32_to_S32_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format)
|
||||
#endif
|
||||
|
||||
|
||||
#if HAVE_NEON_INTRINSICS
|
||||
static void SDLCALL
|
||||
SDL_Convert_S8_to_F32_NEON(SDL_AudioCVT *cvt, SDL_AudioFormat format)
|
||||
{
|
||||
const Sint8 *src = ((const Sint8 *) (cvt->buf + cvt->len_cvt)) - 1;
|
||||
float *dst = ((float *) (cvt->buf + cvt->len_cvt * 4)) - 1;
|
||||
int i;
|
||||
|
||||
LOG_DEBUG_CONVERT("AUDIO_S8", "AUDIO_F32 (using NEON)");
|
||||
|
||||
/* Get dst aligned to 16 bytes (since buffer is growing, we don't have to worry about overreading from src) */
|
||||
for (i = cvt->len_cvt; i && (((size_t) (dst-15)) & 15); --i, --src, --dst) {
|
||||
*dst = ((float) *src) * DIVBY128;
|
||||
}
|
||||
|
||||
src -= 15; dst -= 15; /* adjust to read NEON blocks from the start. */
|
||||
SDL_assert(!i || ((((size_t) dst) & 15) == 0));
|
||||
|
||||
/* Make sure src is aligned too. */
|
||||
if ((((size_t) src) & 15) == 0) {
|
||||
/* Aligned! Do NEON blocks as long as we have 16 bytes available. */
|
||||
const int8_t *mmsrc = (const int8_t *) src;
|
||||
const float32x4_t divby128 = vdupq_n_f32(DIVBY128);
|
||||
while (i >= 16) { /* 16 * 8-bit */
|
||||
const int8x16_t bytes = vld1q_s8(mmsrc); /* get 16 sint8 into a NEON register. */
|
||||
const int16x8_t int16hi = vmovl_s8(vget_high_s8(bytes)); /* convert top 8 bytes to 8 int16 */
|
||||
const int16x8_t int16lo = vmovl_s8(vget_low_s8(bytes)); /* convert bottom 8 bytes to 8 int16 */
|
||||
/* split int16 to two int32, then convert to float, then multiply to normalize, store. */
|
||||
vst1q_f32(dst, vmulq_f32(vcvtq_f32_s32(vmovl_s16(vget_high_s16(int16hi))), divby128));
|
||||
vst1q_f32(dst+4, vmulq_f32(vcvtq_f32_s32(vmovl_s16(vget_low_s16(int16hi))), divby128));
|
||||
vst1q_f32(dst+8, vmulq_f32(vcvtq_f32_s32(vmovl_s16(vget_high_s16(int16lo))), divby128));
|
||||
vst1q_f32(dst+12, vmulq_f32(vcvtq_f32_s32(vmovl_s16(vget_low_s16(int16lo))), divby128));
|
||||
i -= 16; mmsrc -= 16; dst -= 16;
|
||||
}
|
||||
|
||||
src = (const Sint8 *) mmsrc;
|
||||
}
|
||||
|
||||
src += 15; dst += 15; /* adjust for any scalar finishing. */
|
||||
|
||||
/* Finish off any leftovers with scalar operations. */
|
||||
while (i) {
|
||||
*dst = ((float) *src) * DIVBY128;
|
||||
i--; src--; dst--;
|
||||
}
|
||||
|
||||
cvt->len_cvt *= 4;
|
||||
if (cvt->filters[++cvt->filter_index]) {
|
||||
cvt->filters[cvt->filter_index](cvt, AUDIO_F32SYS);
|
||||
}
|
||||
}
|
||||
|
||||
static void SDLCALL
|
||||
SDL_Convert_U8_to_F32_NEON(SDL_AudioCVT *cvt, SDL_AudioFormat format)
|
||||
{
|
||||
const Uint8 *src = ((const Uint8 *) (cvt->buf + cvt->len_cvt)) - 1;
|
||||
float *dst = ((float *) (cvt->buf + cvt->len_cvt * 4)) - 1;
|
||||
int i;
|
||||
|
||||
LOG_DEBUG_CONVERT("AUDIO_U8", "AUDIO_F32 (using NEON)");
|
||||
|
||||
/* Get dst aligned to 16 bytes (since buffer is growing, we don't have to worry about overreading from src) */
|
||||
for (i = cvt->len_cvt; i && (((size_t) (dst-15)) & 15); --i, --src, --dst) {
|
||||
*dst = (((float) *src) * DIVBY128) - 1.0f;
|
||||
}
|
||||
|
||||
src -= 15; dst -= 15; /* adjust to read NEON blocks from the start. */
|
||||
SDL_assert(!i || ((((size_t) dst) & 15) == 0));
|
||||
|
||||
/* Make sure src is aligned too. */
|
||||
if ((((size_t) src) & 15) == 0) {
|
||||
/* Aligned! Do NEON blocks as long as we have 16 bytes available. */
|
||||
const uint8_t *mmsrc = (const uint8_t *) src;
|
||||
const float32x4_t divby128 = vdupq_n_f32(DIVBY128);
|
||||
const float32x4_t one = vdupq_n_f32(1.0f);
|
||||
while (i >= 16) { /* 16 * 8-bit */
|
||||
const uint8x16_t bytes = vld1q_u8(mmsrc); /* get 16 uint8 into a NEON register. */
|
||||
const uint16x8_t uint16hi = vmovl_u8(vget_high_u8(bytes)); /* convert top 8 bytes to 8 uint16 */
|
||||
const uint16x8_t uint16lo = vmovl_u8(vget_low_u8(bytes)); /* convert bottom 8 bytes to 8 uint16 */
|
||||
/* split uint16 to two uint32, then convert to float, then multiply to normalize, subtract to adjust for sign, store. */
|
||||
vst1q_f32(dst, vmlsq_f32(vcvtq_f32_u32(vmovl_u16(vget_high_u16(uint16hi))), divby128, one));
|
||||
vst1q_f32(dst+4, vmlsq_f32(vcvtq_f32_u32(vmovl_u16(vget_low_u16(uint16hi))), divby128, one));
|
||||
vst1q_f32(dst+8, vmlsq_f32(vcvtq_f32_u32(vmovl_u16(vget_high_u16(uint16lo))), divby128, one));
|
||||
vst1q_f32(dst+12, vmlsq_f32(vcvtq_f32_u32(vmovl_u16(vget_low_u16(uint16lo))), divby128, one));
|
||||
i -= 16; mmsrc -= 16; dst -= 16;
|
||||
}
|
||||
|
||||
src = (const Uint8 *) mmsrc;
|
||||
}
|
||||
|
||||
src += 15; dst += 15; /* adjust for any scalar finishing. */
|
||||
|
||||
/* Finish off any leftovers with scalar operations. */
|
||||
while (i) {
|
||||
*dst = (((float) *src) * DIVBY128) - 1.0f;
|
||||
i--; src--; dst--;
|
||||
}
|
||||
|
||||
cvt->len_cvt *= 4;
|
||||
if (cvt->filters[++cvt->filter_index]) {
|
||||
cvt->filters[cvt->filter_index](cvt, AUDIO_F32SYS);
|
||||
}
|
||||
}
|
||||
|
||||
static void SDLCALL
|
||||
SDL_Convert_S16_to_F32_NEON(SDL_AudioCVT *cvt, SDL_AudioFormat format)
|
||||
{
|
||||
const Sint16 *src = ((const Sint16 *) (cvt->buf + cvt->len_cvt)) - 1;
|
||||
float *dst = ((float *) (cvt->buf + cvt->len_cvt * 2)) - 1;
|
||||
int i;
|
||||
|
||||
LOG_DEBUG_CONVERT("AUDIO_S16", "AUDIO_F32 (using NEON)");
|
||||
|
||||
/* Get dst aligned to 16 bytes (since buffer is growing, we don't have to worry about overreading from src) */
|
||||
for (i = cvt->len_cvt / sizeof (Sint16); i && (((size_t) (dst-7)) & 15); --i, --src, --dst) {
|
||||
*dst = ((float) *src) * DIVBY32768;
|
||||
}
|
||||
|
||||
src -= 7; dst -= 7; /* adjust to read NEON blocks from the start. */
|
||||
SDL_assert(!i || ((((size_t) dst) & 15) == 0));
|
||||
|
||||
/* Make sure src is aligned too. */
|
||||
if ((((size_t) src) & 15) == 0) {
|
||||
/* Aligned! Do NEON blocks as long as we have 16 bytes available. */
|
||||
const float32x4_t divby32768 = vdupq_n_f32(DIVBY32768);
|
||||
while (i >= 8) { /* 8 * 16-bit */
|
||||
const int16x8_t ints = vld1q_s16((int16_t const *) src); /* get 8 sint16 into a NEON register. */
|
||||
/* split int16 to two int32, then convert to float, then multiply to normalize, store. */
|
||||
vst1q_f32(dst, vmulq_f32(vcvtq_f32_s32(vmovl_s16(vget_low_s16(ints))), divby32768));
|
||||
vst1q_f32(dst+4, vmulq_f32(vcvtq_f32_s32(vmovl_s16(vget_high_s16(ints))), divby32768));
|
||||
i -= 8; src -= 8; dst -= 8;
|
||||
}
|
||||
}
|
||||
|
||||
src += 7; dst += 7; /* adjust for any scalar finishing. */
|
||||
|
||||
/* Finish off any leftovers with scalar operations. */
|
||||
while (i) {
|
||||
*dst = ((float) *src) * DIVBY32768;
|
||||
i--; src--; dst--;
|
||||
}
|
||||
|
||||
cvt->len_cvt *= 2;
|
||||
if (cvt->filters[++cvt->filter_index]) {
|
||||
cvt->filters[cvt->filter_index](cvt, AUDIO_F32SYS);
|
||||
}
|
||||
}
|
||||
|
||||
static void SDLCALL
|
||||
SDL_Convert_U16_to_F32_NEON(SDL_AudioCVT *cvt, SDL_AudioFormat format)
|
||||
{
|
||||
const Uint16 *src = ((const Uint16 *) (cvt->buf + cvt->len_cvt)) - 1;
|
||||
float *dst = ((float *) (cvt->buf + cvt->len_cvt * 2)) - 1;
|
||||
int i;
|
||||
|
||||
LOG_DEBUG_CONVERT("AUDIO_U16", "AUDIO_F32 (using NEON)");
|
||||
|
||||
/* Get dst aligned to 16 bytes (since buffer is growing, we don't have to worry about overreading from src) */
|
||||
for (i = cvt->len_cvt / sizeof (Sint16); i && (((size_t) (dst-7)) & 15); --i, --src, --dst) {
|
||||
*dst = (((float) *src) * DIVBY32768) - 1.0f;
|
||||
}
|
||||
|
||||
src -= 7; dst -= 7; /* adjust to read NEON blocks from the start. */
|
||||
SDL_assert(!i || ((((size_t) dst) & 15) == 0));
|
||||
|
||||
/* Make sure src is aligned too. */
|
||||
if ((((size_t) src) & 15) == 0) {
|
||||
/* Aligned! Do NEON blocks as long as we have 16 bytes available. */
|
||||
const float32x4_t divby32768 = vdupq_n_f32(DIVBY32768);
|
||||
const float32x4_t one = vdupq_n_f32(1.0f);
|
||||
while (i >= 8) { /* 8 * 16-bit */
|
||||
const uint16x8_t uints = vld1q_u16((uint16_t const *) src); /* get 8 uint16 into a NEON register. */
|
||||
/* split uint16 to two int32, then convert to float, then multiply to normalize, subtract for sign, store. */
|
||||
vst1q_f32(dst, vmlsq_f32(one, vcvtq_f32_u32(vmovl_u16(vget_low_u16(uints))), divby32768));
|
||||
vst1q_f32(dst+4, vmlsq_f32(one, vcvtq_f32_u32(vmovl_u16(vget_high_u16(uints))), divby32768));
|
||||
i -= 8; src -= 8; dst -= 8;
|
||||
}
|
||||
}
|
||||
|
||||
src += 7; dst += 7; /* adjust for any scalar finishing. */
|
||||
|
||||
/* Finish off any leftovers with scalar operations. */
|
||||
while (i) {
|
||||
*dst = (((float) *src) * DIVBY32768) - 1.0f;
|
||||
i--; src--; dst--;
|
||||
}
|
||||
|
||||
cvt->len_cvt *= 2;
|
||||
if (cvt->filters[++cvt->filter_index]) {
|
||||
cvt->filters[cvt->filter_index](cvt, AUDIO_F32SYS);
|
||||
}
|
||||
}
|
||||
|
||||
static void SDLCALL
|
||||
SDL_Convert_S32_to_F32_NEON(SDL_AudioCVT *cvt, SDL_AudioFormat format)
|
||||
{
|
||||
const Sint32 *src = (const Sint32 *) cvt->buf;
|
||||
float *dst = (float *) cvt->buf;
|
||||
int i;
|
||||
|
||||
LOG_DEBUG_CONVERT("AUDIO_S32", "AUDIO_F32 (using NEON)");
|
||||
|
||||
/* Get dst aligned to 16 bytes */
|
||||
for (i = cvt->len_cvt / sizeof (Sint32); i && (((size_t) dst) & 15); --i, ++src, ++dst) {
|
||||
*dst = ((float) (*src>>8)) * DIVBY8388607;
|
||||
}
|
||||
|
||||
SDL_assert(!i || ((((size_t) dst) & 15) == 0));
|
||||
SDL_assert(!i || ((((size_t) src) & 15) == 0));
|
||||
|
||||
{
|
||||
/* Aligned! Do NEON blocks as long as we have 16 bytes available. */
|
||||
const float32x4_t divby8388607 = vdupq_n_f32(DIVBY8388607);
|
||||
const int32_t *mmsrc = (const int32_t *) src;
|
||||
while (i >= 4) { /* 4 * sint32 */
|
||||
/* shift out lowest bits so int fits in a float32. Small precision loss, but much faster. */
|
||||
vst1q_f32(dst, vmulq_f32(vcvtq_f32_s32(vshrq_n_s32(vld1q_s32(mmsrc), 8)), divby8388607));
|
||||
i -= 4; mmsrc += 4; dst += 4;
|
||||
}
|
||||
src = (const Sint32 *) mmsrc;
|
||||
}
|
||||
|
||||
/* Finish off any leftovers with scalar operations. */
|
||||
while (i) {
|
||||
*dst = ((float) (*src>>8)) * DIVBY8388607;
|
||||
i--; src++; dst++;
|
||||
}
|
||||
|
||||
if (cvt->filters[++cvt->filter_index]) {
|
||||
cvt->filters[cvt->filter_index](cvt, AUDIO_F32SYS);
|
||||
}
|
||||
}
|
||||
|
||||
static void SDLCALL
|
||||
SDL_Convert_F32_to_S8_NEON(SDL_AudioCVT *cvt, SDL_AudioFormat format)
|
||||
{
|
||||
const float *src = (const float *) cvt->buf;
|
||||
Sint8 *dst = (Sint8 *) cvt->buf;
|
||||
int i;
|
||||
|
||||
LOG_DEBUG_CONVERT("AUDIO_F32", "AUDIO_S8 (using NEON)");
|
||||
|
||||
/* Get dst aligned to 16 bytes */
|
||||
for (i = cvt->len_cvt / sizeof (float); i && (((size_t) dst) & 15); --i, ++src, ++dst) {
|
||||
const float sample = *src;
|
||||
if (sample >= 1.0f) {
|
||||
*dst = 127;
|
||||
} else if (sample <= -1.0f) {
|
||||
*dst = -128;
|
||||
} else {
|
||||
*dst = (Sint8)(sample * 127.0f);
|
||||
}
|
||||
}
|
||||
|
||||
SDL_assert(!i || ((((size_t) dst) & 15) == 0));
|
||||
|
||||
/* Make sure src is aligned too. */
|
||||
if ((((size_t) src) & 15) == 0) {
|
||||
/* Aligned! Do NEON blocks as long as we have 16 bytes available. */
|
||||
const float32x4_t one = vdupq_n_f32(1.0f);
|
||||
const float32x4_t negone = vdupq_n_f32(-1.0f);
|
||||
const float32x4_t mulby127 = vdupq_n_f32(127.0f);
|
||||
int8_t *mmdst = (int8_t *) dst;
|
||||
while (i >= 16) { /* 16 * float32 */
|
||||
const int32x4_t ints1 = vcvtq_s32_f32(vmulq_f32(vminq_f32(vmaxq_f32(negone, vld1q_f32(src)), one), mulby127)); /* load 4 floats, clamp, convert to sint32 */
|
||||
const int32x4_t ints2 = vcvtq_s32_f32(vmulq_f32(vminq_f32(vmaxq_f32(negone, vld1q_f32(src+4)), one), mulby127)); /* load 4 floats, clamp, convert to sint32 */
|
||||
const int32x4_t ints3 = vcvtq_s32_f32(vmulq_f32(vminq_f32(vmaxq_f32(negone, vld1q_f32(src+8)), one), mulby127)); /* load 4 floats, clamp, convert to sint32 */
|
||||
const int32x4_t ints4 = vcvtq_s32_f32(vmulq_f32(vminq_f32(vmaxq_f32(negone, vld1q_f32(src+12)), one), mulby127)); /* load 4 floats, clamp, convert to sint32 */
|
||||
const int8x8_t i8lo = vmovn_s16(vcombine_s16(vmovn_s32(ints1), vmovn_s32(ints2))); /* narrow to sint16, combine, narrow to sint8 */
|
||||
const int8x8_t i8hi = vmovn_s16(vcombine_s16(vmovn_s32(ints3), vmovn_s32(ints4))); /* narrow to sint16, combine, narrow to sint8 */
|
||||
vst1q_s8(mmdst, vcombine_s8(i8lo, i8hi)); /* combine to int8x16_t, store out */
|
||||
i -= 16; src += 16; mmdst += 16;
|
||||
}
|
||||
dst = (Sint8 *) mmdst;
|
||||
}
|
||||
|
||||
/* Finish off any leftovers with scalar operations. */
|
||||
while (i) {
|
||||
const float sample = *src;
|
||||
if (sample >= 1.0f) {
|
||||
*dst = 127;
|
||||
} else if (sample <= -1.0f) {
|
||||
*dst = -128;
|
||||
} else {
|
||||
*dst = (Sint8)(sample * 127.0f);
|
||||
}
|
||||
i--; src++; dst++;
|
||||
}
|
||||
|
||||
cvt->len_cvt /= 4;
|
||||
if (cvt->filters[++cvt->filter_index]) {
|
||||
cvt->filters[cvt->filter_index](cvt, AUDIO_S8);
|
||||
}
|
||||
}
|
||||
|
||||
static void SDLCALL
|
||||
SDL_Convert_F32_to_U8_NEON(SDL_AudioCVT *cvt, SDL_AudioFormat format)
|
||||
{
|
||||
const float *src = (const float *) cvt->buf;
|
||||
Uint8 *dst = (Uint8 *) cvt->buf;
|
||||
int i;
|
||||
|
||||
LOG_DEBUG_CONVERT("AUDIO_F32", "AUDIO_U8 (using NEON)");
|
||||
|
||||
/* Get dst aligned to 16 bytes */
|
||||
for (i = cvt->len_cvt / sizeof (float); i && (((size_t) dst) & 15); --i, ++src, ++dst) {
|
||||
const float sample = *src;
|
||||
if (sample >= 1.0f) {
|
||||
*dst = 255;
|
||||
} else if (sample <= -1.0f) {
|
||||
*dst = 0;
|
||||
} else {
|
||||
*dst = (Uint8)((sample + 1.0f) * 127.0f);
|
||||
}
|
||||
}
|
||||
|
||||
SDL_assert(!i || ((((size_t) dst) & 15) == 0));
|
||||
|
||||
/* Make sure src is aligned too. */
|
||||
if ((((size_t) src) & 15) == 0) {
|
||||
/* Aligned! Do NEON blocks as long as we have 16 bytes available. */
|
||||
const float32x4_t one = vdupq_n_f32(1.0f);
|
||||
const float32x4_t negone = vdupq_n_f32(-1.0f);
|
||||
const float32x4_t mulby127 = vdupq_n_f32(127.0f);
|
||||
uint8_t *mmdst = (uint8_t *) dst;
|
||||
while (i >= 16) { /* 16 * float32 */
|
||||
const uint32x4_t uints1 = vcvtq_u32_f32(vmulq_f32(vaddq_f32(vminq_f32(vmaxq_f32(negone, vld1q_f32(src)), one), one), mulby127)); /* load 4 floats, clamp, convert to uint32 */
|
||||
const uint32x4_t uints2 = vcvtq_u32_f32(vmulq_f32(vaddq_f32(vminq_f32(vmaxq_f32(negone, vld1q_f32(src+4)), one), one), mulby127)); /* load 4 floats, clamp, convert to uint32 */
|
||||
const uint32x4_t uints3 = vcvtq_u32_f32(vmulq_f32(vaddq_f32(vminq_f32(vmaxq_f32(negone, vld1q_f32(src+8)), one), one), mulby127)); /* load 4 floats, clamp, convert to uint32 */
|
||||
const uint32x4_t uints4 = vcvtq_u32_f32(vmulq_f32(vaddq_f32(vminq_f32(vmaxq_f32(negone, vld1q_f32(src+12)), one), one), mulby127)); /* load 4 floats, clamp, convert to uint32 */
|
||||
const uint8x8_t ui8lo = vmovn_u16(vcombine_u16(vmovn_u32(uints1), vmovn_u32(uints2))); /* narrow to uint16, combine, narrow to uint8 */
|
||||
const uint8x8_t ui8hi = vmovn_u16(vcombine_u16(vmovn_u32(uints3), vmovn_u32(uints4))); /* narrow to uint16, combine, narrow to uint8 */
|
||||
vst1q_u8(mmdst, vcombine_u8(ui8lo, ui8hi)); /* combine to uint8x16_t, store out */
|
||||
i -= 16; src += 16; mmdst += 16;
|
||||
}
|
||||
|
||||
dst = (Uint8 *) mmdst;
|
||||
}
|
||||
|
||||
/* Finish off any leftovers with scalar operations. */
|
||||
while (i) {
|
||||
const float sample = *src;
|
||||
if (sample >= 1.0f) {
|
||||
*dst = 255;
|
||||
} else if (sample <= -1.0f) {
|
||||
*dst = 0;
|
||||
} else {
|
||||
*dst = (Uint8)((sample + 1.0f) * 127.0f);
|
||||
}
|
||||
i--; src++; dst++;
|
||||
}
|
||||
|
||||
cvt->len_cvt /= 4;
|
||||
if (cvt->filters[++cvt->filter_index]) {
|
||||
cvt->filters[cvt->filter_index](cvt, AUDIO_U8);
|
||||
}
|
||||
}
|
||||
|
||||
static void SDLCALL
|
||||
SDL_Convert_F32_to_S16_NEON(SDL_AudioCVT *cvt, SDL_AudioFormat format)
|
||||
{
|
||||
const float *src = (const float *) cvt->buf;
|
||||
Sint16 *dst = (Sint16 *) cvt->buf;
|
||||
int i;
|
||||
|
||||
LOG_DEBUG_CONVERT("AUDIO_F32", "AUDIO_S16 (using NEON)");
|
||||
|
||||
/* Get dst aligned to 16 bytes */
|
||||
for (i = cvt->len_cvt / sizeof (float); i && (((size_t) dst) & 15); --i, ++src, ++dst) {
|
||||
const float sample = *src;
|
||||
if (sample >= 1.0f) {
|
||||
*dst = 32767;
|
||||
} else if (sample <= -1.0f) {
|
||||
*dst = -32768;
|
||||
} else {
|
||||
*dst = (Sint16)(sample * 32767.0f);
|
||||
}
|
||||
}
|
||||
|
||||
SDL_assert(!i || ((((size_t) dst) & 15) == 0));
|
||||
|
||||
/* Make sure src is aligned too. */
|
||||
if ((((size_t) src) & 15) == 0) {
|
||||
/* Aligned! Do NEON blocks as long as we have 16 bytes available. */
|
||||
const float32x4_t one = vdupq_n_f32(1.0f);
|
||||
const float32x4_t negone = vdupq_n_f32(-1.0f);
|
||||
const float32x4_t mulby32767 = vdupq_n_f32(32767.0f);
|
||||
int16_t *mmdst = (int16_t *) dst;
|
||||
while (i >= 8) { /* 8 * float32 */
|
||||
const int32x4_t ints1 = vcvtq_s32_f32(vmulq_f32(vminq_f32(vmaxq_f32(negone, vld1q_f32(src)), one), mulby32767)); /* load 4 floats, clamp, convert to sint32 */
|
||||
const int32x4_t ints2 = vcvtq_s32_f32(vmulq_f32(vminq_f32(vmaxq_f32(negone, vld1q_f32(src+4)), one), mulby32767)); /* load 4 floats, clamp, convert to sint32 */
|
||||
vst1q_s16(mmdst, vcombine_s16(vmovn_s32(ints1), vmovn_s32(ints2))); /* narrow to sint16, combine, store out. */
|
||||
i -= 8; src += 8; mmdst += 8;
|
||||
}
|
||||
dst = (Sint16 *) mmdst;
|
||||
}
|
||||
|
||||
/* Finish off any leftovers with scalar operations. */
|
||||
while (i) {
|
||||
const float sample = *src;
|
||||
if (sample >= 1.0f) {
|
||||
*dst = 32767;
|
||||
} else if (sample <= -1.0f) {
|
||||
*dst = -32768;
|
||||
} else {
|
||||
*dst = (Sint16)(sample * 32767.0f);
|
||||
}
|
||||
i--; src++; dst++;
|
||||
}
|
||||
|
||||
cvt->len_cvt /= 2;
|
||||
if (cvt->filters[++cvt->filter_index]) {
|
||||
cvt->filters[cvt->filter_index](cvt, AUDIO_S16SYS);
|
||||
}
|
||||
}
|
||||
|
||||
static void SDLCALL
|
||||
SDL_Convert_F32_to_U16_NEON(SDL_AudioCVT *cvt, SDL_AudioFormat format)
|
||||
{
|
||||
const float *src = (const float *) cvt->buf;
|
||||
Uint16 *dst = (Uint16 *) cvt->buf;
|
||||
int i;
|
||||
|
||||
LOG_DEBUG_CONVERT("AUDIO_F32", "AUDIO_U16 (using NEON)");
|
||||
|
||||
/* Get dst aligned to 16 bytes */
|
||||
for (i = cvt->len_cvt / sizeof (float); i && (((size_t) dst) & 15); --i, ++src, ++dst) {
|
||||
const float sample = *src;
|
||||
if (sample >= 1.0f) {
|
||||
*dst = 65535;
|
||||
} else if (sample <= -1.0f) {
|
||||
*dst = 0;
|
||||
} else {
|
||||
*dst = (Uint16)((sample + 1.0f) * 32767.0f);
|
||||
}
|
||||
}
|
||||
|
||||
SDL_assert(!i || ((((size_t) dst) & 15) == 0));
|
||||
|
||||
/* Make sure src is aligned too. */
|
||||
if ((((size_t) src) & 15) == 0) {
|
||||
/* Aligned! Do NEON blocks as long as we have 16 bytes available. */
|
||||
const float32x4_t one = vdupq_n_f32(1.0f);
|
||||
const float32x4_t negone = vdupq_n_f32(-1.0f);
|
||||
const float32x4_t mulby32767 = vdupq_n_f32(32767.0f);
|
||||
uint16_t *mmdst = (uint16_t *) dst;
|
||||
while (i >= 8) { /* 8 * float32 */
|
||||
const uint32x4_t uints1 = vcvtq_u32_f32(vmulq_f32(vaddq_f32(vminq_f32(vmaxq_f32(negone, vld1q_f32(src)), one), one), mulby32767)); /* load 4 floats, clamp, convert to uint32 */
|
||||
const uint32x4_t uints2 = vcvtq_u32_f32(vmulq_f32(vaddq_f32(vminq_f32(vmaxq_f32(negone, vld1q_f32(src+4)), one), one), mulby32767)); /* load 4 floats, clamp, convert to uint32 */
|
||||
vst1q_u16(mmdst, vcombine_u16(vmovn_u32(uints1), vmovn_u32(uints2))); /* narrow to uint16, combine, store out. */
|
||||
i -= 8; src += 8; mmdst += 8;
|
||||
}
|
||||
dst = (Uint16 *) mmdst;
|
||||
}
|
||||
|
||||
/* Finish off any leftovers with scalar operations. */
|
||||
while (i) {
|
||||
const float sample = *src;
|
||||
if (sample >= 1.0f) {
|
||||
*dst = 65535;
|
||||
} else if (sample <= -1.0f) {
|
||||
*dst = 0;
|
||||
} else {
|
||||
*dst = (Uint16)((sample + 1.0f) * 32767.0f);
|
||||
}
|
||||
i--; src++; dst++;
|
||||
}
|
||||
|
||||
cvt->len_cvt /= 2;
|
||||
if (cvt->filters[++cvt->filter_index]) {
|
||||
cvt->filters[cvt->filter_index](cvt, AUDIO_U16SYS);
|
||||
}
|
||||
}
|
||||
|
||||
static void SDLCALL
|
||||
SDL_Convert_F32_to_S32_NEON(SDL_AudioCVT *cvt, SDL_AudioFormat format)
|
||||
{
|
||||
const float *src = (const float *) cvt->buf;
|
||||
Sint32 *dst = (Sint32 *) cvt->buf;
|
||||
int i;
|
||||
|
||||
LOG_DEBUG_CONVERT("AUDIO_F32", "AUDIO_S32 (using NEON)");
|
||||
|
||||
/* Get dst aligned to 16 bytes */
|
||||
for (i = cvt->len_cvt / sizeof (float); i && (((size_t) dst) & 15); --i, ++src, ++dst) {
|
||||
const float sample = *src;
|
||||
if (sample >= 1.0f) {
|
||||
*dst = 2147483647;
|
||||
} else if (sample <= -1.0f) {
|
||||
*dst = -2147483648;
|
||||
} else {
|
||||
*dst = ((Sint32)(sample * 8388607.0f)) << 8;
|
||||
}
|
||||
}
|
||||
|
||||
SDL_assert(!i || ((((size_t) dst) & 15) == 0));
|
||||
SDL_assert(!i || ((((size_t) src) & 15) == 0));
|
||||
|
||||
{
|
||||
/* Aligned! Do NEON blocks as long as we have 16 bytes available. */
|
||||
const float32x4_t one = vdupq_n_f32(1.0f);
|
||||
const float32x4_t negone = vdupq_n_f32(-1.0f);
|
||||
const float32x4_t mulby8388607 = vdupq_n_f32(8388607.0f);
|
||||
int32_t *mmdst = (int32_t *) dst;
|
||||
while (i >= 4) { /* 4 * float32 */
|
||||
vst1q_s32(mmdst, vshlq_n_s32(vcvtq_s32_f32(vmulq_f32(vminq_f32(vmaxq_f32(negone, vld1q_f32(src)), one), mulby8388607)), 8));
|
||||
i -= 4; src += 4; mmdst += 4;
|
||||
}
|
||||
dst = (Sint32 *) mmdst;
|
||||
}
|
||||
|
||||
/* Finish off any leftovers with scalar operations. */
|
||||
while (i) {
|
||||
const float sample = *src;
|
||||
if (sample >= 1.0f) {
|
||||
*dst = 2147483647;
|
||||
} else if (sample <= -1.0f) {
|
||||
*dst = -2147483648;
|
||||
} else {
|
||||
*dst = ((Sint32)(sample * 8388607.0f)) << 8;
|
||||
}
|
||||
i--; src++; dst++;
|
||||
}
|
||||
|
||||
if (cvt->filters[++cvt->filter_index]) {
|
||||
cvt->filters[cvt->filter_index](cvt, AUDIO_S32SYS);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
void SDL_ChooseAudioConverters(void)
|
||||
{
|
||||
static SDL_bool converters_chosen = SDL_FALSE;
|
||||
@@ -817,6 +1412,13 @@ void SDL_ChooseAudioConverters(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if HAVE_NEON_INTRINSICS
|
||||
if (SDL_HasNEON()) {
|
||||
SET_CONVERTER_FUNCS(NEON);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if NEED_SCALAR_CONVERTER_FALLBACKS
|
||||
SET_CONVERTER_FUNCS(Scalar);
|
||||
#endif
|
||||
|
||||
@@ -98,8 +98,10 @@ typedef struct SDL_AudioDriverImpl
|
||||
typedef struct SDL_AudioDeviceItem
|
||||
{
|
||||
void *handle;
|
||||
char *name;
|
||||
char *original_name;
|
||||
int dupenum;
|
||||
struct SDL_AudioDeviceItem *next;
|
||||
char name[SDL_VARIABLE_LENGTH_ARRAY];
|
||||
} SDL_AudioDeviceItem;
|
||||
|
||||
|
||||
|
||||
@@ -22,6 +22,10 @@
|
||||
|
||||
#if SDL_AUDIO_DRIVER_ALSA
|
||||
|
||||
#ifndef SDL_ALSA_NON_BLOCKING
|
||||
#define SDL_ALSA_NON_BLOCKING 0
|
||||
#endif
|
||||
|
||||
/* Allow access to a raw mixing buffer */
|
||||
|
||||
#include <sys/types.h>
|
||||
@@ -90,6 +94,7 @@ static int (*ALSA_snd_pcm_reset)(snd_pcm_t *);
|
||||
static int (*ALSA_snd_device_name_hint) (int, const char *, void ***);
|
||||
static char* (*ALSA_snd_device_name_get_hint) (const void *, const char *);
|
||||
static int (*ALSA_snd_device_name_free_hint) (void **);
|
||||
static snd_pcm_sframes_t (*ALSA_snd_pcm_avail)(snd_pcm_t *);
|
||||
#ifdef SND_CHMAP_API_VERSION
|
||||
static snd_pcm_chmap_t* (*ALSA_snd_pcm_get_chmap) (snd_pcm_t *);
|
||||
static int (*ALSA_snd_pcm_chmap_print) (const snd_pcm_chmap_t *map, size_t maxlen, char *buf);
|
||||
@@ -158,6 +163,7 @@ load_alsa_syms(void)
|
||||
SDL_ALSA_SYM(snd_device_name_hint);
|
||||
SDL_ALSA_SYM(snd_device_name_get_hint);
|
||||
SDL_ALSA_SYM(snd_device_name_free_hint);
|
||||
SDL_ALSA_SYM(snd_pcm_avail);
|
||||
#ifdef SND_CHMAP_API_VERSION
|
||||
SDL_ALSA_SYM(snd_pcm_get_chmap);
|
||||
SDL_ALSA_SYM(snd_pcm_chmap_print);
|
||||
@@ -243,7 +249,24 @@ get_audio_device(void *handle, const int channels)
|
||||
static void
|
||||
ALSA_WaitDevice(_THIS)
|
||||
{
|
||||
/* We're in blocking mode, so there's nothing to do here */
|
||||
#if SDL_ALSA_NON_BLOCKING
|
||||
const snd_pcm_sframes_t needed = (snd_pcm_sframes_t) this->spec.samples;
|
||||
while (SDL_AtomicGet(&this->enabled)) {
|
||||
const snd_pcm_sframes_t rc = ALSA_snd_pcm_avail(this->hidden->pcm_handle);
|
||||
if ((rc < 0) && (rc != -EAGAIN)) {
|
||||
/* Hmm, not much we can do - abort */
|
||||
fprintf(stderr, "ALSA snd_pcm_avail failed (unrecoverable): %s\n",
|
||||
ALSA_snd_strerror(rc));
|
||||
SDL_OpenedAudioDeviceDisconnected(this);
|
||||
return;
|
||||
} else if (rc < needed) {
|
||||
const Uint32 delay = ((needed - (SDL_max(rc, 0))) * 1000) / this->spec.freq;
|
||||
SDL_Delay(SDL_max(delay, 10));
|
||||
} else {
|
||||
break; /* ready to go! */
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -422,7 +445,7 @@ static void
|
||||
ALSA_CloseDevice(_THIS)
|
||||
{
|
||||
if (this->hidden->pcm_handle) {
|
||||
/* Wait for the submitted audio to drain
|
||||
/* Wait for the submitted audio to drain
|
||||
ALSA_snd_pcm_drop() can hang, so don't use that.
|
||||
*/
|
||||
Uint32 delay = ((this->spec.samples * 1000) / this->spec.freq) * 2;
|
||||
@@ -435,10 +458,32 @@ ALSA_CloseDevice(_THIS)
|
||||
}
|
||||
|
||||
static int
|
||||
ALSA_finalize_hardware(_THIS, snd_pcm_hw_params_t *hwparams, int override)
|
||||
ALSA_set_buffer_size(_THIS, snd_pcm_hw_params_t *params)
|
||||
{
|
||||
int status;
|
||||
snd_pcm_hw_params_t *hwparams;
|
||||
snd_pcm_uframes_t bufsize;
|
||||
snd_pcm_uframes_t persize;
|
||||
|
||||
/* Copy the hardware parameters for this setup */
|
||||
snd_pcm_hw_params_alloca(&hwparams);
|
||||
ALSA_snd_pcm_hw_params_copy(hwparams, params);
|
||||
|
||||
/* Prioritize matching the period size to the requested buffer size */
|
||||
persize = this->spec.samples;
|
||||
status = ALSA_snd_pcm_hw_params_set_period_size_near(
|
||||
this->hidden->pcm_handle, hwparams, &persize, NULL);
|
||||
if ( status < 0 ) {
|
||||
return(-1);
|
||||
}
|
||||
|
||||
/* Next try to restrict the parameters to having only two periods */
|
||||
bufsize = this->spec.samples * 2;
|
||||
status = ALSA_snd_pcm_hw_params_set_buffer_size_near(
|
||||
this->hidden->pcm_handle, hwparams, &bufsize);
|
||||
if ( status < 0 ) {
|
||||
return(-1);
|
||||
}
|
||||
|
||||
/* "set" the hardware with the desired parameters */
|
||||
status = ALSA_snd_pcm_hw_params(this->hidden->pcm_handle, hwparams);
|
||||
@@ -446,24 +491,12 @@ ALSA_finalize_hardware(_THIS, snd_pcm_hw_params_t *hwparams, int override)
|
||||
return(-1);
|
||||
}
|
||||
|
||||
/* Get samples for the actual buffer size */
|
||||
status = ALSA_snd_pcm_hw_params_get_buffer_size(hwparams, &bufsize);
|
||||
if ( status < 0 ) {
|
||||
return(-1);
|
||||
}
|
||||
if ( !override && bufsize != this->spec.samples * 2 ) {
|
||||
return(-1);
|
||||
}
|
||||
|
||||
/* !!! FIXME: Is this safe to do? */
|
||||
this->spec.samples = bufsize / 2;
|
||||
this->spec.samples = persize;
|
||||
|
||||
/* This is useful for debugging */
|
||||
if ( SDL_getenv("SDL_AUDIO_ALSA_DEBUG") ) {
|
||||
snd_pcm_uframes_t persize = 0;
|
||||
unsigned int periods = 0;
|
||||
|
||||
ALSA_snd_pcm_hw_params_get_period_size(hwparams, &persize, NULL);
|
||||
ALSA_snd_pcm_hw_params_get_periods(hwparams, &periods, NULL);
|
||||
|
||||
fprintf(stderr,
|
||||
@@ -474,78 +507,6 @@ ALSA_finalize_hardware(_THIS, snd_pcm_hw_params_t *hwparams, int override)
|
||||
return(0);
|
||||
}
|
||||
|
||||
static int
|
||||
ALSA_set_period_size(_THIS, snd_pcm_hw_params_t *params, int override)
|
||||
{
|
||||
const char *env;
|
||||
int status;
|
||||
snd_pcm_hw_params_t *hwparams;
|
||||
snd_pcm_uframes_t frames;
|
||||
unsigned int periods;
|
||||
|
||||
/* Copy the hardware parameters for this setup */
|
||||
snd_pcm_hw_params_alloca(&hwparams);
|
||||
ALSA_snd_pcm_hw_params_copy(hwparams, params);
|
||||
|
||||
if ( !override ) {
|
||||
env = SDL_getenv("SDL_AUDIO_ALSA_SET_PERIOD_SIZE");
|
||||
if ( env ) {
|
||||
override = SDL_atoi(env);
|
||||
if ( override == 0 ) {
|
||||
return(-1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
frames = this->spec.samples;
|
||||
status = ALSA_snd_pcm_hw_params_set_period_size_near(
|
||||
this->hidden->pcm_handle, hwparams, &frames, NULL);
|
||||
if ( status < 0 ) {
|
||||
return(-1);
|
||||
}
|
||||
|
||||
periods = 2;
|
||||
status = ALSA_snd_pcm_hw_params_set_periods_near(
|
||||
this->hidden->pcm_handle, hwparams, &periods, NULL);
|
||||
if ( status < 0 ) {
|
||||
return(-1);
|
||||
}
|
||||
|
||||
return ALSA_finalize_hardware(this, hwparams, override);
|
||||
}
|
||||
|
||||
static int
|
||||
ALSA_set_buffer_size(_THIS, snd_pcm_hw_params_t *params, int override)
|
||||
{
|
||||
const char *env;
|
||||
int status;
|
||||
snd_pcm_hw_params_t *hwparams;
|
||||
snd_pcm_uframes_t frames;
|
||||
|
||||
/* Copy the hardware parameters for this setup */
|
||||
snd_pcm_hw_params_alloca(&hwparams);
|
||||
ALSA_snd_pcm_hw_params_copy(hwparams, params);
|
||||
|
||||
if ( !override ) {
|
||||
env = SDL_getenv("SDL_AUDIO_ALSA_SET_BUFFER_SIZE");
|
||||
if ( env ) {
|
||||
override = SDL_atoi(env);
|
||||
if ( override == 0 ) {
|
||||
return(-1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
frames = this->spec.samples * 2;
|
||||
status = ALSA_snd_pcm_hw_params_set_buffer_size_near(
|
||||
this->hidden->pcm_handle, hwparams, &frames);
|
||||
if ( status < 0 ) {
|
||||
return(-1);
|
||||
}
|
||||
|
||||
return ALSA_finalize_hardware(this, hwparams, override);
|
||||
}
|
||||
|
||||
static int
|
||||
ALSA_OpenDevice(_THIS, void *handle, const char *devname, int iscapture)
|
||||
{
|
||||
@@ -692,14 +653,11 @@ ALSA_OpenDevice(_THIS, void *handle, const char *devname, int iscapture)
|
||||
this->spec.freq = rate;
|
||||
|
||||
/* Set the buffer size, in samples */
|
||||
if ( ALSA_set_period_size(this, hwparams, 0) < 0 &&
|
||||
ALSA_set_buffer_size(this, hwparams, 0) < 0 ) {
|
||||
/* Failed to set desired buffer size, do the best you can... */
|
||||
status = ALSA_set_period_size(this, hwparams, 1);
|
||||
if (status < 0) {
|
||||
return SDL_SetError("Couldn't set hardware audio parameters: %s", ALSA_snd_strerror(status));
|
||||
}
|
||||
status = ALSA_set_buffer_size(this, hwparams);
|
||||
if (status < 0) {
|
||||
return SDL_SetError("Couldn't set hardware audio parameters: %s", ALSA_snd_strerror(status));
|
||||
}
|
||||
|
||||
/* Set the software parameters */
|
||||
snd_pcm_sw_params_alloca(&swparams);
|
||||
status = ALSA_snd_pcm_sw_params_current(pcm_handle, swparams);
|
||||
@@ -737,9 +695,11 @@ ALSA_OpenDevice(_THIS, void *handle, const char *devname, int iscapture)
|
||||
SDL_memset(this->hidden->mixbuf, this->spec.silence, this->hidden->mixlen);
|
||||
}
|
||||
|
||||
#if !SDL_ALSA_NON_BLOCKING
|
||||
if (!iscapture) {
|
||||
ALSA_snd_pcm_nonblock(pcm_handle, 0);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* We're ready to rock and roll. :-) */
|
||||
return 0;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user