early-access version 2281
This commit is contained in:
parent
c2ae6d480a
commit
c4fa174d53
591 changed files with 36978 additions and 18653 deletions
|
@ -370,7 +370,7 @@ if (ENABLE_SDL2)
|
|||
if (YUZU_USE_BUNDLED_SDL2)
|
||||
# Detect toolchain and platform
|
||||
if ((MSVC_VERSION GREATER_EQUAL 1920 AND MSVC_VERSION LESS 1940) AND ARCHITECTURE_x86_64)
|
||||
set(SDL2_VER "SDL2-2.0.16")
|
||||
set(SDL2_VER "SDL2-2.0.18")
|
||||
else()
|
||||
message(FATAL_ERROR "No bundled SDL2 binaries for your toolchain. Disable YUZU_USE_BUNDLED_SDL2 and provide your own.")
|
||||
endif()
|
||||
|
@ -390,7 +390,7 @@ if (ENABLE_SDL2)
|
|||
elseif (YUZU_USE_EXTERNAL_SDL2)
|
||||
message(STATUS "Using SDL2 from externals.")
|
||||
else()
|
||||
find_package(SDL2 2.0.16 REQUIRED)
|
||||
find_package(SDL2 2.0.18 REQUIRED)
|
||||
|
||||
# Some installations don't set SDL2_LIBRARIES
|
||||
if("${SDL2_LIBRARIES}" STREQUAL "")
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
yuzu emulator early access
|
||||
=============
|
||||
|
||||
This is the source code for early-access 2276.
|
||||
This is the source code for early-access 2281.
|
||||
|
||||
## Legal Notice
|
||||
|
||||
|
|
16
externals/SDL/.github/workflows/emscripten.yml
vendored
Executable file
16
externals/SDL/.github/workflows/emscripten.yml
vendored
Executable file
|
@ -0,0 +1,16 @@
|
|||
name: Build (Emscripten)
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
emscripten:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: mymindstorm/setup-emsdk@v10
|
||||
with:
|
||||
version: 2.0.27
|
||||
- name: Configure CMake
|
||||
run: emcmake cmake -B build
|
||||
- name: Build
|
||||
run: cmake --build build/
|
20
externals/SDL/.github/workflows/ios.yml
vendored
Executable file
20
externals/SDL/.github/workflows/ios.yml
vendored
Executable file
|
@ -0,0 +1,20 @@
|
|||
name: Build (iOS/tvOS)
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
Build:
|
||||
name: ${{ matrix.platform.name }}
|
||||
runs-on: macos-latest
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform:
|
||||
- { name: iOS, target: Static Library-iOS, sdk: iphoneos }
|
||||
- { name: tvOS, target: Static Library-tvOS, sdk: appletvos }
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Build
|
||||
run: xcodebuild -project Xcode/SDL/SDL.xcodeproj -target '${{ matrix.platform.target }}' -configuration Release -sdk ${{ matrix.platform.sdk }} clean build
|
34
externals/SDL/.github/workflows/main.yml
vendored
34
externals/SDL/.github/workflows/main.yml
vendored
|
@ -6,15 +6,37 @@ jobs:
|
|||
Build:
|
||||
name: ${{ matrix.platform.name }}
|
||||
runs-on: ${{ matrix.platform.os }}
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: ${{ matrix.platform.shell }}
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform:
|
||||
- { name: Windows (x64), os: windows-latest, flags: -A x64 }
|
||||
- { name: Windows (x86), os: windows-latest, flags: -A Win32 }
|
||||
- { name: Windows (ARM64), os: windows-latest, flags: -A ARM64 }
|
||||
- { name: Linux, os: ubuntu-20.04, flags: -GNinja }
|
||||
- { name: MacOS, os: macos-latest }
|
||||
- { name: Windows (x64), os: windows-latest, shell: pwsh, flags: -A x64 }
|
||||
- { name: Windows (x86), os: windows-latest, shell: pwsh, flags: -A Win32 }
|
||||
- { name: Windows (clang-cl x64), os: windows-latest, shell: pwsh, flags: -T ClangCL -A x64 }
|
||||
- { name: Windows (clang-cl x86), os: windows-latest, shell: pwsh, flags: -T ClangCL -A Win32 }
|
||||
- { name: Windows (ARM64), os: windows-latest, shell: pwsh, flags: -A ARM64 }
|
||||
- { name: Windows (mingw32), os: windows-latest, shell: 'msys2 {0}', msystem: mingw32, msys-env: mingw-w64-i686 }
|
||||
- { name: Windows (mingw64), os: windows-latest, shell: 'msys2 {0}', msystem: mingw64, msys-env: mingw-w64-x86_64 }
|
||||
- { name: Linux, os: ubuntu-20.04, shell: sh, flags: -GNinja }
|
||||
- { name: MacOS, os: macos-latest, shell: sh }
|
||||
|
||||
steps:
|
||||
- name: Set up MSYS2
|
||||
if: matrix.platform.shell == 'msys2 {0}'
|
||||
uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
msystem: ${{ matrix.platform.msystem }}
|
||||
install: >-
|
||||
${{ matrix.platform.msys-env }}-gcc
|
||||
${{ matrix.platform.msys-env }}-cmake
|
||||
${{ matrix.platform.msys-env }}-ninja
|
||||
${{ matrix.platform.msys-env }}-pkg-config
|
||||
|
||||
- name: Setup Linux dependencies
|
||||
if: runner.os == 'Linux'
|
||||
run: |
|
||||
|
@ -60,7 +82,7 @@ jobs:
|
|||
sudo meson install -C build
|
||||
- uses: actions/checkout@v2
|
||||
- name: Configure CMake
|
||||
run: cmake -B build ${{ matrix.platform.flags }}
|
||||
run: cmake -B build -DSDL_TEST=ON ${{ matrix.platform.flags }}
|
||||
- name: Build
|
||||
run: cmake --build build/
|
||||
|
||||
|
|
28
externals/SDL/.github/workflows/riscos.yml
vendored
Executable file
28
externals/SDL/.github/workflows/riscos.yml
vendored
Executable file
|
@ -0,0 +1,28 @@
|
|||
name: Build (RISC OS)
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
autotools:
|
||||
name: autotools
|
||||
runs-on: ubuntu-latest
|
||||
container: riscosdotinfo/riscos-gccsdk-4.7:latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Configure
|
||||
run: ./configure --host=arm-unknown-riscos --disable-gcc-atomics
|
||||
- name: Build
|
||||
run: make -j`nproc`
|
||||
|
||||
cmake:
|
||||
name: CMake
|
||||
runs-on: ubuntu-latest
|
||||
container: riscosdotinfo/riscos-gccsdk-4.7:latest
|
||||
steps:
|
||||
- name: Setup dependencies
|
||||
run: apt-get update && apt-get install -y cmake ninja-build
|
||||
- uses: actions/checkout@v2
|
||||
- name: Configure CMake
|
||||
run: cmake -S. -Bbuild -G Ninja -DCMAKE_TOOLCHAIN_FILE=/home/riscos/env/toolchain-riscos.cmake -DRISCOS=ON -DSDL_GCC_ATOMICS=OFF -DCMAKE_BUILD_TYPE=Release
|
||||
- name: Build
|
||||
run: cmake --build build
|
23
externals/SDL/.github/workflows/vita.yaml
vendored
Executable file
23
externals/SDL/.github/workflows/vita.yaml
vendored
Executable file
|
@ -0,0 +1,23 @@
|
|||
name: Build (Sony Playstation Vita)
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: sh
|
||||
|
||||
jobs:
|
||||
vita:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: vitasdk/vitasdk:latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Install CMake and GNU Make
|
||||
run: |
|
||||
apk update
|
||||
apk add cmake make
|
||||
- name: Configure CMake
|
||||
run: cmake -S. -Bbuild -DCMAKE_TOOLCHAIN_FILE=${VITASDK}/share/vita.toolchain.cmake -DCMAKE_BUILD_TYPE=Release
|
||||
- name: Build
|
||||
run: cmake --build build
|
3
externals/SDL/.gitignore
vendored
3
externals/SDL/.gitignore
vendored
|
@ -120,6 +120,7 @@ test/testevdev
|
|||
test/testfile
|
||||
test/testfilesystem
|
||||
test/testgamecontroller
|
||||
test/testgeometry
|
||||
test/testgesture
|
||||
test/testgl2
|
||||
test/testgles
|
||||
|
@ -136,6 +137,7 @@ test/testloadso
|
|||
test/testlocale
|
||||
test/testlock
|
||||
test/testmessage
|
||||
test/testmouse
|
||||
test/testmultiaudio
|
||||
test/testnative
|
||||
test/testoverlay2
|
||||
|
@ -155,6 +157,7 @@ test/testshape
|
|||
test/testsprite2
|
||||
test/testspriteminimal
|
||||
test/teststreaming
|
||||
test/testsurround
|
||||
test/testthread
|
||||
test/testtimer
|
||||
test/testurl
|
||||
|
|
23
externals/SDL/Android.mk
vendored
23
externals/SDL/Android.mk
vendored
|
@ -31,6 +31,8 @@ LOCAL_SRC_FILES := \
|
|||
$(wildcard $(LOCAL_PATH)/src/file/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/haptic/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/haptic/android/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/hidapi/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/hidapi/android/*.cpp) \
|
||||
$(wildcard $(LOCAL_PATH)/src/joystick/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/joystick/android/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/joystick/hidapi/*.c) \
|
||||
|
@ -57,8 +59,6 @@ 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_CFLAGS += \
|
||||
-Wall -Wextra \
|
||||
|
@ -79,7 +79,6 @@ LOCAL_CFLAGS += \
|
|||
# Warnings we haven't fixed (yet)
|
||||
LOCAL_CFLAGS += -Wno-unused-parameter -Wno-sign-compare
|
||||
|
||||
|
||||
LOCAL_LDLIBS := -ldl -lGLESv1_CM -lGLESv2 -lOpenSLES -llog -landroid
|
||||
|
||||
ifeq ($(NDK_DEBUG),1)
|
||||
|
@ -121,22 +120,4 @@ 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)
|
||||
|
||||
$(call import-module,android/cpufeatures)
|
||||
|
||||
|
|
722
externals/SDL/CMakeLists.txt
vendored
722
externals/SDL/CMakeLists.txt
vendored
File diff suppressed because it is too large
Load diff
1
externals/SDL/Makefile.in
vendored
1
externals/SDL/Makefile.in
vendored
|
@ -80,6 +80,7 @@ HDRS = \
|
|||
SDL_gamecontroller.h \
|
||||
SDL_gesture.h \
|
||||
SDL_haptic.h \
|
||||
SDL_hidapi.h \
|
||||
SDL_hints.h \
|
||||
SDL_joystick.h \
|
||||
SDL_keyboard.h \
|
||||
|
|
25
externals/SDL/Makefile.minimal
vendored
25
externals/SDL/Makefile.minimal
vendored
|
@ -5,9 +5,12 @@ CFLAGS = -g -O2 $(INCLUDE)
|
|||
AR = ar
|
||||
RANLIB = ranlib
|
||||
|
||||
TARGET = libSDL.a
|
||||
TARGET = libSDL2.a
|
||||
TESTTARGET = libSDL2_test.a
|
||||
|
||||
SOURCES = \
|
||||
src/*.c \
|
||||
src/atomic/*.c \
|
||||
src/audio/*.c \
|
||||
src/audio/dummy/*.c \
|
||||
src/cpuinfo/*.c \
|
||||
|
@ -15,30 +18,44 @@ SOURCES = \
|
|||
src/file/*.c \
|
||||
src/haptic/*.c \
|
||||
src/haptic/dummy/*.c \
|
||||
src/hidapi/*.c \
|
||||
src/joystick/*.c \
|
||||
src/joystick/dummy/*.c \
|
||||
src/loadso/dummy/*.c \
|
||||
src/power/*.c \
|
||||
src/filesystem/dummy/*.c \
|
||||
src/locale/*.c \
|
||||
src/locale/dummy/*.c \
|
||||
src/misc/*.c \
|
||||
src/misc/dummy/*.c \
|
||||
src/render/*.c \
|
||||
src/render/software/*.c \
|
||||
src/sensor/*.c \
|
||||
src/sensor/dummy/*.c \
|
||||
src/stdlib/*.c \
|
||||
src/libm/*.c \
|
||||
src/thread/*.c \
|
||||
src/thread/generic/*.c \
|
||||
src/timer/*.c \
|
||||
src/timer/dummy/*.c \
|
||||
src/video/*.c \
|
||||
src/video/yuv2rgb/*.c \
|
||||
src/video/dummy/*.c \
|
||||
|
||||
OBJECTS = $(shell echo $(SOURCES) | sed -e 's,\.c,\.o,g')
|
||||
TSOURCES = src/test/*.c
|
||||
|
||||
all: $(TARGET)
|
||||
OBJECTS = $(shell echo $(SOURCES) | sed -e 's,\.c,\.o,g')
|
||||
TOBJECTS= $(shell echo $(TSOURCES) | sed -e 's,\.c,\.o,g')
|
||||
|
||||
all: $(TARGET) $(TESTTARGET)
|
||||
|
||||
$(TARGET): $(OBJECTS)
|
||||
$(AR) crv $@ $^
|
||||
$(RANLIB) $@
|
||||
|
||||
$(TESTTARGET): $(TOBJECTS)
|
||||
$(AR) crv $@ $^
|
||||
$(RANLIB) $@
|
||||
|
||||
clean:
|
||||
rm -f $(TARGET) $(OBJECTS)
|
||||
rm -f $(TARGET) $(TESTTARGET) $(OBJECTS) $(TOBJECTS)
|
||||
|
|
12
externals/SDL/Makefile.os2
vendored
12
externals/SDL/Makefile.os2
vendored
|
@ -2,7 +2,7 @@
|
|||
# wmake -f Makefile.os2
|
||||
|
||||
LIBNAME = SDL2
|
||||
VERSION = 2.0.16
|
||||
VERSION = 2.0.18
|
||||
DESCRIPTION = Simple DirectMedia Layer 2
|
||||
|
||||
LIBHOME = .
|
||||
|
@ -47,10 +47,10 @@ SRCS+= SDL_audio.c SDL_audiocvt.c SDL_audiodev.c SDL_audiotypecvt.c SDL_mixer.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_haptic.c SDL_hidapi.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
|
||||
SDL_render_sw.c SDL_rotate.c SDL_triangle.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 &
|
||||
|
@ -60,9 +60,7 @@ 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_os2joystick.c SDL_syshaptic.c SDL_sysjoystick.c
|
||||
SRCS+= SDL_virtualjoystick.c
|
||||
SRCS+= SDL_hidapi.c
|
||||
SRCS+= SDL_os2joystick.c SDL_syshaptic.c SDL_sysjoystick.c SDL_virtualjoystick.c
|
||||
SRCS+= SDL_hidapijoystick.c SDL_hidapi_rumble.c SDL_hidapi_gamecube.c SDL_hidapi_luna.c SDL_hidapi_ps4.c SDL_hidapi_ps5.c SDL_hidapi_stadia.c SDL_hidapi_switch.c SDL_hidapi_xbox360.c SDL_hidapi_xbox360w.c SDL_hidapi_xboxone.c SDL_hidapi_steam.c
|
||||
SRCS+= SDL_dummyaudio.c SDL_diskaudio.c
|
||||
SRCS+= SDL_nullvideo.c SDL_nullframebuffer.c SDL_nullevents.c
|
||||
|
@ -127,7 +125,7 @@ SDL_RLEaccel.obj: SDL_RLEaccel.c
|
|||
|
||||
# c99 mode needed because of structs with flexible array members in libusb.h
|
||||
SDL_hidapi.obj: SDL_hidapi.c
|
||||
wcc386 $(CFLAGS) -za99 -I"src/hidapi/hidapi" -fo=$^@ $<
|
||||
wcc386 $(CFLAGS) -za99 -fo=$^@ $<
|
||||
|
||||
.c: ./src/libm;
|
||||
$(LIBM): $(MOBJS)
|
||||
|
|
12
externals/SDL/Makefile.pandora
vendored
12
externals/SDL/Makefile.pandora
vendored
|
@ -10,7 +10,7 @@ CFLAGS = -O3 -march=armv7-a -mcpu=cortex-a8 -mtune=cortex-a8 -mfloat-abi=softfp
|
|||
-mfpu=neon -ftree-vectorize -ffast-math -fomit-frame-pointer -fno-strict-aliasing -fsingle-precision-constant \
|
||||
-I./include -I$(PNDSDK)/usr/include
|
||||
|
||||
TARGET = libSDL.a
|
||||
TARGET = libSDL2.a
|
||||
|
||||
SOURCES =
|
||||
./src/*.c \
|
||||
|
@ -25,9 +25,14 @@ SOURCES =
|
|||
./src/filesystem/unix/*.c \
|
||||
./src/haptic/*.c \
|
||||
./src/haptic/linux/*.c \
|
||||
./src/hidapi/*.c \
|
||||
./src/joystick/*.c \
|
||||
./src/joystick/linux/*.c \
|
||||
./src/loadso/dlopen/*.c \
|
||||
./src/locale/*.c \
|
||||
./src/locale/unix/*.c \
|
||||
./src/misc/*.c \
|
||||
./src/misc/unix/*.c \
|
||||
./src/power/*.c \
|
||||
./src/sensor/*.c \
|
||||
./src/sensor/dummy/*.c \
|
||||
|
@ -40,11 +45,10 @@ SOURCES =
|
|||
./src/timer/*.c \
|
||||
./src/timer/unix/*.c \
|
||||
./src/video/*.c \
|
||||
./src/video/yuv2rgb/*.c \
|
||||
./src/video/dummy/*.c \
|
||||
./src/video/pandora/SDL_pandora.o \
|
||||
./src/video/pandora/SDL_pandora_events.o \
|
||||
./src/video/x11/*.c \
|
||||
|
||||
./src/video/pandora/*.c
|
||||
|
||||
OBJECTS = $(shell echo $(SOURCES) | sed -e 's,\.c,\.o,g')
|
||||
|
||||
|
|
13
externals/SDL/Makefile.psp
vendored
13
externals/SDL/Makefile.psp
vendored
|
@ -1,6 +1,7 @@
|
|||
TARGET_LIB = libSDL2.a
|
||||
OBJS= src/SDL.o \
|
||||
src/SDL_assert.o \
|
||||
src/SDL_dataqueue.o \
|
||||
src/SDL_error.o \
|
||||
src/SDL_hints.o \
|
||||
src/SDL_log.o \
|
||||
|
@ -15,6 +16,7 @@ OBJS= src/SDL.o \
|
|||
src/audio/psp/SDL_pspaudio.o \
|
||||
src/cpuinfo/SDL_cpuinfo.o \
|
||||
src/events/SDL_clipboardevents.o \
|
||||
src/events/SDL_displayevents.o \
|
||||
src/events/SDL_dropevents.o \
|
||||
src/events/SDL_events.o \
|
||||
src/events/SDL_gesture.o \
|
||||
|
@ -26,12 +28,18 @@ OBJS= src/SDL.o \
|
|||
src/file/SDL_rwops.o \
|
||||
src/haptic/SDL_haptic.o \
|
||||
src/haptic/dummy/SDL_syshaptic.o \
|
||||
src/hidapi/SDL_hidapi.o \
|
||||
src/joystick/SDL_joystick.o \
|
||||
src/joystick/SDL_gamecontroller.o \
|
||||
src/joystick/psp/SDL_sysjoystick.o \
|
||||
src/joystick/virtual/SDL_virtualjoystick.o \
|
||||
src/power/SDL_power.o \
|
||||
src/power/psp/SDL_syspower.o \
|
||||
src/filesystem/dummy/SDL_sysfilesystem.o \
|
||||
src/locale/SDL_locale.o \
|
||||
src/locale/dummy/SDL_syslocale.o \
|
||||
src/misc/SDL_url.o \
|
||||
src/misc/dummy/SDL_sysurl.o \
|
||||
src/render/SDL_render.o \
|
||||
src/render/SDL_yuv_sw.o \
|
||||
src/render/psp/SDL_render_psp.o \
|
||||
|
@ -42,6 +50,7 @@ OBJS= src/SDL.o \
|
|||
src/render/software/SDL_drawpoint.o \
|
||||
src/render/software/SDL_render_sw.o \
|
||||
src/render/software/SDL_rotate.o \
|
||||
src/render/software/SDL_triangle.o \
|
||||
src/sensor/SDL_sensor.o \
|
||||
src/sensor/dummy/SDL_dummysensor.o \
|
||||
src/stdlib/SDL_getenv.o \
|
||||
|
@ -76,10 +85,12 @@ OBJS= src/SDL.o \
|
|||
src/video/SDL_stretch.o \
|
||||
src/video/SDL_surface.o \
|
||||
src/video/SDL_video.o \
|
||||
src/video/SDL_yuv.o \
|
||||
src/video/psp/SDL_pspevents.o \
|
||||
src/video/psp/SDL_pspvideo.o \
|
||||
src/video/psp/SDL_pspgl.o \
|
||||
src/video/psp/SDL_pspmouse.o
|
||||
src/video/psp/SDL_pspmouse.o \
|
||||
src/video/yuv2rgb/yuv_rgb.o
|
||||
|
||||
INCDIR = ./include
|
||||
CFLAGS = -g -O2 -G0 -Wall -D__PSP__ -DHAVE_OPENGL
|
||||
|
|
12
externals/SDL/Makefile.wiz
vendored
12
externals/SDL/Makefile.wiz
vendored
|
@ -14,6 +14,7 @@ TARGET_SHARED = libSDL2.so
|
|||
|
||||
SOURCES = \
|
||||
./src/*.c \
|
||||
./src/atomic/*.c \
|
||||
./src/audio/*.c \
|
||||
./src/audio/disk/*.c \
|
||||
./src/audio/dsp/*.c \
|
||||
|
@ -21,11 +22,18 @@ SOURCES = \
|
|||
./src/cpuinfo/*.c \
|
||||
./src/events/*.c \
|
||||
./src/file/*.c \
|
||||
./src/filesystem/unix/*.c \
|
||||
./src/haptic/*.c \
|
||||
./src/haptic/linux/*.c \
|
||||
./src/hidapi/*.c \
|
||||
./src/joystick/*.c \
|
||||
./src/joystick/linux/*.c \
|
||||
./src/loadso/dlopen/*.c \
|
||||
./src/locale/*.c \
|
||||
./src/locale/unix/*.c \
|
||||
./src/misc/*.c \
|
||||
./src/misc/unix/*.c \
|
||||
./src/power/*.c \
|
||||
./src/sensor/*.c \
|
||||
./src/sensor/dummy/*.c \
|
||||
./src/stdlib/*.c \
|
||||
|
@ -37,9 +45,9 @@ SOURCES = \
|
|||
./src/timer/*.c \
|
||||
./src/timer/unix/*.c \
|
||||
./src/video/*.c \
|
||||
./src/video/yuv2rgb/*.c \
|
||||
./src/video/dummy/*.c \
|
||||
./src/video/pandora/*.c \
|
||||
|
||||
./src/video/pandora/*.c
|
||||
|
||||
OBJECTS = $(shell echo $(SOURCES) | sed -e 's,\.c,\.o,g')
|
||||
|
||||
|
|
13
externals/SDL/SDL2Config.cmake
vendored
13
externals/SDL/SDL2Config.cmake
vendored
|
@ -1,5 +1,14 @@
|
|||
include("${CMAKE_CURRENT_LIST_DIR}/SDL2Targets.cmake")
|
||||
|
||||
# on static-only builds create an alias
|
||||
if(NOT TARGET SDL2::SDL2 AND TARGET SDL2::SDL2-static)
|
||||
if(CMAKE_VERSION VERSION_LESS "3.18")
|
||||
# Aliasing local targets is not supported on CMake < 3.18, so make it global.
|
||||
set_target_properties(SDL2::SDL2-static PROPERTIES IMPORTED_GLOBAL TRUE)
|
||||
endif()
|
||||
add_library(SDL2::SDL2 ALIAS SDL2::SDL2-static)
|
||||
endif()
|
||||
|
||||
# provide ${SDL2_LIBRARIES}, ${SDL2_INCLUDE_DIRS} etc, like sdl2-config.cmake does,
|
||||
# for compatibility between SDL2 built with autotools and SDL2 built with CMake
|
||||
|
||||
|
@ -59,10 +68,10 @@ if( sdl2implib AND sdl2mainimplib AND sdl2implibdbg AND sdl2mainimplibdbg )
|
|||
set(SDL2_LIBRARIES $<IF:$<CONFIG:Debug>,${sdl2mainimplibdbg},${sdl2mainimplib}> $<IF:$<CONFIG:Debug>,${sdl2implibdbg},${sdl2implib}>)
|
||||
else()
|
||||
if( (NOT sdl2implib) AND sdl2implibdbg ) # if we only have a debug version of the lib
|
||||
set(sdl2implib sdl2implibdbg)
|
||||
set(sdl2implib ${sdl2implibdbg})
|
||||
endif()
|
||||
if( (NOT sdl2mainimplib) AND sdl2mainimplibdbg ) # if we only have a debug version of the lib
|
||||
set(sdl2mainimplib sdl2mainimplibdbg)
|
||||
set(sdl2mainimplib ${sdl2mainimplibdbg})
|
||||
endif()
|
||||
|
||||
if( sdl2implib AND sdl2mainimplib )
|
||||
|
|
34
externals/SDL/VisualC-WinRT/SDL-UWP.sln
vendored
Executable file
34
externals/SDL/VisualC-WinRT/SDL-UWP.sln
vendored
Executable file
|
@ -0,0 +1,34 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 14
|
||||
VisualStudioVersion = 14.0.25420.1
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL2-UWP", "SDL-UWP.vcxproj", "{89E9B32E-A86A-47C3-A948-D2B1622925CE}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|ARM = Debug|ARM
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Release|ARM = Release|ARM
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{89E9B32E-A86A-47C3-A948-D2B1622925CE}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{89E9B32E-A86A-47C3-A948-D2B1622925CE}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{89E9B32E-A86A-47C3-A948-D2B1622925CE}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{89E9B32E-A86A-47C3-A948-D2B1622925CE}.Debug|x64.Build.0 = Debug|x64
|
||||
{89E9B32E-A86A-47C3-A948-D2B1622925CE}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{89E9B32E-A86A-47C3-A948-D2B1622925CE}.Debug|x86.Build.0 = Debug|Win32
|
||||
{89E9B32E-A86A-47C3-A948-D2B1622925CE}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{89E9B32E-A86A-47C3-A948-D2B1622925CE}.Release|ARM.Build.0 = Release|ARM
|
||||
{89E9B32E-A86A-47C3-A948-D2B1622925CE}.Release|x64.ActiveCfg = Release|x64
|
||||
{89E9B32E-A86A-47C3-A948-D2B1622925CE}.Release|x64.Build.0 = Release|x64
|
||||
{89E9B32E-A86A-47C3-A948-D2B1622925CE}.Release|x86.ActiveCfg = Release|Win32
|
||||
{89E9B32E-A86A-47C3-A948-D2B1622925CE}.Release|x86.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
598
externals/SDL/VisualC-WinRT/SDL-UWP.vcxproj
vendored
Executable file
598
externals/SDL/VisualC-WinRT/SDL-UWP.vcxproj
vendored
Executable file
|
@ -0,0 +1,598 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|ARM">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>ARM</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|ARM">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>ARM</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\include\begin_code.h" />
|
||||
<ClInclude Include="..\include\close_code.h" />
|
||||
<ClInclude Include="..\include\SDL.h" />
|
||||
<ClInclude Include="..\include\SDL_assert.h" />
|
||||
<ClInclude Include="..\include\SDL_atomic.h" />
|
||||
<ClInclude Include="..\include\SDL_audio.h" />
|
||||
<ClInclude Include="..\include\SDL_blendmode.h" />
|
||||
<ClInclude Include="..\include\SDL_clipboard.h" />
|
||||
<ClInclude Include="..\include\SDL_config.h" />
|
||||
<ClInclude Include="..\include\SDL_config_minimal.h" />
|
||||
<ClInclude Include="..\include\SDL_config_winrt.h" />
|
||||
<ClInclude Include="..\include\SDL_copying.h" />
|
||||
<ClInclude Include="..\include\SDL_cpuinfo.h" />
|
||||
<ClInclude Include="..\include\SDL_egl.h" />
|
||||
<ClInclude Include="..\include\SDL_endian.h" />
|
||||
<ClInclude Include="..\include\SDL_error.h" />
|
||||
<ClInclude Include="..\include\SDL_events.h" />
|
||||
<ClInclude Include="..\include\SDL_filesystem.h" />
|
||||
<ClInclude Include="..\include\SDL_haptic.h" />
|
||||
<ClInclude Include="..\include\SDL_hints.h" />
|
||||
<ClInclude Include="..\include\SDL_hidapi.h" />
|
||||
<ClInclude Include="..\include\SDL_input.h" />
|
||||
<ClInclude Include="..\include\SDL_joystick.h" />
|
||||
<ClInclude Include="..\include\SDL_keyboard.h" />
|
||||
<ClInclude Include="..\include\SDL_keycode.h" />
|
||||
<ClInclude Include="..\include\SDL_loadso.h" />
|
||||
<ClInclude Include="..\include\SDL_locale.h" />
|
||||
<ClInclude Include="..\include\SDL_log.h" />
|
||||
<ClInclude Include="..\include\SDL_main.h" />
|
||||
<ClInclude Include="..\include\SDL_misc.h" />
|
||||
<ClInclude Include="..\include\SDL_mouse.h" />
|
||||
<ClInclude Include="..\include\SDL_mutex.h" />
|
||||
<ClInclude Include="..\include\SDL_name.h" />
|
||||
<ClInclude Include="..\include\SDL_opengles2.h" />
|
||||
<ClInclude Include="..\include\SDL_pixels.h" />
|
||||
<ClInclude Include="..\include\SDL_platform.h" />
|
||||
<ClInclude Include="..\include\SDL_power.h" />
|
||||
<ClInclude Include="..\include\SDL_quit.h" />
|
||||
<ClInclude Include="..\include\SDL_rect.h" />
|
||||
<ClInclude Include="..\include\SDL_render.h" />
|
||||
<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" />
|
||||
<ClInclude Include="..\include\SDL_system.h" />
|
||||
<ClInclude Include="..\include\SDL_syswm.h" />
|
||||
<ClInclude Include="..\include\SDL_thread.h" />
|
||||
<ClInclude Include="..\include\SDL_timer.h" />
|
||||
<ClInclude Include="..\include\SDL_touch.h" />
|
||||
<ClInclude Include="..\include\SDL_types.h" />
|
||||
<ClInclude Include="..\include\SDL_version.h" />
|
||||
<ClInclude Include="..\include\SDL_video.h" />
|
||||
<ClInclude Include="..\src\audio\disk\SDL_diskaudio.h" />
|
||||
<ClInclude Include="..\src\audio\dummy\SDL_dummyaudio.h" />
|
||||
<ClInclude Include="..\src\audio\SDL_audiodev_c.h" />
|
||||
<ClInclude Include="..\src\audio\SDL_audio_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\core\windows\SDL_directx.h" />
|
||||
<ClInclude Include="..\src\core\windows\SDL_windows.h" />
|
||||
<ClInclude Include="..\src\core\windows\SDL_xinput.h" />
|
||||
<ClInclude Include="..\src\core\winrt\SDL_winrtapp_common.h" />
|
||||
<ClInclude Include="..\src\core\winrt\SDL_winrtapp_direct3d.h" />
|
||||
<ClInclude Include="..\src\core\winrt\SDL_winrtapp_xaml.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_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_haptic_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_gamecontrollerdb.h" />
|
||||
<ClInclude Include="..\src\joystick\SDL_joystick_c.h" />
|
||||
<ClInclude Include="..\src\joystick\SDL_sysjoystick.h" />
|
||||
<ClInclude Include="..\src\joystick\virtual\SDL_virtualjoystick_c.h" />
|
||||
<ClInclude Include="..\src\joystick\windows\SDL_dinputjoystick_c.h" />
|
||||
<ClInclude Include="..\src\joystick\windows\SDL_windowsjoystick_c.h" />
|
||||
<ClInclude Include="..\src\joystick\windows\SDL_xinputjoystick_c.h" />
|
||||
<ClInclude Include="..\src\locale\SDL_syslocale.h" />
|
||||
<ClInclude Include="..\src\render\direct3d11\SDL_render_winrt.h" />
|
||||
<ClInclude Include="..\src\render\direct3d11\SDL_shaders_d3d11.h" />
|
||||
<ClInclude Include="..\src\render\opengles2\SDL_gles2funcs.h" />
|
||||
<ClInclude Include="..\src\render\opengles2\SDL_shaders_gles2.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\render\software\SDL_triangle.h" />
|
||||
<ClInclude Include="..\src\SDL_assert_c.h" />
|
||||
<ClInclude Include="..\src\SDL_dataqueue.h" />
|
||||
<ClInclude Include="..\src\SDL_error_c.h" />
|
||||
<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" />
|
||||
<ClInclude Include="..\src\thread\stdcpp\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_egl_c.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_yuv_c.h" />
|
||||
<ClInclude Include="..\src\video\winrt\SDL_winrtevents_c.h" />
|
||||
<ClInclude Include="..\src\video\winrt\SDL_winrtgamebar_cpp.h" />
|
||||
<ClInclude Include="..\src\video\winrt\SDL_winrtmessagebox.h" />
|
||||
<ClInclude Include="..\src\video\winrt\SDL_winrtmouse_c.h" />
|
||||
<ClInclude Include="..\src\video\winrt\SDL_winrtopengles.h" />
|
||||
<ClInclude Include="..\src\video\winrt\SDL_winrtvideo_cpp.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\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_winrt.cpp">
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</CompileAsWinRT>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\core\windows\SDL_windows.c" />
|
||||
<ClCompile Include="..\src\core\windows\SDL_xinput.c" />
|
||||
<ClCompile Include="..\src\core\winrt\SDL_winrtapp_common.cpp">
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</CompileAsWinRT>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\core\winrt\SDL_winrtapp_direct3d.cpp">
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</CompileAsWinRT>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\core\winrt\SDL_winrtapp_xaml.cpp">
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</CompileAsWinRT>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\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\filesystem\winrt\SDL_sysfilesystem.cpp">
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</CompileAsWinRT>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\file\SDL_rwops.c" />
|
||||
<ClCompile Include="..\src\haptic\dummy\SDL_syshaptic.c" />
|
||||
<ClCompile Include="..\src\haptic\SDL_haptic.c" />
|
||||
<ClCompile Include="..\src\haptic\windows\SDL_dinputhaptic.c" />
|
||||
<ClCompile Include="..\src\haptic\windows\SDL_windowshaptic.c" />
|
||||
<ClCompile Include="..\src\haptic\windows\SDL_xinputhaptic.c" />
|
||||
<ClCompile Include="..\src\hidapi\SDL_hidapi.c" />
|
||||
<ClCompile Include="..\src\joystick\dummy\SDL_sysjoystick.c" />
|
||||
<ClCompile Include="..\src\joystick\SDL_gamecontroller.c" />
|
||||
<ClCompile Include="..\src\joystick\SDL_joystick.c" />
|
||||
<ClCompile Include="..\src\joystick\virtual\SDL_virtualjoystick.c" />
|
||||
<ClCompile Include="..\src\joystick\windows\SDL_dinputjoystick.c" />
|
||||
<ClCompile Include="..\src\joystick\windows\SDL_windowsjoystick.c" />
|
||||
<ClCompile Include="..\src\joystick\windows\SDL_windows_gaming_input.c" />
|
||||
<ClCompile Include="..\src\joystick\windows\SDL_xinputjoystick.c" />
|
||||
<ClCompile Include="..\src\loadso\windows\SDL_sysloadso.c" />
|
||||
<ClCompile Include="..\src\locale\SDL_locale.c" />
|
||||
<ClCompile Include="..\src\locale\winrt\SDL_syslocale.c" />
|
||||
<ClCompile Include="..\src\misc\SDL_url.c" />
|
||||
<ClCompile Include="..\src\misc\winrt\SDL_sysurl.cpp">
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</CompileAsWinRT>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\power\SDL_power.c" />
|
||||
<ClCompile Include="..\src\power\winrt\SDL_syspower.cpp" />
|
||||
<ClCompile Include="..\src\render\direct3d11\SDL_render_d3d11.c" />
|
||||
<ClCompile Include="..\src\render\direct3d11\SDL_render_winrt.cpp">
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</CompileAsWinRT>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\render\direct3d11\SDL_shaders_d3d11.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\render\software\SDL_triangle.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_crc32.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\stdlib\SDL_strtokr.c" />
|
||||
<ClCompile Include="..\src\thread\generic\SDL_syssem.c" />
|
||||
<ClCompile Include="..\src\thread\SDL_thread.c" />
|
||||
<ClCompile Include="..\src\thread\stdcpp\SDL_syscond.cpp" />
|
||||
<ClCompile Include="..\src\thread\stdcpp\SDL_sysmutex.cpp" />
|
||||
<ClCompile Include="..\src\thread\stdcpp\SDL_systhread.cpp" />
|
||||
<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_yuv.c" />
|
||||
<ClCompile Include="..\src\video\winrt\SDL_winrtevents.cpp">
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</CompileAsWinRT>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\video\winrt\SDL_winrtgamebar.cpp">
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</CompileAsWinRT>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\video\winrt\SDL_winrtkeyboard.cpp">
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</CompileAsWinRT>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\video\winrt\SDL_winrtmessagebox.cpp">
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</CompileAsWinRT>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\video\winrt\SDL_winrtmouse.cpp">
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</CompileAsWinRT>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\video\winrt\SDL_winrtopengles.cpp">
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</CompileAsWinRT>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\video\winrt\SDL_winrtpointerinput.cpp">
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</CompileAsWinRT>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\video\winrt\SDL_winrtvideo.cpp">
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">true</CompileAsWinRT>
|
||||
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</CompileAsWinRT>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\video\yuv2rgb\yuv_rgb.c" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{89e9b32e-a86a-47c3-a948-d2b1622925ce}</ProjectGuid>
|
||||
<Keyword>DynamicLibrary</Keyword>
|
||||
<ProjectName>SDL2-UWP</ProjectName>
|
||||
<RootNamespace>SDL2</RootNamespace>
|
||||
<DefaultLanguage>en-US</DefaultLanguage>
|
||||
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
|
||||
<AppContainerApplication>true</AppContainerApplication>
|
||||
<ApplicationType>Windows Store</ApplicationType>
|
||||
<ApplicationTypeRevision>8.2</ApplicationTypeRevision>
|
||||
<TargetPlatformVersion>10.0.10069.0</TargetPlatformVersion>
|
||||
<TargetPlatformMinVersion>10.0.10069.0</TargetPlatformMinVersion>
|
||||
<WindowsTargetPlatformVersion>10.0.10240.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformMinVersion>10.0.10240.0</WindowsTargetPlatformMinVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<GenerateManifest>false</GenerateManifest>
|
||||
<IgnoreImportLibrary>false</IgnoreImportLibrary>
|
||||
<TargetName>SDL2</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<GenerateManifest>false</GenerateManifest>
|
||||
<IgnoreImportLibrary>false</IgnoreImportLibrary>
|
||||
<TargetName>SDL2</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
|
||||
<GenerateManifest>false</GenerateManifest>
|
||||
<IgnoreImportLibrary>false</IgnoreImportLibrary>
|
||||
<TargetName>SDL2</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
|
||||
<GenerateManifest>false</GenerateManifest>
|
||||
<IgnoreImportLibrary>false</IgnoreImportLibrary>
|
||||
<TargetName>SDL2</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<GenerateManifest>false</GenerateManifest>
|
||||
<IgnoreImportLibrary>false</IgnoreImportLibrary>
|
||||
<TargetName>SDL2</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<GenerateManifest>false</GenerateManifest>
|
||||
<IgnoreImportLibrary>false</IgnoreImportLibrary>
|
||||
<TargetName>SDL2</TargetName>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<CompileAsWinRT>false</CompileAsWinRT>
|
||||
<AdditionalIncludeDirectories>..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>DLL_EXPORT;_CRT_SECURE_NO_WARNINGS;SDL_BUILDING_WINRT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
|
||||
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
|
||||
<AdditionalOptions>/nodefaultlib:vccorlibd /nodefaultlib:msvcrtd vccorlibd.lib msvcrtd.lib %(AdditionalOptions)</AdditionalOptions>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<CompileAsWinRT>false</CompileAsWinRT>
|
||||
<AdditionalIncludeDirectories>..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>DLL_EXPORT;_CRT_SECURE_NO_WARNINGS;SDL_BUILDING_WINRT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
|
||||
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
|
||||
<AdditionalOptions>/nodefaultlib:vccorlib /nodefaultlib:msvcrt vccorlib.lib msvcrt.lib %(AdditionalOptions)</AdditionalOptions>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|arm'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<CompileAsWinRT>false</CompileAsWinRT>
|
||||
<AdditionalIncludeDirectories>..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>DLL_EXPORT;_CRT_SECURE_NO_WARNINGS;SDL_BUILDING_WINRT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
|
||||
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
|
||||
<AdditionalOptions>/nodefaultlib:vccorlibd /nodefaultlib:msvcrtd vccorlibd.lib msvcrtd.lib %(AdditionalOptions)</AdditionalOptions>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|arm'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<CompileAsWinRT>false</CompileAsWinRT>
|
||||
<AdditionalIncludeDirectories>..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>DLL_EXPORT;_CRT_SECURE_NO_WARNINGS;SDL_BUILDING_WINRT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
|
||||
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
|
||||
<AdditionalOptions>/nodefaultlib:vccorlib /nodefaultlib:msvcrt vccorlib.lib msvcrt.lib %(AdditionalOptions)</AdditionalOptions>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<CompileAsWinRT>false</CompileAsWinRT>
|
||||
<AdditionalIncludeDirectories>..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>DLL_EXPORT;_CRT_SECURE_NO_WARNINGS;SDL_BUILDING_WINRT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
|
||||
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
|
||||
<AdditionalOptions>/nodefaultlib:vccorlibd /nodefaultlib:msvcrtd vccorlibd.lib msvcrtd.lib %(AdditionalOptions)</AdditionalOptions>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<CompileAsWinRT>false</CompileAsWinRT>
|
||||
<AdditionalIncludeDirectories>..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>DLL_EXPORT;_CRT_SECURE_NO_WARNINGS;SDL_BUILDING_WINRT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
|
||||
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
|
||||
<AdditionalOptions>/nodefaultlib:vccorlib /nodefaultlib:msvcrt vccorlib.lib msvcrt.lib %(AdditionalOptions)</AdditionalOptions>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
822
externals/SDL/VisualC-WinRT/SDL-UWP.vcxproj.filters
vendored
Executable file
822
externals/SDL/VisualC-WinRT/SDL-UWP.vcxproj.filters
vendored
Executable file
|
@ -0,0 +1,822 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{fa0ff2df-c3d6-498a-96f1-1f88e7ce0da3}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{68e1b30b-19ed-4612-93e4-6260c5a979e5}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\include\begin_code.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\close_code.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\SDL.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\SDL_assert.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\SDL_atomic.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\SDL_audio.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\SDL_blendmode.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\SDL_clipboard.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\SDL_config.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\SDL_config_minimal.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\SDL_config_winrt.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\SDL_copying.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\SDL_cpuinfo.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\SDL_egl.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\SDL_endian.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\SDL_error.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\SDL_events.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\SDL_filesystem.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\SDL_haptic.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\SDL_hints.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\SDL_hidapi.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\SDL_input.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\SDL_joystick.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\SDL_keyboard.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\SDL_keycode.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\SDL_loadso.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\SDL_locale.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\SDL_log.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\SDL_main.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\SDL_mouse.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\SDL_mutex.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\SDL_name.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\SDL_opengles2.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\SDL_pixels.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\SDL_platform.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\SDL_power.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\SDL_quit.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\SDL_rect.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\SDL_render.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\SDL_revision.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\SDL_rwops.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\SDL_scancode.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\SDL_shape.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\SDL_stdinc.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\SDL_surface.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\SDL_system.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\SDL_syswm.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\SDL_thread.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\SDL_timer.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\SDL_touch.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\SDL_types.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\SDL_version.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\SDL_video.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\joystick\SDL_gamecontrollerdb.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\audio\disk\SDL_diskaudio.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\audio\dummy\SDL_dummyaudio.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\audio\SDL_audiodev_c.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\audio\SDL_audio_c.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\audio\SDL_sysaudio.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\audio\SDL_wave.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\core\windows\SDL_directx.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\core\windows\SDL_windows.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\core\windows\SDL_xinput.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\core\winrt\SDL_winrtapp_common.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\core\winrt\SDL_winrtapp_direct3d.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\core\winrt\SDL_winrtapp_xaml.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\dynapi\SDL_dynapi.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\dynapi\SDL_dynapi_overrides.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\dynapi\SDL_dynapi_procs.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\events\blank_cursor.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\events\default_cursor.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\events\SDL_clipboardevents_c.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\events\SDL_dropevents_c.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\events\SDL_events_c.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\events\SDL_keyboard_c.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\events\SDL_mouse_c.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\events\SDL_sysevents.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\events\SDL_touch_c.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\events\SDL_windowevents_c.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\haptic\SDL_haptic_c.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\haptic\SDL_syshaptic.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\joystick\SDL_joystick_c.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\joystick\SDL_sysjoystick.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\joystick\virtual\SDL_virtualjoystick_c.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\joystick\windows\SDL_dinputjoystick_c.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\joystick\windows\SDL_windowsjoystick_c.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\joystick\windows\SDL_xinputjoystick_c.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\render\direct3d11\SDL_render_winrt.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\render\opengles2\SDL_gles2funcs.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\render\opengles2\SDL_shaders_gles2.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\render\SDL_d3dmath.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\render\SDL_sysrender.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\render\SDL_yuv_sw_c.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\render\software\SDL_blendfillrect.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\render\software\SDL_blendline.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\render\software\SDL_blendpoint.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\render\software\SDL_draw.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\render\software\SDL_drawline.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\render\software\SDL_drawpoint.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\render\software\SDL_render_sw_c.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\render\software\SDL_rotate.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\render\software\SDL_triangle.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\SDL_assert_c.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\SDL_error_c.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\SDL_fatal.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\SDL_hints_c.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\SDL_internal.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\locale\SDL_syslocale.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\thread\SDL_systhread.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\thread\SDL_thread_c.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\thread\stdcpp\SDL_sysmutex_c.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\thread\stdcpp\SDL_systhread_c.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\timer\SDL_timer_c.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\video\dummy\SDL_nullevents_c.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\video\dummy\SDL_nullframebuffer_c.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\video\dummy\SDL_nullvideo.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\video\SDL_blit.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\video\SDL_blit_auto.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\video\SDL_blit_copy.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\video\SDL_blit_slow.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\video\SDL_egl_c.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\video\SDL_pixels_c.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\video\SDL_rect_c.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\video\SDL_RLEaccel_c.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\video\SDL_shape_internals.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\video\SDL_sysvideo.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\video\winrt\SDL_winrtevents_c.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\video\winrt\SDL_winrtmessagebox.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\video\winrt\SDL_winrtmouse_c.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\video\winrt\SDL_winrtopengles.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\video\winrt\SDL_winrtvideo_cpp.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\audio\wasapi\SDL_wasapi.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\video\winrt\SDL_winrtgamebar_cpp.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\SDL_dataqueue.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\haptic\windows\SDL_xinputhaptic_c.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\haptic\windows\SDL_dinputhaptic_c.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\haptic\windows\SDL_windowshaptic_c.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\video\SDL_yuv_c.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\video\yuv2rgb\yuv_rgb.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<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>
|
||||
<ClInclude Include="..\include\SDL_misc.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClCompile Include="..\src\atomic\SDL_atomic.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\atomic\SDL_spinlock.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\audio\disk\SDL_diskaudio.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\audio\dummy\SDL_dummyaudio.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\audio\SDL_audio.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\audio\SDL_audiocvt.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\audio\SDL_audiodev.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\audio\SDL_audiotypecvt.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\audio\SDL_mixer.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\audio\SDL_wave.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\audio\wasapi\SDL_wasapi_winrt.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\core\windows\SDL_windows.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\core\windows\SDL_xinput.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\core\winrt\SDL_winrtapp_common.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\core\winrt\SDL_winrtapp_direct3d.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\core\winrt\SDL_winrtapp_xaml.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\cpuinfo\SDL_cpuinfo.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\dynapi\SDL_dynapi.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\events\SDL_clipboardevents.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\events\SDL_dropevents.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\events\SDL_events.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\events\SDL_gesture.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\events\SDL_keyboard.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\events\SDL_mouse.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\events\SDL_quit.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\events\SDL_touch.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\events\SDL_windowevents.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\filesystem\winrt\SDL_sysfilesystem.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\file\SDL_rwops.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\haptic\dummy\SDL_syshaptic.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\haptic\SDL_haptic.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\hidapi\SDL_hidapi.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\joystick\dummy\SDL_sysjoystick.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\joystick\SDL_gamecontroller.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\joystick\SDL_joystick.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\joystick\virtual\SDL_virtualjoystick.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\joystick\windows\SDL_dinputjoystick.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\joystick\windows\SDL_windowsjoystick.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\joystick\windows\SDL_xinputjoystick.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\loadso\windows\SDL_sysloadso.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\power\SDL_power.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\power\winrt\SDL_syspower.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\render\direct3d11\SDL_render_d3d11.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\render\direct3d11\SDL_render_winrt.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\render\opengles2\SDL_render_gles2.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\render\opengles2\SDL_shaders_gles2.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\render\SDL_d3dmath.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\render\SDL_render.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\render\SDL_yuv_sw.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\render\software\SDL_blendfillrect.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\render\software\SDL_blendline.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\render\software\SDL_blendpoint.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\render\software\SDL_drawline.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\render\software\SDL_drawpoint.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\render\software\SDL_render_sw.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\render\software\SDL_rotate.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\render\software\SDL_triangle.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\SDL.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\SDL_assert.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\SDL_error.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\SDL_hints.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\SDL_log.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\locale\SDL_locale.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\locale\winrt\SDL_syslocale.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\stdlib\SDL_crc32.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\stdlib\SDL_getenv.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\stdlib\SDL_iconv.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\stdlib\SDL_malloc.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\stdlib\SDL_qsort.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\stdlib\SDL_stdlib.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\stdlib\SDL_string.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\stdlib\SDL_strtokr.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\thread\generic\SDL_syssem.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\thread\SDL_thread.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\thread\stdcpp\SDL_syscond.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\thread\stdcpp\SDL_sysmutex.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\thread\stdcpp\SDL_systhread.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\timer\SDL_timer.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\timer\windows\SDL_systimer.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\video\dummy\SDL_nullevents.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\video\dummy\SDL_nullframebuffer.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\video\dummy\SDL_nullvideo.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\video\SDL_blit.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\video\SDL_blit_0.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\video\SDL_blit_1.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\video\SDL_blit_A.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\video\SDL_blit_auto.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\video\SDL_blit_copy.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\video\SDL_blit_N.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\video\SDL_blit_slow.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\video\SDL_bmp.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\video\SDL_clipboard.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\video\SDL_egl.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\video\SDL_fillrect.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\video\SDL_pixels.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\video\SDL_rect.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\video\SDL_RLEaccel.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\video\SDL_shape.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\video\SDL_stretch.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\video\SDL_surface.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\video\SDL_video.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\video\winrt\SDL_winrtevents.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\video\winrt\SDL_winrtkeyboard.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\video\winrt\SDL_winrtmessagebox.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\video\winrt\SDL_winrtmouse.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\video\winrt\SDL_winrtopengles.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\video\winrt\SDL_winrtpointerinput.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\video\winrt\SDL_winrtvideo.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\audio\wasapi\SDL_wasapi.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\video\winrt\SDL_winrtgamebar.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\SDL_dataqueue.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\haptic\windows\SDL_dinputhaptic.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\haptic\windows\SDL_windowshaptic.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\haptic\windows\SDL_xinputhaptic.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\video\SDL_yuv.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\video\yuv2rgb\yuv_rgb.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<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>
|
||||
<ClCompile Include="..\src\misc\winrt\SDL_sysurl.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\misc\SDL_url.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\src\joystick\windows\SDL_windows_gaming_input.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
11
externals/SDL/VisualC/SDL.sln
vendored
11
externals/SDL/VisualC/SDL.sln
vendored
|
@ -56,6 +56,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testyuv", "tests\testyuv\te
|
|||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testsensor", "tests\testsensor\testsensor.vcxproj", "{C4E04D18-EF76-4B42-B4C2-16A1BACDC0A4}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testsurround", "tests\testsurround\testsurround.vcxproj", "{70B894A9-E306-49E8-ABC2-932A952A5E5F}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
|
@ -280,6 +282,14 @@ Global
|
|||
{C4E04D18-EF76-4B42-B4C2-16A1BACDC0A4}.Release|Win32.Build.0 = Release|Win32
|
||||
{C4E04D18-EF76-4B42-B4C2-16A1BACDC0A4}.Release|x64.ActiveCfg = Release|x64
|
||||
{C4E04D18-EF76-4B42-B4C2-16A1BACDC0A4}.Release|x64.Build.0 = Release|x64
|
||||
{70B894A9-E306-49E8-ABC2-932A952A5E5F}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{70B894A9-E306-49E8-ABC2-932A952A5E5F}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{70B894A9-E306-49E8-ABC2-932A952A5E5F}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{70B894A9-E306-49E8-ABC2-932A952A5E5F}.Debug|x64.Build.0 = Debug|x64
|
||||
{70B894A9-E306-49E8-ABC2-932A952A5E5F}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{70B894A9-E306-49E8-ABC2-932A952A5E5F}.Release|Win32.Build.0 = Release|Win32
|
||||
{70B894A9-E306-49E8-ABC2-932A952A5E5F}.Release|x64.ActiveCfg = Release|x64
|
||||
{70B894A9-E306-49E8-ABC2-932A952A5E5F}.Release|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
@ -309,6 +319,7 @@ Global
|
|||
{C4E04D18-EF76-4B42-B4C2-16A1BACDC0A5} = {D69D5741-611F-4E14-8541-1FEE94F50B5A}
|
||||
{40FB7794-D3C3-4CFE-BCF4-A80C97635682} = {D69D5741-611F-4E14-8541-1FEE94F50B5A}
|
||||
{C4E04D18-EF76-4B42-B4C2-16A1BACDC0A4} = {D69D5741-611F-4E14-8541-1FEE94F50B5A}
|
||||
{70B894A9-E306-49E8-ABC2-932A952A5E5F} = {D69D5741-611F-4E14-8541-1FEE94F50B5A}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {C320C9F2-1A8F-41D7-B02B-6338F872BCAD}
|
||||
|
|
8
externals/SDL/VisualC/SDL/SDL.vcxproj
vendored
8
externals/SDL/VisualC/SDL/SDL.vcxproj
vendored
|
@ -236,6 +236,7 @@
|
|||
<ClInclude Include="..\..\include\SDL_gesture.h" />
|
||||
<ClInclude Include="..\..\include\SDL_haptic.h" />
|
||||
<ClInclude Include="..\..\include\SDL_hints.h" />
|
||||
<ClInclude Include="..\..\include\SDL_hidapi.h" />
|
||||
<ClInclude Include="..\..\include\SDL_joystick.h" />
|
||||
<ClInclude Include="..\..\include\SDL_keyboard.h" />
|
||||
<ClInclude Include="..\..\include\SDL_keycode.h" />
|
||||
|
@ -327,7 +328,7 @@
|
|||
<ClInclude Include="..\..\src\haptic\windows\SDL_windowshaptic_c.h" />
|
||||
<ClInclude Include="..\..\src\haptic\windows\SDL_xinputhaptic_c.h" />
|
||||
<ClInclude Include="..\..\src\hidapi\hidapi\hidapi.h" />
|
||||
<ClInclude Include="..\..\src\hidapi\SDL_hidapi.h" />
|
||||
<ClInclude Include="..\..\src\hidapi\SDL_hidapi_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\controller_type.h" />
|
||||
<ClInclude Include="..\..\src\joystick\hidapi\SDL_hidapijoystick_c.h" />
|
||||
<ClInclude Include="..\..\src\joystick\hidapi\SDL_hidapi_rumble.h" />
|
||||
|
@ -362,6 +363,7 @@
|
|||
<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\render\software\SDL_triangle.h" />
|
||||
<ClInclude Include="..\..\src\SDL_assert_c.h" />
|
||||
<ClInclude Include="..\..\src\SDL_dataqueue.h" />
|
||||
<ClInclude Include="..\..\src\SDL_error_c.h" />
|
||||
|
@ -488,7 +490,6 @@
|
|||
<ClCompile Include="..\..\src\joystick\SDL_joystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\virtual\SDL_virtualjoystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\windows\SDL_dinputjoystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\windows\SDL_mmjoystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\windows\SDL_rawinputjoystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\windows\SDL_windowsjoystick.c" />
|
||||
<ClCompile Include="..\..\src\joystick\windows\SDL_windows_gaming_input.c" />
|
||||
|
@ -538,6 +539,7 @@
|
|||
<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\render\software\SDL_triangle.c" />
|
||||
<ClCompile Include="..\..\src\SDL.c" />
|
||||
<ClCompile Include="..\..\src\SDL_assert.c" />
|
||||
<ClCompile Include="..\..\src\SDL_dataqueue.c" />
|
||||
|
@ -557,7 +559,7 @@
|
|||
<ClCompile Include="..\..\src\stdlib\SDL_strtokr.c" />
|
||||
<ClCompile Include="..\..\src\thread\generic\SDL_syscond.c" />
|
||||
<ClCompile Include="..\..\src\thread\SDL_thread.c" />
|
||||
<ClCompile Include="..\..\src\thread\windows\SDL_syscond_srw.c" />
|
||||
<ClCompile Include="..\..\src\thread\windows\SDL_syscond_cv.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" />
|
||||
|
|
14
externals/SDL/VisualC/SDL/SDL.vcxproj.filters
vendored
14
externals/SDL/VisualC/SDL/SDL.vcxproj.filters
vendored
|
@ -237,6 +237,9 @@
|
|||
<ClInclude Include="..\..\include\SDL_hints.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_hidapi.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\SDL_joystick.h">
|
||||
<Filter>API Headers</Filter>
|
||||
</ClInclude>
|
||||
|
@ -749,6 +752,9 @@
|
|||
<ClInclude Include="..\..\src\render\software\SDL_rotate.h">
|
||||
<Filter>render\software</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\render\software\SDL_triangle.h">
|
||||
<Filter>render\software</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\power\SDL_syspower.h">
|
||||
<Filter>power</Filter>
|
||||
</ClInclude>
|
||||
|
@ -1057,9 +1063,6 @@
|
|||
<ClCompile Include="..\..\src\joystick\windows\SDL_dinputjoystick.c">
|
||||
<Filter>joystick\windows</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\joystick\windows\SDL_mmjoystick.c">
|
||||
<Filter>joystick\windows</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\joystick\windows\SDL_rawinputjoystick.c">
|
||||
<Filter>joystick\windows</Filter>
|
||||
</ClCompile>
|
||||
|
@ -1198,7 +1201,7 @@
|
|||
<ClCompile Include="..\..\src\thread\SDL_thread.c">
|
||||
<Filter>thread</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\thread\windows\SDL_syscond_srw.c">
|
||||
<ClCompile Include="..\..\src\thread\windows\SDL_syscond_cv.c" >
|
||||
<Filter>thread\windows</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\thread\windows\SDL_sysmutex.c">
|
||||
|
@ -1303,6 +1306,9 @@
|
|||
<ClCompile Include="..\..\src\render\software\SDL_rotate.c">
|
||||
<Filter>render\software</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\render\software\SDL_triangle.c">
|
||||
<Filter>render\software</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\power\SDL_power.c">
|
||||
<Filter>power</Filter>
|
||||
</ClCompile>
|
||||
|
|
210
externals/SDL/VisualC/tests/testsurround/testsurround.vcxproj
vendored
Executable file
210
externals/SDL/VisualC/tests/testsurround/testsurround.vcxproj
vendored
Executable file
|
@ -0,0 +1,210 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{70B894A9-E306-49E8-ABC2-932A952A5E5F}</ProjectGuid>
|
||||
<RootNamespace>testsurround</RootNamespace>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\</IntDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\$(Configuration)\</IntDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TargetEnvironment>Win32</TargetEnvironment>
|
||||
<TypeLibraryName>.\Release/testsurround.tlb</TypeLibraryName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)/../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<PrecompiledHeaderOutputFile>.\Release/testsurround.pch</PrecompiledHeaderOutputFile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0409</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TargetEnvironment>X64</TargetEnvironment>
|
||||
<TypeLibraryName>.\Release/testsurround.tlb</TypeLibraryName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)/../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<PrecompiledHeaderOutputFile>.\Release/testsurround.pch</PrecompiledHeaderOutputFile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0409</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TargetEnvironment>Win32</TargetEnvironment>
|
||||
<TypeLibraryName>.\Debug/testsurround.tlb</TypeLibraryName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)/../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0409</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TargetEnvironment>X64</TargetEnvironment>
|
||||
<TypeLibraryName>.\Debug/testsurround.tlb</TypeLibraryName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)/../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0409</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\SDL\SDL.vcxproj">
|
||||
<Project>{81ce8daf-ebb2-4761-8e45-b71abcca8c68}</Project>
|
||||
<Private>false</Private>
|
||||
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
|
||||
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\SDLmain\SDLmain.vcxproj">
|
||||
<Project>{da956fd3-e142-46f2-9dd5-c78bebb56b7a}</Project>
|
||||
<Private>false</Private>
|
||||
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
|
||||
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\Test\testsurround.c" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
49
externals/SDL/WhatsNew.txt
vendored
49
externals/SDL/WhatsNew.txt
vendored
|
@ -1,6 +1,54 @@
|
|||
|
||||
This is a list of major changes in SDL's version history.
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
2.0.18:
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
General:
|
||||
* The SDL wiki documentation and development headers are automatically kept in sync
|
||||
* Each function has information about in which version of SDL it was introduced
|
||||
* Added the hint SDL_HINT_APP_NAME to let SDL know the name of your application for various places it might show up in system information
|
||||
* Added SDL_RenderGeometry() and SDL_RenderGeometryRaw() to allow rendering of arbitrary shapes using the SDL 2D render API
|
||||
* Added SDL_SetTextureUserData() and SDL_GetTextureUserData() to associate application data with an SDL texture
|
||||
* Added SDL_RenderWindowToLogical() and SDL_RenderLogicalToWindow() to convert between window coordinates and logical render coordinates
|
||||
* Added SDL_RenderSetVSync() to change whether a renderer present is synchronized with vblank at runtime
|
||||
* Added SDL_PremultiplyAlpha() to premultiply alpha on a block of SDL_PIXELFORMAT_ARGB8888 pixels
|
||||
* Added a window event SDL_WINDOWEVENT_DISPLAY_CHANGED which is sent when a window changes what display it's centered on
|
||||
* Added SDL_GetWindowICCProfile() to query a window's ICC profile, and a window event SDL_WINDOWEVENT_ICCPROF_CHANGED that is sent when it changes
|
||||
* Added the hint SDL_HINT_VIDEO_EGL_ALLOW_TRANSPARENCY to allow EGL windows to be transparent instead of opaque
|
||||
* SDL_WaitEvent() has been redesigned to use less CPU in most cases
|
||||
* Added SDL_SetWindowMouseRect() and SDL_GetWindowMouseRect() to confine the mouse cursor to an area of a window
|
||||
* You can now read precise mouse wheel motion using 'preciseX' and 'preciseY' event fields
|
||||
* Added SDL_GameControllerHasRumble() and SDL_GameControllerHasRumbleTriggers() to query whether a game controller supports rumble
|
||||
* Added SDL_JoystickHasRumble() and SDL_JoystickHasRumbleTriggers() to query whether a joystick supports rumble
|
||||
* SDL's hidapi implementation is now available as a public API in SDL_hidapi.h
|
||||
|
||||
Windows:
|
||||
* Improved relative mouse motion over Windows Remote Desktop
|
||||
* Added the hint SDL_HINT_IME_SHOW_UI to show native UI components instead of hiding them (defaults off)
|
||||
|
||||
Windows/UWP:
|
||||
* WGI is used instead of XInput for better controller support in UWP apps
|
||||
|
||||
Linux:
|
||||
* Added the hint SDL_HINT_SCREENSAVER_INHIBIT_ACTIVITY_NAME to set the activity that's displayed by the system when the screensaver is disabled
|
||||
* Added the hint SDL_HINT_LINUX_JOYSTICK_CLASSIC to control whether /dev/input/js* or /dev/input/event* are used as joystick devices
|
||||
* Added the hint SDL_HINT_JOYSTICK_DEVICE to allow the user to specify devices that will be opened in addition to the normal joystick detection
|
||||
* Added SDL_LinuxSetThreadPriorityAndPolicy() for more control over a thread priority on Linux
|
||||
|
||||
Android:
|
||||
* Added support for audio output and capture using AAudio on Android 8.1 and newer
|
||||
* Steam Controller support is disabled by default, and can be enabled by setting the hint SDL_HINT_JOYSTICK_HIDAPI_STEAM to "1" before calling SDL_Init()
|
||||
|
||||
Apple Arcade:
|
||||
* Added SDL_GameControllerGetAppleSFSymbolsNameForButton() and SDL_GameControllerGetAppleSFSymbolsNameForAxis() to support Apple Arcade titles
|
||||
|
||||
iOS:
|
||||
* Added documentation that the UIApplicationSupportsIndirectInputEvents key must be set to true in your application's Info.plist in order to get real Bluetooth mouse events.
|
||||
* Steam Controller support is disabled by default, and can be enabled by setting the hint SDL_HINT_JOYSTICK_HIDAPI_STEAM to "1" before calling SDL_Init()
|
||||
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
2.0.16:
|
||||
---------------------------------------------------------------------------
|
||||
|
@ -30,7 +78,6 @@ Linux:
|
|||
* Added the hint SDL_HINT_AUDIO_DEVICE_STREAM_ROLE to describe the role of your application for audio control panels
|
||||
|
||||
Android:
|
||||
* Added support for audio output and capture using AAudio
|
||||
* Added SDL_AndroidShowToast() to show a lightweight notification
|
||||
|
||||
iOS:
|
||||
|
|
4
externals/SDL/Xcode-iOS/Demos/Info.plist
vendored
4
externals/SDL/Xcode-iOS/Demos/Info.plist
vendored
|
@ -16,6 +16,8 @@
|
|||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>${PRODUCT_NAME}</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleSignature</key>
|
||||
|
@ -28,5 +30,7 @@
|
|||
<string>iOS Launch Screen</string>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array/>
|
||||
<key>UIApplicationSupportsIndirectInputEvents</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
|
@ -58,7 +58,7 @@ render(SDL_Renderer *renderer, int w, int h, double deltaTime)
|
|||
ay * SDL_IPHONE_MAX_GFORCE / SINT16_MAX * GRAVITY_CONSTANT *
|
||||
deltaMilliseconds;
|
||||
|
||||
speed = sqrt(shipData.vx * shipData.vx + shipData.vy * shipData.vy);
|
||||
speed = SDL_sqrt(shipData.vx * shipData.vx + shipData.vy * shipData.vy);
|
||||
|
||||
if (speed > 0) {
|
||||
/* compensate for friction */
|
||||
|
|
12
externals/SDL/Xcode-iOS/Demos/src/fireworks.c
vendored
12
externals/SDL/Xcode-iOS/Demos/src/fireworks.c
vendored
|
@ -109,7 +109,7 @@ stepParticles(double deltaTime)
|
|||
}
|
||||
} else {
|
||||
float speed =
|
||||
sqrt(curr->xvel * curr->xvel + curr->yvel * curr->yvel);
|
||||
SDL_sqrt(curr->xvel * curr->xvel + curr->yvel * curr->yvel);
|
||||
/* if wind resistance is not powerful enough to stop us completely,
|
||||
then apply winde resistance, otherwise just stop us completely */
|
||||
if (WIND_RESISTANCE * deltaMilliseconds < speed) {
|
||||
|
@ -194,15 +194,15 @@ explodeEmitter(struct particle *emitter)
|
|||
/* come up with a random angle and speed for new particle */
|
||||
float theta = randomFloat(0, 2.0f * 3.141592);
|
||||
float exponent = 3.0f;
|
||||
float speed = randomFloat(0.00, powf(0.17, exponent));
|
||||
speed = powf(speed, 1.0f / exponent);
|
||||
float speed = randomFloat(0.00, SDL_powf(0.17, exponent));
|
||||
speed = SDL_powf(speed, 1.0f / exponent);
|
||||
|
||||
/* select the particle at the end of our array */
|
||||
struct particle *p = &particles[num_active_particles];
|
||||
|
||||
/* set the particles properties */
|
||||
p->xvel = speed * cos(theta);
|
||||
p->yvel = speed * sin(theta);
|
||||
p->xvel = speed * SDL_cos(theta);
|
||||
p->yvel = speed * SDL_sin(theta);
|
||||
p->x = emitter->x + emitter->xvel;
|
||||
p->y = emitter->y + emitter->yvel;
|
||||
p->isActive = 1;
|
||||
|
@ -297,7 +297,7 @@ spawnEmitterParticle(GLfloat x, GLfloat y)
|
|||
p->y = screen_h;
|
||||
/* set velocity so that terminal point is (x,y) */
|
||||
p->xvel = 0;
|
||||
p->yvel = -sqrt(2 * ACCEL * (screen_h - y));
|
||||
p->yvel = -SDL_sqrt(2 * ACCEL * (screen_h - y));
|
||||
/* set other attributes */
|
||||
p->size = 10 * pointSizeScale;
|
||||
p->type = emitter;
|
||||
|
|
2
externals/SDL/Xcode-iOS/Demos/src/mixer.c
vendored
2
externals/SDL/Xcode-iOS/Demos/src/mixer.c
vendored
|
@ -111,7 +111,7 @@ loadSound(const char *file, struct sound *s)
|
|||
if (SDL_ConvertAudio(&cvt) == -1) { /* convert the sound */
|
||||
fatalError("could not convert .wav");
|
||||
}
|
||||
SDL_free(s->buffer); /* free the original (unconverted) buffer */
|
||||
SDL_free(s->buffer); /* Free the original (unconverted) buffer */
|
||||
s->buffer = cvt.buf; /* point sound buffer to converted buffer */
|
||||
s->length = cvt.len_cvt; /* set sound buffer's new length */
|
||||
}
|
||||
|
|
18
externals/SDL/Xcode-iOS/Demos/src/touch.c
vendored
18
externals/SDL/Xcode-iOS/Demos/src/touch.c
vendored
|
@ -21,7 +21,7 @@ void
|
|||
drawLine(SDL_Renderer *renderer, float startx, float starty, float dx, float dy)
|
||||
{
|
||||
|
||||
float distance = sqrt(dx * dx + dy * dy); /* length of line segment (pythagoras) */
|
||||
float distance = SDL_sqrt(dx * dx + dy * dy); /* length of line segment (pythagoras) */
|
||||
int iterations = distance / PIXELS_PER_ITERATION + 1; /* number of brush sprites to draw for the line */
|
||||
float dx_prime = dx / iterations; /* x-shift per iteration */
|
||||
float dy_prime = dy / iterations; /* y-shift per iteration */
|
||||
|
@ -81,6 +81,7 @@ main(int argc, char *argv[])
|
|||
SDL_Event event;
|
||||
SDL_Window *window; /* main window */
|
||||
SDL_Renderer *renderer;
|
||||
SDL_Texture *target;
|
||||
int done; /* does user want to quit? */
|
||||
int w, h;
|
||||
|
||||
|
@ -100,12 +101,15 @@ main(int argc, char *argv[])
|
|||
initializeTexture(renderer);
|
||||
|
||||
/* fill canvass initially with all black */
|
||||
target = SDL_CreateTexture(renderer, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_TARGET, w, h);
|
||||
SDL_SetRenderTarget(renderer, target);
|
||||
SDL_SetRenderDrawColor(renderer, 0, 0, 0, 255);
|
||||
SDL_RenderClear(renderer);
|
||||
SDL_RenderPresent(renderer);
|
||||
SDL_SetRenderTarget(renderer, NULL);
|
||||
|
||||
done = 0;
|
||||
while (!done && SDL_WaitEvent(&event)) {
|
||||
while (!done) {
|
||||
while (SDL_PollEvent(&event) == 1) {
|
||||
switch (event.type) {
|
||||
case SDL_QUIT:
|
||||
done = 1;
|
||||
|
@ -114,15 +118,21 @@ main(int argc, char *argv[])
|
|||
state = SDL_GetMouseState(&x, &y); /* get its location */
|
||||
SDL_GetRelativeMouseState(&dx, &dy); /* find how much the mouse moved */
|
||||
if (state & SDL_BUTTON_LMASK) { /* is the mouse (touch) down? */
|
||||
SDL_SetRenderTarget(renderer, target);
|
||||
drawLine(renderer, x - dx, y - dy, dx, dy); /* draw line segment */
|
||||
SDL_RenderPresent(renderer);
|
||||
SDL_SetRenderTarget(renderer, NULL);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
SDL_RenderCopy(renderer, target, NULL, NULL);
|
||||
SDL_RenderPresent(renderer);
|
||||
}
|
||||
|
||||
/* cleanup */
|
||||
SDL_DestroyTexture(brush);
|
||||
SDL_DestroyTexture(target);
|
||||
SDL_Quit();
|
||||
|
||||
return 0;
|
||||
|
|
4
externals/SDL/Xcode/SDL/Info-Framework.plist
vendored
4
externals/SDL/Xcode/SDL/Info-Framework.plist
vendored
|
@ -19,10 +19,10 @@
|
|||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>2.0.16</string>
|
||||
<string>2.0.18</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>SDLX</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>2.0.16</string>
|
||||
<string>2.0.18</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
1212
externals/SDL/Xcode/SDL/SDL.xcodeproj/project.pbxproj
vendored
1212
externals/SDL/Xcode/SDL/SDL.xcodeproj/project.pbxproj
vendored
File diff suppressed because it is too large
Load diff
|
@ -38,10 +38,14 @@
|
|||
android:name="android.hardware.microphone"
|
||||
android:required="false" /> -->
|
||||
|
||||
<!-- Allow writing to external storage -->
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
<!-- Allow downloading to the external storage on Android 5.1 and older -->
|
||||
<!-- <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="22" /> -->
|
||||
|
||||
<!-- Allow access to Bluetooth devices -->
|
||||
<uses-permission android:name="android.permission.BLUETOOTH" />
|
||||
<!-- Currently this is just for Steam Controller support and requires setting SDL_HINT_JOYSTICK_HIDAPI_STEAM -->
|
||||
<!-- <uses-permission android:name="android.permission.BLUETOOTH" android:maxSdkVersion="30" /> -->
|
||||
<!-- <uses-permission android:name="android.permission.BLUETOOTH_CONNECT" /> -->
|
||||
|
||||
<!-- Allow access to the vibrator -->
|
||||
<uses-permission android:name="android.permission.VIBRATE" />
|
||||
|
||||
|
@ -72,6 +76,7 @@
|
|||
android:launchMode="singleInstance"
|
||||
android:configChanges="layoutDirection|locale|orientation|uiMode|screenLayout|screenSize|smallestScreenSize|keyboard|keyboardHidden|navigation"
|
||||
android:preferMinimalPostProcessing="true"
|
||||
android:exported="true"
|
||||
>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
|
|
@ -105,36 +105,6 @@ public class HIDDeviceManager {
|
|||
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);
|
||||
|
@ -149,9 +119,6 @@ public class HIDDeviceManager {
|
|||
{
|
||||
mNextDeviceId = mSharedPreferences.getInt("next_device_id", 0);
|
||||
}
|
||||
|
||||
initializeUSB();
|
||||
initializeBluetooth();
|
||||
}
|
||||
|
||||
public Context getContext() {
|
||||
|
@ -379,7 +346,8 @@ public class HIDDeviceManager {
|
|||
private void initializeBluetooth() {
|
||||
Log.d(TAG, "Initializing Bluetooth");
|
||||
|
||||
if (mContext.getPackageManager().checkPermission(android.Manifest.permission.BLUETOOTH, mContext.getPackageName()) != PackageManager.PERMISSION_GRANTED) {
|
||||
if (Build.VERSION.SDK_INT <= 30 &&
|
||||
mContext.getPackageManager().checkPermission(android.Manifest.permission.BLUETOOTH, mContext.getPackageName()) != PackageManager.PERMISSION_GRANTED) {
|
||||
Log.d(TAG, "Couldn't initialize Bluetooth, missing android.permission.BLUETOOTH");
|
||||
return;
|
||||
}
|
||||
|
@ -571,6 +539,18 @@ public class HIDDeviceManager {
|
|||
////////// JNI interface functions
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
public boolean initialize(boolean usb, boolean bluetooth) {
|
||||
Log.v(TAG, "initialize(" + usb + ", " + bluetooth + ")");
|
||||
|
||||
if (usb) {
|
||||
initializeUSB();
|
||||
}
|
||||
if (bluetooth) {
|
||||
initializeBluetooth();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean openDevice(int deviceID) {
|
||||
Log.v(TAG, "openDevice deviceID=" + deviceID);
|
||||
HIDDevice device = getDevice(deviceID);
|
||||
|
@ -584,7 +564,14 @@ public class HIDDeviceManager {
|
|||
if (usbDevice != null && !mUsbManager.hasPermission(usbDevice)) {
|
||||
HIDDeviceOpenPending(deviceID);
|
||||
try {
|
||||
mUsbManager.requestPermission(usbDevice, PendingIntent.getBroadcast(mContext, 0, new Intent(HIDDeviceManager.ACTION_USB_PERMISSION), 0));
|
||||
final int FLAG_MUTABLE = 0x02000000; // PendingIntent.FLAG_MUTABLE, but don't require SDK 31
|
||||
int flags;
|
||||
if (Build.VERSION.SDK_INT >= 31) {
|
||||
flags = FLAG_MUTABLE;
|
||||
} else {
|
||||
flags = 0;
|
||||
}
|
||||
mUsbManager.requestPermission(usbDevice, PendingIntent.getBroadcast(mContext, 0, new Intent(HIDDeviceManager.ACTION_USB_PERMISSION), flags));
|
||||
} catch (Exception e) {
|
||||
Log.v(TAG, "Couldn't request permission for USB device " + usbDevice);
|
||||
HIDDeviceOpenResult(deviceID, false);
|
||||
|
|
|
@ -164,7 +164,6 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
*/
|
||||
protected String[] getLibraries() {
|
||||
return new String[] {
|
||||
"hidapi",
|
||||
"SDL2",
|
||||
// "SDL2_image",
|
||||
// "SDL2_mixer",
|
||||
|
@ -379,11 +378,14 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
}
|
||||
|
||||
public static int getCurrentOrientation() {
|
||||
final Context context = SDLActivity.getContext();
|
||||
final Display display = ((WindowManager) context.getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay();
|
||||
|
||||
int result = SDL_ORIENTATION_UNKNOWN;
|
||||
|
||||
Activity activity = (Activity)getContext();
|
||||
if (activity == null) {
|
||||
return result;
|
||||
}
|
||||
Display display = activity.getWindowManager().getDefaultDisplay();
|
||||
|
||||
switch (display.getRotation()) {
|
||||
case Surface.ROTATION_0:
|
||||
result = SDL_ORIENTATION_PORTRAIT;
|
||||
|
@ -497,8 +499,8 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
// 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")) {
|
||||
boolean trapBack = SDLActivity.nativeGetHintBoolean("SDL_ANDROID_TRAP_BACK_BUTTON", false);
|
||||
if (trapBack) {
|
||||
// Exit and let the mouse handler handle this button (if appropriate)
|
||||
return;
|
||||
}
|
||||
|
@ -801,6 +803,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
public static native void onNativeSurfaceChanged();
|
||||
public static native void onNativeSurfaceDestroyed();
|
||||
public static native String nativeGetHint(String name);
|
||||
public static native boolean nativeGetHintBoolean(String name, boolean default_value);
|
||||
public static native void nativeSetenv(String name, String value);
|
||||
public static native void onNativeOrientationChanged(int orientation);
|
||||
public static native void nativeAddTouch(int touchId, String name);
|
||||
|
|
|
@ -47,6 +47,10 @@ public class SDLAudioManager
|
|||
if (desiredChannels > 2) {
|
||||
desiredChannels = 2;
|
||||
}
|
||||
}
|
||||
|
||||
/* AudioTrack has sample rate limitation of 48000 (fixed in 5.0.2) */
|
||||
if (Build.VERSION.SDK_INT < 22) {
|
||||
if (sampleRate < 8000) {
|
||||
sampleRate = 8000;
|
||||
} else if (sampleRate > 48000) {
|
||||
|
|
|
@ -8,13 +8,13 @@ else {
|
|||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 26
|
||||
compileSdkVersion 31
|
||||
defaultConfig {
|
||||
if (buildAsApplication) {
|
||||
applicationId "org.libsdl.app"
|
||||
}
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 26
|
||||
targetSdkVersion 31
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
externalNativeBuild {
|
||||
|
|
|
@ -38,10 +38,14 @@
|
|||
android:name="android.hardware.microphone"
|
||||
android:required="false" /> -->
|
||||
|
||||
<!-- Allow writing to external storage -->
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
<!-- Allow downloading to the external storage on Android 5.1 and older -->
|
||||
<!-- <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="22" /> -->
|
||||
|
||||
<!-- Allow access to Bluetooth devices -->
|
||||
<uses-permission android:name="android.permission.BLUETOOTH" />
|
||||
<!-- Currently this is just for Steam Controller support and requires setting SDL_HINT_JOYSTICK_HIDAPI_STEAM -->
|
||||
<!-- <uses-permission android:name="android.permission.BLUETOOTH" android:maxSdkVersion="30" /> -->
|
||||
<!-- <uses-permission android:name="android.permission.BLUETOOTH_CONNECT" /> -->
|
||||
|
||||
<!-- Allow access to the vibrator -->
|
||||
<uses-permission android:name="android.permission.VIBRATE" />
|
||||
|
||||
|
@ -72,6 +76,7 @@
|
|||
android:launchMode="singleInstance"
|
||||
android:configChanges="layoutDirection|locale|orientation|uiMode|screenLayout|screenSize|smallestScreenSize|keyboard|keyboardHidden|navigation"
|
||||
android:preferMinimalPostProcessing="true"
|
||||
android:exported="true"
|
||||
>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
|
|
@ -105,36 +105,6 @@ public class HIDDeviceManager {
|
|||
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);
|
||||
|
@ -149,9 +119,6 @@ public class HIDDeviceManager {
|
|||
{
|
||||
mNextDeviceId = mSharedPreferences.getInt("next_device_id", 0);
|
||||
}
|
||||
|
||||
initializeUSB();
|
||||
initializeBluetooth();
|
||||
}
|
||||
|
||||
public Context getContext() {
|
||||
|
@ -379,7 +346,8 @@ public class HIDDeviceManager {
|
|||
private void initializeBluetooth() {
|
||||
Log.d(TAG, "Initializing Bluetooth");
|
||||
|
||||
if (mContext.getPackageManager().checkPermission(android.Manifest.permission.BLUETOOTH, mContext.getPackageName()) != PackageManager.PERMISSION_GRANTED) {
|
||||
if (Build.VERSION.SDK_INT <= 30 &&
|
||||
mContext.getPackageManager().checkPermission(android.Manifest.permission.BLUETOOTH, mContext.getPackageName()) != PackageManager.PERMISSION_GRANTED) {
|
||||
Log.d(TAG, "Couldn't initialize Bluetooth, missing android.permission.BLUETOOTH");
|
||||
return;
|
||||
}
|
||||
|
@ -571,6 +539,18 @@ public class HIDDeviceManager {
|
|||
////////// JNI interface functions
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
public boolean initialize(boolean usb, boolean bluetooth) {
|
||||
Log.v(TAG, "initialize(" + usb + ", " + bluetooth + ")");
|
||||
|
||||
if (usb) {
|
||||
initializeUSB();
|
||||
}
|
||||
if (bluetooth) {
|
||||
initializeBluetooth();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean openDevice(int deviceID) {
|
||||
Log.v(TAG, "openDevice deviceID=" + deviceID);
|
||||
HIDDevice device = getDevice(deviceID);
|
||||
|
@ -584,7 +564,14 @@ public class HIDDeviceManager {
|
|||
if (usbDevice != null && !mUsbManager.hasPermission(usbDevice)) {
|
||||
HIDDeviceOpenPending(deviceID);
|
||||
try {
|
||||
mUsbManager.requestPermission(usbDevice, PendingIntent.getBroadcast(mContext, 0, new Intent(HIDDeviceManager.ACTION_USB_PERMISSION), 0));
|
||||
final int FLAG_MUTABLE = 0x02000000; // PendingIntent.FLAG_MUTABLE, but don't require SDK 31
|
||||
int flags;
|
||||
if (Build.VERSION.SDK_INT >= 31) {
|
||||
flags = FLAG_MUTABLE;
|
||||
} else {
|
||||
flags = 0;
|
||||
}
|
||||
mUsbManager.requestPermission(usbDevice, PendingIntent.getBroadcast(mContext, 0, new Intent(HIDDeviceManager.ACTION_USB_PERMISSION), flags));
|
||||
} catch (Exception e) {
|
||||
Log.v(TAG, "Couldn't request permission for USB device " + usbDevice);
|
||||
HIDDeviceOpenResult(deviceID, false);
|
||||
|
|
|
@ -164,7 +164,6 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
*/
|
||||
protected String[] getLibraries() {
|
||||
return new String[] {
|
||||
"hidapi",
|
||||
"SDL2",
|
||||
// "SDL2_image",
|
||||
// "SDL2_mixer",
|
||||
|
@ -379,11 +378,14 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
}
|
||||
|
||||
public static int getCurrentOrientation() {
|
||||
final Context context = SDLActivity.getContext();
|
||||
final Display display = ((WindowManager) context.getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay();
|
||||
|
||||
int result = SDL_ORIENTATION_UNKNOWN;
|
||||
|
||||
Activity activity = (Activity)getContext();
|
||||
if (activity == null) {
|
||||
return result;
|
||||
}
|
||||
Display display = activity.getWindowManager().getDefaultDisplay();
|
||||
|
||||
switch (display.getRotation()) {
|
||||
case Surface.ROTATION_0:
|
||||
result = SDL_ORIENTATION_PORTRAIT;
|
||||
|
@ -497,8 +499,8 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
// 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")) {
|
||||
boolean trapBack = SDLActivity.nativeGetHintBoolean("SDL_ANDROID_TRAP_BACK_BUTTON", false);
|
||||
if (trapBack) {
|
||||
// Exit and let the mouse handler handle this button (if appropriate)
|
||||
return;
|
||||
}
|
||||
|
@ -801,6 +803,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||
public static native void onNativeSurfaceChanged();
|
||||
public static native void onNativeSurfaceDestroyed();
|
||||
public static native String nativeGetHint(String name);
|
||||
public static native boolean nativeGetHintBoolean(String name, boolean default_value);
|
||||
public static native void nativeSetenv(String name, String value);
|
||||
public static native void onNativeOrientationChanged(int orientation);
|
||||
public static native void nativeAddTouch(int touchId, String name);
|
||||
|
|
|
@ -47,6 +47,10 @@ public class SDLAudioManager
|
|||
if (desiredChannels > 2) {
|
||||
desiredChannels = 2;
|
||||
}
|
||||
}
|
||||
|
||||
/* AudioTrack has sample rate limitation of 48000 (fixed in 5.0.2) */
|
||||
if (Build.VERSION.SDK_INT < 22) {
|
||||
if (sampleRate < 8000) {
|
||||
sampleRate = 8000;
|
||||
} else if (sampleRate > 48000) {
|
||||
|
|
2
externals/SDL/android-project/build.gradle
vendored
2
externals/SDL/android-project/build.gradle
vendored
|
@ -6,7 +6,7 @@ buildscript {
|
|||
google()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.2.0'
|
||||
classpath 'com.android.tools.build:gradle:7.0.3'
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
|
|
Binary file not shown.
|
@ -1,6 +1,6 @@
|
|||
#Mon Oct 23 13:51:26 PDT 2017
|
||||
#Thu Nov 11 18:20:34 PST 2021
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
|
|
@ -27,7 +27,7 @@ cd checker-buildbot
|
|||
# The -Wno-liblto is new since our checker-279 upgrade, I think; checker otherwise warns "libLTO.dylib relative to clang installed dir not found"
|
||||
|
||||
# You might want to do this for CMake-backed builds instead...
|
||||
scan-build -o analysis cmake -G Ninja -Wno-dev -DSDL_STATIC=OFF -DCMAKE_BUILD_TYPE=Debug -DASSERTIONS=enabled -DCMAKE_C_FLAGS="-Wno-deprecated-declarations" -DCMAKE_SHARED_LINKER_FLAGS="-Wno-liblto" ..
|
||||
scan-build -o analysis cmake -G Ninja -Wno-dev -DSDL_STATIC=OFF -DCMAKE_BUILD_TYPE=Debug -DSDL_ASSERTIONS=enabled -DCMAKE_C_FLAGS="-Wno-deprecated-declarations" -DCMAKE_SHARED_LINKER_FLAGS="-Wno-liblto" ..
|
||||
|
||||
# ...or run configure without the scan-build wrapper...
|
||||
#CC="$CHECKERDIR/libexec/ccc-analyzer" CFLAGS="-O0 -Wno-deprecated-declarations" LDFLAGS="-Wno-liblto" ../configure --enable-assertions=enabled
|
||||
|
|
59
externals/SDL/build-scripts/codechecker-buildbot.sh
vendored
Executable file
59
externals/SDL/build-scripts/codechecker-buildbot.sh
vendored
Executable file
|
@ -0,0 +1,59 @@
|
|||
#!/bin/bash
|
||||
|
||||
# This is a script used by some Buildbot build workers to push the project
|
||||
# through Clang's static analyzer and prepare the output to be uploaded
|
||||
# back to the buildmaster. You might find it useful too.
|
||||
|
||||
# Install Clang (you already have it on macOS, apt-get install clang
|
||||
# on Ubuntu, etc), install CMake, and pip3 install codechecker.
|
||||
|
||||
FINALDIR="$1"
|
||||
|
||||
set -x
|
||||
set -e
|
||||
|
||||
cd `dirname "$0"`
|
||||
cd ..
|
||||
|
||||
rm -rf codechecker-buildbot
|
||||
if [ ! -z "$FINALDIR" ]; then
|
||||
rm -rf "$FINALDIR"
|
||||
fi
|
||||
|
||||
mkdir codechecker-buildbot
|
||||
cd codechecker-buildbot
|
||||
|
||||
# We turn off deprecated declarations, because we don't care about these warnings during static analysis.
|
||||
cmake -Wno-dev -DSDL_STATIC=OFF -DCMAKE_BUILD_TYPE=Debug -DSDL_ASSERTIONS=enabled -DCMAKE_C_FLAGS="-Wno-deprecated-declarations" -DCMAKE_EXPORT_COMPILE_COMMANDS=1 ..
|
||||
|
||||
# CMake on macOS adds "-arch arm64" or whatever is appropriate, but this confuses CodeChecker, so strip it out.
|
||||
perl -w -pi -e 's/\-arch\s+.*?\s+//g;' compile_commands.json
|
||||
|
||||
rm -rf ../analysis
|
||||
CodeChecker analyze compile_commands.json -o ./reports
|
||||
|
||||
# "parse" returns 2 if there was a static analysis issue to report, but this
|
||||
# does not signify an error in the parsing (that would be error code 1). Turn
|
||||
# off the abort-on-error flag.
|
||||
set +e
|
||||
CodeChecker parse ./reports -e html -o ../analysis
|
||||
set -e
|
||||
|
||||
cd ..
|
||||
chmod -R a+r analysis
|
||||
chmod -R go-w analysis
|
||||
find analysis -type d -exec chmod a+x {} \;
|
||||
if [ -x /usr/bin/xattr ]; then find analysis -exec /usr/bin/xattr -d com.apple.quarantine {} \; 2>/dev/null ; fi
|
||||
|
||||
if [ ! -z "$FINALDIR" ]; then
|
||||
mv analysis "$FINALDIR"
|
||||
else
|
||||
FINALDIR=analysis
|
||||
fi
|
||||
|
||||
rm -rf codechecker-buildbot
|
||||
|
||||
echo "Done. Final output is in '$FINALDIR' ..."
|
||||
|
||||
# end of codechecker-buildbot.sh ...
|
||||
|
21
externals/SDL/build-scripts/config.sub
vendored
21
externals/SDL/build-scripts/config.sub
vendored
|
@ -4,7 +4,7 @@
|
|||
|
||||
# shellcheck disable=SC2006,SC2268 # see below for rationale
|
||||
|
||||
timestamp='2021-07-03'
|
||||
timestamp='2021-08-14'
|
||||
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
|
@ -121,9 +121,11 @@ esac
|
|||
|
||||
# Split fields of configuration type
|
||||
# shellcheck disable=SC2162
|
||||
saved_IFS=$IFS
|
||||
IFS="-" read field1 field2 field3 field4 <<EOF
|
||||
$1
|
||||
EOF
|
||||
IFS=$saved_IFS
|
||||
|
||||
# Separate into logical components for further validation
|
||||
case $1 in
|
||||
|
@ -172,6 +174,10 @@ case $1 in
|
|||
basic_machine=$field1
|
||||
basic_os=$field2
|
||||
;;
|
||||
zephyr*)
|
||||
basic_machine=$field1-unknown
|
||||
basic_os=$field2
|
||||
;;
|
||||
# Manufacturers
|
||||
dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \
|
||||
| att* | 7300* | 3300* | delta* | motorola* | sun[234]* \
|
||||
|
@ -931,9 +937,11 @@ case $basic_machine in
|
|||
|
||||
*-*)
|
||||
# shellcheck disable=SC2162
|
||||
saved_IFS=$IFS
|
||||
IFS="-" read cpu vendor <<EOF
|
||||
$basic_machine
|
||||
EOF
|
||||
IFS=$saved_IFS
|
||||
;;
|
||||
# We use `pc' rather than `unknown'
|
||||
# because (1) that's what they normally are, and
|
||||
|
@ -1313,9 +1321,11 @@ case $basic_os in
|
|||
;;
|
||||
*-*)
|
||||
# shellcheck disable=SC2162
|
||||
saved_IFS=$IFS
|
||||
IFS="-" read kernel os <<EOF
|
||||
$basic_os
|
||||
EOF
|
||||
IFS=$saved_IFS
|
||||
;;
|
||||
# Default OS when just kernel was specified
|
||||
nto*)
|
||||
|
@ -1697,7 +1707,7 @@ fi
|
|||
# Now, validate our (potentially fixed-up) OS.
|
||||
case $os in
|
||||
# Sometimes we do "kernel-libc", so those need to count as OSes.
|
||||
musl* | newlib* | uclibc*)
|
||||
musl* | newlib* | relibc* | uclibc*)
|
||||
;;
|
||||
# Likewise for "kernel-abi"
|
||||
eabi* | gnueabi*)
|
||||
|
@ -1738,7 +1748,7 @@ case $os in
|
|||
| skyos* | haiku* | rdos* | toppers* | drops* | es* \
|
||||
| onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
|
||||
| midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
|
||||
| nsk* | powerunix* | genode* | zvmoe* | qnx* | emx*)
|
||||
| nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr*)
|
||||
;;
|
||||
# This one is extra strict with allowed versions
|
||||
sco3.2v2 | sco3.2v[4-9]* | sco5v6*)
|
||||
|
@ -1755,11 +1765,12 @@ esac
|
|||
# As a final step for OS-related things, validate the OS-kernel combination
|
||||
# (given a valid OS), if there is a kernel.
|
||||
case $kernel-$os in
|
||||
linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* | linux-musl* | linux-uclibc* )
|
||||
linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* \
|
||||
| linux-musl* | linux-relibc* | linux-uclibc* )
|
||||
;;
|
||||
uclinux-uclibc* )
|
||||
;;
|
||||
-dietlibc* | -newlib* | -musl* | -uclibc* )
|
||||
-dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* )
|
||||
# These are just libc implementations, not actual OSes, and thus
|
||||
# require a kernel.
|
||||
echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2
|
||||
|
|
174
externals/SDL/build-scripts/fnsince.pl
vendored
Executable file
174
externals/SDL/build-scripts/fnsince.pl
vendored
Executable file
|
@ -0,0 +1,174 @@
|
|||
#!/usr/bin/perl -w
|
||||
|
||||
use warnings;
|
||||
use strict;
|
||||
use File::Basename;
|
||||
use Cwd qw(abs_path);
|
||||
|
||||
my $wikipath = undef;
|
||||
foreach (@ARGV) {
|
||||
$wikipath = abs_path($_), next if not defined $wikipath;
|
||||
}
|
||||
|
||||
chdir(dirname(__FILE__));
|
||||
chdir('..');
|
||||
|
||||
my @unsorted_releases = ();
|
||||
open(PIPEFH, '-|', 'git tag -l') or die "Failed to read git release tags: $!\n";
|
||||
|
||||
while (<PIPEFH>) {
|
||||
chomp;
|
||||
if (/\Arelease\-(.*?)\Z/) {
|
||||
push @unsorted_releases, $1;
|
||||
}
|
||||
|
||||
}
|
||||
close(PIPEFH);
|
||||
|
||||
#print("\n\nUNSORTED\n");
|
||||
#foreach (@unsorted_releases) {
|
||||
# print "$_\n";
|
||||
#}
|
||||
|
||||
my @releases = sort {
|
||||
my @asplit = split /\./, $a;
|
||||
my @bsplit = split /\./, $b;
|
||||
my $rc;
|
||||
for (my $i = 0; $i < scalar(@asplit); $i++) {
|
||||
return 1 if (scalar(@bsplit) <= $i); # a is "2.0.1" and b is "2.0", or whatever.
|
||||
my $aseg = $asplit[$i];
|
||||
my $bseg = $bsplit[$i];
|
||||
$rc = int($aseg) <=> int($bseg);
|
||||
return $rc if ($rc != 0); # found the difference.
|
||||
}
|
||||
return 0; # still here? They matched completely?!
|
||||
} @unsorted_releases;
|
||||
|
||||
# this happens to work for how SDL versions things at the moment.
|
||||
my $current_release = $releases[-1];
|
||||
my @current_release_segments = split /\./, $current_release;
|
||||
@current_release_segments[2] = '' . ($current_release_segments[2] + 2);
|
||||
my $next_release = join('.', @current_release_segments);
|
||||
|
||||
#print("\n\nSORTED\n");
|
||||
#foreach (@releases) {
|
||||
# print "$_\n";
|
||||
#}
|
||||
#print("\nCURRENT RELEASE: $current_release\n");
|
||||
#print("NEXT RELEASE: $next_release\n\n");
|
||||
|
||||
push @releases, 'HEAD';
|
||||
|
||||
my %funcs = ();
|
||||
foreach my $release (@releases) {
|
||||
#print("Checking $release...\n");
|
||||
next if ($release eq '2.0.0') || ($release eq '2.0.1'); # no dynapi before 2.0.2
|
||||
my $assigned_release = ($release eq '2.0.2') ? '2.0.0' : $release; # assume everything in 2.0.2--first with dynapi--was there since 2.0.0. We'll fix it up later.
|
||||
my $tag = ($release eq 'HEAD') ? $release : "release-$release";
|
||||
my $blobname = "$tag:src/dynapi/SDL_dynapi_overrides.h";
|
||||
open(PIPEFH, '-|', "git show '$blobname'") or die "Failed to read git blob '$blobname': $!\n";
|
||||
while (<PIPEFH>) {
|
||||
chomp;
|
||||
if (/\A\#define\s+(SDL_.*?)\s+SDL_.*?_REAL\Z/) {
|
||||
my $fn = $1;
|
||||
$funcs{$fn} = $assigned_release if not defined $funcs{$fn};
|
||||
}
|
||||
}
|
||||
close(PIPEFH);
|
||||
}
|
||||
|
||||
# Fixup the handful of functions that were added in 2.0.1 and 2.0.2 that we
|
||||
# didn't have dynapi revision data about...
|
||||
$funcs{'SDL_GetSystemRAM'} = '2.0.1';
|
||||
$funcs{'SDL_GetBasePath'} = '2.0.1';
|
||||
$funcs{'SDL_GetPrefPath'} = '2.0.1';
|
||||
$funcs{'SDL_UpdateYUVTexture'} = '2.0.1';
|
||||
$funcs{'SDL_GL_GetDrawableSize'} = '2.0.1';
|
||||
$funcs{'SDL_Direct3D9GetAdapterIndex'} = '2.0.1';
|
||||
$funcs{'SDL_RenderGetD3D9Device'} = '2.0.1';
|
||||
|
||||
$funcs{'SDL_RegisterApp'} = '2.0.2';
|
||||
$funcs{'SDL_UnregisterApp'} = '2.0.2';
|
||||
$funcs{'SDL_GetAssertionHandler'} = '2.0.2';
|
||||
$funcs{'SDL_GetDefaultAssertionHandler'} = '2.0.2';
|
||||
$funcs{'SDL_AtomicAdd'} = '2.0.2';
|
||||
$funcs{'SDL_AtomicGet'} = '2.0.2';
|
||||
$funcs{'SDL_AtomicGetPtr'} = '2.0.2';
|
||||
$funcs{'SDL_AtomicSet'} = '2.0.2';
|
||||
$funcs{'SDL_AtomicSetPtr'} = '2.0.2';
|
||||
$funcs{'SDL_HasAVX'} = '2.0.2';
|
||||
$funcs{'SDL_GameControllerAddMappingsFromRW'} = '2.0.2';
|
||||
$funcs{'SDL_acos'} = '2.0.2';
|
||||
$funcs{'SDL_asin'} = '2.0.2';
|
||||
$funcs{'SDL_vsscanf'} = '2.0.2';
|
||||
$funcs{'SDL_DetachThread'} = '2.0.2';
|
||||
$funcs{'SDL_GL_ResetAttributes'} = '2.0.2';
|
||||
$funcs{'SDL_DXGIGetOutputInfo'} = '2.0.2';
|
||||
|
||||
# these are incorrect in the dynapi header, because we forgot to add them
|
||||
# until a later release, but are available in the older release.
|
||||
$funcs{'SDL_WinRTGetFSPathUNICODE'} = '2.0.3';
|
||||
$funcs{'SDL_WinRTGetFSPathUTF8'} = '2.0.3';
|
||||
$funcs{'SDL_WinRTRunApp'} = '2.0.3';
|
||||
|
||||
if (not defined $wikipath) {
|
||||
foreach my $release (@releases) {
|
||||
foreach my $fn (sort keys %funcs) {
|
||||
print("$fn: $funcs{$fn}\n") if $funcs{$fn} eq $release;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (defined $wikipath) {
|
||||
chdir($wikipath);
|
||||
foreach my $fn (keys %funcs) {
|
||||
my $revision = $funcs{$fn};
|
||||
$revision = $next_release if $revision eq 'HEAD';
|
||||
my $fname = "$fn.mediawiki";
|
||||
if ( ! -f $fname ) {
|
||||
#print STDERR "No such file: $fname\n";
|
||||
next;
|
||||
}
|
||||
|
||||
my @lines = ();
|
||||
open(FH, '<', $fname) or die("Can't open $fname for read: $!\n");
|
||||
my $added = 0;
|
||||
while (<FH>) {
|
||||
chomp;
|
||||
if ((/\A\-\-\-\-/) && (!$added)) {
|
||||
push @lines, "== Version ==";
|
||||
push @lines, "";
|
||||
push @lines, "This function is available since SDL $revision.";
|
||||
push @lines, "";
|
||||
$added = 1;
|
||||
}
|
||||
push @lines, $_;
|
||||
next if not /\A\=\=\s+Version\s+\=\=/;
|
||||
$added = 1;
|
||||
push @lines, "";
|
||||
push @lines, "This function is available since SDL $revision.";
|
||||
push @lines, "";
|
||||
while (<FH>) {
|
||||
chomp;
|
||||
next if not (/\A\=\=\s+/ || /\A\-\-\-\-/);
|
||||
push @lines, $_;
|
||||
last;
|
||||
}
|
||||
}
|
||||
close(FH);
|
||||
|
||||
if (!$added) {
|
||||
push @lines, "== Version ==";
|
||||
push @lines, "";
|
||||
push @lines, "This function is available since SDL $revision.";
|
||||
push @lines, "";
|
||||
}
|
||||
|
||||
open(FH, '>', $fname) or die("Can't open $fname for write: $!\n");
|
||||
foreach (@lines) {
|
||||
print FH "$_\n";
|
||||
}
|
||||
close(FH);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
179
externals/SDL/build-scripts/wikiheaders.pl
vendored
179
externals/SDL/build-scripts/wikiheaders.pl
vendored
|
@ -136,14 +136,21 @@ sub wikify_chunk {
|
|||
#print("\n\nWIKIFY CHUNK:\n\n$str\n\n\n");
|
||||
|
||||
if ($wikitype eq 'mediawiki') {
|
||||
# convert `code` things first, so they aren't mistaken for other markdown items.
|
||||
my $codedstr = '';
|
||||
while ($str =~ s/\A(.*?)\`(.*?)\`//ms) {
|
||||
my $codeblock = $2;
|
||||
$codedstr .= wikify_chunk($wikitype, $1, undef, undef);
|
||||
# Convert obvious SDL things to wikilinks, even inside `code` blocks.
|
||||
$codeblock =~ s/\b(SDL_[a-zA-Z0-9_]+)/[[$1]]/gms;
|
||||
$codedstr .= "<code>$codeblock</code>";
|
||||
}
|
||||
|
||||
# Convert obvious SDL things to wikilinks.
|
||||
$str =~ s/\b(SDL_[a-zA-Z0-9_]+)/[[$1]]/gms;
|
||||
|
||||
# Make some Markdown things into MediaWiki...
|
||||
|
||||
# <code></code> is also popular. :/
|
||||
$str =~ s/\`(.*?)\`/<code>$1<\/code>/gms;
|
||||
|
||||
# bold+italic
|
||||
$str =~ s/\*\*\*(.*?)\*\*\*/'''''$1'''''/gms;
|
||||
|
||||
|
@ -156,6 +163,8 @@ sub wikify_chunk {
|
|||
# bullets
|
||||
$str =~ s/^\- /* /gm;
|
||||
|
||||
$str = $codedstr . $str;
|
||||
|
||||
if (defined $code) {
|
||||
$str .= "<syntaxhighlight lang='$codelang'>$code<\/syntaxhighlight>";
|
||||
}
|
||||
|
@ -261,6 +270,7 @@ usage() if not defined $wikipath;
|
|||
my @standard_wiki_sections = (
|
||||
'Draft',
|
||||
'[Brief]',
|
||||
'Deprecated',
|
||||
'Syntax',
|
||||
'Function Parameters',
|
||||
'Return Value',
|
||||
|
@ -283,6 +293,7 @@ my %headerfuncs = (); # $headerfuncs{"SDL_OpenAudio"} -> string of header docu
|
|||
my %headerdecls = ();
|
||||
my %headerfuncslocation = (); # $headerfuncslocation{"SDL_OpenAudio"} -> name of header holding SDL_OpenAudio define ("SDL_audio.h" in this case).
|
||||
my %headerfuncschunk = (); # $headerfuncschunk{"SDL_OpenAudio"} -> offset in array in %headers that should be replaced for this function.
|
||||
my %headerfuncshasdoxygen = (); # $headerfuncschunk{"SDL_OpenAudio"} -> 1 if there was no existing doxygen for this function.
|
||||
|
||||
my $incpath = "$srcpath/include";
|
||||
opendir(DH, $incpath) or die("Can't opendir '$incpath': $!\n");
|
||||
|
@ -295,14 +306,20 @@ while (readdir(DH)) {
|
|||
|
||||
while (<FH>) {
|
||||
chomp;
|
||||
if (not /\A\/\*\*\s*\Z/) { # not doxygen comment start?
|
||||
my $decl;
|
||||
my @templines;
|
||||
my $str;
|
||||
my $has_doxygen = 1;
|
||||
if (/\A\s*extern\s+(SDL_DEPRECATED\s+|)DECLSPEC/) { # a function declaration without a doxygen comment?
|
||||
@templines = ();
|
||||
$decl = $_;
|
||||
$str = '';
|
||||
$has_doxygen = 0;
|
||||
} elsif (not /\A\/\*\*\s*\Z/) { # not doxygen comment start?
|
||||
push @contents, $_;
|
||||
next;
|
||||
}
|
||||
|
||||
my @templines = ();
|
||||
push @templines, $_;
|
||||
my $str = '';
|
||||
} else { # Start of a doxygen comment, parse it out.
|
||||
@templines = ( $_ );
|
||||
while (<FH>) {
|
||||
chomp;
|
||||
push @templines, $_;
|
||||
|
@ -326,9 +343,10 @@ while (readdir(DH)) {
|
|||
}
|
||||
}
|
||||
|
||||
my $decl = <FH>;
|
||||
$decl = <FH>;
|
||||
$decl = '' if not defined $decl;
|
||||
chomp($decl);
|
||||
if (not $decl =~ /\A\s*extern\s+DECLSPEC/) {
|
||||
if (not $decl =~ /\A\s*extern\s+(SDL_DEPRECATED\s+|)DECLSPEC/) {
|
||||
#print "Found doxygen but no function sig:\n$str\n\n";
|
||||
foreach (@templines) {
|
||||
push @contents, $_;
|
||||
|
@ -336,6 +354,7 @@ while (readdir(DH)) {
|
|||
push @contents, $decl;
|
||||
next;
|
||||
}
|
||||
}
|
||||
|
||||
my @decllines = ( $decl );
|
||||
|
||||
|
@ -355,8 +374,8 @@ while (readdir(DH)) {
|
|||
#print("DECL: [$decl]\n");
|
||||
|
||||
my $fn = '';
|
||||
if ($decl =~ /\A\s*extern\s+DECLSPEC\s+(const\s+|)(unsigned\s+|)(.*?)\s*(\*?)\s*SDLCALL\s+(.*?)\s*\((.*?)\);/) {
|
||||
$fn = $5;
|
||||
if ($decl =~ /\A\s*extern\s+(SDL_DEPRECATED\s+|)DECLSPEC\s+(const\s+|)(unsigned\s+|)(.*?)\s*(\*?)\s*SDLCALL\s+(.*?)\s*\((.*?)\);/) {
|
||||
$fn = $6;
|
||||
#$decl =~ s/\A\s*extern\s+DECLSPEC\s+(.*?)\s+SDLCALL/$1/;
|
||||
} else {
|
||||
#print "Found doxygen but no function sig:\n$str\n\n";
|
||||
|
@ -373,9 +392,10 @@ while (readdir(DH)) {
|
|||
foreach (@decllines) {
|
||||
if ($decl eq '') {
|
||||
$decl = $_;
|
||||
$decl =~ s/\Aextern\s+DECLSPEC\s+(.*?)\s+(\*?)SDLCALL\s+/$1$2 /;
|
||||
$decl =~ s/\Aextern\s+(SDL_DEPRECATED\s+|)DECLSPEC\s+(.*?)\s+(\*?)SDLCALL\s+/$2$3 /;
|
||||
} else {
|
||||
my $trimmed = $_;
|
||||
# !!! FIXME: trim space for SDL_DEPRECATED if it was used, too.
|
||||
$trimmed =~ s/\A\s{24}//; # 24 for shrinking to match the removed "extern DECLSPEC SDLCALL "
|
||||
$decl .= $trimmed;
|
||||
}
|
||||
|
@ -384,14 +404,34 @@ while (readdir(DH)) {
|
|||
|
||||
#print("$fn:\n$str\n\n");
|
||||
|
||||
# There might be multiple declarations of a function due to #ifdefs,
|
||||
# and only one of them will have documentation. If we hit an
|
||||
# undocumented one before, delete the placeholder line we left for
|
||||
# it so it doesn't accumulate a new blank line on each run.
|
||||
my $skipfn = 0;
|
||||
if (defined $headerfuncshasdoxygen{$fn}) {
|
||||
if ($headerfuncshasdoxygen{$fn} == 0) { # An undocumented declaration already exists, nuke its placeholder line.
|
||||
delete $contents[$headerfuncschunk{$fn}]; # delete DOES NOT RENUMBER existing elements!
|
||||
} else { # documented function already existed?
|
||||
$skipfn = 1; # don't add this copy to the list of functions.
|
||||
if ($has_doxygen) {
|
||||
print STDERR "WARNING: Function '$fn' appears to be documented in multiple locations. Only keeping the first one we saw!\n";
|
||||
}
|
||||
push @contents, join("\n", @decllines); # just put the existing declation in as-is.
|
||||
}
|
||||
}
|
||||
|
||||
if (!$skipfn) {
|
||||
$headerfuncs{$fn} = $str;
|
||||
$headerdecls{$fn} = $decl;
|
||||
$headerfuncslocation{$fn} = $dent;
|
||||
$headerfuncschunk{$fn} = scalar(@contents);
|
||||
|
||||
$headerfuncshasdoxygen{$fn} = $has_doxygen;
|
||||
push @contents, join("\n", @templines);
|
||||
push @contents, join("\n", @decllines);
|
||||
}
|
||||
|
||||
}
|
||||
close(FH);
|
||||
|
||||
$headers{$dent} = \@contents;
|
||||
|
@ -513,7 +553,6 @@ if ($copy_direction == 1) { # --copy-to-headers
|
|||
|
||||
$wordwrap_mode = 'md'; # the headers use Markdown format.
|
||||
|
||||
# if it's not in the headers already, we don't add it, so iterate what we know is already there for changes.
|
||||
foreach (keys %headerfuncs) {
|
||||
my $fn = $_;
|
||||
next if not defined $wikifuncs{$fn}; # don't have a page for that function, skip it.
|
||||
|
@ -524,10 +563,13 @@ if ($copy_direction == 1) { # --copy-to-headers
|
|||
my $returns = %$sectionsref{'Return Value'};
|
||||
my $version = %$sectionsref{'Version'};
|
||||
my $related = %$sectionsref{'Related Functions'};
|
||||
my $deprecated = %$sectionsref{'Deprecated'};
|
||||
my $brief = %$sectionsref{'[Brief]'};
|
||||
my $addblank = 0;
|
||||
my $str = '';
|
||||
|
||||
$headerfuncshasdoxygen{$fn} = 1; # Added/changed doxygen for this header.
|
||||
|
||||
$brief = dewikify($wikitype, $brief);
|
||||
$brief =~ s/\A(.*?\.) /$1\n/; # \brief should only be one sentence, delimited by a period+space. Split if necessary.
|
||||
my @briefsplit = split /\n/, $brief;
|
||||
|
@ -547,6 +589,21 @@ if ($copy_direction == 1) { # --copy-to-headers
|
|||
$str .= wordwrap($remarks) . "\n";
|
||||
}
|
||||
|
||||
if (defined $deprecated) {
|
||||
# !!! FIXME: lots of code duplication in all of these.
|
||||
$str .= "\n" if $addblank; $addblank = 1;
|
||||
my $v = dewikify($wikitype, $deprecated);
|
||||
my $whitespacelen = length("\\deprecated") + 1;
|
||||
my $whitespace = ' ' x $whitespacelen;
|
||||
$v = wordwrap($v, -$whitespacelen);
|
||||
my @desclines = split /\n/, $v;
|
||||
my $firstline = shift @desclines;
|
||||
$str .= "\\deprecated $firstline\n";
|
||||
foreach (@desclines) {
|
||||
$str .= "${whitespace}$_\n";
|
||||
}
|
||||
}
|
||||
|
||||
if (defined $params) {
|
||||
$str .= "\n" if $addblank; $addblank = (defined $returns) ? 0 : 1;
|
||||
my @lines = split /\n/, dewikify($wikitype, $params);
|
||||
|
@ -623,8 +680,15 @@ if ($copy_direction == 1) { # --copy-to-headers
|
|||
}
|
||||
}
|
||||
|
||||
my $header = $headerfuncslocation{$fn};
|
||||
my $contentsref = $headers{$header};
|
||||
my $chunk = $headerfuncschunk{$fn};
|
||||
|
||||
my @lines = split /\n/, $str;
|
||||
my $output = "/**\n";
|
||||
|
||||
my $addnewline = (($chunk > 0) && ($$contentsref[$chunk-1] ne '')) ? "\n" : '';
|
||||
|
||||
my $output = "$addnewline/**\n";
|
||||
foreach (@lines) {
|
||||
chomp;
|
||||
s/\s*\Z//;
|
||||
|
@ -638,9 +702,6 @@ if ($copy_direction == 1) { # --copy-to-headers
|
|||
|
||||
#print("$fn:\n$output\n\n");
|
||||
|
||||
my $header = $headerfuncslocation{$fn};
|
||||
my $chunk = $headerfuncschunk{$fn};
|
||||
my $contentsref = $headers{$header};
|
||||
$$contentsref[$chunk] = $output;
|
||||
#$$contentsref[$chunk+1] = $headerdecls{$fn};
|
||||
|
||||
|
@ -648,19 +709,36 @@ if ($copy_direction == 1) { # --copy-to-headers
|
|||
}
|
||||
|
||||
foreach (keys %changed_headers) {
|
||||
my $contentsref = $headers{$_};
|
||||
my $path = "$incpath/$_.tmp";
|
||||
my $header = $_;
|
||||
|
||||
# this is kinda inefficient, but oh well.
|
||||
my @removelines = ();
|
||||
foreach (keys %headerfuncslocation) {
|
||||
my $fn = $_;
|
||||
next if $headerfuncshasdoxygen{$fn};
|
||||
next if $headerfuncslocation{$fn} ne $header;
|
||||
# the index of the blank line we put before the function declaration in case we needed to replace it with new content from the wiki.
|
||||
push @removelines, $headerfuncschunk{$fn};
|
||||
}
|
||||
|
||||
my $contentsref = $headers{$header};
|
||||
foreach (@removelines) {
|
||||
delete $$contentsref[$_]; # delete DOES NOT RENUMBER existing elements!
|
||||
}
|
||||
|
||||
my $path = "$incpath/$header.tmp";
|
||||
open(FH, '>', $path) or die("Can't open '$path': $!\n");
|
||||
foreach (@$contentsref) {
|
||||
print FH "$_\n";
|
||||
print FH "$_\n" if defined $_;
|
||||
}
|
||||
close(FH);
|
||||
rename($path, "$incpath/$_") or die("Can't rename '$path' to '$incpath/$_': $!\n");
|
||||
rename($path, "$incpath/$header") or die("Can't rename '$path' to '$incpath/$header': $!\n");
|
||||
}
|
||||
|
||||
} elsif ($copy_direction == -1) { # --copy-to-wiki
|
||||
foreach (keys %headerfuncs) {
|
||||
my $fn = $_;
|
||||
next if not $headerfuncshasdoxygen{$fn};
|
||||
my $wikitype = defined $wikitypes{$fn} ? $wikitypes{$fn} : 'mediawiki'; # default to MediaWiki for new stuff FOR NOW.
|
||||
die("Unexpected wikitype '$wikitype'\n") if (($wikitype ne 'mediawiki') and ($wikitype ne 'md'));
|
||||
|
||||
|
@ -669,6 +747,7 @@ if ($copy_direction == 1) { # --copy-to-headers
|
|||
$wordwrap_mode = $wikitype;
|
||||
|
||||
my $raw = $headerfuncs{$fn}; # raw doxygen text with comment characters stripped from start/end and start of each line.
|
||||
next if not defined $raw;
|
||||
$raw =~ s/\A\s*\\brief\s+//; # Technically we don't need \brief (please turn on JAVADOC_AUTOBRIEF if you use Doxygen), so just in case one is present, strip it.
|
||||
|
||||
my @doxygenlines = split /\n/, $raw;
|
||||
|
@ -714,7 +793,7 @@ if ($copy_direction == 1) { # --copy-to-headers
|
|||
|
||||
my $decl = $headerdecls{$fn};
|
||||
#$decl =~ s/\*\s+SDLCALL/ *SDLCALL/; # Try to make "void * Function" become "void *Function"
|
||||
#$decl =~ s/\A\s*extern\s+DECLSPEC\s+(.*?)\s+(\*?)SDLCALL/$1$2/;
|
||||
#$decl =~ s/\A\s*extern\s+(SDL_DEPRECATED\s+|)DECLSPEC\s+(.*?)\s+(\*?)SDLCALL/$2$3/;
|
||||
|
||||
my $syntax = '';
|
||||
if ($wikitype eq 'mediawiki') {
|
||||
|
@ -768,6 +847,21 @@ if ($copy_direction == 1) { # --copy-to-headers
|
|||
}
|
||||
$desc =~ s/[\s\n]+\Z//ms;
|
||||
$sections{'Return Value'} = wordwrap("$retstr " . wikify($wikitype, $desc)) . "\n";
|
||||
} elsif ($l =~ /\A\\deprecated\s+(.*)\Z/) {
|
||||
my $desc = $1;
|
||||
while (@doxygenlines) {
|
||||
my $subline = $doxygenlines[0];
|
||||
$subline =~ s/\A\s*//;
|
||||
last if $subline =~ /\A\\/; # some sort of doxygen command, assume we're past this thing.
|
||||
shift @doxygenlines; # dump this line from the array; we're using it.
|
||||
if ($subline eq '') { # empty line, make sure it keeps the newline char.
|
||||
$desc .= "\n";
|
||||
} else {
|
||||
$desc .= " $subline";
|
||||
}
|
||||
}
|
||||
$desc =~ s/[\s\n]+\Z//ms;
|
||||
$sections{'Deprecated'} = wordwrap(wikify($wikitype, $desc)) . "\n";
|
||||
} elsif ($l =~ /\A\\since\s+(.*)\Z/) {
|
||||
my $desc = $1;
|
||||
while (@doxygenlines) {
|
||||
|
@ -854,30 +948,57 @@ if ($copy_direction == 1) { # --copy-to-headers
|
|||
}
|
||||
|
||||
my $wikisectionorderref = $wikisectionorder{$fn};
|
||||
my @ordered_sections = (@standard_wiki_sections, defined $wikisectionorderref ? @$wikisectionorderref : ()); # this copies the arrays into one.
|
||||
|
||||
# Make sure there's a footer in the wiki that puts this function in CategoryAPI...
|
||||
if (not $$sectionsref{'[footer]'}) {
|
||||
$$sectionsref{'[footer]'} = '';
|
||||
push @$wikisectionorderref, '[footer]';
|
||||
}
|
||||
|
||||
# !!! FIXME: This won't be CategoryAPI if we eventually handle things other than functions.
|
||||
my $footer = $$sectionsref{'[footer]'};
|
||||
if ($wikitype eq 'mediawiki') {
|
||||
$footer =~ s/\[\[CategoryAPI\]\],?\s*//g;
|
||||
$footer = '[[CategoryAPI]]' . (($footer eq '') ? "\n" : ", $footer");
|
||||
} elsif ($wikitype eq 'md') {
|
||||
$footer =~ s/\[CategoryAPI\]\(CategoryAPI\),?\s*//g;
|
||||
$footer = '[CategoryAPI](CategoryAPI)' . (($footer eq '') ? '' : ', ') . $footer;
|
||||
} else { die("Unexpected wikitype '$wikitype'\n"); }
|
||||
$$sectionsref{'[footer]'} = $footer;
|
||||
|
||||
my $prevsectstr = '';
|
||||
my @ordered_sections = (@standard_wiki_sections, defined $wikisectionorderref ? @$wikisectionorderref : ()); # this copies the arrays into one.
|
||||
foreach (@ordered_sections) {
|
||||
my $sect = $_;
|
||||
next if $sect eq '[start]';
|
||||
next if (not defined $sections{$sect} and not defined $$sectionsref{$sect});
|
||||
my $section = defined $sections{$sect} ? $sections{$sect} : $$sectionsref{$sect};
|
||||
if ($sect eq '[footer]') {
|
||||
# Make sure previous section ends with two newlines.
|
||||
if (substr($prevsectstr, -1) ne "\n") {
|
||||
print FH "\n\n";
|
||||
} elsif (substr($prevsectstr, -2) ne "\n\n") {
|
||||
print FH "\n";
|
||||
}
|
||||
print FH "----\n"; # It's the same in Markdown and MediaWiki.
|
||||
} elsif ($sect eq '[Brief]') {
|
||||
if ($wikitype eq 'mediawiki') {
|
||||
print FH "= $fn =\n\n";
|
||||
} elsif ($wikitype eq 'md') {
|
||||
print FH "# $fn\n\n";
|
||||
} else { die("Expected wikitype '$wikitype'\n"); }
|
||||
} else { die("Unexpected wikitype '$wikitype'\n"); }
|
||||
} else {
|
||||
if ($wikitype eq 'mediawiki') {
|
||||
print FH "\n== $sect ==\n\n";
|
||||
} elsif ($wikitype eq 'md') {
|
||||
print FH "\n## $sect\n\n";
|
||||
} else { die("Expected wikitype '$wikitype'\n"); }
|
||||
} else { die("Unexpected wikitype '$wikitype'\n"); }
|
||||
}
|
||||
|
||||
print FH defined $sections{$sect} ? $sections{$sect} : $$sectionsref{$sect};
|
||||
my $sectstr = defined $sections{$sect} ? $sections{$sect} : $$sectionsref{$sect};
|
||||
print FH $sectstr;
|
||||
|
||||
$prevsectstr = $sectstr;
|
||||
|
||||
# make sure these don't show up twice.
|
||||
delete($sections{$sect});
|
||||
|
|
2
externals/SDL/build-scripts/winrtbuild.ps1
vendored
2
externals/SDL/build-scripts/winrtbuild.ps1
vendored
|
@ -39,7 +39,7 @@
|
|||
#
|
||||
|
||||
# Base version of SDL, used for packaging purposes
|
||||
$SDLVersion = "2.0.16"
|
||||
$SDLVersion = "2.0.18"
|
||||
|
||||
# Gets the .bat file that sets up an MSBuild environment, given one of
|
||||
# Visual Studio's, "PlatformToolset"s.
|
||||
|
|
30
externals/SDL/cmake/macros.cmake
vendored
30
externals/SDL/cmake/macros.cmake
vendored
|
@ -1,5 +1,13 @@
|
|||
macro(ADD_TO_ALLOPTIONS _NEWNAME)
|
||||
list(APPEND ALLOPTIONS ${_NEWNAME})
|
||||
string(LENGTH ${_NEWNAME} _SLEN)
|
||||
if(${LONGESTOPTIONNAME} LESS ${_SLEN})
|
||||
set(LONGESTOPTIONNAME ${_SLEN})
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro(SET_OPTION _NAME _DESC)
|
||||
list(APPEND ALLOPTIONS ${_NAME})
|
||||
add_to_alloptions(${_NAME})
|
||||
if(${ARGC} EQUAL 3)
|
||||
set(_DEFLT ${ARGV2})
|
||||
else()
|
||||
|
@ -9,12 +17,12 @@ macro(SET_OPTION _NAME _DESC)
|
|||
endmacro()
|
||||
|
||||
macro(DEP_OPTION _NAME _DESC _DEFLT _DEPTEST _FAILDFLT)
|
||||
list(APPEND ALLOPTIONS ${_NAME})
|
||||
add_to_alloptions(${_NAME})
|
||||
cmake_dependent_option(${_NAME} ${_DESC} ${_DEFLT} ${_DEPTEST} ${_FAILDFLT})
|
||||
endmacro()
|
||||
|
||||
macro(OPTION_STRING _NAME _DESC _VALUE)
|
||||
list(APPEND ALLOPTIONS ${_NAME})
|
||||
add_to_alloptions(${_NAME})
|
||||
set(${_NAME} ${_VALUE} CACHE STRING "${_DESC}")
|
||||
set(HAVE_${_NAME} ${_VALUE})
|
||||
ENDMACRO()
|
||||
|
@ -42,12 +50,18 @@ macro(MESSAGE_TESTED_OPTION _NAME)
|
|||
if(${ARGC} EQUAL 2)
|
||||
set(_PAD ${ARGV1})
|
||||
endif()
|
||||
if(NOT HAVE_${_NAME})
|
||||
set(HAVE_${_NAME} OFF)
|
||||
elseif("${HAVE_${_NAME}}" MATCHES "1|TRUE|YES|Y")
|
||||
set(HAVE_${_NAME} ON)
|
||||
string(SUBSTRING "${_NAME}" 0 4 _NAMESTART)
|
||||
if(_NAMESTART STREQUAL "SDL_")
|
||||
string(SUBSTRING "${_NAME}" 4 -1 _STRIPPEDNAME)
|
||||
else()
|
||||
set(_STRIPPEDNAME "${_NAME}")
|
||||
endif()
|
||||
message(STATUS " ${_NAME}${_PAD}(Wanted: ${_REQVALUE}): ${HAVE_${_NAME}}")
|
||||
if(NOT HAVE_${_STRIPPEDNAME})
|
||||
set(HAVE_${_STRIPPEDNAME} OFF)
|
||||
elseif("${HAVE_${_STRIPPEDNAME}}" MATCHES "1|TRUE|YES|Y")
|
||||
set(HAVE_${_STRIPPEDNAME} ON)
|
||||
endif()
|
||||
message(STATUS " ${_NAME}${_PAD}(Wanted: ${_REQVALUE}): ${HAVE_${_STRIPPEDNAME}}")
|
||||
endmacro()
|
||||
|
||||
macro(LISTTOSTR _LIST _OUTPUT)
|
||||
|
|
475
externals/SDL/cmake/sdlchecks.cmake
vendored
475
externals/SDL/cmake/sdlchecks.cmake
vendored
|
@ -32,17 +32,13 @@ endmacro()
|
|||
macro(CheckDLOPEN)
|
||||
check_symbol_exists(dlopen "dlfcn.h" HAVE_DLOPEN)
|
||||
if(NOT HAVE_DLOPEN)
|
||||
foreach(_LIBNAME dl tdl)
|
||||
check_library_exists("${_LIBNAME}" "dlopen" "" DLOPEN_LIB)
|
||||
check_library_exists(dl dlopen "" DLOPEN_LIB)
|
||||
if(DLOPEN_LIB)
|
||||
list(APPEND EXTRA_LIBS ${_LIBNAME})
|
||||
set(_DLLIB ${_LIBNAME})
|
||||
list(APPEND EXTRA_LIBS dl)
|
||||
set(_DLLIB dl)
|
||||
set(HAVE_DLOPEN TRUE)
|
||||
break()
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
if(HAVE_DLOPEN)
|
||||
if(_DLLIB)
|
||||
set(CMAKE_REQUIRED_LIBRARIES ${_DLLIB})
|
||||
|
@ -55,20 +51,20 @@ macro(CheckDLOPEN)
|
|||
}" HAVE_DLOPEN)
|
||||
set(CMAKE_REQUIRED_LIBRARIES)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
if (HAVE_DLOPEN)
|
||||
set(SDL_LOADSO_DLOPEN 1)
|
||||
set(HAVE_SDL_DLOPEN TRUE)
|
||||
file(GLOB DLOPEN_SOURCES ${SDL2_SOURCE_DIR}/src/loadso/dlopen/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${DLOPEN_SOURCES})
|
||||
set(HAVE_SDL_LOADSO TRUE)
|
||||
endif()
|
||||
macro(CheckO_CLOEXEC)
|
||||
check_c_source_compiles("
|
||||
#include <fcntl.h>
|
||||
int flag = O_CLOEXEC;
|
||||
int main(void) {
|
||||
}" HAVE_O_CLOEXEC)
|
||||
endmacro()
|
||||
|
||||
# Requires:
|
||||
# - n/a
|
||||
macro(CheckOSS)
|
||||
if(OSS)
|
||||
if(SDL_OSS)
|
||||
set(OSS_HEADER_FILE "sys/soundcard.h")
|
||||
check_c_source_compiles("
|
||||
#include <sys/soundcard.h>
|
||||
|
@ -99,10 +95,10 @@ endmacro()
|
|||
# Requires:
|
||||
# - n/a
|
||||
# Optional:
|
||||
# - ALSA_SHARED opt
|
||||
# - HAVE_DLOPEN opt
|
||||
# - SDL_ALSA_SHARED opt
|
||||
# - HAVE_SDL_LOADSO opt
|
||||
macro(CheckALSA)
|
||||
if(ALSA)
|
||||
if(SDL_ALSA)
|
||||
CHECK_INCLUDE_FILE(alsa/asoundlib.h HAVE_ASOUNDLIB_H)
|
||||
if(HAVE_ASOUNDLIB_H)
|
||||
CHECK_LIBRARY_EXISTS(asound snd_pcm_recover "" HAVE_LIBASOUND)
|
||||
|
@ -112,14 +108,13 @@ macro(CheckALSA)
|
|||
file(GLOB ALSA_SOURCES ${SDL2_SOURCE_DIR}/src/audio/alsa/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${ALSA_SOURCES})
|
||||
set(SDL_AUDIO_DRIVER_ALSA 1)
|
||||
if(ALSA_SHARED)
|
||||
if(NOT HAVE_DLOPEN)
|
||||
if(SDL_ALSA_SHARED AND NOT HAVE_SDL_LOADSO)
|
||||
message_warn("You must have SDL_LoadObject() support for dynamic ALSA loading")
|
||||
else()
|
||||
endif()
|
||||
if(SDL_ALSA_SHARED AND HAVE_SDL_LOADSO)
|
||||
FindLibraryAndSONAME("asound")
|
||||
set(SDL_AUDIO_DRIVER_ALSA_DYNAMIC "\"${ASOUND_LIB_SONAME}\"")
|
||||
set(HAVE_ALSA_SHARED TRUE)
|
||||
endif()
|
||||
else()
|
||||
list(APPEND EXTRA_LIBS asound)
|
||||
endif()
|
||||
|
@ -131,10 +126,10 @@ endmacro()
|
|||
# Requires:
|
||||
# - PkgCheckModules
|
||||
# Optional:
|
||||
# - PIPEWIRE_SHARED opt
|
||||
# - HAVE_DLOPEN opt
|
||||
# - SDL_PIPEWIRE_SHARED opt
|
||||
# - HAVE_SDL_LOADSO opt
|
||||
macro(CheckPipewire)
|
||||
if(PIPEWIRE)
|
||||
if(SDL_PIPEWIRE)
|
||||
pkg_check_modules(PKG_PIPEWIRE libpipewire-0.3>=0.3.20)
|
||||
if(PKG_PIPEWIRE_FOUND)
|
||||
set(HAVE_PIPEWIRE TRUE)
|
||||
|
@ -142,14 +137,13 @@ macro(CheckPipewire)
|
|||
set(SOURCE_FILES ${SOURCE_FILES} ${PIPEWIRE_SOURCES})
|
||||
set(SDL_AUDIO_DRIVER_PIPEWIRE 1)
|
||||
list(APPEND EXTRA_CFLAGS ${PKG_PIPEWIRE_CFLAGS})
|
||||
if(PIPEWIRE_SHARED)
|
||||
if(NOT HAVE_DLOPEN)
|
||||
if(SDL_PIPEWIRE_SHARED AND NOT HAVE_SDL_LOADSO)
|
||||
message_warn("You must have SDL_LoadObject() support for dynamic Pipewire loading")
|
||||
else()
|
||||
endif()
|
||||
if(SDL_PIPEWIRE_SHARED AND HAVE_SDL_LOADSO)
|
||||
FindLibraryAndSONAME("pipewire-0.3")
|
||||
set(SDL_AUDIO_DRIVER_PIPEWIRE_DYNAMIC "\"${PIPEWIRE_0.3_LIB_SONAME}\"")
|
||||
set(HAVE_PIPEWIRE_SHARED TRUE)
|
||||
endif()
|
||||
else()
|
||||
list(APPEND EXTRA_LDFLAGS ${PKG_PIPEWIRE_LDFLAGS})
|
||||
endif()
|
||||
|
@ -158,14 +152,13 @@ macro(CheckPipewire)
|
|||
endif()
|
||||
endmacro()
|
||||
|
||||
|
||||
# Requires:
|
||||
# - PkgCheckModules
|
||||
# Optional:
|
||||
# - PULSEAUDIO_SHARED opt
|
||||
# - HAVE_DLOPEN opt
|
||||
# - SDL_PULSEAUDIO_SHARED opt
|
||||
# - HAVE_SDL_LOADSO opt
|
||||
macro(CheckPulseAudio)
|
||||
if(PULSEAUDIO)
|
||||
if(SDL_PULSEAUDIO)
|
||||
pkg_check_modules(PKG_PULSEAUDIO libpulse-simple)
|
||||
if(PKG_PULSEAUDIO_FOUND)
|
||||
set(HAVE_PULSEAUDIO TRUE)
|
||||
|
@ -173,16 +166,15 @@ macro(CheckPulseAudio)
|
|||
set(SOURCE_FILES ${SOURCE_FILES} ${PULSEAUDIO_SOURCES})
|
||||
set(SDL_AUDIO_DRIVER_PULSEAUDIO 1)
|
||||
list(APPEND EXTRA_CFLAGS ${PKG_PULSEAUDIO_CFLAGS})
|
||||
if(PULSEAUDIO_SHARED)
|
||||
if(NOT HAVE_DLOPEN)
|
||||
if(SDL_PULSEAUDIO_SHARED AND NOT HAVE_SDL_LOADSO)
|
||||
message_warn("You must have SDL_LoadObject() support for dynamic PulseAudio loading")
|
||||
else()
|
||||
endif()
|
||||
if(SDL_PULSEAUDIO_SHARED AND HAVE_SDL_LOADSO)
|
||||
FindLibraryAndSONAME("pulse-simple")
|
||||
set(SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC "\"${PULSE_SIMPLE_LIB_SONAME}\"")
|
||||
set(HAVE_PULSEAUDIO_SHARED TRUE)
|
||||
endif()
|
||||
else()
|
||||
list(APPEND EXTRA_LDFLAGS ${PKG_PULSEAUDIO_LDFLAGS})
|
||||
list(APPEND EXTRA_LDFLAGS ${PKG_sPULSEAUDIO_LDFLAGS})
|
||||
endif()
|
||||
set(HAVE_SDL_AUDIO TRUE)
|
||||
endif()
|
||||
|
@ -192,10 +184,10 @@ endmacro()
|
|||
# Requires:
|
||||
# - PkgCheckModules
|
||||
# Optional:
|
||||
# - JACK_SHARED opt
|
||||
# - HAVE_DLOPEN opt
|
||||
# - SDL_JACK_SHARED opt
|
||||
# - HAVE_SDL_LOADSO opt
|
||||
macro(CheckJACK)
|
||||
if(JACK)
|
||||
if(SDL_JACK)
|
||||
pkg_check_modules(PKG_JACK jack)
|
||||
if(PKG_JACK_FOUND)
|
||||
set(HAVE_JACK TRUE)
|
||||
|
@ -203,14 +195,13 @@ macro(CheckJACK)
|
|||
set(SOURCE_FILES ${SOURCE_FILES} ${JACK_SOURCES})
|
||||
set(SDL_AUDIO_DRIVER_JACK 1)
|
||||
list(APPEND EXTRA_CFLAGS ${PKG_JACK_CFLAGS})
|
||||
if(JACK_SHARED)
|
||||
if(NOT HAVE_DLOPEN)
|
||||
if(SDL_JACK_SHARED AND NOT HAVE_SDL_LOADSO)
|
||||
message_warn("You must have SDL_LoadObject() support for dynamic JACK audio loading")
|
||||
else()
|
||||
endif()
|
||||
if(SDL_JACK_SHARED AND HAVE_SDL_LOADSO)
|
||||
FindLibraryAndSONAME("jack")
|
||||
set(SDL_AUDIO_DRIVER_JACK_DYNAMIC "\"${JACK_LIB_SONAME}\"")
|
||||
set(HAVE_JACK_SHARED TRUE)
|
||||
endif()
|
||||
else()
|
||||
list(APPEND EXTRA_LDFLAGS ${PKG_JACK_LDFLAGS})
|
||||
endif()
|
||||
|
@ -222,10 +213,10 @@ endmacro()
|
|||
# Requires:
|
||||
# - PkgCheckModules
|
||||
# Optional:
|
||||
# - ESD_SHARED opt
|
||||
# - HAVE_DLOPEN opt
|
||||
# - SDL_ESD_SHARED opt
|
||||
# - HAVE_SDL_LOADSO opt
|
||||
macro(CheckESD)
|
||||
if(ESD)
|
||||
if(SDL_ESD)
|
||||
pkg_check_modules(PKG_ESD esound)
|
||||
if(PKG_ESD_FOUND)
|
||||
set(HAVE_ESD TRUE)
|
||||
|
@ -233,14 +224,13 @@ macro(CheckESD)
|
|||
set(SOURCE_FILES ${SOURCE_FILES} ${ESD_SOURCES})
|
||||
set(SDL_AUDIO_DRIVER_ESD 1)
|
||||
list(APPEND EXTRA_CFLAGS ${PKG_ESD_CFLAGS})
|
||||
if(ESD_SHARED)
|
||||
if(NOT HAVE_DLOPEN)
|
||||
if(SDL_ESD_SHARED AND NOT HAVE_SDL_LOADSO)
|
||||
message_warn("You must have SDL_LoadObject() support for dynamic ESD loading")
|
||||
else()
|
||||
endif()
|
||||
if(SDL_ESD_SHARED AND HAVE_SDL_LOADSO)
|
||||
FindLibraryAndSONAME(esd)
|
||||
set(SDL_AUDIO_DRIVER_ESD_DYNAMIC "\"${ESD_LIB_SONAME}\"")
|
||||
set(HAVE_ESD_SHARED TRUE)
|
||||
endif()
|
||||
else()
|
||||
list(APPEND EXTRA_LDFLAGS ${PKG_ESD_LDFLAGS})
|
||||
endif()
|
||||
|
@ -252,10 +242,10 @@ endmacro()
|
|||
# Requires:
|
||||
# - n/a
|
||||
# Optional:
|
||||
# - ARTS_SHARED opt
|
||||
# - HAVE_DLOPEN opt
|
||||
# - SDL_ARTS_SHARED opt
|
||||
# - HAVE_SDL_LOADSO opt
|
||||
macro(CheckARTS)
|
||||
if(ARTS)
|
||||
if(SDL_ARTS)
|
||||
find_program(ARTS_CONFIG arts-config)
|
||||
if(ARTS_CONFIG)
|
||||
execute_process(CMD_ARTSCFLAGS ${ARTS_CONFIG} --cflags
|
||||
|
@ -267,15 +257,14 @@ macro(CheckARTS)
|
|||
set(SOURCE_FILES ${SOURCE_FILES} ${ARTS_SOURCES})
|
||||
set(SDL_AUDIO_DRIVER_ARTS 1)
|
||||
set(HAVE_ARTS TRUE)
|
||||
if(ARTS_SHARED)
|
||||
if(NOT HAVE_DLOPEN)
|
||||
if(SDL_ARTS_SHARED AND NOT HAVE_SDL_LOADSO)
|
||||
message_warn("You must have SDL_LoadObject() support for dynamic ARTS loading")
|
||||
else()
|
||||
endif()
|
||||
if(SDL_ARTS_SHARED AND HAVE_SDL_LOADSO)
|
||||
# TODO
|
||||
FindLibraryAndSONAME(artsc)
|
||||
set(SDL_AUDIO_DRIVER_ARTS_DYNAMIC "\"${ARTSC_LIB_SONAME}\"")
|
||||
set(HAVE_ARTS_SHARED TRUE)
|
||||
endif()
|
||||
else()
|
||||
list(APPEND EXTRA_LDFLAGS ${ARTS_LIBS})
|
||||
endif()
|
||||
|
@ -287,10 +276,10 @@ endmacro()
|
|||
# Requires:
|
||||
# - n/a
|
||||
# Optional:
|
||||
# - NAS_SHARED opt
|
||||
# - HAVE_DLOPEN opt
|
||||
# - SDL_NAS_SHARED opt
|
||||
# - HAVE_SDL_LOADSO opt
|
||||
macro(CheckNAS)
|
||||
if(NAS)
|
||||
if(SDL_NAS)
|
||||
# TODO: set include paths properly, so the NAS headers are found
|
||||
check_include_file(audio/audiolib.h HAVE_NAS_H)
|
||||
find_library(D_NAS_LIB audio)
|
||||
|
@ -299,14 +288,13 @@ macro(CheckNAS)
|
|||
file(GLOB NAS_SOURCES ${SDL2_SOURCE_DIR}/src/audio/nas/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${NAS_SOURCES})
|
||||
set(SDL_AUDIO_DRIVER_NAS 1)
|
||||
if(NAS_SHARED)
|
||||
if(NOT HAVE_DLOPEN)
|
||||
if(SDL_NAS_SHARED AND NOT HAVE_SDL_LOADSO)
|
||||
message_warn("You must have SDL_LoadObject() support for dynamic NAS loading")
|
||||
else()
|
||||
endif()
|
||||
if(SDL_NAS_SHARED AND HAVE_SDL_LOADSO)
|
||||
FindLibraryAndSONAME("audio")
|
||||
set(SDL_AUDIO_DRIVER_NAS_DYNAMIC "\"${AUDIO_LIB_SONAME}\"")
|
||||
set(HAVE_NAS_SHARED TRUE)
|
||||
endif()
|
||||
else()
|
||||
list(APPEND EXTRA_LIBS ${D_NAS_LIB})
|
||||
endif()
|
||||
|
@ -318,10 +306,10 @@ endmacro()
|
|||
# Requires:
|
||||
# - n/a
|
||||
# Optional:
|
||||
# - SNDIO_SHARED opt
|
||||
# - HAVE_DLOPEN opt
|
||||
# - SDL_SNDIO_SHARED opt
|
||||
# - HAVE_SDL_LOADSO opt
|
||||
macro(CheckSNDIO)
|
||||
if(SNDIO)
|
||||
if(SDL_SNDIO)
|
||||
# TODO: set include paths properly, so the sndio headers are found
|
||||
check_include_file(sndio.h HAVE_SNDIO_H)
|
||||
find_library(D_SNDIO_LIB sndio)
|
||||
|
@ -330,14 +318,13 @@ macro(CheckSNDIO)
|
|||
file(GLOB SNDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/sndio/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${SNDIO_SOURCES})
|
||||
set(SDL_AUDIO_DRIVER_SNDIO 1)
|
||||
if(SNDIO_SHARED)
|
||||
if(NOT HAVE_DLOPEN)
|
||||
if(SDL_SNDIO_SHARED AND NOT HAVE_SDL_LOADSO)
|
||||
message_warn("You must have SDL_LoadObject() support for dynamic sndio loading")
|
||||
else()
|
||||
endif()
|
||||
if(SDL_SNDIO_SHARED AND HAVE_SDL_LOADSO)
|
||||
FindLibraryAndSONAME("sndio")
|
||||
set(SDL_AUDIO_DRIVER_SNDIO_DYNAMIC "\"${SNDIO_LIB_SONAME}\"")
|
||||
set(HAVE_SNDIO_SHARED TRUE)
|
||||
endif()
|
||||
else()
|
||||
list(APPEND EXTRA_LIBS ${D_SNDIO_LIB})
|
||||
endif()
|
||||
|
@ -350,7 +337,7 @@ endmacro()
|
|||
# - PkgCheckModules
|
||||
# Optional:
|
||||
# - FUSIONSOUND_SHARED opt
|
||||
# - HAVE_DLOPEN opt
|
||||
# - HAVE_SDL_LOADSO opt
|
||||
macro(CheckFusionSound)
|
||||
if(FUSIONSOUND)
|
||||
pkg_check_modules(PKG_FUSIONSOUND fusionsound>=1.0.0)
|
||||
|
@ -360,14 +347,13 @@ macro(CheckFusionSound)
|
|||
set(SOURCE_FILES ${SOURCE_FILES} ${FUSIONSOUND_SOURCES})
|
||||
set(SDL_AUDIO_DRIVER_FUSIONSOUND 1)
|
||||
list(APPEND EXTRA_CFLAGS ${PKG_FUSIONSOUND_CFLAGS})
|
||||
if(FUSIONSOUND_SHARED)
|
||||
if(NOT HAVE_DLOPEN)
|
||||
if(FUSIONSOUND_SHARED AND NOT HAVE_SDL_LOADSO)
|
||||
message_warn("You must have SDL_LoadObject() support for dynamic FusionSound loading")
|
||||
else()
|
||||
endif()
|
||||
if(FUSIONSOUND_SHARED AND HAVE_SDL_LOADSO)
|
||||
FindLibraryAndSONAME("fusionsound")
|
||||
set(SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC "\"${FUSIONSOUND_LIB_SONAME}\"")
|
||||
set(HAVE_FUSIONSOUND_SHARED TRUE)
|
||||
endif()
|
||||
else()
|
||||
list(APPEND EXTRA_LDFLAGS ${PKG_FUSIONSOUND_LDFLAGS})
|
||||
endif()
|
||||
|
@ -377,23 +363,22 @@ macro(CheckFusionSound)
|
|||
endmacro()
|
||||
|
||||
# Requires:
|
||||
# - LIBSAMPLERATE
|
||||
# - SDL_LIBSAMPLERATE
|
||||
# Optional:
|
||||
# - LIBSAMPLERATE_SHARED opt
|
||||
# - HAVE_DLOPEN opt
|
||||
# - SDL_LIBSAMPLERATE_SHARED opt
|
||||
# - HAVE_SDL_LOADSO opt
|
||||
macro(CheckLibSampleRate)
|
||||
if(LIBSAMPLERATE)
|
||||
if(SDL_LIBSAMPLERATE)
|
||||
check_include_file(samplerate.h HAVE_LIBSAMPLERATE_H)
|
||||
if(HAVE_LIBSAMPLERATE_H)
|
||||
set(HAVE_LIBSAMPLERATE TRUE)
|
||||
if(LIBSAMPLERATE_SHARED)
|
||||
if(NOT HAVE_DLOPEN)
|
||||
if(SDL_LIBSAMPLERATE_SHARED AND NOT HAVE_SDL_LOADSO)
|
||||
message_warn("You must have SDL_LoadObject() support for dynamic libsamplerate loading")
|
||||
else()
|
||||
endif()
|
||||
if(SDL_LIBSAMPLERATE_SHARED AND HAVE_SDL_LOADSO)
|
||||
FindLibraryAndSONAME("samplerate")
|
||||
set(SDL_LIBSAMPLERATE_DYNAMIC "\"${SAMPLERATE_LIB_SONAME}\"")
|
||||
set(HAVE_LIBSAMPLERATE_SHARED TRUE)
|
||||
endif()
|
||||
else()
|
||||
list(APPEND EXTRA_LDFLAGS -lsamplerate)
|
||||
endif()
|
||||
|
@ -404,11 +389,11 @@ endmacro()
|
|||
# Requires:
|
||||
# - n/a
|
||||
# Optional:
|
||||
# - X11_SHARED opt
|
||||
# - HAVE_DLOPEN opt
|
||||
# - SDL_X11_SHARED opt
|
||||
# - HAVE_SDL_LOADSO opt
|
||||
macro(CheckX11)
|
||||
if(VIDEO_X11)
|
||||
foreach(_LIB X11 Xext Xcursor Xinerama Xi Xrandr Xrender Xss Xxf86vm)
|
||||
if(SDL_X11)
|
||||
foreach(_LIB X11 Xext Xcursor Xinerama Xi Xfixes Xrandr Xrender Xss Xxf86vm)
|
||||
FindLibraryAndSONAME("${_LIB}")
|
||||
endforeach()
|
||||
|
||||
|
@ -433,9 +418,11 @@ macro(CheckX11)
|
|||
check_include_file(X11/extensions/Xinerama.h HAVE_XINERAMA_H)
|
||||
check_include_file(X11/extensions/XInput2.h HAVE_XINPUT2_H)
|
||||
check_include_file(X11/extensions/Xrandr.h HAVE_XRANDR_H)
|
||||
check_include_file(X11/extensions/Xfixes.h HAVE_XFIXES_H)
|
||||
check_include_file(X11/extensions/Xrender.h HAVE_XRENDER_H)
|
||||
check_include_file(X11/extensions/scrnsaver.h HAVE_XSS_H)
|
||||
check_include_file(X11/extensions/shape.h HAVE_XSHAPE_H)
|
||||
check_include_files("X11/Xlib.h;X11/extensions/Xdbe.h" HAVE_XDBE_H)
|
||||
check_include_files("X11/Xlib.h;X11/extensions/xf86vmode.h" HAVE_XF86VM_H)
|
||||
check_include_files("X11/Xlib.h;X11/Xproto.h;X11/extensions/Xext.h" HAVE_XEXT_H)
|
||||
|
||||
|
@ -444,15 +431,16 @@ macro(CheckX11)
|
|||
message_error("Missing Xext.h, maybe you need to install the libxext-dev package?")
|
||||
endif()
|
||||
|
||||
set(HAVE_VIDEO_X11 TRUE)
|
||||
set(HAVE_X11 TRUE)
|
||||
set(HAVE_SDL_VIDEO TRUE)
|
||||
|
||||
file(GLOB X11_SOURCES ${SDL2_SOURCE_DIR}/src/video/x11/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${X11_SOURCES})
|
||||
set(SDL_VIDEO_DRIVER_X11 1)
|
||||
|
||||
# !!! FIXME: why is this disabled for Apple?
|
||||
if(APPLE)
|
||||
set(X11_SHARED OFF)
|
||||
set(SDL_X11_SHARED OFF)
|
||||
endif()
|
||||
|
||||
check_symbol_exists(shmat "sys/shm.h" HAVE_SHMAT)
|
||||
|
@ -462,13 +450,12 @@ macro(CheckX11)
|
|||
list(APPEND EXTRA_LIBS ipc)
|
||||
endif()
|
||||
if(NOT HAVE_SHMAT)
|
||||
add_definitions(-DNO_SHARED_MEMORY)
|
||||
list(APPEND EXTRA_CFLAGS "-DNO_SHARED_MEMORY")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(X11_SHARED)
|
||||
if(NOT HAVE_DLOPEN)
|
||||
if(SDL_X11_SHARED)
|
||||
if(NOT HAVE_SDL_LOADSO)
|
||||
message_warn("You must have SDL_LoadObject() support for dynamic X11 loading")
|
||||
set(HAVE_X11_SHARED FALSE)
|
||||
else()
|
||||
|
@ -483,16 +470,6 @@ macro(CheckX11)
|
|||
endif()
|
||||
|
||||
set(CMAKE_REQUIRED_LIBRARIES ${X11_LIB} ${X11_LIB})
|
||||
check_c_source_compiles("
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xproto.h>
|
||||
#include <X11/extensions/Xext.h>
|
||||
#include <X11/extensions/extutil.h>
|
||||
extern XExtDisplayInfo* XextAddDisplay(XExtensionInfo* a,Display* b,_Xconst char* c,XExtensionHooks* d,int e,XPointer f);
|
||||
int main(int argc, char **argv) {}" HAVE_CONST_XEXT_ADDDISPLAY)
|
||||
if(HAVE_CONST_XEXT_ADDDISPLAY)
|
||||
set(SDL_VIDEO_DRIVER_X11_CONST_PARAM_XEXTADDDISPLAY 1)
|
||||
endif()
|
||||
|
||||
check_c_source_compiles("
|
||||
#include <X11/Xlib.h>
|
||||
|
@ -509,8 +486,8 @@ macro(CheckX11)
|
|||
|
||||
check_symbol_exists(XkbKeycodeToKeysym "X11/Xlib.h;X11/XKBlib.h" SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM)
|
||||
|
||||
if(VIDEO_X11_XCURSOR AND HAVE_XCURSOR_H)
|
||||
set(HAVE_VIDEO_X11_XCURSOR TRUE)
|
||||
if(SDL_X11_XCURSOR AND HAVE_XCURSOR_H)
|
||||
set(HAVE_X11_XCURSOR TRUE)
|
||||
if(HAVE_X11_SHARED AND XCURSOR_LIB)
|
||||
set(SDL_VIDEO_DRIVER_X11_DYNAMIC_XCURSOR "\"${XCURSOR_LIB_SONAME}\"")
|
||||
else()
|
||||
|
@ -519,8 +496,13 @@ macro(CheckX11)
|
|||
set(SDL_VIDEO_DRIVER_X11_XCURSOR 1)
|
||||
endif()
|
||||
|
||||
if(VIDEO_X11_XINERAMA AND HAVE_XINERAMA_H)
|
||||
set(HAVE_VIDEO_X11_XINERAMA TRUE)
|
||||
if(SDL_X11_XDBE AND HAVE_XDBE_H)
|
||||
set(HAVE_X11_XDBE TRUE)
|
||||
set(SDL_VIDEO_DRIVER_X11_XDBE 1)
|
||||
endif()
|
||||
|
||||
if(SDL_X11_XINERAMA AND HAVE_XINERAMA_H)
|
||||
set(HAVE_X11_XINERAMA TRUE)
|
||||
if(HAVE_X11_SHARED AND XINERAMA_LIB)
|
||||
set(SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA "\"${XINERAMA_LIB_SONAME}\"")
|
||||
else()
|
||||
|
@ -529,8 +511,8 @@ macro(CheckX11)
|
|||
set(SDL_VIDEO_DRIVER_X11_XINERAMA 1)
|
||||
endif()
|
||||
|
||||
if(VIDEO_X11_XINPUT AND HAVE_XINPUT2_H)
|
||||
set(HAVE_VIDEO_X11_XINPUT TRUE)
|
||||
if(SDL_X11_XINPUT AND HAVE_XINPUT2_H)
|
||||
set(HAVE_X11_XINPUT TRUE)
|
||||
if(HAVE_X11_SHARED AND XI_LIB)
|
||||
set(SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2 "\"${XI_LIB_SONAME}\"")
|
||||
else()
|
||||
|
@ -555,45 +537,56 @@ macro(CheckX11)
|
|||
endif()
|
||||
endif()
|
||||
|
||||
if(VIDEO_X11_XRANDR AND HAVE_XRANDR_H)
|
||||
# check along with XInput2.h because we use Xfixes with XIBarrierReleasePointer
|
||||
if(SDL_X11_XFIXES AND HAVE_XFIXES_H AND HAVE_XINPUT2_H)
|
||||
if(HAVE_X11_SHARED AND XFIXES_LIB)
|
||||
set(SDL_VIDEO_DRIVER_X11_DYNAMIC_XFIXES "\"${XFIXES_LIB_SONAME}\"")
|
||||
else()
|
||||
list(APPEND EXTRA_LIBS ${XFIXES_LIB})
|
||||
endif()
|
||||
set(SDL_VIDEO_DRIVER_X11_XFIXES 1)
|
||||
set(HAVE_X11_XFIXES TRUE)
|
||||
endif()
|
||||
|
||||
if(SDL_X11_XRANDR AND HAVE_XRANDR_H)
|
||||
if(HAVE_X11_SHARED AND XRANDR_LIB)
|
||||
set(SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR "\"${XRANDR_LIB_SONAME}\"")
|
||||
else()
|
||||
list(APPEND EXTRA_LIBS ${XRANDR_LIB})
|
||||
endif()
|
||||
set(SDL_VIDEO_DRIVER_X11_XRANDR 1)
|
||||
set(HAVE_VIDEO_X11_XRANDR TRUE)
|
||||
set(HAVE_X11_XRANDR TRUE)
|
||||
endif()
|
||||
|
||||
if(VIDEO_X11_XSCRNSAVER AND HAVE_XSS_H)
|
||||
if(SDL_X11_XSCRNSAVER AND HAVE_XSS_H)
|
||||
if(HAVE_X11_SHARED AND XSS_LIB)
|
||||
set(SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS "\"${XSS_LIB_SONAME}\"")
|
||||
else()
|
||||
list(APPEND EXTRA_LIBS ${XSS_LIB})
|
||||
endif()
|
||||
set(SDL_VIDEO_DRIVER_X11_XSCRNSAVER 1)
|
||||
set(HAVE_VIDEO_X11_XSCRNSAVER TRUE)
|
||||
set(HAVE_X11_XSCRNSAVER TRUE)
|
||||
endif()
|
||||
|
||||
if(VIDEO_X11_XSHAPE AND HAVE_XSHAPE_H)
|
||||
if(SDL_X11_XSHAPE AND HAVE_XSHAPE_H)
|
||||
set(SDL_VIDEO_DRIVER_X11_XSHAPE 1)
|
||||
set(HAVE_VIDEO_X11_XSHAPE TRUE)
|
||||
set(HAVE_X11_XSHAPE TRUE)
|
||||
endif()
|
||||
|
||||
if(VIDEO_X11_XVM AND HAVE_XF86VM_H)
|
||||
if(SDL_X11_XVM AND HAVE_XF86VM_H)
|
||||
if(HAVE_X11_SHARED AND XXF86VM_LIB)
|
||||
set(SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE "\"${XXF86VM_LIB_SONAME}\"")
|
||||
else()
|
||||
list(APPEND EXTRA_LIBS ${XXF86VM_LIB})
|
||||
endif()
|
||||
set(SDL_VIDEO_DRIVER_X11_XVIDMODE 1)
|
||||
set(HAVE_VIDEO_X11_XVM TRUE)
|
||||
set(HAVE_X11_XVM TRUE)
|
||||
endif()
|
||||
|
||||
set(CMAKE_REQUIRED_LIBRARIES)
|
||||
endif()
|
||||
endif()
|
||||
if(NOT HAVE_VIDEO_X11)
|
||||
if(NOT HAVE_X11)
|
||||
# Prevent Mesa from including X11 headers
|
||||
list(APPEND EXTRA_CFLAGS "-DMESA_EGL_NO_X11_HEADERS -DEGL_NO_X11")
|
||||
endif()
|
||||
|
@ -624,41 +617,39 @@ endmacro()
|
|||
# - EGL
|
||||
# - PkgCheckModules
|
||||
# Optional:
|
||||
# - WAYLAND_SHARED opt
|
||||
# - HAVE_DLOPEN opt
|
||||
# - SDL_WAYLAND_SHARED opt
|
||||
# - HAVE_SDL_LOADSO opt
|
||||
macro(CheckWayland)
|
||||
if(VIDEO_WAYLAND)
|
||||
pkg_check_modules(WAYLAND wayland-client wayland-scanner wayland-egl wayland-cursor egl xkbcommon)
|
||||
pkg_check_modules(WAYLAND_SCANNER_1_15 "wayland-scanner>=1.15")
|
||||
|
||||
if(WAYLAND_FOUND AND HAVE_VIDEO_OPENGL_EGL)
|
||||
execute_process(
|
||||
COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=wayland_scanner wayland-scanner
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
|
||||
RESULT_VARIABLE WAYLAND_SCANNER_RC
|
||||
OUTPUT_VARIABLE WAYLAND_SCANNER
|
||||
ERROR_QUIET
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
if(NOT WAYLAND_SCANNER_RC EQUAL 0)
|
||||
set(WAYLAND_FOUND FALSE)
|
||||
endif()
|
||||
endif()
|
||||
if(SDL_WAYLAND)
|
||||
pkg_check_modules(WAYLAND wayland-client wayland-egl wayland-cursor egl "xkbcommon>=0.5.0")
|
||||
|
||||
if(WAYLAND_FOUND)
|
||||
find_program(WAYLAND_SCANNER NAMES wayland-scanner REQUIRED)
|
||||
execute_process(
|
||||
COMMAND ${WAYLAND_SCANNER} --version
|
||||
RESULT_VARIABLE WAYLAND_SCANNER_VERSION_RC
|
||||
ERROR_VARIABLE WAYLAND_SCANNER_VERSION
|
||||
ERROR_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
if(NOT WAYLAND_SCANNER_VERSION_RC EQUAL 0)
|
||||
message(FATAL "Failed to get wayland-scanner version")
|
||||
set(WAYLAND_FOUND FALSE)
|
||||
endif()
|
||||
string(REPLACE "wayland-scanner " "" WAYLAND_SCANNER_VERSION ${WAYLAND_SCANNER_VERSION})
|
||||
|
||||
string(COMPARE GREATER_EQUAL ${WAYLAND_SCANNER_VERSION} "1.15.0" WAYLAND_SCANNER_1_15_FOUND)
|
||||
if(WAYLAND_SCANNER_1_15_FOUND)
|
||||
set(WAYLAND_SCANNER_CODE_MODE "private-code")
|
||||
else()
|
||||
set(WAYLAND_SCANNER_CODE_MODE "code")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
link_directories(
|
||||
${WAYLAND_LIBRARY_DIRS}
|
||||
)
|
||||
include_directories(
|
||||
${WAYLAND_INCLUDE_DIRS}
|
||||
)
|
||||
set(HAVE_VIDEO_WAYLAND TRUE)
|
||||
if(WAYLAND_FOUND)
|
||||
target_link_directories(sdl-build-options INTERFACE "${WAYLAND_LIBRARY_DIRS}")
|
||||
target_include_directories(sdl-build-options INTERFACE "${WAYLAND_INCLUDE_DIRS}")
|
||||
|
||||
set(HAVE_WAYLAND TRUE)
|
||||
set(HAVE_SDL_VIDEO TRUE)
|
||||
|
||||
file(GLOB WAYLAND_SOURCES ${SDL2_SOURCE_DIR}/src/video/wayland/*.c)
|
||||
|
@ -666,7 +657,7 @@ macro(CheckWayland)
|
|||
|
||||
# We have to generate some protocol interface code for some unstable Wayland features.
|
||||
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/wayland-generated-protocols")
|
||||
include_directories("${CMAKE_CURRENT_BINARY_DIR}/wayland-generated-protocols")
|
||||
target_include_directories(sdl-build-options INTERFACE "${CMAKE_CURRENT_BINARY_DIR}/wayland-generated-protocols")
|
||||
|
||||
file(GLOB WAYLAND_PROTOCOLS_XML RELATIVE "${SDL2_SOURCE_DIR}/wayland-protocols/" "${SDL2_SOURCE_DIR}/wayland-protocols/*.xml")
|
||||
foreach(_XML ${WAYLAND_PROTOCOLS_XML})
|
||||
|
@ -674,15 +665,15 @@ macro(CheckWayland)
|
|||
WaylandProtocolGen("${WAYLAND_SCANNER}" "${WAYLAND_SCANNER_CODE_MODE}" "${SDL2_SOURCE_DIR}/wayland-protocols/${_XML}" "${_PROTL}")
|
||||
endforeach()
|
||||
|
||||
if(VIDEO_WAYLAND_QT_TOUCH)
|
||||
set(HAVE_VIDEO_WAYLAND_QT_TOUCH TRUE)
|
||||
if(SDL_WAYLAND_QT_TOUCH)
|
||||
set(HAVE_WAYLAND_QT_TOUCH TRUE)
|
||||
set(SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH 1)
|
||||
endif()
|
||||
|
||||
if(WAYLAND_SHARED)
|
||||
if(NOT HAVE_DLOPEN)
|
||||
if(SDL_WAYLAND_SHARED AND NOT HAVE_SDL_LOADSO)
|
||||
message_warn("You must have SDL_LoadObject() support for dynamic Wayland loading")
|
||||
else()
|
||||
endif()
|
||||
if(SDL_WAYLAND_SHARED AND HAVE_SDL_LOADSO)
|
||||
FindLibraryAndSONAME(wayland-client)
|
||||
FindLibraryAndSONAME(wayland-egl)
|
||||
FindLibraryAndSONAME(wayland-cursor)
|
||||
|
@ -692,26 +683,24 @@ macro(CheckWayland)
|
|||
set(SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_CURSOR "\"${WAYLAND_CURSOR_LIB_SONAME}\"")
|
||||
set(SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON "\"${XKBCOMMON_LIB_SONAME}\"")
|
||||
set(HAVE_WAYLAND_SHARED TRUE)
|
||||
endif()
|
||||
else()
|
||||
set(EXTRA_LIBS ${WAYLAND_LIBRARIES} ${EXTRA_LIBS})
|
||||
endif()
|
||||
|
||||
if(WAYLAND_LIBDECOR)
|
||||
if(SDL_WAYLAND_LIBDECOR)
|
||||
pkg_check_modules(LIBDECOR libdecor-0)
|
||||
if(LIBDECOR_FOUND)
|
||||
set(HAVE_WAYLAND_LIBDECOR TRUE)
|
||||
set(HAVE_LIBDECOR_H 1)
|
||||
link_directories(${LIBDECOR_LIBRARY_DIRS})
|
||||
include_directories(${LIBDECOR_INCLUDE_DIRS})
|
||||
if(LIBDECOR_SHARED)
|
||||
if(NOT HAVE_DLOPEN)
|
||||
target_link_directories(sdl-build-options INTERFACE "${LIBDECOR_LIBRARY_DIRS}")
|
||||
target_include_directories(sdl-build-options INTERFACE "${LIBDECOR_INCLUDE_DIRS}")
|
||||
if(SDL_WAYLAND_LIBDECOR_SHARED AND NOT HAVE_SDL_LOADSO)
|
||||
message_warn("You must have SDL_LoadObject() support for dynamic libdecor loading")
|
||||
else()
|
||||
endif()
|
||||
if(SDL_WAYLAND_LIBDECOR_SHARED AND HAVE_SDL_LOADSO)
|
||||
set(HAVE_LIBDECOR_SHARED TRUE)
|
||||
FindLibraryAndSONAME(decor-0)
|
||||
set(SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_LIBDECOR "\"${DECOR_0_LIB_SONAME}\"")
|
||||
endif()
|
||||
else()
|
||||
set(EXTRA_LIBS ${LIBDECOR_LIBRARIES} ${EXTRA_LIBS})
|
||||
endif()
|
||||
|
@ -727,11 +716,11 @@ endmacro()
|
|||
# - n/a
|
||||
#
|
||||
macro(CheckCOCOA)
|
||||
if(VIDEO_COCOA)
|
||||
if(SDL_COCOA)
|
||||
if(APPLE) # Apple always has Cocoa.
|
||||
set(HAVE_VIDEO_COCOA TRUE)
|
||||
set(HAVE_COCOA TRUE)
|
||||
endif()
|
||||
if(HAVE_VIDEO_COCOA)
|
||||
if(HAVE_COCOA)
|
||||
file(GLOB COCOA_SOURCES ${SDL2_SOURCE_DIR}/src/video/cocoa/*.m)
|
||||
set_source_files_properties(${COCOA_SOURCES} PROPERTIES LANGUAGE C)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${COCOA_SOURCES})
|
||||
|
@ -745,25 +734,24 @@ endmacro()
|
|||
# - PkgCheckModules
|
||||
# Optional:
|
||||
# - DIRECTFB_SHARED opt
|
||||
# - HAVE_DLOPEN opt
|
||||
# - HAVE_SDL_LOADSO opt
|
||||
macro(CheckDirectFB)
|
||||
if(VIDEO_DIRECTFB)
|
||||
if(SDL_DIRECTFB)
|
||||
pkg_check_modules(PKG_DIRECTFB directfb>=1.0.0)
|
||||
if(PKG_DIRECTFB_FOUND)
|
||||
set(HAVE_VIDEO_DIRECTFB TRUE)
|
||||
set(HAVE_DIRECTFB TRUE)
|
||||
file(GLOB DIRECTFB_SOURCES ${SDL2_SOURCE_DIR}/src/video/directfb/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${DIRECTFB_SOURCES})
|
||||
set(SDL_VIDEO_DRIVER_DIRECTFB 1)
|
||||
set(SDL_VIDEO_RENDER_DIRECTFB 1)
|
||||
list(APPEND EXTRA_CFLAGS ${PKG_DIRECTFB_CFLAGS})
|
||||
if(DIRECTFB_SHARED)
|
||||
if(NOT HAVE_DLOPEN)
|
||||
if(SDL_DIRECTFB_SHARED AND NOT HAVE_SDL_LOADSO)
|
||||
message_warn("You must have SDL_LoadObject() support for dynamic DirectFB loading")
|
||||
else()
|
||||
endif()
|
||||
if(SDL_DIRECTFB_SHARED AND HAVE_SDL_LOADSO)
|
||||
FindLibraryAndSONAME("directfb")
|
||||
set(SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC "\"${DIRECTFB_LIB_SONAME}\"")
|
||||
set(HAVE_DIRECTFB_SHARED TRUE)
|
||||
endif()
|
||||
else()
|
||||
list(APPEND EXTRA_LDFLAGS ${PKG_DIRECTFB_LDFLAGS})
|
||||
endif()
|
||||
|
@ -775,41 +763,41 @@ endmacro()
|
|||
# Requires:
|
||||
# - n/a
|
||||
macro(CheckVivante)
|
||||
if(VIDEO_VIVANTE)
|
||||
if(SDL_VIVANTE)
|
||||
check_c_source_compiles("
|
||||
#include <gc_vdk.h>
|
||||
int main(int argc, char** argv) {}" HAVE_VIDEO_VIVANTE_VDK)
|
||||
int main(int argc, char** argv) {}" HAVE_VIVANTE_VDK)
|
||||
check_c_source_compiles("
|
||||
#define LINUX
|
||||
#define EGL_API_FB
|
||||
#include <EGL/eglvivante.h>
|
||||
int main(int argc, char** argv) {}" HAVE_VIDEO_VIVANTE_EGL_FB)
|
||||
if(HAVE_VIDEO_VIVANTE_VDK OR HAVE_VIDEO_VIVANTE_EGL_FB)
|
||||
set(HAVE_VIDEO_VIVANTE TRUE)
|
||||
int main(int argc, char** argv) {}" HAVE_VIVANTE_EGL_FB)
|
||||
if(HAVE_VIVANTE_VDK OR HAVE_VIVANTE_EGL_FB)
|
||||
set(HAVE_VIVANTE TRUE)
|
||||
set(HAVE_SDL_VIDEO TRUE)
|
||||
|
||||
file(GLOB VIVANTE_SOURCES ${SDL2_SOURCE_DIR}/src/video/vivante/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${VIVANTE_SOURCES})
|
||||
set(SDL_VIDEO_DRIVER_VIVANTE 1)
|
||||
if(HAVE_VIDEO_VIVANTE_VDK)
|
||||
if(HAVE_VIVANTE_VDK)
|
||||
set(SDL_VIDEO_DRIVER_VIVANTE_VDK 1)
|
||||
list(APPEND EXTRA_LIBS VDK VIVANTE)
|
||||
else()
|
||||
set(SDL_CFLAGS "${SDL_CFLAGS} -DLINUX -DEGL_API_FB")
|
||||
list(APPEND EXTRA_LIBS EGL)
|
||||
endif(HAVE_VIDEO_VIVANTE_VDK)
|
||||
endif(HAVE_VIDEO_VIVANTE_VDK OR HAVE_VIDEO_VIVANTE_EGL_FB)
|
||||
endif(VIDEO_VIVANTE)
|
||||
endmacro(CheckVivante)
|
||||
endif(HAVE_VIVANTE_VDK)
|
||||
endif()
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
# Requires:
|
||||
# - nada
|
||||
macro(CheckGLX)
|
||||
if(VIDEO_OPENGL)
|
||||
if(SDL_OPENGL)
|
||||
check_c_source_compiles("
|
||||
#include <GL/glx.h>
|
||||
int main(int argc, char** argv) {}" HAVE_VIDEO_OPENGL_GLX)
|
||||
if(HAVE_VIDEO_OPENGL_GLX)
|
||||
int main(int argc, char** argv) {}" HAVE_OPENGL_GLX)
|
||||
if(HAVE_OPENGL_GLX)
|
||||
set(SDL_VIDEO_OPENGL_GLX 1)
|
||||
endif()
|
||||
endif()
|
||||
|
@ -818,7 +806,7 @@ endmacro()
|
|||
# Requires:
|
||||
# - PkgCheckModules
|
||||
macro(CheckEGL)
|
||||
if (VIDEO_OPENGL OR VIDEO_OPENGLES)
|
||||
if (SDL_OPENGL OR SDL_OPENGLES)
|
||||
pkg_check_modules(EGL egl)
|
||||
string(REPLACE "-D_THREAD_SAFE;" "-D_THREAD_SAFE=1;" EGL_CFLAGS "${EGL_CFLAGS}")
|
||||
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} ${EGL_CFLAGS}")
|
||||
|
@ -828,8 +816,8 @@ macro(CheckEGL)
|
|||
#define EGL_NO_X11
|
||||
#include <EGL/egl.h>
|
||||
#include <EGL/eglext.h>
|
||||
int main (int argc, char** argv) {}" HAVE_VIDEO_OPENGL_EGL)
|
||||
if(HAVE_VIDEO_OPENGL_EGL)
|
||||
int main (int argc, char** argv) {}" HAVE_OPENGL_EGL)
|
||||
if(HAVE_OPENGL_EGL)
|
||||
set(SDL_VIDEO_OPENGL_EGL 1)
|
||||
endif()
|
||||
endif()
|
||||
|
@ -838,12 +826,12 @@ endmacro()
|
|||
# Requires:
|
||||
# - nada
|
||||
macro(CheckOpenGL)
|
||||
if(VIDEO_OPENGL)
|
||||
if(SDL_OPENGL)
|
||||
check_c_source_compiles("
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glext.h>
|
||||
int main(int argc, char** argv) {}" HAVE_VIDEO_OPENGL)
|
||||
if(HAVE_VIDEO_OPENGL)
|
||||
int main(int argc, char** argv) {}" HAVE_OPENGL)
|
||||
if(HAVE_OPENGL)
|
||||
set(SDL_VIDEO_OPENGL 1)
|
||||
set(SDL_VIDEO_RENDER_OGL 1)
|
||||
endif()
|
||||
|
@ -853,22 +841,22 @@ endmacro()
|
|||
# Requires:
|
||||
# - nada
|
||||
macro(CheckOpenGLES)
|
||||
if(VIDEO_OPENGLES)
|
||||
if(SDL_OPENGLES)
|
||||
check_c_source_compiles("
|
||||
#include <GLES/gl.h>
|
||||
#include <GLES/glext.h>
|
||||
int main (int argc, char** argv) {}" HAVE_VIDEO_OPENGLES_V1)
|
||||
if(HAVE_VIDEO_OPENGLES_V1)
|
||||
set(HAVE_VIDEO_OPENGLES TRUE)
|
||||
int main (int argc, char** argv) {}" HAVE_OPENGLES_V1)
|
||||
if(HAVE_OPENGLES_V1)
|
||||
set(HAVE_OPENGLES TRUE)
|
||||
set(SDL_VIDEO_OPENGL_ES 1)
|
||||
set(SDL_VIDEO_RENDER_OGL_ES 1)
|
||||
endif()
|
||||
check_c_source_compiles("
|
||||
#include <GLES2/gl2.h>
|
||||
#include <GLES2/gl2ext.h>
|
||||
int main (int argc, char** argv) {}" HAVE_VIDEO_OPENGLES_V2)
|
||||
if(HAVE_VIDEO_OPENGLES_V2)
|
||||
set(HAVE_VIDEO_OPENGLES TRUE)
|
||||
int main (int argc, char** argv) {}" HAVE_OPENGLES_V2)
|
||||
if(HAVE_OPENGLES_V2)
|
||||
set(HAVE_OPENGLES TRUE)
|
||||
set(SDL_VIDEO_OPENGL_ES2 1)
|
||||
set(SDL_VIDEO_RENDER_OGL_ES2 1)
|
||||
endif()
|
||||
|
@ -883,7 +871,7 @@ endmacro()
|
|||
# PTHREAD_CFLAGS
|
||||
# PTHREAD_LIBS
|
||||
macro(CheckPTHREAD)
|
||||
if(PTHREADS)
|
||||
if(SDL_THREADS AND SDL_PTHREADS)
|
||||
if(ANDROID)
|
||||
# the android libc provides built-in support for pthreads, so no
|
||||
# additional linking or compile flags are necessary
|
||||
|
@ -971,7 +959,7 @@ macro(CheckPTHREAD)
|
|||
endif()
|
||||
endif()
|
||||
|
||||
if(PTHREADS_SEM)
|
||||
if(SDL_PTHREADS_SEM)
|
||||
check_c_source_compiles("#include <pthread.h>
|
||||
#include <semaphore.h>
|
||||
int main(int argc, char **argv) { return 0; }" HAVE_PTHREADS_SEM)
|
||||
|
@ -989,7 +977,13 @@ macro(CheckPTHREAD)
|
|||
check_include_files("pthread.h" HAVE_PTHREAD_H)
|
||||
check_include_files("pthread_np.h" HAVE_PTHREAD_NP_H)
|
||||
if (HAVE_PTHREAD_H)
|
||||
check_symbol_exists(pthread_setname_np "pthread.h" HAVE_PTHREAD_SETNAME_NP)
|
||||
check_c_source_compiles("
|
||||
#define _GNU_SOURCE 1
|
||||
#include <pthread.h>
|
||||
int main(int argc, char **argv) {
|
||||
pthread_setname_np(pthread_self(), \"\");
|
||||
return 0;
|
||||
}" HAVE_PTHREAD_SETNAME_NP)
|
||||
if (HAVE_PTHREAD_NP_H)
|
||||
check_symbol_exists(pthread_set_name_np "pthread.h;pthread_np.h" HAVE_PTHREAD_SET_NAME_NP)
|
||||
endif()
|
||||
|
@ -1154,48 +1148,55 @@ macro(CheckUSBHID)
|
|||
endif()
|
||||
endmacro()
|
||||
|
||||
# Check for HIDAPI joystick drivers. This is currently a Unix thing, not Windows or macOS!
|
||||
# Check for HIDAPI support
|
||||
macro(CheckHIDAPI)
|
||||
if(HIDAPI)
|
||||
if(HIDAPI_SKIP_LIBUSB)
|
||||
set(HAVE_HIDAPI TRUE)
|
||||
else()
|
||||
set(HAVE_HIDAPI FALSE)
|
||||
if(NOT HIDAPI_SKIP_LIBUSB)
|
||||
set(HAVE_LIBUSB FALSE)
|
||||
pkg_check_modules(LIBUSB libusb-1.0)
|
||||
if (LIBUSB_FOUND)
|
||||
check_include_file(libusb.h HAVE_LIBUSB_H ${LIBUSB_CFLAGS})
|
||||
if (HAVE_LIBUSB_H)
|
||||
set(HAVE_HIDAPI TRUE)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(HAVE_HIDAPI)
|
||||
set(SDL_JOYSTICK_HIDAPI 1)
|
||||
set(HAVE_SDL_JOYSTICK TRUE)
|
||||
file(GLOB HIDAPI_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/hidapi/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${HIDAPI_SOURCES})
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${LIBUSB_CFLAGS} \"-I${SDL2_SOURCE_DIR}/src/hidapi/hidapi\"")
|
||||
if(NOT HIDAPI_SKIP_LIBUSB)
|
||||
if(HAVE_LIBUSB_H)
|
||||
set(HAVE_LIBUSB TRUE)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${LIBUSB_CFLAGS}")
|
||||
if(HIDAPI_ONLY_LIBUSB)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${SDL2_SOURCE_DIR}/src/hidapi/libusb/hid.c)
|
||||
list(APPEND EXTRA_LIBS ${LIBUSB_LIBS})
|
||||
else()
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${SDL2_SOURCE_DIR}/src/hidapi/SDL_hidapi.c)
|
||||
# libusb is loaded dynamically, so don't add it to EXTRA_LIBS
|
||||
FindLibraryAndSONAME("usb-1.0")
|
||||
set(SDL_LIBUSB_DYNAMIC "\"${USB_LIB_SONAME}\"")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
if(HIDAPI_ONLY_LIBUSB AND NOT HAVE_LIBUSB)
|
||||
set(HAVE_HIDAPI FALSE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(HAVE_HIDAPI)
|
||||
if(ANDROID)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${SDL2_SOURCE_DIR}/src/hidapi/android/hid.cpp)
|
||||
endif()
|
||||
if(IOS OR TVOS)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${SDL2_SOURCE_DIR}/src/hidapi/ios/hid.m)
|
||||
set(SDL_FRAMEWORK_COREBLUETOOTH 1)
|
||||
endif()
|
||||
set(HAVE_SDL_HIDAPI TRUE)
|
||||
|
||||
if(SDL_JOYSTICK AND SDL_HIDAPI_JOYSTICK)
|
||||
set(SDL_JOYSTICK_HIDAPI 1)
|
||||
set(HAVE_SDL_JOYSTICK TRUE)
|
||||
set(HAVE_HIDAPI_JOYSTICK TRUE)
|
||||
file(GLOB HIDAPI_JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/hidapi/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${HIDAPI_JOYSTICK_SOURCES})
|
||||
endif()
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
|
||||
# Requires:
|
||||
# - n/a
|
||||
macro(CheckRPI)
|
||||
if(VIDEO_RPI)
|
||||
if(SDL_RPI)
|
||||
pkg_check_modules(VIDEO_RPI bcm_host brcmegl)
|
||||
if (NOT VIDEO_RPI_FOUND)
|
||||
set(VIDEO_RPI_INCLUDE_DIRS "/opt/vc/include" "/opt/vc/include/interface/vcos/pthreads" "/opt/vc/include/interface/vmcs_host/linux/" )
|
||||
|
@ -1211,39 +1212,38 @@ macro(CheckRPI)
|
|||
set(CMAKE_REQUIRED_LIBRARIES "${VIDEO_RPI_LIBRARIES}")
|
||||
check_c_source_compiles("
|
||||
#include <bcm_host.h>
|
||||
int main(int argc, char **argv) {}" HAVE_VIDEO_RPI)
|
||||
int main(int argc, char **argv) {}" HAVE_RPI)
|
||||
set(CMAKE_REQUIRED_FLAGS "${ORIG_CMAKE_REQUIRED_FLAGS}")
|
||||
set(CMAKE_REQUIRED_LIBRARIES)
|
||||
|
||||
if(SDL_VIDEO AND HAVE_VIDEO_RPI)
|
||||
if(SDL_VIDEO AND HAVE_RPI)
|
||||
set(HAVE_SDL_VIDEO TRUE)
|
||||
set(SDL_VIDEO_DRIVER_RPI 1)
|
||||
file(GLOB VIDEO_RPI_SOURCES ${SDL2_SOURCE_DIR}/src/video/raspberry/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${VIDEO_RPI_SOURCES})
|
||||
list(APPEND EXTRA_LIBS ${VIDEO_RPI_LIBRARIES})
|
||||
# !!! FIXME: shouldn't be using CMAKE_C_FLAGS, right?
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${VIDEO_RPI_INCLUDE_FLAGS} ${VIDEO_RPI_LIBRARY_FLAGS}")
|
||||
list(APPEND EXTRA_LDFLAGS ${VIDEO_RPI_LDFLAGS})
|
||||
endif(SDL_VIDEO AND HAVE_VIDEO_RPI)
|
||||
endif(VIDEO_RPI)
|
||||
endmacro(CheckRPI)
|
||||
endif()
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
# Requires:
|
||||
# - EGL
|
||||
# - PkgCheckModules
|
||||
# Optional:
|
||||
# - KMSDRM_SHARED opt
|
||||
# - HAVE_DLOPEN opt
|
||||
# - SDL_KMSDRM_SHARED opt
|
||||
# - HAVE_SDL_LOADSO opt
|
||||
macro(CheckKMSDRM)
|
||||
if(VIDEO_KMSDRM)
|
||||
if(SDL_KMSDRM)
|
||||
pkg_check_modules(KMSDRM libdrm gbm egl)
|
||||
if(KMSDRM_FOUND AND HAVE_VIDEO_OPENGL_EGL)
|
||||
if(KMSDRM_FOUND AND HAVE_OPENGL_EGL)
|
||||
link_directories(
|
||||
${KMSDRM_LIBRARY_DIRS}
|
||||
)
|
||||
include_directories(
|
||||
${KMSDRM_INCLUDE_DIRS}
|
||||
)
|
||||
set(HAVE_VIDEO_KMSDRM TRUE)
|
||||
target_include_directories(sdl-build-options INTERFACE "${KMSDRM_INCLUDE_DIRS}")
|
||||
set(HAVE_KMSDRM TRUE)
|
||||
set(HAVE_SDL_VIDEO TRUE)
|
||||
|
||||
file(GLOB KMSDRM_SOURCES ${SDL2_SOURCE_DIR}/src/video/kmsdrm/*.c)
|
||||
|
@ -1253,16 +1253,15 @@ macro(CheckKMSDRM)
|
|||
|
||||
set(SDL_VIDEO_DRIVER_KMSDRM 1)
|
||||
|
||||
if(KMSDRM_SHARED)
|
||||
if(NOT HAVE_DLOPEN)
|
||||
if(SDL_KMSDRM_SHARED AND NOT HAVE_SDL_LOADSO)
|
||||
message_warn("You must have SDL_LoadObject() support for dynamic KMS/DRM loading")
|
||||
else()
|
||||
endif()
|
||||
if(SDL_KMSDRM_SHARED AND HAVE_SDL_LOADSO)
|
||||
FindLibraryAndSONAME(drm)
|
||||
FindLibraryAndSONAME(gbm)
|
||||
set(SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC "\"${DRM_LIB_SONAME}\"")
|
||||
set(SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC_GBM "\"${GBM_LIB_SONAME}\"")
|
||||
set(HAVE_KMSDRM_SHARED TRUE)
|
||||
endif()
|
||||
else()
|
||||
set(EXTRA_LIBS ${KMSDRM_LIBRARIES} ${EXTRA_LIBS})
|
||||
endif()
|
||||
|
|
420
externals/SDL/configure
vendored
420
externals/SDL/configure
vendored
|
@ -813,6 +813,7 @@ enable_render
|
|||
enable_events
|
||||
enable_joystick
|
||||
enable_haptic
|
||||
enable_hidapi
|
||||
enable_sensor
|
||||
enable_power
|
||||
enable_filesystem
|
||||
|
@ -873,6 +874,7 @@ enable_video_x11_xcursor
|
|||
enable_video_x11_xdbe
|
||||
enable_video_x11_xinerama
|
||||
enable_video_x11_xinput
|
||||
enable_video_x11_xfixes
|
||||
enable_video_x11_xrandr
|
||||
enable_video_x11_scrnsaver
|
||||
enable_video_x11_xshape
|
||||
|
@ -886,6 +888,7 @@ enable_directfb_shared
|
|||
enable_video_kmsdrm
|
||||
enable_kmsdrm_shared
|
||||
enable_video_dummy
|
||||
enable_video_offscreen
|
||||
enable_video_opengl
|
||||
enable_video_opengles
|
||||
enable_video_opengles1
|
||||
|
@ -902,8 +905,7 @@ enable_pthread_sem
|
|||
enable_directx
|
||||
enable_xinput
|
||||
enable_wasapi
|
||||
enable_sdl_dlopen
|
||||
enable_hidapi
|
||||
enable_hidapi_joystick
|
||||
enable_hidapi_libusb
|
||||
enable_clock_gettime
|
||||
enable_rpath
|
||||
|
@ -1587,6 +1589,7 @@ Optional Features:
|
|||
--enable-joystick Enable the joystick subsystem [default=yes]
|
||||
--enable-haptic Enable the haptic (force feedback) subsystem
|
||||
[default=yes]
|
||||
--enable-hidapi Enable the HIDAPI 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]
|
||||
|
@ -1648,7 +1651,7 @@ Optional Features:
|
|||
[default=yes]
|
||||
--enable-libdecor-shared
|
||||
dynamically load libdecor [default=yes]
|
||||
--enable-video-rpi use Raspberry Pi video driver [default=yes]
|
||||
--enable-video-rpi use Raspberry Pi 2/3 video driver [default=yes]
|
||||
--enable-video-x11 use X11 video driver [default=yes]
|
||||
--enable-x11-shared dynamically load X11 support [default=maybe]
|
||||
--enable-video-x11-xcursor
|
||||
|
@ -1659,6 +1662,8 @@ Optional Features:
|
|||
--enable-video-x11-xinput
|
||||
enable X11 XInput extension for manymouse, tablets,
|
||||
etc [default=yes]
|
||||
--enable-video-x11-xfixes
|
||||
enable X11 Xfixes support [default=yes]
|
||||
--enable-video-x11-xrandr
|
||||
enable X11 Xrandr extension for fullscreen
|
||||
[default=yes]
|
||||
|
@ -1677,6 +1682,8 @@ Optional Features:
|
|||
--enable-video-kmsdrm use KMSDRM video driver [default=yes]
|
||||
--enable-kmsdrm-shared dynamically load kmsdrm support [default=yes]
|
||||
--enable-video-dummy use dummy video driver [default=yes]
|
||||
--enable-video-offscreen
|
||||
use offscreen video driver [default=no]
|
||||
--enable-video-opengl include OpenGL support [default=yes]
|
||||
--enable-video-opengles include OpenGL ES support [default=yes]
|
||||
--enable-video-opengles1
|
||||
|
@ -1696,8 +1703,8 @@ Optional Features:
|
|||
--enable-directx use DirectX for Windows audio/video [default=yes]
|
||||
--enable-xinput use Xinput for Windows [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
|
||||
--enable-hidapi-joystick
|
||||
use HIDAPI for low level joystick drivers
|
||||
[default=yes]
|
||||
--enable-hidapi-libusb use libusb for low level joystick drivers
|
||||
[default=maybe]
|
||||
|
@ -2840,9 +2847,9 @@ orig_CFLAGS="$CFLAGS"
|
|||
#
|
||||
SDL_MAJOR_VERSION=2
|
||||
SDL_MINOR_VERSION=0
|
||||
SDL_MICRO_VERSION=16
|
||||
SDL_MICRO_VERSION=18
|
||||
SDL_INTERFACE_AGE=0
|
||||
SDL_BINARY_AGE=16
|
||||
SDL_BINARY_AGE=18
|
||||
SDL_VERSION=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION.$SDL_MICRO_VERSION
|
||||
|
||||
|
||||
|
@ -16382,7 +16389,6 @@ case "$host" in
|
|||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
@ -16415,7 +16421,6 @@ case "$host" in
|
|||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
@ -16448,7 +16453,6 @@ case "$host" in
|
|||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
@ -16481,7 +16485,6 @@ case "$host" in
|
|||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
@ -17314,6 +17317,7 @@ SOURCES="$SOURCES $srcdir/src/dynapi/*.c"
|
|||
SOURCES="$SOURCES $srcdir/src/events/*.c"
|
||||
SOURCES="$SOURCES $srcdir/src/file/*.c"
|
||||
SOURCES="$SOURCES $srcdir/src/haptic/*.c"
|
||||
SOURCES="$SOURCES $srcdir/src/hidapi/*.c"
|
||||
SOURCES="$SOURCES $srcdir/src/joystick/*.c"
|
||||
SOURCES="$SOURCES $srcdir/src/libm/*.c"
|
||||
SOURCES="$SOURCES $srcdir/src/misc/*.c"
|
||||
|
@ -17428,6 +17432,20 @@ $as_echo "#define SDL_HAPTIC_DISABLED 1" >>confdefs.h
|
|||
else
|
||||
SUMMARY_modules="${SUMMARY_modules} haptic"
|
||||
fi
|
||||
# Check whether --enable-hidapi was given.
|
||||
if test "${enable_hidapi+set}" = set; then :
|
||||
enableval=$enable_hidapi;
|
||||
else
|
||||
enable_hidapi=yes
|
||||
fi
|
||||
|
||||
if test x$enable_hidapi != xyes; then
|
||||
|
||||
$as_echo "#define SDL_HIDAPI_DISABLED 1" >>confdefs.h
|
||||
|
||||
else
|
||||
SUMMARY_modules="${SUMMARY_modules} hidapi"
|
||||
fi
|
||||
# Check whether --enable-sensor was given.
|
||||
if test "${enable_sensor+set}" = set; then :
|
||||
enableval=$enable_sensor;
|
||||
|
@ -19899,7 +19917,7 @@ $as_echo_n "checking for Wayland support... " >&6; }
|
|||
video_wayland=no
|
||||
if test x$video_opengl_egl = xyes && \
|
||||
test x$video_opengles_v2 = xyes; then
|
||||
if $PKG_CONFIG --exists wayland-client wayland-scanner wayland-egl wayland-cursor egl xkbcommon ; then
|
||||
if $PKG_CONFIG --exists wayland-client wayland-scanner wayland-egl wayland-cursor egl 'xkbcommon >= 0.5.0'; then
|
||||
WAYLAND_CFLAGS=`$PKG_CONFIG --cflags wayland-client wayland-egl wayland-cursor xkbcommon`
|
||||
WAYLAND_LIBS=`$PKG_CONFIG --libs wayland-client wayland-egl wayland-cursor xkbcommon`
|
||||
WAYLAND_SCANNER=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`
|
||||
|
@ -20202,18 +20220,20 @@ fi
|
|||
# Add the Raspberry Pi compiler flags and libraries
|
||||
CFLAGS="$CFLAGS $RPI_CFLAGS"; LIBS="$LIBS $RPI_LIBS"
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Raspberry Pi" >&5
|
||||
$as_echo_n "checking for Raspberry Pi... " >&6; }
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Raspberry Pi 2/3" >&5
|
||||
$as_echo_n "checking for Raspberry Pi 2/3... " >&6; }
|
||||
have_video_rpi=no
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
#include <bcm_host.h>
|
||||
#include <EGL/eglplatform.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
EGL_DISPMANX_WINDOW_T window;
|
||||
bcm_host_init();
|
||||
|
||||
;
|
||||
|
@ -20997,6 +21017,7 @@ fi
|
|||
xcursor_lib='/opt/X11/lib/libXcursor.1.dylib'
|
||||
xinerama_lib='/opt/X11/lib/libXinerama.1.dylib'
|
||||
xinput_lib='/opt/X11/lib/libXi.6.dylib'
|
||||
xfixes_lib='/opt/X11/lib/libXfixes.3.dylib'
|
||||
xrandr_lib='/opt/X11/lib/libXrandr.2.dylib'
|
||||
xrender_lib='/opt/X11/lib/libXrender.1.dylib'
|
||||
xss_lib='/opt/X11/lib/libXss.1.dylib'
|
||||
|
@ -21008,6 +21029,7 @@ fi
|
|||
xcursor_lib='libXcursor.so'
|
||||
xinerama_lib='libXinerama.so'
|
||||
xinput_lib='libXi.so'
|
||||
xfixes_lib='libXfixes.so'
|
||||
xrandr_lib='libXrandr.so'
|
||||
xrender_lib='libXrender.so'
|
||||
xss_lib='libXss.so'
|
||||
|
@ -21019,6 +21041,7 @@ fi
|
|||
xcursor_lib=`find_lib "libXcursor.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`
|
||||
xinerama_lib=`find_lib "libXinerama.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`
|
||||
xinput_lib=`find_lib "libXi.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`
|
||||
xfixes_lib=`find_lib "libXfixes.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`
|
||||
xrandr_lib=`find_lib "libXrandr.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`
|
||||
xrender_lib=`find_lib "libXrender.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`
|
||||
xss_lib=`find_lib "libXss.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`
|
||||
|
@ -21089,38 +21112,6 @@ _ACEOF
|
|||
fi
|
||||
have_video=yes
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for const parameter to XextAddDisplay" >&5
|
||||
$as_echo_n "checking for const parameter to XextAddDisplay... " >&6; }
|
||||
have_const_param_XextAddDisplay=no
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xproto.h>
|
||||
#include <X11/extensions/Xext.h>
|
||||
#include <X11/extensions/extutil.h>
|
||||
extern XExtDisplayInfo* XextAddDisplay(XExtensionInfo* a,Display* b,_Xconst char* c,XExtensionHooks* d,int e,XPointer f);
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_compile "$LINENO"; then :
|
||||
|
||||
have_const_param_XextAddDisplay=yes
|
||||
|
||||
$as_echo "#define SDL_VIDEO_DRIVER_X11_CONST_PARAM_XEXTADDDISPLAY 1" >>confdefs.h
|
||||
|
||||
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_const_param_XextAddDisplay" >&5
|
||||
$as_echo "$have_const_param_XextAddDisplay" >&6; }
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XGenericEvent" >&5
|
||||
$as_echo_n "checking for XGenericEvent... " >&6; }
|
||||
have_XGenericEvent=no
|
||||
|
@ -21503,6 +21494,90 @@ 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 "$have_xinput2_multitouch" >&6; }
|
||||
fi
|
||||
# Check whether --enable-video-x11-xfixes was given.
|
||||
if test "${enable_video_x11_xfixes+set}" = set; then :
|
||||
enableval=$enable_video_x11_xfixes;
|
||||
else
|
||||
enable_video_x11_xfixes=yes
|
||||
fi
|
||||
|
||||
if test x$enable_video_x11_xfixes = xyes; then
|
||||
definitely_enable_video_x11_xfixes=no
|
||||
# check along with XInput2.h because we use Xfixes with XIBarrierReleasePointer
|
||||
ac_fn_c_check_header_compile "$LINENO" "X11/extensions/Xfixes.h" "ac_cv_header_X11_extensions_Xfixes_h" "#include <X11/Xlib.h>
|
||||
#include <X11/Xproto.h>
|
||||
#include <X11/extensions/XInput2.h>
|
||||
"
|
||||
if test "x$ac_cv_header_X11_extensions_Xfixes_h" = xyes; then :
|
||||
have_xfixes_h_hdr=yes
|
||||
else
|
||||
have_xfixes_h_hdr=no
|
||||
fi
|
||||
|
||||
|
||||
if test x$have_xfixes_h_hdr = xyes; then
|
||||
if test x$enable_x11_shared = xyes && test x$xfixes_lib != x ; then
|
||||
echo "-- dynamic libXfixes -> $xfixes_lib"
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XFIXES "$xfixes_lib"
|
||||
_ACEOF
|
||||
|
||||
definitely_enable_video_x11_xfixes=yes
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XFixesCreatePointerBarrier in -lXfixes" >&5
|
||||
$as_echo_n "checking for XFixesCreatePointerBarrier in -lXfixes... " >&6; }
|
||||
if ${ac_cv_lib_Xfixes_XFixesCreatePointerBarrier+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
ac_check_lib_save_LIBS=$LIBS
|
||||
LIBS="-lXfixes $LIBS"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
/* Override any GCC internal prototype to avoid an error.
|
||||
Use char because int might match the return type of a GCC
|
||||
builtin and then its argument prototype would still apply. */
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
char XFixesCreatePointerBarrier ();
|
||||
int
|
||||
main ()
|
||||
{
|
||||
return XFixesCreatePointerBarrier ();
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"; then :
|
||||
ac_cv_lib_Xfixes_XFixesCreatePointerBarrier=yes
|
||||
else
|
||||
ac_cv_lib_Xfixes_XFixesCreatePointerBarrier=no
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
LIBS=$ac_check_lib_save_LIBS
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xfixes_XFixesCreatePointerBarrier" >&5
|
||||
$as_echo "$ac_cv_lib_Xfixes_XFixesCreatePointerBarrier" >&6; }
|
||||
if test "x$ac_cv_lib_Xfixes_XFixesCreatePointerBarrier" = xyes; then :
|
||||
have_xfixes_lib=yes
|
||||
fi
|
||||
|
||||
if test x$have_xfixes_lib = xyes ; then
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lXfixes"
|
||||
definitely_enable_video_x11_xfixes=yes
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if test x$definitely_enable_video_x11_xfixes = xyes; then
|
||||
|
||||
$as_echo "#define SDL_VIDEO_DRIVER_X11_XFIXES 1" >>confdefs.h
|
||||
|
||||
SUMMARY_video_x11="${SUMMARY_video_x11} xfixes"
|
||||
fi
|
||||
# Check whether --enable-video-x11-xrandr was given.
|
||||
if test "${enable_video_x11_xrandr+set}" = set; then :
|
||||
enableval=$enable_video_x11_xrandr;
|
||||
|
@ -22378,6 +22453,25 @@ $as_echo "#define SDL_VIDEO_DRIVER_DUMMY 1" >>confdefs.h
|
|||
fi
|
||||
}
|
||||
|
||||
CheckOffscreenVideo()
|
||||
{
|
||||
# Check whether --enable-video-offscreen was given.
|
||||
if test "${enable_video_offscreen+set}" = set; then :
|
||||
enableval=$enable_video_offscreen;
|
||||
else
|
||||
enable_video_offscreen=no
|
||||
fi
|
||||
|
||||
if test x$enable_video_offscreen = xyes; then
|
||||
|
||||
$as_echo "#define SDL_VIDEO_DRIVER_OFFSCREEN 1" >>confdefs.h
|
||||
|
||||
SOURCES="$SOURCES $srcdir/src/video/offscreen/*.c"
|
||||
have_video=yes
|
||||
SUMMARY_video="${SUMMARY_video} offscreen"
|
||||
fi
|
||||
}
|
||||
|
||||
CheckQNXVideo()
|
||||
{
|
||||
if test x$enable_video = xyes; then
|
||||
|
@ -22903,6 +22997,11 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
|||
$as_echo "$as_me: WARNING: Vulkan does not work on this configuration." >&2;}
|
||||
fi
|
||||
fi
|
||||
if test x$have_loadso != xyes; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Vulkan support is available, but disabled because there's no loadso." >&5
|
||||
$as_echo "$as_me: WARNING: Vulkan support is available, but disabled because there's no loadso." >&2;}
|
||||
enable_video_vulkan=no
|
||||
fi
|
||||
if test x$enable_video_vulkan = xyes; then
|
||||
|
||||
$as_echo "#define SDL_VIDEO_VULKAN 1" >>confdefs.h
|
||||
|
@ -24100,6 +24199,18 @@ $as_echo "#define HAVE_XINPUT_STATE_EX 1" >>confdefs.h
|
|||
fi
|
||||
fi
|
||||
|
||||
ac_fn_c_check_header_mongrel "$LINENO" "windows.gaming.input.h" "ac_cv_header_windows_gaming_input_h" "$ac_includes_default"
|
||||
if test "x$ac_cv_header_windows_gaming_input_h" = xyes; then :
|
||||
have_wgi=yes
|
||||
fi
|
||||
|
||||
|
||||
if test x$have_wgi = xyes; then
|
||||
|
||||
$as_echo "#define HAVE_WINDOWS_GAMING_INPUT_H 1" >>confdefs.h
|
||||
|
||||
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
|
||||
|
@ -24136,41 +24247,20 @@ fi
|
|||
|
||||
CheckDLOPEN()
|
||||
{
|
||||
# Check whether --enable-sdl-dlopen was given.
|
||||
if test "${enable_sdl_dlopen+set}" = set; then :
|
||||
enableval=$enable_sdl_dlopen;
|
||||
|
||||
$as_echo "#define DYNAPI_NEEDS_DLOPEN 1" >>confdefs.h
|
||||
|
||||
|
||||
ac_fn_c_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default"
|
||||
if test "x$ac_cv_header_dlfcn_h" = xyes; then :
|
||||
have_dlfcn_h=yes
|
||||
else
|
||||
enable_sdl_dlopen=yes
|
||||
have_dlfcn_h=no
|
||||
fi
|
||||
|
||||
if test x$enable_sdl_dlopen = xyes; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen" >&5
|
||||
$as_echo_n "checking for dlopen... " >&6; }
|
||||
|
||||
|
||||
have_dlopen=no
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
#include <dlfcn.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
void *handle = dlopen("", RTLD_NOW);
|
||||
const char *loaderror = (char *) dlerror();
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_compile "$LINENO"; then :
|
||||
have_dlopen=yes
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dlopen" >&5
|
||||
$as_echo "$have_dlopen" >&6; }
|
||||
|
||||
if test x$have_dlopen = xyes; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lc" >&5
|
||||
$as_echo_n "checking for dlopen in -lc... " >&6; }
|
||||
if ${ac_cv_lib_c_dlopen+:} false; then :
|
||||
|
@ -24208,7 +24298,7 @@ fi
|
|||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_dlopen" >&5
|
||||
$as_echo "$ac_cv_lib_c_dlopen" >&6; }
|
||||
if test "x$ac_cv_lib_c_dlopen" = xyes; then :
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS"
|
||||
have_dlopen=yes
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
|
||||
$as_echo_n "checking for dlopen in -ldl... " >&6; }
|
||||
|
@ -24247,52 +24337,21 @@ fi
|
|||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
|
||||
$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
|
||||
if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -ldl"
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lltdl" >&5
|
||||
$as_echo_n "checking for dlopen in -lltdl... " >&6; }
|
||||
if ${ac_cv_lib_ltdl_dlopen+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
ac_check_lib_save_LIBS=$LIBS
|
||||
LIBS="-lltdl $LIBS"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
/* Override any GCC internal prototype to avoid an error.
|
||||
Use char because int might match the return type of a GCC
|
||||
builtin and then its argument prototype would still apply. */
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
char dlopen ();
|
||||
int
|
||||
main ()
|
||||
{
|
||||
return dlopen ();
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"; then :
|
||||
ac_cv_lib_ltdl_dlopen=yes
|
||||
else
|
||||
ac_cv_lib_ltdl_dlopen=no
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
LIBS=$ac_check_lib_save_LIBS
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ltdl_dlopen" >&5
|
||||
$as_echo "$ac_cv_lib_ltdl_dlopen" >&6; }
|
||||
if test "x$ac_cv_lib_ltdl_dlopen" = xyes; then :
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lltdl"
|
||||
have_dlopen=yes; EXTRA_LDFLAGS="$EXTRA_LDFLAGS -ldl"
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen" >&5
|
||||
$as_echo_n "checking for dlopen... " >&6; }
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dlopen" >&5
|
||||
$as_echo "$have_dlopen" >&6; }
|
||||
|
||||
if test x$have_dlfcn_h = xyes -a x$have_dlopen = xyes; then
|
||||
|
||||
$as_echo "#define HAVE_DLOPEN 1" >>confdefs.h
|
||||
|
||||
if test x$enable_loadso = xyes; then
|
||||
|
||||
$as_echo "#define SDL_LOADSO_DLOPEN 1" >>confdefs.h
|
||||
|
||||
|
@ -24302,6 +24361,39 @@ $as_echo "#define SDL_LOADSO_DLOPEN 1" >>confdefs.h
|
|||
fi
|
||||
}
|
||||
|
||||
CheckO_CLOEXEC()
|
||||
{
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for O_CLOEXEC" >&5
|
||||
$as_echo_n "checking for O_CLOEXEC... " >&6; }
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
#include <fcntl.h>
|
||||
int flag = O_CLOEXEC;
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_compile "$LINENO"; then :
|
||||
have_o_cloexec=yes
|
||||
else
|
||||
have_o_cloexec=no
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_o_cloexec" >&5
|
||||
$as_echo "$have_o_cloexec" >&6; }
|
||||
if test $have_o_cloexec = yes; then
|
||||
|
||||
$as_echo "#define HAVE_O_CLOEXEC 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
}
|
||||
|
||||
CheckUSBHID()
|
||||
{
|
||||
case "$host" in
|
||||
|
@ -24603,11 +24695,11 @@ $as_echo "#define SDL_JOYSTICK_USBHID 1" >>confdefs.h
|
|||
|
||||
CheckHIDAPI()
|
||||
{
|
||||
# Check whether --enable-hidapi was given.
|
||||
if test "${enable_hidapi+set}" = set; then :
|
||||
enableval=$enable_hidapi;
|
||||
# Check whether --enable-hidapi-joystick was given.
|
||||
if test "${enable_hidapi_joystick+set}" = set; then :
|
||||
enableval=$enable_hidapi_joystick;
|
||||
else
|
||||
enable_hidapi=yes
|
||||
enable_hidapi_joystick=yes
|
||||
fi
|
||||
|
||||
# Check whether --enable-hidapi-libusb was given.
|
||||
|
@ -24618,7 +24710,7 @@ else
|
|||
fi
|
||||
|
||||
|
||||
if test x$enable_joystick = xyes -a x$enable_hidapi = xyes; then
|
||||
if test x$enable_hidapi = xyes; then
|
||||
case "$host" in
|
||||
# libusb does not support iOS
|
||||
*-ios-* )
|
||||
|
@ -24721,13 +24813,6 @@ fi
|
|||
fi
|
||||
|
||||
if test x$hidapi_support = xyes; then
|
||||
|
||||
$as_echo "#define SDL_JOYSTICK_HIDAPI 1" >>confdefs.h
|
||||
|
||||
EXTRA_CFLAGS="$EXTRA_CFLAGS -I$srcdir/src/hidapi/hidapi"
|
||||
SOURCES="$SOURCES $srcdir/src/joystick/hidapi/*.c"
|
||||
SOURCES="$SOURCES $srcdir/src/hidapi/SDL_hidapi.c"
|
||||
|
||||
if test x$have_libusb_h = xyes; then
|
||||
EXTRA_CFLAGS="$EXTRA_CFLAGS $LIBUSB_CFLAGS"
|
||||
if test x$require_hidapi_libusb = xyes; then
|
||||
|
@ -24759,11 +24844,18 @@ _ACEOF
|
|||
fi
|
||||
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}: checking for hidapi joystick support" >&5
|
||||
$as_echo_n "checking for hidapi joystick support... " >&6; }
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hidapi_support" >&5
|
||||
$as_echo "$hidapi_support" >&6; }
|
||||
fi
|
||||
|
||||
if test x$enable_joystick = xyes -a x$hidapi_support = xyes -a x$enable_hidapi_joystick = xyes; then
|
||||
|
||||
$as_echo "#define SDL_JOYSTICK_HIDAPI 1" >>confdefs.h
|
||||
|
||||
SOURCES="$SOURCES $srcdir/src/joystick/hidapi/*.c"
|
||||
fi
|
||||
}
|
||||
|
||||
CheckClockGettime()
|
||||
|
@ -24989,11 +25081,13 @@ $as_echo "#define SDL_VIDEO_DRIVER_ANDROID 1" >>confdefs.h
|
|||
CheckVisibilityHidden
|
||||
CheckDeclarationAfterStatement
|
||||
CheckDummyVideo
|
||||
CheckOffscreenVideo
|
||||
CheckDiskAudio
|
||||
CheckDummyAudio
|
||||
CheckDLOPEN
|
||||
CheckARM
|
||||
CheckNEON
|
||||
CheckO_CLOEXEC
|
||||
CheckOSS
|
||||
CheckALSA
|
||||
CheckPipewire
|
||||
|
@ -25082,6 +25176,19 @@ $as_echo "#define SDL_AUDIO_DRIVER_ANDROID 1" >>confdefs.h
|
|||
|
||||
SOURCES="$SOURCES $srcdir/src/audio/android/*.c"
|
||||
SUMMARY_audio="${SUMMARY_audio} android"
|
||||
|
||||
|
||||
$as_echo "#define SDL_AUDIO_DRIVER_OPENSLES 1" >>confdefs.h
|
||||
|
||||
SOURCES="$SOURCES $srcdir/src/audio/openslES/*.c"
|
||||
SUMMARY_audio="${SUMMARY_audio} openslES"
|
||||
|
||||
|
||||
$as_echo "#define SDL_AUDIO_DRIVER_AAUDIO 1" >>confdefs.h
|
||||
|
||||
SOURCES="$SOURCES $srcdir/src/audio/aaudio/*.c"
|
||||
SUMMARY_audio="${SUMMARY_audio} aaudio"
|
||||
|
||||
have_audio=yes
|
||||
;;
|
||||
nto)
|
||||
|
@ -25230,8 +25337,12 @@ $as_echo "#define SDL_TIMER_UNIX 1" >>confdefs.h
|
|||
ac_default_prefix=$BUILD_PREFIX
|
||||
fi
|
||||
fi
|
||||
if test x$enable_loadso = xyes; then
|
||||
have_loadso=yes
|
||||
fi
|
||||
CheckDeclarationAfterStatement
|
||||
CheckDummyVideo
|
||||
CheckOffscreenVideo
|
||||
CheckDiskAudio
|
||||
CheckDummyAudio
|
||||
CheckWINDOWS
|
||||
|
@ -25243,10 +25354,8 @@ $as_echo "#define SDL_TIMER_UNIX 1" >>confdefs.h
|
|||
|
||||
# Set up the core platform files
|
||||
SOURCES="$SOURCES $srcdir/src/core/windows/*.c"
|
||||
|
||||
SOURCES="$SOURCES $srcdir/src/misc/windows/*.c"
|
||||
have_misc=yes
|
||||
|
||||
# Use the Windows locale APIs.
|
||||
SOURCES="$SOURCES $srcdir/src/locale/windows/*.c"
|
||||
have_locale=yes
|
||||
|
@ -25306,11 +25415,16 @@ $as_echo "#define SDL_AUDIO_DRIVER_WASAPI 1" >>confdefs.h
|
|||
|
||||
$as_echo "#define SDL_JOYSTICK_RAWINPUT 1" >>confdefs.h
|
||||
|
||||
if test x$have_dinput = xyes -o x$have_xinput = xyes; then
|
||||
if test x$have_dinput = xyes -o x$have_xinput = xyes -o x$have_wgi = xyes; then
|
||||
if test x$have_xinput = xyes; then
|
||||
|
||||
$as_echo "#define SDL_JOYSTICK_XINPUT 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
if test x$have_wgi = xyes; then
|
||||
|
||||
$as_echo "#define SDL_JOYSTICK_WGI 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
if test x$have_dinput = xyes; then
|
||||
|
||||
|
@ -25318,10 +25432,6 @@ $as_echo "#define SDL_JOYSTICK_DINPUT 1" >>confdefs.h
|
|||
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -ldinput8 -ldxguid -ldxerr8"
|
||||
fi
|
||||
else
|
||||
|
||||
$as_echo "#define SDL_JOYSTICK_WINMM 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
SOURCES="$SOURCES $srcdir/src/joystick/windows/*.c"
|
||||
have_joystick=yes
|
||||
|
@ -25405,7 +25515,6 @@ $as_echo "#define SDL_TIMER_WINDOWS 1" >>confdefs.h
|
|||
$as_echo "#define SDL_LOADSO_WINDOWS 1" >>confdefs.h
|
||||
|
||||
SOURCES="$SOURCES $srcdir/src/loadso/windows/*.c"
|
||||
have_loadso=yes
|
||||
fi
|
||||
# Set up the system libraries we need
|
||||
if test -f /lib/w32api/libuuid.a; then
|
||||
|
@ -25474,9 +25583,11 @@ fi
|
|||
ARCH=haiku
|
||||
ac_default_prefix=/boot/system
|
||||
CheckDummyVideo
|
||||
CheckOffscreenVideo
|
||||
CheckDiskAudio
|
||||
CheckDummyAudio
|
||||
CheckDLOPEN
|
||||
CheckO_CLOEXEC
|
||||
CheckHaikuVideo
|
||||
CheckHaikuGL
|
||||
CheckPTHREAD
|
||||
|
@ -25540,9 +25651,11 @@ $as_echo "#define SDL_FILESYSTEM_HAIKU 1" >>confdefs.h
|
|||
CheckVisibilityHidden
|
||||
CheckDeclarationAfterStatement
|
||||
CheckDummyVideo
|
||||
CheckOffscreenVideo
|
||||
CheckDiskAudio
|
||||
CheckDummyAudio
|
||||
CheckDLOPEN
|
||||
CheckO_CLOEXEC
|
||||
CheckMETAL
|
||||
CheckVulkan
|
||||
CheckPTHREAD
|
||||
|
@ -25665,9 +25778,11 @@ $as_echo "#define SDL_VIDEO_RENDER_OGL_ES2 1" >>confdefs.h
|
|||
CheckVisibilityHidden
|
||||
CheckDeclarationAfterStatement
|
||||
CheckDummyVideo
|
||||
CheckOffscreenVideo
|
||||
CheckDiskAudio
|
||||
CheckDummyAudio
|
||||
CheckDLOPEN
|
||||
CheckO_CLOEXEC
|
||||
CheckCOCOA
|
||||
CheckMETAL
|
||||
CheckX11
|
||||
|
@ -25761,8 +25876,10 @@ $as_echo "#define SDL_TIMER_UNIX 1" >>confdefs.h
|
|||
CheckNativeClient
|
||||
CheckDummyAudio
|
||||
CheckDummyVideo
|
||||
CheckOffscreenVideo
|
||||
CheckInputEvents
|
||||
CheckPTHREAD
|
||||
CheckO_CLOEXEC
|
||||
|
||||
# Set up files for the timer library
|
||||
if test x$enable_timers = xyes; then
|
||||
|
@ -25803,6 +25920,7 @@ $as_echo "#define SDL_AUDIO_DRIVER_EMSCRIPTEN 1" >>confdefs.h
|
|||
CheckVisibilityHidden
|
||||
CheckDeclarationAfterStatement
|
||||
CheckDummyVideo
|
||||
CheckOffscreenVideo
|
||||
CheckDiskAudio
|
||||
CheckDummyAudio
|
||||
CheckPTHREAD
|
||||
|
@ -25853,9 +25971,11 @@ $as_echo "#define SDL_TIMER_UNIX 1" >>confdefs.h
|
|||
CheckVisibilityHidden
|
||||
CheckDeclarationAfterStatement
|
||||
CheckDummyVideo
|
||||
CheckOffscreenVideo
|
||||
CheckDiskAudio
|
||||
CheckDummyAudio
|
||||
CheckDLOPEN
|
||||
CheckO_CLOEXEC
|
||||
CheckOSS
|
||||
CheckPTHREAD
|
||||
CheckClockGettime
|
||||
|
@ -25863,6 +25983,23 @@ $as_echo "#define SDL_TIMER_UNIX 1" >>confdefs.h
|
|||
SOURCES="$SOURCES $srcdir/src/misc/riscos/*.c"
|
||||
have_misc=yes
|
||||
|
||||
# Set up files for the video library
|
||||
if test x$enable_video = xyes; then
|
||||
|
||||
$as_echo "#define SDL_VIDEO_DRIVER_RISCOS 1" >>confdefs.h
|
||||
|
||||
SOURCES="$SOURCES $srcdir/src/video/riscos/*.c"
|
||||
have_video=yes
|
||||
SUMMARY_video="${SUMMARY_video} riscos"
|
||||
fi
|
||||
# Set up files for the filesystem library
|
||||
if test x$enable_filesystem = xyes; then
|
||||
|
||||
$as_echo "#define SDL_FILESYSTEM_RISCOS 1" >>confdefs.h
|
||||
|
||||
SOURCES="$SOURCES $srcdir/src/filesystem/riscos/*.c"
|
||||
have_filesystem=yes
|
||||
fi
|
||||
# Set up files for the timer library
|
||||
if test x$enable_timers = xyes; then
|
||||
|
||||
|
@ -26045,7 +26182,6 @@ $as_echo_n "checking for linker option --enable-new-dtags... " >&6; }
|
|||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
|
213
externals/SDL/configure.ac
vendored
213
externals/SDL/configure.ac
vendored
|
@ -22,9 +22,9 @@ dnl Set various version strings - taken gratefully from the GTk sources
|
|||
#
|
||||
SDL_MAJOR_VERSION=2
|
||||
SDL_MINOR_VERSION=0
|
||||
SDL_MICRO_VERSION=16
|
||||
SDL_MICRO_VERSION=18
|
||||
SDL_INTERFACE_AGE=0
|
||||
SDL_BINARY_AGE=16
|
||||
SDL_BINARY_AGE=18
|
||||
SDL_VERSION=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION.$SDL_MICRO_VERSION
|
||||
|
||||
AC_SUBST(SDL_MAJOR_VERSION)
|
||||
|
@ -248,8 +248,7 @@ case "$host" in
|
|||
*)
|
||||
save_LDFLAGS="$LDFLAGS"
|
||||
LDFLAGS="$LDFLAGS -Wl,--no-undefined"
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
||||
]],[])], [
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [
|
||||
have_no_undefined=yes
|
||||
BUILD_LDFLAGS="$BUILD_LDFLAGS -Wl,--no-undefined"
|
||||
],[])
|
||||
|
@ -264,8 +263,7 @@ case "$host" in
|
|||
*)
|
||||
save_LDFLAGS="$LDFLAGS"
|
||||
LDFLAGS="$LDFLAGS -Wl,--dynamicbase"
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
||||
]],[])], [
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [
|
||||
have_dynamicbase=yes
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,--dynamicbase"
|
||||
],[])
|
||||
|
@ -280,8 +278,7 @@ case "$host" in
|
|||
*)
|
||||
save_LDFLAGS="$LDFLAGS"
|
||||
LDFLAGS="$LDFLAGS -Wl,--nxcompat"
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
||||
]],[])], [
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [
|
||||
have_nxcompat=yes
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,--nxcompat"
|
||||
],[])
|
||||
|
@ -296,8 +293,7 @@ case "$host" in
|
|||
*)
|
||||
save_LDFLAGS="$LDFLAGS"
|
||||
LDFLAGS="$LDFLAGS -Wl,--high-entropy-va"
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
||||
]],[])], [
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [
|
||||
have_high_entropy_va=yes
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,--high-entropy-va"
|
||||
],[])
|
||||
|
@ -408,6 +404,7 @@ SOURCES="$SOURCES $srcdir/src/dynapi/*.c"
|
|||
SOURCES="$SOURCES $srcdir/src/events/*.c"
|
||||
SOURCES="$SOURCES $srcdir/src/file/*.c"
|
||||
SOURCES="$SOURCES $srcdir/src/haptic/*.c"
|
||||
SOURCES="$SOURCES $srcdir/src/hidapi/*.c"
|
||||
SOURCES="$SOURCES $srcdir/src/joystick/*.c"
|
||||
SOURCES="$SOURCES $srcdir/src/libm/*.c"
|
||||
SOURCES="$SOURCES $srcdir/src/misc/*.c"
|
||||
|
@ -481,6 +478,14 @@ if test x$enable_haptic != xyes; then
|
|||
else
|
||||
SUMMARY_modules="${SUMMARY_modules} haptic"
|
||||
fi
|
||||
AC_ARG_ENABLE(hidapi,
|
||||
[AS_HELP_STRING([--enable-hidapi], [Enable the HIDAPI subsystem [default=yes]])],
|
||||
, enable_hidapi=yes)
|
||||
if test x$enable_hidapi != xyes; then
|
||||
AC_DEFINE(SDL_HIDAPI_DISABLED, 1, [ ])
|
||||
else
|
||||
SUMMARY_modules="${SUMMARY_modules} hidapi"
|
||||
fi
|
||||
AC_ARG_ENABLE(sensor,
|
||||
[AS_HELP_STRING([--enable-sensor], [Enable the sensor subsystem [default=yes]])],
|
||||
, enable_sensor=yes)
|
||||
|
@ -1530,7 +1535,7 @@ CheckWayland()
|
|||
video_wayland=no
|
||||
if test x$video_opengl_egl = xyes && \
|
||||
test x$video_opengles_v2 = xyes; then
|
||||
if $PKG_CONFIG --exists wayland-client wayland-scanner wayland-egl wayland-cursor egl xkbcommon ; then
|
||||
if $PKG_CONFIG --exists wayland-client wayland-scanner wayland-egl wayland-cursor egl 'xkbcommon >= 0.5.0'; then
|
||||
WAYLAND_CFLAGS=`$PKG_CONFIG --cflags wayland-client wayland-egl wayland-cursor xkbcommon`
|
||||
WAYLAND_LIBS=`$PKG_CONFIG --libs wayland-client wayland-egl wayland-cursor xkbcommon`
|
||||
WAYLAND_SCANNER=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`
|
||||
|
@ -1669,7 +1674,7 @@ CheckNativeClient()
|
|||
CheckRPI()
|
||||
{
|
||||
AC_ARG_ENABLE(video-rpi,
|
||||
[AS_HELP_STRING([--enable-video-rpi], [use Raspberry Pi video driver [default=yes]])],
|
||||
[AS_HELP_STRING([--enable-video-rpi], [use Raspberry Pi 2/3 video driver [default=yes]])],
|
||||
, enable_video_rpi=yes)
|
||||
if test x$enable_video = xyes -a x$enable_video_rpi = xyes; then
|
||||
PKG_CHECK_MODULES([RPI], [bcm_host brcmegl], video_rpi=yes, video_rpi=no)
|
||||
|
@ -1690,11 +1695,13 @@ CheckRPI()
|
|||
# Add the Raspberry Pi compiler flags and libraries
|
||||
CFLAGS="$CFLAGS $RPI_CFLAGS"; LIBS="$LIBS $RPI_LIBS"
|
||||
|
||||
AC_MSG_CHECKING(for Raspberry Pi)
|
||||
AC_MSG_CHECKING(for Raspberry Pi 2/3)
|
||||
have_video_rpi=no
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <bcm_host.h>
|
||||
#include <EGL/eglplatform.h>
|
||||
]], [[
|
||||
EGL_DISPMANX_WINDOW_T window;
|
||||
bcm_host_init();
|
||||
]])], [have_video_rpi=yes],[])
|
||||
AC_MSG_RESULT($have_video_rpi)
|
||||
|
@ -1748,6 +1755,7 @@ CheckX11()
|
|||
xcursor_lib='/opt/X11/lib/libXcursor.1.dylib'
|
||||
xinerama_lib='/opt/X11/lib/libXinerama.1.dylib'
|
||||
xinput_lib='/opt/X11/lib/libXi.6.dylib'
|
||||
xfixes_lib='/opt/X11/lib/libXfixes.3.dylib'
|
||||
xrandr_lib='/opt/X11/lib/libXrandr.2.dylib'
|
||||
xrender_lib='/opt/X11/lib/libXrender.1.dylib'
|
||||
xss_lib='/opt/X11/lib/libXss.1.dylib'
|
||||
|
@ -1759,6 +1767,7 @@ CheckX11()
|
|||
xcursor_lib='libXcursor.so'
|
||||
xinerama_lib='libXinerama.so'
|
||||
xinput_lib='libXi.so'
|
||||
xfixes_lib='libXfixes.so'
|
||||
xrandr_lib='libXrandr.so'
|
||||
xrender_lib='libXrender.so'
|
||||
xss_lib='libXss.so'
|
||||
|
@ -1770,6 +1779,7 @@ CheckX11()
|
|||
xcursor_lib=[`find_lib "libXcursor.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
|
||||
xinerama_lib=[`find_lib "libXinerama.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
|
||||
xinput_lib=[`find_lib "libXi.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
|
||||
xfixes_lib=[`find_lib "libXfixes.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
|
||||
xrandr_lib=[`find_lib "libXrandr.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
|
||||
xrender_lib=[`find_lib "libXrender.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
|
||||
xss_lib=[`find_lib "libXss.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
|
||||
|
@ -1824,20 +1834,6 @@ CheckX11()
|
|||
fi
|
||||
have_video=yes
|
||||
|
||||
AC_MSG_CHECKING(for const parameter to XextAddDisplay)
|
||||
have_const_param_XextAddDisplay=no
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xproto.h>
|
||||
#include <X11/extensions/Xext.h>
|
||||
#include <X11/extensions/extutil.h>
|
||||
extern XExtDisplayInfo* XextAddDisplay(XExtensionInfo* a,Display* b,_Xconst char* c,XExtensionHooks* d,int e,XPointer f);
|
||||
]],[])], [
|
||||
have_const_param_XextAddDisplay=yes
|
||||
AC_DEFINE([SDL_VIDEO_DRIVER_X11_CONST_PARAM_XEXTADDDISPLAY], 1, [ ])
|
||||
],[])
|
||||
AC_MSG_RESULT($have_const_param_XextAddDisplay)
|
||||
|
||||
dnl AC_CHECK_LIB(X11, XGetEventData, AC_DEFINE(SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS, 1, [Have XGenericEvent]))
|
||||
AC_MSG_CHECKING([for XGenericEvent])
|
||||
have_XGenericEvent=no
|
||||
|
@ -1971,6 +1967,36 @@ XITouchClassInfo *t;
|
|||
],[])
|
||||
AC_MSG_RESULT($have_xinput2_multitouch)
|
||||
fi
|
||||
AC_ARG_ENABLE(video-x11-xfixes,
|
||||
[AS_HELP_STRING([--enable-video-x11-xfixes], [enable X11 Xfixes support [default=yes]])],
|
||||
, enable_video_x11_xfixes=yes)
|
||||
if test x$enable_video_x11_xfixes = xyes; then
|
||||
definitely_enable_video_x11_xfixes=no
|
||||
# check along with XInput2.h because we use Xfixes with XIBarrierReleasePointer
|
||||
AC_CHECK_HEADER(X11/extensions/Xfixes.h,
|
||||
have_xfixes_h_hdr=yes,
|
||||
have_xfixes_h_hdr=no,
|
||||
[#include <X11/Xlib.h>
|
||||
#include <X11/Xproto.h>
|
||||
#include <X11/extensions/XInput2.h>])
|
||||
if test x$have_xfixes_h_hdr = xyes; then
|
||||
if test x$enable_x11_shared = xyes && test x$xfixes_lib != x ; then
|
||||
echo "-- dynamic libXfixes -> $xfixes_lib"
|
||||
AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XFIXES, "$xfixes_lib", [ ])
|
||||
definitely_enable_video_x11_xfixes=yes
|
||||
else
|
||||
AC_CHECK_LIB(Xfixes, XFixesCreatePointerBarrier, have_xfixes_lib=yes)
|
||||
if test x$have_xfixes_lib = xyes ; then
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lXfixes"
|
||||
definitely_enable_video_x11_xfixes=yes
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if test x$definitely_enable_video_x11_xfixes = xyes; then
|
||||
AC_DEFINE(SDL_VIDEO_DRIVER_X11_XFIXES, 1, [ ])
|
||||
SUMMARY_video_x11="${SUMMARY_video_x11} xfixes"
|
||||
fi
|
||||
AC_ARG_ENABLE(video-x11-xrandr,
|
||||
[AS_HELP_STRING([--enable-video-x11-xrandr], [enable X11 Xrandr extension for fullscreen [default=yes]])],
|
||||
, enable_video_x11_xrandr=yes)
|
||||
|
@ -2316,6 +2342,19 @@ CheckDummyVideo()
|
|||
fi
|
||||
}
|
||||
|
||||
CheckOffscreenVideo()
|
||||
{
|
||||
AC_ARG_ENABLE(video-offscreen,
|
||||
[AS_HELP_STRING([--enable-video-offscreen], [use offscreen video driver [default=no]])],
|
||||
, enable_video_offscreen=no)
|
||||
if test x$enable_video_offscreen = xyes; then
|
||||
AC_DEFINE(SDL_VIDEO_DRIVER_OFFSCREEN, 1, [ ])
|
||||
SOURCES="$SOURCES $srcdir/src/video/offscreen/*.c"
|
||||
have_video=yes
|
||||
SUMMARY_video="${SUMMARY_video} offscreen"
|
||||
fi
|
||||
}
|
||||
|
||||
dnl Set up the QNX video driver if enabled
|
||||
CheckQNXVideo()
|
||||
{
|
||||
|
@ -2598,6 +2637,10 @@ CheckVulkan()
|
|||
AC_MSG_WARN([Vulkan does not work on this configuration.])
|
||||
fi
|
||||
fi
|
||||
if test x$have_loadso != xyes; then
|
||||
AC_MSG_WARN([Vulkan support is available, but disabled because there's no loadso.])
|
||||
enable_video_vulkan=no
|
||||
fi
|
||||
if test x$enable_video_vulkan = xyes; then
|
||||
AC_DEFINE(SDL_VIDEO_VULKAN, 1, [ ])
|
||||
SUMMARY_video="${SUMMARY_video} vulkan"
|
||||
|
@ -3209,6 +3252,11 @@ XINPUT_STATE_EX s1;
|
|||
fi
|
||||
fi
|
||||
|
||||
AC_CHECK_HEADER(windows.gaming.input.h, have_wgi=yes)
|
||||
if test x$have_wgi = xyes; then
|
||||
AC_DEFINE(HAVE_WINDOWS_GAMING_INPUT_H, 1, [ ])
|
||||
fi
|
||||
|
||||
AC_CHECK_HEADER(mmdeviceapi.h, have_wasapi=yes)
|
||||
if test x$have_wasapi = xyes; then
|
||||
AC_DEFINE(HAVE_MMDEVICEAPI_H, 1, [ ])
|
||||
|
@ -3224,26 +3272,22 @@ XINPUT_STATE_EX s1;
|
|||
}
|
||||
|
||||
dnl Check for the dlfcn.h interface for dynamically loading objects
|
||||
dnl NOTE: CheckDLOPEN is called only for relevant platforms
|
||||
CheckDLOPEN()
|
||||
{
|
||||
AC_ARG_ENABLE(sdl-dlopen,
|
||||
[AS_HELP_STRING([--enable-sdl-dlopen], [use dlopen for shared object loading [default=yes]])],
|
||||
, enable_sdl_dlopen=yes)
|
||||
if test x$enable_sdl_dlopen = xyes; then
|
||||
AC_MSG_CHECKING(for dlopen)
|
||||
AC_DEFINE(DYNAPI_NEEDS_DLOPEN, 1, [ ])
|
||||
|
||||
AC_CHECK_HEADER(dlfcn.h,have_dlfcn_h=yes,have_dlfcn_h=no)
|
||||
|
||||
have_dlopen=no
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <dlfcn.h>
|
||||
]], [[
|
||||
void *handle = dlopen("", RTLD_NOW);
|
||||
const char *loaderror = (char *) dlerror();
|
||||
]])], [have_dlopen=yes],[])
|
||||
AC_CHECK_LIB(c, dlopen, have_dlopen=yes,
|
||||
AC_CHECK_LIB(dl, dlopen, [have_dlopen=yes; EXTRA_LDFLAGS="$EXTRA_LDFLAGS -ldl"]))
|
||||
AC_MSG_CHECKING(for dlopen)
|
||||
AC_MSG_RESULT($have_dlopen)
|
||||
|
||||
if test x$have_dlopen = xyes; then
|
||||
AC_CHECK_LIB(c, dlopen, EXTRA_LDFLAGS="$EXTRA_LDFLAGS",
|
||||
AC_CHECK_LIB(dl, dlopen, EXTRA_LDFLAGS="$EXTRA_LDFLAGS -ldl",
|
||||
AC_CHECK_LIB(ltdl, dlopen, EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lltdl")))
|
||||
if test x$have_dlfcn_h = xyes -a x$have_dlopen = xyes; then
|
||||
AC_DEFINE(HAVE_DLOPEN, 1, [ ])
|
||||
if test x$enable_loadso = xyes; then
|
||||
AC_DEFINE(SDL_LOADSO_DLOPEN, 1, [ ])
|
||||
SOURCES="$SOURCES $srcdir/src/loadso/dlopen/*.c"
|
||||
have_loadso=yes
|
||||
|
@ -3251,6 +3295,19 @@ CheckDLOPEN()
|
|||
fi
|
||||
}
|
||||
|
||||
CheckO_CLOEXEC()
|
||||
{
|
||||
AC_MSG_CHECKING(for O_CLOEXEC)
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <fcntl.h>
|
||||
int flag = O_CLOEXEC;
|
||||
]],[])], [have_o_cloexec=yes],[have_o_cloexec=no])
|
||||
AC_MSG_RESULT($have_o_cloexec)
|
||||
if test $have_o_cloexec = yes; then
|
||||
AC_DEFINE(HAVE_O_CLOEXEC, 1, [ ])
|
||||
fi
|
||||
}
|
||||
|
||||
dnl Check for the usbhid(3) library on *BSD
|
||||
CheckUSBHID()
|
||||
{
|
||||
|
@ -3388,14 +3445,14 @@ CheckUSBHID()
|
|||
dnl Check for HIDAPI joystick drivers
|
||||
CheckHIDAPI()
|
||||
{
|
||||
AC_ARG_ENABLE(hidapi,
|
||||
[AS_HELP_STRING([--enable-hidapi], [use HIDAPI for low level joystick drivers [default=yes]])],
|
||||
, enable_hidapi=yes)
|
||||
AC_ARG_ENABLE(hidapi-joystick,
|
||||
[AS_HELP_STRING([--enable-hidapi-joystick], [use HIDAPI for low level joystick drivers [default=yes]])],
|
||||
, enable_hidapi_joystick=yes)
|
||||
AC_ARG_ENABLE(hidapi-libusb,
|
||||
[AS_HELP_STRING([--enable-hidapi-libusb], [use libusb for low level joystick drivers [default=maybe]])],
|
||||
, enable_hidapi_libusb=maybe)
|
||||
|
||||
if test x$enable_joystick = xyes -a x$enable_hidapi = xyes; then
|
||||
if test x$enable_hidapi = xyes; then
|
||||
case "$host" in
|
||||
# libusb does not support iOS
|
||||
*-ios-* )
|
||||
|
@ -3421,11 +3478,6 @@ CheckHIDAPI()
|
|||
fi
|
||||
|
||||
if test x$hidapi_support = xyes; then
|
||||
AC_DEFINE(SDL_JOYSTICK_HIDAPI, 1, [ ])
|
||||
EXTRA_CFLAGS="$EXTRA_CFLAGS -I$srcdir/src/hidapi/hidapi"
|
||||
SOURCES="$SOURCES $srcdir/src/joystick/hidapi/*.c"
|
||||
SOURCES="$SOURCES $srcdir/src/hidapi/SDL_hidapi.c"
|
||||
|
||||
if test x$have_libusb_h = xyes; then
|
||||
EXTRA_CFLAGS="$EXTRA_CFLAGS $LIBUSB_CFLAGS"
|
||||
if test x$require_hidapi_libusb = xyes; then
|
||||
|
@ -3452,9 +3504,14 @@ CheckHIDAPI()
|
|||
fi
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING(for hidapi support)
|
||||
AC_MSG_CHECKING(for hidapi joystick support)
|
||||
AC_MSG_RESULT($hidapi_support)
|
||||
fi
|
||||
|
||||
if test x$enable_joystick = xyes -a x$hidapi_support = xyes -a x$enable_hidapi_joystick = xyes; then
|
||||
AC_DEFINE(SDL_JOYSTICK_HIDAPI, 1, [ ])
|
||||
SOURCES="$SOURCES $srcdir/src/joystick/hidapi/*.c"
|
||||
fi
|
||||
}
|
||||
|
||||
dnl Check for clock_gettime()
|
||||
|
@ -3579,11 +3636,13 @@ case "$host" in
|
|||
CheckVisibilityHidden
|
||||
CheckDeclarationAfterStatement
|
||||
CheckDummyVideo
|
||||
CheckOffscreenVideo
|
||||
CheckDiskAudio
|
||||
CheckDummyAudio
|
||||
CheckDLOPEN
|
||||
CheckARM
|
||||
CheckNEON
|
||||
CheckO_CLOEXEC
|
||||
CheckOSS
|
||||
CheckALSA
|
||||
CheckPipewire
|
||||
|
@ -3664,6 +3723,15 @@ case "$host" in
|
|||
AC_DEFINE(SDL_AUDIO_DRIVER_ANDROID, 1, [ ])
|
||||
SOURCES="$SOURCES $srcdir/src/audio/android/*.c"
|
||||
SUMMARY_audio="${SUMMARY_audio} android"
|
||||
|
||||
AC_DEFINE(SDL_AUDIO_DRIVER_OPENSLES, 1, [ ])
|
||||
SOURCES="$SOURCES $srcdir/src/audio/openslES/*.c"
|
||||
SUMMARY_audio="${SUMMARY_audio} openslES"
|
||||
|
||||
AC_DEFINE(SDL_AUDIO_DRIVER_AAUDIO, 1, [ ])
|
||||
SOURCES="$SOURCES $srcdir/src/audio/aaudio/*.c"
|
||||
SUMMARY_audio="${SUMMARY_audio} aaudio"
|
||||
|
||||
have_audio=yes
|
||||
;;
|
||||
nto)
|
||||
|
@ -3790,8 +3858,12 @@ case "$host" in
|
|||
ac_default_prefix=$BUILD_PREFIX
|
||||
fi
|
||||
fi
|
||||
if test x$enable_loadso = xyes; then
|
||||
have_loadso=yes
|
||||
fi
|
||||
CheckDeclarationAfterStatement
|
||||
CheckDummyVideo
|
||||
CheckOffscreenVideo
|
||||
CheckDiskAudio
|
||||
CheckDummyAudio
|
||||
CheckWINDOWS
|
||||
|
@ -3803,10 +3875,8 @@ case "$host" in
|
|||
|
||||
# Set up the core platform files
|
||||
SOURCES="$SOURCES $srcdir/src/core/windows/*.c"
|
||||
|
||||
SOURCES="$SOURCES $srcdir/src/misc/windows/*.c"
|
||||
have_misc=yes
|
||||
|
||||
# Use the Windows locale APIs.
|
||||
SOURCES="$SOURCES $srcdir/src/locale/windows/*.c"
|
||||
have_locale=yes
|
||||
|
@ -3848,16 +3918,17 @@ case "$host" in
|
|||
# Set up files for the joystick library
|
||||
if test x$enable_joystick = xyes; then
|
||||
AC_DEFINE(SDL_JOYSTICK_RAWINPUT, 1, [ ])
|
||||
if test x$have_dinput = xyes -o x$have_xinput = xyes; then
|
||||
if test x$have_dinput = xyes -o x$have_xinput = xyes -o x$have_wgi = xyes; then
|
||||
if test x$have_xinput = xyes; then
|
||||
AC_DEFINE(SDL_JOYSTICK_XINPUT, 1, [ ])
|
||||
fi
|
||||
if test x$have_wgi = xyes; then
|
||||
AC_DEFINE(SDL_JOYSTICK_WGI, 1, [ ])
|
||||
fi
|
||||
if test x$have_dinput = xyes; then
|
||||
AC_DEFINE(SDL_JOYSTICK_DINPUT, 1, [ ])
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -ldinput8 -ldxguid -ldxerr8"
|
||||
fi
|
||||
else
|
||||
AC_DEFINE(SDL_JOYSTICK_WINMM, 1, [ ])
|
||||
fi
|
||||
SOURCES="$SOURCES $srcdir/src/joystick/windows/*.c"
|
||||
have_joystick=yes
|
||||
|
@ -3914,7 +3985,6 @@ case "$host" in
|
|||
if test x$enable_loadso = xyes; then
|
||||
AC_DEFINE(SDL_LOADSO_WINDOWS, 1, [ ])
|
||||
SOURCES="$SOURCES $srcdir/src/loadso/windows/*.c"
|
||||
have_loadso=yes
|
||||
fi
|
||||
# Set up the system libraries we need
|
||||
if test -f /lib/w32api/libuuid.a; then
|
||||
|
@ -3951,9 +4021,11 @@ case "$host" in
|
|||
ARCH=haiku
|
||||
ac_default_prefix=/boot/system
|
||||
CheckDummyVideo
|
||||
CheckOffscreenVideo
|
||||
CheckDiskAudio
|
||||
CheckDummyAudio
|
||||
CheckDLOPEN
|
||||
CheckO_CLOEXEC
|
||||
CheckHaikuVideo
|
||||
CheckHaikuGL
|
||||
CheckPTHREAD
|
||||
|
@ -4007,9 +4079,11 @@ case "$host" in
|
|||
CheckVisibilityHidden
|
||||
CheckDeclarationAfterStatement
|
||||
CheckDummyVideo
|
||||
CheckOffscreenVideo
|
||||
CheckDiskAudio
|
||||
CheckDummyAudio
|
||||
CheckDLOPEN
|
||||
CheckO_CLOEXEC
|
||||
CheckMETAL
|
||||
CheckVulkan
|
||||
CheckPTHREAD
|
||||
|
@ -4110,9 +4184,11 @@ case "$host" in
|
|||
CheckVisibilityHidden
|
||||
CheckDeclarationAfterStatement
|
||||
CheckDummyVideo
|
||||
CheckOffscreenVideo
|
||||
CheckDiskAudio
|
||||
CheckDummyAudio
|
||||
CheckDLOPEN
|
||||
CheckO_CLOEXEC
|
||||
CheckCOCOA
|
||||
CheckMETAL
|
||||
CheckX11
|
||||
|
@ -4194,8 +4270,10 @@ case "$host" in
|
|||
CheckNativeClient
|
||||
CheckDummyAudio
|
||||
CheckDummyVideo
|
||||
CheckOffscreenVideo
|
||||
CheckInputEvents
|
||||
CheckPTHREAD
|
||||
CheckO_CLOEXEC
|
||||
|
||||
# Set up files for the timer library
|
||||
if test x$enable_timers = xyes; then
|
||||
|
@ -4228,6 +4306,7 @@ case "$host" in
|
|||
CheckVisibilityHidden
|
||||
CheckDeclarationAfterStatement
|
||||
CheckDummyVideo
|
||||
CheckOffscreenVideo
|
||||
CheckDiskAudio
|
||||
CheckDummyAudio
|
||||
CheckPTHREAD
|
||||
|
@ -4270,9 +4349,11 @@ case "$host" in
|
|||
CheckVisibilityHidden
|
||||
CheckDeclarationAfterStatement
|
||||
CheckDummyVideo
|
||||
CheckOffscreenVideo
|
||||
CheckDiskAudio
|
||||
CheckDummyAudio
|
||||
CheckDLOPEN
|
||||
CheckO_CLOEXEC
|
||||
CheckOSS
|
||||
CheckPTHREAD
|
||||
CheckClockGettime
|
||||
|
@ -4280,6 +4361,19 @@ case "$host" in
|
|||
SOURCES="$SOURCES $srcdir/src/misc/riscos/*.c"
|
||||
have_misc=yes
|
||||
|
||||
# Set up files for the video library
|
||||
if test x$enable_video = xyes; then
|
||||
AC_DEFINE(SDL_VIDEO_DRIVER_RISCOS, 1, [ ])
|
||||
SOURCES="$SOURCES $srcdir/src/video/riscos/*.c"
|
||||
have_video=yes
|
||||
SUMMARY_video="${SUMMARY_video} riscos"
|
||||
fi
|
||||
# Set up files for the filesystem library
|
||||
if test x$enable_filesystem = xyes; then
|
||||
AC_DEFINE(SDL_FILESYSTEM_RISCOS, 1, [ ])
|
||||
SOURCES="$SOURCES $srcdir/src/filesystem/riscos/*.c"
|
||||
have_filesystem=yes
|
||||
fi
|
||||
# Set up files for the timer library
|
||||
if test x$enable_timers = xyes; then
|
||||
AC_DEFINE(SDL_TIMER_UNIX, 1, [ ])
|
||||
|
@ -4435,8 +4529,7 @@ if test "x$enable_rpath" = "xyes" -a "x$enable_shared" = "xyes"; then
|
|||
have_enable_new_dtags=no
|
||||
save_LDFLAGS="$LDFLAGS"
|
||||
LDFLAGS="$LDFLAGS -Wl,--enable-new-dtags"
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
||||
]],[])], [
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [
|
||||
have_enable_new_dtags=yes
|
||||
SDL_RLD_FLAGS="$SDL_RLD_FLAGS -Wl,--enable-new-dtags"
|
||||
],[])
|
||||
|
|
12
externals/SDL/debian/changelog
vendored
12
externals/SDL/debian/changelog
vendored
|
@ -1,3 +1,15 @@
|
|||
libsdl2 (2.0.18) UNRELEASED; urgency=low
|
||||
|
||||
* Updated SDL to version 2.0.18
|
||||
|
||||
-- Sam Lantinga <slouken@libsdl.org> Fri, 26 Nov 2021 08:07:21 -0800
|
||||
|
||||
libsdl2 (2.0.17) UNRELEASED; urgency=low
|
||||
|
||||
* Updated SDL to version 2.0.17
|
||||
|
||||
-- Sam Lantinga <slouken@libsdl.org> Tue, 10 Aug 2021 15:00:14 -0800
|
||||
|
||||
libsdl2 (2.0.16) UNRELEASED; urgency=low
|
||||
|
||||
* Updated SDL to version 2.0.16
|
||||
|
|
1
externals/SDL/debian/control
vendored
1
externals/SDL/debian/control
vendored
|
@ -31,6 +31,7 @@ Build-Depends: debhelper (>= 9),
|
|||
libx11-dev,
|
||||
libxcursor-dev,
|
||||
libxext-dev,
|
||||
libxfixes-dev,
|
||||
libxi-dev,
|
||||
libxinerama-dev,
|
||||
libxkbcommon-dev,
|
||||
|
|
22
externals/SDL/docs/README-ios.md
vendored
22
externals/SDL/docs/README-ios.md
vendored
|
@ -23,21 +23,9 @@ There are three build targets:
|
|||
Build SDL for iOS from the command line
|
||||
==============================================================================
|
||||
|
||||
1. cd (PATH WHERE THE SDL CODE IS)/build-scripts
|
||||
2. ./iosbuild.sh
|
||||
1. cd (PATH WHERE THE SDL CODE IS)
|
||||
2. xcodebuild -project Xcode/SDL/SDL.xcodeproj -target 'Static Library-iOS' -configuration Release -sdk iphoneos13.2 clean build
|
||||
|
||||
If everything goes fine, you should see a build/ios directory, inside there's
|
||||
two directories "lib" and "include".
|
||||
"include" contains a copy of the SDL headers that you'll need for your project,
|
||||
make sure to configure XCode to look for headers there.
|
||||
"lib" contains find two files, libSDL2.a and libSDL2main.a, you have to add both
|
||||
to your XCode project. These libraries contain three architectures in them,
|
||||
armv6 for legacy devices, armv7, and i386 (for the simulator).
|
||||
By default, iosbuild.sh will autodetect the SDK version you have installed using
|
||||
xcodebuild -showsdks, and build for iOS >= 3.0, you can override this behaviour
|
||||
by setting the MIN_OS_VERSION variable, ie:
|
||||
|
||||
MIN_OS_VERSION=4.2 ./iosbuild.sh
|
||||
|
||||
Using the Simple DirectMedia Layer for iOS
|
||||
==============================================================================
|
||||
|
@ -191,6 +179,12 @@ SDL_bool SDL_IsTextInputActive()
|
|||
-- returns whether or not text events are enabled (and the onscreen keyboard is visible)
|
||||
|
||||
|
||||
Notes -- Mouse
|
||||
==============================================================================
|
||||
|
||||
iOS now supports Bluetooth mice on iPad, but by default will provide the mouse input as touch. In order for SDL to see the real mouse events, you should set the key UIApplicationSupportsIndirectInputEvents to true in your Info.plist
|
||||
|
||||
|
||||
Notes -- Reading and Writing files
|
||||
==============================================================================
|
||||
|
||||
|
|
15
externals/SDL/docs/README-linux.md
vendored
15
externals/SDL/docs/README-linux.md
vendored
|
@ -16,15 +16,28 @@ Ubuntu 20.04, all available features enabled:
|
|||
|
||||
sudo apt-get install build-essential git make cmake autoconf automake \
|
||||
libtool pkg-config libasound2-dev libpulse-dev libaudio-dev libjack-dev \
|
||||
libx11-dev libxext-dev libxrandr-dev libxcursor-dev libxi-dev \
|
||||
libx11-dev libxext-dev libxrandr-dev libxcursor-dev libxfixes-dev libxi-dev \
|
||||
libxinerama-dev libxxf86vm-dev libxss-dev libgl1-mesa-dev libdbus-1-dev \
|
||||
libudev-dev libgles2-mesa-dev libegl1-mesa-dev libibus-1.0-dev \
|
||||
fcitx-libs-dev libsamplerate0-dev libsndio-dev libwayland-dev \
|
||||
libxkbcommon-dev libdrm-dev libgbm-dev
|
||||
|
||||
Fedora 35, all available features enabled:
|
||||
|
||||
sudo yum install gcc git-core make cmake autoconf automake libtool \
|
||||
alsa-lib-devel pulseaudio-libs-devel nas-devel pipewire-devel \
|
||||
libX11-devel libXext-devel libXrandr-devel libXcursor-devel libXfixes-devel \
|
||||
libXi-devel libXinerama-devel libXxf86vm-devel libXScrnSaver-devel \
|
||||
dbus-devel ibus-devel fcitx-devel systemd-devel mesa-libGL-devel \
|
||||
libxkbcommon-devel mesa-libGLES-devel mesa-libEGL-devel vulkan-devel \
|
||||
wayland-devel wayland-protocols-devel libdrm-devel mesa-libgbm-devel \
|
||||
libusb-devel pipewire-jack-audio-connection-kit-devel libdecor-devel \
|
||||
libsamplerate-devel
|
||||
|
||||
NOTES:
|
||||
- This includes all the audio targets except arts and esd, because Ubuntu
|
||||
(and/or Debian) pulled their packages, but in theory SDL still supports them.
|
||||
The sndio audio target is also unavailable on Fedora.
|
||||
- libsamplerate0-dev lets SDL optionally link to libresamplerate at runtime
|
||||
for higher-quality audio resampling. SDL will work without it if the library
|
||||
is missing, so it's safe to build in support even if the end user doesn't
|
||||
|
|
286
externals/SDL/docs/README-macos.md
vendored
Executable file
286
externals/SDL/docs/README-macos.md
vendored
Executable file
|
@ -0,0 +1,286 @@
|
|||
# Mac OS X (aka macOS).
|
||||
|
||||
These instructions are for people using Apple's Mac OS X (pronounced
|
||||
"ten"), which in newer versions is just referred to as "macOS".
|
||||
|
||||
From the developer's point of view, macOS is a sort of hybrid Mac and
|
||||
Unix system, and you have the option of using either traditional
|
||||
command line tools or Apple's IDE Xcode.
|
||||
|
||||
# Command Line Build
|
||||
|
||||
To build SDL using the command line, use the standard configure and make
|
||||
process:
|
||||
|
||||
```bash
|
||||
mkdir build
|
||||
cd build
|
||||
../configure
|
||||
make
|
||||
sudo make install
|
||||
```
|
||||
|
||||
CMake is also known to work, although it continues to be a work in progress:
|
||||
|
||||
```bash
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DCMAKE_BUILD_TYPE=Release ..
|
||||
make
|
||||
sudo make install
|
||||
```
|
||||
|
||||
|
||||
You can also build SDL as a Universal library (a single binary for both
|
||||
64-bit Intel and ARM architectures), by using the build-scripts/clang-fat.sh
|
||||
script.
|
||||
|
||||
```bash
|
||||
mkdir build
|
||||
cd build
|
||||
CC=$PWD/../build-scripts/clang-fat.sh ../configure
|
||||
make
|
||||
sudo make install
|
||||
```
|
||||
|
||||
This script builds SDL with 10.6 ABI compatibility on 64-bit Intel and 11.0
|
||||
ABI compatibility on ARM64 architectures. For best compatibility you
|
||||
should compile your application the same way.
|
||||
|
||||
Please note that building SDL requires at least Xcode 4.6 and the 10.7 SDK
|
||||
(even if you target back to 10.6 systems). PowerPC support for Mac OS X has
|
||||
been officially dropped as of SDL 2.0.2. 32-bit Intel, using an older Xcode
|
||||
release, is still supported at the time of this writing, but current Xcode
|
||||
releases no longer support it, and eventually neither will SDL.
|
||||
|
||||
To use the library once it's built, you essential have two possibilities:
|
||||
use the traditional autoconf/automake/make method, or use Xcode.
|
||||
|
||||
|
||||
# Caveats for using SDL with Mac OS X
|
||||
|
||||
If you register your own NSApplicationDelegate (using [NSApp setDelegate:]),
|
||||
SDL will not register its own. This means that SDL will not terminate using
|
||||
SDL_Quit if it receives a termination request, it will terminate like a
|
||||
normal app, and it will not send a SDL_DROPFILE when you request to open a
|
||||
file with the app. To solve these issues, put the following code in your
|
||||
NSApplicationDelegate implementation:
|
||||
|
||||
|
||||
```objc
|
||||
- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender
|
||||
{
|
||||
if (SDL_GetEventState(SDL_QUIT) == SDL_ENABLE) {
|
||||
SDL_Event event;
|
||||
event.type = SDL_QUIT;
|
||||
SDL_PushEvent(&event);
|
||||
}
|
||||
|
||||
return NSTerminateCancel;
|
||||
}
|
||||
|
||||
- (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)filename
|
||||
{
|
||||
if (SDL_GetEventState(SDL_DROPFILE) == SDL_ENABLE) {
|
||||
SDL_Event event;
|
||||
event.type = SDL_DROPFILE;
|
||||
event.drop.file = SDL_strdup([filename UTF8String]);
|
||||
return (SDL_PushEvent(&event) > 0);
|
||||
}
|
||||
|
||||
return NO;
|
||||
}
|
||||
```
|
||||
|
||||
# Using the Simple DirectMedia Layer with a traditional Makefile
|
||||
|
||||
An existing autoconf/automake build system for your SDL app has good chances
|
||||
to work almost unchanged on macOS. However, to produce a "real" Mac binary
|
||||
that you can distribute to users, you need to put the generated binary into a
|
||||
so called "bundle", which is basically a fancy folder with a name like
|
||||
"MyCoolGame.app".
|
||||
|
||||
To get this build automatically, add something like the following rule to
|
||||
your Makefile.am:
|
||||
|
||||
```make
|
||||
bundle_contents = APP_NAME.app/Contents
|
||||
APP_NAME_bundle: EXE_NAME
|
||||
mkdir -p $(bundle_contents)/MacOS
|
||||
mkdir -p $(bundle_contents)/Resources
|
||||
echo "APPL????" > $(bundle_contents)/PkgInfo
|
||||
$(INSTALL_PROGRAM) $< $(bundle_contents)/MacOS/
|
||||
```
|
||||
|
||||
You should replace `EXE_NAME` with the name of the executable. `APP_NAME` is
|
||||
what will be visible to the user in the Finder. Usually it will be the same
|
||||
as `EXE_NAME` but capitalized. E.g. if `EXE_NAME` is "testgame" then `APP_NAME`
|
||||
usually is "TestGame". You might also want to use `@PACKAGE@` to use the
|
||||
package name as specified in your configure.ac file.
|
||||
|
||||
If your project builds more than one application, you will have to do a bit
|
||||
more. For each of your target applications, you need a separate rule.
|
||||
|
||||
If you want the created bundles to be installed, you may want to add this
|
||||
rule to your Makefile.am:
|
||||
|
||||
```make
|
||||
install-exec-hook: APP_NAME_bundle
|
||||
rm -rf $(DESTDIR)$(prefix)/Applications/APP_NAME.app
|
||||
mkdir -p $(DESTDIR)$(prefix)/Applications/
|
||||
cp -r $< /$(DESTDIR)$(prefix)Applications/
|
||||
```
|
||||
|
||||
This rule takes the Bundle created by the rule from step 3 and installs them
|
||||
into "$(DESTDIR)$(prefix)/Applications/".
|
||||
|
||||
Again, if you want to install multiple applications, you will have to augment
|
||||
the make rule accordingly.
|
||||
|
||||
But beware! That is only part of the story! With the above, you end up with
|
||||
a barebones .app bundle, which is double-clickable from the Finder. But
|
||||
there are some more things you should do before shipping your product...
|
||||
|
||||
1. The bundle right now probably is dynamically linked against SDL. That
|
||||
means that when you copy it to another computer, *it will not run*,
|
||||
unless you also install SDL on that other computer. A good solution
|
||||
for this dilemma is to static link against SDL. On OS X, you can
|
||||
achieve that by linking against the libraries listed by
|
||||
|
||||
```bash
|
||||
sdl-config --static-libs
|
||||
```
|
||||
|
||||
instead of those listed by
|
||||
|
||||
```bash
|
||||
sdl-config --libs
|
||||
```
|
||||
|
||||
Depending on how exactly SDL is integrated into your build systems, the
|
||||
way to achieve that varies, so I won't describe it here in detail
|
||||
|
||||
2. Add an 'Info.plist' to your application. That is a special XML file which
|
||||
contains some meta-information about your application (like some copyright
|
||||
information, the version of your app, the name of an optional icon file,
|
||||
and other things). Part of that information is displayed by the Finder
|
||||
when you click on the .app, or if you look at the "Get Info" window.
|
||||
More information about Info.plist files can be found on Apple's homepage.
|
||||
|
||||
|
||||
As a final remark, let me add that I use some of the techniques (and some
|
||||
variations of them) in [Exult](https://github.com/exult/exult) and
|
||||
[ScummVM](https://github.com/scummvm/scummvm); both are available in source on
|
||||
the net, so feel free to take a peek at them for inspiration!
|
||||
|
||||
|
||||
# Using the Simple DirectMedia Layer with Xcode
|
||||
|
||||
These instructions are for using Apple's Xcode IDE to build SDL applications.
|
||||
|
||||
## First steps
|
||||
|
||||
The first thing to do is to unpack the Xcode.tar.gz archive in the
|
||||
top level SDL directory (where the Xcode.tar.gz archive resides).
|
||||
Because Stuffit Expander will unpack the archive into a subdirectory,
|
||||
you should unpack the archive manually from the command line:
|
||||
|
||||
```bash
|
||||
cd [path_to_SDL_source]
|
||||
tar zxf Xcode.tar.gz
|
||||
```
|
||||
|
||||
This will create a new folder called Xcode, which you can browse
|
||||
normally from the Finder.
|
||||
|
||||
## Building the Framework
|
||||
|
||||
The SDL Library is packaged as a framework bundle, an organized
|
||||
relocatable folder hierarchy of executable code, interface headers,
|
||||
and additional resources. For practical purposes, you can think of a
|
||||
framework as a more user and system-friendly shared library, whose library
|
||||
file behaves more or less like a standard UNIX shared library.
|
||||
|
||||
To build the framework, simply open the framework project and build it.
|
||||
By default, the framework bundle "SDL.framework" is installed in
|
||||
/Library/Frameworks. Therefore, the testers and project stationary expect
|
||||
it to be located there. However, it will function the same in any of the
|
||||
following locations:
|
||||
|
||||
* ~/Library/Frameworks
|
||||
* /Local/Library/Frameworks
|
||||
* /System/Library/Frameworks
|
||||
|
||||
## Build Options
|
||||
|
||||
There are two "Build Styles" (See the "Targets" tab) for SDL.
|
||||
"Deployment" should be used if you aren't tweaking the SDL library.
|
||||
"Development" should be used to debug SDL apps or the library itself.
|
||||
|
||||
## Building the Testers
|
||||
|
||||
Open the SDLTest project and build away!
|
||||
|
||||
## Using the Project Stationary
|
||||
|
||||
Copy the stationary to the indicated folders to access it from
|
||||
the "New Project" and "Add target" menus. What could be easier?
|
||||
|
||||
## Setting up a new project by hand
|
||||
|
||||
Some of you won't want to use the Stationary so I'll give some tips:
|
||||
|
||||
(this is accurate as of Xcode 12.5.)
|
||||
|
||||
* Click "File" -> "New" -> "Project...
|
||||
* Choose "macOS" and then "App" from the "Application" section.
|
||||
* Fill out the options in the next window. User interface is "XIB" and
|
||||
Language is "Objective-C".
|
||||
* Remove "main.m" from your project
|
||||
* Remove "MainMenu.xib" from your project
|
||||
* Remove "AppDelegates.*" from your project
|
||||
* Add "$(HOME)/Library/Frameworks/SDL.framework/Headers" to include path
|
||||
* Add "$(HOME)/Library/Frameworks" to the frameworks search path
|
||||
* Add "-framework SDL -framework Foundation -framework AppKit" to "OTHER_LDFLAGS"
|
||||
* Add your files
|
||||
* Clean and build
|
||||
|
||||
## Building from command line
|
||||
|
||||
Use `xcode-build` in the same directory as your .pbxproj file
|
||||
|
||||
## Running your app
|
||||
|
||||
You can send command line args to your app by either invoking it from
|
||||
the command line (in *.app/Contents/MacOS) or by entering them in the
|
||||
Executables" panel of the target settings.
|
||||
|
||||
# Implementation Notes
|
||||
|
||||
Some things that may be of interest about how it all works...
|
||||
|
||||
## Working directory
|
||||
|
||||
In SDL 1.2, the working directory of your SDL app is by default set to its
|
||||
parent, but this is no longer the case in SDL 2.0. SDL2 does change the
|
||||
working directory, which means it'll be whatever the command line prompt
|
||||
that launched the program was using, or if launched by double-clicking in
|
||||
the finger, it will be "/", the _root of the filesystem_. Plan accordingly!
|
||||
You can use SDL_GetBasePath() to find where the program is running from and
|
||||
chdir() there directly.
|
||||
|
||||
|
||||
## You have a Cocoa App!
|
||||
|
||||
Your SDL app is essentially a Cocoa application. When your app
|
||||
starts up and the libraries finish loading, a Cocoa procedure is called,
|
||||
which sets up the working directory and calls your main() method.
|
||||
You are free to modify your Cocoa app with generally no consequence
|
||||
to SDL. You cannot, however, easily change the SDL window itself.
|
||||
Functionality may be added in the future to help this.
|
||||
|
||||
# Bug reports
|
||||
|
||||
Bugs are tracked at [the GitHub issue tracker](https://github.com/libsdl-org/SDL/issues/).
|
||||
Please feel free to report bugs there!
|
||||
|
44
externals/SDL/docs/README-os2.md
vendored
44
externals/SDL/docs/README-os2.md
vendored
|
@ -3,9 +3,9 @@ Simple DirectMedia Layer 2 for OS/2 & eComStation
|
|||
SDL port for OS/2, authored by Andrey Vasilkin <digi@os2.snc.ru>, 2016
|
||||
|
||||
|
||||
OpenGL, joystick and audio capture not supported by this port.
|
||||
OpenGL and audio capture not supported by this port.
|
||||
|
||||
Additional environment variables (optional) for OS/2 version:
|
||||
Additional optional environment variables:
|
||||
|
||||
SDL_AUDIO_SHARE
|
||||
Values: 0 or 1, default is 0
|
||||
|
@ -33,7 +33,7 @@ Compiling:
|
|||
|
||||
Open Watcom 1.9 or newer is tested. For the new Open Watcom V2 fork, see:
|
||||
https://github.com/open-watcom/ and https://open-watcom.github.io
|
||||
WATCOM ervironment variable must to be set to the Open Watcom install
|
||||
WATCOM environment variable must to be set to the Open Watcom install
|
||||
directory. To compile, run: wmake -f Makefile.os2
|
||||
|
||||
|
||||
|
@ -52,3 +52,41 @@ Installing:
|
|||
version installed, close all SDL2 applications before replacing the old
|
||||
copy. Also make sure that any other older versions of DLLs are removed
|
||||
from your system.
|
||||
|
||||
|
||||
Joysticks in SDL2:
|
||||
------------------
|
||||
|
||||
The joystick code in SDL2 is a direct forward-port from the SDL-1.2 version.
|
||||
Here is the original documentation from SDL-1.2:
|
||||
|
||||
The Joystick detection only works for standard joysticks (2 buttons, 2 axes
|
||||
and the like). Therefore, if you use a non-standard joystick, you should
|
||||
specify its features in the SDL_OS2_JOYSTICK environment variable in a batch
|
||||
file or CONFIG.SYS, so SDL applications can provide full capability to your
|
||||
device. The syntax is:
|
||||
|
||||
SET SDL_OS2_JOYSTICK=[JOYSTICK_NAME] [AXES] [BUTTONS] [HATS] [BALLS]
|
||||
|
||||
So, it you have a Gravis GamePad with 4 axes, 2 buttons, 2 hats and 0 balls,
|
||||
the line should be:
|
||||
|
||||
SET SDL_OS2_JOYSTICK=Gravis_GamePad 4 2 2 0
|
||||
|
||||
If you want to add spaces in your joystick name, just surround it with
|
||||
quotes or double-quotes:
|
||||
|
||||
SET SDL_OS2_JOYSTICK='Gravis GamePad' 4 2 2 0
|
||||
|
||||
or
|
||||
|
||||
SET SDL_OS2_JOYSTICK="Gravis GamePad" 4 2 2 0
|
||||
|
||||
Note however that Balls and Hats are not supported under OS/2, and the
|
||||
value will be ignored... but it is wise to define these correctly because
|
||||
in the future those can be supported.
|
||||
|
||||
Also the number of buttons is limited to 2 when using two joysticks,
|
||||
4 when using one joystick with 4 axes, 6 when using a joystick with 3 axes
|
||||
and 8 when using a joystick with 2 axes. Notice however these are limitations
|
||||
of the Joystick Port hardware, not OS/2.
|
||||
|
|
14
externals/SDL/docs/README-psp.md
vendored
14
externals/SDL/docs/README-psp.md
vendored
|
@ -9,10 +9,22 @@ Credit to
|
|||
|
||||
Building
|
||||
--------
|
||||
To build for the PSP, make sure psp-config is in the path and run:
|
||||
To build SDL2 library for the PSP, make sure psp-config is in the path and run:
|
||||
make -f Makefile.psp
|
||||
|
||||
|
||||
Getting PSP toolchain
|
||||
---------------------
|
||||
https://github.com/pspdev/psptoolchain
|
||||
|
||||
Running on PPSSPP Emulator
|
||||
--------------------------
|
||||
https://github.com/hrydgard/ppsspp
|
||||
( https://github.com/hrydgard/ppsspp/wiki/Build-instructions )
|
||||
|
||||
Compiling an HelloWorld
|
||||
-----------------------
|
||||
https://psp-dev.org/doku.php?id=tutorial:hello_world
|
||||
|
||||
To Do
|
||||
------
|
||||
|
|
54
externals/SDL/docs/README-raspberrypi.md
vendored
54
externals/SDL/docs/README-raspberrypi.md
vendored
|
@ -1,13 +1,12 @@
|
|||
Raspberry Pi
|
||||
================================================================================
|
||||
============
|
||||
|
||||
Requirements:
|
||||
|
||||
Raspbian (other Linux distros may work as well).
|
||||
|
||||
================================================================================
|
||||
Features
|
||||
================================================================================
|
||||
Features
|
||||
--------
|
||||
|
||||
* Works without X11
|
||||
* Hardware accelerated OpenGL ES 2.x
|
||||
|
@ -16,9 +15,8 @@ Raspbian (other Linux distros may work as well).
|
|||
* Hotplugging of input devices via UDEV
|
||||
|
||||
|
||||
================================================================================
|
||||
Raspbian Build Dependencies
|
||||
================================================================================
|
||||
Raspbian Build Dependencies
|
||||
---------------------------
|
||||
|
||||
sudo apt-get install libudev-dev libasound2-dev libdbus-1-dev
|
||||
|
||||
|
@ -28,18 +26,17 @@ OpenGL ES 2.x, it usually comes pre-installed, but in any case:
|
|||
sudo apt-get install libraspberrypi0 libraspberrypi-bin libraspberrypi-dev
|
||||
|
||||
|
||||
================================================================================
|
||||
NEON
|
||||
================================================================================
|
||||
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
|
||||
================================================================================
|
||||
|
||||
Cross compiling from x86 Linux
|
||||
------------------------------
|
||||
|
||||
To cross compile SDL for Raspbian from your desktop machine, you'll need a
|
||||
Raspbian system root and the cross compilation tools. We'll assume these tools
|
||||
|
@ -92,9 +89,8 @@ To be able to deploy this to /usr/local in the Raspbian system you need to fix u
|
|||
|
||||
perl -w -pi -e "s#$PWD/rpi-sdl2-installed#/usr/local#g;" ./rpi-sdl2-installed/lib/libSDL2.la ./rpi-sdl2-installed/lib/pkgconfig/sdl2.pc ./rpi-sdl2-installed/bin/sdl2-config
|
||||
|
||||
================================================================================
|
||||
Apps don't work or poor video/audio performance
|
||||
================================================================================
|
||||
Apps don't work or poor video/audio performance
|
||||
-----------------------------------------------
|
||||
|
||||
If you get sound problems, buffer underruns, etc, run "sudo rpi-update" to
|
||||
update the RPi's firmware. Note that doing so will fix these problems, but it
|
||||
|
@ -108,17 +104,15 @@ See here how to configure this setting: http://elinux.org/RPiconfig
|
|||
Using a fixed gpu_mem=128 is the best option (specially if you updated the
|
||||
firmware, using CMA probably won't work, at least it's the current case).
|
||||
|
||||
================================================================================
|
||||
No input
|
||||
================================================================================
|
||||
No input
|
||||
--------
|
||||
|
||||
Make sure you belong to the "input" group.
|
||||
|
||||
sudo usermod -aG input `whoami`
|
||||
|
||||
================================================================================
|
||||
No HDMI Audio
|
||||
================================================================================
|
||||
No HDMI Audio
|
||||
-------------
|
||||
|
||||
If you notice that ALSA works but there's no audio over HDMI, try adding:
|
||||
|
||||
|
@ -128,9 +122,8 @@ to your config.txt file and reboot.
|
|||
|
||||
Reference: http://www.raspberrypi.org/phpBB3/viewtopic.php?t=5062
|
||||
|
||||
================================================================================
|
||||
Text Input API support
|
||||
================================================================================
|
||||
Text Input API support
|
||||
----------------------
|
||||
|
||||
The Text Input API is supported, with translation of scan codes done via the
|
||||
kernel symbol tables. For this to work, SDL needs access to a valid console.
|
||||
|
@ -160,9 +153,9 @@ this determining the CAPS LOCK behavior:
|
|||
|
||||
sudo dpkg-reconfigure locales
|
||||
|
||||
================================================================================
|
||||
OpenGL problems
|
||||
================================================================================
|
||||
|
||||
OpenGL problems
|
||||
---------------
|
||||
|
||||
If you have desktop OpenGL headers installed at build time in your RPi or cross
|
||||
compilation environment, support for it will be built in. However, the chipset
|
||||
|
@ -177,9 +170,8 @@ environment variable:
|
|||
|
||||
export SDL_RENDER_DRIVER=opengles2
|
||||
|
||||
================================================================================
|
||||
Notes
|
||||
================================================================================
|
||||
Notes
|
||||
-----
|
||||
|
||||
* When launching apps remotely (via SSH), SDL can prevent local keystrokes from
|
||||
leaking into the console only if it has root privileges. Launching apps locally
|
||||
|
|
41
externals/SDL/docs/README-riscos.md
vendored
Executable file
41
externals/SDL/docs/README-riscos.md
vendored
Executable file
|
@ -0,0 +1,41 @@
|
|||
RISC OS
|
||||
=======
|
||||
|
||||
Requirements:
|
||||
|
||||
* RISC OS 3.5 or later.
|
||||
* [SharedUnixLibrary](http://www.riscos.info/packages/LibraryDetails.html#SharedUnixLibraryarm).
|
||||
* [DigitalRenderer](http://www.riscos.info/packages/LibraryDetails.html#DRendererarm), for audio support.
|
||||
* [Iconv](http://www.netsurf-browser.org/projects/iconv/), for `SDL_iconv` and related functions.
|
||||
|
||||
|
||||
Compiling:
|
||||
----------
|
||||
|
||||
Currently, SDL2 for RISC OS only supports compiling with GCCSDK under Linux. Both the autoconf and CMake build systems are supported.
|
||||
|
||||
The following commands can be used to build SDL2 for RISC OS using autoconf:
|
||||
|
||||
./configure --host=arm-unknown-riscos --prefix=$GCCSDK_INSTALL_ENV --disable-gcc-atomics
|
||||
make
|
||||
make install
|
||||
|
||||
The following commands can be used to build SDL2 for RISC OS using CMake:
|
||||
|
||||
cmake -Bbuild-riscos -DCMAKE_TOOLCHAIN_FILE=$GCCSDK_INSTALL_ENV/toolchain-riscos.cmake -DRISCOS=ON -DCMAKE_INSTALL_PREFIX=$GCCSDK_INSTALL_ENV -DCMAKE_BUILD_TYPE=Release -DSDL_GCC_ATOMICS=OFF
|
||||
cmake --build build-riscos
|
||||
cmake --build build-riscos --target install
|
||||
|
||||
|
||||
Current level of implementation
|
||||
-------------------------------
|
||||
|
||||
The video driver currently provides full screen video support with keyboard and mouse input. Windowed mode is not yet supported, but is planned in the future. Only software rendering is supported.
|
||||
|
||||
The filesystem APIs return either Unix-style paths or RISC OS-style paths based on the value of the `__riscosify_control` symbol, as is standard for UnixLib functions.
|
||||
|
||||
The audio, loadso, thread and timer APIs are currently provided by UnixLib.
|
||||
|
||||
GCC atomics are currently broken on some platforms, meaning it's currently necessary to compile with `--disable-gcc-atomics` using autotools or `-DSDL_GCC_ATOMICS=OFF` using CMake.
|
||||
|
||||
The joystick, locale and power APIs are not yet implemented.
|
7
externals/SDL/docs/README-vita.md
vendored
7
externals/SDL/docs/README-vita.md
vendored
|
@ -19,7 +19,12 @@ To build for the PSVita, make sure you have vitasdk and cmake installed and run:
|
|||
|
||||
Notes
|
||||
-----
|
||||
* gles2 support is disabled by default and can be enabled by configuring with `-DVIDEO_VITA_PIB=ON`
|
||||
* gles1/gles2 support and renderers are disabled by default and can be enabled by configuring with `-DVIDEO_VITA_PVR=ON`
|
||||
These renderers support 720p and 1080i resolutions. These can be specified with:
|
||||
`SDL_setenv("VITA_RESOLUTION", "720", 1);` and `SDL_setenv("VITA_RESOLUTION", "1080", 1);`
|
||||
* gles2 support via PIB is disabled by default and can be enabled by configuring with `-DVIDEO_VITA_PIB=ON`
|
||||
* By default SDL emits mouse events for touch events on every touchscreen.
|
||||
Vita has two touchscreens, so it's recommended to use `SDL_SetHint(SDL_HINT_TOUCH_MOUSE_EVENTS, "0");` and handle touch events instead.
|
||||
Individual touchscreens can be disabled with:
|
||||
`SDL_setenv("VITA_DISABLE_TOUCH_FRONT", "1", 1);` and `SDL_setenv("VITA_DISABLE_TOUCH_BACK", "1", 1);`
|
||||
* Support for L2/R2/R3/R3 buttons, haptic feedback and gamepad led only available on PSTV, or when using external ds4 gamepad on vita.
|
2
externals/SDL/docs/README.md
vendored
2
externals/SDL/docs/README.md
vendored
|
@ -39,6 +39,7 @@ More documentation and FAQs are available online at [the wiki](http://wiki.libsd
|
|||
- [iOS](README-ios.md)
|
||||
- [Linux](README-linux.md)
|
||||
- [OS X](README-macosx.md)
|
||||
- [OS/2](README-os2.md)
|
||||
- [Native Client](README-nacl.md)
|
||||
- [Pandora](README-pandora.md)
|
||||
- [Supported Platforms](README-platforms.md)
|
||||
|
@ -62,4 +63,3 @@ Enjoy!
|
|||
|
||||
|
||||
Sam Lantinga <mailto:slouken@libsdl.org>
|
||||
|
||||
|
|
11
externals/SDL/include/SDL.h
vendored
11
externals/SDL/include/SDL.h
vendored
|
@ -42,6 +42,7 @@
|
|||
#include "SDL_filesystem.h"
|
||||
#include "SDL_gamecontroller.h"
|
||||
#include "SDL_haptic.h"
|
||||
#include "SDL_hidapi.h"
|
||||
#include "SDL_hints.h"
|
||||
#include "SDL_joystick.h"
|
||||
#include "SDL_loadso.h"
|
||||
|
@ -132,6 +133,8 @@ extern "C" {
|
|||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_InitSubSystem
|
||||
* \sa SDL_Quit
|
||||
* \sa SDL_SetMainReady
|
||||
|
@ -148,6 +151,8 @@ extern DECLSPEC int SDLCALL SDL_Init(Uint32 flags);
|
|||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_Init
|
||||
* \sa SDL_Quit
|
||||
* \sa SDL_QuitSubSystem
|
||||
|
@ -169,6 +174,8 @@ extern DECLSPEC int SDLCALL SDL_InitSubSystem(Uint32 flags);
|
|||
*
|
||||
* \param flags any of the flags used by SDL_Init(); see SDL_Init for details.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_InitSubSystem
|
||||
* \sa SDL_Quit
|
||||
*/
|
||||
|
@ -183,6 +190,8 @@ extern DECLSPEC void SDLCALL SDL_QuitSubSystem(Uint32 flags);
|
|||
*
|
||||
* The return value does not include SDL_INIT_NOPARACHUTE.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_Init
|
||||
* \sa SDL_InitSubSystem
|
||||
*/
|
||||
|
@ -205,6 +214,8 @@ extern DECLSPEC Uint32 SDLCALL SDL_WasInit(Uint32 flags);
|
|||
* application is shutdown, but it is not wise to do this from a library or
|
||||
* other dynamically loaded code.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_Init
|
||||
* \sa SDL_QuitSubSystem
|
||||
*/
|
||||
|
|
6
externals/SDL/include/SDL_assert.h
vendored
6
externals/SDL/include/SDL_assert.h
vendored
|
@ -217,6 +217,8 @@ typedef SDL_AssertState (SDLCALL *SDL_AssertionHandler)(
|
|||
* fails or NULL for the default handler
|
||||
* \param userdata a pointer that is passed to `handler`
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_GetAssertionHandler
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_SetAssertionHandler(
|
||||
|
@ -285,6 +287,8 @@ extern DECLSPEC SDL_AssertionHandler SDLCALL SDL_GetAssertionHandler(void **puse
|
|||
* \returns a list of all failed assertions or NULL if the list is empty. This
|
||||
* memory should not be modified or freed by the application.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_ResetAssertionReport
|
||||
*/
|
||||
extern DECLSPEC const SDL_AssertData * SDLCALL SDL_GetAssertionReport(void);
|
||||
|
@ -297,6 +301,8 @@ extern DECLSPEC const SDL_AssertData * SDLCALL SDL_GetAssertionReport(void);
|
|||
* no items. In addition, any previously-triggered assertions will be reset to
|
||||
* a trigger_count of zero, and their always_ignore state will be false.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_GetAssertionReport
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_ResetAssertionReport(void);
|
||||
|
|
18
externals/SDL/include/SDL_atomic.h
vendored
18
externals/SDL/include/SDL_atomic.h
vendored
|
@ -98,6 +98,8 @@ typedef int SDL_SpinLock;
|
|||
* \returns SDL_TRUE if the lock succeeded, SDL_FALSE if the lock is already
|
||||
* held.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_AtomicLock
|
||||
* \sa SDL_AtomicUnlock
|
||||
*/
|
||||
|
@ -111,6 +113,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_AtomicTryLock(SDL_SpinLock *lock);
|
|||
*
|
||||
* \param lock a pointer to a lock variable
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_AtomicTryLock
|
||||
* \sa SDL_AtomicUnlock
|
||||
*/
|
||||
|
@ -148,7 +152,7 @@ void _ReadWriteBarrier(void);
|
|||
/* This is correct for all CPUs when using GCC or Solaris Studio 12.1+. */
|
||||
#define SDL_CompilerBarrier() __asm__ __volatile__ ("" : : : "memory")
|
||||
#elif defined(__WATCOMC__)
|
||||
extern _inline void SDL_CompilerBarrier (void);
|
||||
extern __inline void SDL_CompilerBarrier(void);
|
||||
#pragma aux SDL_CompilerBarrier = "" parm [] modify exact [];
|
||||
#else
|
||||
#define SDL_CompilerBarrier() \
|
||||
|
@ -173,6 +177,8 @@ extern _inline void SDL_CompilerBarrier (void);
|
|||
*
|
||||
* For more information on these semantics, take a look at the blog post:
|
||||
* http://preshing.com/20120913/acquire-and-release-semantics
|
||||
*
|
||||
* \since This function is available since SDL 2.0.6.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_MemoryBarrierReleaseFunction(void);
|
||||
extern DECLSPEC void SDLCALL SDL_MemoryBarrierAcquireFunction(void);
|
||||
|
@ -268,6 +274,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_AtomicCAS(SDL_atomic_t *a, int oldval, int
|
|||
* \param v the desired value
|
||||
* \returns the previous value of the atomic variable.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.2.
|
||||
*
|
||||
* \sa SDL_AtomicGet
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_AtomicSet(SDL_atomic_t *a, int v);
|
||||
|
@ -281,6 +289,8 @@ extern DECLSPEC int SDLCALL SDL_AtomicSet(SDL_atomic_t *a, int v);
|
|||
* \param a a pointer to an SDL_atomic_t variable
|
||||
* \returns the current value of an atomic variable.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.2.
|
||||
*
|
||||
* \sa SDL_AtomicSet
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_AtomicGet(SDL_atomic_t *a);
|
||||
|
@ -297,6 +307,8 @@ extern DECLSPEC int SDLCALL SDL_AtomicGet(SDL_atomic_t *a);
|
|||
* \param v the desired value to add
|
||||
* \returns the previous value of the atomic variable.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.2.
|
||||
*
|
||||
* \sa SDL_AtomicDecRef
|
||||
* \sa SDL_AtomicIncRef
|
||||
*/
|
||||
|
@ -348,6 +360,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_AtomicCASPtr(void **a, void *oldval, void *
|
|||
* \param v the desired pointer value
|
||||
* \returns the previous value of the pointer.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.2.
|
||||
*
|
||||
* \sa SDL_AtomicCASPtr
|
||||
* \sa SDL_AtomicGetPtr
|
||||
*/
|
||||
|
@ -362,6 +376,8 @@ extern DECLSPEC void* SDLCALL SDL_AtomicSetPtr(void **a, void* v);
|
|||
* \param a a pointer to a pointer
|
||||
* \returns the current value of a pointer.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.2.
|
||||
*
|
||||
* \sa SDL_AtomicCASPtr
|
||||
* \sa SDL_AtomicSetPtr
|
||||
*/
|
||||
|
|
331
externals/SDL/include/SDL_audio.h
vendored
331
externals/SDL/include/SDL_audio.h
vendored
|
@ -253,7 +253,48 @@ typedef struct SDL_AudioCVT
|
|||
* order that they are normally initialized by default.
|
||||
*/
|
||||
/* @{ */
|
||||
|
||||
/**
|
||||
* Use this function to get the number of built-in audio drivers.
|
||||
*
|
||||
* This function returns a hardcoded number. This never returns a negative
|
||||
* value; if there are no drivers compiled into this build of SDL, this
|
||||
* function returns zero. The presence of a driver in this list does not mean
|
||||
* it will function, it just means SDL is capable of interacting with that
|
||||
* interface. For example, a build of SDL might have esound support, but if
|
||||
* there's no esound server available, SDL's esound driver would fail if used.
|
||||
*
|
||||
* By default, SDL tries all drivers, in its preferred order, until one is
|
||||
* found to be usable.
|
||||
*
|
||||
* \returns the number of built-in audio drivers.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_GetAudioDriver
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GetNumAudioDrivers(void);
|
||||
|
||||
/**
|
||||
* Use this function to get the name of a built in audio driver.
|
||||
*
|
||||
* The list of audio drivers is given in the order that they are normally
|
||||
* initialized by default; the drivers that seem more reasonable to choose
|
||||
* first (as far as the SDL developers believe) are earlier in the list.
|
||||
*
|
||||
* The names of drivers are all simple, low-ASCII identifiers, like "alsa",
|
||||
* "coreaudio" or "xaudio2". These never have Unicode characters, and are not
|
||||
* meant to be proper names.
|
||||
*
|
||||
* \param index the index of the audio driver; the value ranges from 0 to
|
||||
* SDL_GetNumAudioDrivers() - 1
|
||||
* \returns the name of the audio driver at the requested index, or NULL if an
|
||||
* invalid index was specified.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_GetNumAudioDrivers
|
||||
*/
|
||||
extern DECLSPEC const char *SDLCALL SDL_GetAudioDriver(int index);
|
||||
/* @} */
|
||||
|
||||
|
@ -265,7 +306,36 @@ extern DECLSPEC const char *SDLCALL SDL_GetAudioDriver(int index);
|
|||
* use. You should normally use SDL_Init() or SDL_InitSubSystem().
|
||||
*/
|
||||
/* @{ */
|
||||
|
||||
/**
|
||||
* Use this function to initialize a particular audio driver.
|
||||
*
|
||||
* This function is used internally, and should not be used unless you have a
|
||||
* specific need to designate the audio driver you want to use. You should
|
||||
* normally use SDL_Init() or SDL_InitSubSystem().
|
||||
*
|
||||
* \param driver_name the name of the desired audio driver
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_AudioQuit
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_AudioInit(const char *driver_name);
|
||||
|
||||
/**
|
||||
* Use this function to shut down audio if you initialized it with
|
||||
* SDL_AudioInit().
|
||||
*
|
||||
* This function is used internally, and should not be used unless you have a
|
||||
* specific need to specify the audio driver you want to use. You should
|
||||
* normally use SDL_Quit() or SDL_QuitSubSystem().
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_AudioInit
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_AudioQuit(void);
|
||||
/* @} */
|
||||
|
||||
|
@ -296,7 +366,7 @@ extern DECLSPEC const char *SDLCALL SDL_GetCurrentAudioDriver(void);
|
|||
*
|
||||
* This function is roughly equivalent to:
|
||||
*
|
||||
* ```c++
|
||||
* ```c
|
||||
* SDL_OpenAudioDevice(NULL, 0, desired, obtained, SDL_AUDIO_ALLOW_ANY_CHANGE);
|
||||
* ```
|
||||
*
|
||||
|
@ -327,6 +397,8 @@ extern DECLSPEC const char *SDLCALL SDL_GetCurrentAudioDriver(void);
|
|||
* audio device or failure to set up the audio thread; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_CloseAudio
|
||||
* \sa SDL_LockAudio
|
||||
* \sa SDL_PauseAudio
|
||||
|
@ -370,7 +442,7 @@ typedef Uint32 SDL_AudioDeviceID;
|
|||
* should not be called for each iteration of a loop, but rather once at the
|
||||
* start of a loop:
|
||||
*
|
||||
* ```c++
|
||||
* ```c
|
||||
* // Don't do this:
|
||||
* for (int i = 0; i < SDL_GetNumAudioDevices(0); i++)
|
||||
*
|
||||
|
@ -412,6 +484,8 @@ extern DECLSPEC int SDLCALL SDL_GetNumAudioDevices(int iscapture);
|
|||
* \returns the name of the audio device at the requested index, or NULL on
|
||||
* error.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_GetNumAudioDevices
|
||||
*/
|
||||
extern DECLSPEC const char *SDLCALL SDL_GetAudioDeviceName(int index,
|
||||
|
@ -437,6 +511,8 @@ extern DECLSPEC const char *SDLCALL SDL_GetAudioDeviceName(int index,
|
|||
* \param spec The SDL_AudioSpec to be initialized by this function.
|
||||
* \returns 0 on success, nonzero on error
|
||||
*
|
||||
* \since This function is available since SDL 2.0.16.
|
||||
*
|
||||
* \sa SDL_GetNumAudioDevices
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GetAudioDeviceSpec(int index,
|
||||
|
@ -462,6 +538,19 @@ extern DECLSPEC int SDLCALL SDL_GetAudioDeviceSpec(int index,
|
|||
* hostname/IP address for a remote audio server, or a filename in the
|
||||
* diskaudio driver.
|
||||
*
|
||||
* An opened audio device starts out paused, and should be enabled for playing
|
||||
* by calling SDL_PauseAudioDevice(devid, 0) when you are ready for your audio
|
||||
* callback function to be called. Since the audio driver may modify the
|
||||
* requested size of the audio buffer, you should allocate any local mixing
|
||||
* buffers after you open the audio device.
|
||||
*
|
||||
* The audio callback runs in a separate thread in most cases; you can prevent
|
||||
* race conditions between your callback and other threads without fully
|
||||
* pausing playback with SDL_LockAudioDevice(). For more information about the
|
||||
* callback, see SDL_AudioSpec.
|
||||
*
|
||||
* Managing the audio spec via 'desired' and 'obtained':
|
||||
*
|
||||
* When filling in the desired audio spec structure:
|
||||
*
|
||||
* - `desired->freq` should be the frequency in sample-frames-per-second (Hz).
|
||||
|
@ -510,20 +599,12 @@ extern DECLSPEC int SDLCALL SDL_GetAudioDeviceSpec(int index,
|
|||
* callback's float32 audio to int16 before feeding it to the hardware and
|
||||
* will keep the originally requested format in the `obtained` structure.
|
||||
*
|
||||
* The resulting audio specs, varying depending on hardware and on what
|
||||
* changes were allowed, will then be written back to `obtained`.
|
||||
*
|
||||
* If your application can only handle one specific data format, pass a zero
|
||||
* for `allowed_changes` and let SDL transparently handle any differences.
|
||||
*
|
||||
* An opened audio device starts out paused, and should be enabled for playing
|
||||
* by calling SDL_PauseAudioDevice(devid, 0) when you are ready for your audio
|
||||
* callback function to be called. Since the audio driver may modify the
|
||||
* requested size of the audio buffer, you should allocate any local mixing
|
||||
* buffers after you open the audio device.
|
||||
*
|
||||
* The audio callback runs in a separate thread in most cases; you can prevent
|
||||
* race conditions between your callback and other threads without fully
|
||||
* pausing playback with SDL_LockAudioDevice(). For more information about the
|
||||
* callback, see SDL_AudioSpec.
|
||||
*
|
||||
* \param device a UTF-8 string reported by SDL_GetAudioDeviceName() or a
|
||||
* driver-specific name as appropriate. NULL requests the most
|
||||
* reasonable default device.
|
||||
|
@ -570,7 +651,38 @@ typedef enum
|
|||
SDL_AUDIO_PLAYING,
|
||||
SDL_AUDIO_PAUSED
|
||||
} SDL_AudioStatus;
|
||||
|
||||
/**
|
||||
* This function is a legacy means of querying the audio device.
|
||||
*
|
||||
* New programs might want to use SDL_GetAudioDeviceStatus() instead. This
|
||||
* function is equivalent to calling...
|
||||
*
|
||||
* ```c
|
||||
* SDL_GetAudioDeviceStatus(1);
|
||||
* ```
|
||||
*
|
||||
* ...and is only useful if you used the legacy SDL_OpenAudio() function.
|
||||
*
|
||||
* \returns the SDL_AudioStatus of the audio device opened by SDL_OpenAudio().
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_GetAudioDeviceStatus
|
||||
*/
|
||||
extern DECLSPEC SDL_AudioStatus SDLCALL SDL_GetAudioStatus(void);
|
||||
|
||||
/**
|
||||
* Use this function to get the current audio state of an audio device.
|
||||
*
|
||||
* \param dev the ID of an audio device previously opened with
|
||||
* SDL_OpenAudioDevice()
|
||||
* \returns the SDL_AudioStatus of the specified audio device.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_PauseAudioDevice
|
||||
*/
|
||||
extern DECLSPEC SDL_AudioStatus SDLCALL SDL_GetAudioDeviceStatus(SDL_AudioDeviceID dev);
|
||||
/* @} *//* Audio State */
|
||||
|
||||
|
@ -584,7 +696,56 @@ extern DECLSPEC SDL_AudioStatus SDLCALL SDL_GetAudioDeviceStatus(SDL_AudioDevice
|
|||
* Silence will be written to the audio device during the pause.
|
||||
*/
|
||||
/* @{ */
|
||||
|
||||
/**
|
||||
* This function is a legacy means of pausing the audio device.
|
||||
*
|
||||
* New programs might want to use SDL_PauseAudioDevice() instead. This
|
||||
* function is equivalent to calling...
|
||||
*
|
||||
* ```c
|
||||
* SDL_PauseAudioDevice(1, pause_on);
|
||||
* ```
|
||||
*
|
||||
* ...and is only useful if you used the legacy SDL_OpenAudio() function.
|
||||
*
|
||||
* \param pause_on non-zero to pause, 0 to unpause
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_GetAudioStatus
|
||||
* \sa SDL_PauseAudioDevice
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_PauseAudio(int pause_on);
|
||||
|
||||
/**
|
||||
* Use this function to pause and unpause audio playback on a specified
|
||||
* device.
|
||||
*
|
||||
* This function pauses and unpauses the audio callback processing for a given
|
||||
* device. Newly-opened audio devices start in the paused state, so you must
|
||||
* call this function with **pause_on**=0 after opening the specified audio
|
||||
* device to start playing sound. This allows you to safely initialize data
|
||||
* for your callback function after opening the audio device. Silence will be
|
||||
* written to the audio device while paused, and the audio callback is
|
||||
* guaranteed to not be called. Pausing one device does not prevent other
|
||||
* unpaused devices from running their callbacks.
|
||||
*
|
||||
* Pausing state does not stack; even if you pause a device several times, a
|
||||
* single unpause will start the device playing again, and vice versa. This is
|
||||
* different from how SDL_LockAudioDevice() works.
|
||||
*
|
||||
* If you just need to protect a few variables from race conditions vs your
|
||||
* callback, you shouldn't pause the audio device, as it will lead to dropouts
|
||||
* in the audio playback. Instead, you should use SDL_LockAudioDevice().
|
||||
*
|
||||
* \param dev a device opened by SDL_OpenAudioDevice()
|
||||
* \param pause_on non-zero to pause, 0 to unpause
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_LockAudioDevice
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_PauseAudioDevice(SDL_AudioDeviceID dev,
|
||||
int pause_on);
|
||||
/* @} *//* Pause audio functions */
|
||||
|
@ -633,14 +794,14 @@ extern DECLSPEC void SDLCALL SDL_PauseAudioDevice(SDL_AudioDeviceID dev,
|
|||
*
|
||||
* Example:
|
||||
*
|
||||
* ```c++
|
||||
* ```c
|
||||
* SDL_LoadWAV_RW(SDL_RWFromFile("sample.wav", "rb"), 1, &spec, &buf, &len);
|
||||
* ```
|
||||
*
|
||||
* Note that the SDL_LoadWAV macro does this same thing for you, but in a less
|
||||
* messy way:
|
||||
*
|
||||
* ```c++
|
||||
* ```c
|
||||
* SDL_LoadWAV("sample.wav", &spec, &buf, &len);
|
||||
* ```
|
||||
*
|
||||
|
@ -665,6 +826,8 @@ extern DECLSPEC void SDLCALL SDL_PauseAudioDevice(SDL_AudioDeviceID dev,
|
|||
* When the application is done with the data returned in
|
||||
* `audio_buf`, it should call SDL_FreeWAV() to dispose of it.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_FreeWAV
|
||||
* \sa SDL_LoadWAV
|
||||
*/
|
||||
|
@ -691,6 +854,8 @@ extern DECLSPEC SDL_AudioSpec *SDLCALL SDL_LoadWAV_RW(SDL_RWops * src,
|
|||
* \param audio_buf a pointer to the buffer created by SDL_LoadWAV() or
|
||||
* SDL_LoadWAV_RW()
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_LoadWAV
|
||||
* \sa SDL_LoadWAV_RW
|
||||
*/
|
||||
|
@ -724,6 +889,8 @@ extern DECLSPEC void SDLCALL SDL_FreeWAV(Uint8 * audio_buf);
|
|||
* or a negative error code on failure; call SDL_GetError() for more
|
||||
* information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_ConvertAudio
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_BuildAudioCVT(SDL_AudioCVT * cvt,
|
||||
|
@ -768,6 +935,8 @@ extern DECLSPEC int SDLCALL SDL_BuildAudioCVT(SDL_AudioCVT * cvt,
|
|||
* \returns 0 if the conversion was completed successfully or a negative error
|
||||
* code on failure; call SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_BuildAudioCVT
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_ConvertAudio(SDL_AudioCVT * cvt);
|
||||
|
@ -794,6 +963,8 @@ typedef struct _SDL_AudioStream SDL_AudioStream;
|
|||
* \param dst_rate The sampling rate of the desired audio output
|
||||
* \returns 0 on success, or -1 on error.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.7.
|
||||
*
|
||||
* \sa SDL_AudioStreamPut
|
||||
* \sa SDL_AudioStreamGet
|
||||
* \sa SDL_AudioStreamAvailable
|
||||
|
@ -816,6 +987,8 @@ extern DECLSPEC SDL_AudioStream * SDLCALL SDL_NewAudioStream(const SDL_AudioForm
|
|||
* \param len The number of bytes to write to the stream
|
||||
* \returns 0 on success, or -1 on error.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.7.
|
||||
*
|
||||
* \sa SDL_NewAudioStream
|
||||
* \sa SDL_AudioStreamGet
|
||||
* \sa SDL_AudioStreamAvailable
|
||||
|
@ -833,6 +1006,8 @@ extern DECLSPEC int SDLCALL SDL_AudioStreamPut(SDL_AudioStream *stream, const vo
|
|||
* \param len The maximum number of bytes to fill
|
||||
* \returns the number of bytes read from the stream, or -1 on error
|
||||
*
|
||||
* \since This function is available since SDL 2.0.7.
|
||||
*
|
||||
* \sa SDL_NewAudioStream
|
||||
* \sa SDL_AudioStreamPut
|
||||
* \sa SDL_AudioStreamAvailable
|
||||
|
@ -849,6 +1024,8 @@ extern DECLSPEC int SDLCALL SDL_AudioStreamGet(SDL_AudioStream *stream, void *bu
|
|||
* resample correctly, so this number might be lower than what you expect, or
|
||||
* even be zero. Add more data or flush the stream if you need the data now.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.7.
|
||||
*
|
||||
* \sa SDL_NewAudioStream
|
||||
* \sa SDL_AudioStreamPut
|
||||
* \sa SDL_AudioStreamGet
|
||||
|
@ -866,6 +1043,8 @@ extern DECLSPEC int SDLCALL SDL_AudioStreamAvailable(SDL_AudioStream *stream);
|
|||
* audio gaps in the output. Generally this is intended to signal the end of
|
||||
* input, so the complete output becomes available.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.7.
|
||||
*
|
||||
* \sa SDL_NewAudioStream
|
||||
* \sa SDL_AudioStreamPut
|
||||
* \sa SDL_AudioStreamGet
|
||||
|
@ -878,6 +1057,8 @@ extern DECLSPEC int SDLCALL SDL_AudioStreamFlush(SDL_AudioStream *stream);
|
|||
/**
|
||||
* Clear any pending data in the stream without converting it
|
||||
*
|
||||
* \since This function is available since SDL 2.0.7.
|
||||
*
|
||||
* \sa SDL_NewAudioStream
|
||||
* \sa SDL_AudioStreamPut
|
||||
* \sa SDL_AudioStreamGet
|
||||
|
@ -890,6 +1071,8 @@ extern DECLSPEC void SDLCALL SDL_AudioStreamClear(SDL_AudioStream *stream);
|
|||
/**
|
||||
* Free an audio stream
|
||||
*
|
||||
* \since This function is available since SDL 2.0.7.
|
||||
*
|
||||
* \sa SDL_NewAudioStream
|
||||
* \sa SDL_AudioStreamPut
|
||||
* \sa SDL_AudioStreamGet
|
||||
|
@ -900,17 +1083,18 @@ extern DECLSPEC void SDLCALL SDL_AudioStreamClear(SDL_AudioStream *stream);
|
|||
extern DECLSPEC void SDLCALL SDL_FreeAudioStream(SDL_AudioStream *stream);
|
||||
|
||||
#define SDL_MIX_MAXVOLUME 128
|
||||
|
||||
/**
|
||||
* This function is a legacy means of mixing audio.
|
||||
*
|
||||
* This function is equivalent to calling
|
||||
* This function is equivalent to calling...
|
||||
*
|
||||
* ```c++
|
||||
* ```c
|
||||
* SDL_MixAudioFormat(dst, src, format, len, volume);
|
||||
* ```
|
||||
*
|
||||
* where `format` is the obtained format of the audio device from the legacy
|
||||
* SDL_OpenAudio() function.
|
||||
* ...where `format` is the obtained format of the audio device from the
|
||||
* legacy SDL_OpenAudio() function.
|
||||
*
|
||||
* \param dst the destination for the mixed audio
|
||||
* \param src the source audio buffer to be mixed
|
||||
|
@ -918,6 +1102,8 @@ extern DECLSPEC void SDLCALL SDL_FreeAudioStream(SDL_AudioStream *stream);
|
|||
* \param volume ranges from 0 - 128, and should be set to SDL_MIX_MAXVOLUME
|
||||
* for full audio volume
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_MixAudioFormat
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_MixAudio(Uint8 * dst, const Uint8 * src,
|
||||
|
@ -950,6 +1136,8 @@ extern DECLSPEC void SDLCALL SDL_MixAudio(Uint8 * dst, const Uint8 * src,
|
|||
* \param len the length of the audio buffer in bytes
|
||||
* \param volume ranges from 0 - 128, and should be set to SDL_MIX_MAXVOLUME
|
||||
* for full audio volume
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_MixAudioFormat(Uint8 * dst,
|
||||
const Uint8 * src,
|
||||
|
@ -987,10 +1175,9 @@ extern DECLSPEC void SDLCALL SDL_MixAudioFormat(Uint8 * dst,
|
|||
* You should not call SDL_LockAudio() on the device before queueing; SDL
|
||||
* handles locking internally for this function.
|
||||
*
|
||||
* Note that SDL2
|
||||
* [https://discourse.libsdl.org/t/sdl2-support-for-planar-audio/31263/3 does
|
||||
* not support planar audio]. You will need to resample from planar audio
|
||||
* formats into a non-planar one (see SDL_AudioFormat) before queuing audio.
|
||||
* Note that SDL2 does not support planar audio. You will need to resample
|
||||
* from planar audio formats into a non-planar one (see SDL_AudioFormat)
|
||||
* before queuing audio.
|
||||
*
|
||||
* \param dev the device ID to which we will queue audio
|
||||
* \param data the data to queue to the device for later playback
|
||||
|
@ -1131,22 +1318,112 @@ extern DECLSPEC void SDLCALL SDL_ClearQueuedAudio(SDL_AudioDeviceID dev);
|
|||
* function or you will cause deadlock.
|
||||
*/
|
||||
/* @{ */
|
||||
|
||||
/**
|
||||
* This function is a legacy means of locking the audio device.
|
||||
*
|
||||
* New programs might want to use SDL_LockAudioDevice() instead. This function
|
||||
* is equivalent to calling...
|
||||
*
|
||||
* ```c
|
||||
* SDL_LockAudioDevice(1);
|
||||
* ```
|
||||
*
|
||||
* ...and is only useful if you used the legacy SDL_OpenAudio() function.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_LockAudioDevice
|
||||
* \sa SDL_UnlockAudio
|
||||
* \sa SDL_UnlockAudioDevice
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_LockAudio(void);
|
||||
|
||||
/**
|
||||
* Use this function to lock out the audio callback function for a specified
|
||||
* device.
|
||||
*
|
||||
* The lock manipulated by these functions protects the audio callback
|
||||
* function specified in SDL_OpenAudioDevice(). During a
|
||||
* SDL_LockAudioDevice()/SDL_UnlockAudioDevice() pair, you can be guaranteed
|
||||
* that the callback function for that device is not running, even if the
|
||||
* device is not paused. While a device is locked, any other unpaused,
|
||||
* unlocked devices may still run their callbacks.
|
||||
*
|
||||
* Calling this function from inside your audio callback is unnecessary. SDL
|
||||
* obtains this lock before calling your function, and releases it when the
|
||||
* function returns.
|
||||
*
|
||||
* You should not hold the lock longer than absolutely necessary. If you hold
|
||||
* it too long, you'll experience dropouts in your audio playback. Ideally,
|
||||
* your application locks the device, sets a few variables and unlocks again.
|
||||
* Do not do heavy work while holding the lock for a device.
|
||||
*
|
||||
* It is safe to lock the audio device multiple times, as long as you unlock
|
||||
* it an equivalent number of times. The callback will not run until the
|
||||
* device has been unlocked completely in this way. If your application fails
|
||||
* to unlock the device appropriately, your callback will never run, you might
|
||||
* hear repeating bursts of audio, and SDL_CloseAudioDevice() will probably
|
||||
* deadlock.
|
||||
*
|
||||
* Internally, the audio device lock is a mutex; if you lock from two threads
|
||||
* at once, not only will you block the audio callback, you'll block the other
|
||||
* thread.
|
||||
*
|
||||
* \param dev the ID of the device to be locked
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_UnlockAudioDevice
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_LockAudioDevice(SDL_AudioDeviceID dev);
|
||||
|
||||
/**
|
||||
* This function is a legacy means of unlocking the audio device.
|
||||
*
|
||||
* New programs might want to use SDL_UnlockAudioDevice() instead. This
|
||||
* function is equivalent to calling...
|
||||
*
|
||||
* ```c
|
||||
* SDL_UnlockAudioDevice(1);
|
||||
* ```
|
||||
*
|
||||
* ...and is only useful if you used the legacy SDL_OpenAudio() function.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_LockAudio
|
||||
* \sa SDL_UnlockAudioDevice
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_UnlockAudio(void);
|
||||
|
||||
/**
|
||||
* Use this function to unlock the audio callback function for a specified
|
||||
* device.
|
||||
*
|
||||
* This function should be paired with a previous SDL_LockAudioDevice() call.
|
||||
*
|
||||
* \param dev the ID of the device to be unlocked
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_LockAudioDevice
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_UnlockAudioDevice(SDL_AudioDeviceID dev);
|
||||
/* @} *//* Audio lock functions */
|
||||
|
||||
/**
|
||||
* This function is a legacy means of closing the audio device.
|
||||
*
|
||||
* This function is equivalent to calling
|
||||
* This function is equivalent to calling...
|
||||
*
|
||||
* ```c++
|
||||
* ```c
|
||||
* SDL_CloseAudioDevice(1);
|
||||
* ```
|
||||
*
|
||||
* and is only useful if you used the legacy SDL_OpenAudio() function.
|
||||
* ...and is only useful if you used the legacy SDL_OpenAudio() function.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_OpenAudio
|
||||
*/
|
||||
|
@ -1170,6 +1447,8 @@ extern DECLSPEC void SDLCALL SDL_CloseAudio(void);
|
|||
*
|
||||
* \param dev an audio device previously opened with SDL_OpenAudioDevice()
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_OpenAudioDevice
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_CloseAudioDevice(SDL_AudioDeviceID dev);
|
||||
|
|
2
externals/SDL/include/SDL_bits.h
vendored
2
externals/SDL/include/SDL_bits.h
vendored
|
@ -48,7 +48,7 @@ extern "C" {
|
|||
* \return the index of the most significant bit, or -1 if the value is 0.
|
||||
*/
|
||||
#if defined(__WATCOMC__) && defined(__386__)
|
||||
extern _inline int _SDL_bsr_watcom (Uint32);
|
||||
extern __inline int _SDL_bsr_watcom(Uint32);
|
||||
#pragma aux _SDL_bsr_watcom = \
|
||||
"bsr eax, eax" \
|
||||
parm [eax] nomemory \
|
||||
|
|
2
externals/SDL/include/SDL_blendmode.h
vendored
2
externals/SDL/include/SDL_blendmode.h
vendored
|
@ -175,7 +175,7 @@ typedef enum
|
|||
* \returns an SDL_BlendMode that represents the chosen factors and
|
||||
* operations.
|
||||
*
|
||||
* \since This function is available in SDL 2.0.6.
|
||||
* \since This function is available since SDL 2.0.6.
|
||||
*
|
||||
* \sa SDL_SetRenderDrawBlendMode
|
||||
* \sa SDL_GetRenderDrawBlendMode
|
||||
|
|
13
externals/SDL/include/SDL_clipboard.h
vendored
13
externals/SDL/include/SDL_clipboard.h
vendored
|
@ -45,6 +45,8 @@ extern "C" {
|
|||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_GetClipboardText
|
||||
* \sa SDL_HasClipboardText
|
||||
*/
|
||||
|
@ -53,12 +55,15 @@ extern DECLSPEC int SDLCALL SDL_SetClipboardText(const char *text);
|
|||
/**
|
||||
* Get UTF-8 text from the clipboard, which must be freed with SDL_free().
|
||||
*
|
||||
* This functions returns NULL if there was not enough memory left for a copy
|
||||
* of the clipboard's content.
|
||||
* This functions returns empty string if there was not enough memory left for
|
||||
* a copy of the clipboard's content.
|
||||
*
|
||||
* \returns the clipboard text on success or NULL on failure; call
|
||||
* \returns the clipboard text on success or an empty string on failure; call
|
||||
* SDL_GetError() for more information. Caller must call SDL_free()
|
||||
* on the returned pointer when done with it.
|
||||
* on the returned pointer when done with it (even if there was an
|
||||
* error).
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_HasClipboardText
|
||||
* \sa SDL_SetClipboardText
|
||||
|
|
2
externals/SDL/include/SDL_config.h
vendored
2
externals/SDL/include/SDL_config.h
vendored
|
@ -43,6 +43,8 @@
|
|||
#include "SDL_config_psp.h"
|
||||
#elif defined(__OS2__)
|
||||
#include "SDL_config_os2.h"
|
||||
#elif defined(__EMSCRIPTEN__)
|
||||
#include "SDL_config_emscripten.h"
|
||||
#else
|
||||
/* This is a minimal configuration just to get SDL running on new platforms. */
|
||||
#include "SDL_config_minimal.h"
|
||||
|
|
34
externals/SDL/include/SDL_config.h.cmake
vendored
34
externals/SDL/include/SDL_config.h.cmake
vendored
|
@ -75,6 +75,7 @@
|
|||
#cmakedefine HAVE_LIBUNWIND_H 1
|
||||
|
||||
/* C library functions */
|
||||
#cmakedefine HAVE_DLOPEN 1
|
||||
#cmakedefine HAVE_MALLOC 1
|
||||
#cmakedefine HAVE_CALLOC 1
|
||||
#cmakedefine HAVE_REALLOC 1
|
||||
|
@ -203,7 +204,7 @@
|
|||
#cmakedefine HAVE_POLL 1
|
||||
#cmakedefine HAVE__EXIT 1
|
||||
|
||||
#elif __WIN32__
|
||||
#elif defined(__WIN32__)
|
||||
#cmakedefine HAVE_STDARG_H 1
|
||||
#cmakedefine HAVE_STDDEF_H 1
|
||||
#cmakedefine HAVE_FLOAT_H 1
|
||||
|
@ -221,7 +222,20 @@
|
|||
#cmakedefine HAVE_INOTIFY_INIT 1
|
||||
#cmakedefine HAVE_INOTIFY_INIT1 1
|
||||
#cmakedefine HAVE_INOTIFY 1
|
||||
#cmakedefine HAVE_O_CLOEXEC 1
|
||||
|
||||
/* Apple platforms might be building universal binaries, where Intel builds
|
||||
can use immintrin.h but other architectures can't. */
|
||||
#ifdef __APPLE__
|
||||
# if defined(__has_include) && (defined(__i386__) || defined(__x86_64))
|
||||
# if __has_include(<immintrin.h>)
|
||||
# define HAVE_IMMINTRIN_H 1
|
||||
# endif
|
||||
# endif
|
||||
#else /* non-Apple platforms can use the normal CMake check for this. */
|
||||
#cmakedefine HAVE_IMMINTRIN_H 1
|
||||
#endif
|
||||
|
||||
#cmakedefine HAVE_LIBUDEV_H 1
|
||||
#cmakedefine HAVE_LIBSAMPLERATE_H 1
|
||||
#cmakedefine HAVE_LIBDECOR_H 1
|
||||
|
@ -232,6 +246,7 @@
|
|||
#cmakedefine HAVE_DSOUND_H @HAVE_DSOUND_H@
|
||||
#cmakedefine HAVE_DINPUT_H @HAVE_DINPUT_H@
|
||||
#cmakedefine HAVE_XINPUT_H @HAVE_XINPUT_H@
|
||||
#cmakedefine HAVE_WINDOWS_GAMING_INPUT_H @HAVE_WINDOWS_GAMING_INPUT_H@
|
||||
#cmakedefine HAVE_DXGI_H @HAVE_DXGI_H@
|
||||
|
||||
#cmakedefine HAVE_MMDEVICEAPI_H @HAVE_MMDEVICEAPI_H@
|
||||
|
@ -252,6 +267,7 @@
|
|||
#cmakedefine SDL_FILE_DISABLED @SDL_FILE_DISABLED@
|
||||
#cmakedefine SDL_JOYSTICK_DISABLED @SDL_JOYSTICK_DISABLED@
|
||||
#cmakedefine SDL_HAPTIC_DISABLED @SDL_HAPTIC_DISABLED@
|
||||
#cmakedefine SDL_HIDAPI_DISABLED @SDL_HIDAPI_DISABLED@
|
||||
#cmakedefine SDL_SENSOR_DISABLED @SDL_SENSOR_DISABLED@
|
||||
#cmakedefine SDL_LOADSO_DISABLED @SDL_LOADSO_DISABLED@
|
||||
#cmakedefine SDL_RENDER_DISABLED @SDL_RENDER_DISABLED@
|
||||
|
@ -306,13 +322,13 @@
|
|||
#cmakedefine SDL_INPUT_FBSDKBIO @SDL_INPUT_FBSDKBIO@
|
||||
#cmakedefine SDL_JOYSTICK_ANDROID @SDL_JOYSTICK_ANDROID@
|
||||
#cmakedefine SDL_JOYSTICK_HAIKU @SDL_JOYSTICK_HAIKU@
|
||||
#cmakedefine SDL_JOYSTICK_WGI @SDL_JOYSTICK_WGI@
|
||||
#cmakedefine SDL_JOYSTICK_DINPUT @SDL_JOYSTICK_DINPUT@
|
||||
#cmakedefine SDL_JOYSTICK_XINPUT @SDL_JOYSTICK_XINPUT@
|
||||
#cmakedefine SDL_JOYSTICK_DUMMY @SDL_JOYSTICK_DUMMY@
|
||||
#cmakedefine SDL_JOYSTICK_IOKIT @SDL_JOYSTICK_IOKIT@
|
||||
#cmakedefine SDL_JOYSTICK_MFI @SDL_JOYSTICK_MFI@
|
||||
#cmakedefine SDL_JOYSTICK_LINUX @SDL_JOYSTICK_LINUX@
|
||||
#cmakedefine SDL_JOYSTICK_WINMM @SDL_JOYSTICK_WINMM@
|
||||
#cmakedefine SDL_JOYSTICK_OS2 @SDL_JOYSTICK_OS2@
|
||||
#cmakedefine SDL_JOYSTICK_USBHID @SDL_JOYSTICK_USBHID@
|
||||
#cmakedefine SDL_HAVE_MACHINE_JOYSTICK_H @SDL_HAVE_MACHINE_JOYSTICK_H@
|
||||
|
@ -378,6 +394,7 @@
|
|||
#cmakedefine SDL_VIDEO_DRIVER_VIVANTE_VDK @SDL_VIDEO_DRIVER_VIVANTE_VDK@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_OS2 @SDL_VIDEO_DRIVER_OS2@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_QNX @SDL_VIDEO_DRIVER_QNX@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_RISCOS @SDL_VIDEO_DRIVER_RISCOS@
|
||||
|
||||
#cmakedefine SDL_VIDEO_DRIVER_KMSDRM @SDL_VIDEO_DRIVER_KMSDRM@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC @SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC@
|
||||
|
@ -396,6 +413,7 @@
|
|||
#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC_XCURSOR @SDL_VIDEO_DRIVER_X11_DYNAMIC_XCURSOR@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA @SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2 @SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC_XFIXES @SDL_VIDEO_DRIVER_X11_DYNAMIC_XFIXES@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR @SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS @SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE @SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE@
|
||||
|
@ -404,12 +422,12 @@
|
|||
#cmakedefine SDL_VIDEO_DRIVER_X11_XINERAMA @SDL_VIDEO_DRIVER_X11_XINERAMA@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_XINPUT2 @SDL_VIDEO_DRIVER_X11_XINPUT2@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH @SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_XFIXES @SDL_VIDEO_DRIVER_X11_XFIXES@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_XRANDR @SDL_VIDEO_DRIVER_X11_XRANDR@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_XSCRNSAVER @SDL_VIDEO_DRIVER_X11_XSCRNSAVER@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_XSHAPE @SDL_VIDEO_DRIVER_X11_XSHAPE@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_XVIDMODE @SDL_VIDEO_DRIVER_X11_XVIDMODE@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS @SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_CONST_PARAM_XEXTADDDISPLAY @SDL_VIDEO_DRIVER_X11_CONST_PARAM_XEXTADDDISPLAY@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM @SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_VITA @SDL_VIDEO_DRIVER_VITA@
|
||||
|
||||
|
@ -457,6 +475,7 @@
|
|||
#cmakedefine SDL_FILESYSTEM_HAIKU @SDL_FILESYSTEM_HAIKU@
|
||||
#cmakedefine SDL_FILESYSTEM_COCOA @SDL_FILESYSTEM_COCOA@
|
||||
#cmakedefine SDL_FILESYSTEM_DUMMY @SDL_FILESYSTEM_DUMMY@
|
||||
#cmakedefine SDL_FILESYSTEM_RISCOS @SDL_FILESYSTEM_RISCOS@
|
||||
#cmakedefine SDL_FILESYSTEM_UNIX @SDL_FILESYSTEM_UNIX@
|
||||
#cmakedefine SDL_FILESYSTEM_WINDOWS @SDL_FILESYSTEM_WINDOWS@
|
||||
#cmakedefine SDL_FILESYSTEM_EMSCRIPTEN @SDL_FILESYSTEM_EMSCRIPTEN@
|
||||
|
@ -469,14 +488,21 @@
|
|||
#cmakedefine SDL_ARM_SIMD_BLITTERS @SDL_ARM_SIMD_BLITTERS@
|
||||
#cmakedefine SDL_ARM_NEON_BLITTERS @SDL_ARM_NEON_BLITTERS@
|
||||
|
||||
/* Whether SDL_DYNAMIC_API needs dlopen */
|
||||
#cmakedefine DYNAPI_NEEDS_DLOPEN @DYNAPI_NEEDS_DLOPEN@
|
||||
|
||||
/* Enable dynamic libsamplerate support */
|
||||
#cmakedefine SDL_LIBSAMPLERATE_DYNAMIC @SDL_LIBSAMPLERATE_DYNAMIC@
|
||||
|
||||
/* Enable ime support */
|
||||
#cmakedefine SDL_USE_IME @SDL_USE_IME@
|
||||
|
||||
/* Platform specific definitions */
|
||||
#cmakedefine SDL_IPHONE_KEYBOARD @SDL_IPHONE_KEYBOARD@
|
||||
#cmakedefine SDL_IPHONE_LAUNCHSCREEN @SDL_IPHONE_LAUNCHSCREEN@
|
||||
|
||||
#cmakedefine SDL_VIDEO_VITA_PIB @SDL_VIDEO_VITA_PIB@
|
||||
#cmakedefine SDL_VIDEO_VITA_PVR @SDL_VIDEO_VITA_PVR@
|
||||
|
||||
#if !defined(__WIN32__) && !defined(__WINRT__)
|
||||
# if !defined(_STDINT_H_) && !defined(_STDINT_H) && !defined(HAVE_STDINT_H) && !defined(_HAVE_STDINT_H)
|
||||
|
@ -493,7 +519,7 @@ typedef unsigned long uintptr_t;
|
|||
# endif /* if (stdint.h isn't available) */
|
||||
#else /* __WIN32__ */
|
||||
# if !defined(_STDINT_H_) && !defined(HAVE_STDINT_H) && !defined(_HAVE_STDINT_H)
|
||||
# if defined(__GNUC__) || defined(__DMC__) || defined(__WATCOMC__)
|
||||
# if defined(__GNUC__) || defined(__DMC__) || defined(__WATCOMC__) || defined(__BORLANDC__) || defined(__CODEGEARC__)
|
||||
#define HAVE_STDINT_H 1
|
||||
# elif defined(_MSC_VER)
|
||||
typedef signed __int8 int8_t;
|
||||
|
|
24
externals/SDL/include/SDL_config.h.in
vendored
24
externals/SDL/include/SDL_config.h.in
vendored
|
@ -33,7 +33,7 @@
|
|||
|
||||
/* Make sure that this isn't included by Visual C++ */
|
||||
#ifdef _MSC_VER
|
||||
#error You should run hg revert SDL_config.h
|
||||
#error You should run git checkout -f include/SDL_config.h
|
||||
#endif
|
||||
|
||||
/* C language features */
|
||||
|
@ -79,6 +79,7 @@
|
|||
#undef HAVE_LIBUNWIND_H
|
||||
|
||||
/* C library functions */
|
||||
#undef HAVE_DLOPEN
|
||||
#undef HAVE_MALLOC
|
||||
#undef HAVE_CALLOC
|
||||
#undef HAVE_REALLOC
|
||||
|
@ -214,6 +215,7 @@
|
|||
#define HAVE_STDINT_H 1
|
||||
#endif /* HAVE_LIBC */
|
||||
|
||||
#undef HAVE_O_CLOEXEC
|
||||
#undef HAVE_ALTIVEC_H
|
||||
#undef HAVE_DBUS_DBUS_H
|
||||
#undef HAVE_FCITX
|
||||
|
@ -231,15 +233,15 @@
|
|||
#undef HAVE_DINPUT_H
|
||||
#undef HAVE_DSOUND_H
|
||||
#undef HAVE_DXGI_H
|
||||
#undef HAVE_WINDOWS_GAMING_INPUT_H
|
||||
#undef HAVE_XINPUT_H
|
||||
#undef HAVE_XINPUT_GAMEPAD_EX
|
||||
#undef HAVE_XINPUT_STATE_EX
|
||||
|
||||
#undef HAVE_MMDEVICEAPI_H
|
||||
#undef HAVE_AUDIOCLIENT_H
|
||||
#undef HAVE_SENSORSAPI_H
|
||||
|
||||
#undef HAVE_XINPUT_GAMEPAD_EX
|
||||
#undef HAVE_XINPUT_STATE_EX
|
||||
|
||||
/* SDL internal assertion support */
|
||||
#undef SDL_DEFAULT_ASSERT_LEVEL
|
||||
|
||||
|
@ -251,6 +253,7 @@
|
|||
#undef SDL_FILE_DISABLED
|
||||
#undef SDL_JOYSTICK_DISABLED
|
||||
#undef SDL_HAPTIC_DISABLED
|
||||
#undef SDL_HIDAPI_DISABLED
|
||||
#undef SDL_SENSOR_DISABLED
|
||||
#undef SDL_LOADSO_DISABLED
|
||||
#undef SDL_RENDER_DISABLED
|
||||
|
@ -261,6 +264,7 @@
|
|||
#undef SDL_FILESYSTEM_DISABLED
|
||||
|
||||
/* Enable various audio drivers */
|
||||
#undef SDL_AUDIO_DRIVER_AAUDIO
|
||||
#undef SDL_AUDIO_DRIVER_ALSA
|
||||
#undef SDL_AUDIO_DRIVER_ALSA_DYNAMIC
|
||||
#undef SDL_AUDIO_DRIVER_ANDROID
|
||||
|
@ -282,6 +286,7 @@
|
|||
#undef SDL_AUDIO_DRIVER_NAS
|
||||
#undef SDL_AUDIO_DRIVER_NAS_DYNAMIC
|
||||
#undef SDL_AUDIO_DRIVER_NETBSD
|
||||
#undef SDL_AUDIO_DRIVER_OPENSLES
|
||||
#undef SDL_AUDIO_DRIVER_OSS
|
||||
#undef SDL_AUDIO_DRIVER_OSS_SOUNDCARD_H
|
||||
#undef SDL_AUDIO_DRIVER_PAUDIO
|
||||
|
@ -304,13 +309,13 @@
|
|||
#undef SDL_INPUT_WSCONS
|
||||
#undef SDL_JOYSTICK_HAIKU
|
||||
#undef SDL_JOYSTICK_DINPUT
|
||||
#undef SDL_JOYSTICK_WGI
|
||||
#undef SDL_JOYSTICK_XINPUT
|
||||
#undef SDL_JOYSTICK_DUMMY
|
||||
#undef SDL_JOYSTICK_IOKIT
|
||||
#undef SDL_JOYSTICK_MFI
|
||||
#undef SDL_JOYSTICK_LINUX
|
||||
#undef SDL_JOYSTICK_ANDROID
|
||||
#undef SDL_JOYSTICK_WINMM
|
||||
#undef SDL_JOYSTICK_OS2
|
||||
#undef SDL_JOYSTICK_USBHID
|
||||
#undef SDL_HAVE_MACHINE_JOYSTICK_H
|
||||
|
@ -374,11 +379,13 @@
|
|||
#undef SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC_GBM
|
||||
#undef SDL_VIDEO_DRIVER_ANDROID
|
||||
#undef SDL_VIDEO_DRIVER_EMSCRIPTEN
|
||||
#undef SDL_VIDEO_DRIVER_OFFSCREEN
|
||||
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC
|
||||
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT
|
||||
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XCURSOR
|
||||
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA
|
||||
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2
|
||||
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XFIXES
|
||||
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR
|
||||
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS
|
||||
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE
|
||||
|
@ -387,18 +394,19 @@
|
|||
#undef SDL_VIDEO_DRIVER_X11_XINERAMA
|
||||
#undef SDL_VIDEO_DRIVER_X11_XINPUT2
|
||||
#undef SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH
|
||||
#undef SDL_VIDEO_DRIVER_X11_XFIXES
|
||||
#undef SDL_VIDEO_DRIVER_X11_XRANDR
|
||||
#undef SDL_VIDEO_DRIVER_X11_XSCRNSAVER
|
||||
#undef SDL_VIDEO_DRIVER_X11_XSHAPE
|
||||
#undef SDL_VIDEO_DRIVER_X11_XVIDMODE
|
||||
#undef SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS
|
||||
#undef SDL_VIDEO_DRIVER_X11_CONST_PARAM_XEXTADDDISPLAY
|
||||
#undef SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM
|
||||
#undef SDL_VIDEO_DRIVER_NACL
|
||||
#undef SDL_VIDEO_DRIVER_VIVANTE
|
||||
#undef SDL_VIDEO_DRIVER_VIVANTE_VDK
|
||||
#undef SDL_VIDEO_DRIVER_OS2
|
||||
#undef SDL_VIDEO_DRIVER_QNX
|
||||
#undef SDL_VIDEO_DRIVER_RISCOS
|
||||
|
||||
#undef SDL_VIDEO_RENDER_D3D
|
||||
#undef SDL_VIDEO_RENDER_D3D11
|
||||
|
@ -445,6 +453,7 @@
|
|||
#undef SDL_FILESYSTEM_ANDROID
|
||||
#undef SDL_FILESYSTEM_EMSCRIPTEN
|
||||
#undef SDL_FILESYSTEM_OS2
|
||||
#undef SDL_FILESYSTEM_RISCOS
|
||||
|
||||
/* Enable assembly routines */
|
||||
#undef SDL_ASSEMBLY_ROUTINES
|
||||
|
@ -452,6 +461,9 @@
|
|||
#undef SDL_ARM_SIMD_BLITTERS
|
||||
#undef SDL_ARM_NEON_BLITTERS
|
||||
|
||||
/* Whether SDL_DYNAMIC_API needs dlopen() */
|
||||
#undef DYNAPI_NEEDS_DLOPEN
|
||||
|
||||
/* Enable ime support */
|
||||
#undef SDL_USE_IME
|
||||
|
||||
|
|
3
externals/SDL/include/SDL_config_android.h
vendored
3
externals/SDL/include/SDL_config_android.h
vendored
|
@ -48,6 +48,7 @@
|
|||
#define HAVE_SYS_TYPES_H 1
|
||||
|
||||
/* C library functions */
|
||||
#define HAVE_DLOPEN 1
|
||||
#define HAVE_MALLOC 1
|
||||
#define HAVE_CALLOC 1
|
||||
#define HAVE_REALLOC 1
|
||||
|
@ -142,7 +143,7 @@
|
|||
/* Enable various audio drivers */
|
||||
#define SDL_AUDIO_DRIVER_ANDROID 1
|
||||
#define SDL_AUDIO_DRIVER_OPENSLES 1
|
||||
#define SDL_AUDIO_DRIVER_AAUDIO 0
|
||||
#define SDL_AUDIO_DRIVER_AAUDIO 1
|
||||
#define SDL_AUDIO_DRIVER_DUMMY 1
|
||||
|
||||
/* Enable various input drivers */
|
||||
|
|
216
externals/SDL/include/SDL_config_emscripten.h
vendored
Executable file
216
externals/SDL/include/SDL_config_emscripten.h
vendored
Executable file
|
@ -0,0 +1,216 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2021 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_emscripten_h_
|
||||
#define _SDL_config_emscripten_h_
|
||||
|
||||
#include "SDL_platform.h"
|
||||
|
||||
/**
|
||||
* \file SDL_config_emscripten.h
|
||||
*
|
||||
* This is a configuration that can be used to build SDL for Emscripten.
|
||||
*/
|
||||
|
||||
#ifdef __LP64__
|
||||
#define SIZEOF_VOIDP 8
|
||||
#else
|
||||
#define SIZEOF_VOIDP 4
|
||||
#endif
|
||||
#define HAVE_GCC_ATOMICS 1
|
||||
|
||||
/* Useful headers */
|
||||
#define STDC_HEADERS 1
|
||||
#define HAVE_ALLOCA_H 1
|
||||
#define HAVE_CTYPE_H 1
|
||||
#define HAVE_ICONV_H 1
|
||||
#define HAVE_INTTYPES_H 1
|
||||
#define HAVE_LIMITS_H 1
|
||||
#define HAVE_MALLOC_H 1
|
||||
#define HAVE_MATH_H 1
|
||||
#define HAVE_MEMORY_H 1
|
||||
#define HAVE_SIGNAL_H 1
|
||||
#define HAVE_STDARG_H 1
|
||||
#define HAVE_STDINT_H 1
|
||||
#define HAVE_STDIO_H 1
|
||||
#define HAVE_STDLIB_H 1
|
||||
#define HAVE_STRINGS_H 1
|
||||
#define HAVE_STRING_H 1
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
#define HAVE_WCHAR_H 1
|
||||
|
||||
/* C library functions */
|
||||
#define HAVE_DLOPEN 1
|
||||
#define HAVE_MALLOC 1
|
||||
#define HAVE_CALLOC 1
|
||||
#define HAVE_REALLOC 1
|
||||
#define HAVE_FREE 1
|
||||
#define HAVE_ALLOCA 1
|
||||
#define HAVE_GETENV 1
|
||||
#define HAVE_SETENV 1
|
||||
#define HAVE_PUTENV 1
|
||||
#define HAVE_UNSETENV 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_WCSDUP 1
|
||||
#define HAVE_WCSSTR 1
|
||||
#define HAVE_WCSCMP 1
|
||||
#define HAVE_WCSNCMP 1
|
||||
#define HAVE_WCSCASECMP 1
|
||||
#define HAVE_WCSNCASECMP 1
|
||||
#define HAVE_STRLEN 1
|
||||
#define HAVE_STRLCPY 1
|
||||
#define HAVE_STRLCAT 1
|
||||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRSTR 1
|
||||
#define HAVE_STRTOK_R 1
|
||||
#define HAVE_STRTOL 1
|
||||
#define HAVE_STRTOUL 1
|
||||
#define HAVE_STRTOLL 1
|
||||
#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_STRCASECMP 1
|
||||
#define HAVE_STRNCASECMP 1
|
||||
#define HAVE_SSCANF 1
|
||||
#define HAVE_VSSCANF 1
|
||||
#define HAVE_VSNPRINTF 1
|
||||
#define HAVE_M_PI 1
|
||||
#define HAVE_ACOS 1
|
||||
#define HAVE_ACOSF 1
|
||||
#define HAVE_ASIN 1
|
||||
#define HAVE_ASINF 1
|
||||
#define HAVE_ATAN 1
|
||||
#define HAVE_ATANF 1
|
||||
#define HAVE_ATAN2 1
|
||||
#define HAVE_ATAN2F 1
|
||||
#define HAVE_CEIL 1
|
||||
#define HAVE_CEILF 1
|
||||
#define HAVE_COPYSIGN 1
|
||||
#define HAVE_COPYSIGNF 1
|
||||
#define HAVE_COS 1
|
||||
#define HAVE_COSF 1
|
||||
#define HAVE_EXP 1
|
||||
#define HAVE_EXPF 1
|
||||
#define HAVE_FABS 1
|
||||
#define HAVE_FABSF 1
|
||||
#define HAVE_FLOOR 1
|
||||
#define HAVE_FLOORF 1
|
||||
#define HAVE_FMOD 1
|
||||
#define HAVE_FMODF 1
|
||||
#define HAVE_LOG 1
|
||||
#define HAVE_LOGF 1
|
||||
#define HAVE_LOG10 1
|
||||
#define HAVE_LOG10F 1
|
||||
#define HAVE_LROUND 1
|
||||
#define HAVE_LROUNDF 1
|
||||
#define HAVE_POW 1
|
||||
#define HAVE_POWF 1
|
||||
#define HAVE_ROUND 1
|
||||
#define HAVE_ROUNDF 1
|
||||
#define HAVE_SCALBN 1
|
||||
#define HAVE_SCALBNF 1
|
||||
#define HAVE_SIN 1
|
||||
#define HAVE_SINF 1
|
||||
#define HAVE_SQRT 1
|
||||
#define HAVE_SQRTF 1
|
||||
#define HAVE_TAN 1
|
||||
#define HAVE_TANF 1
|
||||
#define HAVE_TRUNC 1
|
||||
#define HAVE_TRUNCF 1
|
||||
#define HAVE_FSEEKO 1
|
||||
#define HAVE_FSEEKO64 1
|
||||
#define HAVE_SIGACTION 1
|
||||
#define HAVE_SA_SIGACTION 1
|
||||
#define HAVE_SETJMP 1
|
||||
#define HAVE_NANOSLEEP 1
|
||||
#define HAVE_SYSCONF 1
|
||||
#define HAVE_CLOCK_GETTIME 1
|
||||
/* #undef HAVE_GETPAGESIZE */
|
||||
#define HAVE_MPROTECT 1
|
||||
#define HAVE_ICONV 1
|
||||
|
||||
/* SDL internal assertion support */
|
||||
/* #undef SDL_DEFAULT_ASSERT_LEVEL */
|
||||
|
||||
#define SDL_CPUINFO_DISABLED 1
|
||||
#define SDL_HAPTIC_DISABLED 1
|
||||
#define SDL_HIDAPI_DISABLED 1
|
||||
#ifndef __EMSCRIPTEN_PTHREADS__
|
||||
#define SDL_THREADS_DISABLED 1
|
||||
#endif
|
||||
|
||||
/* Enable various audio drivers */
|
||||
#define SDL_AUDIO_DRIVER_DISK 1
|
||||
#define SDL_AUDIO_DRIVER_DUMMY 1
|
||||
#define SDL_AUDIO_DRIVER_EMSCRIPTEN 1
|
||||
|
||||
/* Enable various input drivers */
|
||||
#define SDL_JOYSTICK_EMSCRIPTEN 1
|
||||
|
||||
/* Enable various sensor drivers */
|
||||
#define SDL_SENSOR_DUMMY 1
|
||||
|
||||
/* Enable various shared object loading systems */
|
||||
#define SDL_LOADSO_DLOPEN 1
|
||||
|
||||
/* Enable various threading systems */
|
||||
#ifdef __EMSCRIPTEN_PTHREADS__
|
||||
#define SDL_THREAD_PTHREAD 1
|
||||
#endif
|
||||
|
||||
/* Enable various timer systems */
|
||||
#define SDL_TIMER_UNIX 1
|
||||
|
||||
/* Enable various video drivers */
|
||||
#define SDL_VIDEO_DRIVER_EMSCRIPTEN 1
|
||||
|
||||
#define SDL_VIDEO_RENDER_OGL_ES2 1
|
||||
|
||||
/* Enable OpenGL support */
|
||||
/* #undef SDL_VIDEO_OPENGL */
|
||||
/* #undef SDL_VIDEO_OPENGL_ES */
|
||||
#define SDL_VIDEO_OPENGL_ES2 1
|
||||
/* #undef SDL_VIDEO_OPENGL_BGL */
|
||||
/* #undef SDL_VIDEO_OPENGL_CGL */
|
||||
/* #undef SDL_VIDEO_OPENGL_GLX */
|
||||
/* #undef SDL_VIDEO_OPENGL_WGL */
|
||||
#define SDL_VIDEO_OPENGL_EGL 1
|
||||
/* #undef SDL_VIDEO_OPENGL_OSMESA */
|
||||
/* #undef SDL_VIDEO_OPENGL_OSMESA_DYNAMIC */
|
||||
|
||||
/* Enable system power support */
|
||||
#define SDL_POWER_EMSCRIPTEN 1
|
||||
|
||||
/* Enable system filesystem support */
|
||||
#define SDL_FILESYSTEM_EMSCRIPTEN 1
|
||||
|
||||
#endif /* _SDL_config_emscripten_h_ */
|
1
externals/SDL/include/SDL_config_iphoneos.h
vendored
1
externals/SDL/include/SDL_config_iphoneos.h
vendored
|
@ -48,6 +48,7 @@
|
|||
/* #undef HAVE_LIBUNWIND_H */
|
||||
|
||||
/* C library functions */
|
||||
#define HAVE_DLOPEN 1
|
||||
#define HAVE_MALLOC 1
|
||||
#define HAVE_CALLOC 1
|
||||
#define HAVE_REALLOC 1
|
||||
|
|
6
externals/SDL/include/SDL_config_macosx.h
vendored
6
externals/SDL/include/SDL_config_macosx.h
vendored
|
@ -52,6 +52,7 @@
|
|||
#define HAVE_LIBUNWIND_H 1
|
||||
|
||||
/* C library functions */
|
||||
#define HAVE_DLOPEN 1
|
||||
#define HAVE_MALLOC 1
|
||||
#define HAVE_CALLOC 1
|
||||
#define HAVE_REALLOC 1
|
||||
|
@ -143,6 +144,10 @@
|
|||
# endif
|
||||
#endif
|
||||
|
||||
#if (MAC_OS_X_VERSION_MAX_ALLOWED >= 1070)
|
||||
#define HAVE_O_CLOEXEC 1
|
||||
#endif
|
||||
|
||||
#define HAVE_GCC_ATOMICS 1
|
||||
|
||||
/* Enable various audio drivers */
|
||||
|
@ -201,7 +206,6 @@
|
|||
*/
|
||||
#define SDL_VIDEO_DRIVER_X11_XINPUT2 1
|
||||
#define SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS 1
|
||||
#define SDL_VIDEO_DRIVER_X11_CONST_PARAM_XEXTADDDISPLAY 1
|
||||
#endif
|
||||
|
||||
#ifndef SDL_VIDEO_RENDER_OGL
|
||||
|
|
3
externals/SDL/include/SDL_config_minimal.h
vendored
3
externals/SDL/include/SDL_config_minimal.h
vendored
|
@ -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 HIDAPI */
|
||||
#define SDL_HIDAPI_DISABLED 1
|
||||
|
||||
/* Enable the stub sensor driver (src/sensor/dummy/\*.c) */
|
||||
#define SDL_SENSOR_DISABLED 1
|
||||
|
||||
|
|
9
externals/SDL/include/SDL_config_os2.h
vendored
9
externals/SDL/include/SDL_config_os2.h
vendored
|
@ -33,14 +33,14 @@
|
|||
|
||||
#define SDL_POWER_DISABLED 1
|
||||
#define SDL_HAPTIC_DISABLED 1
|
||||
#define SDL_JOYSTICK_DISABLED 1
|
||||
/*#undef SDL_JOYSTICK_OS2 */
|
||||
/*#undef SDL_JOYSTICK_HIDAPI */
|
||||
/*#undef SDL_JOYSTICK_VIRTUAL */
|
||||
|
||||
#define SDL_SENSOR_DUMMY 1
|
||||
#define SDL_VIDEO_DRIVER_DUMMY 1
|
||||
#define SDL_VIDEO_DRIVER_OS2 1
|
||||
#define SDL_JOYSTICK_OS2 1
|
||||
#define SDL_HIDAPI_DISABLED 1
|
||||
/*#undef SDL_JOYSTICK_HIDAPI */
|
||||
/*#undef SDL_JOYSTICK_VIRTUAL */
|
||||
|
||||
/* Enable OpenGL support */
|
||||
/* #undef SDL_VIDEO_OPENGL */
|
||||
|
@ -80,6 +80,7 @@
|
|||
#define HAVE_FLOAT_H 1
|
||||
#define HAVE_SIGNAL_H 1
|
||||
|
||||
/* #undef HAVE_DLOPEN */
|
||||
#define HAVE_MALLOC 1
|
||||
#define HAVE_CALLOC 1
|
||||
#define HAVE_REALLOC 1
|
||||
|
|
1
externals/SDL/include/SDL_config_pandora.h
vendored
1
externals/SDL/include/SDL_config_pandora.h
vendored
|
@ -54,6 +54,7 @@
|
|||
#define HAVE_STRING_H 1
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
|
||||
#define HAVE_DLOPEN 1
|
||||
#define HAVE_MALLOC 1
|
||||
#define HAVE_CALLOC 1
|
||||
#define HAVE_REALLOC 1
|
||||
|
|
3
externals/SDL/include/SDL_config_psp.h
vendored
3
externals/SDL/include/SDL_config_psp.h
vendored
|
@ -158,6 +158,9 @@
|
|||
/* PSP doesn't have haptic device (src/haptic/dummy/\*.c) */
|
||||
#define SDL_HAPTIC_DISABLED 1
|
||||
|
||||
/* PSP doesn't have HIDAPI available */
|
||||
#define SDL_HIDAPI_DISABLED 1
|
||||
|
||||
/* PSP can't load shared object (src/loadso/dummy/\*.c) */
|
||||
#define SDL_LOADSO_DISABLED 1
|
||||
|
||||
|
|
39
externals/SDL/include/SDL_config_windows.h
vendored
39
externals/SDL/include/SDL_config_windows.h
vendored
|
@ -25,10 +25,23 @@
|
|||
|
||||
#include "SDL_platform.h"
|
||||
|
||||
/* winsdkver.h defines _WIN32_MAXVER for SDK version detection. It is present since at least the Windows 7 SDK,
|
||||
* but out of caution we'll only use it if the compiler supports __has_include() to confirm its presence.
|
||||
* If your compiler doesn't support __has_include() but you have winsdkver.h, define HAVE_WINSDKVER_H. */
|
||||
#if !defined(HAVE_WINSDKVER_H) && defined(__has_include)
|
||||
#if __has_include(<winsdkver.h>)
|
||||
#define HAVE_WINSDKVER_H 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_WINSDKVER_H
|
||||
#include <winsdkver.h>
|
||||
#endif
|
||||
|
||||
/* This is a set of defines to configure the SDL features */
|
||||
|
||||
#if !defined(_STDINT_H_) && (!defined(HAVE_STDINT_H) || !_HAVE_STDINT_H)
|
||||
#if defined(__GNUC__) || defined(__DMC__) || defined(__WATCOMC__) || defined(__clang__)
|
||||
#if defined(__GNUC__) || defined(__DMC__) || defined(__WATCOMC__) || defined(__clang__) || defined(__BORLANDC__) || defined(__CODEGEARC__)
|
||||
#define HAVE_STDINT_H 1
|
||||
#elif defined(_MSC_VER)
|
||||
typedef signed __int8 int8_t;
|
||||
|
@ -82,6 +95,12 @@ typedef unsigned int uintptr_t;
|
|||
#define HAVE_DSOUND_H 1
|
||||
#define HAVE_DXGI_H 1
|
||||
#define HAVE_XINPUT_H 1
|
||||
#if defined(_WIN32_MAXVER) && _WIN32_MAXVER >= 0x0A00 /* Windows 10 SDK */
|
||||
#define HAVE_WINDOWS_GAMING_INPUT_H 1
|
||||
#endif
|
||||
#if defined(_WIN32_MAXVER) && _WIN32_MAXVER >= 0x0602 /* Windows 8 SDK */
|
||||
#define HAVE_D3D11_H 1
|
||||
#endif
|
||||
#define HAVE_MMDEVICEAPI_H 1
|
||||
#define HAVE_AUDIOCLIENT_H 1
|
||||
#define HAVE_SENSORSAPI_H 1
|
||||
|
@ -201,20 +220,6 @@ typedef unsigned int uintptr_t;
|
|||
#define HAVE_STDDEF_H 1
|
||||
#endif
|
||||
|
||||
/* Check to see if we have Windows 10 build environment */
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1911) /* Visual Studio 15.3 */
|
||||
#include <sdkddkver.h>
|
||||
#if _WIN32_WINNT >= 0x0601 /* Windows 7 */
|
||||
#define SDL_WINDOWS7_SDK
|
||||
#endif
|
||||
#if _WIN32_WINNT >= 0x0602 /* Windows 8 */
|
||||
#define SDL_WINDOWS8_SDK
|
||||
#endif
|
||||
#if _WIN32_WINNT >= 0x0A00 /* Windows 10 */
|
||||
#define SDL_WINDOWS10_SDK
|
||||
#endif
|
||||
#endif /* _MSC_VER >= 1911 */
|
||||
|
||||
/* Enable various audio drivers */
|
||||
#define SDL_AUDIO_DRIVER_WASAPI 1
|
||||
#define SDL_AUDIO_DRIVER_DSOUND 1
|
||||
|
@ -229,7 +234,7 @@ typedef unsigned int uintptr_t;
|
|||
#define SDL_JOYSTICK_RAWINPUT 1
|
||||
#endif
|
||||
#define SDL_JOYSTICK_VIRTUAL 1
|
||||
#ifdef SDL_WINDOWS10_SDK
|
||||
#ifdef HAVE_WINDOWS_GAMING_INPUT_H
|
||||
#define SDL_JOYSTICK_WGI 1
|
||||
#endif
|
||||
#define SDL_JOYSTICK_XINPUT 1
|
||||
|
@ -256,7 +261,7 @@ typedef unsigned int uintptr_t;
|
|||
#ifndef SDL_VIDEO_RENDER_D3D
|
||||
#define SDL_VIDEO_RENDER_D3D 1
|
||||
#endif
|
||||
#ifdef SDL_WINDOWS7_SDK
|
||||
#if !defined(SDL_VIDEO_RENDER_D3D11) && defined(HAVE_D3D11_H)
|
||||
#define SDL_VIDEO_RENDER_D3D11 1
|
||||
#endif
|
||||
|
||||
|
|
8
externals/SDL/include/SDL_config_winrt.h
vendored
8
externals/SDL/include/SDL_config_winrt.h
vendored
|
@ -201,10 +201,18 @@ typedef unsigned int uintptr_t;
|
|||
#define SDL_HAPTIC_DISABLED 1
|
||||
#else
|
||||
#define SDL_JOYSTICK_VIRTUAL 1
|
||||
#if (NTDDI_VERSION >= NTDDI_WIN10)
|
||||
#define SDL_JOYSTICK_WGI 1
|
||||
#define SDL_HAPTIC_DISABLED 1
|
||||
#else
|
||||
#define SDL_JOYSTICK_XINPUT 1
|
||||
#define SDL_HAPTIC_XINPUT 1
|
||||
#endif /* WIN10 */
|
||||
#endif
|
||||
|
||||
/* WinRT doesn't have HIDAPI available */
|
||||
#define SDL_HIDAPI_DISABLED 1
|
||||
|
||||
/* Enable the dummy sensor driver */
|
||||
#define SDL_SENSOR_DUMMY 1
|
||||
|
||||
|
|
1
externals/SDL/include/SDL_config_wiz.h
vendored
1
externals/SDL/include/SDL_config_wiz.h
vendored
|
@ -48,6 +48,7 @@
|
|||
#define HAVE_STRING_H 1
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
|
||||
#define HAVE_DLOPEN 1
|
||||
#define HAVE_MALLOC 1
|
||||
#define HAVE_CALLOC 1
|
||||
#define HAVE_REALLOC 1
|
||||
|
|
37
externals/SDL/include/SDL_cpuinfo.h
vendored
37
externals/SDL/include/SDL_cpuinfo.h
vendored
|
@ -63,6 +63,9 @@ _m_prefetch(void *__P)
|
|||
#ifndef __SSE2__
|
||||
#define __SSE2__
|
||||
#endif
|
||||
#ifndef __SSE3__
|
||||
#define __SSE3__
|
||||
#endif
|
||||
#elif defined(__MINGW64_VERSION_MAJOR)
|
||||
#include <intrin.h>
|
||||
#if !defined(SDL_DISABLE_ARM_NEON_H) && defined(__ARM_NEON)
|
||||
|
@ -155,6 +158,8 @@ extern DECLSPEC int SDLCALL SDL_GetCPUCacheLineSize(void);
|
|||
*
|
||||
* \returns SDL_TRUE if the CPU has the RDTSC instruction or SDL_FALSE if not.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_Has3DNow
|
||||
* \sa SDL_HasAltiVec
|
||||
* \sa SDL_HasAVX
|
||||
|
@ -176,6 +181,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasRDTSC(void);
|
|||
*
|
||||
* \returns SDL_TRUE if the CPU has AltiVec features or SDL_FALSE if not.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_Has3DNow
|
||||
* \sa SDL_HasAVX
|
||||
* \sa SDL_HasAVX2
|
||||
|
@ -196,6 +203,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasAltiVec(void);
|
|||
*
|
||||
* \returns SDL_TRUE if the CPU has MMX features or SDL_FALSE if not.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_Has3DNow
|
||||
* \sa SDL_HasAltiVec
|
||||
* \sa SDL_HasAVX
|
||||
|
@ -216,6 +225,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasMMX(void);
|
|||
*
|
||||
* \returns SDL_TRUE if the CPU has 3DNow! features or SDL_FALSE if not.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_HasAltiVec
|
||||
* \sa SDL_HasAVX
|
||||
* \sa SDL_HasAVX2
|
||||
|
@ -236,6 +247,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_Has3DNow(void);
|
|||
*
|
||||
* \returns SDL_TRUE if the CPU has SSE features or SDL_FALSE if not.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_Has3DNow
|
||||
* \sa SDL_HasAltiVec
|
||||
* \sa SDL_HasAVX
|
||||
|
@ -256,6 +269,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE(void);
|
|||
*
|
||||
* \returns SDL_TRUE if the CPU has SSE2 features or SDL_FALSE if not.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_Has3DNow
|
||||
* \sa SDL_HasAltiVec
|
||||
* \sa SDL_HasAVX
|
||||
|
@ -276,6 +291,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE2(void);
|
|||
*
|
||||
* \returns SDL_TRUE if the CPU has SSE3 features or SDL_FALSE if not.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_Has3DNow
|
||||
* \sa SDL_HasAltiVec
|
||||
* \sa SDL_HasAVX
|
||||
|
@ -296,6 +313,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE3(void);
|
|||
*
|
||||
* \returns SDL_TRUE if the CPU has SSE4.1 features or SDL_FALSE if not.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_Has3DNow
|
||||
* \sa SDL_HasAltiVec
|
||||
* \sa SDL_HasAVX
|
||||
|
@ -316,6 +335,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE41(void);
|
|||
*
|
||||
* \returns SDL_TRUE if the CPU has SSE4.2 features or SDL_FALSE if not.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_Has3DNow
|
||||
* \sa SDL_HasAltiVec
|
||||
* \sa SDL_HasAVX
|
||||
|
@ -380,6 +401,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX2(void);
|
|||
*
|
||||
* \returns SDL_TRUE if the CPU has AVX-512F features or SDL_FALSE if not.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.9.
|
||||
*
|
||||
* \sa SDL_HasAVX
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX512F(void);
|
||||
|
@ -393,6 +416,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX512F(void);
|
|||
*
|
||||
* \returns SDL_TRUE if the CPU has ARM SIMD features or SDL_FALSE if not.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.12.
|
||||
*
|
||||
* \sa SDL_HasNEON
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasARMSIMD(void);
|
||||
|
@ -403,6 +428,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasARMSIMD(void);
|
|||
* This always returns false on CPUs that aren't using ARM instruction sets.
|
||||
*
|
||||
* \returns SDL_TRUE if the CPU has ARM NEON features or SDL_FALSE if not.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.6.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasNEON(void);
|
||||
|
||||
|
@ -429,6 +456,8 @@ extern DECLSPEC int SDLCALL SDL_GetSystemRAM(void);
|
|||
*
|
||||
* \returns the alignment in bytes needed for available, known SIMD
|
||||
* instructions.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.10.
|
||||
*/
|
||||
extern DECLSPEC size_t SDLCALL SDL_SIMDGetAlignment(void);
|
||||
|
||||
|
@ -461,7 +490,9 @@ extern DECLSPEC size_t SDLCALL SDL_SIMDGetAlignment(void);
|
|||
*
|
||||
* \param len The length, in bytes, of the block to allocate. The actual
|
||||
* allocated block might be larger due to padding, etc.
|
||||
* \returns a pointer to thenewly-allocated block, NULL if out of memory.
|
||||
* \returns a pointer to the newly-allocated block, NULL if out of memory.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.10.
|
||||
*
|
||||
* \sa SDL_SIMDAlignment
|
||||
* \sa SDL_SIMDRealloc
|
||||
|
@ -485,6 +516,8 @@ extern DECLSPEC void * SDLCALL SDL_SIMDAlloc(const size_t len);
|
|||
* memory.
|
||||
* \returns a pointer to the newly-reallocated block, NULL if out of memory.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.14.
|
||||
*
|
||||
* \sa SDL_SIMDAlignment
|
||||
* \sa SDL_SIMDAlloc
|
||||
* \sa SDL_SIMDFree
|
||||
|
@ -508,6 +541,8 @@ extern DECLSPEC void * SDLCALL SDL_SIMDRealloc(void *mem, const size_t len);
|
|||
* \param ptr The pointer, returned from SDL_SIMDAlloc or SDL_SIMDRealloc, to
|
||||
* deallocate. NULL is a legal no-op.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.10.
|
||||
*
|
||||
* \sa SDL_SIMDAlloc
|
||||
* \sa SDL_SIMDRealloc
|
||||
*/
|
||||
|
|
1182
externals/SDL/include/SDL_egl.h
vendored
1182
externals/SDL/include/SDL_egl.h
vendored
File diff suppressed because it is too large
Load diff
99
externals/SDL/include/SDL_endian.h
vendored
99
externals/SDL/include/SDL_endian.h
vendored
|
@ -30,20 +30,17 @@
|
|||
|
||||
#include "SDL_stdinc.h"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1400)
|
||||
/* As of Clang 11, '_m_prefetchw' is conflicting with the winnt.h's version,
|
||||
so we define the needed '_m_prefetch' here as a pseudo-header, until the issue is fixed. */
|
||||
|
||||
#ifdef __clang__
|
||||
#ifndef __PRFCHWINTRIN_H
|
||||
#define __PRFCHWINTRIN_H
|
||||
|
||||
static __inline__ void __attribute__((__always_inline__, __nodebug__))
|
||||
_m_prefetch(void *__P)
|
||||
{
|
||||
__builtin_prefetch (__P, 0, 3 /* _MM_HINT_T0 */);
|
||||
}
|
||||
|
||||
#endif /* __PRFCHWINTRIN_H */
|
||||
#endif /* __clang__ */
|
||||
|
||||
|
@ -91,25 +88,45 @@ extern "C" {
|
|||
/**
|
||||
* \file SDL_endian.h
|
||||
*/
|
||||
#if (defined(__clang__) && (__clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 2))) || \
|
||||
(defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)))
|
||||
|
||||
/* various modern compilers may have builtin swap */
|
||||
#if defined(__GNUC__) || defined(__clang__)
|
||||
# define HAS_BUILTIN_BSWAP16 (_SDL_HAS_BUILTIN(__builtin_bswap16)) || \
|
||||
(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8))
|
||||
# define HAS_BUILTIN_BSWAP32 (_SDL_HAS_BUILTIN(__builtin_bswap32)) || \
|
||||
(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
|
||||
# define HAS_BUILTIN_BSWAP64 (_SDL_HAS_BUILTIN(__builtin_bswap64)) || \
|
||||
(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
|
||||
|
||||
/* this one is broken */
|
||||
# define HAS_BROKEN_BSWAP (__GNUC__ == 2 && __GNUC_MINOR__ <= 95)
|
||||
#else
|
||||
# define HAS_BUILTIN_BSWAP16 0
|
||||
# define HAS_BUILTIN_BSWAP32 0
|
||||
# define HAS_BUILTIN_BSWAP64 0
|
||||
# define HAS_BROKEN_BSWAP 0
|
||||
#endif
|
||||
|
||||
#if HAS_BUILTIN_BSWAP16
|
||||
#define SDL_Swap16(x) __builtin_bswap16(x)
|
||||
#elif defined(__GNUC__) && defined(__i386__) && \
|
||||
!(__GNUC__ == 2 && __GNUC_MINOR__ <= 95 /* broken gcc version */)
|
||||
#elif defined(_MSC_VER) && (_MSC_VER >= 1400)
|
||||
#pragma intrinsic(_byteswap_ushort)
|
||||
#define SDL_Swap16(x) _byteswap_ushort(x)
|
||||
#elif defined(__i386__) && !HAS_BROKEN_BSWAP
|
||||
SDL_FORCE_INLINE Uint16
|
||||
SDL_Swap16(Uint16 x)
|
||||
{
|
||||
__asm__("xchgb %b0,%h0": "=q"(x):"0"(x));
|
||||
return x;
|
||||
}
|
||||
#elif defined(__GNUC__) && defined(__x86_64__)
|
||||
#elif defined(__x86_64__)
|
||||
SDL_FORCE_INLINE Uint16
|
||||
SDL_Swap16(Uint16 x)
|
||||
{
|
||||
__asm__("xchgb %b0,%h0": "=Q"(x):"0"(x));
|
||||
return x;
|
||||
}
|
||||
#elif defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__))
|
||||
#elif (defined(__powerpc__) || defined(__ppc__))
|
||||
SDL_FORCE_INLINE Uint16
|
||||
SDL_Swap16(Uint16 x)
|
||||
{
|
||||
|
@ -118,25 +135,15 @@ SDL_Swap16(Uint16 x)
|
|||
__asm__("rlwimi %0,%2,8,16,23": "=&r"(result):"0"(x >> 8), "r"(x));
|
||||
return (Uint16)result;
|
||||
}
|
||||
#elif defined(__GNUC__) && defined(__aarch64__)
|
||||
SDL_FORCE_INLINE Uint16
|
||||
SDL_Swap16(Uint16 x)
|
||||
{
|
||||
__asm__("rev16 %w1, %w0" : "=r"(x) : "r"(x));
|
||||
return x;
|
||||
}
|
||||
#elif defined(__GNUC__) && (defined(__m68k__) && !defined(__mcoldfire__))
|
||||
#elif (defined(__m68k__) && !defined(__mcoldfire__))
|
||||
SDL_FORCE_INLINE Uint16
|
||||
SDL_Swap16(Uint16 x)
|
||||
{
|
||||
__asm__("rorw #8,%0": "=d"(x): "0"(x):"cc");
|
||||
return x;
|
||||
}
|
||||
#elif defined(_MSC_VER)
|
||||
#pragma intrinsic(_byteswap_ushort)
|
||||
#define SDL_Swap16(x) _byteswap_ushort(x)
|
||||
#elif defined(__WATCOMC__) && defined(__386__)
|
||||
extern _inline Uint16 SDL_Swap16(Uint16);
|
||||
extern __inline Uint16 SDL_Swap16(Uint16);
|
||||
#pragma aux SDL_Swap16 = \
|
||||
"xchg al, ah" \
|
||||
parm [ax] \
|
||||
|
@ -149,25 +156,26 @@ SDL_Swap16(Uint16 x)
|
|||
}
|
||||
#endif
|
||||
|
||||
#if (defined(__clang__) && (__clang_major__ > 2 || (__clang_major__ == 2 && __clang_minor__ >= 6))) || \
|
||||
(defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)))
|
||||
#if HAS_BUILTIN_BSWAP32
|
||||
#define SDL_Swap32(x) __builtin_bswap32(x)
|
||||
#elif defined(__GNUC__) && defined(__i386__) && \
|
||||
!(__GNUC__ == 2 && __GNUC_MINOR__ <= 95 /* broken gcc version */)
|
||||
#elif defined(_MSC_VER) && (_MSC_VER >= 1400)
|
||||
#pragma intrinsic(_byteswap_ulong)
|
||||
#define SDL_Swap32(x) _byteswap_ulong(x)
|
||||
#elif defined(__i386__) && !HAS_BROKEN_BSWAP
|
||||
SDL_FORCE_INLINE Uint32
|
||||
SDL_Swap32(Uint32 x)
|
||||
{
|
||||
__asm__("bswap %0": "=r"(x):"0"(x));
|
||||
return x;
|
||||
}
|
||||
#elif defined(__GNUC__) && defined(__x86_64__)
|
||||
#elif defined(__x86_64__)
|
||||
SDL_FORCE_INLINE Uint32
|
||||
SDL_Swap32(Uint32 x)
|
||||
{
|
||||
__asm__("bswapl %0": "=r"(x):"0"(x));
|
||||
return x;
|
||||
}
|
||||
#elif defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__))
|
||||
#elif (defined(__powerpc__) || defined(__ppc__))
|
||||
SDL_FORCE_INLINE Uint32
|
||||
SDL_Swap32(Uint32 x)
|
||||
{
|
||||
|
@ -178,14 +186,7 @@ SDL_Swap32(Uint32 x)
|
|||
__asm__("rlwimi %0,%2,24,0,7" : "=&r"(result): "0" (result), "r"(x));
|
||||
return result;
|
||||
}
|
||||
#elif defined(__GNUC__) && defined(__aarch64__)
|
||||
SDL_FORCE_INLINE Uint32
|
||||
SDL_Swap32(Uint32 x)
|
||||
{
|
||||
__asm__("rev %w1, %w0": "=r"(x):"r"(x));
|
||||
return x;
|
||||
}
|
||||
#elif defined(__GNUC__) && (defined(__m68k__) && !defined(__mcoldfire__))
|
||||
#elif (defined(__m68k__) && !defined(__mcoldfire__))
|
||||
SDL_FORCE_INLINE Uint32
|
||||
SDL_Swap32(Uint32 x)
|
||||
{
|
||||
|
@ -193,14 +194,11 @@ SDL_Swap32(Uint32 x)
|
|||
return x;
|
||||
}
|
||||
#elif defined(__WATCOMC__) && defined(__386__)
|
||||
extern _inline Uint32 SDL_Swap32(Uint32);
|
||||
extern __inline Uint32 SDL_Swap32(Uint32);
|
||||
#pragma aux SDL_Swap32 = \
|
||||
"bswap eax" \
|
||||
parm [eax] \
|
||||
modify [eax];
|
||||
#elif defined(_MSC_VER)
|
||||
#pragma intrinsic(_byteswap_ulong)
|
||||
#define SDL_Swap32(x) _byteswap_ulong(x)
|
||||
#else
|
||||
SDL_FORCE_INLINE Uint32
|
||||
SDL_Swap32(Uint32 x)
|
||||
|
@ -210,11 +208,12 @@ SDL_Swap32(Uint32 x)
|
|||
}
|
||||
#endif
|
||||
|
||||
#if (defined(__clang__) && (__clang_major__ > 2 || (__clang_major__ == 2 && __clang_minor__ >= 6))) || \
|
||||
(defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)))
|
||||
#if HAS_BUILTIN_BSWAP64
|
||||
#define SDL_Swap64(x) __builtin_bswap64(x)
|
||||
#elif defined(__GNUC__) && defined(__i386__) && \
|
||||
!(__GNUC__ == 2 && __GNUC_MINOR__ <= 95 /* broken gcc version */)
|
||||
#elif defined(_MSC_VER) && (_MSC_VER >= 1400)
|
||||
#pragma intrinsic(_byteswap_uint64)
|
||||
#define SDL_Swap64(x) _byteswap_uint64(x)
|
||||
#elif defined(__i386__) && !HAS_BROKEN_BSWAP
|
||||
SDL_FORCE_INLINE Uint64
|
||||
SDL_Swap64(Uint64 x)
|
||||
{
|
||||
|
@ -230,7 +229,7 @@ SDL_Swap64(Uint64 x)
|
|||
: "0" (v.s.a), "1"(v.s.b));
|
||||
return v.u;
|
||||
}
|
||||
#elif defined(__GNUC__) && defined(__x86_64__)
|
||||
#elif defined(__x86_64__)
|
||||
SDL_FORCE_INLINE Uint64
|
||||
SDL_Swap64(Uint64 x)
|
||||
{
|
||||
|
@ -238,16 +237,13 @@ SDL_Swap64(Uint64 x)
|
|||
return x;
|
||||
}
|
||||
#elif defined(__WATCOMC__) && defined(__386__)
|
||||
extern _inline Uint64 SDL_Swap64(Uint64);
|
||||
extern __inline Uint64 SDL_Swap64(Uint64);
|
||||
#pragma aux SDL_Swap64 = \
|
||||
"bswap eax" \
|
||||
"bswap edx" \
|
||||
"xchg eax,edx" \
|
||||
parm [eax edx] \
|
||||
modify [eax edx];
|
||||
#elif defined(_MSC_VER)
|
||||
#pragma intrinsic(_byteswap_uint64)
|
||||
#define SDL_Swap64(x) _byteswap_uint64(x)
|
||||
#else
|
||||
SDL_FORCE_INLINE Uint64
|
||||
SDL_Swap64(Uint64 x)
|
||||
|
@ -278,6 +274,11 @@ SDL_SwapFloat(float x)
|
|||
return swapper.f;
|
||||
}
|
||||
|
||||
/* remove extra macros */
|
||||
#undef HAS_BROKEN_BSWAP
|
||||
#undef HAS_BUILTIN_BSWAP16
|
||||
#undef HAS_BUILTIN_BSWAP32
|
||||
#undef HAS_BUILTIN_BSWAP64
|
||||
|
||||
/**
|
||||
* \name Swap to native
|
||||
|
|
12
externals/SDL/include/SDL_error.h
vendored
12
externals/SDL/include/SDL_error.h
vendored
|
@ -58,6 +58,8 @@ extern "C" {
|
|||
* any
|
||||
* \returns always -1.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_ClearError
|
||||
* \sa SDL_GetError
|
||||
*/
|
||||
|
@ -72,11 +74,11 @@ extern DECLSPEC int SDLCALL SDL_SetError(SDL_PRINTF_FORMAT_STRING const char *fm
|
|||
*
|
||||
* The message is only applicable when an SDL function has signaled an error.
|
||||
* You must check the return values of SDL function calls to determine when to
|
||||
* appropriately call SDL_GetError(). You should _not_ use the results of
|
||||
* appropriately call SDL_GetError(). You should *not* use the results of
|
||||
* SDL_GetError() to decide if an error has occurred! Sometimes SDL will set
|
||||
* an error string even when reporting success.
|
||||
*
|
||||
* SDL will _not_ clear the error string for successful API calls. You _must_
|
||||
* SDL will *not* clear the error string for successful API calls. You *must*
|
||||
* check return values for failure cases before you can assume the error
|
||||
* string applies.
|
||||
*
|
||||
|
@ -93,6 +95,8 @@ extern DECLSPEC int SDLCALL SDL_SetError(SDL_PRINTF_FORMAT_STRING const char *fm
|
|||
* return values of SDL function calls to determine when to
|
||||
* appropriately call SDL_GetError().
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_ClearError
|
||||
* \sa SDL_SetError
|
||||
*/
|
||||
|
@ -109,6 +113,8 @@ extern DECLSPEC const char *SDLCALL SDL_GetError(void);
|
|||
* \param maxlen The size of the buffer pointed to by the errstr parameter
|
||||
* \returns the pointer passed in as the `errstr` parameter.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.14.
|
||||
*
|
||||
* \sa SDL_GetError
|
||||
*/
|
||||
extern DECLSPEC char * SDLCALL SDL_GetErrorMsg(char *errstr, int maxlen);
|
||||
|
@ -116,6 +122,8 @@ extern DECLSPEC char * SDLCALL SDL_GetErrorMsg(char *errstr, int maxlen);
|
|||
/**
|
||||
* Clear any previous error message for this thread.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_GetError
|
||||
* \sa SDL_SetError
|
||||
*/
|
||||
|
|
49
externals/SDL/include/SDL_events.h
vendored
49
externals/SDL/include/SDL_events.h
vendored
|
@ -160,6 +160,9 @@ typedef enum
|
|||
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 */
|
||||
|
||||
/* Internal events */
|
||||
SDL_POLLSENTINEL = 0x7F00, /**< Signals the end of an event poll cycle */
|
||||
|
||||
/** Events ::SDL_USEREVENT through ::SDL_LASTEVENT are for your use,
|
||||
* and should be allocated with SDL_RegisterEvents()
|
||||
*/
|
||||
|
@ -298,6 +301,8 @@ typedef struct SDL_MouseWheelEvent
|
|||
Sint32 x; /**< The amount scrolled horizontally, positive to the right and negative to the left */
|
||||
Sint32 y; /**< The amount scrolled vertically, positive away from the user and negative toward the user */
|
||||
Uint32 direction; /**< Set to one of the SDL_MOUSEWHEEL_* defines. When FLIPPED the values in X and Y will be opposite. Multiply by -1 to change them back */
|
||||
float preciseX; /**< The amount scrolled horizontally, positive to the right and negative to the left, with float precision (added in 2.0.18) */
|
||||
float preciseY; /**< The amount scrolled vertically, positive away from the user and negative toward the user, with float precision (added in 2.0.18) */
|
||||
} SDL_MouseWheelEvent;
|
||||
|
||||
/**
|
||||
|
@ -659,6 +664,8 @@ SDL_COMPILE_TIME_ASSERT(SDL_Event, sizeof(SDL_Event) == sizeof(((SDL_Event *)NUL
|
|||
* polling or waiting for events (e.g. you are filtering them), then you must
|
||||
* call SDL_PumpEvents() to force an event queue update.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_PollEvent
|
||||
* \sa SDL_WaitEvent
|
||||
*/
|
||||
|
@ -704,6 +711,8 @@ typedef enum
|
|||
* \returns the number of events actually stored or a negative error code on
|
||||
* failure; call SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_PollEvent
|
||||
* \sa SDL_PumpEvents
|
||||
* \sa SDL_PushEvent
|
||||
|
@ -723,6 +732,8 @@ extern DECLSPEC int SDLCALL SDL_PeepEvents(SDL_Event * events, int numevents,
|
|||
* \returns SDL_TRUE if events matching `type` are present, or SDL_FALSE if
|
||||
* events matching `type` are not present.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_HasEvents
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasEvent(Uint32 type);
|
||||
|
@ -740,6 +751,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasEvent(Uint32 type);
|
|||
* \returns SDL_TRUE if events with type >= `minType` and <= `maxType` are
|
||||
* present, or SDL_FALSE if not.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_HasEvents
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasEvents(Uint32 minType, Uint32 maxType);
|
||||
|
@ -760,6 +773,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasEvents(Uint32 minType, Uint32 maxType);
|
|||
*
|
||||
* \param type the type of event to be cleared; see SDL_EventType for details
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_FlushEvents
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_FlushEvent(Uint32 type);
|
||||
|
@ -783,6 +798,8 @@ extern DECLSPEC void SDLCALL SDL_FlushEvent(Uint32 type);
|
|||
* \param maxType the high end of event type to be cleared, inclusive; see
|
||||
* SDL_EventType for details
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_FlushEvent
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_FlushEvents(Uint32 minType, Uint32 maxType);
|
||||
|
@ -798,8 +815,8 @@ extern DECLSPEC void SDLCALL SDL_FlushEvents(Uint32 minType, Uint32 maxType);
|
|||
* If `event` is NULL, it simply returns 1 if there is an event in the queue,
|
||||
* but will not remove it from the queue.
|
||||
*
|
||||
* As this function implicitly calls SDL_PumpEvents(), you can only call this
|
||||
* function in the thread that set the video mode.
|
||||
* As this function may implicitly call SDL_PumpEvents(), you can only call
|
||||
* this function in the thread that set the video mode.
|
||||
*
|
||||
* SDL_PollEvent() is the favored way of receiving system events since it can
|
||||
* be done from the main loop and does not suspend the main loop while waiting
|
||||
|
@ -823,6 +840,8 @@ extern DECLSPEC void SDLCALL SDL_FlushEvents(Uint32 minType, Uint32 maxType);
|
|||
* the queue, or NULL
|
||||
* \returns 1 if there is a pending event or 0 if there are none available.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_GetEventFilter
|
||||
* \sa SDL_PeepEvents
|
||||
* \sa SDL_PushEvent
|
||||
|
@ -838,14 +857,16 @@ extern DECLSPEC int SDLCALL SDL_PollEvent(SDL_Event * event);
|
|||
* If `event` is not NULL, the next event is removed from the queue and stored
|
||||
* in the SDL_Event structure pointed to by `event`.
|
||||
*
|
||||
* As this function implicitly calls SDL_PumpEvents(), you can only call this
|
||||
* function in the thread that initialized the video subsystem.
|
||||
* As this function may implicitly call SDL_PumpEvents(), you can only call
|
||||
* this function in the thread that initialized the video subsystem.
|
||||
*
|
||||
* \param event the SDL_Event structure to be filled in with the next event
|
||||
* from the queue, or NULL
|
||||
* \returns 1 on success or 0 if there was an error while waiting for events;
|
||||
* call SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_PollEvent
|
||||
* \sa SDL_PumpEvents
|
||||
* \sa SDL_WaitEventTimeout
|
||||
|
@ -859,8 +880,8 @@ extern DECLSPEC int SDLCALL SDL_WaitEvent(SDL_Event * event);
|
|||
* If `event` is not NULL, the next event is removed from the queue and stored
|
||||
* in the SDL_Event structure pointed to by `event`.
|
||||
*
|
||||
* As this function implicitly calls SDL_PumpEvents(), you can only call this
|
||||
* function in the thread that initialized the video subsystem.
|
||||
* As this function may implicitly call SDL_PumpEvents(), you can only call
|
||||
* this function in the thread that initialized the video subsystem.
|
||||
*
|
||||
* \param event the SDL_Event structure to be filled in with the next event
|
||||
* from the queue, or NULL
|
||||
|
@ -870,6 +891,8 @@ extern DECLSPEC int SDLCALL SDL_WaitEvent(SDL_Event * event);
|
|||
* call SDL_GetError() for more information. This also returns 0 if
|
||||
* the timeout elapsed without an event arriving.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_PollEvent
|
||||
* \sa SDL_PumpEvents
|
||||
* \sa SDL_WaitEvent
|
||||
|
@ -903,6 +926,8 @@ extern DECLSPEC int SDLCALL SDL_WaitEventTimeout(SDL_Event * event,
|
|||
* code on failure; call SDL_GetError() for more information. A
|
||||
* common reason for error is the event queue being full.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_PeepEvents
|
||||
* \sa SDL_PollEvent
|
||||
* \sa SDL_RegisterEvents
|
||||
|
@ -957,6 +982,8 @@ typedef int (SDLCALL * SDL_EventFilter) (void *userdata, SDL_Event * event);
|
|||
* \param filter An SDL_EventFilter function to call when an event happens
|
||||
* \param userdata a pointer that is passed to `filter`
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_AddEventWatch
|
||||
* \sa SDL_EventState
|
||||
* \sa SDL_GetEventFilter
|
||||
|
@ -977,6 +1004,8 @@ extern DECLSPEC void SDLCALL SDL_SetEventFilter(SDL_EventFilter filter,
|
|||
* be stored here
|
||||
* \returns SDL_TRUE on success or SDL_FALSE if there is no event filter set.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_SetEventFilter
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_GetEventFilter(SDL_EventFilter * filter,
|
||||
|
@ -1003,6 +1032,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_GetEventFilter(SDL_EventFilter * filter,
|
|||
* \param filter an SDL_EventFilter function to call when an event happens.
|
||||
* \param userdata a pointer that is passed to `filter`
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_DelEventWatch
|
||||
* \sa SDL_SetEventFilter
|
||||
*/
|
||||
|
@ -1018,6 +1049,8 @@ extern DECLSPEC void SDLCALL SDL_AddEventWatch(SDL_EventFilter filter,
|
|||
* \param filter the function originally passed to SDL_AddEventWatch()
|
||||
* \param userdata the pointer originally passed to SDL_AddEventWatch()
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_AddEventWatch
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_DelEventWatch(SDL_EventFilter filter,
|
||||
|
@ -1034,6 +1067,8 @@ extern DECLSPEC void SDLCALL SDL_DelEventWatch(SDL_EventFilter filter,
|
|||
* \param filter the SDL_EventFilter function to call when an event happens
|
||||
* \param userdata a pointer that is passed to `filter`
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_GetEventFilter
|
||||
* \sa SDL_SetEventFilter
|
||||
*/
|
||||
|
@ -1061,6 +1096,8 @@ extern DECLSPEC void SDLCALL SDL_FilterEvents(SDL_EventFilter filter,
|
|||
* \returns `SDL_DISABLE` or `SDL_ENABLE`, representing the processing state
|
||||
* of the event before this function makes any changes to it.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_GetEventState
|
||||
*/
|
||||
extern DECLSPEC Uint8 SDLCALL SDL_EventState(Uint32 type, int state);
|
||||
|
|
2
externals/SDL/include/SDL_filesystem.h
vendored
2
externals/SDL/include/SDL_filesystem.h
vendored
|
@ -55,7 +55,7 @@ extern "C" {
|
|||
*
|
||||
* - `resource`: bundle resource directory (the default). For example:
|
||||
* `/Applications/SDLApp/MyApp.app/Contents/Resources`
|
||||
* - `bundle`: the Bundle directory. Fpr example:
|
||||
* - `bundle`: the Bundle directory. For example:
|
||||
* `/Applications/SDLApp/MyApp.app/`
|
||||
* - `parent`: the containing directory of the bundle. For example:
|
||||
* `/Applications/SDLApp/`
|
||||
|
|
131
externals/SDL/include/SDL_gamecontroller.h
vendored
131
externals/SDL/include/SDL_gamecontroller.h
vendored
|
@ -189,6 +189,8 @@ extern DECLSPEC int SDLCALL SDL_GameControllerAddMappingsFromRW(SDL_RWops * rw,
|
|||
* \returns 1 if a new mapping is added, 0 if an existing mapping is updated,
|
||||
* -1 on error; call SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_GameControllerMapping
|
||||
* \sa SDL_GameControllerMappingForGUID
|
||||
*/
|
||||
|
@ -198,6 +200,8 @@ extern DECLSPEC int SDLCALL SDL_GameControllerAddMapping(const char* mappingStri
|
|||
* Get the number of mappings installed.
|
||||
*
|
||||
* \returns the number of mappings.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.6.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GameControllerNumMappings(void);
|
||||
|
||||
|
@ -206,6 +210,8 @@ extern DECLSPEC int SDLCALL SDL_GameControllerNumMappings(void);
|
|||
*
|
||||
* \returns the mapping string. Must be freed with SDL_free(). Returns NULL if
|
||||
* the index is out of range.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.6.
|
||||
*/
|
||||
extern DECLSPEC char * SDLCALL SDL_GameControllerMappingForIndex(int mapping_index);
|
||||
|
||||
|
@ -218,6 +224,8 @@ extern DECLSPEC char * SDLCALL SDL_GameControllerMappingForIndex(int mapping_ind
|
|||
* \returns a mapping string or NULL on error; call SDL_GetError() for more
|
||||
* information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_JoystickGetDeviceGUID
|
||||
* \sa SDL_JoystickGetGUID
|
||||
*/
|
||||
|
@ -289,6 +297,8 @@ extern DECLSPEC const char *SDLCALL SDL_GameControllerNameForIndex(int joystick_
|
|||
* \param joystick_index the device_index of a device, from zero to
|
||||
* SDL_NumJoysticks()-1
|
||||
* \returns the controller type.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.12.
|
||||
*/
|
||||
extern DECLSPEC SDL_GameControllerType SDLCALL SDL_GameControllerTypeForIndex(int joystick_index);
|
||||
|
||||
|
@ -301,6 +311,8 @@ extern DECLSPEC SDL_GameControllerType SDLCALL SDL_GameControllerTypeForIndex(in
|
|||
* SDL_NumJoysticks()-1
|
||||
* \returns the mapping string. Must be freed with SDL_free(). Returns NULL if
|
||||
* no mapping is available.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.9.
|
||||
*/
|
||||
extern DECLSPEC char *SDLCALL SDL_GameControllerMappingForDeviceIndex(int joystick_index);
|
||||
|
||||
|
@ -349,6 +361,8 @@ extern DECLSPEC SDL_GameController *SDLCALL SDL_GameControllerFromInstanceID(SDL
|
|||
* instance id!
|
||||
* \returns the SDL_GameController associated with a player index.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.12.
|
||||
*
|
||||
* \sa SDL_GameControllerGetPlayerIndex
|
||||
* \sa SDL_GameControllerSetPlayerIndex
|
||||
*/
|
||||
|
@ -380,6 +394,8 @@ extern DECLSPEC const char *SDLCALL SDL_GameControllerName(SDL_GameController *g
|
|||
*
|
||||
* \param gamecontroller the game controller object to query.
|
||||
* \returns the controller type.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.12.
|
||||
*/
|
||||
extern DECLSPEC SDL_GameControllerType SDLCALL SDL_GameControllerGetType(SDL_GameController *gamecontroller);
|
||||
|
||||
|
@ -390,6 +406,8 @@ extern DECLSPEC SDL_GameControllerType SDLCALL SDL_GameControllerGetType(SDL_Gam
|
|||
*
|
||||
* \param gamecontroller the game controller object to query.
|
||||
* \returns the player index for controller, or -1 if it's not available.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.9.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GameControllerGetPlayerIndex(SDL_GameController *gamecontroller);
|
||||
|
||||
|
@ -398,6 +416,8 @@ extern DECLSPEC int SDLCALL SDL_GameControllerGetPlayerIndex(SDL_GameController
|
|||
*
|
||||
* \param gamecontroller the game controller object to adjust.
|
||||
* \param player_index Player index to assign to this controller.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.12.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_GameControllerSetPlayerIndex(SDL_GameController *gamecontroller, int player_index);
|
||||
|
||||
|
@ -408,6 +428,8 @@ extern DECLSPEC void SDLCALL SDL_GameControllerSetPlayerIndex(SDL_GameController
|
|||
*
|
||||
* \param gamecontroller the game controller object to query.
|
||||
* \return the USB vendor ID, or zero if unavailable.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.6.
|
||||
*/
|
||||
extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetVendor(SDL_GameController *gamecontroller);
|
||||
|
||||
|
@ -418,6 +440,8 @@ extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetVendor(SDL_GameController *g
|
|||
*
|
||||
* \param gamecontroller the game controller object to query.
|
||||
* \return the USB product ID, or zero if unavailable.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.6.
|
||||
*/
|
||||
extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetProduct(SDL_GameController *gamecontroller);
|
||||
|
||||
|
@ -428,6 +452,8 @@ extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetProduct(SDL_GameController *
|
|||
*
|
||||
* \param gamecontroller the game controller object to query.
|
||||
* \return the USB product version, or zero if unavailable.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.6.
|
||||
*/
|
||||
extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetProductVersion(SDL_GameController *gamecontroller);
|
||||
|
||||
|
@ -439,6 +465,8 @@ extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetProductVersion(SDL_GameContr
|
|||
*
|
||||
* \param gamecontroller the game controller object to query.
|
||||
* \return the serial number, or NULL if unavailable.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.14.
|
||||
*/
|
||||
extern DECLSPEC const char * SDLCALL SDL_GameControllerGetSerial(SDL_GameController *gamecontroller);
|
||||
|
||||
|
@ -450,6 +478,8 @@ extern DECLSPEC const char * SDLCALL SDL_GameControllerGetSerial(SDL_GameControl
|
|||
* \returns SDL_TRUE if the controller has been opened and is currently
|
||||
* connected, or SDL_FALSE if not.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_GameControllerClose
|
||||
* \sa SDL_GameControllerOpen
|
||||
*/
|
||||
|
@ -471,6 +501,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerGetAttached(SDL_GameControlle
|
|||
* \param gamecontroller the game controller object that you want to get a
|
||||
* joystick from
|
||||
* \returns a SDL_Joystick object; call SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*/
|
||||
extern DECLSPEC SDL_Joystick *SDLCALL SDL_GameControllerGetJoystick(SDL_GameController *gamecontroller);
|
||||
|
||||
|
@ -500,6 +532,8 @@ extern DECLSPEC int SDLCALL SDL_GameControllerEventState(int state);
|
|||
* This function is called automatically by the event loop if events are
|
||||
* enabled. Under such circumstances, it will not be necessary to call this
|
||||
* function.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_GameControllerUpdate(void);
|
||||
|
||||
|
@ -541,6 +575,8 @@ typedef enum
|
|||
* \returns the SDL_GameControllerAxis enum corresponding to the input string,
|
||||
* or `SDL_CONTROLLER_AXIS_INVALID` if no match was found.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_GameControllerGetStringForAxis
|
||||
*/
|
||||
extern DECLSPEC SDL_GameControllerAxis SDLCALL SDL_GameControllerGetAxisFromString(const char *str);
|
||||
|
@ -555,6 +591,8 @@ extern DECLSPEC SDL_GameControllerAxis SDLCALL SDL_GameControllerGetAxisFromStri
|
|||
* specified. The string returned is of the format used by
|
||||
* SDL_GameController mapping strings.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_GameControllerGetAxisFromString
|
||||
*/
|
||||
extern DECLSPEC const char* SDLCALL SDL_GameControllerGetStringForAxis(SDL_GameControllerAxis axis);
|
||||
|
@ -585,6 +623,8 @@ SDL_GameControllerGetBindForAxis(SDL_GameController *gamecontroller,
|
|||
* \param gamecontroller a game controller
|
||||
* \param axis an axis enum value (an SDL_GameControllerAxis value)
|
||||
* \returns SDL_TRUE if the controller has this axis, SDL_FALSE otherwise.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.14.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL
|
||||
SDL_GameControllerHasAxis(SDL_GameController *gamecontroller, SDL_GameControllerAxis axis);
|
||||
|
@ -650,6 +690,8 @@ typedef enum
|
|||
* \param str string representing a SDL_GameController axis
|
||||
* \returns the SDL_GameControllerButton enum corresponding to the input
|
||||
* string, or `SDL_CONTROLLER_AXIS_INVALID` if no match was found.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*/
|
||||
extern DECLSPEC SDL_GameControllerButton SDLCALL SDL_GameControllerGetButtonFromString(const char *str);
|
||||
|
||||
|
@ -695,6 +737,8 @@ SDL_GameControllerGetBindForButton(SDL_GameController *gamecontroller,
|
|||
* \param gamecontroller a game controller
|
||||
* \param button a button enum value (an SDL_GameControllerButton value)
|
||||
* \returns SDL_TRUE if the controller has this button, SDL_FALSE otherwise.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.14.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerHasButton(SDL_GameController *gamecontroller,
|
||||
SDL_GameControllerButton button);
|
||||
|
@ -716,17 +760,23 @@ extern DECLSPEC Uint8 SDLCALL SDL_GameControllerGetButton(SDL_GameController *ga
|
|||
|
||||
/**
|
||||
* Get the number of touchpads on a game controller.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.14.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GameControllerGetNumTouchpads(SDL_GameController *gamecontroller);
|
||||
|
||||
/**
|
||||
* Get the number of supported simultaneous fingers on a touchpad on a game
|
||||
* controller.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.14.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GameControllerGetNumTouchpadFingers(SDL_GameController *gamecontroller, int touchpad);
|
||||
|
||||
/**
|
||||
* Get the current state of a finger on a touchpad on a game controller.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.14.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GameControllerGetTouchpadFinger(SDL_GameController *gamecontroller, int touchpad, int finger, Uint8 *state, float *x, float *y, float *pressure);
|
||||
|
||||
|
@ -736,6 +786,8 @@ extern DECLSPEC int SDLCALL SDL_GameControllerGetTouchpadFinger(SDL_GameControll
|
|||
* \param gamecontroller The controller to query
|
||||
* \param type The type of sensor to query
|
||||
* \returns SDL_TRUE if the sensor exists, SDL_FALSE otherwise.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.14.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerHasSensor(SDL_GameController *gamecontroller, SDL_SensorType type);
|
||||
|
||||
|
@ -746,6 +798,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerHasSensor(SDL_GameController
|
|||
* \param type The type of sensor to enable/disable
|
||||
* \param enabled Whether data reporting should be enabled
|
||||
* \returns 0 or -1 if an error occurred.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.14.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GameControllerSetSensorEnabled(SDL_GameController *gamecontroller, SDL_SensorType type, SDL_bool enabled);
|
||||
|
||||
|
@ -755,6 +809,8 @@ extern DECLSPEC int SDLCALL SDL_GameControllerSetSensorEnabled(SDL_GameControlle
|
|||
* \param gamecontroller The controller to query
|
||||
* \param type The type of sensor to query
|
||||
* \returns SDL_TRUE if the sensor is enabled, SDL_FALSE otherwise.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.14.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerIsSensorEnabled(SDL_GameController *gamecontroller, SDL_SensorType type);
|
||||
|
||||
|
@ -765,6 +821,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerIsSensorEnabled(SDL_GameContr
|
|||
* \param gamecontroller The controller to query
|
||||
* \param type The type of sensor to query
|
||||
* \return the data rate, or 0.0f if the data rate is not available.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.16.
|
||||
*/
|
||||
extern DECLSPEC float SDLCALL SDL_GameControllerGetSensorDataRate(SDL_GameController *gamecontroller, SDL_SensorType type);
|
||||
|
||||
|
@ -779,6 +837,8 @@ extern DECLSPEC float SDLCALL SDL_GameControllerGetSensorDataRate(SDL_GameContro
|
|||
* \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.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.14.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GameControllerGetSensorData(SDL_GameController *gamecontroller, SDL_SensorType type, float *data, int num_values);
|
||||
|
||||
|
@ -795,6 +855,10 @@ extern DECLSPEC int SDLCALL SDL_GameControllerGetSensorData(SDL_GameController *
|
|||
* rumble motor, from 0 to 0xFFFF
|
||||
* \param duration_ms The duration of the rumble effect, in milliseconds
|
||||
* \returns 0, or -1 if rumble isn't supported on this controller
|
||||
*
|
||||
* \since This function is available since SDL 2.0.9.
|
||||
*
|
||||
* \sa SDL_GameControllerHasRumble
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GameControllerRumble(SDL_GameController *gamecontroller, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms);
|
||||
|
||||
|
@ -815,6 +879,10 @@ extern DECLSPEC int SDLCALL SDL_GameControllerRumble(SDL_GameController *gamecon
|
|||
* to 0xFFFF
|
||||
* \param duration_ms The duration of the rumble effect, in milliseconds
|
||||
* \returns 0, or -1 if trigger rumble isn't supported on this controller
|
||||
*
|
||||
* \since This function is available since SDL 2.0.14.
|
||||
*
|
||||
* \sa SDL_GameControllerHasRumbleTriggers
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GameControllerRumbleTriggers(SDL_GameController *gamecontroller, Uint16 left_rumble, Uint16 right_rumble, Uint32 duration_ms);
|
||||
|
||||
|
@ -824,9 +892,37 @@ extern DECLSPEC int SDLCALL SDL_GameControllerRumbleTriggers(SDL_GameController
|
|||
* \param gamecontroller The controller to query
|
||||
* \returns SDL_TRUE, or SDL_FALSE if this controller does not have a
|
||||
* modifiable LED
|
||||
*
|
||||
* \since This function is available since SDL 2.0.14.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerHasLED(SDL_GameController *gamecontroller);
|
||||
|
||||
/**
|
||||
* Query whether a game controller has rumble support.
|
||||
*
|
||||
* \param gamecontroller The controller to query
|
||||
* \returns SDL_TRUE, or SDL_FALSE if this controller does not have rumble
|
||||
* support
|
||||
*
|
||||
* \since This function is available since SDL 2.0.18.
|
||||
*
|
||||
* \sa SDL_GameControllerRumble
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerHasRumble(SDL_GameController *gamecontroller);
|
||||
|
||||
/**
|
||||
* Query whether a game controller has rumble support on triggers.
|
||||
*
|
||||
* \param gamecontroller The controller to query
|
||||
* \returns SDL_TRUE, or SDL_FALSE if this controller does not have trigger
|
||||
* rumble support
|
||||
*
|
||||
* \since This function is available since SDL 2.0.18.
|
||||
*
|
||||
* \sa SDL_GameControllerRumbleTriggers
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerHasRumbleTriggers(SDL_GameController *gamecontroller);
|
||||
|
||||
/**
|
||||
* Update a game controller's LED color.
|
||||
*
|
||||
|
@ -835,6 +931,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerHasLED(SDL_GameController *ga
|
|||
* \param green The intensity of the green LED
|
||||
* \param blue The intensity of the blue LED
|
||||
* \returns 0, or -1 if this controller does not have a modifiable LED
|
||||
*
|
||||
* \since This function is available since SDL 2.0.14.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GameControllerSetLED(SDL_GameController *gamecontroller, Uint8 red, Uint8 green, Uint8 blue);
|
||||
|
||||
|
@ -846,6 +944,8 @@ extern DECLSPEC int SDLCALL SDL_GameControllerSetLED(SDL_GameController *gamecon
|
|||
* \param size The size of the data to send to the controller
|
||||
* \returns 0, or -1 if this controller or driver doesn't support effect
|
||||
* packets
|
||||
*
|
||||
* \since This function is available since SDL 2.0.16.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GameControllerSendEffect(SDL_GameController *gamecontroller, const void *data, int size);
|
||||
|
||||
|
@ -855,10 +955,41 @@ extern DECLSPEC int SDLCALL SDL_GameControllerSendEffect(SDL_GameController *gam
|
|||
* \param gamecontroller a game controller identifier previously returned by
|
||||
* SDL_GameControllerOpen()
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_GameControllerOpen
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_GameControllerClose(SDL_GameController *gamecontroller);
|
||||
|
||||
/**
|
||||
* Return the sfSymbolsName for a given button on a game controller on Apple
|
||||
* platforms.
|
||||
*
|
||||
* \param gamecontroller the controller to query
|
||||
* \param button a button on the game controller
|
||||
* \returns the sfSymbolsName or NULL if the name can't be found
|
||||
*
|
||||
* \since This function is available since SDL 2.0.18.
|
||||
*
|
||||
* \sa SDL_GameControllerGetAppleSFSymbolsNameForAxis
|
||||
*/
|
||||
extern DECLSPEC const char* SDLCALL SDL_GameControllerGetAppleSFSymbolsNameForButton(SDL_GameController *gamecontroller, SDL_GameControllerButton button);
|
||||
|
||||
/**
|
||||
* Return the sfSymbolsName for a given axis on a game controller on Apple
|
||||
* platforms.
|
||||
*
|
||||
* \param gamecontroller the controller to query
|
||||
* \param axis an axis on the game controller
|
||||
* \returns the sfSymbolsName or NULL if the name can't be found
|
||||
*
|
||||
* \since This function is available since SDL 2.0.18.
|
||||
*
|
||||
* \sa SDL_GameControllerGetAppleSFSymbolsNameForButton
|
||||
*/
|
||||
extern DECLSPEC const char* SDLCALL SDL_GameControllerGetAppleSFSymbolsNameForAxis(SDL_GameController *gamecontroller, SDL_GameControllerAxis axis);
|
||||
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
23
externals/SDL/include/SDL_haptic.h
vendored
23
externals/SDL/include/SDL_haptic.h
vendored
|
@ -76,7 +76,7 @@
|
|||
* }
|
||||
*
|
||||
* // Create the effect
|
||||
* memset( &effect, 0, sizeof(SDL_HapticEffect) ); // 0 is safe default
|
||||
* SDL_memset( &effect, 0, sizeof(SDL_HapticEffect) ); // 0 is safe default
|
||||
* effect.type = SDL_HAPTIC_SINE;
|
||||
* effect.periodic.direction.type = SDL_HAPTIC_POLAR; // Polar coordinates
|
||||
* effect.periodic.direction.dir[0] = 18000; // Force comes from south
|
||||
|
@ -820,6 +820,7 @@ typedef union SDL_HapticEffect
|
|||
|
||||
|
||||
/* Function prototypes */
|
||||
|
||||
/**
|
||||
* Count the number of haptic devices attached to the system.
|
||||
*
|
||||
|
@ -970,6 +971,8 @@ extern DECLSPEC SDL_Haptic *SDLCALL SDL_HapticOpenFromJoystick(SDL_Joystick *
|
|||
*
|
||||
* \param haptic the SDL_Haptic device to close
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_HapticOpen
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_HapticClose(SDL_Haptic * haptic);
|
||||
|
@ -1033,6 +1036,8 @@ extern DECLSPEC unsigned int SDLCALL SDL_HapticQuery(SDL_Haptic * haptic);
|
|||
* \param haptic the SDL_Haptic device to query
|
||||
* \returns the number of axes on success or a negative error code on failure;
|
||||
* call SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_HapticNumAxes(SDL_Haptic * haptic);
|
||||
|
||||
|
@ -1063,6 +1068,8 @@ extern DECLSPEC int SDLCALL SDL_HapticEffectSupported(SDL_Haptic * haptic,
|
|||
* \returns the ID of the effect on success or a negative error code on
|
||||
* failure; call SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_HapticDestroyEffect
|
||||
* \sa SDL_HapticRunEffect
|
||||
* \sa SDL_HapticUpdateEffect
|
||||
|
@ -1207,6 +1214,8 @@ extern DECLSPEC int SDLCALL SDL_HapticSetGain(SDL_Haptic * haptic, int gain);
|
|||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_HapticQuery
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_HapticSetAutocenter(SDL_Haptic * haptic,
|
||||
|
@ -1225,6 +1234,8 @@ extern DECLSPEC int SDLCALL SDL_HapticSetAutocenter(SDL_Haptic * haptic,
|
|||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_HapticUnpause
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_HapticPause(SDL_Haptic * haptic);
|
||||
|
@ -1238,6 +1249,8 @@ extern DECLSPEC int SDLCALL SDL_HapticPause(SDL_Haptic * haptic);
|
|||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_HapticPause
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_HapticUnpause(SDL_Haptic * haptic);
|
||||
|
@ -1248,6 +1261,8 @@ extern DECLSPEC int SDLCALL SDL_HapticUnpause(SDL_Haptic * haptic);
|
|||
* \param haptic the SDL_Haptic device to stop
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_HapticStopAll(SDL_Haptic * haptic);
|
||||
|
||||
|
@ -1259,6 +1274,8 @@ extern DECLSPEC int SDLCALL SDL_HapticStopAll(SDL_Haptic * haptic);
|
|||
* negative error code on failure; call SDL_GetError() for more
|
||||
* information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_HapticRumbleInit
|
||||
* \sa SDL_HapticRumblePlay
|
||||
* \sa SDL_HapticRumbleStop
|
||||
|
@ -1290,6 +1307,8 @@ extern DECLSPEC int SDLCALL SDL_HapticRumbleInit(SDL_Haptic * haptic);
|
|||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_HapticRumbleInit
|
||||
* \sa SDL_HapticRumbleStop
|
||||
* \sa SDL_HapticRumbleSupported
|
||||
|
@ -1303,6 +1322,8 @@ extern DECLSPEC int SDLCALL SDL_HapticRumblePlay(SDL_Haptic * haptic, float stre
|
|||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_HapticRumbleInit
|
||||
* \sa SDL_HapticRumblePlay
|
||||
* \sa SDL_HapticRumbleSupported
|
||||
|
|
451
externals/SDL/include/SDL_hidapi.h
vendored
Executable file
451
externals/SDL/include/SDL_hidapi.h
vendored
Executable file
|
@ -0,0 +1,451 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2021 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_hidapi.h
|
||||
*
|
||||
* Header file for SDL HIDAPI functions.
|
||||
*
|
||||
* This is an adaptation of the original HIDAPI interface by Alan Ott,
|
||||
* and includes source code licensed under the following BSD license:
|
||||
*
|
||||
Copyright (c) 2010, Alan Ott, Signal 11 Software
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
* Neither the name of Signal 11 Software nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* If you would like a version of SDL without this code, you can build SDL
|
||||
* with SDL_HIDAPI_DISABLED defined to 1. You might want to do this for example
|
||||
* on iOS or tvOS to avoid a dependency on the CoreBluetooth framework.
|
||||
*/
|
||||
|
||||
#ifndef SDL_hidapi_h_
|
||||
#define SDL_hidapi_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \brief A handle representing an open HID device
|
||||
*/
|
||||
struct SDL_hid_device_;
|
||||
typedef struct SDL_hid_device_ SDL_hid_device; /**< opaque hidapi structure */
|
||||
|
||||
/** hidapi info structure */
|
||||
/**
|
||||
* \brief Information about a connected HID device
|
||||
*/
|
||||
typedef struct SDL_hid_device_info
|
||||
{
|
||||
/** Platform-specific device path */
|
||||
char *path;
|
||||
/** Device Vendor ID */
|
||||
unsigned short vendor_id;
|
||||
/** Device Product ID */
|
||||
unsigned short product_id;
|
||||
/** Serial Number */
|
||||
wchar_t *serial_number;
|
||||
/** Device Release Number in binary-coded decimal,
|
||||
also known as Device Version Number */
|
||||
unsigned short release_number;
|
||||
/** Manufacturer String */
|
||||
wchar_t *manufacturer_string;
|
||||
/** Product string */
|
||||
wchar_t *product_string;
|
||||
/** Usage Page for this Device/Interface
|
||||
(Windows/Mac only). */
|
||||
unsigned short usage_page;
|
||||
/** Usage for this Device/Interface
|
||||
(Windows/Mac only).*/
|
||||
unsigned short usage;
|
||||
/** The USB interface which this logical device
|
||||
represents.
|
||||
|
||||
* Valid on both Linux implementations in all cases.
|
||||
* Valid on the Windows implementation only if the device
|
||||
contains more than one interface. */
|
||||
int interface_number;
|
||||
|
||||
/** Additional information about the USB interface.
|
||||
Valid on libusb and Android implementations. */
|
||||
int interface_class;
|
||||
int interface_subclass;
|
||||
int interface_protocol;
|
||||
|
||||
/** Pointer to the next device */
|
||||
struct SDL_hid_device_info *next;
|
||||
} SDL_hid_device_info;
|
||||
|
||||
|
||||
/**
|
||||
* Initialize the HIDAPI library.
|
||||
*
|
||||
* This function initializes the HIDAPI library. Calling it is not strictly
|
||||
* necessary, as it will be called automatically by SDL_hid_enumerate() and
|
||||
* any of the SDL_hid_open_*() functions if it is needed. This function should
|
||||
* be called at the beginning of execution however, if there is a chance of
|
||||
* HIDAPI handles being opened by different threads simultaneously.
|
||||
*
|
||||
* Each call to this function should have a matching call to SDL_hid_exit()
|
||||
*
|
||||
* \returns 0 on success and -1 on error.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.18.
|
||||
*
|
||||
* \sa SDL_hid_exit
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_hid_init(void);
|
||||
|
||||
/**
|
||||
* Finalize the HIDAPI library.
|
||||
*
|
||||
* This function frees all of the static data associated with HIDAPI. It
|
||||
* should be called at the end of execution to avoid memory leaks.
|
||||
*
|
||||
* \returns 0 on success and -1 on error.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.18.
|
||||
*
|
||||
* \sa SDL_hid_init
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_hid_exit(void);
|
||||
|
||||
/**
|
||||
* Check to see if devices may have been added or removed.
|
||||
*
|
||||
* Enumerating the HID devices is an expensive operation, so you can call this
|
||||
* to see if there have been any system device changes since the last call to
|
||||
* this function. A change in the counter returned doesn't necessarily mean
|
||||
* that anything has changed, but you can call SDL_hid_enumerate() to get an
|
||||
* updated device list.
|
||||
*
|
||||
* Calling this function for the first time may cause a thread or other system
|
||||
* resource to be allocated to track device change notifications.
|
||||
*
|
||||
* \returns a change counter that is incremented with each potential device
|
||||
* change, or 0 if device change detection isn't available.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.18.
|
||||
*
|
||||
* \sa SDL_hid_enumerate
|
||||
*/
|
||||
extern DECLSPEC Uint32 SDLCALL SDL_hid_device_change_count(void);
|
||||
|
||||
/**
|
||||
* Enumerate the HID Devices.
|
||||
*
|
||||
* This function returns a linked list of all the HID devices attached to the
|
||||
* system which match vendor_id and product_id. If `vendor_id` is set to 0
|
||||
* then any vendor matches. If `product_id` is set to 0 then any product
|
||||
* matches. If `vendor_id` and `product_id` are both set to 0, then all HID
|
||||
* devices will be returned.
|
||||
*
|
||||
* \param vendor_id The Vendor ID (VID) of the types of device to open.
|
||||
* \param product_id The Product ID (PID) of the types of device to open.
|
||||
* \returns a pointer to a linked list of type SDL_hid_device_info, containing
|
||||
* information about the HID devices attached to the system, or NULL
|
||||
* in the case of failure. Free this linked list by calling
|
||||
* SDL_hid_free_enumeration().
|
||||
*
|
||||
* \since This function is available since SDL 2.0.18.
|
||||
*
|
||||
* \sa SDL_hid_device_change_count
|
||||
*/
|
||||
extern DECLSPEC SDL_hid_device_info * SDLCALL SDL_hid_enumerate(unsigned short vendor_id, unsigned short product_id);
|
||||
|
||||
/**
|
||||
* Free an enumeration Linked List
|
||||
*
|
||||
* This function frees a linked list created by SDL_hid_enumerate().
|
||||
*
|
||||
* \param devs Pointer to a list of struct_device returned from
|
||||
* SDL_hid_enumerate().
|
||||
*
|
||||
* \since This function is available since SDL 2.0.18.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_hid_free_enumeration(SDL_hid_device_info *devs);
|
||||
|
||||
/**
|
||||
* Open a HID device using a Vendor ID (VID), Product ID (PID) and optionally
|
||||
* a serial number.
|
||||
*
|
||||
* If `serial_number` is NULL, the first device with the specified VID and PID
|
||||
* is opened.
|
||||
*
|
||||
* \param vendor_id The Vendor ID (VID) of the device to open.
|
||||
* \param product_id The Product ID (PID) of the device to open.
|
||||
* \param serial_number The Serial Number of the device to open (Optionally
|
||||
* NULL).
|
||||
* \returns a pointer to a SDL_hid_device object on success or NULL on
|
||||
* failure.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.18.
|
||||
*/
|
||||
extern DECLSPEC SDL_hid_device * SDLCALL SDL_hid_open(unsigned short vendor_id, unsigned short product_id, const wchar_t *serial_number);
|
||||
|
||||
/**
|
||||
* Open a HID device by its path name.
|
||||
*
|
||||
* The path name be determined by calling SDL_hid_enumerate(), or a
|
||||
* platform-specific path name can be used (eg: /dev/hidraw0 on Linux).
|
||||
*
|
||||
* \param path The path name of the device to open
|
||||
* \returns a pointer to a SDL_hid_device object on success or NULL on
|
||||
* failure.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.18.
|
||||
*/
|
||||
extern DECLSPEC SDL_hid_device * SDLCALL SDL_hid_open_path(const char *path, int bExclusive /* = false */);
|
||||
|
||||
/**
|
||||
* Write an Output report to a HID device.
|
||||
*
|
||||
* The first byte of `data` must contain the Report ID. For devices which only
|
||||
* support a single report, this must be set to 0x0. The remaining bytes
|
||||
* contain the report data. Since the Report ID is mandatory, calls to
|
||||
* SDL_hid_write() will always contain one more byte than the report contains.
|
||||
* For example, if a hid report is 16 bytes long, 17 bytes must be passed to
|
||||
* SDL_hid_write(), the Report ID (or 0x0, for devices with a single report),
|
||||
* followed by the report data (16 bytes). In this example, the length passed
|
||||
* in would be 17.
|
||||
*
|
||||
* SDL_hid_write() will send the data on the first OUT endpoint, if one
|
||||
* exists. If it does not, it will send the data through the Control Endpoint
|
||||
* (Endpoint 0).
|
||||
*
|
||||
* \param dev A device handle returned from SDL_hid_open().
|
||||
* \param data The data to send, including the report number as the first
|
||||
* byte.
|
||||
* \param length The length in bytes of the data to send.
|
||||
* \returns the actual number of bytes written and -1 on error.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.18.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_hid_write(SDL_hid_device *dev, const unsigned char *data, size_t length);
|
||||
|
||||
/**
|
||||
* Read an Input report from a HID device with timeout.
|
||||
*
|
||||
* Input reports are returned to the host through the INTERRUPT IN endpoint.
|
||||
* The first byte will contain the Report number if the device uses numbered
|
||||
* reports.
|
||||
*
|
||||
* \param dev A device handle returned from SDL_hid_open().
|
||||
* \param data A buffer to put the read data into.
|
||||
* \param length The number of bytes to read. For devices with multiple
|
||||
* reports, make sure to read an extra byte for the report
|
||||
* number.
|
||||
* \param milliseconds timeout in milliseconds or -1 for blocking wait.
|
||||
* \returns the actual number of bytes read and -1 on error. If no packet was
|
||||
* available to be read within the timeout period, this function
|
||||
* returns 0.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.18.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_hid_read_timeout(SDL_hid_device *dev, unsigned char *data, size_t length, int milliseconds);
|
||||
|
||||
/**
|
||||
* Read an Input report from a HID device.
|
||||
*
|
||||
* Input reports are returned to the host through the INTERRUPT IN endpoint.
|
||||
* The first byte will contain the Report number if the device uses numbered
|
||||
* reports.
|
||||
*
|
||||
* \param dev A device handle returned from SDL_hid_open().
|
||||
* \param data A buffer to put the read data into.
|
||||
* \param length The number of bytes to read. For devices with multiple
|
||||
* reports, make sure to read an extra byte for the report
|
||||
* number.
|
||||
* \returns the actual number of bytes read and -1 on error. If no packet was
|
||||
* available to be read and the handle is in non-blocking mode, this
|
||||
* function returns 0.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.18.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_hid_read(SDL_hid_device *dev, unsigned char *data, size_t length);
|
||||
|
||||
/**
|
||||
* Set the device handle to be non-blocking.
|
||||
*
|
||||
* In non-blocking mode calls to SDL_hid_read() will return immediately with a
|
||||
* value of 0 if there is no data to be read. In blocking mode, SDL_hid_read()
|
||||
* will wait (block) until there is data to read before returning.
|
||||
*
|
||||
* Nonblocking can be turned on and off at any time.
|
||||
*
|
||||
* \param dev A device handle returned from SDL_hid_open().
|
||||
* \param nonblock enable or not the nonblocking reads - 1 to enable
|
||||
* nonblocking - 0 to disable nonblocking.
|
||||
* \returns 0 on success and -1 on error.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.18.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_hid_set_nonblocking(SDL_hid_device *dev, int nonblock);
|
||||
|
||||
/**
|
||||
* Send a Feature report to the device.
|
||||
*
|
||||
* Feature reports are sent over the Control endpoint as a Set_Report
|
||||
* transfer. The first byte of `data` must contain the Report ID. For devices
|
||||
* which only support a single report, this must be set to 0x0. The remaining
|
||||
* bytes contain the report data. Since the Report ID is mandatory, calls to
|
||||
* SDL_hid_send_feature_report() will always contain one more byte than the
|
||||
* report contains. For example, if a hid report is 16 bytes long, 17 bytes
|
||||
* must be passed to SDL_hid_send_feature_report(): the Report ID (or 0x0, for
|
||||
* devices which do not use numbered reports), followed by the report data (16
|
||||
* bytes). In this example, the length passed in would be 17.
|
||||
*
|
||||
* \param dev A device handle returned from SDL_hid_open().
|
||||
* \param data The data to send, including the report number as the first
|
||||
* byte.
|
||||
* \param length The length in bytes of the data to send, including the report
|
||||
* number.
|
||||
* \returns the actual number of bytes written and -1 on error.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.18.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_hid_send_feature_report(SDL_hid_device *dev, const unsigned char *data, size_t length);
|
||||
|
||||
/**
|
||||
* Get a feature report from a HID device.
|
||||
*
|
||||
* Set the first byte of `data` to the Report ID of the report to be read.
|
||||
* Make sure to allow space for this extra byte in `data`. Upon return, the
|
||||
* first byte will still contain the Report ID, and the report data will start
|
||||
* in data[1].
|
||||
*
|
||||
* \param dev A device handle returned from SDL_hid_open().
|
||||
* \param data A buffer to put the read data into, including the Report ID.
|
||||
* Set the first byte of `data` to the Report ID of the report to
|
||||
* be read, or set it to zero if your device does not use numbered
|
||||
* reports.
|
||||
* \param length The number of bytes to read, including an extra byte for the
|
||||
* report ID. The buffer can be longer than the actual report.
|
||||
* \returns the number of bytes read plus one for the report ID (which is
|
||||
* still in the first byte), or -1 on error.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.18.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_hid_get_feature_report(SDL_hid_device *dev, unsigned char *data, size_t length);
|
||||
|
||||
/**
|
||||
* Close a HID device.
|
||||
*
|
||||
* \param dev A device handle returned from SDL_hid_open().
|
||||
*
|
||||
* \since This function is available since SDL 2.0.18.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_hid_close(SDL_hid_device *dev);
|
||||
|
||||
/**
|
||||
* Get The Manufacturer String from a HID device.
|
||||
*
|
||||
* \param dev A device handle returned from SDL_hid_open().
|
||||
* \param string A wide string buffer to put the data into.
|
||||
* \param maxlen The length of the buffer in multiples of wchar_t.
|
||||
* \returns 0 on success and -1 on error.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.18.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_hid_get_manufacturer_string(SDL_hid_device *dev, wchar_t *string, size_t maxlen);
|
||||
|
||||
/**
|
||||
* Get The Product String from a HID device.
|
||||
*
|
||||
* \param dev A device handle returned from SDL_hid_open().
|
||||
* \param string A wide string buffer to put the data into.
|
||||
* \param maxlen The length of the buffer in multiples of wchar_t.
|
||||
* \returns 0 on success and -1 on error.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.18.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_hid_get_product_string(SDL_hid_device *dev, wchar_t *string, size_t maxlen);
|
||||
|
||||
/**
|
||||
* Get The Serial Number String from a HID device.
|
||||
*
|
||||
* \param dev A device handle returned from SDL_hid_open().
|
||||
* \param string A wide string buffer to put the data into.
|
||||
* \param maxlen The length of the buffer in multiples of wchar_t.
|
||||
* \returns 0 on success and -1 on error.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.18.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_hid_get_serial_number_string(SDL_hid_device *dev, wchar_t *string, size_t maxlen);
|
||||
|
||||
/**
|
||||
* Get a string from a HID device, based on its string index.
|
||||
*
|
||||
* \param dev A device handle returned from SDL_hid_open().
|
||||
* \param string_index The index of the string to get.
|
||||
* \param string A wide string buffer to put the data into.
|
||||
* \param maxlen The length of the buffer in multiples of wchar_t.
|
||||
* \returns 0 on success and -1 on error.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.18.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_hid_get_indexed_string(SDL_hid_device *dev, int string_index, wchar_t *string, size_t maxlen);
|
||||
|
||||
/**
|
||||
* Start or stop a BLE scan on iOS and tvOS to pair Steam Controllers
|
||||
*
|
||||
* \param active SDL_TRUE to start the scan, SDL_FALSE to stop the scan
|
||||
*
|
||||
* \since This function is available since SDL 2.0.18.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_hid_ble_scan(SDL_bool active);
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* SDL_hidapi_h_ */
|
||||
|
||||
/* vi: set sts=4 ts=4 sw=4 expandtab: */
|
132
externals/SDL/include/SDL_hints.h
vendored
132
externals/SDL/include/SDL_hints.h
vendored
|
@ -145,6 +145,26 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_ANDROID_TRAP_BACK_BUTTON "SDL_ANDROID_TRAP_BACK_BUTTON"
|
||||
|
||||
/**
|
||||
* \brief Specify an application name.
|
||||
*
|
||||
* This hint lets you specify the application name sent to the OS when
|
||||
* required. For example, this will often appear in volume control applets for
|
||||
* audio streams, and in lists of applications which are inhibiting the
|
||||
* screensaver. You should use a string that describes your program ("My Game
|
||||
* 2: The Revenge")
|
||||
*
|
||||
* Setting this to "" or leaving it unset will have SDL use a reasonable
|
||||
* default: probably the application's name or "SDL Application" if SDL
|
||||
* doesn't have any better information.
|
||||
*
|
||||
* Note that, for audio streams, this can be overridden with
|
||||
* SDL_HINT_AUDIO_DEVICE_APP_NAME.
|
||||
*
|
||||
* On targets where this is not supported, this hint does nothing.
|
||||
*/
|
||||
#define SDL_HINT_APP_NAME "SDL_APP_NAME"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether controllers used with the Apple TV
|
||||
* generate UI events.
|
||||
|
@ -199,8 +219,9 @@ extern "C" {
|
|||
* that describes your program ("My Game 2: The Revenge")
|
||||
*
|
||||
* Setting this to "" or leaving it unset will have SDL use a reasonable
|
||||
* default: probably the application's name or "SDL Application" if SDL
|
||||
* doesn't have any better information.
|
||||
* default: this will be the name set with SDL_HINT_APP_NAME, if that hint is
|
||||
* set. Otherwise, it'll probably the application's name or "SDL Application"
|
||||
* if SDL doesn't have any better information.
|
||||
*
|
||||
* On targets where this is not supported, this hint does nothing.
|
||||
*/
|
||||
|
@ -536,6 +557,15 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_IME_INTERNAL_EDITING "SDL_IME_INTERNAL_EDITING"
|
||||
|
||||
/**
|
||||
* \brief A variable to control whether certain IMEs should show native UI components (such as the Candidate List) instead of suppressing them.
|
||||
*
|
||||
* The variable can be set to the following values:
|
||||
* "0" - Native UI components are not display. (default)
|
||||
* "1" - Native UI components are displayed.
|
||||
*/
|
||||
#define SDL_HINT_IME_SHOW_UI "SDL_IME_SHOW_UI"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the home indicator bar on iPhone X
|
||||
* should be hidden.
|
||||
|
@ -690,9 +720,10 @@ extern "C" {
|
|||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - HIDAPI driver is not used
|
||||
* "1" - HIDAPI driver is used
|
||||
* "1" - HIDAPI driver is used for Steam Controllers, which requires Bluetooth access
|
||||
* and may prompt the user for permission on iOS and Android.
|
||||
*
|
||||
* The default is the value of SDL_HINT_JOYSTICK_HIDAPI
|
||||
* The default is "0"
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_HIDAPI_STEAM "SDL_JOYSTICK_HIDAPI_STEAM"
|
||||
|
||||
|
@ -711,8 +742,10 @@ extern "C" {
|
|||
* \brief A variable controlling whether the Home button LED should be turned on when a Nintendo Switch controller is opened
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - home button LED is left off
|
||||
* "1" - home button LED is turned on (the default)
|
||||
* "0" - home button LED is turned off
|
||||
* "1" - home button LED is turned on
|
||||
*
|
||||
* By default the Home button LED state is not changed.
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_HIDAPI_SWITCH_HOME_LED "SDL_JOYSTICK_HIDAPI_SWITCH_HOME_LED"
|
||||
|
||||
|
@ -784,6 +817,24 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_KMSDRM_REQUIRE_DRM_MASTER "SDL_KMSDRM_REQUIRE_DRM_MASTER"
|
||||
|
||||
/**
|
||||
* \brief A comma separated list of devices to open as joysticks
|
||||
*
|
||||
* This variable is currently only used by the Linux joystick driver.
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_DEVICE "SDL_JOYSTICK_DEVICE"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether to use the classic /dev/input/js* joystick interface or the newer /dev/input/event* joystick interface on Linux
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - Use /dev/input/event*
|
||||
* "1" - Use /dev/input/js*
|
||||
*
|
||||
* By default the /dev/input/event* interfaces are used
|
||||
*/
|
||||
#define SDL_HINT_LINUX_JOYSTICK_CLASSIC "SDL_LINUX_JOYSTICK_CLASSIC"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether joysticks on Linux adhere to their HID-defined deadzones or return unfiltered values.
|
||||
*
|
||||
|
@ -926,6 +977,22 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_ORIENTATIONS "SDL_IOS_ORIENTATIONS"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling the use of a sentinel event when polling the event queue
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - Disable poll sentinels
|
||||
* "1" - Enable poll sentinels
|
||||
*
|
||||
* When polling for events, SDL_PumpEvents is used to gather new events from devices.
|
||||
* If a device keeps producing new events between calls to SDL_PumpEvents, a poll loop will
|
||||
* become stuck until the new events stop.
|
||||
* This is most noticable when moving a high frequency mouse.
|
||||
*
|
||||
* By default, poll sentinels are enabled.
|
||||
*/
|
||||
#define SDL_HINT_POLL_SENTINEL "SDL_POLL_SENTINEL"
|
||||
|
||||
/**
|
||||
* \brief Override for SDL_GetPreferredLocales()
|
||||
*
|
||||
|
@ -1101,6 +1168,26 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_RPI_VIDEO_LAYER "SDL_RPI_VIDEO_LAYER"
|
||||
|
||||
/**
|
||||
* \brief Specify an "activity name" for screensaver inhibition.
|
||||
*
|
||||
* Some platforms, notably Linux desktops, list the applications which are
|
||||
* inhibiting the screensaver or other power-saving features.
|
||||
*
|
||||
* This hint lets you specify the "activity name" sent to the OS when
|
||||
* SDL_DisableScreenSaver() is used (or the screensaver is automatically
|
||||
* disabled). The contents of this hint are used when the screensaver is
|
||||
* disabled. You should use a string that describes what your program is doing
|
||||
* (and, therefore, why the screensaver is disabled). For example, "Playing a
|
||||
* game" or "Watching a video".
|
||||
*
|
||||
* Setting this to "" or leaving it unset will have SDL use a reasonable
|
||||
* default: "Playing a game" or something similar.
|
||||
*
|
||||
* On targets where this is not supported, this hint does nothing.
|
||||
*/
|
||||
#define SDL_HINT_SCREENSAVER_INHIBIT_ACTIVITY_NAME "SDL_SCREENSAVER_INHIBIT_ACTIVITY_NAME"
|
||||
|
||||
/**
|
||||
* \brief Specifies whether SDL_THREAD_PRIORITY_TIME_CRITICAL should be treated as realtime.
|
||||
*
|
||||
|
@ -1218,6 +1305,17 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_VIDEO_DOUBLE_BUFFER "SDL_VIDEO_DOUBLE_BUFFER"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the EGL window is allowed to be
|
||||
* composited as transparent, rather than opaque.
|
||||
*
|
||||
* Most window systems will always render windows opaque, even if the surface
|
||||
* format has an alpha channel. This is not always true, however, so by default
|
||||
* SDL will try to enforce opaque composition. To override this behavior, you
|
||||
* can set this hint to "1".
|
||||
*/
|
||||
#define SDL_HINT_VIDEO_EGL_ALLOW_TRANSPARENCY "SDL_VIDEO_EGL_ALLOW_TRANSPARENCY"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the graphics context is externally managed.
|
||||
*
|
||||
|
@ -1484,9 +1582,6 @@ extern "C" {
|
|||
* They offer better performance, allocate no kernel ressources and
|
||||
* use less memory. SDL will fall back to Critical Sections on older
|
||||
* OS versions or if forced to by this hint.
|
||||
* This also affects Condition Variables. When SRW mutexes are used,
|
||||
* SDL will use Windows Condition Variables as well. Else, a generic
|
||||
* SDL_cond implementation will be used that works with all mutexes.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - Use SRW Locks when available. If not, fall back to Critical Sections. (default)
|
||||
|
@ -1557,6 +1652,17 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN "SDL_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the window is activated when the SDL_ShowWindow function is called
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - The window is activated when the SDL_ShowWindow function is called
|
||||
* "1" - The window is not activated when the SDL_ShowWindow function is called
|
||||
*
|
||||
* By default SDL will activate the window when the SDL_ShowWindow function is called
|
||||
*/
|
||||
#define SDL_HINT_WINDOW_NO_ACTIVATION_WHEN_SHOWN "SDL_WINDOW_NO_ACTIVATION_WHEN_SHOWN"
|
||||
|
||||
/** \brief Allows back-button-press events on Windows Phone to be marked as handled
|
||||
*
|
||||
* Windows Phone devices typically feature a Back button. When pressed,
|
||||
|
@ -1729,6 +1835,8 @@ typedef enum
|
|||
* \param priority the SDL_HintPriority level for the hint
|
||||
* \returns SDL_TRUE if the hint was set, SDL_FALSE otherwise.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_GetHint
|
||||
* \sa SDL_SetHint
|
||||
*/
|
||||
|
@ -1747,6 +1855,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_SetHintWithPriority(const char *name,
|
|||
* \param value the value of the hint variable
|
||||
* \returns SDL_TRUE if the hint was set, SDL_FALSE otherwise.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_GetHint
|
||||
* \sa SDL_SetHintWithPriority
|
||||
*/
|
||||
|
@ -1759,6 +1869,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_SetHint(const char *name,
|
|||
* \param name the hint to query
|
||||
* \returns the string value of a hint or NULL if the hint isn't set.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_SetHint
|
||||
* \sa SDL_SetHintWithPriority
|
||||
*/
|
||||
|
@ -1825,6 +1937,8 @@ extern DECLSPEC void SDLCALL SDL_DelHintCallback(const char *name,
|
|||
* Clear all hints.
|
||||
*
|
||||
* This function is automatically called during SDL_Quit().
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_ClearHints(void);
|
||||
|
||||
|
|
125
externals/SDL/include/SDL_joystick.h
vendored
125
externals/SDL/include/SDL_joystick.h
vendored
|
@ -124,6 +124,8 @@ typedef enum
|
|||
* In particular, you are guaranteed that the joystick list won't change, so
|
||||
* the API functions that take a joystick index will be valid, and joystick
|
||||
* and game controller events will not be delivered.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.7.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_LockJoysticks(void);
|
||||
|
||||
|
@ -137,6 +139,8 @@ extern DECLSPEC void SDLCALL SDL_LockJoysticks(void);
|
|||
* In particular, you are guaranteed that the joystick list won't change, so
|
||||
* the API functions that take a joystick index will be valid, and joystick
|
||||
* and game controller events will not be delivered.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.7.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_UnlockJoysticks(void);
|
||||
|
||||
|
@ -146,6 +150,8 @@ extern DECLSPEC void SDLCALL SDL_UnlockJoysticks(void);
|
|||
* \returns the number of attached joysticks on success or a negative error
|
||||
* code on failure; call SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_JoystickName
|
||||
* \sa SDL_JoystickOpen
|
||||
*/
|
||||
|
@ -161,6 +167,8 @@ extern DECLSPEC int SDLCALL SDL_NumJoysticks(void);
|
|||
* \returns the name of the selected joystick. If no name can be found, this
|
||||
* function returns NULL; call SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_JoystickName
|
||||
* \sa SDL_JoystickOpen
|
||||
*/
|
||||
|
@ -169,6 +177,8 @@ 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.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.9.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickGetDevicePlayerIndex(int device_index);
|
||||
|
||||
|
@ -183,6 +193,8 @@ extern DECLSPEC int SDLCALL SDL_JoystickGetDevicePlayerIndex(int device_index);
|
|||
* \returns the GUID of the selected joystick. If called on an invalid index,
|
||||
* this function returns a zero GUID
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_JoystickGetGUID
|
||||
* \sa SDL_JoystickGetGUIDString
|
||||
*/
|
||||
|
@ -198,6 +210,8 @@ extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetDeviceGUID(int device_in
|
|||
* on the system
|
||||
* \returns the USB vendor ID of the selected joystick. If called on an
|
||||
* invalid index, this function returns zero
|
||||
*
|
||||
* \since This function is available since SDL 2.0.6.
|
||||
*/
|
||||
extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetDeviceVendor(int device_index);
|
||||
|
||||
|
@ -211,6 +225,8 @@ extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetDeviceVendor(int device_index);
|
|||
* on the system
|
||||
* \returns the USB product ID of the selected joystick. If called on an
|
||||
* invalid index, this function returns zero
|
||||
*
|
||||
* \since This function is available since SDL 2.0.6.
|
||||
*/
|
||||
extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetDeviceProduct(int device_index);
|
||||
|
||||
|
@ -224,6 +240,8 @@ extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetDeviceProduct(int device_index);
|
|||
* on the system
|
||||
* \returns the product version of the selected joystick. If called on an
|
||||
* invalid index, this function returns zero
|
||||
*
|
||||
* \since This function is available since SDL 2.0.6.
|
||||
*/
|
||||
extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetDeviceProductVersion(int device_index);
|
||||
|
||||
|
@ -236,6 +254,8 @@ extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetDeviceProductVersion(int device_in
|
|||
* on the system
|
||||
* \returns the SDL_JoystickType of the selected joystick. If called on an
|
||||
* invalid index, this function returns `SDL_JOYSTICK_TYPE_UNKNOWN`
|
||||
*
|
||||
* \since This function is available since SDL 2.0.6.
|
||||
*/
|
||||
extern DECLSPEC SDL_JoystickType SDLCALL SDL_JoystickGetDeviceType(int device_index);
|
||||
|
||||
|
@ -249,6 +269,8 @@ extern DECLSPEC SDL_JoystickType SDLCALL SDL_JoystickGetDeviceType(int device_in
|
|||
* on the system
|
||||
* \returns the instance id of the selected joystick. If called on an invalid
|
||||
* index, this function returns zero
|
||||
*
|
||||
* \since This function is available since SDL 2.0.6.
|
||||
*/
|
||||
extern DECLSPEC SDL_JoystickID SDLCALL SDL_JoystickGetDeviceInstanceID(int device_index);
|
||||
|
||||
|
@ -267,6 +289,8 @@ extern DECLSPEC SDL_JoystickID SDLCALL SDL_JoystickGetDeviceInstanceID(int devic
|
|||
* \returns a joystick identifier or NULL if an error occurred; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_JoystickClose
|
||||
* \sa SDL_JoystickInstanceID
|
||||
*/
|
||||
|
@ -289,6 +313,8 @@ extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickFromInstanceID(SDL_JoystickID
|
|||
* \param player_index the player index to get the SDL_Joystick for
|
||||
* \returns an SDL_Joystick on success or NULL on failure; call SDL_GetError()
|
||||
* for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.12.
|
||||
*/
|
||||
extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickFromPlayerIndex(int player_index);
|
||||
|
||||
|
@ -296,6 +322,8 @@ extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickFromPlayerIndex(int player_ind
|
|||
* Attach a new virtual joystick.
|
||||
*
|
||||
* \returns the joystick's device index, or -1 if an error occurred.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.14.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickAttachVirtual(SDL_JoystickType type,
|
||||
int naxes,
|
||||
|
@ -308,6 +336,8 @@ extern DECLSPEC int SDLCALL SDL_JoystickAttachVirtual(SDL_JoystickType type,
|
|||
* \param device_index a value previously returned from
|
||||
* SDL_JoystickAttachVirtual()
|
||||
* \returns 0 on success, or -1 if an error occurred.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.14.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickDetachVirtual(int device_index);
|
||||
|
||||
|
@ -316,6 +346,8 @@ extern DECLSPEC int SDLCALL SDL_JoystickDetachVirtual(int device_index);
|
|||
*
|
||||
* \param device_index a joystick device index.
|
||||
* \returns SDL_TRUE if the joystick is virtual, SDL_FALSE otherwise.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.14.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_JoystickIsVirtual(int device_index);
|
||||
|
||||
|
@ -332,6 +364,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_JoystickIsVirtual(int device_index);
|
|||
* \param axis the specific axis on the virtual joystick to set.
|
||||
* \param value the new value for the specified axis.
|
||||
* \returns 0 on success, -1 on error.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.14.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickSetVirtualAxis(SDL_Joystick *joystick, int axis, Sint16 value);
|
||||
|
||||
|
@ -348,6 +382,8 @@ extern DECLSPEC int SDLCALL SDL_JoystickSetVirtualAxis(SDL_Joystick *joystick, i
|
|||
* \param button the specific button on the virtual joystick to set.
|
||||
* \param value the new value for the specified button.
|
||||
* \returns 0 on success, -1 on error.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.14.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickSetVirtualButton(SDL_Joystick *joystick, int button, Uint8 value);
|
||||
|
||||
|
@ -364,6 +400,8 @@ extern DECLSPEC int SDLCALL SDL_JoystickSetVirtualButton(SDL_Joystick *joystick,
|
|||
* \param hat the specific hat on the virtual joystick to set.
|
||||
* \param value the new value for the specified hat.
|
||||
* \returns 0 on success, -1 on error.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.14.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickSetVirtualHat(SDL_Joystick *joystick, int hat, Uint8 value);
|
||||
|
||||
|
@ -389,6 +427,8 @@ extern DECLSPEC const char *SDLCALL SDL_JoystickName(SDL_Joystick *joystick);
|
|||
*
|
||||
* \param joystick the SDL_Joystick obtained from SDL_JoystickOpen()
|
||||
* \returns the player index, or -1 if it's not available.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.9.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickGetPlayerIndex(SDL_Joystick *joystick);
|
||||
|
||||
|
@ -397,6 +437,8 @@ extern DECLSPEC int SDLCALL SDL_JoystickGetPlayerIndex(SDL_Joystick *joystick);
|
|||
*
|
||||
* \param joystick the SDL_Joystick obtained from SDL_JoystickOpen()
|
||||
* \param player_index the player index to set.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.12.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_JoystickSetPlayerIndex(SDL_Joystick *joystick, int player_index);
|
||||
|
||||
|
@ -410,6 +452,8 @@ extern DECLSPEC void SDLCALL SDL_JoystickSetPlayerIndex(SDL_Joystick *joystick,
|
|||
* this function returns a zero GUID; call SDL_GetError() for more
|
||||
* information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_JoystickGetDeviceGUID
|
||||
* \sa SDL_JoystickGetGUIDString
|
||||
*/
|
||||
|
@ -422,6 +466,8 @@ extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetGUID(SDL_Joystick *joyst
|
|||
*
|
||||
* \param joystick the SDL_Joystick obtained from SDL_JoystickOpen()
|
||||
* \returns the USB vendor ID of the selected joystick, or 0 if unavailable.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.6.
|
||||
*/
|
||||
extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetVendor(SDL_Joystick *joystick);
|
||||
|
||||
|
@ -432,6 +478,8 @@ extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetVendor(SDL_Joystick *joystick);
|
|||
*
|
||||
* \param joystick the SDL_Joystick obtained from SDL_JoystickOpen()
|
||||
* \returns the USB product ID of the selected joystick, or 0 if unavailable.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.6.
|
||||
*/
|
||||
extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetProduct(SDL_Joystick *joystick);
|
||||
|
||||
|
@ -442,6 +490,8 @@ extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetProduct(SDL_Joystick *joystick);
|
|||
*
|
||||
* \param joystick the SDL_Joystick obtained from SDL_JoystickOpen()
|
||||
* \returns the product version of the selected joystick, or 0 if unavailable.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.6.
|
||||
*/
|
||||
extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetProductVersion(SDL_Joystick *joystick);
|
||||
|
||||
|
@ -453,6 +503,8 @@ extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetProductVersion(SDL_Joystick *joyst
|
|||
* \param joystick the SDL_Joystick obtained from SDL_JoystickOpen()
|
||||
* \returns the serial number of the selected joystick, or NULL if
|
||||
* unavailable.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.14.
|
||||
*/
|
||||
extern DECLSPEC const char * SDLCALL SDL_JoystickGetSerial(SDL_Joystick *joystick);
|
||||
|
||||
|
@ -461,6 +513,8 @@ extern DECLSPEC const char * SDLCALL SDL_JoystickGetSerial(SDL_Joystick *joystic
|
|||
*
|
||||
* \param joystick the SDL_Joystick obtained from SDL_JoystickOpen()
|
||||
* \returns the SDL_JoystickType of the selected joystick.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.6.
|
||||
*/
|
||||
extern DECLSPEC SDL_JoystickType SDLCALL SDL_JoystickGetType(SDL_Joystick *joystick);
|
||||
|
||||
|
@ -473,6 +527,8 @@ extern DECLSPEC SDL_JoystickType SDLCALL SDL_JoystickGetType(SDL_Joystick *joyst
|
|||
* \param pszGUID buffer in which to write the ASCII string
|
||||
* \param cbGUID the size of pszGUID
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_JoystickGetDeviceGUID
|
||||
* \sa SDL_JoystickGetGUID
|
||||
* \sa SDL_JoystickGetGUIDFromString
|
||||
|
@ -489,6 +545,8 @@ extern DECLSPEC void SDLCALL SDL_JoystickGetGUIDString(SDL_JoystickGUID guid, ch
|
|||
* \param pchGUID string containing an ASCII representation of a GUID
|
||||
* \returns a SDL_JoystickGUID structure.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_JoystickGetGUIDString
|
||||
*/
|
||||
extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetGUIDFromString(const char *pchGUID);
|
||||
|
@ -500,6 +558,8 @@ extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetGUIDFromString(const cha
|
|||
* \returns SDL_TRUE if the joystick has been opened, SDL_FALSE if it has not;
|
||||
* call SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_JoystickClose
|
||||
* \sa SDL_JoystickOpen
|
||||
*/
|
||||
|
@ -512,6 +572,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_JoystickGetAttached(SDL_Joystick *joystick)
|
|||
* \returns the instance ID of the specified joystick on success or a negative
|
||||
* error code on failure; call SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_JoystickOpen
|
||||
*/
|
||||
extern DECLSPEC SDL_JoystickID SDLCALL SDL_JoystickInstanceID(SDL_Joystick *joystick);
|
||||
|
@ -528,6 +590,8 @@ extern DECLSPEC SDL_JoystickID SDLCALL SDL_JoystickInstanceID(SDL_Joystick *joys
|
|||
* negative error code on failure; call SDL_GetError() for more
|
||||
* information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_JoystickGetAxis
|
||||
* \sa SDL_JoystickOpen
|
||||
*/
|
||||
|
@ -545,6 +609,8 @@ extern DECLSPEC int SDLCALL SDL_JoystickNumAxes(SDL_Joystick *joystick);
|
|||
* \returns the number of trackballs on success or a negative error code on
|
||||
* failure; call SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_JoystickGetBall
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickNumBalls(SDL_Joystick *joystick);
|
||||
|
@ -556,6 +622,8 @@ extern DECLSPEC int SDLCALL SDL_JoystickNumBalls(SDL_Joystick *joystick);
|
|||
* \returns the number of POV hats on success or a negative error code on
|
||||
* failure; call SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_JoystickGetHat
|
||||
* \sa SDL_JoystickOpen
|
||||
*/
|
||||
|
@ -568,6 +636,8 @@ extern DECLSPEC int SDLCALL SDL_JoystickNumHats(SDL_Joystick *joystick);
|
|||
* \returns the number of buttons on success or a negative error code on
|
||||
* failure; call SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_JoystickGetButton
|
||||
* \sa SDL_JoystickOpen
|
||||
*/
|
||||
|
@ -579,6 +649,8 @@ extern DECLSPEC int SDLCALL SDL_JoystickNumButtons(SDL_Joystick *joystick);
|
|||
* This is called automatically by the event loop if any joystick events are
|
||||
* enabled.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_JoystickEventState
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_JoystickUpdate(void);
|
||||
|
@ -602,12 +674,15 @@ extern DECLSPEC void SDLCALL SDL_JoystickUpdate(void);
|
|||
* If `state` is `SDL_QUERY` then the current state is returned,
|
||||
* otherwise the new processing state is returned.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_GameControllerEventState
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickEventState(int state);
|
||||
|
||||
#define SDL_JOYSTICK_AXIS_MAX 32767
|
||||
#define SDL_JOYSTICK_AXIS_MIN -32768
|
||||
|
||||
/**
|
||||
* Get the current state of an axis control on a joystick.
|
||||
*
|
||||
|
@ -626,6 +701,8 @@ extern DECLSPEC int SDLCALL SDL_JoystickEventState(int state);
|
|||
* \returns a 16-bit signed integer representing the current position of the
|
||||
* axis or 0 on failure; call SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_JoystickNumAxes
|
||||
*/
|
||||
extern DECLSPEC Sint16 SDLCALL SDL_JoystickGetAxis(SDL_Joystick *joystick,
|
||||
|
@ -642,6 +719,8 @@ extern DECLSPEC Sint16 SDLCALL SDL_JoystickGetAxis(SDL_Joystick *joystick,
|
|||
* \param axis the axis to query; the axis indices start at index 0
|
||||
* \param state Upon return, the initial value is supplied here.
|
||||
* \return SDL_TRUE if this axis has any initial value, or SDL_FALSE if not.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.6.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_JoystickGetAxisInitialState(SDL_Joystick *joystick,
|
||||
int axis, Sint16 *state);
|
||||
|
@ -680,6 +759,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_JoystickGetAxisInitialState(SDL_Joystick *j
|
|||
* \param hat the hat index to get the state from; indices start at index 0
|
||||
* \returns the current hat position.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_JoystickNumHats
|
||||
*/
|
||||
extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetHat(SDL_Joystick *joystick,
|
||||
|
@ -700,6 +781,8 @@ extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetHat(SDL_Joystick *joystick,
|
|||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_JoystickNumBalls
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickGetBall(SDL_Joystick *joystick,
|
||||
|
@ -713,6 +796,8 @@ extern DECLSPEC int SDLCALL SDL_JoystickGetBall(SDL_Joystick *joystick,
|
|||
* index 0
|
||||
* \returns 1 if the specified button is pressed, 0 otherwise.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_JoystickNumButtons
|
||||
*/
|
||||
extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetButton(SDL_Joystick *joystick,
|
||||
|
@ -731,6 +816,10 @@ extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetButton(SDL_Joystick *joystick,
|
|||
* rumble motor, from 0 to 0xFFFF
|
||||
* \param duration_ms The duration of the rumble effect, in milliseconds
|
||||
* \returns 0, or -1 if rumble isn't supported on this joystick
|
||||
*
|
||||
* \since This function is available since SDL 2.0.9.
|
||||
*
|
||||
* \sa SDL_JoystickHasRumble
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms);
|
||||
|
||||
|
@ -752,6 +841,10 @@ extern DECLSPEC int SDLCALL SDL_JoystickRumble(SDL_Joystick *joystick, Uint16 lo
|
|||
* to 0xFFFF
|
||||
* \param duration_ms The duration of the rumble effect, in milliseconds
|
||||
* \returns 0, or -1 if trigger rumble isn't supported on this joystick
|
||||
*
|
||||
* \since This function is available since SDL 2.0.14.
|
||||
*
|
||||
* \sa SDL_JoystickHasRumbleTriggers
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickRumbleTriggers(SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble, Uint32 duration_ms);
|
||||
|
||||
|
@ -763,9 +856,35 @@ extern DECLSPEC int SDLCALL SDL_JoystickRumbleTriggers(SDL_Joystick *joystick, U
|
|||
*
|
||||
* \param joystick The joystick to query
|
||||
* \return SDL_TRUE if the joystick has a modifiable LED, SDL_FALSE otherwise.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.14.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_JoystickHasLED(SDL_Joystick *joystick);
|
||||
|
||||
/**
|
||||
* Query whether a joystick has rumble support.
|
||||
*
|
||||
* \param joystick The joystick to query
|
||||
* \return SDL_TRUE if the joystick has rumble, SDL_FALSE otherwise.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.18.
|
||||
*
|
||||
* \sa SDL_JoystickRumble
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_JoystickHasRumble(SDL_Joystick *joystick);
|
||||
|
||||
/**
|
||||
* Query whether a joystick has rumble support on triggers.
|
||||
*
|
||||
* \param joystick The joystick to query
|
||||
* \return SDL_TRUE if the joystick has trigger rumble, SDL_FALSE otherwise.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.18.
|
||||
*
|
||||
* \sa SDL_JoystickRumbleTriggers
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_JoystickHasRumbleTriggers(SDL_Joystick *joystick);
|
||||
|
||||
/**
|
||||
* Update a joystick's LED color.
|
||||
*
|
||||
|
@ -777,6 +896,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_JoystickHasLED(SDL_Joystick *joystick);
|
|||
* \param green The intensity of the green LED
|
||||
* \param blue The intensity of the blue LED
|
||||
* \returns 0 on success, -1 if this joystick does not have a modifiable LED
|
||||
*
|
||||
* \since This function is available since SDL 2.0.14.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickSetLED(SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue);
|
||||
|
||||
|
@ -787,6 +908,8 @@ extern DECLSPEC int SDLCALL SDL_JoystickSetLED(SDL_Joystick *joystick, Uint8 red
|
|||
* \param data The data to send to the joystick
|
||||
* \param size The size of the data to send to the joystick
|
||||
* \returns 0, or -1 if this joystick or driver doesn't support effect packets
|
||||
*
|
||||
* \since This function is available since SDL 2.0.16.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickSendEffect(SDL_Joystick *joystick, const void *data, int size);
|
||||
|
||||
|
@ -795,6 +918,8 @@ extern DECLSPEC int SDLCALL SDL_JoystickSendEffect(SDL_Joystick *joystick, const
|
|||
*
|
||||
* \param joystick The joystick device to close
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_JoystickOpen
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_JoystickClose(SDL_Joystick *joystick);
|
||||
|
|
22
externals/SDL/include/SDL_keyboard.h
vendored
22
externals/SDL/include/SDL_keyboard.h
vendored
|
@ -58,6 +58,8 @@ typedef struct SDL_Keysym
|
|||
* Query the window which currently has keyboard focus.
|
||||
*
|
||||
* \returns the window with keyboard focus.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*/
|
||||
extern DECLSPEC SDL_Window * SDLCALL SDL_GetKeyboardFocus(void);
|
||||
|
||||
|
@ -85,6 +87,8 @@ extern DECLSPEC SDL_Window * SDLCALL SDL_GetKeyboardFocus(void);
|
|||
* \param numkeys if non-NULL, receives the length of the returned array
|
||||
* \returns a pointer to an array of key states.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_PumpEvents
|
||||
*/
|
||||
extern DECLSPEC const Uint8 *SDLCALL SDL_GetKeyboardState(int *numkeys);
|
||||
|
@ -95,6 +99,8 @@ extern DECLSPEC const Uint8 *SDLCALL SDL_GetKeyboardState(int *numkeys);
|
|||
* \returns an OR'd combination of the modifier keys for the keyboard. See
|
||||
* SDL_Keymod for details.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_GetKeyboardState
|
||||
* \sa SDL_SetModState
|
||||
*/
|
||||
|
@ -113,6 +119,8 @@ extern DECLSPEC SDL_Keymod SDLCALL SDL_GetModState(void);
|
|||
*
|
||||
* \param modstate the desired SDL_Keymod for the keyboard
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_GetModState
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_SetModState(SDL_Keymod modstate);
|
||||
|
@ -126,6 +134,8 @@ extern DECLSPEC void SDLCALL SDL_SetModState(SDL_Keymod modstate);
|
|||
* \param scancode the desired SDL_Scancode to query
|
||||
* \returns the SDL_Keycode that corresponds to the given SDL_Scancode.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_GetKeyName
|
||||
* \sa SDL_GetScancodeFromKey
|
||||
*/
|
||||
|
@ -140,6 +150,8 @@ extern DECLSPEC SDL_Keycode SDLCALL SDL_GetKeyFromScancode(SDL_Scancode scancode
|
|||
* \param key the desired SDL_Keycode to query
|
||||
* \returns the SDL_Scancode that corresponds to the given SDL_Keycode.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_GetKeyFromScancode
|
||||
* \sa SDL_GetScancodeName
|
||||
*/
|
||||
|
@ -196,6 +208,8 @@ extern DECLSPEC SDL_Scancode SDLCALL SDL_GetScancodeFromName(const char *name);
|
|||
* must copy it. If the key doesn't have a name, this function
|
||||
* returns an empty string ("").
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_GetKeyFromName
|
||||
* \sa SDL_GetKeyFromScancode
|
||||
* \sa SDL_GetScancodeFromKey
|
||||
|
@ -209,6 +223,8 @@ extern DECLSPEC const char *SDLCALL SDL_GetKeyName(SDL_Keycode key);
|
|||
* \returns key code, or `SDLK_UNKNOWN` if the name wasn't recognized; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_GetKeyFromScancode
|
||||
* \sa SDL_GetKeyName
|
||||
* \sa SDL_GetScancodeFromName
|
||||
|
@ -225,6 +241,8 @@ extern DECLSPEC SDL_Keycode SDLCALL SDL_GetKeyFromName(const char *name);
|
|||
*
|
||||
* On some platforms using this function activates the screen keyboard.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_SetTextInputRect
|
||||
* \sa SDL_StopTextInput
|
||||
*/
|
||||
|
@ -244,6 +262,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_IsTextInputActive(void);
|
|||
/**
|
||||
* Stop receiving any text input events.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_StartTextInput
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_StopTextInput(void);
|
||||
|
@ -254,6 +274,8 @@ extern DECLSPEC void SDLCALL SDL_StopTextInput(void);
|
|||
* \param rect the SDL_Rect structure representing the rectangle to receive
|
||||
* text (ignored if NULL)
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_StartTextInput
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_SetTextInputRect(SDL_Rect *rect);
|
||||
|
|
6
externals/SDL/include/SDL_keycode.h
vendored
6
externals/SDL/include/SDL_keycode.h
vendored
|
@ -338,12 +338,14 @@ typedef enum
|
|||
KMOD_NUM = 0x1000,
|
||||
KMOD_CAPS = 0x2000,
|
||||
KMOD_MODE = 0x4000,
|
||||
KMOD_RESERVED = 0x8000,
|
||||
KMOD_SCROLL = 0x8000,
|
||||
|
||||
KMOD_CTRL = KMOD_LCTRL | KMOD_RCTRL,
|
||||
KMOD_SHIFT = KMOD_LSHIFT | KMOD_RSHIFT,
|
||||
KMOD_ALT = KMOD_LALT | KMOD_RALT,
|
||||
KMOD_GUI = KMOD_LGUI | KMOD_RGUI
|
||||
KMOD_GUI = KMOD_LGUI | KMOD_RGUI,
|
||||
|
||||
KMOD_RESERVED = KMOD_SCROLL /* This is for source-level compatibility with SDL 2.0.0. */
|
||||
} SDL_Keymod;
|
||||
|
||||
#endif /* SDL_keycode_h_ */
|
||||
|
|
6
externals/SDL/include/SDL_loadso.h
vendored
6
externals/SDL/include/SDL_loadso.h
vendored
|
@ -57,6 +57,8 @@ extern "C" {
|
|||
* \returns an opaque pointer to the object handle or NULL if there was an
|
||||
* error; call SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_LoadFunction
|
||||
* \sa SDL_UnloadObject
|
||||
*/
|
||||
|
@ -82,6 +84,8 @@ extern DECLSPEC void *SDLCALL SDL_LoadObject(const char *sofile);
|
|||
* \returns a pointer to the function or NULL if there was an error; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_LoadObject
|
||||
* \sa SDL_UnloadObject
|
||||
*/
|
||||
|
@ -93,6 +97,8 @@ extern DECLSPEC void *SDLCALL SDL_LoadFunction(void *handle,
|
|||
*
|
||||
* \param handle a valid shared object handle returned by SDL_LoadObject()
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_LoadFunction
|
||||
* \sa SDL_LoadObject
|
||||
*/
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue