updae source to 2.0.9 source
1 files renamed
297 files modified
104 files added
1 files deleted
| | |
| | | test/testrumble |
| | | test/testscale |
| | | test/testsem |
| | | test/testsensor |
| | | test/testshader |
| | | test/testshape |
| | | test/testsprite2 |
| | |
| | | 007dfe83abf81b1ff5df40186f65e8e64987b825 release-2.0.5 |
| | | 8df7a59b55283aa09889522369a2b32674c048de release-2.0.6 |
| | | 2088cd828335797d73d151e3288d899f77204862 release-2.0.7 |
| | | f1084c419f33610cf274e309a8b2798d2ae665c7 release-2.0.8 |
old mode 100755
new mode 100644
| | |
| | | $(wildcard $(LOCAL_PATH)/src/haptic/android/*.c) \ |
| | | $(wildcard $(LOCAL_PATH)/src/joystick/*.c) \ |
| | | $(wildcard $(LOCAL_PATH)/src/joystick/android/*.c) \ |
| | | $(LOCAL_PATH)/src/joystick/steam/SDL_steamcontroller.c \ |
| | | $(wildcard $(LOCAL_PATH)/src/joystick/hidapi/*.c) \ |
| | | $(wildcard $(LOCAL_PATH)/src/loadso/dlopen/*.c) \ |
| | | $(wildcard $(LOCAL_PATH)/src/power/*.c) \ |
| | | $(wildcard $(LOCAL_PATH)/src/power/android/*.c) \ |
| | | $(wildcard $(LOCAL_PATH)/src/filesystem/android/*.c) \ |
| | | $(wildcard $(LOCAL_PATH)/src/sensor/*.c) \ |
| | | $(wildcard $(LOCAL_PATH)/src/sensor/android/*.c) \ |
| | | $(wildcard $(LOCAL_PATH)/src/render/*.c) \ |
| | | $(wildcard $(LOCAL_PATH)/src/render/*/*.c) \ |
| | | $(wildcard $(LOCAL_PATH)/src/stdlib/*.c) \ |
| | |
| | | $(wildcard $(LOCAL_PATH)/src/video/yuv2rgb/*.c) \ |
| | | $(wildcard $(LOCAL_PATH)/src/test/*.c)) |
| | | |
| | | LOCAL_SHARED_LIBRARIES := hidapi |
| | | |
| | | LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES |
| | | LOCAL_LDLIBS := -ldl -lGLESv1_CM -lGLESv2 -llog -landroid |
| | | |
| | | ifeq ($(NDK_DEBUG),1) |
| | | cmd-strip := |
| | | endif |
| | | |
| | | include $(BUILD_SHARED_LIBRARY) |
| | | |
| | |
| | | |
| | | 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) |
| | |
| | | # set SDL_BINARY_AGE and SDL_INTERFACE_AGE to 0. |
| | | set(SDL_MAJOR_VERSION 2) |
| | | set(SDL_MINOR_VERSION 0) |
| | | set(SDL_MICRO_VERSION 8) |
| | | set(SDL_MICRO_VERSION 9) |
| | | set(SDL_INTERFACE_AGE 0) |
| | | set(SDL_BINARY_AGE 8) |
| | | set(SDL_BINARY_AGE 9) |
| | | set(SDL_VERSION "${SDL_MAJOR_VERSION}.${SDL_MINOR_VERSION}.${SDL_MICRO_VERSION}") |
| | | # the following should match the versions in Xcode project file: |
| | | set(DYLIB_CURRENT_VERSION 10.0.0) |
| | | set(DYLIB_COMPATIBILITY_VERSION 1.0.0) |
| | | |
| | | # Set defaults preventing destination file conflicts |
| | | set(SDL_CMAKE_DEBUG_POSTFIX "d" |
| | |
| | | set(SDL_LIBS "-lSDL2") |
| | | set(SDL_CFLAGS "") |
| | | |
| | | # When building shared lib for Windows with MinGW, |
| | | # avoid the DLL having a "lib" prefix |
| | | if(WINDOWS) |
| | | set(CMAKE_SHARED_LIBRARY_PREFIX "") |
| | | endif() |
| | | |
| | | # Emscripten toolchain has a nonempty default value for this, and the checks |
| | | # in this file need to change that, so remember the original value, and |
| | | # restore back to that afterwards. For check_function_exists() to work in |
| | |
| | | |
| | | set(SDL_SUBSYSTEMS |
| | | Atomic Audio Video Render Events Joystick Haptic Power Threads Timers |
| | | File Loadso CPUinfo Filesystem Dlopen) |
| | | File Loadso CPUinfo Filesystem Dlopen Sensor) |
| | | foreach(_SUB ${SDL_SUBSYSTEMS}) |
| | | string(TOUPPER ${_SUB} _OPT) |
| | | if (NOT DEFINED SDL_${_OPT}_ENABLED_BY_DEFAULT) |
| | |
| | | endforeach() |
| | | set_option(VIDEO_COCOA "Use Cocoa video driver" ${APPLE}) |
| | | set_option(DIRECTX "Use DirectX for Windows audio/video" ${WINDOWS}) |
| | | set_option(WASAPI "Use the Windows WASAPI audio driver" ${WINDOWS}) |
| | | set_option(RENDER_D3D "Enable the Direct3D render driver" ${WINDOWS}) |
| | | set_option(VIDEO_VIVANTE "Use Vivante EGL video driver" ${UNIX_SYS}) |
| | | dep_option(VIDEO_VULKAN "Enable Vulkan support" ON "ANDROID OR APPLE OR LINUX OR WINDOWS" OFF) |
| | |
| | | |
| | | if(APPLE) |
| | | list(APPEND EXTRA_LDFLAGS "-Wl,-undefined,error") |
| | | list(APPEND EXTRA_LDFLAGS "-Wl,-compatibility_version,${DYLIB_COMPATIBILITY_VERSION}") |
| | | list(APPEND EXTRA_LDFLAGS "-Wl,-current_version,${DYLIB_CURRENT_VERSION}") |
| | | else() |
| | | set(CMAKE_REQUIRED_FLAGS "-Wl,--no-undefined") |
| | | check_c_compiler_flag("" HAVE_NO_UNDEFINED) |
| | |
| | | _ultoa strtol strtoul strtoll strtod atoi atof strcmp strncmp |
| | | _stricmp _strnicmp sscanf |
| | | acos acosf asin asinf atan atanf atan2 atan2f ceil ceilf |
| | | copysign copysignf cos cosf fabs fabsf floor floorf fmod fmodf |
| | | copysign copysignf cos cosf exp expf fabs fabsf floor floorf fmod fmodf |
| | | log logf log10 log10f pow powf scalbn scalbnf sin sinf sqrt sqrtf tan tanf) |
| | | string(TOUPPER ${_FN} _UPPER) |
| | | set(HAVE_${_UPPER} 1) |
| | |
| | | endif() |
| | | file(GLOB HAPTIC_SOURCES ${SDL2_SOURCE_DIR}/src/haptic/*.c) |
| | | set(SOURCE_FILES ${SOURCE_FILES} ${HAPTIC_SOURCES}) |
| | | endif() |
| | | if(SDL_SENSOR) |
| | | file(GLOB SENSOR_SOURCES ${SDL2_SOURCE_DIR}/src/sensor/*.c) |
| | | set(SOURCE_FILES ${SOURCE_FILES} ${SENSOR_SOURCES}) |
| | | endif() |
| | | if(SDL_POWER) |
| | | file(GLOB POWER_SOURCES ${SDL2_SOURCE_DIR}/src/power/*.c) |
| | |
| | | file(GLOB TIMER_SOURCES ${SDL2_SOURCE_DIR}/src/timer/unix/*.c) |
| | | set(SOURCE_FILES ${SOURCE_FILES} ${TIMER_SOURCES}) |
| | | set(HAVE_SDL_TIMERS TRUE) |
| | | endif() |
| | | if(SDL_SENSOR) |
| | | set(SDL_SENSOR_ANDROID 1) |
| | | set(HAVE_SDL_SENSORS TRUE) |
| | | file(GLOB ANDROID_SENSOR_SOURCES ${SDL2_SOURCE_DIR}/src/sensor/android/*.c) |
| | | set(SOURCE_FILES ${SOURCE_FILES} ${ANDROID_SENSOR_SOURCES}) |
| | | endif() |
| | | if(SDL_VIDEO) |
| | | set(SDL_VIDEO_DRIVER_ANDROID 1) |
| | |
| | | include_directories(${IBUS_INCLUDE_DIRS}) |
| | | list(APPEND EXTRA_LIBS ${IBUS_LIBRARIES}) |
| | | endif() |
| | | if(HAVE_LIBUNWIND_H) |
| | | # We've already found the header, so REQUIRE the lib to be present |
| | | pkg_search_module(UNWIND REQUIRED libunwind) |
| | | pkg_search_module(UNWIND_GENERIC REQUIRED libunwind-generic) |
| | | list(APPEND EXTRA_LIBS ${UNWIND_LIBRARIES} ${UNWIND_GENERIC_LIBRARIES}) |
| | | endif() |
| | | endif() |
| | | |
| | | check_include_file("fcitx/frontend.h" HAVE_FCITX_FRONTEND_H) |
| | |
| | | check_include_file(ddraw.h HAVE_DDRAW_H) |
| | | check_include_file(dsound.h HAVE_DSOUND_H) |
| | | check_include_file(dinput.h HAVE_DINPUT_H) |
| | | check_include_file(mmdeviceapi.h HAVE_MMDEVICEAPI_H) |
| | | check_include_file(audioclient.h HAVE_AUDIOCLIENT_H) |
| | | check_include_file(dxgi.h HAVE_DXGI_H) |
| | | if(HAVE_D3D_H OR HAVE_D3D11_H OR HAVE_DDRAW_H OR HAVE_DSOUND_H OR HAVE_DINPUT_H) |
| | | set(HAVE_DIRECTX TRUE) |
| | |
| | | endif() |
| | | set(CMAKE_REQUIRED_FLAGS ${ORIG_CMAKE_REQUIRED_FLAGS}) |
| | | endif() |
| | | |
| | | # headers needed elsewhere ... |
| | | check_include_file(mmdeviceapi.h HAVE_MMDEVICEAPI_H) |
| | | check_include_file(audioclient.h HAVE_AUDIOCLIENT_H) |
| | | check_include_file(endpointvolume.h HAVE_ENDPOINTVOLUME_H) |
| | | |
| | | if(SDL_AUDIO) |
| | | set(SDL_AUDIO_DRIVER_WINMM 1) |
| | |
| | | set(SOURCE_FILES ${SOURCE_FILES} ${DSOUND_AUDIO_SOURCES}) |
| | | endif() |
| | | |
| | | if(HAVE_AUDIOCLIENT_H AND HAVE_MMDEVICEAPI_H) |
| | | if(WASAPI AND HAVE_AUDIOCLIENT_H AND HAVE_MMDEVICEAPI_H) |
| | | set(SDL_AUDIO_DRIVER_WASAPI 1) |
| | | file(GLOB WASAPI_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/wasapi/*.c) |
| | | set(SOURCE_FILES ${SOURCE_FILES} ${WASAPI_AUDIO_SOURCES}) |
| | |
| | | endif() |
| | | |
| | | # Libraries for Win32 native and MinGW |
| | | list(APPEND EXTRA_LIBS user32 gdi32 winmm imm32 ole32 oleaut32 version uuid) |
| | | list(APPEND EXTRA_LIBS user32 gdi32 winmm imm32 ole32 oleaut32 version uuid advapi32 shell32) |
| | | |
| | | # TODO: in configure.in the check for timers is set on |
| | | # cygwin | mingw32* - does this include mingw32CE? |
| | |
| | | |
| | | if(VIDEO_VULKAN) |
| | | set(SDL_VIDEO_VULKAN 1) |
| | | set(HAVE_VIDEO_VULKAN TRUE) |
| | | endif() |
| | | |
| | | # Dummies |
| | |
| | | # This leads to missing internal references on building, since the |
| | | # src/X/*.c does not get included. |
| | | if(NOT HAVE_SDL_JOYSTICK) |
| | | set(SDL_JOYSTICK_DISABLED 1) |
| | | set(SDL_JOYSTICK_DUMMY 1) |
| | | if(SDL_JOYSTICK AND NOT APPLE) # results in unresolved symbols on OSX |
| | | |
| | | file(GLOB JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/dummy/*.c) |
| | |
| | | endif() |
| | | endif() |
| | | if(NOT HAVE_SDL_HAPTIC) |
| | | set(SDL_HAPTIC_DISABLED 1) |
| | | set(SDL_HAPTIC_DUMMY 1) |
| | | file(GLOB HAPTIC_SOURCES ${SDL2_SOURCE_DIR}/src/haptic/dummy/*.c) |
| | | set(SOURCE_FILES ${SOURCE_FILES} ${HAPTIC_SOURCES}) |
| | | endif() |
| | | if(NOT HAVE_SDL_SENSORS) |
| | | set(SDL_SENSOR_DUMMY 1) |
| | | file(GLOB SENSORS_SOURCES ${SDL2_SOURCE_DIR}/src/sensor/dummy/*.c) |
| | | set(SOURCE_FILES ${SOURCE_FILES} ${SENSORS_SOURCES}) |
| | | endif() |
| | | if(NOT HAVE_SDL_LOADSO) |
| | | set(SDL_LOADSO_DISABLED 1) |
| | |
| | | |
| | | # Always build SDLmain |
| | | add_library(SDL2main STATIC ${SDLMAIN_SOURCES}) |
| | | target_include_directories(SDL2main PUBLIC $<INSTALL_INTERFACE:include>) |
| | | target_include_directories(SDL2main PUBLIC "$<BUILD_INTERFACE:${SDL2_SOURCE_DIR}/include>" $<INSTALL_INTERFACE:include/SDL2>) |
| | | set(_INSTALL_LIBS "SDL2main") |
| | | if (NOT ANDROID) |
| | | set_target_properties(SDL2main PROPERTIES DEBUG_POSTFIX ${SDL_CMAKE_DEBUG_POSTFIX}) |
| | |
| | | if(SDL_SHARED) |
| | | add_library(SDL2 SHARED ${SOURCE_FILES} ${VERSION_SOURCES}) |
| | | if(APPLE) |
| | | set_target_properties(SDL2 PROPERTIES MACOSX_RPATH 1) |
| | | set_target_properties(SDL2 PROPERTIES |
| | | MACOSX_RPATH 1 |
| | | OUTPUT_NAME "SDL2-${LT_RELEASE}") |
| | | elseif(UNIX AND NOT ANDROID) |
| | | set_target_properties(SDL2 PROPERTIES |
| | | VERSION ${LT_VERSION} |
| | |
| | | endif() |
| | | set(_INSTALL_LIBS "SDL2" ${_INSTALL_LIBS}) |
| | | target_link_libraries(SDL2 ${EXTRA_LIBS} ${EXTRA_LDFLAGS}) |
| | | target_include_directories(SDL2 PUBLIC $<INSTALL_INTERFACE:include>) |
| | | target_include_directories(SDL2 PUBLIC "$<BUILD_INTERFACE:${SDL2_SOURCE_DIR}/include>" $<INSTALL_INTERFACE:include/SDL2>) |
| | | if (NOT ANDROID) |
| | | set_target_properties(SDL2 PROPERTIES DEBUG_POSTFIX ${SDL_CMAKE_DEBUG_POSTFIX}) |
| | | endif() |
| | |
| | | # libraries - do we need to consider this? |
| | | set(_INSTALL_LIBS "SDL2-static" ${_INSTALL_LIBS}) |
| | | target_link_libraries(SDL2-static ${EXTRA_LIBS} ${EXTRA_LDFLAGS}) |
| | | target_include_directories(SDL2-static PUBLIC $<INSTALL_INTERFACE:include>) |
| | | target_include_directories(SDL2-static PUBLIC "$<BUILD_INTERFACE:${SDL2_SOURCE_DIR}/include>" $<INSTALL_INTERFACE:include/SDL2>) |
| | | if (NOT ANDROID) |
| | | set_target_properties(SDL2-static PROPERTIES DEBUG_POSTFIX ${SDL_CMAKE_DEBUG_POSTFIX}) |
| | | endif() |
| | |
| | | list(APPEND INCLUDE_FILES ${BIN_INCLUDE_FILES}) |
| | | install(FILES ${INCLUDE_FILES} DESTINATION include/SDL2) |
| | | |
| | | string(TOUPPER "${CMAKE_BUILD_TYPE}" UPPER_BUILD_TYPE) |
| | | if (UPPER_BUILD_TYPE MATCHES DEBUG) |
| | | set(SOPOSTFIX "${SDL_CMAKE_DEBUG_POSTFIX}") |
| | | else() |
| | | set(SOPOSTFIX "") |
| | | endif() |
| | | |
| | | if(NOT (WINDOWS OR CYGWIN)) |
| | | if(SDL_SHARED) |
| | | if (APPLE) |
| | | set(SOEXT "dylib") |
| | | else() |
| | | set(SOEXT "so") |
| | | endif() |
| | | set(SOEXT ${CMAKE_SHARED_LIBRARY_SUFFIX}) # ".so", ".dylib", etc. |
| | | get_target_property(SONAME SDL2 OUTPUT_NAME) |
| | | if(NOT ANDROID) |
| | | install(CODE " |
| | | execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink |
| | | \"libSDL2-2.0.${SOEXT}\" \"libSDL2.${SOEXT}\")") |
| | | install(FILES ${SDL2_BINARY_DIR}/libSDL2.${SOEXT} DESTINATION "lib${LIB_SUFFIX}") |
| | | \"lib${SONAME}${SOPOSTFIX}${SOEXT}\" \"libSDL2${SOPOSTFIX}${SOEXT}\")" |
| | | WORKING_DIR "${SDL2_BINARY_DIR}") |
| | | install(FILES ${SDL2_BINARY_DIR}/libSDL2${SOPOSTFIX}${SOEXT} DESTINATION "lib${LIB_SUFFIX}") |
| | | endif() |
| | | endif() |
| | | if(FREEBSD) |
| | |
| | | |
| | | WAYLAND_SCANNER = @WAYLAND_SCANNER@ |
| | | |
| | | SRC_DIST = *.txt acinclude Android.mk autogen.sh android-project build-scripts cmake cmake_uninstall.cmake.in configure configure.in debian docs include Makefile.* sdl2-config.cmake.in sdl2-config.in sdl2.m4 sdl2.pc.in SDL2.spec.in SDL2Config.cmake src test VisualC.html VisualC VisualC-WinRT Xcode Xcode-iOS |
| | | SRC_DIST = *.txt acinclude Android.mk autogen.sh android-project build-scripts cmake cmake_uninstall.cmake.in configure configure.in debian docs include Makefile.* sdl2-config.cmake.in sdl2-config.in sdl2.m4 sdl2.pc.in SDL2.spec.in SDL2Config.cmake src test VisualC.html VisualC VisualC-WinRT Xcode Xcode-iOS wayland-protocols |
| | | GEN_DIST = SDL2.spec |
| | | |
| | | ifneq ($V,1) |
| | |
| | | SDL_render.h \ |
| | | SDL_rwops.h \ |
| | | SDL_scancode.h \ |
| | | SDL_sensor.h \ |
| | | SDL_shape.h \ |
| | | SDL_stdinc.h \ |
| | | SDL_surface.h \ |
| | |
| | | src/filesystem/dummy/*.c \ |
| | | src/render/*.c \ |
| | | src/render/software/*.c \ |
| | | src/sensor/*.c \ |
| | | src/sensor/dummy/*.c \ |
| | | src/stdlib/*.c \ |
| | | src/thread/*.c \ |
| | | src/thread/generic/*.c \ |
| New file |
| | |
| | | # Open Watcom makefile to build SDL2.dll for OS/2: |
| | | # wmake -f Makefile.os2 |
| | | |
| | | LIBNAME = SDL2 |
| | | VERSION = 2.0.9 |
| | | DESCRIPTION = Simple DirectMedia Layer 2 |
| | | |
| | | LIBHOME = . |
| | | LIBPATH = $(LIBHOME)/lib |
| | | DLLFILE = $(LIBHOME)/$(LIBNAME).dll |
| | | LIBFILE = $(LIBHOME)/$(LIBNAME).lib |
| | | LNKFILE = $(LIBNAME).lnk |
| | | |
| | | INCPATH = -I"$(%WATCOM)/h/os2" -I"$(%WATCOM)/h" |
| | | INCPATH+= -I"$(LIBHOME)/h" |
| | | INCPATH+= -Iinclude |
| | | |
| | | LIBS = mmpm2.lib libuls.lib libconv.lib |
| | | |
| | | CFLAGS = -bt=os2 -d0 -q -bm -5s -fp5 -fpi87 -sg -oteanbmier -ei |
| | | # max warnings: |
| | | CFLAGS+= -wx |
| | | # building dll: |
| | | CFLAGS+= -bd |
| | | # the include paths : |
| | | CFLAGS+= $(INCPATH) |
| | | # building SDL itself: |
| | | CFLAGS+= -DBUILD_SDL |
| | | |
| | | SRCS = SDL.c SDL_assert.c SDL_error.c SDL_log.c SDL_dataqueue.c SDL_hints.c |
| | | SRCS+= SDL_getenv.c SDL_iconv.c SDL_malloc.c SDL_qsort.c SDL_stdlib.c SDL_string.c |
| | | SRCS+= SDL_cpuinfo.c SDL_atomic.c SDL_spinlock.c SDL_thread.c SDL_timer.c |
| | | SRCS+= SDL_rwops.c SDL_power.c |
| | | SRCS+= SDL_audio.c SDL_audiocvt.c SDL_audiodev.c SDL_audiotypecvt.c SDL_mixer.c SDL_wave.c |
| | | SRCS+= SDL_events.c SDL_quit.c SDL_keyboard.c SDL_mouse.c SDL_windowevents.c & |
| | | SDL_clipboardevents.c SDL_dropevents.c SDL_displayevents.c SDL_gesture.c & |
| | | SDL_sensor.c SDL_touch.c |
| | | SRCS+= SDL_haptic.c SDL_gamecontroller.c SDL_joystick.c |
| | | SRCS+= SDL_render.c yuv_rgb.c SDL_yuv.c SDL_yuv_sw.c SDL_blendfillrect.c & |
| | | SDL_blendline.c SDL_blendpoint.c SDL_drawline.c SDL_drawpoint.c & |
| | | SDL_render_sw.c SDL_rotate.c |
| | | SRCS+= SDL_blit.c SDL_blit_0.c SDL_blit_1.c SDL_blit_A.c SDL_blit_auto.c & |
| | | SDL_blit_copy.c SDL_blit_N.c SDL_blit_slow.c SDL_fillrect.c SDL_bmp.c & |
| | | SDL_pixels.c SDL_rect.c SDL_RLEaccel.c SDL_shape.c SDL_stretch.c & |
| | | SDL_surface.c SDL_video.c SDL_clipboard.c SDL_vulkan_utils.c SDL_egl.c |
| | | |
| | | SRCS+= SDL_syscond.c SDL_sysmutex.c SDL_syssem.c SDL_systhread.c SDL_systls.c |
| | | SRCS+= SDL_systimer.c |
| | | SRCS+= SDL_sysloadso.c |
| | | SRCS+= SDL_sysfilesystem.c |
| | | SRCS+= SDL_syshaptic.c SDL_sysjoystick.c |
| | | SRCS+= SDL_dummyaudio.c SDL_diskaudio.c |
| | | SRCS+= SDL_nullvideo.c SDL_nullframebuffer.c SDL_nullevents.c |
| | | SRCS+= SDL_dummysensor.c |
| | | |
| | | SRCS+= SDL_dynapi.c |
| | | |
| | | OBJS = $(SRCS:.c=.obj) |
| | | |
| | | .extensions: |
| | | .extensions: .lib .dll .obj .c .asm |
| | | |
| | | .c: ./src;./src/dynapi;./src/audio;./src/cpuinfo;./src/events;./src/file;./src/haptic;./src/joystick;./src/power;./src/render;./src/render/software;./src/sensor;./src/stdlib;./src/thread;./src/timer;./src/video;./src/video/yuv2rgb;./src/atomic;./src/audio/disk; |
| | | .c: ./src/haptic/dummy;./src/joystick/dummy;./src/audio/dummy;./src/video/dummy;./src/sensor/dummy; |
| | | .c: ./src/loadso/dummy;./src/filesystem/dummy;./src/timer/dummy;./src/thread/generic; |
| | | |
| | | all: $(DLLFILE) $(LIBFILE) .symbolic |
| | | |
| | | $(DLLFILE): $(OBJS) $(LNKFILE) |
| | | @echo * Linking: $@ |
| | | wlink @$(LNKFILE) |
| | | |
| | | $(LIBFILE): $(DLLFILE) |
| | | @echo * Creating LIB file: $@ |
| | | wlib -q -b -n -c -pa -s -t -zld -ii -io $* $(DLLFILE) |
| | | |
| | | .c.obj: |
| | | wcc386 $(CFLAGS) -fo=$^@ $< |
| | | |
| | | SDL_cpuinfo.obj: SDL_cpuinfo.c |
| | | wcc386 $(CFLAGS) -wcd=200 -fo=$^@ $< |
| | | |
| | | SDL_rwops.obj: SDL_rwops.c |
| | | wcc386 $(CFLAGS) -wcd=136 -fo=$^@ $< |
| | | |
| | | SDL_blendfillrect.obj: SDL_blendfillrect.c |
| | | wcc386 $(CFLAGS) -wcd=200 -fo=$^@ $< |
| | | |
| | | SDL_blendline.obj: SDL_blendline.c |
| | | wcc386 $(CFLAGS) -wcd=200 -fo=$^@ $< |
| | | |
| | | SDL_blendpoint.obj: SDL_blendpoint.c |
| | | wcc386 $(CFLAGS) -wcd=200 -fo=$^@ $< |
| | | |
| | | SDL_RLEaccel.obj: SDL_RLEaccel.c |
| | | wcc386 $(CFLAGS) -wcd=201 -fo=$^@ $< |
| | | |
| | | $(LNKFILE): |
| | | @echo * Creating linker file: $@ |
| | | @%create $@ |
| | | @%append $@ SYSTEM os2v2_dll INITINSTANCE TERMINSTANCE |
| | | @%append $@ NAME $(DLLFILE) |
| | | @for %i in ($(OBJS)) do @%append $@ FILE %i |
| | | @%append $@ LIBPATH $(%LIB);$(LIBPATH) |
| | | @for %i in ($(LIBS)) do @%append $@ LIB %i |
| | | @%append $@ OPTION QUIET |
| | | @%append $@ OPTION IMPF=$(LIBHOME)/$^&.exp |
| | | @%append $@ OPTION MAP=$(LIBHOME)/$^&.map |
| | | @%append $@ OPTION DESCRIPTION '@$#libsdl org:$(VERSION)$#@$(DESCRIPTION)' |
| | | @%append $@ OPTION QUIET |
| | | @%append $@ OPTION ELIMINATE |
| | | @%append $@ OPTION MANYAUTODATA |
| | | @%append $@ OPTION OSNAME='OS/2 and eComStation' |
| | | @%append $@ OPTION SHOWDEAD |
| | | |
| | | clean: .SYMBOLIC |
| | | @ echo * Clean: $(LIBNAME) |
| | | @if exist *.obj rm *.obj |
| | | @if exist *.err rm *.err |
| | | @if exist $(LNKFILE) rm $(LNKFILE) |
| | | |
| | | distclean: .SYMBOLIC clean |
| | | @if exist $(LIBHOME)/*.exp rm $(LIBHOME)/*.exp |
| | | @if exist $(LIBHOME)/*.map rm $(LIBHOME)/*.map |
| | | @if exist $(LIBFILE) rm $(LIBFILE) |
| | | @if exist $(DLLFILE) rm $(DLLFILE) |
| | |
| | | |
| | | TARGET = libSDL.a |
| | | |
| | | SOURCES = ./src/*.c ./src/audio/*.c ./src/cpuinfo/*.c ./src/events/*.c \ |
| | | ./src/file/*.c ./src/stdlib/*.c ./src/thread/*.c ./src/timer/*.c ./src/video/*.c \ |
| | | ./src/joystick/*.c ./src/haptic/*.c ./src/power/*.c ./src/video/dummy/*.c ./src/audio/disk/*.c \ |
| | | ./src/audio/dummy/*.c ./src/loadso/dlopen/*.c ./src/audio/dsp/*.c \ |
| | | ./src/thread/pthread/SDL_systhread.c ./src/thread/pthread/SDL_syssem.c \ |
| | | ./src/thread/pthread/SDL_sysmutex.c ./src/thread/pthread/SDL_syscond.c \ |
| | | ./src/joystick/linux/*.c ./src/haptic/linux/*.c ./src/timer/unix/*.c \ |
| | | ./src/atomic/*.c ./src/filesystem/unix/*.c \ |
| | | ./src/video/pandora/SDL_pandora.o ./src/video/pandora/SDL_pandora_events.o ./src/video/x11/*.c |
| | | SOURCES = |
| | | ./src/*.c \ |
| | | ./src/atomic/*.c \ |
| | | ./src/audio/*.c \ |
| | | ./src/audio/disk/*.c \ |
| | | ./src/audio/dsp/*.c \ |
| | | ./src/audio/dummy/*.c \ |
| | | ./src/cpuinfo/*.c \ |
| | | ./src/events/*.c \ |
| | | ./src/file/*.c \ |
| | | ./src/filesystem/unix/*.c \ |
| | | ./src/haptic/*.c \ |
| | | ./src/haptic/linux/*.c \ |
| | | ./src/joystick/*.c \ |
| | | ./src/joystick/linux/*.c \ |
| | | ./src/loadso/dlopen/*.c \ |
| | | ./src/power/*.c \ |
| | | ./src/sensor/*.c \ |
| | | ./src/sensor/dummy/*.c \ |
| | | ./src/stdlib/*.c \ |
| | | ./src/thread/*.c \ |
| | | ./src/thread/pthread/SDL_syscond.c \ |
| | | ./src/thread/pthread/SDL_sysmutex.c \ |
| | | ./src/thread/pthread/SDL_syssem.c \ |
| | | ./src/thread/pthread/SDL_systhread.c \ |
| | | ./src/timer/*.c \ |
| | | ./src/timer/unix/*.c \ |
| | | ./src/video/*.c \ |
| | | ./src/video/dummy/*.c \ |
| | | ./src/video/pandora/SDL_pandora.o \ |
| | | ./src/video/pandora/SDL_pandora_events.o \ |
| | | ./src/video/x11/*.c \ |
| | | |
| | | |
| | | OBJECTS = $(shell echo $(SOURCES) | sed -e 's,\.c,\.o,g') |
| | |
| | | src/render/software/SDL_drawpoint.o \ |
| | | src/render/software/SDL_render_sw.o \ |
| | | src/render/software/SDL_rotate.o \ |
| | | src/sensor/SDL_sensor.o \ |
| | | src/sensor/dummy/SDL_dummysensor.o \ |
| | | src/stdlib/SDL_getenv.o \ |
| | | src/stdlib/SDL_iconv.o \ |
| | | src/stdlib/SDL_malloc.o \ |
| | |
| | | TARGET_STATIC = libSDL2.a |
| | | TARGET_SHARED = libSDL2.so |
| | | |
| | | SOURCES = ./src/*.c ./src/audio/*.c ./src/cpuinfo/*.c ./src/events/*.c \ |
| | | ./src/file/*.c ./src/stdlib/*.c ./src/thread/*.c ./src/timer/*.c ./src/video/*.c \ |
| | | ./src/joystick/*.c ./src/haptic/*.c ./src/video/dummy/*.c ./src/audio/disk/*.c \ |
| | | ./src/audio/dummy/*.c ./src/loadso/dlopen/*.c ./src/audio/dsp/*.c \ |
| | | ./src/thread/pthread/SDL_systhread.c ./src/thread/pthread/SDL_syssem.c \ |
| | | ./src/thread/pthread/SDL_sysmutex.c ./src/thread/pthread/SDL_syscond.c \ |
| | | ./src/joystick/linux/*.c ./src/haptic/linux/*.c ./src/timer/unix/*.c \ |
| | | ./src/video/pandora/SDL_pandora.o ./src/video/pandora/SDL_pandora_events.o |
| | | SOURCES = \ |
| | | ./src/*.c \ |
| | | ./src/audio/*.c \ |
| | | ./src/audio/disk/*.c \ |
| | | ./src/audio/dsp/*.c \ |
| | | ./src/audio/dummy/*.c \ |
| | | ./src/cpuinfo/*.c \ |
| | | ./src/events/*.c \ |
| | | ./src/file/*.c \ |
| | | ./src/haptic/*.c \ |
| | | ./src/haptic/linux/*.c \ |
| | | ./src/joystick/*.c \ |
| | | ./src/joystick/linux/*.c \ |
| | | ./src/loadso/dlopen/*.c \ |
| | | ./src/sensor/*.c \ |
| | | ./src/sensor/dummy/*.c \ |
| | | ./src/stdlib/*.c \ |
| | | ./src/thread/*.c \ |
| | | ./src/thread/pthread/SDL_syscond.c \ |
| | | ./src/thread/pthread/SDL_sysmutex.c \ |
| | | ./src/thread/pthread/SDL_syssem.c \ |
| | | ./src/thread/pthread/SDL_systhread.c \ |
| | | ./src/timer/*.c \ |
| | | ./src/timer/unix/*.c \ |
| | | ./src/video/*.c \ |
| | | ./src/video/dummy/*.c \ |
| | | ./src/video/pandora/*.c \ |
| | | |
| | | |
| | | OBJECTS = $(shell echo $(SOURCES) | sed -e 's,\.c,\.o,g') |
| | |
| | | <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="..\..\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\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" />
|
| | |
| | | <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\SDL_error.c" />
|
| | | <ClCompile Include="..\..\src\SDL_hints.c" />
|
| | | <ClCompile Include="..\..\src\SDL_log.c" />
|
| | | <ClCompile Include="..\..\src\sensor\dummy\SDL_dummysensor.c" />
|
| | | <ClCompile Include="..\..\src\sensor\SDL_sensor.c" />
|
| | | <ClCompile Include="..\..\src\stdlib\SDL_getenv.c" />
|
| | | <ClCompile Include="..\..\src\stdlib\SDL_iconv.c" />
|
| | | <ClCompile Include="..\..\src\stdlib\SDL_malloc.c" />
|
| | |
| | | <ClInclude Include="..\..\src\render\direct3d11\SDL_shaders_d3d11.h">
|
| | | <Filter>Source Files</Filter>
|
| | | </ClInclude>
|
| | | <ClInclude Include="..\..\include\SDL_sensor.h">
|
| | | <Filter>Header Files</Filter>
|
| | | </ClInclude>
|
| | | <ClInclude Include="..\..\src\sensor\SDL_sensor_c.h">
|
| | | <Filter>Source Files</Filter>
|
| | | </ClInclude>
|
| | | <ClInclude Include="..\..\src\sensor\SDL_syssensor.h">
|
| | | <Filter>Source Files</Filter>
|
| | | </ClInclude>
|
| | | <ClInclude Include="..\..\src\sensor\dummy\SDL_dummysensor.h">
|
| | | <Filter>Source Files</Filter>
|
| | | </ClInclude>
|
| | | <ClInclude Include="..\..\src\events\SDL_displayevents_c.h">
|
| | | <Filter>Source Files</Filter>
|
| | | </ClInclude>
|
| | | </ItemGroup>
|
| | | <ItemGroup>
|
| | | <ClCompile Include="..\..\src\atomic\SDL_atomic.c">
|
| | |
| | | <ClCompile Include="..\..\src\render\direct3d11\SDL_shaders_d3d11.c">
|
| | | <Filter>Source Files</Filter>
|
| | | </ClCompile>
|
| | | <ClCompile Include="..\..\src\sensor\SDL_sensor.c">
|
| | | <Filter>Source Files</Filter>
|
| | | </ClCompile>
|
| | | <ClCompile Include="..\..\src\sensor\dummy\SDL_dummysensor.c">
|
| | | <Filter>Source Files</Filter>
|
| | | </ClCompile>
|
| | | <ClCompile Include="..\..\src\events\SDL_displayevents.c">
|
| | | <Filter>Source Files</Filter>
|
| | | </ClCompile>
|
| | | </ItemGroup>
|
| | | </Project> |
| | |
| | | <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="..\..\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\SDL_fatal.h" />
|
| | | <ClInclude Include="..\..\src\SDL_hints_c.h" />
|
| | | <ClInclude Include="..\..\src\SDL_internal.h" />
|
| | | <ClInclude Include="..\..\src\sensor\dummy\SDL_dummysensor.h" />
|
| | | <ClInclude Include="..\..\src\sensor\SDL_sensor_c.h" />
|
| | | <ClInclude Include="..\..\src\sensor\SDL_syssensor.h" />
|
| | | <ClInclude Include="..\..\src\thread\SDL_systhread.h" />
|
| | | <ClInclude Include="..\..\src\thread\SDL_thread_c.h" />
|
| | | <ClInclude Include="..\..\src\thread\windows\SDL_systhread_c.h" />
|
| | |
| | | <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\SDL_error.c" />
|
| | | <ClCompile Include="..\..\src\SDL_hints.c" />
|
| | | <ClCompile Include="..\..\src\SDL_log.c" />
|
| | | <ClCompile Include="..\..\src\sensor\dummy\SDL_dummysensor.c" />
|
| | | <ClCompile Include="..\..\src\sensor\SDL_sensor.c" />
|
| | | <ClCompile Include="..\..\src\stdlib\SDL_getenv.c" />
|
| | | <ClCompile Include="..\..\src\stdlib\SDL_iconv.c" />
|
| | | <ClCompile Include="..\..\src\stdlib\SDL_malloc.c" />
|
| | |
| | | <ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb.h">
|
| | | <Filter>Source Files</Filter>
|
| | | </ClInclude>
|
| | | <ClInclude Include="..\..\src\render\direct3d11\SDL_shaders_d3d11.h" />
|
| | | <ClInclude Include="..\..\src\render\direct3d11\SDL_shaders_d3d11.h">
|
| | | <Filter>Source Files</Filter>
|
| | | </ClInclude>
|
| | | <ClInclude Include="..\..\src\sensor\SDL_sensor_c.h">
|
| | | <Filter>Source Files</Filter>
|
| | | </ClInclude>
|
| | | <ClInclude Include="..\..\src\sensor\SDL_syssensor.h">
|
| | | <Filter>Source Files</Filter>
|
| | | </ClInclude>
|
| | | <ClInclude Include="..\..\src\sensor\dummy\SDL_dummysensor.h">
|
| | | <Filter>Source Files</Filter>
|
| | | </ClInclude>
|
| | | <ClInclude Include="..\..\include\SDL_sensor.h">
|
| | | <Filter>Header Files</Filter>
|
| | | </ClInclude>
|
| | | <ClInclude Include="..\..\src\events\SDL_displayevents_c.h">
|
| | | <Filter>Source Files</Filter>
|
| | | </ClInclude>
|
| | | </ItemGroup>
|
| | | <ItemGroup>
|
| | | <ClCompile Include="..\..\src\atomic\SDL_atomic.c">
|
| | |
| | | <ClCompile Include="..\..\src\video\yuv2rgb\yuv_rgb.c">
|
| | | <Filter>Source Files</Filter>
|
| | | </ClCompile>
|
| | | <ClCompile Include="..\..\src\render\direct3d11\SDL_shaders_d3d11.c" />
|
| | | <ClCompile Include="..\..\src\render\direct3d11\SDL_shaders_d3d11.c">
|
| | | <Filter>Source Files</Filter>
|
| | | </ClCompile>
|
| | | <ClCompile Include="..\..\src\sensor\SDL_sensor.c">
|
| | | <Filter>Source Files</Filter>
|
| | | </ClCompile>
|
| | | <ClCompile Include="..\..\src\sensor\dummy\SDL_dummysensor.c">
|
| | | <Filter>Source Files</Filter>
|
| | | </ClCompile>
|
| | | <ClCompile Include="..\..\src\events\SDL_displayevents.c">
|
| | | <Filter>Source Files</Filter>
|
| | | </ClCompile>
|
| | | </ItemGroup>
|
| | | </Project> |
| | |
| | | <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="..\..\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\SDL_fatal.h" />
|
| | | <ClInclude Include="..\..\src\SDL_hints_c.h" />
|
| | | <ClInclude Include="..\..\src\SDL_internal.h" />
|
| | | <ClInclude Include="..\..\src\sensor\dummy\SDL_dummysensor.h" />
|
| | | <ClInclude Include="..\..\src\sensor\SDL_sensor_c.h" />
|
| | | <ClInclude Include="..\..\src\sensor\SDL_syssensor.h" />
|
| | | <ClInclude Include="..\..\src\thread\SDL_thread_c.h" />
|
| | | <ClInclude Include="..\..\src\thread\windows\SDL_systhread_c.h" />
|
| | | <ClInclude Include="..\..\src\timer\SDL_timer_c.h" />
|
| | |
| | | <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\SDL_error.c" />
|
| | | <ClCompile Include="..\..\src\SDL_hints.c" />
|
| | | <ClCompile Include="..\..\src\SDL_log.c" />
|
| | | <ClCompile Include="..\..\src\sensor\dummy\SDL_dummysensor.c" />
|
| | | <ClCompile Include="..\..\src\sensor\SDL_sensor.c" />
|
| | | <ClCompile Include="..\..\src\stdlib\SDL_getenv.c" />
|
| | | <ClCompile Include="..\..\src\stdlib\SDL_iconv.c" />
|
| | | <ClCompile Include="..\..\src\stdlib\SDL_malloc.c" />
|
| | |
| | | <ClInclude Include="..\..\src\render\direct3d11\SDL_shaders_d3d11.h">
|
| | | <Filter>Source Files</Filter>
|
| | | </ClInclude>
|
| | | <ClInclude Include="..\..\include\SDL_sensor.h">
|
| | | <Filter>Header Files</Filter>
|
| | | </ClInclude>
|
| | | <ClInclude Include="..\..\src\sensor\SDL_sensor_c.h">
|
| | | <Filter>Source Files</Filter>
|
| | | </ClInclude>
|
| | | <ClInclude Include="..\..\src\sensor\SDL_syssensor.h">
|
| | | <Filter>Source Files</Filter>
|
| | | </ClInclude>
|
| | | <ClInclude Include="..\..\src\sensor\dummy\SDL_dummysensor.h">
|
| | | <Filter>Source Files</Filter>
|
| | | </ClInclude>
|
| | | <ClInclude Include="..\..\src\events\SDL_displayevents_c.h">
|
| | | <Filter>Source Files</Filter>
|
| | | </ClInclude>
|
| | | </ItemGroup>
|
| | | <ItemGroup>
|
| | | <ClCompile Include="..\..\src\atomic\SDL_atomic.c">
|
| | |
| | | <ClCompile Include="..\..\src\render\direct3d11\SDL_shaders_d3d11.c">
|
| | | <Filter>Source Files</Filter>
|
| | | </ClCompile>
|
| | | <ClCompile Include="..\..\src\sensor\SDL_sensor.c">
|
| | | <Filter>Source Files</Filter>
|
| | | </ClCompile>
|
| | | <ClCompile Include="..\..\src\sensor\dummy\SDL_dummysensor.c">
|
| | | <Filter>Source Files</Filter>
|
| | | </ClCompile>
|
| | | <ClCompile Include="..\..\src\events\SDL_displayevents.c">
|
| | | <Filter>Source Files</Filter>
|
| | | </ClCompile>
|
| | | </ItemGroup>
|
| | | </Project> |
| | |
| | | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> |
| | | <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">C:\Program Files %28x86%29\Microsoft DirectX SDK %28June 2010%29\Lib\x86;$(LibraryPath)</LibraryPath> |
| | | </PropertyGroup> |
| | | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> |
| | | <IncludePath>D:\dev\steam\rel\streaming_client\SDL\src\hidapi\hidapi;$(IncludePath)</IncludePath> |
| | | </PropertyGroup> |
| | | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> |
| | | <IncludePath>D:\dev\steam\rel\streaming_client\SDL\src\hidapi\hidapi;$(IncludePath)</IncludePath> |
| | | </PropertyGroup> |
| | | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> |
| | | <IncludePath>D:\dev\steam\rel\streaming_client\SDL\src\hidapi\hidapi;$(IncludePath)</IncludePath> |
| | | </PropertyGroup> |
| | | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> |
| | | <IncludePath>D:\dev\steam\rel\streaming_client\SDL\src\hidapi\hidapi;$(IncludePath)</IncludePath> |
| | | </PropertyGroup> |
| | | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> |
| | | <PreBuildEvent> |
| | | <Command> |
| | |
| | | <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
| | | </ResourceCompile> |
| | | <Link> |
| | | <AdditionalDependencies>winmm.lib;imm32.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies> |
| | | <AdditionalDependencies>setupapi.lib;winmm.lib;imm32.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies> |
| | | <IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries> |
| | | <GenerateDebugInformation>true</GenerateDebugInformation> |
| | | <SubSystem>Windows</SubSystem> |
| | |
| | | <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
| | | </ResourceCompile> |
| | | <Link> |
| | | <AdditionalDependencies>winmm.lib;imm32.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies> |
| | | <AdditionalDependencies>setupapi.lib;winmm.lib;imm32.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies> |
| | | <IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries> |
| | | <GenerateDebugInformation>true</GenerateDebugInformation> |
| | | <SubSystem>Windows</SubSystem> |
| | |
| | | <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
| | | </ResourceCompile> |
| | | <Link> |
| | | <AdditionalDependencies>winmm.lib;imm32.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies> |
| | | <AdditionalDependencies>setupapi.lib;winmm.lib;imm32.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies> |
| | | <IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries> |
| | | <GenerateDebugInformation>true</GenerateDebugInformation> |
| | | <SubSystem>Windows</SubSystem> |
| | |
| | | <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
| | | </ResourceCompile> |
| | | <Link> |
| | | <AdditionalDependencies>winmm.lib;imm32.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies> |
| | | <AdditionalDependencies>setupapi.lib;winmm.lib;imm32.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies> |
| | | <IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries> |
| | | <GenerateDebugInformation>true</GenerateDebugInformation> |
| | | <SubSystem>Windows</SubSystem> |
| | |
| | | <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="..\..\src\events\blank_cursor.h" /> |
| | | <ClInclude Include="..\..\src\events\default_cursor.h" /> |
| | | <ClInclude Include="..\..\src\events\SDL_clipboardevents_c.h" /> |
| | | <ClInclude Include="..\..\src\events\SDL_displayevents_c.h" /> |
| | | <ClInclude Include="..\..\src\events\SDL_dropevents_c.h" /> |
| | | <ClInclude Include="..\..\src\events\SDL_events_c.h" /> |
| | | <ClInclude Include="..\..\src\events\SDL_gesture_c.h" /> |
| | |
| | | <ClInclude Include="..\..\src\haptic\windows\SDL_dinputhaptic_c.h" /> |
| | | <ClInclude Include="..\..\src\haptic\windows\SDL_windowshaptic_c.h" /> |
| | | <ClInclude Include="..\..\src\haptic\windows\SDL_xinputhaptic_c.h" /> |
| | | <ClInclude Include="..\..\src\joystick\hidapi\controller_type.h" /> |
| | | <ClInclude Include="..\..\src\joystick\hidapi\SDL_hidapijoystick_c.h" /> |
| | | <ClInclude Include="..\..\src\joystick\SDL_joystick_c.h" /> |
| | | <ClInclude Include="..\..\src\joystick\SDL_sysjoystick.h" /> |
| | | <ClInclude Include="..\..\src\joystick\windows\SDL_dinputjoystick_c.h" /> |
| | |
| | | <ClInclude Include="..\..\src\render\software\SDL_rotate.h" /> |
| | | <ClInclude Include="..\..\src\SDL_dataqueue.h" /> |
| | | <ClInclude Include="..\..\src\SDL_error_c.h" /> |
| | | <ClInclude Include="..\..\src\sensor\dummy\SDL_dummysensor.h" /> |
| | | <ClInclude Include="..\..\src\sensor\SDL_sensor_c.h" /> |
| | | <ClInclude Include="..\..\src\sensor\SDL_syssensor.h" /> |
| | | <ClInclude Include="..\..\src\thread\SDL_systhread.h" /> |
| | | <ClInclude Include="..\..\src\thread\SDL_thread_c.h" /> |
| | | <ClInclude Include="..\..\src\thread\windows\SDL_systhread_c.h" /> |
| | |
| | | <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\haptic\windows\SDL_dinputhaptic.c" /> |
| | | <ClCompile Include="..\..\src\haptic\windows\SDL_windowshaptic.c" /> |
| | | <ClCompile Include="..\..\src\haptic\windows\SDL_xinputhaptic.c" /> |
| | | <ClCompile Include="..\..\src\hidapi\windows\hid.c" /> |
| | | <ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapijoystick.c" /> |
| | | <ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_ps4.c" /> |
| | | <ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_switch.c" /> |
| | | <ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xbox360.c" /> |
| | | <ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xboxone.c" /> |
| | | <ClCompile Include="..\..\src\joystick\SDL_gamecontroller.c" /> |
| | | <ClCompile Include="..\..\src\joystick\SDL_joystick.c" /> |
| | | <ClCompile Include="..\..\src\joystick\windows\SDL_dinputjoystick.c" /> |
| | |
| | | <ClCompile Include="..\..\src\joystick\windows\SDL_windowsjoystick.c" /> |
| | | <ClCompile Include="..\..\src\joystick\windows\SDL_xinputjoystick.c" /> |
| | | <ClCompile Include="..\..\src\libm\e_atan2.c" /> |
| | | <ClCompile Include="..\..\src\libm\e_exp.c" /> |
| | | <ClCompile Include="..\..\src\libm\e_fmod.c" /> |
| | | <ClCompile Include="..\..\src\libm\e_log.c" /> |
| | | <ClCompile Include="..\..\src\libm\e_log10.c" /> |
| | |
| | | <ClCompile Include="..\..\src\SDL_error.c" /> |
| | | <ClCompile Include="..\..\src\SDL_hints.c" /> |
| | | <ClCompile Include="..\..\src\SDL_log.c" /> |
| | | <ClCompile Include="..\..\src\sensor\dummy\SDL_dummysensor.c" /> |
| | | <ClCompile Include="..\..\src\sensor\SDL_sensor.c" /> |
| | | <ClCompile Include="..\..\src\stdlib\SDL_getenv.c" /> |
| | | <ClCompile Include="..\..\src\stdlib\SDL_iconv.c" /> |
| | | <ClCompile Include="..\..\src\stdlib\SDL_malloc.c" /> |
| | |
| | | <ClInclude Include="..\..\include\SDL_scancode.h">
|
| | | <Filter>API Headers</Filter>
|
| | | </ClInclude>
|
| | | <ClInclude Include="..\..\include\SDL_sensor.h"> |
| | | <Filter>API Headers</Filter> |
| | | </ClInclude> |
| | | <ClInclude Include="..\..\include\SDL_shape.h">
|
| | | <Filter>API Headers</Filter>
|
| | | </ClInclude>
|
| | |
| | | <ClInclude Include="..\..\src\events\blank_cursor.h" />
|
| | | <ClInclude Include="..\..\src\events\default_cursor.h" />
|
| | | <ClInclude Include="..\..\src\events\SDL_clipboardevents_c.h" />
|
| | | <ClInclude Include="..\..\src\events\SDL_displayevents_c.h" /> |
| | | <ClInclude Include="..\..\src\events\SDL_dropevents_c.h" />
|
| | | <ClInclude Include="..\..\src\events\SDL_events_c.h" />
|
| | | <ClInclude Include="..\..\src\events\SDL_gesture_c.h" />
|
| | |
| | | <ClInclude Include="..\..\src\haptic\windows\SDL_dinputhaptic_c.h" />
|
| | | <ClInclude Include="..\..\src\haptic\windows\SDL_windowshaptic_c.h" />
|
| | | <ClInclude Include="..\..\src\haptic\windows\SDL_xinputhaptic_c.h" />
|
| | | <ClInclude Include="..\..\src\joystick\hidapi\controller_type.h" /> |
| | | <ClInclude Include="..\..\src\joystick\hidapi\SDL_hidapijoystick_c.h" /> |
| | | <ClInclude Include="..\..\src\joystick\SDL_joystick_c.h" />
|
| | | <ClInclude Include="..\..\src\joystick\SDL_sysjoystick.h" />
|
| | | <ClInclude Include="..\..\src\joystick\windows\SDL_dinputjoystick_c.h" />
|
| | |
| | | <ClInclude Include="..\..\src\joystick\windows\SDL_xinputjoystick_c.h" />
|
| | | <ClInclude Include="..\..\src\libm\math_libm.h" />
|
| | | <ClInclude Include="..\..\src\libm\math_private.h" />
|
| | | <ClInclude Include="..\..\src\render\direct3d\SDL_shaders_d3d.h" /> |
| | | <ClInclude Include="..\..\src\render\direct3d11\SDL_shaders_d3d11.h" /> |
| | | <ClInclude Include="..\..\src\render\opengl\SDL_glfuncs.h" />
|
| | | <ClInclude Include="..\..\src\render\opengl\SDL_shaders_gl.h" />
|
| | | <ClInclude Include="..\..\src\render\opengles\SDL_glesfuncs.h" />
|
| | |
| | | <ClInclude Include="..\..\src\render\software\SDL_rotate.h" />
|
| | | <ClInclude Include="..\..\src\SDL_dataqueue.h" />
|
| | | <ClInclude Include="..\..\src\SDL_error_c.h" />
|
| | | <ClInclude Include="..\..\src\sensor\dummy\SDL_dummysensor.h" /> |
| | | <ClInclude Include="..\..\src\sensor\SDL_sensor_c.h" /> |
| | | <ClInclude Include="..\..\src\sensor\SDL_syssensor.h" /> |
| | | <ClInclude Include="..\..\src\thread\SDL_systhread.h" />
|
| | | <ClInclude Include="..\..\src\thread\SDL_thread_c.h" />
|
| | | <ClInclude Include="..\..\src\thread\windows\SDL_systhread_c.h" />
|
| | |
| | | <ClInclude Include="..\..\src\video\SDL_shape_internals.h" />
|
| | | <ClInclude Include="..\..\src\video\SDL_sysvideo.h" />
|
| | | <ClInclude Include="..\..\src\video\SDL_vulkan_internal.h" />
|
| | | <ClInclude Include="..\..\src\video\SDL_yuv_c.h" /> |
| | | <ClInclude Include="..\..\src\video\windows\SDL_vkeys.h" />
|
| | | <ClInclude Include="..\..\src\video\windows\SDL_windowsclipboard.h" />
|
| | | <ClInclude Include="..\..\src\video\windows\SDL_windowsevents.h" />
|
| | |
| | | <ClInclude Include="..\..\src\video\windows\SDL_windowsvulkan.h" />
|
| | | <ClInclude Include="..\..\src\video\windows\SDL_windowswindow.h" />
|
| | | <ClInclude Include="..\..\src\video\windows\wmmsg.h" />
|
| | | <ClInclude Include="..\..\src\video\SDL_yuv_c.h" />
|
| | | <ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb.h" />
|
| | | <ClInclude Include="..\..\src\render\direct3d11\SDL_shaders_d3d11.h" />
|
| | | <ClInclude Include="..\..\src\render\direct3d\SDL_shaders_d3d.h" />
|
| | | </ItemGroup>
|
| | | <ItemGroup>
|
| | | <ClCompile Include="..\..\src\atomic\SDL_atomic.c" /> |
| | | <ClCompile Include="..\..\src\atomic\SDL_spinlock.c" /> |
| | | <ClCompile Include="..\..\src\audio\directsound\SDL_directsound.c" /> |
| | | <ClCompile Include="..\..\src\audio\disk\SDL_diskaudio.c" /> |
| | | <ClCompile Include="..\..\src\audio\dummy\SDL_dummyaudio.c" /> |
| | | <ClCompile Include="..\..\src\audio\SDL_audio.c" /> |
| | | <ClCompile Include="..\..\src\audio\SDL_audiocvt.c" /> |
| | | <ClCompile Include="..\..\src\audio\SDL_audiodev.c" /> |
| | | <ClCompile Include="..\..\src\audio\SDL_audiotypecvt.c" /> |
| | | <ClCompile Include="..\..\src\audio\SDL_mixer.c" /> |
| | | <ClCompile Include="..\..\src\audio\SDL_wave.c" /> |
| | | <ClCompile Include="..\..\src\audio\wasapi\SDL_wasapi.c" /> |
| | | <ClCompile Include="..\..\src\audio\wasapi\SDL_wasapi.c" /> |
| | | <ClCompile Include="..\..\src\audio\wasapi\SDL_wasapi_win32.c" /> |
| | | <ClCompile Include="..\..\src\audio\winmm\SDL_winmm.c" /> |
| | | <ClCompile Include="..\..\src\core\windows\SDL_windows.c" /> |
| | | <ClCompile Include="..\..\src\core\windows\SDL_xinput.c" /> |
| | | <ClCompile Include="..\..\src\cpuinfo\SDL_cpuinfo.c" /> |
| | | <ClCompile Include="..\..\src\dynapi\SDL_dynapi.c" /> |
| | | <ClCompile Include="..\..\src\events\SDL_clipboardevents.c" /> |
| | | <ClCompile Include="..\..\src\events\SDL_displayevents.c" /> |
| | | <ClCompile Include="..\..\src\events\SDL_dropevents.c" /> |
| | | <ClCompile Include="..\..\src\events\SDL_events.c" /> |
| | | <ClCompile Include="..\..\src\events\SDL_gesture.c" /> |
| | | <ClCompile Include="..\..\src\events\SDL_keyboard.c" /> |
| | | <ClCompile Include="..\..\src\events\SDL_mouse.c" /> |
| | | <ClCompile Include="..\..\src\events\SDL_quit.c" /> |
| | | <ClCompile Include="..\..\src\events\SDL_touch.c" /> |
| | | <ClCompile Include="..\..\src\events\SDL_windowevents.c" /> |
| | | <ClCompile Include="..\..\src\file\SDL_rwops.c" /> |
| | | <ClCompile Include="..\..\src\filesystem\windows\SDL_sysfilesystem.c" /> |
| | | <ClCompile Include="..\..\src\haptic\SDL_haptic.c" /> |
| | | <ClCompile Include="..\..\src\haptic\windows\SDL_dinputhaptic.c" /> |
| | | <ClCompile Include="..\..\src\haptic\windows\SDL_windowshaptic.c" /> |
| | | <ClCompile Include="..\..\src\haptic\windows\SDL_xinputhaptic.c" /> |
| | | <ClCompile Include="..\..\src\hidapi\windows\hid.c" /> |
| | | <ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_ps4.c" /> |
| | | <ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_switch.c" /> |
| | | <ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xbox360.c" /> |
| | | <ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xboxone.c" /> |
| | | <ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapijoystick.c" /> |
| | | <ClCompile Include="..\..\src\joystick\SDL_gamecontroller.c" /> |
| | | <ClCompile Include="..\..\src\joystick\SDL_joystick.c" /> |
| | | <ClCompile Include="..\..\src\joystick\windows\SDL_dinputjoystick.c" /> |
| | | <ClCompile Include="..\..\src\joystick\windows\SDL_mmjoystick.c" /> |
| | | <ClCompile Include="..\..\src\joystick\windows\SDL_windowsjoystick.c" /> |
| | | <ClCompile Include="..\..\src\joystick\windows\SDL_xinputjoystick.c" /> |
| | | <ClCompile Include="..\..\src\libm\e_atan2.c" />
|
| | | <ClCompile Include="..\..\src\libm\e_exp.c" /> |
| | | <ClCompile Include="..\..\src\libm\e_fmod.c" /> |
| | | <ClCompile Include="..\..\src\libm\e_log.c" />
|
| | | <ClCompile Include="..\..\src\libm\e_log10.c" />
|
| | | <ClCompile Include="..\..\src\libm\e_pow.c" />
|
| | |
| | | <ClCompile Include="..\..\src\libm\s_scalbn.c" />
|
| | | <ClCompile Include="..\..\src\libm\s_sin.c" />
|
| | | <ClCompile Include="..\..\src\libm\s_tan.c" />
|
| | | <ClCompile Include="..\..\src\SDL.c" />
|
| | | <ClCompile Include="..\..\src\SDL_assert.c" />
|
| | | <ClCompile Include="..\..\src\atomic\SDL_atomic.c" />
|
| | | <ClCompile Include="..\..\src\audio\SDL_audio.c" />
|
| | | <ClCompile Include="..\..\src\audio\SDL_audiocvt.c" />
|
| | | <ClCompile Include="..\..\src\audio\SDL_audiodev.c" />
|
| | | <ClCompile Include="..\..\src\audio\SDL_audiotypecvt.c" />
|
| | | <ClCompile Include="..\..\src\loadso\windows\SDL_sysloadso.c" /> |
| | | <ClCompile Include="..\..\src\power\SDL_power.c" /> |
| | | <ClCompile Include="..\..\src\power\windows\SDL_syspower.c" /> |
| | | <ClCompile Include="..\..\src\render\direct3d\SDL_render_d3d.c" /> |
| | | <ClCompile Include="..\..\src\render\direct3d\SDL_shaders_d3d.c" /> |
| | | <ClCompile Include="..\..\src\render\direct3d11\SDL_render_d3d11.c" /> |
| | | <ClCompile Include="..\..\src\render\direct3d11\SDL_shaders_d3d11.c" /> |
| | | <ClCompile Include="..\..\src\render\opengl\SDL_render_gl.c" /> |
| | | <ClCompile Include="..\..\src\render\opengl\SDL_shaders_gl.c" /> |
| | | <ClCompile Include="..\..\src\render\opengles2\SDL_render_gles2.c" /> |
| | | <ClCompile Include="..\..\src\render\opengles2\SDL_shaders_gles2.c" /> |
| | | <ClCompile Include="..\..\src\render\SDL_d3dmath.c" /> |
| | | <ClCompile Include="..\..\src\render\SDL_render.c" /> |
| | | <ClCompile Include="..\..\src\render\SDL_yuv_sw.c" /> |
| | | <ClCompile Include="..\..\src\render\software\SDL_blendfillrect.c" />
|
| | | <ClCompile Include="..\..\src\render\software\SDL_blendline.c" />
|
| | | <ClCompile Include="..\..\src\render\software\SDL_blendpoint.c" />
|
| | | <ClCompile Include="..\..\src\render\software\SDL_drawline.c" /> |
| | | <ClCompile Include="..\..\src\render\software\SDL_drawpoint.c" /> |
| | | <ClCompile Include="..\..\src\render\software\SDL_render_sw.c" /> |
| | | <ClCompile Include="..\..\src\render\software\SDL_rotate.c" /> |
| | | <ClCompile Include="..\..\src\SDL.c" /> |
| | | <ClCompile Include="..\..\src\SDL_assert.c" /> |
| | | <ClCompile Include="..\..\src\SDL_dataqueue.c" /> |
| | | <ClCompile Include="..\..\src\SDL_error.c" /> |
| | | <ClCompile Include="..\..\src\SDL_hints.c" /> |
| | | <ClCompile Include="..\..\src\SDL_log.c" /> |
| | | <ClCompile Include="..\..\src\sensor\dummy\SDL_dummysensor.c" /> |
| | | <ClCompile Include="..\..\src\sensor\SDL_sensor.c" /> |
| | | <ClCompile Include="..\..\src\stdlib\SDL_getenv.c" /> |
| | | <ClCompile Include="..\..\src\stdlib\SDL_iconv.c" /> |
| | | <ClCompile Include="..\..\src\stdlib\SDL_malloc.c" /> |
| | | <ClCompile Include="..\..\src\stdlib\SDL_qsort.c" /> |
| | | <ClCompile Include="..\..\src\stdlib\SDL_stdlib.c" /> |
| | | <ClCompile Include="..\..\src\stdlib\SDL_string.c" /> |
| | | <ClCompile Include="..\..\src\thread\generic\SDL_syscond.c" /> |
| | | <ClCompile Include="..\..\src\thread\SDL_thread.c" /> |
| | | <ClCompile Include="..\..\src\thread\windows\SDL_sysmutex.c" /> |
| | | <ClCompile Include="..\..\src\thread\windows\SDL_syssem.c" /> |
| | | <ClCompile Include="..\..\src\thread\windows\SDL_systhread.c" /> |
| | | <ClCompile Include="..\..\src\thread\windows\SDL_systls.c" /> |
| | | <ClCompile Include="..\..\src\timer\SDL_timer.c" /> |
| | | <ClCompile Include="..\..\src\timer\windows\SDL_systimer.c" /> |
| | | <ClCompile Include="..\..\src\video\dummy\SDL_nullevents.c" /> |
| | | <ClCompile Include="..\..\src\video\dummy\SDL_nullframebuffer.c" /> |
| | | <ClCompile Include="..\..\src\video\dummy\SDL_nullvideo.c" /> |
| | | <ClCompile Include="..\..\src\video\SDL_blit.c" />
|
| | | <ClCompile Include="..\..\src\video\SDL_blit_0.c" />
|
| | | <ClCompile Include="..\..\src\video\SDL_blit_1.c" />
|
| | |
| | | <ClCompile Include="..\..\src\video\SDL_blit_slow.c" />
|
| | | <ClCompile Include="..\..\src\video\SDL_bmp.c" />
|
| | | <ClCompile Include="..\..\src\video\SDL_clipboard.c" />
|
| | | <ClCompile Include="..\..\src\events\SDL_clipboardevents.c" />
|
| | | <ClCompile Include="..\..\src\cpuinfo\SDL_cpuinfo.c" />
|
| | | <ClCompile Include="..\..\src\render\SDL_d3dmath.c" />
|
| | | <ClCompile Include="..\..\src\haptic\windows\SDL_dinputhaptic.c" />
|
| | | <ClCompile Include="..\..\src\joystick\windows\SDL_dinputjoystick.c" />
|
| | | <ClCompile Include="..\..\src\audio\directsound\SDL_directsound.c" />
|
| | | <ClCompile Include="..\..\src\audio\disk\SDL_diskaudio.c" />
|
| | | <ClCompile Include="..\..\src\render\software\SDL_drawline.c" />
|
| | | <ClCompile Include="..\..\src\render\software\SDL_drawpoint.c" />
|
| | | <ClCompile Include="..\..\src\events\SDL_dropevents.c" />
|
| | | <ClCompile Include="..\..\src\audio\dummy\SDL_dummyaudio.c" />
|
| | | <ClCompile Include="..\..\src\dynapi\SDL_dynapi.c" />
|
| | | <ClCompile Include="..\..\src\video\SDL_egl.c" />
|
| | | <ClCompile Include="..\..\src\SDL_dataqueue.c" />
|
| | | <ClCompile Include="..\..\src\SDL_error.c" />
|
| | | <ClCompile Include="..\..\src\events\SDL_events.c" />
|
| | | <ClCompile Include="..\..\src\video\SDL_fillrect.c" />
|
| | | <ClCompile Include="..\..\src\joystick\SDL_gamecontroller.c" />
|
| | | <ClCompile Include="..\..\src\events\SDL_gesture.c" />
|
| | | <ClCompile Include="..\..\src\stdlib\SDL_getenv.c" />
|
| | | <ClCompile Include="..\..\src\haptic\SDL_haptic.c" />
|
| | | <ClCompile Include="..\..\src\SDL_hints.c" />
|
| | | <ClCompile Include="..\..\src\stdlib\SDL_iconv.c" />
|
| | | <ClCompile Include="..\..\src\joystick\SDL_joystick.c" />
|
| | | <ClCompile Include="..\..\src\events\SDL_keyboard.c" />
|
| | | <ClCompile Include="..\..\src\SDL_log.c" />
|
| | | <ClCompile Include="..\..\src\stdlib\SDL_malloc.c" />
|
| | | <ClCompile Include="..\..\src\audio\SDL_mixer.c" />
|
| | | <ClCompile Include="..\..\src\joystick\windows\SDL_mmjoystick.c" />
|
| | | <ClCompile Include="..\..\src\events\SDL_mouse.c" />
|
| | | <ClCompile Include="..\..\src\video\dummy\SDL_nullevents.c" />
|
| | | <ClCompile Include="..\..\src\video\dummy\SDL_nullframebuffer.c" />
|
| | | <ClCompile Include="..\..\src\video\dummy\SDL_nullvideo.c" />
|
| | | <ClCompile Include="..\..\src\video\SDL_pixels.c" />
|
| | | <ClCompile Include="..\..\src\power\SDL_power.c" />
|
| | | <ClCompile Include="..\..\src\stdlib\SDL_qsort.c" />
|
| | | <ClCompile Include="..\..\src\events\SDL_quit.c" />
|
| | | <ClCompile Include="..\..\src\video\SDL_rect.c" />
|
| | | <ClCompile Include="..\..\src\render\SDL_render.c" />
|
| | | <ClCompile Include="..\..\src\render\direct3d\SDL_render_d3d.c" />
|
| | | <ClCompile Include="..\..\src\render\direct3d11\SDL_render_d3d11.c" />
|
| | | <ClCompile Include="..\..\src\render\opengl\SDL_render_gl.c" />
|
| | | <ClCompile Include="..\..\src\render\opengles2\SDL_render_gles2.c" />
|
| | | <ClCompile Include="..\..\src\render\software\SDL_render_sw.c" />
|
| | | <ClCompile Include="..\..\src\video\SDL_RLEaccel.c" />
|
| | | <ClCompile Include="..\..\src\render\software\SDL_rotate.c" />
|
| | | <ClCompile Include="..\..\src\file\SDL_rwops.c" />
|
| | | <ClCompile Include="..\..\src\render\opengl\SDL_shaders_gl.c" />
|
| | | <ClCompile Include="..\..\src\render\opengles2\SDL_shaders_gles2.c" />
|
| | | <ClCompile Include="..\..\src\video\SDL_shape.c" />
|
| | | <ClCompile Include="..\..\src\atomic\SDL_spinlock.c" />
|
| | | <ClCompile Include="..\..\src\stdlib\SDL_stdlib.c" />
|
| | | <ClCompile Include="..\..\src\video\SDL_stretch.c" />
|
| | | <ClCompile Include="..\..\src\stdlib\SDL_string.c" />
|
| | | <ClCompile Include="..\..\src\video\SDL_surface.c" />
|
| | | <ClCompile Include="..\..\src\thread\generic\SDL_syscond.c" />
|
| | | <ClCompile Include="..\..\src\filesystem\windows\SDL_sysfilesystem.c" />
|
| | | <ClCompile Include="..\..\src\loadso\windows\SDL_sysloadso.c" />
|
| | | <ClCompile Include="..\..\src\thread\windows\SDL_sysmutex.c" />
|
| | | <ClCompile Include="..\..\src\power\windows\SDL_syspower.c" />
|
| | | <ClCompile Include="..\..\src\thread\windows\SDL_syssem.c" />
|
| | | <ClCompile Include="..\..\src\thread\windows\SDL_systhread.c" />
|
| | | <ClCompile Include="..\..\src\timer\windows\SDL_systimer.c" />
|
| | | <ClCompile Include="..\..\src\thread\windows\SDL_systls.c" />
|
| | | <ClCompile Include="..\..\src\thread\SDL_thread.c" />
|
| | | <ClCompile Include="..\..\src\timer\SDL_timer.c" />
|
| | | <ClCompile Include="..\..\src\events\SDL_touch.c" />
|
| | | <ClCompile Include="..\..\src\video\SDL_video.c" />
|
| | | <ClCompile Include="..\..\src\audio\SDL_wave.c" />
|
| | | <ClCompile Include="..\..\src\events\SDL_windowevents.c" />
|
| | | <ClCompile Include="..\..\src\core\windows\SDL_windows.c" />
|
| | | <ClCompile Include="..\..\src\video\SDL_vulkan_utils.c" /> |
| | | <ClCompile Include="..\..\src\video\SDL_yuv.c" /> |
| | | <ClCompile Include="..\..\src\video\windows\SDL_windowsclipboard.c" />
|
| | | <ClCompile Include="..\..\src\video\windows\SDL_windowsevents.c" />
|
| | | <ClCompile Include="..\..\src\video\windows\SDL_windowsframebuffer.c" />
|
| | | <ClCompile Include="..\..\src\haptic\windows\SDL_windowshaptic.c" />
|
| | | <ClCompile Include="..\..\src\joystick\windows\SDL_windowsjoystick.c" />
|
| | | <ClCompile Include="..\..\src\video\windows\SDL_windowskeyboard.c" />
|
| | | <ClCompile Include="..\..\src\video\windows\SDL_windowsmessagebox.c" />
|
| | | <ClCompile Include="..\..\src\video\windows\SDL_windowsmodes.c" />
|
| | |
| | | <ClCompile Include="..\..\src\video\windows\SDL_windowsopengles.c" />
|
| | | <ClCompile Include="..\..\src\video\windows\SDL_windowsshape.c" />
|
| | | <ClCompile Include="..\..\src\video\windows\SDL_windowsvideo.c" />
|
| | | <ClCompile Include="..\..\src\video\windows\SDL_windowswindow.c" />
|
| | | <ClCompile Include="..\..\src\audio\winmm\SDL_winmm.c" />
|
| | | <ClCompile Include="..\..\src\audio\wasapi\SDL_wasapi.c" />
|
| | | <ClCompile Include="..\..\src\audio\wasapi\SDL_wasapi_win32.c" />
|
| | | <ClCompile Include="..\..\src\core\windows\SDL_xinput.c" />
|
| | | <ClCompile Include="..\..\src\haptic\windows\SDL_xinputhaptic.c" />
|
| | | <ClCompile Include="..\..\src\joystick\windows\SDL_xinputjoystick.c" />
|
| | | <ClCompile Include="..\..\src\render\SDL_yuv_sw.c" />
|
| | | <ClCompile Include="..\..\src\audio\wasapi\SDL_wasapi.c" />
|
| | | <ClCompile Include="..\..\src\video\SDL_vulkan_utils.c" />
|
| | | <ClCompile Include="..\..\src\video\windows\SDL_windowsvulkan.c" />
|
| | | <ClCompile Include="..\..\src\libm\e_fmod.c" />
|
| | | <ClCompile Include="..\..\src\video\SDL_yuv.c" />
|
| | | <ClCompile Include="..\..\src\video\windows\SDL_windowswindow.c" /> |
| | | <ClCompile Include="..\..\src\video\yuv2rgb\yuv_rgb.c" />
|
| | | <ClCompile Include="..\..\src\render\direct3d11\SDL_shaders_d3d11.c" />
|
| | | <ClCompile Include="..\..\src\render\direct3d\SDL_shaders_d3d.c" />
|
| | | </ItemGroup>
|
| | | <ItemGroup>
|
| | | <ResourceCompile Include="..\..\src\main\windows\version.rc" />
|
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
| | | <ItemGroup Label="ProjectConfigurations"> |
| | | <ProjectConfiguration Include="Debug|Win32"> |
| | |
| | | This is a list of major changes in SDL's version history.
|
| | |
|
| | | ---------------------------------------------------------------------------
|
| | | 2.0.9:
|
| | | ---------------------------------------------------------------------------
|
| | |
|
| | | General:
|
| | | * Added a new sensor API, initialized by passing SDL_INIT_SENSOR to SDL_Init(), and defined in SDL_sensor.h
|
| | | * Added an event SDL_SENSORUPDATE which is sent when a sensor is updated
|
| | | * Added SDL_GetDisplayOrientation() to return the current display orientation
|
| | | * Added an event SDL_DISPLAYEVENT which is sent when the display orientation changes
|
| | | * Added HIDAPI joystick drivers for more consistent support for Xbox, PS4 and Nintendo Switch Pro controller support across platforms. (Thanks to Valve for contributing the PS4 and Nintendo Switch Pro controller support)
|
| | | * Added support for many other popular game controllers
|
| | | * Added SDL_JoystickGetDevicePlayerIndex(), SDL_JoystickGetPlayerIndex(), and SDL_GameControllerGetPlayerIndex() to get the player index for a controller. For XInput controllers this returns the XInput index for the controller.
|
| | | * Added SDL_GameControllerRumble() and SDL_JoystickRumble() which allow simple rumble without using the haptics API
|
| | | * Added SDL_GameControllerMappingForDeviceIndex() to get the mapping for a controller before it's opened
|
| | | * Added the hint SDL_HINT_MOUSE_DOUBLE_CLICK_TIME to control the mouse double-click time
|
| | | * Added the hint SDL_HINT_MOUSE_DOUBLE_CLICK_RADIUS to control the mouse double-click radius, in pixels
|
| | | * Added SDL_HasColorKey() to return whether a surface has a colorkey active
|
| | | * Added SDL_HasAVX512F() to return whether the CPU has AVX-512F features
|
| | | * Added SDL_IsTablet() to return whether the application is running on a tablet
|
| | | * Added SDL_THREAD_PRIORITY_TIME_CRITICAL for threads that must run at the highest priority
|
| | |
|
| | | Mac OS X:
|
| | | * Fixed black screen at start on Mac OS X Mojave
|
| | |
|
| | | Linux:
|
| | | * Added SDL_LinuxSetThreadPriority() to allow adjusting the thread priority of native threads using RealtimeKit if available.
|
| | |
|
| | | iOS:
|
| | | * Fixed Asian IME input
|
| | |
|
| | | Android:
|
| | | * Updated required Android SDK to API 26, to match Google's new App Store requirements
|
| | | * Added support for wired USB Xbox, PS4, and Nintendo Switch Pro controllers
|
| | | * Added support for relative mouse mode on Android 7.0 and newer (except where it's broken, on Chromebooks and when in DeX mode with Samsung Experience 9.0)
|
| | | * Added support for custom mouse cursors on Android 7.0 and newer
|
| | | * Added the hint SDL_HINT_ANDROID_TRAP_BACK_BUTTON to control whether the back button will back out of the app (the default) or be passed to the application as SDL_SCANCODE_AC_BACK
|
| | | * Added SDL_AndroidBackButton() to trigger the Android system back button behavior when handling the back button in the application
|
| | | * Added SDL_IsChromebook() to return whether the app is running in the Chromebook Android runtime
|
| | | * Added SDL_IsDeXMode() to return whether the app is running while docked in the Samsung DeX
|
| | |
|
| | |
|
| | | ---------------------------------------------------------------------------
|
| | | 2.0.8:
|
| | | ---------------------------------------------------------------------------
|
| | |
|
old mode 100755
new mode 100644
| | |
| | | C01FCF4F08A954540054247B /* Debug */ = { |
| | | isa = XCBuildConfiguration; |
| | | buildSettings = { |
| | | ALWAYS_SEARCH_USER_PATHS = NO; |
| | | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; |
| | | GCC_OPTIMIZATION_LEVEL = 0; |
| | | HEADER_SEARCH_PATHS = ../../include; |
| | |
| | | C01FCF5008A954540054247B /* Release */ = { |
| | | isa = XCBuildConfiguration; |
| | | buildSettings = { |
| | | ALWAYS_SEARCH_USER_PATHS = NO; |
| | | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; |
| | | HEADER_SEARCH_PATHS = ../../include; |
| | | PRELINK_LIBS = ""; |
old mode 100755
new mode 100644
| | |
| | | 4D75171A1EE1D32200820EEA /* SDL_uikitmetalview.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D7517191EE1D32200820EEA /* SDL_uikitmetalview.h */; }; |
| | | 4D75171F1EE1D98200820EEA /* SDL_vulkan_internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D75171D1EE1D98200820EEA /* SDL_vulkan_internal.h */; }; |
| | | 4D7517201EE1D98200820EEA /* SDL_vulkan_utils.c in Sources */ = {isa = PBXBuildFile; fileRef = 4D75171E1EE1D98200820EEA /* SDL_vulkan_utils.c */; }; |
| | | 55FFA91A2122302B00D7CBED /* SDL_syspower.h in Headers */ = {isa = PBXBuildFile; fileRef = 55FFA9192122302B00D7CBED /* SDL_syspower.h */; }; |
| | | 566726451DF72CF5001DD3DB /* SDL_dataqueue.c in Sources */ = {isa = PBXBuildFile; fileRef = 566726431DF72CF5001DD3DB /* SDL_dataqueue.c */; }; |
| | | 566726461DF72CF5001DD3DB /* SDL_dataqueue.h in Headers */ = {isa = PBXBuildFile; fileRef = 566726441DF72CF5001DD3DB /* SDL_dataqueue.h */; }; |
| | | 56A6702E18565E450007D20F /* SDL_internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 56A6702D18565E450007D20F /* SDL_internal.h */; }; |
| | |
| | | 56F9D5601DF73BA400C15B5D /* SDL_dataqueue.c in Sources */ = {isa = PBXBuildFile; fileRef = 566726431DF72CF5001DD3DB /* SDL_dataqueue.c */; }; |
| | | 93CB792313FC5E5200BD3E05 /* SDL_uikitviewcontroller.h in Headers */ = {isa = PBXBuildFile; fileRef = 93CB792213FC5E5200BD3E05 /* SDL_uikitviewcontroller.h */; }; |
| | | 93CB792613FC5F5300BD3E05 /* SDL_uikitviewcontroller.m in Sources */ = {isa = PBXBuildFile; fileRef = 93CB792513FC5F5300BD3E05 /* SDL_uikitviewcontroller.m */; }; |
| | | A7A9EEA91F702631002A5589 /* SDL_steamcontroller.c in Sources */ = {isa = PBXBuildFile; fileRef = A7A9EEA71F702631002A5589 /* SDL_steamcontroller.c */; }; |
| | | A7A9EEAA1F702631002A5589 /* SDL_steamcontroller.h in Headers */ = {isa = PBXBuildFile; fileRef = A7A9EEA81F702631002A5589 /* SDL_steamcontroller.h */; }; |
| | | A704172E20F7E74800A82227 /* controller_type.h in Headers */ = {isa = PBXBuildFile; fileRef = A704172D20F7E74800A82227 /* controller_type.h */; }; |
| | | A704172F20F7E76000A82227 /* SDL_gamecontroller.c in Sources */ = {isa = PBXBuildFile; fileRef = AA0AD06116647BBB00CE5896 /* SDL_gamecontroller.c */; }; |
| | | A7C19D29212E552C00DF2152 /* SDL_displayevents_c.h in Headers */ = {isa = PBXBuildFile; fileRef = A7C19D27212E552B00DF2152 /* SDL_displayevents_c.h */; }; |
| | | A7C19D2A212E552C00DF2152 /* SDL_displayevents.c in Sources */ = {isa = PBXBuildFile; fileRef = A7C19D28212E552B00DF2152 /* SDL_displayevents.c */; }; |
| | | A7C19D2B212E552C00DF2152 /* SDL_displayevents.c in Sources */ = {isa = PBXBuildFile; fileRef = A7C19D28212E552B00DF2152 /* SDL_displayevents.c */; }; |
| | | A7F629241FE06523002F9CC9 /* SDL_uikitmetalview.m in Sources */ = {isa = PBXBuildFile; fileRef = 4D7516F81EE1C28A00820EEA /* SDL_uikitmetalview.m */; }; |
| | | AA0AD06216647BBB00CE5896 /* SDL_gamecontroller.c in Sources */ = {isa = PBXBuildFile; fileRef = AA0AD06116647BBB00CE5896 /* SDL_gamecontroller.c */; }; |
| | | AA0AD06516647BD400CE5896 /* SDL_gamecontroller.h in Headers */ = {isa = PBXBuildFile; fileRef = AA0AD06416647BD400CE5896 /* SDL_gamecontroller.h */; }; |
| | |
| | | AADC5A631FDA10C800960936 /* SDL_shaders_metal_ios.h in Headers */ = {isa = PBXBuildFile; fileRef = AADC5A611FDA10C800960936 /* SDL_shaders_metal_ios.h */; }; |
| | | AADC5A641FDA10C800960936 /* SDL_render_metal.m in Sources */ = {isa = PBXBuildFile; fileRef = AADC5A621FDA10C800960936 /* SDL_render_metal.m */; }; |
| | | AADC5A651FDA10CB00960936 /* SDL_render_metal.m in Sources */ = {isa = PBXBuildFile; fileRef = AADC5A621FDA10C800960936 /* SDL_render_metal.m */; }; |
| | | AAE7A4222041CCA90096E65A /* SDL_steamcontroller.c in Sources */ = {isa = PBXBuildFile; fileRef = A7A9EEA71F702631002A5589 /* SDL_steamcontroller.c */; }; |
| | | F30D9C99212CD0360047DF2E /* SDL_sensor.h in Headers */ = {isa = PBXBuildFile; fileRef = F30D9C98212CD0360047DF2E /* SDL_sensor.h */; }; |
| | | F30D9C9E212CD0990047DF2E /* SDL_sensor_c.h in Headers */ = {isa = PBXBuildFile; fileRef = F30D9C9B212CD0980047DF2E /* SDL_sensor_c.h */; }; |
| | | F30D9C9F212CD0990047DF2E /* SDL_syssensor.h in Headers */ = {isa = PBXBuildFile; fileRef = F30D9C9C212CD0990047DF2E /* SDL_syssensor.h */; }; |
| | | F30D9CA0212CD0990047DF2E /* SDL_sensor.c in Sources */ = {isa = PBXBuildFile; fileRef = F30D9C9D212CD0990047DF2E /* SDL_sensor.c */; }; |
| | | F30D9CA1212CD0990047DF2E /* SDL_sensor.c in Sources */ = {isa = PBXBuildFile; fileRef = F30D9C9D212CD0990047DF2E /* SDL_sensor.c */; }; |
| | | F30D9CA5212CD0BF0047DF2E /* SDL_coremotionsensor.m in Sources */ = {isa = PBXBuildFile; fileRef = F30D9CA3212CD0BF0047DF2E /* SDL_coremotionsensor.m */; }; |
| | | F30D9CA6212CD0BF0047DF2E /* SDL_coremotionsensor.m in Sources */ = {isa = PBXBuildFile; fileRef = F30D9CA3212CD0BF0047DF2E /* SDL_coremotionsensor.m */; }; |
| | | F30D9CA7212CD0BF0047DF2E /* SDL_coremotionsensor.h in Headers */ = {isa = PBXBuildFile; fileRef = F30D9CA4212CD0BF0047DF2E /* SDL_coremotionsensor.h */; }; |
| | | F30D9CC6212CE92C0047DF2E /* hid.m in Sources */ = {isa = PBXBuildFile; fileRef = F30D9CC5212CE92C0047DF2E /* hid.m */; }; |
| | | F30D9CC7212CE92C0047DF2E /* hid.m in Sources */ = {isa = PBXBuildFile; fileRef = F30D9CC5212CE92C0047DF2E /* hid.m */; }; |
| | | F36839CC214790950000F255 /* SDL_dummysensor.h in Headers */ = {isa = PBXBuildFile; fileRef = F36839CA214790950000F255 /* SDL_dummysensor.h */; }; |
| | | F36839CD214790950000F255 /* SDL_dummysensor.c in Sources */ = {isa = PBXBuildFile; fileRef = F36839CB214790950000F255 /* SDL_dummysensor.c */; }; |
| | | F36839CE214790950000F255 /* SDL_dummysensor.c in Sources */ = {isa = PBXBuildFile; fileRef = F36839CB214790950000F255 /* SDL_dummysensor.c */; }; |
| | | F3BDD79220F51CB8004ECBF3 /* SDL_hidapi_xbox360.c in Sources */ = {isa = PBXBuildFile; fileRef = F3BDD78B20F51CB8004ECBF3 /* SDL_hidapi_xbox360.c */; }; |
| | | F3BDD79320F51CB8004ECBF3 /* SDL_hidapi_xbox360.c in Sources */ = {isa = PBXBuildFile; fileRef = F3BDD78B20F51CB8004ECBF3 /* SDL_hidapi_xbox360.c */; }; |
| | | F3BDD79420F51CB8004ECBF3 /* SDL_hidapi_switch.c in Sources */ = {isa = PBXBuildFile; fileRef = F3BDD78C20F51CB8004ECBF3 /* SDL_hidapi_switch.c */; }; |
| | | F3BDD79520F51CB8004ECBF3 /* SDL_hidapi_switch.c in Sources */ = {isa = PBXBuildFile; fileRef = F3BDD78C20F51CB8004ECBF3 /* SDL_hidapi_switch.c */; }; |
| | | F3BDD79620F51CB8004ECBF3 /* SDL_hidapi_xboxone.c in Sources */ = {isa = PBXBuildFile; fileRef = F3BDD78D20F51CB8004ECBF3 /* SDL_hidapi_xboxone.c */; }; |
| | | F3BDD79720F51CB8004ECBF3 /* SDL_hidapi_xboxone.c in Sources */ = {isa = PBXBuildFile; fileRef = F3BDD78D20F51CB8004ECBF3 /* SDL_hidapi_xboxone.c */; }; |
| | | F3BDD79820F51CB8004ECBF3 /* SDL_hidapi_ps4.c in Sources */ = {isa = PBXBuildFile; fileRef = F3BDD78E20F51CB8004ECBF3 /* SDL_hidapi_ps4.c */; }; |
| | | F3BDD79920F51CB8004ECBF3 /* SDL_hidapi_ps4.c in Sources */ = {isa = PBXBuildFile; fileRef = F3BDD78E20F51CB8004ECBF3 /* SDL_hidapi_ps4.c */; }; |
| | | F3BDD79B20F51CB8004ECBF3 /* SDL_hidapijoystick_c.h in Headers */ = {isa = PBXBuildFile; fileRef = F3BDD79020F51CB8004ECBF3 /* SDL_hidapijoystick_c.h */; }; |
| | | F3BDD79C20F51CB8004ECBF3 /* SDL_hidapijoystick.c in Sources */ = {isa = PBXBuildFile; fileRef = F3BDD79120F51CB8004ECBF3 /* SDL_hidapijoystick.c */; }; |
| | | F3BDD79D20F51CB8004ECBF3 /* SDL_hidapijoystick.c in Sources */ = {isa = PBXBuildFile; fileRef = F3BDD79120F51CB8004ECBF3 /* SDL_hidapijoystick.c */; }; |
| | | FA1DC2721C62BE65008F99A0 /* SDL_uikitclipboard.h in Headers */ = {isa = PBXBuildFile; fileRef = FA1DC2701C62BE65008F99A0 /* SDL_uikitclipboard.h */; }; |
| | | FA1DC2731C62BE65008F99A0 /* SDL_uikitclipboard.m in Sources */ = {isa = PBXBuildFile; fileRef = FA1DC2711C62BE65008F99A0 /* SDL_uikitclipboard.m */; }; |
| | | FAB5981D1BB5C31500BE72C5 /* SDL_atomic.c in Sources */ = {isa = PBXBuildFile; fileRef = 04FFAB8912E23B8D00BA343D /* SDL_atomic.c */; }; |
| | |
| | | FAB5984C1BB5C31600BE72C5 /* SDL_syshaptic.c in Sources */ = {isa = PBXBuildFile; fileRef = 047677B80EA76A31008ABAF1 /* SDL_syshaptic.c */; }; |
| | | FAB5984D1BB5C31600BE72C5 /* SDL_haptic.c in Sources */ = {isa = PBXBuildFile; fileRef = 047677B90EA76A31008ABAF1 /* SDL_haptic.c */; }; |
| | | FAB598501BB5C31600BE72C5 /* SDL_sysjoystick.m in Sources */ = {isa = PBXBuildFile; fileRef = FD689F000E26E5B600F90B21 /* SDL_sysjoystick.m */; }; |
| | | FAB598511BB5C31600BE72C5 /* SDL_gamecontroller.c in Sources */ = {isa = PBXBuildFile; fileRef = AA0AD06116647BBB00CE5896 /* SDL_gamecontroller.c */; }; |
| | | FAB598521BB5C31600BE72C5 /* SDL_joystick.c in Sources */ = {isa = PBXBuildFile; fileRef = FD5F9D1E0E0E08B3008E885B /* SDL_joystick.c */; }; |
| | | FAB598551BB5C31600BE72C5 /* SDL_sysloadso.c in Sources */ = {isa = PBXBuildFile; fileRef = 047AF1B20EA98D6C00811173 /* SDL_sysloadso.c */; }; |
| | | FAB598561BB5C31600BE72C5 /* SDL_sysloadso.c in Sources */ = {isa = PBXBuildFile; fileRef = FD8BD8190E27E25900B52CD5 /* SDL_sysloadso.c */; }; |
| | |
| | | 0442EC4E12FE1C1E004C9285 /* SDL_render_sw_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_render_sw_c.h; sourceTree = "<group>"; }; |
| | | 0442EC4F12FE1C1E004C9285 /* SDL_render_sw.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_render_sw.c; sourceTree = "<group>"; }; |
| | | 0442EC5212FE1C28004C9285 /* SDL_render_gles.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_render_gles.c; sourceTree = "<group>"; }; |
| | | 0442EC5412FE1C3F004C9285 /* SDL_hints.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_hints.c; path = ../../src/SDL_hints.c; sourceTree = SOURCE_ROOT; }; |
| | | 0442EC5412FE1C3F004C9285 /* SDL_hints.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_hints.c; sourceTree = "<group>"; }; |
| | | 044E5FB711E606EB0076F181 /* SDL_clipboard.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_clipboard.c; sourceTree = "<group>"; }; |
| | | 0463873A0F0B5B7D0041FD65 /* SDL_blit_slow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_blit_slow.h; sourceTree = "<group>"; }; |
| | | 0463873E0F0B5B7D0041FD65 /* SDL_fillrect.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_fillrect.c; sourceTree = "<group>"; }; |
| | | 047677B80EA76A31008ABAF1 /* SDL_syshaptic.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_syshaptic.c; sourceTree = "<group>"; }; |
| | | 047677B90EA76A31008ABAF1 /* SDL_haptic.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_haptic.c; path = ../../src/haptic/SDL_haptic.c; sourceTree = SOURCE_ROOT; }; |
| | | 047677BA0EA76A31008ABAF1 /* SDL_syshaptic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_syshaptic.h; path = ../../src/haptic/SDL_syshaptic.h; sourceTree = SOURCE_ROOT; }; |
| | | 047677B90EA76A31008ABAF1 /* SDL_haptic.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_haptic.c; sourceTree = "<group>"; }; |
| | | 047677BA0EA76A31008ABAF1 /* SDL_syshaptic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_syshaptic.h; sourceTree = "<group>"; }; |
| | | 047AF1B20EA98D6C00811173 /* SDL_sysloadso.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_sysloadso.c; sourceTree = "<group>"; }; |
| | | 04BA9D5F11EF474A00B60E01 /* SDL_gesture_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_gesture_c.h; sourceTree = "<group>"; }; |
| | | 04BA9D6011EF474A00B60E01 /* SDL_gesture.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_gesture.c; sourceTree = "<group>"; }; |
| | | 04BA9D6111EF474A00B60E01 /* SDL_touch_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_touch_c.h; sourceTree = "<group>"; }; |
| | | 04BA9D6211EF474A00B60E01 /* SDL_touch.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_touch.c; sourceTree = "<group>"; }; |
| | | 04BAC09A1300C1290055DE28 /* SDL_assert_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_assert_c.h; path = ../../src/SDL_assert_c.h; sourceTree = SOURCE_ROOT; }; |
| | | 04BAC09B1300C1290055DE28 /* SDL_log.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_log.c; path = ../../src/SDL_log.c; sourceTree = SOURCE_ROOT; }; |
| | | 04F2AF551104ABD200D6DDF7 /* SDL_assert.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_assert.c; path = ../../src/SDL_assert.c; sourceTree = SOURCE_ROOT; }; |
| | | 04BAC09A1300C1290055DE28 /* SDL_assert_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_assert_c.h; sourceTree = "<group>"; }; |
| | | 04BAC09B1300C1290055DE28 /* SDL_log.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_log.c; sourceTree = "<group>"; }; |
| | | 04F2AF551104ABD200D6DDF7 /* SDL_assert.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_assert.c; sourceTree = "<group>"; }; |
| | | 04F7806A12FB751400FC43C0 /* SDL_blendfillrect.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_blendfillrect.c; sourceTree = "<group>"; }; |
| | | 04F7806B12FB751400FC43C0 /* SDL_blendfillrect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_blendfillrect.h; sourceTree = "<group>"; }; |
| | | 04F7806C12FB751400FC43C0 /* SDL_blendline.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_blendline.c; sourceTree = "<group>"; }; |
| | |
| | | 4D7517191EE1D32200820EEA /* SDL_uikitmetalview.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_uikitmetalview.h; sourceTree = "<group>"; }; |
| | | 4D75171D1EE1D98200820EEA /* SDL_vulkan_internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_vulkan_internal.h; sourceTree = "<group>"; }; |
| | | 4D75171E1EE1D98200820EEA /* SDL_vulkan_utils.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_vulkan_utils.c; sourceTree = "<group>"; }; |
| | | 566726431DF72CF5001DD3DB /* SDL_dataqueue.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_dataqueue.c; path = ../../src/SDL_dataqueue.c; sourceTree = "<group>"; }; |
| | | 566726441DF72CF5001DD3DB /* SDL_dataqueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_dataqueue.h; path = ../../src/SDL_dataqueue.h; sourceTree = "<group>"; }; |
| | | 56A6702D18565E450007D20F /* SDL_internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_internal.h; path = ../../src/SDL_internal.h; sourceTree = "<group>"; }; |
| | | 56A6703118565E760007D20F /* SDL_dynapi_overrides.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_dynapi_overrides.h; path = ../../src/dynapi/SDL_dynapi_overrides.h; sourceTree = "<group>"; }; |
| | | 56A6703218565E760007D20F /* SDL_dynapi_procs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_dynapi_procs.h; path = ../../src/dynapi/SDL_dynapi_procs.h; sourceTree = "<group>"; }; |
| | | 56A6703318565E760007D20F /* SDL_dynapi.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_dynapi.c; path = ../../src/dynapi/SDL_dynapi.c; sourceTree = "<group>"; }; |
| | | 56A6703418565E760007D20F /* SDL_dynapi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_dynapi.h; path = ../../src/dynapi/SDL_dynapi.h; sourceTree = "<group>"; }; |
| | | 55FFA9192122302B00D7CBED /* SDL_syspower.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_syspower.h; sourceTree = "<group>"; }; |
| | | 566726431DF72CF5001DD3DB /* SDL_dataqueue.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_dataqueue.c; sourceTree = "<group>"; }; |
| | | 566726441DF72CF5001DD3DB /* SDL_dataqueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_dataqueue.h; sourceTree = "<group>"; }; |
| | | 56A6702D18565E450007D20F /* SDL_internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_internal.h; sourceTree = "<group>"; }; |
| | | 56A6703118565E760007D20F /* SDL_dynapi_overrides.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_dynapi_overrides.h; sourceTree = "<group>"; }; |
| | | 56A6703218565E760007D20F /* SDL_dynapi_procs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_dynapi_procs.h; sourceTree = "<group>"; }; |
| | | 56A6703318565E760007D20F /* SDL_dynapi.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_dynapi.c; sourceTree = "<group>"; }; |
| | | 56A6703418565E760007D20F /* SDL_dynapi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_dynapi.h; sourceTree = "<group>"; }; |
| | | 56C181DE17C44D5E00406AE3 /* SDL_filesystem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_filesystem.h; sourceTree = "<group>"; }; |
| | | 56C181E117C44D7A00406AE3 /* SDL_sysfilesystem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SDL_sysfilesystem.m; path = ../../src/filesystem/cocoa/SDL_sysfilesystem.m; sourceTree = "<group>"; }; |
| | | 56EA86F913E9EC2B002E47EB /* SDL_coreaudio.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SDL_coreaudio.m; path = coreaudio/SDL_coreaudio.m; sourceTree = "<group>"; }; |
| | | 56EA86FA13E9EC2B002E47EB /* SDL_coreaudio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_coreaudio.h; path = coreaudio/SDL_coreaudio.h; sourceTree = "<group>"; }; |
| | | 56ED04E0118A8EE200A56AA6 /* SDL_power.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_power.c; path = ../../src/power/SDL_power.c; sourceTree = SOURCE_ROOT; }; |
| | | 56ED04E2118A8EFD00A56AA6 /* SDL_syspower.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SDL_syspower.m; path = ../../src/power/uikit/SDL_syspower.m; sourceTree = SOURCE_ROOT; }; |
| | | 56C181E117C44D7A00406AE3 /* SDL_sysfilesystem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SDL_sysfilesystem.m; path = cocoa/SDL_sysfilesystem.m; sourceTree = "<group>"; }; |
| | | 56EA86F913E9EC2B002E47EB /* SDL_coreaudio.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDL_coreaudio.m; sourceTree = "<group>"; }; |
| | | 56EA86FA13E9EC2B002E47EB /* SDL_coreaudio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_coreaudio.h; sourceTree = "<group>"; }; |
| | | 56ED04E0118A8EE200A56AA6 /* SDL_power.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_power.c; sourceTree = "<group>"; }; |
| | | 56ED04E2118A8EFD00A56AA6 /* SDL_syspower.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDL_syspower.m; sourceTree = "<group>"; }; |
| | | 93CB792213FC5E5200BD3E05 /* SDL_uikitviewcontroller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_uikitviewcontroller.h; sourceTree = "<group>"; }; |
| | | 93CB792513FC5F5300BD3E05 /* SDL_uikitviewcontroller.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDL_uikitviewcontroller.m; sourceTree = "<group>"; }; |
| | | A7A9EEA71F702631002A5589 /* SDL_steamcontroller.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_steamcontroller.c; sourceTree = "<group>"; }; |
| | | A7A9EEA81F702631002A5589 /* SDL_steamcontroller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_steamcontroller.h; sourceTree = "<group>"; }; |
| | | A704172D20F7E74800A82227 /* controller_type.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = controller_type.h; sourceTree = "<group>"; }; |
| | | A7C19D27212E552B00DF2152 /* SDL_displayevents_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_displayevents_c.h; sourceTree = "<group>"; }; |
| | | A7C19D28212E552B00DF2152 /* SDL_displayevents.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_displayevents.c; sourceTree = "<group>"; }; |
| | | AA0AD06116647BBB00CE5896 /* SDL_gamecontroller.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_gamecontroller.c; sourceTree = "<group>"; }; |
| | | AA0AD06416647BD400CE5896 /* SDL_gamecontroller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_gamecontroller.h; sourceTree = "<group>"; }; |
| | | AA0F8494178D5F1A00823F9D /* SDL_systls.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_systls.c; sourceTree = "<group>"; }; |
| | |
| | | AADA5B8E16CCAB7C00107CF7 /* SDL_bits.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_bits.h; sourceTree = "<group>"; }; |
| | | AADC5A611FDA10C800960936 /* SDL_shaders_metal_ios.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_shaders_metal_ios.h; sourceTree = "<group>"; }; |
| | | AADC5A621FDA10C800960936 /* SDL_render_metal.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDL_render_metal.m; sourceTree = "<group>"; }; |
| | | F30D9C98212CD0360047DF2E /* SDL_sensor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_sensor.h; sourceTree = "<group>"; }; |
| | | F30D9C9B212CD0980047DF2E /* SDL_sensor_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_sensor_c.h; sourceTree = "<group>"; }; |
| | | F30D9C9C212CD0990047DF2E /* SDL_syssensor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_syssensor.h; sourceTree = "<group>"; }; |
| | | F30D9C9D212CD0990047DF2E /* SDL_sensor.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_sensor.c; sourceTree = "<group>"; }; |
| | | F30D9CA3212CD0BF0047DF2E /* SDL_coremotionsensor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDL_coremotionsensor.m; sourceTree = "<group>"; }; |
| | | F30D9CA4212CD0BF0047DF2E /* SDL_coremotionsensor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_coremotionsensor.h; sourceTree = "<group>"; }; |
| | | F30D9CC5212CE92C0047DF2E /* hid.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = hid.m; sourceTree = "<group>"; }; |
| | | F36839CA214790950000F255 /* SDL_dummysensor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_dummysensor.h; sourceTree = "<group>"; }; |
| | | F36839CB214790950000F255 /* SDL_dummysensor.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_dummysensor.c; sourceTree = "<group>"; }; |
| | | F3BDD78B20F51CB8004ECBF3 /* SDL_hidapi_xbox360.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_hidapi_xbox360.c; sourceTree = "<group>"; }; |
| | | F3BDD78C20F51CB8004ECBF3 /* SDL_hidapi_switch.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_hidapi_switch.c; sourceTree = "<group>"; }; |
| | | F3BDD78D20F51CB8004ECBF3 /* SDL_hidapi_xboxone.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_hidapi_xboxone.c; sourceTree = "<group>"; }; |
| | | F3BDD78E20F51CB8004ECBF3 /* SDL_hidapi_ps4.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_hidapi_ps4.c; sourceTree = "<group>"; }; |
| | | F3BDD79020F51CB8004ECBF3 /* SDL_hidapijoystick_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_hidapijoystick_c.h; sourceTree = "<group>"; }; |
| | | F3BDD79120F51CB8004ECBF3 /* SDL_hidapijoystick.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_hidapijoystick.c; sourceTree = "<group>"; }; |
| | | FA1DC2701C62BE65008F99A0 /* SDL_uikitclipboard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_uikitclipboard.h; sourceTree = "<group>"; }; |
| | | FA1DC2711C62BE65008F99A0 /* SDL_uikitclipboard.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDL_uikitclipboard.m; sourceTree = "<group>"; }; |
| | | FAB598141BB5C1B100BE72C5 /* libSDL2.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libSDL2.a; sourceTree = BUILT_PRODUCTS_DIR; }; |
| | |
| | | FD99B99B0DD52EDC00FB1D6B /* SDL_windowevents.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_windowevents.c; sourceTree = "<group>"; }; |
| | | FD99B99C0DD52EDC00FB1D6B /* SDL_windowevents_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_windowevents_c.h; sourceTree = "<group>"; }; |
| | | FD99B99E0DD52EDC00FB1D6B /* SDL_rwops.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_rwops.c; sourceTree = "<group>"; }; |
| | | FD99B9D40DD52EDC00FB1D6B /* SDL_error_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_error_c.h; path = ../../src/SDL_error_c.h; sourceTree = "<group>"; }; |
| | | FD99B9D50DD52EDC00FB1D6B /* SDL_error.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_error.c; path = ../../src/SDL_error.c; sourceTree = "<group>"; }; |
| | | FD99B9D80DD52EDC00FB1D6B /* SDL.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL.c; path = ../../src/SDL.c; sourceTree = "<group>"; }; |
| | | FD99B9D40DD52EDC00FB1D6B /* SDL_error_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_error_c.h; sourceTree = "<group>"; }; |
| | | FD99B9D50DD52EDC00FB1D6B /* SDL_error.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_error.c; sourceTree = "<group>"; }; |
| | | FD99B9D80DD52EDC00FB1D6B /* SDL.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL.c; sourceTree = "<group>"; }; |
| | | FD99BA070DD52EDC00FB1D6B /* SDL_syscond.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_syscond.c; sourceTree = "<group>"; }; |
| | | FD99BA080DD52EDC00FB1D6B /* SDL_sysmutex.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_sysmutex.c; sourceTree = "<group>"; }; |
| | | FD99BA090DD52EDC00FB1D6B /* SDL_sysmutex_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_sysmutex_c.h; sourceTree = "<group>"; }; |
| | |
| | | 04409BA412FA989600FB9AA8 /* SDL_yuv_sw_c.h */, |
| | | 04409BA512FA989600FB9AA8 /* SDL_yuv_sw.c */, |
| | | ); |
| | | name = render; |
| | | path = ../../src/render; |
| | | sourceTree = SOURCE_ROOT; |
| | | path = render; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | 041B2CE812FA0F680087D585 /* opengles */ = { |
| | | isa = PBXGroup; |
| | |
| | | 047677B90EA76A31008ABAF1 /* SDL_haptic.c */, |
| | | 047677BA0EA76A31008ABAF1 /* SDL_syshaptic.h */, |
| | | ); |
| | | name = haptic; |
| | | path = haptic; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | 047677B70EA76A31008ABAF1 /* dummy */ = { |
| | |
| | | children = ( |
| | | 047677B80EA76A31008ABAF1 /* SDL_syshaptic.c */, |
| | | ); |
| | | name = dummy; |
| | | path = ../../src/haptic/dummy; |
| | | sourceTree = SOURCE_ROOT; |
| | | path = dummy; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | 047AF1B10EA98D6C00811173 /* dummy */ = { |
| | | isa = PBXGroup; |
| | |
| | | 04FFAB8912E23B8D00BA343D /* SDL_atomic.c */, |
| | | 04FFAB8A12E23B8D00BA343D /* SDL_spinlock.c */, |
| | | ); |
| | | name = atomic; |
| | | path = ../../src/atomic; |
| | | sourceTree = SOURCE_ROOT; |
| | | path = atomic; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | 19C28FACFE9D520D11CA2CBB /* Products */ = { |
| | | isa = PBXGroup; |
| | |
| | | 56A6703318565E760007D20F /* SDL_dynapi.c */, |
| | | 56A6703418565E760007D20F /* SDL_dynapi.h */, |
| | | ); |
| | | name = dynapi; |
| | | path = dynapi; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | 56C181E017C44D6900406AE3 /* filesystem */ = { |
| | |
| | | children = ( |
| | | 56C181E117C44D7A00406AE3 /* SDL_sysfilesystem.m */, |
| | | ); |
| | | name = filesystem; |
| | | path = filesystem; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | 56EA86F813E9EBF9002E47EB /* coreaudio */ = { |
| | |
| | | 56EA86F913E9EC2B002E47EB /* SDL_coreaudio.m */, |
| | | 56EA86FA13E9EC2B002E47EB /* SDL_coreaudio.h */, |
| | | ); |
| | | name = coreaudio; |
| | | path = coreaudio; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | 56ED04DE118A8E9A00A56AA6 /* power */ = { |
| | |
| | | 56ED04E0118A8EE200A56AA6 /* SDL_power.c */, |
| | | 56ED04DF118A8EB700A56AA6 /* uikit */, |
| | | ); |
| | | name = power; |
| | | path = power; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | 56ED04DF118A8EB700A56AA6 /* uikit */ = { |
| | | isa = PBXGroup; |
| | | children = ( |
| | | 55FFA9192122302B00D7CBED /* SDL_syspower.h */, |
| | | 56ED04E2118A8EFD00A56AA6 /* SDL_syspower.m */, |
| | | ); |
| | | name = uikit; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | A7A9EEA61F702607002A5589 /* steam */ = { |
| | | isa = PBXGroup; |
| | | children = ( |
| | | A7A9EEA71F702631002A5589 /* SDL_steamcontroller.c */, |
| | | A7A9EEA81F702631002A5589 /* SDL_steamcontroller.h */, |
| | | ); |
| | | path = steam; |
| | | path = uikit; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | AA13B3521FB8B41700D9FEE6 /* yuv2rgb */ = { |
| | |
| | | path = metal; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | F30D9C9A212CD0590047DF2E /* sensor */ = { |
| | | isa = PBXGroup; |
| | | children = ( |
| | | F30D9CA2212CD09E0047DF2E /* coremotion */, |
| | | F36839C9214790740000F255 /* dummy */, |
| | | F30D9C9B212CD0980047DF2E /* SDL_sensor_c.h */, |
| | | F30D9C9D212CD0990047DF2E /* SDL_sensor.c */, |
| | | F30D9C9C212CD0990047DF2E /* SDL_syssensor.h */, |
| | | ); |
| | | path = sensor; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | F30D9CA2212CD09E0047DF2E /* coremotion */ = { |
| | | isa = PBXGroup; |
| | | children = ( |
| | | F30D9CA4212CD0BF0047DF2E /* SDL_coremotionsensor.h */, |
| | | F30D9CA3212CD0BF0047DF2E /* SDL_coremotionsensor.m */, |
| | | ); |
| | | path = coremotion; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | F35CEA6E20F51B7F003ECE98 /* hidapi */ = { |
| | | isa = PBXGroup; |
| | | children = ( |
| | | F3BDD77420F51C18004ECBF3 /* ios */, |
| | | ); |
| | | path = hidapi; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | F36839C9214790740000F255 /* dummy */ = { |
| | | isa = PBXGroup; |
| | | children = ( |
| | | F36839CB214790950000F255 /* SDL_dummysensor.c */, |
| | | F36839CA214790950000F255 /* SDL_dummysensor.h */, |
| | | ); |
| | | path = dummy; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | F3BDD77420F51C18004ECBF3 /* ios */ = { |
| | | isa = PBXGroup; |
| | | children = ( |
| | | F30D9CC5212CE92C0047DF2E /* hid.m */, |
| | | ); |
| | | path = ios; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | F3BDD78A20F51C8D004ECBF3 /* hidapi */ = { |
| | | isa = PBXGroup; |
| | | children = ( |
| | | F3BDD78E20F51CB8004ECBF3 /* SDL_hidapi_ps4.c */, |
| | | F3BDD78C20F51CB8004ECBF3 /* SDL_hidapi_switch.c */, |
| | | F3BDD78B20F51CB8004ECBF3 /* SDL_hidapi_xbox360.c */, |
| | | F3BDD78D20F51CB8004ECBF3 /* SDL_hidapi_xboxone.c */, |
| | | F3BDD79020F51CB8004ECBF3 /* SDL_hidapijoystick_c.h */, |
| | | F3BDD79120F51CB8004ECBF3 /* SDL_hidapijoystick.c */, |
| | | ); |
| | | path = hidapi; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | FD3F4A6F0DEA620800C5B771 /* stdlib */ = { |
| | | isa = PBXGroup; |
| | | children = ( |
| | |
| | | FD3F4A740DEA620800C5B771 /* SDL_stdlib.c */, |
| | | FD3F4A750DEA620800C5B771 /* SDL_string.c */, |
| | | ); |
| | | name = stdlib; |
| | | path = ../../src/stdlib; |
| | | sourceTree = SOURCE_ROOT; |
| | | path = stdlib; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | FD5F9D080E0E08B3008E885B /* joystick */ = { |
| | | isa = PBXGroup; |
| | | children = ( |
| | | A7A9EEA61F702607002A5589 /* steam */, |
| | | F3BDD78A20F51C8D004ECBF3 /* hidapi */, |
| | | FD689EFF0E26E5B600F90B21 /* iphoneos */, |
| | | A704172D20F7E74800A82227 /* controller_type.h */, |
| | | AA0AD06116647BBB00CE5896 /* SDL_gamecontroller.c */, |
| | | FD5F9D1E0E0E08B3008E885B /* SDL_joystick.c */, |
| | | FD5F9D1F0E0E08B3008E885B /* SDL_joystick_c.h */, |
| | | FD5F9D200E0E08B3008E885B /* SDL_sysjoystick.h */, |
| | | ); |
| | | name = joystick; |
| | | path = ../../src/joystick; |
| | | sourceTree = SOURCE_ROOT; |
| | | path = joystick; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | FD689EFF0E26E5B600F90B21 /* iphoneos */ = { |
| | | isa = PBXGroup; |
| | |
| | | 047AF1B10EA98D6C00811173 /* dummy */, |
| | | FD8BD8180E27E25900B52CD5 /* dlopen */, |
| | | ); |
| | | name = loadso; |
| | | path = ../../src/loadso; |
| | | sourceTree = SOURCE_ROOT; |
| | | path = loadso; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | FD8BD8180E27E25900B52CD5 /* dlopen */ = { |
| | | isa = PBXGroup; |
| | |
| | | AA7558891595D55500BBD41B /* SDL_revision.h */, |
| | | AA75588A1595D55500BBD41B /* SDL_rwops.h */, |
| | | AA75588B1595D55500BBD41B /* SDL_scancode.h */, |
| | | F30D9C98212CD0360047DF2E /* SDL_sensor.h */, |
| | | AA75588C1595D55500BBD41B /* SDL_shape.h */, |
| | | AA75588D1595D55500BBD41B /* SDL_stdinc.h */, |
| | | AA75588E1595D55500BBD41B /* SDL_surface.h */, |
| | |
| | | FD99B99D0DD52EDC00FB1D6B /* file */, |
| | | 56C181E017C44D6900406AE3 /* filesystem */, |
| | | 047677B60EA769DF008ABAF1 /* haptic */, |
| | | F35CEA6E20F51B7F003ECE98 /* hidapi */, |
| | | FD5F9D080E0E08B3008E885B /* joystick */, |
| | | FD8BD8150E27E25900B52CD5 /* loadso */, |
| | | 56ED04DE118A8E9A00A56AA6 /* power */, |
| | | 041B2CE312FA0F680087D585 /* render */, |
| | | F30D9C9A212CD0590047DF2E /* sensor */, |
| | | FD3F4A6F0DEA620800C5B771 /* stdlib */, |
| | | FD99B9E00DD52EDC00FB1D6B /* thread */, |
| | | FD99BA1E0DD52EDC00FB1D6B /* timer */, |
| | |
| | | FD99B9D80DD52EDC00FB1D6B /* SDL.c */, |
| | | ); |
| | | name = "Library Source"; |
| | | path = ../../src; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | FD99B8FB0DD52EDC00FB1D6B /* audio */ = { |
| | |
| | | FD99B9530DD52EDC00FB1D6B /* SDL_wave.c */, |
| | | FD99B9540DD52EDC00FB1D6B /* SDL_wave.h */, |
| | | ); |
| | | name = audio; |
| | | path = ../../src/audio; |
| | | path = audio; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | FD99B91C0DD52EDC00FB1D6B /* dummy */ = { |
| | |
| | | children = ( |
| | | FD99B98B0DD52EDC00FB1D6B /* SDL_cpuinfo.c */, |
| | | ); |
| | | name = cpuinfo; |
| | | path = ../../src/cpuinfo; |
| | | path = cpuinfo; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | FD99B98C0DD52EDC00FB1D6B /* events */ = { |
| | |
| | | FD99B9920DD52EDC00FB1D6B /* scancodes_xfree86.h */, |
| | | 0420496F11E6F03D007E7EC9 /* SDL_clipboardevents.c */, |
| | | 0420496E11E6F03D007E7EC9 /* SDL_clipboardevents_c.h */, |
| | | A7C19D27212E552B00DF2152 /* SDL_displayevents_c.h */, |
| | | A7C19D28212E552B00DF2152 /* SDL_displayevents.c */, |
| | | AA704DD5162AA90A0076D1C1 /* SDL_dropevents.c */, |
| | | AA704DD4162AA90A0076D1C1 /* SDL_dropevents_c.h */, |
| | | FD99B9930DD52EDC00FB1D6B /* SDL_events.c */, |
| | |
| | | FD99B99B0DD52EDC00FB1D6B /* SDL_windowevents.c */, |
| | | FD99B99C0DD52EDC00FB1D6B /* SDL_windowevents_c.h */, |
| | | ); |
| | | name = events; |
| | | path = ../../src/events; |
| | | path = events; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | FD99B99D0DD52EDC00FB1D6B /* file */ = { |
| | |
| | | 006E9885119552DD001DE610 /* cocoa */, |
| | | FD99B99E0DD52EDC00FB1D6B /* SDL_rwops.c */, |
| | | ); |
| | | name = file; |
| | | path = ../../src/file; |
| | | path = file; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | FD99B9E00DD52EDC00FB1D6B /* thread */ = { |
| | |
| | | FD99BA150DD52EDC00FB1D6B /* SDL_thread.c */, |
| | | FD99BA160DD52EDC00FB1D6B /* SDL_thread_c.h */, |
| | | ); |
| | | name = thread; |
| | | path = ../../src/thread; |
| | | path = thread; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | FD99BA060DD52EDC00FB1D6B /* pthread */ = { |
| | |
| | | FD99BA2E0DD52EDC00FB1D6B /* SDL_timer.c */, |
| | | FD99BA2F0DD52EDC00FB1D6B /* SDL_timer_c.h */, |
| | | ); |
| | | name = timer; |
| | | path = ../../src/timer; |
| | | path = timer; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | FD99BA300DD52EDC00FB1D6B /* unix */ = { |
| | |
| | | AA13B34F1FB8B3CC00D9FEE6 /* SDL_yuv.c */, |
| | | AA13B3481FB8B27800D9FEE6 /* SDL_yuv_c.h */, |
| | | ); |
| | | name = video; |
| | | path = ../../src/video; |
| | | sourceTree = SOURCE_ROOT; |
| | | path = video; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | FDA685F40DF244C800F98A1A /* dummy */ = { |
| | | isa = PBXGroup; |
| | |
| | | AA13B3591FB8B46400D9FEE6 /* yuv_rgb.h in Headers */, |
| | | 04F7807712FB751400FC43C0 /* SDL_blendfillrect.h in Headers */, |
| | | 04F7807912FB751400FC43C0 /* SDL_blendline.h in Headers */, |
| | | F3BDD79B20F51CB8004ECBF3 /* SDL_hidapijoystick_c.h in Headers */, |
| | | 04F7807B12FB751400FC43C0 /* SDL_blendpoint.h in Headers */, |
| | | 04F7807C12FB751400FC43C0 /* SDL_draw.h in Headers */, |
| | | 04F7807E12FB751400FC43C0 /* SDL_drawline.h in Headers */, |
| | | AA13B34E1FB8B27800D9FEE6 /* SDL_yuv_c.h in Headers */, |
| | | 04F7808012FB751400FC43C0 /* SDL_drawpoint.h in Headers */, |
| | | 04F7808412FB753F00FC43C0 /* SDL_nullframebuffer_c.h in Headers */, |
| | | A7A9EEAA1F702631002A5589 /* SDL_steamcontroller.h in Headers */, |
| | | 0442EC5012FE1C1E004C9285 /* SDL_render_sw_c.h in Headers */, |
| | | FA1DC2721C62BE65008F99A0 /* SDL_uikitclipboard.h in Headers */, |
| | | 0402A85A12FE70C600CECEE3 /* SDL_shaders_gles2.h in Headers */, |
| | |
| | | AA75589A1595D55500BBD41B /* SDL_assert.h in Headers */, |
| | | AA75589B1595D55500BBD41B /* SDL_atomic.h in Headers */, |
| | | AA75589C1595D55500BBD41B /* SDL_audio.h in Headers */, |
| | | 55FFA91A2122302B00D7CBED /* SDL_syspower.h in Headers */, |
| | | AA75589D1595D55500BBD41B /* SDL_blendmode.h in Headers */, |
| | | F30D9C9E212CD0990047DF2E /* SDL_sensor_c.h in Headers */, |
| | | AA75589E1595D55500BBD41B /* SDL_clipboard.h in Headers */, |
| | | AA75589F1595D55500BBD41B /* SDL_config_iphoneos.h in Headers */, |
| | | AA7558A01595D55500BBD41B /* SDL_config.h in Headers */, |
| | |
| | | AA7558A71595D55500BBD41B /* SDL_haptic.h in Headers */, |
| | | AA7558A81595D55500BBD41B /* SDL_hints.h in Headers */, |
| | | 566726461DF72CF5001DD3DB /* SDL_dataqueue.h in Headers */, |
| | | F30D9C9F212CD0990047DF2E /* SDL_syssensor.h in Headers */, |
| | | AA7558AA1595D55500BBD41B /* SDL_joystick.h in Headers */, |
| | | AA13B34B1FB8B27800D9FEE6 /* SDL_shape_internals.h in Headers */, |
| | | AA7558AB1595D55500BBD41B /* SDL_keyboard.h in Headers */, |
| | | A704172E20F7E74800A82227 /* controller_type.h in Headers */, |
| | | AA7558AC1595D55500BBD41B /* SDL_keycode.h in Headers */, |
| | | AA7558AD1595D55500BBD41B /* SDL_loadso.h in Headers */, |
| | | AA7558AE1595D55500BBD41B /* SDL_log.h in Headers */, |
| | | F30D9CA7212CD0BF0047DF2E /* SDL_coremotionsensor.h in Headers */, |
| | | AA7558AF1595D55500BBD41B /* SDL_main.h in Headers */, |
| | | AA7558B01595D55500BBD41B /* SDL_mouse.h in Headers */, |
| | | A7C19D29212E552C00DF2152 /* SDL_displayevents_c.h in Headers */, |
| | | AA7558B11595D55500BBD41B /* SDL_mutex.h in Headers */, |
| | | AA7558B21595D55500BBD41B /* SDL_name.h in Headers */, |
| | | AA7558B31595D55500BBD41B /* SDL_opengl.h in Headers */, |
| | |
| | | FAD4F7021BA3C4E8008346CE /* SDL_sysjoystick_c.h in Headers */, |
| | | AA7558C11595D55500BBD41B /* SDL_surface.h in Headers */, |
| | | AA7558C21595D55500BBD41B /* SDL_system.h in Headers */, |
| | | F30D9C99212CD0360047DF2E /* SDL_sensor.h in Headers */, |
| | | AA7558C31595D55500BBD41B /* SDL_syswm.h in Headers */, |
| | | AA7558C41595D55500BBD41B /* SDL_thread.h in Headers */, |
| | | AA7558C51595D55500BBD41B /* SDL_timer.h in Headers */, |
| | |
| | | AA9FF9511637C6E5000DF050 /* SDL_messagebox.h in Headers */, |
| | | AABCC3941640643D00AB8930 /* SDL_uikitmessagebox.h in Headers */, |
| | | AA0AD06516647BD400CE5896 /* SDL_gamecontroller.h in Headers */, |
| | | F36839CC214790950000F255 /* SDL_dummysensor.h in Headers */, |
| | | AADA5B8F16CCAB7C00107CF7 /* SDL_bits.h in Headers */, |
| | | 56C181DF17C44D5E00406AE3 /* SDL_filesystem.h in Headers */, |
| | | ); |
| | |
| | | FAB598251BB5C31500BE72C5 /* SDL_audiocvt.c in Sources */, |
| | | FAB598271BB5C31500BE72C5 /* SDL_audiotypecvt.c in Sources */, |
| | | FAB598281BB5C31500BE72C5 /* SDL_mixer.c in Sources */, |
| | | F3BDD79720F51CB8004ECBF3 /* SDL_hidapi_xboxone.c in Sources */, |
| | | FAB5982A1BB5C31500BE72C5 /* SDL_wave.c in Sources */, |
| | | FAFDF8C61D88D4530083E6F2 /* SDL_uikitclipboard.m in Sources */, |
| | | FAB5982C1BB5C31500BE72C5 /* SDL_cpuinfo.c in Sources */, |
| | |
| | | A7F629241FE06523002F9CC9 /* SDL_uikitmetalview.m in Sources */, |
| | | FAB5983C1BB5C31500BE72C5 /* SDL_gesture.c in Sources */, |
| | | FAB5983E1BB5C31500BE72C5 /* SDL_keyboard.c in Sources */, |
| | | F3BDD79520F51CB8004ECBF3 /* SDL_hidapi_switch.c in Sources */, |
| | | FAB598401BB5C31500BE72C5 /* SDL_mouse.c in Sources */, |
| | | A704172F20F7E76000A82227 /* SDL_gamecontroller.c in Sources */, |
| | | FAB598421BB5C31500BE72C5 /* SDL_quit.c in Sources */, |
| | | FAB598441BB5C31500BE72C5 /* SDL_touch.c in Sources */, |
| | | FAB598461BB5C31500BE72C5 /* SDL_windowevents.c in Sources */, |
| | | F30D9CC7212CE92C0047DF2E /* hid.m in Sources */, |
| | | FAB598491BB5C31600BE72C5 /* SDL_rwopsbundlesupport.m in Sources */, |
| | | FAB5984A1BB5C31600BE72C5 /* SDL_rwops.c in Sources */, |
| | | FAB5984B1BB5C31600BE72C5 /* SDL_sysfilesystem.m in Sources */, |
| | |
| | | AADC5A5F1FDA105600960936 /* SDL_vulkan_utils.c in Sources */, |
| | | AADC5A5E1FDA105300960936 /* SDL_yuv.c in Sources */, |
| | | FAB5984D1BB5C31600BE72C5 /* SDL_haptic.c in Sources */, |
| | | F3BDD79320F51CB8004ECBF3 /* SDL_hidapi_xbox360.c in Sources */, |
| | | FAB598501BB5C31600BE72C5 /* SDL_sysjoystick.m in Sources */, |
| | | FAB598511BB5C31600BE72C5 /* SDL_gamecontroller.c in Sources */, |
| | | FAB598521BB5C31600BE72C5 /* SDL_joystick.c in Sources */, |
| | | FAB598551BB5C31600BE72C5 /* SDL_sysloadso.c in Sources */, |
| | | AADC5A651FDA10CB00960936 /* SDL_render_metal.m in Sources */, |
| | | FAB598561BB5C31600BE72C5 /* SDL_sysloadso.c in Sources */, |
| | | FAB598571BB5C31600BE72C5 /* SDL_power.c in Sources */, |
| | | F30D9CA1212CD0990047DF2E /* SDL_sensor.c in Sources */, |
| | | FAB598581BB5C31600BE72C5 /* SDL_syspower.m in Sources */, |
| | | 56F9D5601DF73BA400C15B5D /* SDL_dataqueue.c in Sources */, |
| | | FAB598591BB5C31600BE72C5 /* SDL_render_gles.c in Sources */, |
| | | F30D9CA6212CD0BF0047DF2E /* SDL_coremotionsensor.m in Sources */, |
| | | FAB5985A1BB5C31600BE72C5 /* SDL_render_gles2.c in Sources */, |
| | | FAB5985B1BB5C31600BE72C5 /* SDL_shaders_gles2.c in Sources */, |
| | | FAB5985D1BB5C31600BE72C5 /* SDL_blendfillrect.c in Sources */, |
| | |
| | | FAB598731BB5C31600BE72C5 /* SDL_iconv.c in Sources */, |
| | | FAB598741BB5C31600BE72C5 /* SDL_malloc.c in Sources */, |
| | | FAB598751BB5C31600BE72C5 /* SDL_qsort.c in Sources */, |
| | | F36839CE214790950000F255 /* SDL_dummysensor.c in Sources */, |
| | | A7C19D2B212E552C00DF2152 /* SDL_displayevents.c in Sources */, |
| | | FAB598761BB5C31600BE72C5 /* SDL_stdlib.c in Sources */, |
| | | FAB598771BB5C31600BE72C5 /* SDL_string.c in Sources */, |
| | | FAB598781BB5C31600BE72C5 /* SDL_syscond.c in Sources */, |
| | | F3BDD79D20F51CB8004ECBF3 /* SDL_hidapijoystick.c in Sources */, |
| | | AADC5A601FDA10A400960936 /* SDL_uikitvulkan.m in Sources */, |
| | | FAB598791BB5C31600BE72C5 /* SDL_sysmutex.c in Sources */, |
| | | FAB5987B1BB5C31600BE72C5 /* SDL_syssem.c in Sources */, |
| | | FAB5987C1BB5C31600BE72C5 /* SDL_systhread.c in Sources */, |
| | | AAE7A4222041CCA90096E65A /* SDL_steamcontroller.c in Sources */, |
| | | FAB5987E1BB5C31600BE72C5 /* SDL_systls.c in Sources */, |
| | | FAB598801BB5C31600BE72C5 /* SDL_thread.c in Sources */, |
| | | FAB598821BB5C31600BE72C5 /* SDL_systimer.c in Sources */, |
| | | FAB598831BB5C31600BE72C5 /* SDL_timer.c in Sources */, |
| | | FAB598871BB5C31600BE72C5 /* SDL_uikitappdelegate.m in Sources */, |
| | | F3BDD79920F51CB8004ECBF3 /* SDL_hidapi_ps4.c in Sources */, |
| | | FAB598891BB5C31600BE72C5 /* SDL_uikitevents.m in Sources */, |
| | | FAB5988B1BB5C31600BE72C5 /* SDL_uikitmessagebox.m in Sources */, |
| | | FAB5988D1BB5C31600BE72C5 /* SDL_uikitmodes.m in Sources */, |
| | |
| | | files = ( |
| | | FD6526810DE8FCDD002AD96B /* SDL_systimer.c in Sources */, |
| | | FD6526800DE8FCDD002AD96B /* SDL_timer.c in Sources */, |
| | | A7A9EEA91F702631002A5589 /* SDL_steamcontroller.c in Sources */, |
| | | F30D9CA5212CD0BF0047DF2E /* SDL_coremotionsensor.m in Sources */, |
| | | FD3F4A7B0DEA620800C5B771 /* SDL_string.c in Sources */, |
| | | FD6526660DE8FCDD002AD96B /* SDL_dummyaudio.c in Sources */, |
| | | FD6526670DE8FCDD002AD96B /* SDL_audio.c in Sources */, |
| | |
| | | FD6526750DE8FCDD002AD96B /* SDL_windowevents.c in Sources */, |
| | | 4D7516FB1EE1C28A00820EEA /* SDL_uikitmetalview.m in Sources */, |
| | | FD6526760DE8FCDD002AD96B /* SDL_rwops.c in Sources */, |
| | | F30D9CC6212CE92C0047DF2E /* hid.m in Sources */, |
| | | 4D7517201EE1D98200820EEA /* SDL_vulkan_utils.c in Sources */, |
| | | FD6526780DE8FCDD002AD96B /* SDL_error.c in Sources */, |
| | | FD65267A0DE8FCDD002AD96B /* SDL.c in Sources */, |
| | |
| | | FD3F4A760DEA620800C5B771 /* SDL_getenv.c in Sources */, |
| | | FD3F4A770DEA620800C5B771 /* SDL_iconv.c in Sources */, |
| | | FD3F4A780DEA620800C5B771 /* SDL_malloc.c in Sources */, |
| | | F3BDD79220F51CB8004ECBF3 /* SDL_hidapi_xbox360.c in Sources */, |
| | | FD3F4A790DEA620800C5B771 /* SDL_qsort.c in Sources */, |
| | | F3BDD79820F51CB8004ECBF3 /* SDL_hidapi_ps4.c in Sources */, |
| | | FD3F4A7A0DEA620800C5B771 /* SDL_stdlib.c in Sources */, |
| | | FDA6844D0DF2374E00F98A1A /* SDL_blit.c in Sources */, |
| | | FDA6844F0DF2374E00F98A1A /* SDL_blit_0.c in Sources */, |
| | |
| | | FD689F1F0E26E5D900F90B21 /* SDL_uikitopengles.m in Sources */, |
| | | FD689F210E26E5D900F90B21 /* SDL_uikitvideo.m in Sources */, |
| | | FD689F230E26E5D900F90B21 /* SDL_uikitview.m in Sources */, |
| | | A7C19D2A212E552C00DF2152 /* SDL_displayevents.c in Sources */, |
| | | FD689F250E26E5D900F90B21 /* SDL_uikitwindow.m in Sources */, |
| | | FD689F270E26E5D900F90B21 /* SDL_uikitopenglview.m in Sources */, |
| | | FD689FCE0E26E9D400F90B21 /* SDL_uikitappdelegate.m in Sources */, |
| | | FD8BD8250E27E25900B52CD5 /* SDL_sysloadso.c in Sources */, |
| | | F3BDD79C20F51CB8004ECBF3 /* SDL_hidapijoystick.c in Sources */, |
| | | 047677BB0EA76A31008ABAF1 /* SDL_syshaptic.c in Sources */, |
| | | 047677BC0EA76A31008ABAF1 /* SDL_haptic.c in Sources */, |
| | | 047AF1B30EA98D6C00811173 /* SDL_sysloadso.c in Sources */, |
| | | 046387460F0B5B7D0041FD65 /* SDL_fillrect.c in Sources */, |
| | | 04F2AF561104ABD200D6DDF7 /* SDL_assert.c in Sources */, |
| | | F3BDD79620F51CB8004ECBF3 /* SDL_hidapi_xboxone.c in Sources */, |
| | | 56ED04E1118A8EE200A56AA6 /* SDL_power.c in Sources */, |
| | | 56ED04E3118A8EFD00A56AA6 /* SDL_syspower.m in Sources */, |
| | | 006E9889119552DD001DE610 /* SDL_rwopsbundlesupport.m in Sources */, |
| | |
| | | 0442EC5512FE1C3F004C9285 /* SDL_hints.c in Sources */, |
| | | AA13B34A1FB8B27800D9FEE6 /* SDL_shape.c in Sources */, |
| | | 0402A85812FE70C600CECEE3 /* SDL_render_gles2.c in Sources */, |
| | | F36839CD214790950000F255 /* SDL_dummysensor.c in Sources */, |
| | | 0402A85912FE70C600CECEE3 /* SDL_shaders_gles2.c in Sources */, |
| | | 04BAC09D1300C1290055DE28 /* SDL_log.c in Sources */, |
| | | 56EA86FB13E9EC2B002E47EB /* SDL_coreaudio.m in Sources */, |
| | | F30D9CA0212CD0990047DF2E /* SDL_sensor.c in Sources */, |
| | | F3BDD79420F51CB8004ECBF3 /* SDL_hidapi_switch.c in Sources */, |
| | | 93CB792613FC5F5300BD3E05 /* SDL_uikitviewcontroller.m in Sources */, |
| | | AA628ADB159369E3005138DD /* SDL_rotate.c in Sources */, |
| | | AA126AD51617C5E7005ABC8F /* SDL_uikitmodes.m in Sources */, |
| | |
| | | FD6526640DE8FCCB002AD96B /* Debug */ = { |
| | | isa = XCBuildConfiguration; |
| | | buildSettings = { |
| | | ALWAYS_SEARCH_USER_PATHS = NO; |
| | | CLANG_ENABLE_OBJC_ARC = YES; |
| | | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; |
| | | CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = YES; |
| | |
| | | FD6526650DE8FCCB002AD96B /* Release */ = { |
| | | isa = XCBuildConfiguration; |
| | | buildSettings = { |
| | | ALWAYS_SEARCH_USER_PATHS = NO; |
| | | CLANG_ENABLE_OBJC_ARC = YES; |
| | | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; |
| | | CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = YES; |
| | |
| | | |
| | | /* Begin PBXFileReference section */ |
| | | AA1EE4461760589B0029C7A5 /* libSDL2test.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libSDL2test.a; sourceTree = BUILT_PRODUCTS_DIR; }; |
| | | AA1EE454176059AB0029C7A5 /* SDL_test_common.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_common.c; path = ../../src/test/SDL_test_common.c; sourceTree = "<group>"; }; |
| | | AA1EE455176059AB0029C7A5 /* SDL_test_compare.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_compare.c; path = ../../src/test/SDL_test_compare.c; sourceTree = "<group>"; }; |
| | | AA1EE456176059AB0029C7A5 /* SDL_test_crc32.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_crc32.c; path = ../../src/test/SDL_test_crc32.c; sourceTree = "<group>"; }; |
| | | AA1EE457176059AB0029C7A5 /* SDL_test_font.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_font.c; path = ../../src/test/SDL_test_font.c; sourceTree = "<group>"; }; |
| | | AA1EE458176059AB0029C7A5 /* SDL_test_fuzzer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_fuzzer.c; path = ../../src/test/SDL_test_fuzzer.c; sourceTree = "<group>"; }; |
| | | AA1EE459176059AB0029C7A5 /* SDL_test_harness.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_harness.c; path = ../../src/test/SDL_test_harness.c; sourceTree = "<group>"; }; |
| | | AA1EE45A176059AB0029C7A5 /* SDL_test_imageBlit.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_imageBlit.c; path = ../../src/test/SDL_test_imageBlit.c; sourceTree = "<group>"; }; |
| | | AA1EE45B176059AB0029C7A5 /* SDL_test_imageBlitBlend.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_imageBlitBlend.c; path = ../../src/test/SDL_test_imageBlitBlend.c; sourceTree = "<group>"; }; |
| | | AA1EE45C176059AB0029C7A5 /* SDL_test_imageFace.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_imageFace.c; path = ../../src/test/SDL_test_imageFace.c; sourceTree = "<group>"; }; |
| | | AA1EE45D176059AB0029C7A5 /* SDL_test_imagePrimitives.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_imagePrimitives.c; path = ../../src/test/SDL_test_imagePrimitives.c; sourceTree = "<group>"; }; |
| | | AA1EE45E176059AB0029C7A5 /* SDL_test_imagePrimitivesBlend.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_imagePrimitivesBlend.c; path = ../../src/test/SDL_test_imagePrimitivesBlend.c; sourceTree = "<group>"; }; |
| | | AA1EE45F176059AB0029C7A5 /* SDL_test_log.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_log.c; path = ../../src/test/SDL_test_log.c; sourceTree = "<group>"; }; |
| | | AA1EE460176059AB0029C7A5 /* SDL_test_md5.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_md5.c; path = ../../src/test/SDL_test_md5.c; sourceTree = "<group>"; }; |
| | | AA1EE461176059AB0029C7A5 /* SDL_test_random.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_random.c; path = ../../src/test/SDL_test_random.c; sourceTree = "<group>"; }; |
| | | AAF02FFF1F9009B100B9A9FB /* SDL_test_memory.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_memory.c; path = ../../src/test/SDL_test_memory.c; sourceTree = "<group>"; }; |
| | | AAF030001F9009B100B9A9FB /* SDL_test_assert.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_assert.c; path = ../../src/test/SDL_test_assert.c; sourceTree = "<group>"; }; |
| | | AA1EE454176059AB0029C7A5 /* SDL_test_common.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_common.c; sourceTree = "<group>"; }; |
| | | AA1EE455176059AB0029C7A5 /* SDL_test_compare.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_compare.c; sourceTree = "<group>"; }; |
| | | AA1EE456176059AB0029C7A5 /* SDL_test_crc32.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_crc32.c; sourceTree = "<group>"; }; |
| | | AA1EE457176059AB0029C7A5 /* SDL_test_font.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_font.c; sourceTree = "<group>"; }; |
| | | AA1EE458176059AB0029C7A5 /* SDL_test_fuzzer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_fuzzer.c; sourceTree = "<group>"; }; |
| | | AA1EE459176059AB0029C7A5 /* SDL_test_harness.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_harness.c; sourceTree = "<group>"; }; |
| | | AA1EE45A176059AB0029C7A5 /* SDL_test_imageBlit.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_imageBlit.c; sourceTree = "<group>"; }; |
| | | AA1EE45B176059AB0029C7A5 /* SDL_test_imageBlitBlend.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_imageBlitBlend.c; sourceTree = "<group>"; }; |
| | | AA1EE45C176059AB0029C7A5 /* SDL_test_imageFace.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_imageFace.c; sourceTree = "<group>"; }; |
| | | AA1EE45D176059AB0029C7A5 /* SDL_test_imagePrimitives.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_imagePrimitives.c; sourceTree = "<group>"; }; |
| | | AA1EE45E176059AB0029C7A5 /* SDL_test_imagePrimitivesBlend.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_imagePrimitivesBlend.c; sourceTree = "<group>"; }; |
| | | AA1EE45F176059AB0029C7A5 /* SDL_test_log.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_log.c; sourceTree = "<group>"; }; |
| | | AA1EE460176059AB0029C7A5 /* SDL_test_md5.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_md5.c; sourceTree = "<group>"; }; |
| | | AA1EE461176059AB0029C7A5 /* SDL_test_random.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_random.c; sourceTree = "<group>"; }; |
| | | AAF02FFF1F9009B100B9A9FB /* SDL_test_memory.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_memory.c; sourceTree = "<group>"; }; |
| | | AAF030001F9009B100B9A9FB /* SDL_test_assert.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_assert.c; sourceTree = "<group>"; }; |
| | | FA3D98F81BC4E5A2002C96C8 /* libSDL2test-TV.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libSDL2test-TV.a"; sourceTree = BUILT_PRODUCTS_DIR; }; |
| | | /* End PBXFileReference section */ |
| | | |
| | |
| | | AA1EE461176059AB0029C7A5 /* SDL_test_random.c */, |
| | | ); |
| | | name = "Library Source"; |
| | | path = ../../src/test; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | /* End PBXGroup section */ |
old mode 100755
new mode 100644
| | |
| | | |
| | | /* Begin PBXFileReference section */ |
| | | 046CEF8613254F23007AD51D /* testgesture.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = testgesture.app; sourceTree = BUILT_PRODUCTS_DIR; }; |
| | | 046CEF8913254F63007AD51D /* testgesture.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testgesture.c; path = ../../test/testgesture.c; sourceTree = SOURCE_ROOT; }; |
| | | 046CEF8913254F63007AD51D /* testgesture.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testgesture.c; sourceTree = "<group>"; }; |
| | | 047A63ED13285C3200CD7973 /* checkkeys.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = checkkeys.app; sourceTree = BUILT_PRODUCTS_DIR; }; |
| | | 047A63F013285CD100CD7973 /* checkkeys.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = checkkeys.c; path = ../../test/checkkeys.c; sourceTree = SOURCE_ROOT; }; |
| | | 047A63F013285CD100CD7973 /* checkkeys.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = checkkeys.c; sourceTree = "<group>"; }; |
| | | 1D6058910D05DD3D006BFB54 /* testwm2.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = testwm2.app; sourceTree = BUILT_PRODUCTS_DIR; }; |
| | | 56ED050D118A8FE400A56AA6 /* testpower.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = testpower.app; sourceTree = BUILT_PRODUCTS_DIR; }; |
| | | 56ED0510118A904200A56AA6 /* testpower.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testpower.c; path = ../../test/testpower.c; sourceTree = SOURCE_ROOT; }; |
| | | 56ED0510118A904200A56AA6 /* testpower.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testpower.c; sourceTree = "<group>"; }; |
| | | AA13B3261FB8AEBC00D9FEE6 /* testyuv.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = testyuv.app; sourceTree = BUILT_PRODUCTS_DIR; }; |
| | | AA13B32E1FB8AF0C00D9FEE6 /* testyuv.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; name = testyuv.bmp; path = ../../test/testyuv.bmp; sourceTree = "<group>"; }; |
| | | AA13B35B1FB8B4D600D9FEE6 /* testyuv.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testyuv.c; path = ../../test/testyuv.c; sourceTree = "<group>"; }; |
| | | AA13B35E1FB8B50D00D9FEE6 /* testyuv_cvt.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testyuv_cvt.c; path = ../../test/testyuv_cvt.c; sourceTree = "<group>"; }; |
| | | AA13B32E1FB8AF0C00D9FEE6 /* testyuv.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; path = testyuv.bmp; sourceTree = "<group>"; }; |
| | | AA13B35B1FB8B4D600D9FEE6 /* testyuv.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testyuv.c; sourceTree = "<group>"; }; |
| | | AA13B35E1FB8B50D00D9FEE6 /* testyuv_cvt.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testyuv_cvt.c; sourceTree = "<group>"; }; |
| | | AA1EE44D176059220029C7A5 /* SDL2test.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SDL2test.xcodeproj; path = ../SDLtest/SDL2test.xcodeproj; sourceTree = "<group>"; }; |
| | | AA2F57A91FDB544800832AD7 /* Metal.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Metal.framework; path = System/Library/Frameworks/Metal.framework; sourceTree = SDKROOT; }; |
| | | AAE7DEEC14CBB1E100DF1A0E /* testscale.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = testscale.app; sourceTree = BUILT_PRODUCTS_DIR; }; |
| | | AAE7DF4514CBB43900DF1A0E /* testscale.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testscale.c; path = ../../test/testscale.c; sourceTree = "<group>"; }; |
| | | AAE7DF4514CBB43900DF1A0E /* testscale.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testscale.c; sourceTree = "<group>"; }; |
| | | AAE7DFB114CBB54E00DF1A0E /* testrendertarget.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = testrendertarget.app; sourceTree = BUILT_PRODUCTS_DIR; }; |
| | | AAE7DFB414CBB5F700DF1A0E /* testrendertarget.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testrendertarget.c; path = ../../test/testrendertarget.c; sourceTree = "<group>"; }; |
| | | FA0EF2221BAF43DE000E07A6 /* testgamecontroller.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testgamecontroller.c; path = ../../test/testgamecontroller.c; sourceTree = "<group>"; }; |
| | | FA0EF2281BAF4487000E07A6 /* axis.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; name = axis.bmp; path = ../../test/axis.bmp; sourceTree = "<group>"; }; |
| | | FA0EF2291BAF4487000E07A6 /* button.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; name = button.bmp; path = ../../test/button.bmp; sourceTree = "<group>"; }; |
| | | FA0EF22A1BAF4487000E07A6 /* controllermap.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; name = controllermap.bmp; path = ../../test/controllermap.bmp; sourceTree = "<group>"; }; |
| | | AAE7DFB414CBB5F700DF1A0E /* testrendertarget.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testrendertarget.c; sourceTree = "<group>"; }; |
| | | FA0EF2221BAF43DE000E07A6 /* testgamecontroller.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testgamecontroller.c; sourceTree = "<group>"; }; |
| | | FA0EF2281BAF4487000E07A6 /* axis.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; path = axis.bmp; sourceTree = "<group>"; }; |
| | | FA0EF2291BAF4487000E07A6 /* button.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; path = button.bmp; sourceTree = "<group>"; }; |
| | | FA0EF22A1BAF4487000E07A6 /* controllermap.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; path = controllermap.bmp; sourceTree = "<group>"; }; |
| | | FA3D99341BC4E644002C96C8 /* testgamecontroller-TV.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "testgamecontroller-TV.app"; sourceTree = BUILT_PRODUCTS_DIR; }; |
| | | FA684F7A1BAF1A4400DCFD1A /* GameController.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GameController.framework; path = System/Library/Frameworks/GameController.framework; sourceTree = SDKROOT; }; |
| | | FA8B4BAC1967076F00F8EB7C /* CoreMotion.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMotion.framework; path = System/Library/Frameworks/CoreMotion.framework; sourceTree = SDKROOT; }; |
| | | FABA34761D8B4EAD00915323 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; |
| | | FABA34911D8B575200915323 /* testaudiocapture.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = testaudiocapture.app; sourceTree = BUILT_PRODUCTS_DIR; }; |
| | | FABA34931D8B578200915323 /* testaudiocapture.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testaudiocapture.c; path = ../../test/testaudiocapture.c; sourceTree = "<group>"; }; |
| | | FABA34931D8B578200915323 /* testaudiocapture.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testaudiocapture.c; sourceTree = "<group>"; }; |
| | | FABA34AA1D8B582100915323 /* loopwav-TV.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "loopwav-TV.app"; sourceTree = BUILT_PRODUCTS_DIR; }; |
| | | FAE0E9931BAF9B230098DFA4 /* testgamecontroller.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = testgamecontroller.app; sourceTree = BUILT_PRODUCTS_DIR; }; |
| | | FD1B48AC0E3131CA007AB34E /* SDL.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SDL.xcodeproj; path = ../SDL/SDL.xcodeproj; sourceTree = SOURCE_ROOT; }; |
| | | FDA8A7410E2D0F1600EA573E /* testaudioinfo.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testaudioinfo.c; path = ../../test/testaudioinfo.c; sourceTree = SOURCE_ROOT; }; |
| | | FDA8A7470E2D0F1600EA573E /* testerror.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testerror.c; path = ../../test/testerror.c; sourceTree = SOURCE_ROOT; }; |
| | | FDA8A7480E2D0F1600EA573E /* testfile.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testfile.c; path = ../../test/testfile.c; sourceTree = SOURCE_ROOT; }; |
| | | FDA8A74C0E2D0F1600EA573E /* testthread.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testthread.c; path = ../../test/testthread.c; sourceTree = SOURCE_ROOT; }; |
| | | FDA8A74D0E2D0F1600EA573E /* testiconv.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testiconv.c; path = ../../test/testiconv.c; sourceTree = SOURCE_ROOT; }; |
| | | FDA8A74E0E2D0F1600EA573E /* testjoystick.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testjoystick.c; path = ../../test/testjoystick.c; sourceTree = SOURCE_ROOT; }; |
| | | FDA8A74F0E2D0F1600EA573E /* testkeys.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testkeys.c; path = ../../test/testkeys.c; sourceTree = SOURCE_ROOT; }; |
| | | FDA8A7510E2D0F1600EA573E /* testlock.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testlock.c; path = ../../test/testlock.c; sourceTree = SOURCE_ROOT; }; |
| | | FDA8A7540E2D0F1600EA573E /* testoverlay2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testoverlay2.c; path = ../../test/testoverlay2.c; sourceTree = SOURCE_ROOT; }; |
| | | FDA8A7560E2D0F1600EA573E /* testplatform.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testplatform.c; path = ../../test/testplatform.c; sourceTree = SOURCE_ROOT; }; |
| | | FDA8A7570E2D0F1600EA573E /* testsem.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testsem.c; path = ../../test/testsem.c; sourceTree = SOURCE_ROOT; }; |
| | | FDA8A7590E2D0F1600EA573E /* testsprite2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testsprite2.c; path = ../../test/testsprite2.c; sourceTree = SOURCE_ROOT; }; |
| | | FDA8A75A0E2D0F1600EA573E /* testtimer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testtimer.c; path = ../../test/testtimer.c; sourceTree = SOURCE_ROOT; }; |
| | | FDA8A75B0E2D0F1600EA573E /* testver.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testver.c; path = ../../test/testver.c; sourceTree = SOURCE_ROOT; }; |
| | | FDA8A75F0E2D0F1600EA573E /* testwm2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testwm2.c; path = ../../test/testwm2.c; sourceTree = SOURCE_ROOT; }; |
| | | FDA8A7610E2D0F1600EA573E /* torturethread.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = torturethread.c; path = ../../test/torturethread.c; sourceTree = SOURCE_ROOT; }; |
| | | FDA8A78B0E2D0F3D00EA573E /* loopwave.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = loopwave.c; path = ../../test/loopwave.c; sourceTree = SOURCE_ROOT; }; |
| | | FDA8A7410E2D0F1600EA573E /* testaudioinfo.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testaudioinfo.c; sourceTree = "<group>"; }; |
| | | FDA8A7470E2D0F1600EA573E /* testerror.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testerror.c; sourceTree = "<group>"; }; |
| | | FDA8A7480E2D0F1600EA573E /* testfile.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testfile.c; sourceTree = "<group>"; }; |
| | | FDA8A74C0E2D0F1600EA573E /* testthread.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testthread.c; sourceTree = "<group>"; }; |
| | | FDA8A74D0E2D0F1600EA573E /* testiconv.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testiconv.c; sourceTree = "<group>"; }; |
| | | FDA8A74E0E2D0F1600EA573E /* testjoystick.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testjoystick.c; sourceTree = "<group>"; }; |
| | | FDA8A74F0E2D0F1600EA573E /* testkeys.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testkeys.c; sourceTree = "<group>"; }; |
| | | FDA8A7510E2D0F1600EA573E /* testlock.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testlock.c; sourceTree = "<group>"; }; |
| | | FDA8A7540E2D0F1600EA573E /* testoverlay2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testoverlay2.c; sourceTree = "<group>"; }; |
| | | FDA8A7560E2D0F1600EA573E /* testplatform.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testplatform.c; sourceTree = "<group>"; }; |
| | | FDA8A7570E2D0F1600EA573E /* testsem.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testsem.c; sourceTree = "<group>"; }; |
| | | FDA8A7590E2D0F1600EA573E /* testsprite2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testsprite2.c; sourceTree = "<group>"; }; |
| | | FDA8A75A0E2D0F1600EA573E /* testtimer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testtimer.c; sourceTree = "<group>"; }; |
| | | FDA8A75B0E2D0F1600EA573E /* testver.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testver.c; sourceTree = "<group>"; }; |
| | | FDA8A75F0E2D0F1600EA573E /* testwm2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testwm2.c; sourceTree = "<group>"; }; |
| | | FDA8A7610E2D0F1600EA573E /* torturethread.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = torturethread.c; sourceTree = "<group>"; }; |
| | | FDA8A78B0E2D0F3D00EA573E /* loopwave.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = loopwave.c; sourceTree = "<group>"; }; |
| | | FDA8A8980E2D111A00EA573E /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; |
| | | FDA8A8990E2D111A00EA573E /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; |
| | | FDA8A89A0E2D111A00EA573E /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; }; |
| | |
| | | FDA8A89D0E2D111A00EA573E /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; |
| | | FDA8A89E0E2D111A00EA573E /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; }; |
| | | FDA8AABB0E2D330F00EA573E /* loopwav.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = loopwav.app; sourceTree = BUILT_PRODUCTS_DIR; }; |
| | | FDA8AAD90E2D33B000EA573E /* icon.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; name = icon.bmp; path = ../../test/icon.bmp; sourceTree = SOURCE_ROOT; }; |
| | | FDA8AADA0E2D33BA00EA573E /* moose.dat */ = {isa = PBXFileReference; lastKnownFileType = file; name = moose.dat; path = ../../test/moose.dat; sourceTree = SOURCE_ROOT; }; |
| | | FDA8AADB0E2D33BA00EA573E /* picture.xbm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = picture.xbm; path = ../../test/picture.xbm; sourceTree = SOURCE_ROOT; }; |
| | | FDA8AADE0E2D33C100EA573E /* sample.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; name = sample.bmp; path = ../../test/sample.bmp; sourceTree = SOURCE_ROOT; }; |
| | | FDA8AAE20E2D33C600EA573E /* sample.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; name = sample.wav; path = ../../test/sample.wav; sourceTree = SOURCE_ROOT; }; |
| | | FDA8AAD90E2D33B000EA573E /* icon.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; path = icon.bmp; sourceTree = "<group>"; }; |
| | | FDA8AADA0E2D33BA00EA573E /* moose.dat */ = {isa = PBXFileReference; lastKnownFileType = file; path = moose.dat; sourceTree = "<group>"; }; |
| | | FDA8AADB0E2D33BA00EA573E /* picture.xbm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = picture.xbm; sourceTree = "<group>"; }; |
| | | FDA8AADE0E2D33C100EA573E /* sample.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; path = sample.bmp; sourceTree = "<group>"; }; |
| | | FDA8AAE20E2D33C600EA573E /* sample.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; path = sample.wav; sourceTree = "<group>"; }; |
| | | FDAAC3CD0E2D47E6001DB1D8 /* testaudioinfo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = testaudioinfo.app; sourceTree = BUILT_PRODUCTS_DIR; }; |
| | | FDAAC59B0E2D5429001DB1D8 /* testerror.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = testerror.app; sourceTree = BUILT_PRODUCTS_DIR; }; |
| | | FDAAC5C90E2D55B5001DB1D8 /* testfile.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = testfile.app; sourceTree = BUILT_PRODUCTS_DIR; }; |
| | | FDAAC6260E2D5914001DB1D8 /* testgles.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = testgles.app; sourceTree = BUILT_PRODUCTS_DIR; }; |
| | | FDAAC6290E2D5960001DB1D8 /* testgles.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testgles.c; path = ../../test/testgles.c; sourceTree = SOURCE_ROOT; }; |
| | | FDAAC6290E2D5960001DB1D8 /* testgles.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testgles.c; sourceTree = "<group>"; }; |
| | | FDC430000F0D866D009C87E1 /* torturethread.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = torturethread.app; sourceTree = BUILT_PRODUCTS_DIR; }; |
| | | FDC430090F0D86BF009C87E1 /* testdraw2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testdraw2.c; path = ../../test/testdraw2.c; sourceTree = SOURCE_ROOT; }; |
| | | FDC430090F0D86BF009C87E1 /* testdraw2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testdraw2.c; sourceTree = "<group>"; }; |
| | | FDD2C10A0E2E4F4B00B7A85F /* testthread.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = testthread.app; sourceTree = BUILT_PRODUCTS_DIR; }; |
| | | FDD2C1810E2E52C000B7A85F /* testiconv.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = testiconv.app; sourceTree = BUILT_PRODUCTS_DIR; }; |
| | | FDD2C18A0E2E52FE00B7A85F /* utf8.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = utf8.txt; path = ../../test/utf8.txt; sourceTree = SOURCE_ROOT; }; |
| | | FDD2C18A0E2E52FE00B7A85F /* utf8.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = utf8.txt; sourceTree = "<group>"; }; |
| | | FDD2C1A50E2E534F00B7A85F /* testjoystick.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = testjoystick.app; sourceTree = BUILT_PRODUCTS_DIR; }; |
| | | FDD2C45E0E2E773800B7A85F /* testkeys.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = testkeys.app; sourceTree = BUILT_PRODUCTS_DIR; }; |
| | | FDD2C47C0E2E77D700B7A85F /* testlock.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = testlock.app; sourceTree = BUILT_PRODUCTS_DIR; }; |
| | |
| | | AA1EE44D176059220029C7A5 /* SDL2test.xcodeproj */, |
| | | FD1B48AC0E3131CA007AB34E /* SDL.xcodeproj */, |
| | | FDA8AAD60E2D339A00EA573E /* Resources */, |
| | | FDA8A7C30E2D10FA00EA573E /* Linked Frameworks */, |
| | | FDA8A7C30E2D10FA00EA573E /* Frameworks */, |
| | | FDA8A73B0E2D0F0400EA573E /* src */, |
| | | 19C28FACFE9D520D11CA2CBB /* Products */, |
| | | FABA34751D8B4EAC00915323 /* Frameworks */, |
| | |
| | | FDA8A7610E2D0F1600EA573E /* torturethread.c */, |
| | | ); |
| | | name = src; |
| | | path = ../../test; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | FDA8A7C30E2D10FA00EA573E /* Linked Frameworks */ = { |
| | | FDA8A7C30E2D10FA00EA573E /* Frameworks */ = { |
| | | isa = PBXGroup; |
| | | children = ( |
| | | FA684F7A1BAF1A4400DCFD1A /* GameController.framework */, |
| | |
| | | FDA8A89D0E2D111A00EA573E /* Foundation.framework */, |
| | | FDA8A89E0E2D111A00EA573E /* CoreAudio.framework */, |
| | | ); |
| | | name = "Linked Frameworks"; |
| | | name = Frameworks; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | FDA8AAD60E2D339A00EA573E /* Resources */ = { |
| | |
| | | FDD2C18A0E2E52FE00B7A85F /* utf8.txt */, |
| | | ); |
| | | name = Resources; |
| | | path = ../../test; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | /* End PBXGroup section */ |
| | |
| | | C01FCF4F08A954540054247B /* Debug */ = { |
| | | isa = XCBuildConfiguration; |
| | | buildSettings = { |
| | | ALWAYS_SEARCH_USER_PATHS = NO; |
| | | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; |
| | | ENABLE_BITCODE = NO; |
| | | GCC_OPTIMIZATION_LEVEL = 0; |
| | |
| | | C01FCF5008A954540054247B /* Release */ = { |
| | | isa = XCBuildConfiguration; |
| | | buildSettings = { |
| | | ALWAYS_SEARCH_USER_PATHS = NO; |
| | | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; |
| | | ENABLE_BITCODE = NO; |
| | | HEADER_SEARCH_PATHS = ../../include; |
| | |
| | | <key>CFBundlePackageType</key> |
| | | <string>FMWK</string> |
| | | <key>CFBundleShortVersionString</key> |
| | | <string>2.0.8</string> |
| | | <string>2.0.9</string> |
| | | <key>CFBundleSignature</key> |
| | | <string>SDLX</string> |
| | | <key>CFBundleVersion</key> |
| | | <string>2.0.8</string> |
| | | <string>2.0.9</string> |
| | | </dict> |
| | | </plist> |
old mode 100755
new mode 100644
| | |
| | | 5646243A1FF821FF0074AC87 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 564624371FF821CB0074AC87 /* Metal.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; |
| | | 5646243B1FF822100074AC87 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 564624351FF821B80074AC87 /* QuartzCore.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; |
| | | 5646243C1FF822170074AC87 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 564624371FF821CB0074AC87 /* Metal.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; |
| | | 565AF96A1FF8238D0077498A /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 565AF9691FF823840077498A /* QuartzCore.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; |
| | | 565AF96B1FF8238E0077498A /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 565AF9691FF823840077498A /* QuartzCore.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; |
| | | 565AF96C1FF8238E0077498A /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 565AF9691FF823840077498A /* QuartzCore.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; |
| | | 565AF96D1FF823980077498A /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 565AF9681FF8237A0077498A /* Metal.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; |
| | | 565AF96E1FF823980077498A /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 565AF9681FF8237A0077498A /* Metal.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; |
| | | 565AF96F1FF823990077498A /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 565AF9681FF8237A0077498A /* Metal.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; |
| | | 566CDE8F148F0AC200C5A9BB /* SDL_dropevents_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 566CDE8D148F0AC200C5A9BB /* SDL_dropevents_c.h */; }; |
| | | 566CDE90148F0AC200C5A9BB /* SDL_dropevents.c in Sources */ = {isa = PBXBuildFile; fileRef = 566CDE8E148F0AC200C5A9BB /* SDL_dropevents.c */; }; |
| | | 567E2F1C17C44BB2005F1892 /* SDL_sysfilesystem.m in Sources */ = {isa = PBXBuildFile; fileRef = 567E2F1B17C44BB2005F1892 /* SDL_sysfilesystem.m */; }; |
| | |
| | | 5C2EF6FE1FC9EE65003F5197 /* SDL_egl.c in Sources */ = {isa = PBXBuildFile; fileRef = 5C2EF6F51FC9EE35003F5197 /* SDL_egl.c */; }; |
| | | 5C2EF6FF1FC9EE65003F5197 /* SDL_rect_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C2EF6F41FC9EE34003F5197 /* SDL_rect_c.h */; }; |
| | | 5C2EF7011FC9EF10003F5197 /* SDL_egl.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C2EF7001FC9EF0F003F5197 /* SDL_egl.h */; }; |
| | | A704170920F09A9800A82227 /* hid.c in Sources */ = {isa = PBXBuildFile; fileRef = A704170820F09A9800A82227 /* hid.c */; }; |
| | | A704170A20F09A9800A82227 /* hid.c in Sources */ = {isa = PBXBuildFile; fileRef = A704170820F09A9800A82227 /* hid.c */; }; |
| | | A704170B20F09A9800A82227 /* hid.c in Sources */ = {isa = PBXBuildFile; fileRef = A704170820F09A9800A82227 /* hid.c */; }; |
| | | A704171420F09AC900A82227 /* SDL_hidapijoystick.c in Sources */ = {isa = PBXBuildFile; fileRef = A704170D20F09AC800A82227 /* SDL_hidapijoystick.c */; }; |
| | | A704171520F09AC900A82227 /* SDL_hidapijoystick.c in Sources */ = {isa = PBXBuildFile; fileRef = A704170D20F09AC800A82227 /* SDL_hidapijoystick.c */; }; |
| | | A704171620F09AC900A82227 /* SDL_hidapijoystick.c in Sources */ = {isa = PBXBuildFile; fileRef = A704170D20F09AC800A82227 /* SDL_hidapijoystick.c */; }; |
| | | A704171720F09AC900A82227 /* SDL_hidapijoystick_c.h in Headers */ = {isa = PBXBuildFile; fileRef = A704170E20F09AC800A82227 /* SDL_hidapijoystick_c.h */; }; |
| | | A704171820F09AC900A82227 /* SDL_hidapijoystick_c.h in Headers */ = {isa = PBXBuildFile; fileRef = A704170E20F09AC800A82227 /* SDL_hidapijoystick_c.h */; }; |
| | | A704171920F09AC900A82227 /* SDL_hidapijoystick_c.h in Headers */ = {isa = PBXBuildFile; fileRef = A704170E20F09AC800A82227 /* SDL_hidapijoystick_c.h */; }; |
| | | A704171A20F09AC900A82227 /* SDL_hidapi_switch.c in Sources */ = {isa = PBXBuildFile; fileRef = A704170F20F09AC800A82227 /* SDL_hidapi_switch.c */; }; |
| | | A704171B20F09AC900A82227 /* SDL_hidapi_switch.c in Sources */ = {isa = PBXBuildFile; fileRef = A704170F20F09AC800A82227 /* SDL_hidapi_switch.c */; }; |
| | | A704171C20F09AC900A82227 /* SDL_hidapi_switch.c in Sources */ = {isa = PBXBuildFile; fileRef = A704170F20F09AC800A82227 /* SDL_hidapi_switch.c */; }; |
| | | A704171D20F09AC900A82227 /* controller_type.h in Headers */ = {isa = PBXBuildFile; fileRef = A704171020F09AC900A82227 /* controller_type.h */; }; |
| | | A704171E20F09AC900A82227 /* controller_type.h in Headers */ = {isa = PBXBuildFile; fileRef = A704171020F09AC900A82227 /* controller_type.h */; }; |
| | | A704171F20F09AC900A82227 /* controller_type.h in Headers */ = {isa = PBXBuildFile; fileRef = A704171020F09AC900A82227 /* controller_type.h */; }; |
| | | A704172020F09AC900A82227 /* SDL_hidapi_ps4.c in Sources */ = {isa = PBXBuildFile; fileRef = A704171120F09AC900A82227 /* SDL_hidapi_ps4.c */; }; |
| | | A704172120F09AC900A82227 /* SDL_hidapi_ps4.c in Sources */ = {isa = PBXBuildFile; fileRef = A704171120F09AC900A82227 /* SDL_hidapi_ps4.c */; }; |
| | | A704172220F09AC900A82227 /* SDL_hidapi_ps4.c in Sources */ = {isa = PBXBuildFile; fileRef = A704171120F09AC900A82227 /* SDL_hidapi_ps4.c */; }; |
| | | A704172320F09AC900A82227 /* SDL_hidapi_xboxone.c in Sources */ = {isa = PBXBuildFile; fileRef = A704171220F09AC900A82227 /* SDL_hidapi_xboxone.c */; }; |
| | | A704172420F09AC900A82227 /* SDL_hidapi_xboxone.c in Sources */ = {isa = PBXBuildFile; fileRef = A704171220F09AC900A82227 /* SDL_hidapi_xboxone.c */; }; |
| | | A704172520F09AC900A82227 /* SDL_hidapi_xboxone.c in Sources */ = {isa = PBXBuildFile; fileRef = A704171220F09AC900A82227 /* SDL_hidapi_xboxone.c */; }; |
| | | A704172620F09AC900A82227 /* SDL_hidapi_xbox360.c in Sources */ = {isa = PBXBuildFile; fileRef = A704171320F09AC900A82227 /* SDL_hidapi_xbox360.c */; }; |
| | | A704172720F09AC900A82227 /* SDL_hidapi_xbox360.c in Sources */ = {isa = PBXBuildFile; fileRef = A704171320F09AC900A82227 /* SDL_hidapi_xbox360.c */; }; |
| | | A704172820F09AC900A82227 /* SDL_hidapi_xbox360.c in Sources */ = {isa = PBXBuildFile; fileRef = A704171320F09AC900A82227 /* SDL_hidapi_xbox360.c */; }; |
| | | A7381E961D8B69D600B177DD /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A7381E951D8B69D600B177DD /* CoreAudio.framework */; }; |
| | | A7381E971D8B6A0300B177DD /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A7381E931D8B69C300B177DD /* AudioToolbox.framework */; }; |
| | | A77E6EB4167AB0A90010E40B /* SDL_gamecontroller.h in Headers */ = {isa = PBXBuildFile; fileRef = A77E6EB3167AB0A90010E40B /* SDL_gamecontroller.h */; settings = {ATTRIBUTES = (Public, ); }; }; |
| | |
| | | DB31407217554B71006C0E22 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 007317C10858E15000B2BC32 /* Carbon.framework */; }; |
| | | DB31408B17554D37006C0E22 /* ForceFeedback.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00CFA89C106B4BA100758660 /* ForceFeedback.framework */; }; |
| | | DB31408D17554D3C006C0E22 /* ForceFeedback.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00CFA89C106B4BA100758660 /* ForceFeedback.framework */; }; |
| | | F30D9C84212BC94F0047DF2E /* SDL_sensor_c.h in Headers */ = {isa = PBXBuildFile; fileRef = F30D9C81212BC94E0047DF2E /* SDL_sensor_c.h */; }; |
| | | F30D9C85212BC94F0047DF2E /* SDL_sensor_c.h in Headers */ = {isa = PBXBuildFile; fileRef = F30D9C81212BC94E0047DF2E /* SDL_sensor_c.h */; }; |
| | | F30D9C86212BC94F0047DF2E /* SDL_sensor_c.h in Headers */ = {isa = PBXBuildFile; fileRef = F30D9C81212BC94E0047DF2E /* SDL_sensor_c.h */; }; |
| | | F30D9C87212BC94F0047DF2E /* SDL_syssensor.h in Headers */ = {isa = PBXBuildFile; fileRef = F30D9C82212BC94F0047DF2E /* SDL_syssensor.h */; }; |
| | | F30D9C88212BC94F0047DF2E /* SDL_syssensor.h in Headers */ = {isa = PBXBuildFile; fileRef = F30D9C82212BC94F0047DF2E /* SDL_syssensor.h */; }; |
| | | F30D9C89212BC94F0047DF2E /* SDL_syssensor.h in Headers */ = {isa = PBXBuildFile; fileRef = F30D9C82212BC94F0047DF2E /* SDL_syssensor.h */; }; |
| | | F30D9C8A212BC94F0047DF2E /* SDL_sensor.c in Sources */ = {isa = PBXBuildFile; fileRef = F30D9C83212BC94F0047DF2E /* SDL_sensor.c */; }; |
| | | F30D9C8B212BC94F0047DF2E /* SDL_sensor.c in Sources */ = {isa = PBXBuildFile; fileRef = F30D9C83212BC94F0047DF2E /* SDL_sensor.c */; }; |
| | | F30D9C8C212BC94F0047DF2E /* SDL_sensor.c in Sources */ = {isa = PBXBuildFile; fileRef = F30D9C83212BC94F0047DF2E /* SDL_sensor.c */; }; |
| | | F30D9C90212CABDC0047DF2E /* SDL_dummysensor.h in Headers */ = {isa = PBXBuildFile; fileRef = F30D9C8E212CABDB0047DF2E /* SDL_dummysensor.h */; }; |
| | | F30D9C91212CABDC0047DF2E /* SDL_dummysensor.h in Headers */ = {isa = PBXBuildFile; fileRef = F30D9C8E212CABDB0047DF2E /* SDL_dummysensor.h */; }; |
| | | F30D9C92212CABDC0047DF2E /* SDL_dummysensor.h in Headers */ = {isa = PBXBuildFile; fileRef = F30D9C8E212CABDB0047DF2E /* SDL_dummysensor.h */; }; |
| | | F30D9C93212CABDC0047DF2E /* SDL_dummysensor.c in Sources */ = {isa = PBXBuildFile; fileRef = F30D9C8F212CABDB0047DF2E /* SDL_dummysensor.c */; }; |
| | | F30D9C94212CABDC0047DF2E /* SDL_dummysensor.c in Sources */ = {isa = PBXBuildFile; fileRef = F30D9C8F212CABDB0047DF2E /* SDL_dummysensor.c */; }; |
| | | F30D9C95212CABDC0047DF2E /* SDL_dummysensor.c in Sources */ = {isa = PBXBuildFile; fileRef = F30D9C8F212CABDB0047DF2E /* SDL_dummysensor.c */; }; |
| | | F30D9CCD212EB4810047DF2E /* SDL_displayevents_c.h in Headers */ = {isa = PBXBuildFile; fileRef = F30D9CCB212EB4810047DF2E /* SDL_displayevents_c.h */; }; |
| | | F30D9CCE212EB4810047DF2E /* SDL_displayevents_c.h in Headers */ = {isa = PBXBuildFile; fileRef = F30D9CCB212EB4810047DF2E /* SDL_displayevents_c.h */; }; |
| | | F30D9CCF212EB4810047DF2E /* SDL_displayevents_c.h in Headers */ = {isa = PBXBuildFile; fileRef = F30D9CCB212EB4810047DF2E /* SDL_displayevents_c.h */; }; |
| | | F30D9CD0212EB4810047DF2E /* SDL_displayevents.c in Sources */ = {isa = PBXBuildFile; fileRef = F30D9CCC212EB4810047DF2E /* SDL_displayevents.c */; }; |
| | | F30D9CD1212EB4810047DF2E /* SDL_displayevents.c in Sources */ = {isa = PBXBuildFile; fileRef = F30D9CCC212EB4810047DF2E /* SDL_displayevents.c */; }; |
| | | F30D9CD2212EB4810047DF2E /* SDL_displayevents.c in Sources */ = {isa = PBXBuildFile; fileRef = F30D9CCC212EB4810047DF2E /* SDL_displayevents.c */; }; |
| | | F3950CD8212BC88D00F51292 /* SDL_sensor.h in Headers */ = {isa = PBXBuildFile; fileRef = F3950CD7212BC88D00F51292 /* SDL_sensor.h */; settings = {ATTRIBUTES = (Public, ); }; }; |
| | | F3950CD9212BC88D00F51292 /* SDL_sensor.h in Headers */ = {isa = PBXBuildFile; fileRef = F3950CD7212BC88D00F51292 /* SDL_sensor.h */; settings = {ATTRIBUTES = (Public, ); }; }; |
| | | F3950CDA212BC88D00F51292 /* SDL_sensor.h in Headers */ = {isa = PBXBuildFile; fileRef = F3950CD7212BC88D00F51292 /* SDL_sensor.h */; settings = {ATTRIBUTES = (Public, ); }; }; |
| | | FA73671D19A540EF004122E4 /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA73671C19A540EF004122E4 /* CoreVideo.framework */; }; |
| | | FA73671E19A54140004122E4 /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA73671C19A540EF004122E4 /* CoreVideo.framework */; }; |
| | | FA73671F19A54144004122E4 /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA73671C19A540EF004122E4 /* CoreVideo.framework */; }; |
| | |
| | | /* End PBXContainerItemProxy section */ |
| | | |
| | | /* Begin PBXFileReference section */ |
| | | 0073179D0858DECD00B2BC32 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; }; |
| | | 0073179F0858DECD00B2BC32 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = /System/Library/Frameworks/IOKit.framework; sourceTree = "<absolute>"; }; |
| | | 007317C10858E15000B2BC32 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = "<absolute>"; }; |
| | | 0073179D0858DECD00B2BC32 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; |
| | | 0073179F0858DECD00B2BC32 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; }; |
| | | 007317C10858E15000B2BC32 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = System/Library/Frameworks/Carbon.framework; sourceTree = SDKROOT; }; |
| | | 00794D3F09D0C461003FC8A1 /* License.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = License.txt; sourceTree = "<group>"; }; |
| | | 00CFA89C106B4BA100758660 /* ForceFeedback.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ForceFeedback.framework; path = /System/Library/Frameworks/ForceFeedback.framework; sourceTree = "<absolute>"; }; |
| | | 00D0D08310675DD9004B05EF /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = "<absolute>"; }; |
| | | 00CFA89C106B4BA100758660 /* ForceFeedback.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ForceFeedback.framework; path = System/Library/Frameworks/ForceFeedback.framework; sourceTree = SDKROOT; }; |
| | | 00D0D08310675DD9004B05EF /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = System/Library/Frameworks/CoreFoundation.framework; sourceTree = SDKROOT; }; |
| | | 04043BBA12FEB1BE0076DB1F /* SDL_glfuncs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_glfuncs.h; sourceTree = "<group>"; }; |
| | | 041B2C9E12FA0D680087D585 /* SDL_render.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_render.c; sourceTree = "<group>"; }; |
| | | 041B2C9F12FA0D680087D585 /* SDL_sysrender.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_sysrender.h; sourceTree = "<group>"; }; |
| | |
| | | 0442EC1B12FE1BCB004C9285 /* SDL_render_sw.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_render_sw.c; sourceTree = "<group>"; }; |
| | | 0442EC5812FE1C60004C9285 /* SDL_x11framebuffer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_x11framebuffer.c; sourceTree = "<group>"; }; |
| | | 0442EC5912FE1C60004C9285 /* SDL_x11framebuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_x11framebuffer.h; sourceTree = "<group>"; }; |
| | | 0442EC5E12FE1C75004C9285 /* SDL_hints.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_hints.c; path = ../../src/SDL_hints.c; sourceTree = SOURCE_ROOT; }; |
| | | 04BAC0C71300C2160055DE28 /* SDL_log.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_log.c; path = ../../src/SDL_log.c; sourceTree = SOURCE_ROOT; }; |
| | | 0442EC5E12FE1C75004C9285 /* SDL_hints.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_hints.c; sourceTree = "<group>"; }; |
| | | 04BAC0C71300C2160055DE28 /* SDL_log.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_log.c; sourceTree = "<group>"; }; |
| | | 04BDFD7412E6671700899322 /* SDL_atomic.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_atomic.c; sourceTree = "<group>"; }; |
| | | 04BDFD7512E6671700899322 /* SDL_spinlock.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_spinlock.c; sourceTree = "<group>"; }; |
| | | 04BDFD8812E6671700899322 /* SDL_diskaudio.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_diskaudio.c; sourceTree = "<group>"; }; |
| | |
| | | 04BDFE3312E6671700899322 /* SDL_sysloadso.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_sysloadso.c; sourceTree = "<group>"; }; |
| | | 04BDFE4B12E6671700899322 /* SDL_syspower.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_syspower.c; sourceTree = "<group>"; }; |
| | | 04BDFE4E12E6671700899322 /* SDL_power.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_power.c; sourceTree = "<group>"; }; |
| | | 04BDFE5512E6671700899322 /* SDL_assert_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_assert_c.h; path = ../../src/SDL_assert_c.h; sourceTree = SOURCE_ROOT; }; |
| | | 04BDFE5612E6671700899322 /* SDL_assert.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_assert.c; path = ../../src/SDL_assert.c; sourceTree = SOURCE_ROOT; }; |
| | | 04BDFE5812E6671700899322 /* SDL_error_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_error_c.h; path = ../../src/SDL_error_c.h; sourceTree = SOURCE_ROOT; }; |
| | | 04BDFE5912E6671700899322 /* SDL_error.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_error.c; path = ../../src/SDL_error.c; sourceTree = SOURCE_ROOT; }; |
| | | 04BDFE5C12E6671700899322 /* SDL.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL.c; path = ../../src/SDL.c; sourceTree = SOURCE_ROOT; }; |
| | | 04BDFE5512E6671700899322 /* SDL_assert_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_assert_c.h; sourceTree = "<group>"; }; |
| | | 04BDFE5612E6671700899322 /* SDL_assert.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_assert.c; sourceTree = "<group>"; }; |
| | | 04BDFE5812E6671700899322 /* SDL_error_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_error_c.h; sourceTree = "<group>"; }; |
| | | 04BDFE5912E6671700899322 /* SDL_error.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_error.c; sourceTree = "<group>"; }; |
| | | 04BDFE5C12E6671700899322 /* SDL.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL.c; sourceTree = "<group>"; }; |
| | | 04BDFE5E12E6671700899322 /* SDL_getenv.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_getenv.c; sourceTree = "<group>"; }; |
| | | 04BDFE5F12E6671700899322 /* SDL_iconv.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_iconv.c; sourceTree = "<group>"; }; |
| | | 04BDFE6012E6671700899322 /* SDL_malloc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_malloc.c; sourceTree = "<group>"; }; |
| | |
| | | 4D1664521EDD60AD003DE88E /* SDL_cocoavulkan.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDL_cocoavulkan.m; sourceTree = "<group>"; }; |
| | | 4D4820431F0F10B400EDC31C /* SDL_vulkan.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDL_vulkan.h; sourceTree = "<group>"; }; |
| | | 4D7517281EE2562B00820EEA /* SDL_cocoametalview.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_cocoametalview.h; sourceTree = "<group>"; }; |
| | | 56115BB91DF72C6D00F47E1E /* SDL_dataqueue.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_dataqueue.c; path = ../../src/SDL_dataqueue.c; sourceTree = "<group>"; }; |
| | | 56115BBA1DF72C6D00F47E1E /* SDL_dataqueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_dataqueue.h; path = ../../src/SDL_dataqueue.h; sourceTree = "<group>"; }; |
| | | 56115BB91DF72C6D00F47E1E /* SDL_dataqueue.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_dataqueue.c; sourceTree = "<group>"; }; |
| | | 56115BBA1DF72C6D00F47E1E /* SDL_dataqueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_dataqueue.h; sourceTree = "<group>"; }; |
| | | 564624351FF821B80074AC87 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; |
| | | 564624371FF821CB0074AC87 /* Metal.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Metal.framework; path = System/Library/Frameworks/Metal.framework; sourceTree = SDKROOT; }; |
| | | 565AF9681FF8237A0077498A /* Metal.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Metal.framework; sourceTree = "<group>"; }; |
| | | 565AF9691FF823840077498A /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/QuartzCore.framework; sourceTree = DEVELOPER_DIR; }; |
| | | 566CDE8D148F0AC200C5A9BB /* SDL_dropevents_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_dropevents_c.h; sourceTree = "<group>"; }; |
| | | 566CDE8E148F0AC200C5A9BB /* SDL_dropevents.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_dropevents.c; sourceTree = "<group>"; }; |
| | | 567E2F1B17C44BB2005F1892 /* SDL_sysfilesystem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SDL_sysfilesystem.m; path = ../../src/filesystem/cocoa/SDL_sysfilesystem.m; sourceTree = "<group>"; }; |
| | | 567E2F1B17C44BB2005F1892 /* SDL_sysfilesystem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SDL_sysfilesystem.m; path = cocoa/SDL_sysfilesystem.m; sourceTree = "<group>"; }; |
| | | 567E2F2017C44C35005F1892 /* SDL_filesystem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_filesystem.h; sourceTree = "<group>"; }; |
| | | 56A670081856545C0007D20F /* SDL_internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_internal.h; path = ../../src/SDL_internal.h; sourceTree = "<group>"; }; |
| | | 56A6701D185654B40007D20F /* SDL_dynapi_procs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_dynapi_procs.h; path = ../../src/dynapi/SDL_dynapi_procs.h; sourceTree = "<group>"; }; |
| | | 56A6701E185654B40007D20F /* SDL_dynapi.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_dynapi.c; path = ../../src/dynapi/SDL_dynapi.c; sourceTree = "<group>"; }; |
| | | 56A6701F185654B40007D20F /* SDL_dynapi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_dynapi.h; path = ../../src/dynapi/SDL_dynapi.h; sourceTree = "<group>"; }; |
| | | 56A67020185654B40007D20F /* SDL_dynapi_overrides.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_dynapi_overrides.h; path = ../../src/dynapi/SDL_dynapi_overrides.h; sourceTree = "<group>"; }; |
| | | 56A670081856545C0007D20F /* SDL_internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_internal.h; sourceTree = "<group>"; }; |
| | | 56A6701D185654B40007D20F /* SDL_dynapi_procs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_dynapi_procs.h; sourceTree = "<group>"; }; |
| | | 56A6701E185654B40007D20F /* SDL_dynapi.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_dynapi.c; sourceTree = "<group>"; }; |
| | | 56A6701F185654B40007D20F /* SDL_dynapi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_dynapi.h; sourceTree = "<group>"; }; |
| | | 56A67020185654B40007D20F /* SDL_dynapi_overrides.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_dynapi_overrides.h; sourceTree = "<group>"; }; |
| | | 5C2EF69B1FC987C6003F5197 /* SDL_gles2funcs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_gles2funcs.h; sourceTree = "<group>"; }; |
| | | 5C2EF69C1FC987C6003F5197 /* SDL_render_gles2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_render_gles2.c; sourceTree = "<group>"; }; |
| | | 5C2EF69D1FC987C6003F5197 /* SDL_shaders_gles2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_shaders_gles2.h; sourceTree = "<group>"; }; |
| | |
| | | 5C2EF6F51FC9EE35003F5197 /* SDL_egl.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_egl.c; sourceTree = "<group>"; }; |
| | | 5C2EF6F61FC9EE35003F5197 /* SDL_egl_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_egl_c.h; sourceTree = "<group>"; }; |
| | | 5C2EF7001FC9EF0F003F5197 /* SDL_egl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_egl.h; sourceTree = "<group>"; }; |
| | | A704170820F09A9800A82227 /* hid.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = hid.c; sourceTree = "<group>"; }; |
| | | A704170D20F09AC800A82227 /* SDL_hidapijoystick.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_hidapijoystick.c; sourceTree = "<group>"; }; |
| | | A704170E20F09AC800A82227 /* SDL_hidapijoystick_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_hidapijoystick_c.h; sourceTree = "<group>"; }; |
| | | A704170F20F09AC800A82227 /* SDL_hidapi_switch.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_hidapi_switch.c; sourceTree = "<group>"; }; |
| | | A704171020F09AC900A82227 /* controller_type.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = controller_type.h; sourceTree = "<group>"; }; |
| | | A704171120F09AC900A82227 /* SDL_hidapi_ps4.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_hidapi_ps4.c; sourceTree = "<group>"; }; |
| | | A704171220F09AC900A82227 /* SDL_hidapi_xboxone.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_hidapi_xboxone.c; sourceTree = "<group>"; }; |
| | | A704171320F09AC900A82227 /* SDL_hidapi_xbox360.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_hidapi_xbox360.c; sourceTree = "<group>"; }; |
| | | A7381E931D8B69C300B177DD /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; |
| | | A7381E951D8B69D600B177DD /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; }; |
| | | A77E6EB3167AB0A90010E40B /* SDL_gamecontroller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_gamecontroller.h; sourceTree = "<group>"; }; |
| | |
| | | D55A1B80179F262300625D7C /* SDL_cocoamousetap.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDL_cocoamousetap.m; sourceTree = "<group>"; }; |
| | | DB31407717554B71006C0E22 /* libSDL2.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libSDL2.dylib; sourceTree = BUILT_PRODUCTS_DIR; }; |
| | | DB89958518A1A5C50092407C /* SDL_syshaptic_c.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDL_syshaptic_c.h; sourceTree = "<group>"; }; |
| | | F30D9C81212BC94E0047DF2E /* SDL_sensor_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_sensor_c.h; sourceTree = "<group>"; }; |
| | | F30D9C82212BC94F0047DF2E /* SDL_syssensor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_syssensor.h; sourceTree = "<group>"; }; |
| | | F30D9C83212BC94F0047DF2E /* SDL_sensor.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_sensor.c; sourceTree = "<group>"; }; |
| | | F30D9C8E212CABDB0047DF2E /* SDL_dummysensor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_dummysensor.h; sourceTree = "<group>"; }; |
| | | F30D9C8F212CABDB0047DF2E /* SDL_dummysensor.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_dummysensor.c; sourceTree = "<group>"; }; |
| | | F30D9CCB212EB4810047DF2E /* SDL_displayevents_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_displayevents_c.h; sourceTree = "<group>"; }; |
| | | F30D9CCC212EB4810047DF2E /* SDL_displayevents.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_displayevents.c; sourceTree = "<group>"; }; |
| | | F3950CD7212BC88D00F51292 /* SDL_sensor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_sensor.h; sourceTree = "<group>"; }; |
| | | F59C710300D5CB5801000001 /* ReadMe.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = ReadMe.txt; sourceTree = "<group>"; }; |
| | | F59C710600D5CB5801000001 /* SDL.info */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = SDL.info; sourceTree = "<group>"; }; |
| | | F5A2EF3900C6A39A01000001 /* BUGS.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = BUGS.txt; path = ../../BUGS.txt; sourceTree = SOURCE_ROOT; }; |
| | | FA73671C19A540EF004122E4 /* CoreVideo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreVideo.framework; path = /System/Library/Frameworks/CoreVideo.framework; sourceTree = "<absolute>"; }; |
| | | FA73671C19A540EF004122E4 /* CoreVideo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreVideo.framework; path = System/Library/Frameworks/CoreVideo.framework; sourceTree = SDKROOT; }; |
| | | FABA34C61D8B5DB100915323 /* SDL_coreaudio.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDL_coreaudio.m; sourceTree = "<group>"; }; |
| | | /* End PBXFileReference section */ |
| | | |
| | |
| | | 564624381FF821DA0074AC87 /* Metal.framework in Frameworks */, |
| | | 564624361FF821C20074AC87 /* QuartzCore.framework in Frameworks */, |
| | | A7381E971D8B6A0300B177DD /* AudioToolbox.framework in Frameworks */, |
| | | 565AF96A1FF8238D0077498A /* QuartzCore.framework in Frameworks */, |
| | | 00D0D0D810675E46004B05EF /* Carbon.framework in Frameworks */, |
| | | 007317A40858DECD00B2BC32 /* Cocoa.framework in Frameworks */, |
| | | A7381E961D8B69D600B177DD /* CoreAudio.framework in Frameworks */, |
| | | 00D0D08410675DD9004B05EF /* CoreFoundation.framework in Frameworks */, |
| | | FA73671D19A540EF004122E4 /* CoreVideo.framework in Frameworks */, |
| | | 00CFA89D106B4BA100758660 /* ForceFeedback.framework in Frameworks */, |
| | | 565AF96D1FF823980077498A /* Metal.framework in Frameworks */, |
| | | 007317A60858DECD00B2BC32 /* IOKit.framework in Frameworks */, |
| | | ); |
| | | runOnlyForDeploymentPostprocessing = 0; |
| | |
| | | 5646243A1FF821FF0074AC87 /* Metal.framework in Frameworks */, |
| | | 564624391FF821EF0074AC87 /* QuartzCore.framework in Frameworks */, |
| | | 56C5237E1D8F4985001F2F30 /* CoreAudio.framework in Frameworks */, |
| | | 565AF96B1FF8238E0077498A /* QuartzCore.framework in Frameworks */, |
| | | FA73671E19A54140004122E4 /* CoreVideo.framework in Frameworks */, |
| | | 007317AB0858DECD00B2BC32 /* Cocoa.framework in Frameworks */, |
| | | 007317AD0858DECD00B2BC32 /* IOKit.framework in Frameworks */, |
| | | 56C523801D8F498B001F2F30 /* CoreFoundation.framework in Frameworks */, |
| | | 007317C30858E15000B2BC32 /* Carbon.framework in Frameworks */, |
| | | DB31408B17554D37006C0E22 /* ForceFeedback.framework in Frameworks */, |
| | | 565AF96E1FF823980077498A /* Metal.framework in Frameworks */, |
| | | 562C4AE91D8F496200AF9EBE /* AudioToolbox.framework in Frameworks */, |
| | | ); |
| | | runOnlyForDeploymentPostprocessing = 0; |
| | |
| | | 5646243C1FF822170074AC87 /* Metal.framework in Frameworks */, |
| | | 5646243B1FF822100074AC87 /* QuartzCore.framework in Frameworks */, |
| | | 56C5237F1D8F4985001F2F30 /* CoreAudio.framework in Frameworks */, |
| | | 565AF96C1FF8238E0077498A /* QuartzCore.framework in Frameworks */, |
| | | FA73671F19A54144004122E4 /* CoreVideo.framework in Frameworks */, |
| | | DB31406E17554B71006C0E22 /* Cocoa.framework in Frameworks */, |
| | | DB31407017554B71006C0E22 /* IOKit.framework in Frameworks */, |
| | | 56C523811D8F498C001F2F30 /* CoreFoundation.framework in Frameworks */, |
| | | DB31407217554B71006C0E22 /* Carbon.framework in Frameworks */, |
| | | DB31408D17554D3C006C0E22 /* ForceFeedback.framework in Frameworks */, |
| | | 565AF96F1FF823990077498A /* Metal.framework in Frameworks */, |
| | | 562C4AEA1D8F496300AF9EBE /* AudioToolbox.framework in Frameworks */, |
| | | ); |
| | | runOnlyForDeploymentPostprocessing = 0; |
| | |
| | | AA7557EB1595D4D800BBD41B /* SDL_revision.h */, |
| | | AA7557EC1595D4D800BBD41B /* SDL_rwops.h */, |
| | | AA7557ED1595D4D800BBD41B /* SDL_scancode.h */, |
| | | F3950CD7212BC88D00F51292 /* SDL_sensor.h */, |
| | | AA7557EE1595D4D800BBD41B /* SDL_shape.h */, |
| | | AA7557EF1595D4D800BBD41B /* SDL_stdinc.h */, |
| | | AA7557F01595D4D800BBD41B /* SDL_surface.h */, |
| | |
| | | 034768DDFF38A45A11DB9C8B /* Products */ = { |
| | | isa = PBXGroup; |
| | | children = ( |
| | | 089C1665FE841158C02AAC07 /* Resources */, |
| | | BECDF66C0761BA81005FE872 /* SDL2.framework */, |
| | | BECDF6B30761BA81005FE872 /* libSDL2.a */, |
| | | BECDF6BE0761BA81005FE872 /* Standard DMG */, |
| | |
| | | 04409B8F12FA97ED00FB9AA8 /* SDL_yuv_sw_c.h */, |
| | | 04409B9012FA97ED00FB9AA8 /* SDL_yuv_sw.c */, |
| | | ); |
| | | name = render; |
| | | path = ../../src/render; |
| | | sourceTree = SOURCE_ROOT; |
| | | path = render; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | 041B2C9A12FA0D680087D585 /* opengl */ = { |
| | | isa = PBXGroup; |
| | |
| | | 04BDFD7412E6671700899322 /* SDL_atomic.c */, |
| | | 04BDFD7512E6671700899322 /* SDL_spinlock.c */, |
| | | ); |
| | | name = atomic; |
| | | path = ../../src/atomic; |
| | | sourceTree = SOURCE_ROOT; |
| | | path = atomic; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | 04BDFD7612E6671700899322 /* audio */ = { |
| | | isa = PBXGroup; |
| | |
| | | 04BDFDC312E6671700899322 /* SDL_wave.c */, |
| | | 04BDFDC412E6671700899322 /* SDL_wave.h */, |
| | | ); |
| | | name = audio; |
| | | path = ../../src/audio; |
| | | sourceTree = SOURCE_ROOT; |
| | | path = audio; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | 04BDFD8712E6671700899322 /* disk */ = { |
| | | isa = PBXGroup; |
| | |
| | | children = ( |
| | | 04BDFDD412E6671700899322 /* SDL_cpuinfo.c */, |
| | | ); |
| | | name = cpuinfo; |
| | | path = ../../src/cpuinfo; |
| | | sourceTree = SOURCE_ROOT; |
| | | path = cpuinfo; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | 04BDFDD512E6671700899322 /* events */ = { |
| | | isa = PBXGroup; |
| | |
| | | 04BDFDD812E6671700899322 /* scancodes_darwin.h */, |
| | | 04BDFDD912E6671700899322 /* scancodes_linux.h */, |
| | | 04BDFDDB12E6671700899322 /* scancodes_xfree86.h */, |
| | | 04BDFDDC12E6671700899322 /* SDL_clipboardevents.c */, |
| | | 04BDFDDD12E6671700899322 /* SDL_clipboardevents_c.h */, |
| | | 04BDFDDC12E6671700899322 /* SDL_clipboardevents.c */, |
| | | F30D9CCB212EB4810047DF2E /* SDL_displayevents_c.h */, |
| | | F30D9CCC212EB4810047DF2E /* SDL_displayevents.c */, |
| | | 566CDE8D148F0AC200C5A9BB /* SDL_dropevents_c.h */, |
| | | 566CDE8E148F0AC200C5A9BB /* SDL_dropevents.c */, |
| | | 04BDFDDE12E6671700899322 /* SDL_events.c */, |
| | | 04BDFDDF12E6671700899322 /* SDL_events_c.h */, |
| | | 04BDFDE012E6671700899322 /* SDL_gesture.c */, |
| | | 04BDFDDE12E6671700899322 /* SDL_events.c */, |
| | | 04BDFDE112E6671700899322 /* SDL_gesture_c.h */, |
| | | 04BDFDE212E6671700899322 /* SDL_keyboard.c */, |
| | | 04BDFDE012E6671700899322 /* SDL_gesture.c */, |
| | | 04BDFDE312E6671700899322 /* SDL_keyboard_c.h */, |
| | | 04BDFDE412E6671700899322 /* SDL_mouse.c */, |
| | | 04BDFDE212E6671700899322 /* SDL_keyboard.c */, |
| | | 04BDFDE512E6671700899322 /* SDL_mouse_c.h */, |
| | | 04BDFDE412E6671700899322 /* SDL_mouse.c */, |
| | | 04BDFDE612E6671700899322 /* SDL_quit.c */, |
| | | 04BDFDE712E6671700899322 /* SDL_sysevents.h */, |
| | | 04BDFDE812E6671700899322 /* SDL_touch.c */, |
| | | 04BDFDE912E6671700899322 /* SDL_touch_c.h */, |
| | | 04BDFDEA12E6671700899322 /* SDL_windowevents.c */, |
| | | 04BDFDE812E6671700899322 /* SDL_touch.c */, |
| | | 04BDFDEB12E6671700899322 /* SDL_windowevents_c.h */, |
| | | 04BDFDEA12E6671700899322 /* SDL_windowevents.c */, |
| | | ); |
| | | name = events; |
| | | path = ../../src/events; |
| | | sourceTree = SOURCE_ROOT; |
| | | path = events; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | 04BDFDEC12E6671700899322 /* file */ = { |
| | | isa = PBXGroup; |
| | |
| | | 04BDFDED12E6671700899322 /* cocoa */, |
| | | 04BDFDF012E6671700899322 /* SDL_rwops.c */, |
| | | ); |
| | | name = file; |
| | | path = ../../src/file; |
| | | sourceTree = SOURCE_ROOT; |
| | | path = file; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | 04BDFDED12E6671700899322 /* cocoa */ = { |
| | | isa = PBXGroup; |
| | |
| | | 04BDFDFB12E6671700899322 /* SDL_haptic_c.h */, |
| | | 04BDFDFC12E6671700899322 /* SDL_syshaptic.h */, |
| | | ); |
| | | name = haptic; |
| | | path = ../../src/haptic; |
| | | sourceTree = SOURCE_ROOT; |
| | | path = haptic; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | 04BDFDF212E6671700899322 /* darwin */ = { |
| | | isa = PBXGroup; |
| | |
| | | 04BDFDFF12E6671700899322 /* joystick */ = { |
| | | isa = PBXGroup; |
| | | children = ( |
| | | A704170C20F09AA600A82227 /* hidapi */, |
| | | 04BDFE0612E6671700899322 /* darwin */, |
| | | 04BDFE1612E6671700899322 /* SDL_joystick.c */, |
| | | 04BDFE1712E6671700899322 /* SDL_joystick_c.h */, |
| | | BBFC088A164C6514003E6A99 /* SDL_gamecontroller.c */, |
| | | 04BDFE1812E6671700899322 /* SDL_sysjoystick.h */, |
| | | ); |
| | | name = joystick; |
| | | path = ../../src/joystick; |
| | | sourceTree = SOURCE_ROOT; |
| | | path = joystick; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | 04BDFE0612E6671700899322 /* darwin */ = { |
| | | isa = PBXGroup; |
| | |
| | | children = ( |
| | | 04BDFE3212E6671700899322 /* dlopen */, |
| | | ); |
| | | name = loadso; |
| | | path = ../../src/loadso; |
| | | sourceTree = SOURCE_ROOT; |
| | | path = loadso; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | 04BDFE3212E6671700899322 /* dlopen */ = { |
| | | isa = PBXGroup; |
| | |
| | | 04BDFE4A12E6671700899322 /* macosx */, |
| | | 04BDFE4E12E6671700899322 /* SDL_power.c */, |
| | | ); |
| | | name = power; |
| | | path = ../../src/power; |
| | | sourceTree = SOURCE_ROOT; |
| | | path = power; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | 04BDFE4A12E6671700899322 /* macosx */ = { |
| | | isa = PBXGroup; |
| | |
| | | 04BDFE6212E6671700899322 /* SDL_stdlib.c */, |
| | | 04BDFE6312E6671700899322 /* SDL_string.c */, |
| | | ); |
| | | name = stdlib; |
| | | path = ../../src/stdlib; |
| | | sourceTree = SOURCE_ROOT; |
| | | path = stdlib; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | 04BDFE6412E6671800899322 /* thread */ = { |
| | | isa = PBXGroup; |
| | |
| | | 04BDFE8C12E6671800899322 /* SDL_thread.c */, |
| | | 04BDFE8D12E6671800899322 /* SDL_thread_c.h */, |
| | | ); |
| | | name = thread; |
| | | path = ../../src/thread; |
| | | sourceTree = SOURCE_ROOT; |
| | | path = thread; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | 04BDFE7D12E6671800899322 /* pthread */ = { |
| | | isa = PBXGroup; |
| | |
| | | 04BDFE9F12E6671800899322 /* SDL_timer.c */, |
| | | 04BDFEA012E6671800899322 /* SDL_timer_c.h */, |
| | | ); |
| | | name = timer; |
| | | path = ../../src/timer; |
| | | sourceTree = SOURCE_ROOT; |
| | | path = timer; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | 04BDFEA112E6671800899322 /* unix */ = { |
| | | isa = PBXGroup; |
| | |
| | | AA9A7F141FB0209C00FED37F /* SDL_yuv_c.h */, |
| | | AA9A7F131FB0209C00FED37F /* SDL_yuv.c */, |
| | | ); |
| | | name = video; |
| | | path = ../../src/video; |
| | | sourceTree = SOURCE_ROOT; |
| | | path = video; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | 04BDFEC112E6671800899322 /* cocoa */ = { |
| | | isa = PBXGroup; |
| | |
| | | 08FB77ACFE841707C02AAC07 /* Library Source */, |
| | | 034768DDFF38A45A11DB9C8B /* Products */, |
| | | BECDF66B0761BA81005FE872 /* Info-Framework.plist */, |
| | | BEC562FE0761C0E800A33029 /* Linked Frameworks */, |
| | | 564624341FF821B70074AC87 /* Frameworks */, |
| | | ); |
| | | comments = "To build Universal Binaries, we have experimented with a variety of different options.\nThe complication is that we must retain compatibility with at least 10.2. \nThe Universal Binary defaults only work for > 10.3.9\n\nSo far, we have found:\ngcc 4.0.0 with Xcode 2.1 always links against libgcc_s. gcc 4.0.1 from Xcode 2.2 fixes this problem.\n\nBut gcc 4.0 will not work with < 10.3.9 because we continue to get an undefined symbol to _fprintf$LDBL128.\nSo we must use gcc 3.3 on PPC to accomplish 10.2 support. (But 4.0 is required for i386.)\n\nSetting the deployment target to 10.4 will disable prebinding, so for PPC, we set it less than 10.4 to preserve prebinding for legacy support.\n\nSetting the PPC SDKROOT to /Developers/SDKs/MacOSX10.2.8.sdk will link to 63.0.0 libSystem.B.dylib. Leaving it at current or 10.4u links to 88.1.2. However, as long as we are using gcc 3.3, it doesn't seem to matter as testing has demonstrated both will run. We have decided not to invoke the 10.2.8 SDK because it is not a default installed component with Xcode which will probably cause most people problems. However, rather than deleting the SDKROOT_ppc entry entirely, we have mapped it to 10.4u in case we decide we need to change this setting.\n\nTo use Altivec or SSE, we needed architecture specific flags:\nOTHER_CFLAGS_ppc\nOTHER_CFLAGS_i386\nOTHER_CFLAGS=$(OTHER_CFLAGS_($CURRENT_ARCH))\n\nThe general OTHER_CFLAGS needed to be manually mapped to architecture specific options because Xcode didn't do this automatically for us.\n\n\n"; |
| | |
| | | sourceTree = "<group>"; |
| | | tabWidth = 4; |
| | | usesTabs = 0; |
| | | }; |
| | | 089C1665FE841158C02AAC07 /* Resources */ = { |
| | | isa = PBXGroup; |
| | | children = ( |
| | | ); |
| | | name = Resources; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | 08FB77ACFE841707C02AAC07 /* Library Source */ = { |
| | | isa = PBXGroup; |
| | |
| | | 567E2F1F17C44BBB005F1892 /* filesystem */, |
| | | 04BDFDEC12E6671700899322 /* file */, |
| | | 04BDFDF112E6671700899322 /* haptic */, |
| | | A73EBCD520F099C10043B449 /* hidapi */, |
| | | 04BDFDFF12E6671700899322 /* joystick */, |
| | | 04BDFE2F12E6671700899322 /* loadso */, |
| | | 04BDFE4512E6671700899322 /* power */, |
| | | 041B2C9712FA0D680087D585 /* render */, |
| | | F3950CDB212BC8BC00F51292 /* sensor */, |
| | | 04BDFE5D12E6671700899322 /* stdlib */, |
| | | 04BDFE6412E6671800899322 /* thread */, |
| | | 04BDFE9512E6671800899322 /* timer */, |
| | |
| | | 04BDFE5C12E6671700899322 /* SDL.c */, |
| | | ); |
| | | name = "Library Source"; |
| | | path = ../../src; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | 564624341FF821B70074AC87 /* Frameworks */ = { |
| | | isa = PBXGroup; |
| | | children = ( |
| | | A7381E931D8B69C300B177DD /* AudioToolbox.framework */, |
| | | 007317C10858E15000B2BC32 /* Carbon.framework */, |
| | | 0073179D0858DECD00B2BC32 /* Cocoa.framework */, |
| | | A7381E951D8B69D600B177DD /* CoreAudio.framework */, |
| | | 00D0D08310675DD9004B05EF /* CoreFoundation.framework */, |
| | | FA73671C19A540EF004122E4 /* CoreVideo.framework */, |
| | | 00CFA89C106B4BA100758660 /* ForceFeedback.framework */, |
| | | 0073179F0858DECD00B2BC32 /* IOKit.framework */, |
| | | 564624371FF821CB0074AC87 /* Metal.framework */, |
| | | 564624351FF821B80074AC87 /* QuartzCore.framework */, |
| | | ); |
| | |
| | | children = ( |
| | | 567E2F1B17C44BB2005F1892 /* SDL_sysfilesystem.m */, |
| | | ); |
| | | name = filesystem; |
| | | path = filesystem; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | 56A6701C1856549B0007D20F /* dynapi */ = { |
| | |
| | | 56A6701F185654B40007D20F /* SDL_dynapi.h */, |
| | | 56A67020185654B40007D20F /* SDL_dynapi_overrides.h */, |
| | | ); |
| | | name = dynapi; |
| | | path = dynapi; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | 5C2EF6921FC986D8003F5197 /* opengles2 */ = { |
| | |
| | | path = opengles2; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | A704170720F09A6700A82227 /* mac */ = { |
| | | isa = PBXGroup; |
| | | children = ( |
| | | A704170820F09A9800A82227 /* hid.c */, |
| | | ); |
| | | path = mac; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | A704170C20F09AA600A82227 /* hidapi */ = { |
| | | isa = PBXGroup; |
| | | children = ( |
| | | A704171020F09AC900A82227 /* controller_type.h */, |
| | | A704171120F09AC900A82227 /* SDL_hidapi_ps4.c */, |
| | | A704170F20F09AC800A82227 /* SDL_hidapi_switch.c */, |
| | | A704171320F09AC900A82227 /* SDL_hidapi_xbox360.c */, |
| | | A704171220F09AC900A82227 /* SDL_hidapi_xboxone.c */, |
| | | A704170E20F09AC800A82227 /* SDL_hidapijoystick_c.h */, |
| | | A704170D20F09AC800A82227 /* SDL_hidapijoystick.c */, |
| | | ); |
| | | path = hidapi; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | A73EBCD520F099C10043B449 /* hidapi */ = { |
| | | isa = PBXGroup; |
| | | children = ( |
| | | A704170720F09A6700A82227 /* mac */, |
| | | ); |
| | | path = hidapi; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | AA9A7F0E1FB0200B00FED37F /* yuv2rgb */ = { |
| | | isa = PBXGroup; |
| | | children = ( |
| | | AA9A7F101FB0206300FED37F /* yuv_rgb.c */, |
| | | AA9A7F0F1FB0206300FED37F /* yuv_rgb.h */, |
| | | ); |
| | | name = yuv2rgb; |
| | | path = ../../src/video/yuv2rgb; |
| | | sourceTree = SOURCE_ROOT; |
| | | path = yuv2rgb; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | AADC5A401FDA030E00960936 /* metal */ = { |
| | | isa = PBXGroup; |
| | |
| | | path = metal; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | BEC562FE0761C0E800A33029 /* Linked Frameworks */ = { |
| | | F30D9C8D212CABB40047DF2E /* dummy */ = { |
| | | isa = PBXGroup; |
| | | children = ( |
| | | 565AF9691FF823840077498A /* QuartzCore.framework */, |
| | | 565AF9681FF8237A0077498A /* Metal.framework */, |
| | | A7381E931D8B69C300B177DD /* AudioToolbox.framework */, |
| | | 007317C10858E15000B2BC32 /* Carbon.framework */, |
| | | 0073179D0858DECD00B2BC32 /* Cocoa.framework */, |
| | | A7381E951D8B69D600B177DD /* CoreAudio.framework */, |
| | | 00D0D08310675DD9004B05EF /* CoreFoundation.framework */, |
| | | FA73671C19A540EF004122E4 /* CoreVideo.framework */, |
| | | 00CFA89C106B4BA100758660 /* ForceFeedback.framework */, |
| | | 0073179F0858DECD00B2BC32 /* IOKit.framework */, |
| | | F30D9C8F212CABDB0047DF2E /* SDL_dummysensor.c */, |
| | | F30D9C8E212CABDB0047DF2E /* SDL_dummysensor.h */, |
| | | ); |
| | | name = "Linked Frameworks"; |
| | | path = dummy; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | F3950CDB212BC8BC00F51292 /* sensor */ = { |
| | | isa = PBXGroup; |
| | | children = ( |
| | | F30D9C8D212CABB40047DF2E /* dummy */, |
| | | F30D9C81212BC94E0047DF2E /* SDL_sensor_c.h */, |
| | | F30D9C83212BC94F0047DF2E /* SDL_sensor.c */, |
| | | F30D9C82212BC94F0047DF2E /* SDL_syssensor.h */, |
| | | ); |
| | | name = sensor; |
| | | path = ../../src/sensor; |
| | | sourceTree = SOURCE_ROOT; |
| | | }; |
| | | F59C70FC00D5CB5801000001 /* pkg-support */ = { |
| | | isa = PBXGroup; |
| | |
| | | AA75585E1595D4D800BBD41B /* SDL.h in Headers */, |
| | | AA7557FE1595D4D800BBD41B /* SDL_assert.h in Headers */, |
| | | AA7558001595D4D800BBD41B /* SDL_atomic.h in Headers */, |
| | | F30D9C87212BC94F0047DF2E /* SDL_syssensor.h in Headers */, |
| | | AA7558021595D4D800BBD41B /* SDL_audio.h in Headers */, |
| | | AADA5B8716CCAB3000107CF7 /* SDL_bits.h in Headers */, |
| | | AA7558041595D4D800BBD41B /* SDL_blendmode.h in Headers */, |
| | |
| | | AA75581A1595D4D800BBD41B /* SDL_hints.h in Headers */, |
| | | AA75581E1595D4D800BBD41B /* SDL_joystick.h in Headers */, |
| | | AA7558201595D4D800BBD41B /* SDL_keyboard.h in Headers */, |
| | | F3950CD8212BC88D00F51292 /* SDL_sensor.h in Headers */, |
| | | AA7558221595D4D800BBD41B /* SDL_keycode.h in Headers */, |
| | | F30D9C84212BC94F0047DF2E /* SDL_sensor_c.h in Headers */, |
| | | AA7558241595D4D800BBD41B /* SDL_loadso.h in Headers */, |
| | | AA7558261595D4D800BBD41B /* SDL_log.h in Headers */, |
| | | 5C2EF6F91FC9EE35003F5197 /* SDL_egl_c.h in Headers */, |
| | |
| | | AA7558421595D4D800BBD41B /* SDL_revision.h in Headers */, |
| | | AA7558441595D4D800BBD41B /* SDL_rwops.h in Headers */, |
| | | AA7558461595D4D800BBD41B /* SDL_scancode.h in Headers */, |
| | | A704171720F09AC900A82227 /* SDL_hidapijoystick_c.h in Headers */, |
| | | AA7558481595D4D800BBD41B /* SDL_shape.h in Headers */, |
| | | AA75584A1595D4D800BBD41B /* SDL_stdinc.h in Headers */, |
| | | AA75584C1595D4D800BBD41B /* SDL_surface.h in Headers */, |
| | |
| | | 04BD019912E6671800899322 /* SDL_shape_internals.h in Headers */, |
| | | 04BD019C12E6671800899322 /* SDL_sysvideo.h in Headers */, |
| | | 04BD01DC12E6671800899322 /* imKStoUCS.h in Headers */, |
| | | F30D9CCD212EB4810047DF2E /* SDL_displayevents_c.h in Headers */, |
| | | 4D16644E1EDD6023003DE88E /* SDL_vulkan_internal.h in Headers */, |
| | | 04BD01DE12E6671800899322 /* SDL_x11clipboard.h in Headers */, |
| | | 04BD01E012E6671800899322 /* SDL_x11dyn.h in Headers */, |
| | |
| | | 04BD01F912E6671800899322 /* SDL_x11window.h in Headers */, |
| | | 041B2CA612FA0D680087D585 /* SDL_sysrender.h in Headers */, |
| | | AA9A7F161FB0209D00FED37F /* SDL_yuv_c.h in Headers */, |
| | | A704171D20F09AC900A82227 /* controller_type.h in Headers */, |
| | | 04409B9312FA97ED00FB9AA8 /* SDL_yuv_sw_c.h in Headers */, |
| | | 04F7803912FB748500FC43C0 /* SDL_nullframebuffer_c.h in Headers */, |
| | | 04F7804A12FB74A200FC43C0 /* SDL_blendfillrect.h in Headers */, |
| | |
| | | 04F7804E12FB74A200FC43C0 /* SDL_blendpoint.h in Headers */, |
| | | 56A67027185654B40007D20F /* SDL_dynapi.h in Headers */, |
| | | 04F7804F12FB74A200FC43C0 /* SDL_draw.h in Headers */, |
| | | F30D9C90212CABDC0047DF2E /* SDL_dummysensor.h in Headers */, |
| | | 04F7805112FB74A200FC43C0 /* SDL_drawline.h in Headers */, |
| | | 04F7805312FB74A200FC43C0 /* SDL_drawpoint.h in Headers */, |
| | | 0442EC1C12FE1BCB004C9285 /* SDL_render_sw_c.h in Headers */, |
| | |
| | | AA7558051595D4D800BBD41B /* SDL_blendmode.h in Headers */, |
| | | AA7558071595D4D800BBD41B /* SDL_clipboard.h in Headers */, |
| | | AA75580B1595D4D800BBD41B /* SDL_config.h in Headers */, |
| | | F30D9C85212BC94F0047DF2E /* SDL_sensor_c.h in Headers */, |
| | | AA7558091595D4D800BBD41B /* SDL_config_macosx.h in Headers */, |
| | | AA75580D1595D4D800BBD41B /* SDL_copying.h in Headers */, |
| | | AA75580F1595D4D800BBD41B /* SDL_cpuinfo.h in Headers */, |
| | |
| | | AA75581F1595D4D800BBD41B /* SDL_joystick.h in Headers */, |
| | | AA7558211595D4D800BBD41B /* SDL_keyboard.h in Headers */, |
| | | AA7558231595D4D800BBD41B /* SDL_keycode.h in Headers */, |
| | | A704171E20F09AC900A82227 /* controller_type.h in Headers */, |
| | | AA7558251595D4D800BBD41B /* SDL_loadso.h in Headers */, |
| | | AA7558271595D4D800BBD41B /* SDL_log.h in Headers */, |
| | | AA7558291595D4D800BBD41B /* SDL_main.h in Headers */, |
| | |
| | | AA7558491595D4D800BBD41B /* SDL_shape.h in Headers */, |
| | | 56F9D55E1DF73B7C00C15B5D /* SDL_dataqueue.h in Headers */, |
| | | 56A6702B185654B40007D20F /* SDL_dynapi_overrides.h in Headers */, |
| | | F30D9CCE212EB4810047DF2E /* SDL_displayevents_c.h in Headers */, |
| | | AA75584B1595D4D800BBD41B /* SDL_stdinc.h in Headers */, |
| | | AA75584D1595D4D800BBD41B /* SDL_surface.h in Headers */, |
| | | AA75584F1595D4D800BBD41B /* SDL_system.h in Headers */, |
| | | AA7558511595D4D800BBD41B /* SDL_syswm.h in Headers */, |
| | | AAC070FA195606770073DCDF /* SDL_opengl_glext.h in Headers */, |
| | | AA7558531595D4D800BBD41B /* SDL_thread.h in Headers */, |
| | | F30D9C88212BC94F0047DF2E /* SDL_syssensor.h in Headers */, |
| | | AA7558551595D4D800BBD41B /* SDL_timer.h in Headers */, |
| | | AA7558571595D4D800BBD41B /* SDL_touch.h in Headers */, |
| | | AA7558591595D4D800BBD41B /* SDL_types.h in Headers */, |
| | |
| | | 04BD027212E6671800899322 /* SDL_windowevents_c.h in Headers */, |
| | | 04BD027312E6671800899322 /* SDL_rwopsbundlesupport.h in Headers */, |
| | | 5C2EF6FC1FC9EE64003F5197 /* SDL_rect_c.h in Headers */, |
| | | F30D9C91212CABDC0047DF2E /* SDL_dummysensor.h in Headers */, |
| | | 04BD027B12E6671800899322 /* SDL_haptic_c.h in Headers */, |
| | | 04BD027C12E6671800899322 /* SDL_syshaptic.h in Headers */, |
| | | 04BD028212E6671800899322 /* SDL_sysjoystick_c.h in Headers */, |
| | | 04BD028C12E6671800899322 /* SDL_joystick_c.h in Headers */, |
| | | 04BD028D12E6671800899322 /* SDL_sysjoystick.h in Headers */, |
| | | F3950CD9212BC88D00F51292 /* SDL_sensor.h in Headers */, |
| | | 04BD02B512E6671800899322 /* SDL_assert_c.h in Headers */, |
| | | 04BD02B812E6671800899322 /* SDL_error_c.h in Headers */, |
| | | 04BD02D912E6671800899322 /* SDL_sysmutex_c.h in Headers */, |
| | | 04BD02DC12E6671800899322 /* SDL_systhread_c.h in Headers */, |
| | | 04BD02E312E6671800899322 /* SDL_systhread.h in Headers */, |
| | | 04BD02E512E6671800899322 /* SDL_thread_c.h in Headers */, |
| | | A704171820F09AC900A82227 /* SDL_hidapijoystick_c.h in Headers */, |
| | | 04BD02F212E6671800899322 /* SDL_timer_c.h in Headers */, |
| | | 04BD030D12E6671800899322 /* SDL_cocoaclipboard.h in Headers */, |
| | | 04BD030F12E6671800899322 /* SDL_cocoaevents.h in Headers */, |
| | |
| | | DB313FCD17554B71006C0E22 /* SDL_blendmode.h in Headers */, |
| | | DB313FCE17554B71006C0E22 /* SDL_clipboard.h in Headers */, |
| | | DB313FD017554B71006C0E22 /* SDL_config.h in Headers */, |
| | | F30D9C86212BC94F0047DF2E /* SDL_sensor_c.h in Headers */, |
| | | DB313FCF17554B71006C0E22 /* SDL_config_macosx.h in Headers */, |
| | | DB313FD117554B71006C0E22 /* SDL_copying.h in Headers */, |
| | | DB313FD217554B71006C0E22 /* SDL_cpuinfo.h in Headers */, |
| | |
| | | DB313FD917554B71006C0E22 /* SDL_joystick.h in Headers */, |
| | | DB313FDA17554B71006C0E22 /* SDL_keyboard.h in Headers */, |
| | | DB313FDB17554B71006C0E22 /* SDL_keycode.h in Headers */, |
| | | A704171F20F09AC900A82227 /* controller_type.h in Headers */, |
| | | DB313FDC17554B71006C0E22 /* SDL_loadso.h in Headers */, |
| | | DB313FDD17554B71006C0E22 /* SDL_log.h in Headers */, |
| | | DB313FDE17554B71006C0E22 /* SDL_main.h in Headers */, |
| | |
| | | DB313FEE17554B71006C0E22 /* SDL_shape.h in Headers */, |
| | | 56F9D55F1DF73B7D00C15B5D /* SDL_dataqueue.h in Headers */, |
| | | 56A6702C185654B40007D20F /* SDL_dynapi_overrides.h in Headers */, |
| | | F30D9CCF212EB4810047DF2E /* SDL_displayevents_c.h in Headers */, |
| | | DB313FEF17554B71006C0E22 /* SDL_stdinc.h in Headers */, |
| | | DB313FF017554B71006C0E22 /* SDL_surface.h in Headers */, |
| | | DB313FF117554B71006C0E22 /* SDL_system.h in Headers */, |
| | | DB313FF217554B71006C0E22 /* SDL_syswm.h in Headers */, |
| | | AAC070FB195606770073DCDF /* SDL_opengl_glext.h in Headers */, |
| | | DB313FF317554B71006C0E22 /* SDL_thread.h in Headers */, |
| | | F30D9C89212BC94F0047DF2E /* SDL_syssensor.h in Headers */, |
| | | DB313FF417554B71006C0E22 /* SDL_timer.h in Headers */, |
| | | DB313FF517554B71006C0E22 /* SDL_touch.h in Headers */, |
| | | DB313FF617554B71006C0E22 /* SDL_types.h in Headers */, |
| | |
| | | DB313F8817554B71006C0E22 /* SDL_windowevents_c.h in Headers */, |
| | | DB313F8917554B71006C0E22 /* SDL_rwopsbundlesupport.h in Headers */, |
| | | 5C2EF6FF1FC9EE65003F5197 /* SDL_rect_c.h in Headers */, |
| | | F30D9C92212CABDC0047DF2E /* SDL_dummysensor.h in Headers */, |
| | | DB313F8A17554B71006C0E22 /* SDL_haptic_c.h in Headers */, |
| | | DB313F8B17554B71006C0E22 /* SDL_syshaptic.h in Headers */, |
| | | DB313F8C17554B71006C0E22 /* SDL_sysjoystick_c.h in Headers */, |
| | | DB313F8D17554B71006C0E22 /* SDL_joystick_c.h in Headers */, |
| | | DB313F8E17554B71006C0E22 /* SDL_sysjoystick.h in Headers */, |
| | | F3950CDA212BC88D00F51292 /* SDL_sensor.h in Headers */, |
| | | DB313F8F17554B71006C0E22 /* SDL_assert_c.h in Headers */, |
| | | DB313F9017554B71006C0E22 /* SDL_error_c.h in Headers */, |
| | | DB313F9217554B71006C0E22 /* SDL_sysmutex_c.h in Headers */, |
| | | DB313F9317554B71006C0E22 /* SDL_systhread_c.h in Headers */, |
| | | DB313F9417554B71006C0E22 /* SDL_systhread.h in Headers */, |
| | | DB313F9517554B71006C0E22 /* SDL_thread_c.h in Headers */, |
| | | A704171920F09AC900A82227 /* SDL_hidapijoystick_c.h in Headers */, |
| | | DB313F9617554B71006C0E22 /* SDL_timer_c.h in Headers */, |
| | | DB313F9717554B71006C0E22 /* SDL_cocoaclipboard.h in Headers */, |
| | | DB313F9817554B71006C0E22 /* SDL_cocoaevents.h in Headers */, |
| | |
| | | 0867D690FE84028FC02AAC07 /* Project object */ = { |
| | | isa = PBXProject; |
| | | attributes = { |
| | | LastUpgradeCheck = 0900; |
| | | LastUpgradeCheck = 1000; |
| | | }; |
| | | buildConfigurationList = 0073178E0858DB0500B2BC32 /* Build configuration list for PBXProject "SDL" */; |
| | | compatibilityVersion = "Xcode 3.2"; |
| | |
| | | 04BD004112E6671800899322 /* SDL_cpuinfo.c in Sources */, |
| | | 04BD004812E6671800899322 /* SDL_clipboardevents.c in Sources */, |
| | | 04BD004A12E6671800899322 /* SDL_events.c in Sources */, |
| | | A704172620F09AC900A82227 /* SDL_hidapi_xbox360.c in Sources */, |
| | | 04BD004C12E6671800899322 /* SDL_gesture.c in Sources */, |
| | | 04BD004E12E6671800899322 /* SDL_keyboard.c in Sources */, |
| | | 04BD005012E6671800899322 /* SDL_mouse.c in Sources */, |
| | |
| | | 04BD00F612E6671800899322 /* SDL_cocoaevents.m in Sources */, |
| | | 04BD00F812E6671800899322 /* SDL_cocoakeyboard.m in Sources */, |
| | | AA9A7F151FB0209D00FED37F /* SDL_yuv.c in Sources */, |
| | | A704171A20F09AC900A82227 /* SDL_hidapi_switch.c in Sources */, |
| | | 04BD00FA12E6671800899322 /* SDL_cocoamodes.m in Sources */, |
| | | 4D16644F1EDD6023003DE88E /* SDL_vulkan_utils.c in Sources */, |
| | | 04BD00FC12E6671800899322 /* SDL_cocoamouse.m in Sources */, |
| | |
| | | 04BD010212E6671800899322 /* SDL_cocoavideo.m in Sources */, |
| | | 04BD010412E6671800899322 /* SDL_cocoawindow.m in Sources */, |
| | | 04BD011712E6671800899322 /* SDL_nullevents.c in Sources */, |
| | | A704172320F09AC900A82227 /* SDL_hidapi_xboxone.c in Sources */, |
| | | 04BD011B12E6671800899322 /* SDL_nullvideo.c in Sources */, |
| | | 04BD017512E6671800899322 /* SDL_blit.c in Sources */, |
| | | 04BD017712E6671800899322 /* SDL_blit_0.c in Sources */, |
| | |
| | | 04BD017912E6671800899322 /* SDL_blit_A.c in Sources */, |
| | | 04BD017A12E6671800899322 /* SDL_blit_auto.c in Sources */, |
| | | 04BD017C12E6671800899322 /* SDL_blit_copy.c in Sources */, |
| | | A704172020F09AC900A82227 /* SDL_hidapi_ps4.c in Sources */, |
| | | A704170920F09A9800A82227 /* hid.c in Sources */, |
| | | 04BD017E12E6671800899322 /* SDL_blit_N.c in Sources */, |
| | | 04BD017F12E6671800899322 /* SDL_blit_slow.c in Sources */, |
| | | 04BD018112E6671800899322 /* SDL_bmp.c in Sources */, |
| | |
| | | 04BD018C12E6671800899322 /* SDL_pixels.c in Sources */, |
| | | 04BD018E12E6671800899322 /* SDL_rect.c in Sources */, |
| | | 04BD019612E6671800899322 /* SDL_RLEaccel.c in Sources */, |
| | | A704171420F09AC900A82227 /* SDL_hidapijoystick.c in Sources */, |
| | | 04BD019812E6671800899322 /* SDL_shape.c in Sources */, |
| | | 04BD019A12E6671800899322 /* SDL_stretch.c in Sources */, |
| | | 04BD019B12E6671800899322 /* SDL_surface.c in Sources */, |
| | |
| | | AADC5A441FDA035D00960936 /* SDL_render_metal.m in Sources */, |
| | | 04F7804B12FB74A200FC43C0 /* SDL_blendline.c in Sources */, |
| | | 04F7804D12FB74A200FC43C0 /* SDL_blendpoint.c in Sources */, |
| | | F30D9C93212CABDC0047DF2E /* SDL_dummysensor.c in Sources */, |
| | | 5C2EF6F81FC9EE35003F5197 /* SDL_egl.c in Sources */, |
| | | 04F7805012FB74A200FC43C0 /* SDL_drawline.c in Sources */, |
| | | 04F7805212FB74A200FC43C0 /* SDL_drawpoint.c in Sources */, |
| | | 0442EC1812FE1BBA004C9285 /* SDL_render_gl.c in Sources */, |
| | | F30D9CD0212EB4810047DF2E /* SDL_displayevents.c in Sources */, |
| | | 0442EC1D12FE1BCB004C9285 /* SDL_render_sw.c in Sources */, |
| | | 0442EC5A12FE1C60004C9285 /* SDL_x11framebuffer.c in Sources */, |
| | | 0442EC5F12FE1C75004C9285 /* SDL_hints.c in Sources */, |
| | | 56A67024185654B40007D20F /* SDL_dynapi.c in Sources */, |
| | | F30D9C8A212BC94F0047DF2E /* SDL_sensor.c in Sources */, |
| | | 04BAC0C81300C2160055DE28 /* SDL_log.c in Sources */, |
| | | 5C2EF6EE1FC9D0ED003F5197 /* SDL_cocoaopengles.m in Sources */, |
| | | 0435673E1303160F00BA5428 /* SDL_shaders_gl.c in Sources */, |
| | |
| | | 04BD024812E6671800899322 /* SDL_audiotypecvt.c in Sources */, |
| | | 04BD024912E6671800899322 /* SDL_mixer.c in Sources */, |
| | | 04BD025112E6671800899322 /* SDL_wave.c in Sources */, |
| | | A704172720F09AC900A82227 /* SDL_hidapi_xbox360.c in Sources */, |
| | | 04BD025C12E6671800899322 /* SDL_cpuinfo.c in Sources */, |
| | | 04BD026312E6671800899322 /* SDL_clipboardevents.c in Sources */, |
| | | 04BD026512E6671800899322 /* SDL_events.c in Sources */, |
| | |
| | | 04BD02E412E6671800899322 /* SDL_thread.c in Sources */, |
| | | 04BD02F112E6671800899322 /* SDL_timer.c in Sources */, |
| | | 04BD02F312E6671800899322 /* SDL_systimer.c in Sources */, |
| | | A704171B20F09AC900A82227 /* SDL_hidapi_switch.c in Sources */, |
| | | 04BD030E12E6671800899322 /* SDL_cocoaclipboard.m in Sources */, |
| | | 04BD031012E6671800899322 /* SDL_cocoaevents.m in Sources */, |
| | | 04BD031212E6671800899322 /* SDL_cocoakeyboard.m in Sources */, |
| | |
| | | 5C2EF6A31FC98B38003F5197 /* SDL_yuv.c in Sources */, |
| | | 5C2EF6F11FC9D181003F5197 /* SDL_cocoaopengles.m in Sources */, |
| | | 04BD031812E6671800899322 /* SDL_cocoaopengl.m in Sources */, |
| | | A704172420F09AC900A82227 /* SDL_hidapi_xboxone.c in Sources */, |
| | | 04BD031A12E6671800899322 /* SDL_cocoashape.m in Sources */, |
| | | 04BD031C12E6671800899322 /* SDL_cocoavideo.m in Sources */, |
| | | 04BD031E12E6671800899322 /* SDL_cocoawindow.m in Sources */, |
| | |
| | | 5C2EF6A51FC98B6B003F5197 /* yuv_rgb.c in Sources */, |
| | | 04BD038F12E6671800899322 /* SDL_blit.c in Sources */, |
| | | 04BD039112E6671800899322 /* SDL_blit_0.c in Sources */, |
| | | A704172120F09AC900A82227 /* SDL_hidapi_ps4.c in Sources */, |
| | | A704170A20F09A9800A82227 /* hid.c in Sources */, |
| | | 04BD039212E6671800899322 /* SDL_blit_1.c in Sources */, |
| | | 04BD039312E6671800899322 /* SDL_blit_A.c in Sources */, |
| | | 04BD039412E6671800899322 /* SDL_blit_auto.c in Sources */, |
| | |
| | | 04BD039912E6671800899322 /* SDL_blit_slow.c in Sources */, |
| | | 04BD039B12E6671800899322 /* SDL_bmp.c in Sources */, |
| | | 04BD039C12E6671800899322 /* SDL_clipboard.c in Sources */, |
| | | A704171520F09AC900A82227 /* SDL_hidapijoystick.c in Sources */, |
| | | 04BD03A112E6671800899322 /* SDL_fillrect.c in Sources */, |
| | | 04BD03A612E6671800899322 /* SDL_pixels.c in Sources */, |
| | | 04BD03A812E6671800899322 /* SDL_rect.c in Sources */, |
| | |
| | | AADC5A451FDA047900960936 /* SDL_render_metal.m in Sources */, |
| | | 041B2CAB12FA0D680087D585 /* SDL_render.c in Sources */, |
| | | 04409B9812FA97ED00FB9AA8 /* SDL_yuv_sw.c in Sources */, |
| | | F30D9C94212CABDC0047DF2E /* SDL_dummysensor.c in Sources */, |
| | | 04F7803C12FB748500FC43C0 /* SDL_nullframebuffer.c in Sources */, |
| | | 04F7805512FB74A200FC43C0 /* SDL_blendfillrect.c in Sources */, |
| | | 04F7805712FB74A200FC43C0 /* SDL_blendline.c in Sources */, |
| | | 04F7805912FB74A200FC43C0 /* SDL_blendpoint.c in Sources */, |
| | | F30D9CD1212EB4810047DF2E /* SDL_displayevents.c in Sources */, |
| | | 04F7805C12FB74A200FC43C0 /* SDL_drawline.c in Sources */, |
| | | 04F7805E12FB74A200FC43C0 /* SDL_drawpoint.c in Sources */, |
| | | 0442EC1912FE1BBA004C9285 /* SDL_render_gl.c in Sources */, |
| | | 0442EC1F12FE1BCB004C9285 /* SDL_render_sw.c in Sources */, |
| | | F30D9C8B212BC94F0047DF2E /* SDL_sensor.c in Sources */, |
| | | 56A67025185654B40007D20F /* SDL_dynapi.c in Sources */, |
| | | 0442EC5C12FE1C60004C9285 /* SDL_x11framebuffer.c in Sources */, |
| | | 0442EC6012FE1C75004C9285 /* SDL_hints.c in Sources */, |
| | |
| | | DB31400617554B71006C0E22 /* SDL_audiotypecvt.c in Sources */, |
| | | DB31400717554B71006C0E22 /* SDL_mixer.c in Sources */, |
| | | DB31400817554B71006C0E22 /* SDL_wave.c in Sources */, |
| | | A704172820F09AC900A82227 /* SDL_hidapi_xbox360.c in Sources */, |
| | | DB31400917554B71006C0E22 /* SDL_cpuinfo.c in Sources */, |
| | | DB31400A17554B71006C0E22 /* SDL_clipboardevents.c in Sources */, |
| | | DB31400B17554B71006C0E22 /* SDL_events.c in Sources */, |
| | |
| | | DB31402B17554B71006C0E22 /* SDL_thread.c in Sources */, |
| | | DB31402C17554B71006C0E22 /* SDL_timer.c in Sources */, |
| | | DB31402D17554B71006C0E22 /* SDL_systimer.c in Sources */, |
| | | A704171C20F09AC900A82227 /* SDL_hidapi_switch.c in Sources */, |
| | | DB31402E17554B71006C0E22 /* SDL_cocoaclipboard.m in Sources */, |
| | | DB31402F17554B71006C0E22 /* SDL_cocoaevents.m in Sources */, |
| | | DB31403017554B71006C0E22 /* SDL_cocoakeyboard.m in Sources */, |
| | |
| | | 5C2EF6A41FC98B39003F5197 /* SDL_yuv.c in Sources */, |
| | | 5C2EF6F31FC9D182003F5197 /* SDL_cocoaopengles.m in Sources */, |
| | | DB31403317554B71006C0E22 /* SDL_cocoaopengl.m in Sources */, |
| | | A704172520F09AC900A82227 /* SDL_hidapi_xboxone.c in Sources */, |
| | | DB31403417554B71006C0E22 /* SDL_cocoashape.m in Sources */, |
| | | DB31403517554B71006C0E22 /* SDL_cocoavideo.m in Sources */, |
| | | DB31403617554B71006C0E22 /* SDL_cocoawindow.m in Sources */, |
| | |
| | | 5C2EF6A61FC98B6C003F5197 /* yuv_rgb.c in Sources */, |
| | | DB31403917554B71006C0E22 /* SDL_blit.c in Sources */, |
| | | DB31403A17554B71006C0E22 /* SDL_blit_0.c in Sources */, |
| | | A704172220F09AC900A82227 /* SDL_hidapi_ps4.c in Sources */, |
| | | A704170B20F09A9800A82227 /* hid.c in Sources */, |
| | | DB31403B17554B71006C0E22 /* SDL_blit_1.c in Sources */, |
| | | DB31403C17554B71006C0E22 /* SDL_blit_A.c in Sources */, |
| | | DB31403D17554B71006C0E22 /* SDL_blit_auto.c in Sources */, |
| | |
| | | DB31404017554B71006C0E22 /* SDL_blit_slow.c in Sources */, |
| | | DB31404117554B71006C0E22 /* SDL_bmp.c in Sources */, |
| | | DB31404217554B71006C0E22 /* SDL_clipboard.c in Sources */, |
| | | A704171620F09AC900A82227 /* SDL_hidapijoystick.c in Sources */, |
| | | DB31404317554B71006C0E22 /* SDL_fillrect.c in Sources */, |
| | | DB31404417554B71006C0E22 /* SDL_pixels.c in Sources */, |
| | | DB31404517554B71006C0E22 /* SDL_rect.c in Sources */, |
| | |
| | | AADC5A481FDA048100960936 /* SDL_render_metal.m in Sources */, |
| | | DB31405817554B71006C0E22 /* SDL_render.c in Sources */, |
| | | DB31405A17554B71006C0E22 /* SDL_yuv_sw.c in Sources */, |
| | | F30D9C95212CABDC0047DF2E /* SDL_dummysensor.c in Sources */, |
| | | DB31405B17554B71006C0E22 /* SDL_nullframebuffer.c in Sources */, |
| | | DB31405C17554B71006C0E22 /* SDL_blendfillrect.c in Sources */, |
| | | DB31405D17554B71006C0E22 /* SDL_blendline.c in Sources */, |
| | | DB31405E17554B71006C0E22 /* SDL_blendpoint.c in Sources */, |
| | | F30D9CD2212EB4810047DF2E /* SDL_displayevents.c in Sources */, |
| | | DB31405F17554B71006C0E22 /* SDL_drawline.c in Sources */, |
| | | DB31406017554B71006C0E22 /* SDL_drawpoint.c in Sources */, |
| | | DB31406117554B71006C0E22 /* SDL_render_gl.c in Sources */, |
| | | DB31406217554B71006C0E22 /* SDL_render_sw.c in Sources */, |
| | | F30D9C8C212BC94F0047DF2E /* SDL_sensor.c in Sources */, |
| | | 56A67026185654B40007D20F /* SDL_dynapi.c in Sources */, |
| | | DB31406317554B71006C0E22 /* SDL_x11framebuffer.c in Sources */, |
| | | DB31406417554B71006C0E22 /* SDL_hints.c in Sources */, |
| | |
| | | 00CFA621106A567900758660 /* Release */ = { |
| | | isa = XCBuildConfiguration; |
| | | buildSettings = { |
| | | ALWAYS_SEARCH_USER_PATHS = NO; |
| | | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; |
| | | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; |
| | | CLANG_WARN_BOOL_CONVERSION = YES; |
| | | CLANG_WARN_COMMA = YES; |
| | | CLANG_WARN_CONSTANT_CONVERSION = YES; |
| | | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; |
| | | CLANG_WARN_EMPTY_BODY = YES; |
| | | CLANG_WARN_ENUM_CONVERSION = YES; |
| | | CLANG_WARN_INFINITE_RECURSION = YES; |
| | | CLANG_WARN_INT_CONVERSION = YES; |
| | | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; |
| | | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; |
| | | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; |
| | | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; |
| | | CLANG_WARN_STRICT_PROTOTYPES = YES; |
| | |
| | | /usr/X11R6/include, |
| | | "$(VULKAN_SDK)/include", |
| | | ../../src/video/khronos, |
| | | ../../src/hidapi/hidapi, |
| | | ); |
| | | MACOSX_DEPLOYMENT_TARGET = 10.6; |
| | | SDKROOT = macosx; |
| | |
| | | 00CFA622106A567900758660 /* Release */ = { |
| | | isa = XCBuildConfiguration; |
| | | buildSettings = { |
| | | ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; |
| | | ALWAYS_SEARCH_USER_PATHS = NO; |
| | | CLANG_LINK_OBJC_RUNTIME = NO; |
| | | COMBINE_HIDPI_IMAGES = YES; |
| | | DYLIB_COMPATIBILITY_VERSION = 1.0.0; |
| | | DYLIB_CURRENT_VERSION = 8.0.0; |
| | | DYLIB_CURRENT_VERSION = 10.0.0; |
| | | FRAMEWORK_SEARCH_PATHS = ( |
| | | "$(inherited)", |
| | | "$(PROJECT_DIR)", |
| | |
| | | FRAMEWORK_VERSION = A; |
| | | INFOPLIST_FILE = "Info-Framework.plist"; |
| | | INSTALL_PATH = "@rpath"; |
| | | OTHER_LDFLAGS = ( |
| | | "-Wl,-weak_framework,Metal", |
| | | "-liconv", |
| | | ); |
| | | OTHER_LDFLAGS = "-liconv"; |
| | | PRODUCT_BUNDLE_IDENTIFIER = org.libsdl.SDL2; |
| | | PRODUCT_NAME = SDL2; |
| | | PROVISIONING_PROFILE = ""; |
| | |
| | | 00CFA623106A567900758660 /* Release */ = { |
| | | isa = XCBuildConfiguration; |
| | | buildSettings = { |
| | | ALWAYS_SEARCH_USER_PATHS = NO; |
| | | COMBINE_HIDPI_IMAGES = YES; |
| | | GCC_PREPROCESSOR_DEFINITIONS = ( |
| | | "$(GCC_PREPROCESSOR_DEFINITIONS)", |
| | |
| | | 00CFA625106A567900758660 /* Release */ = { |
| | | isa = XCBuildConfiguration; |
| | | buildSettings = { |
| | | ALWAYS_SEARCH_USER_PATHS = NO; |
| | | PRODUCT_NAME = "Standard DMG"; |
| | | PROVISIONING_PROFILE = ""; |
| | | }; |
| | |
| | | 00CFA627106A568900758660 /* Debug */ = { |
| | | isa = XCBuildConfiguration; |
| | | buildSettings = { |
| | | ALWAYS_SEARCH_USER_PATHS = NO; |
| | | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; |
| | | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; |
| | | CLANG_WARN_BOOL_CONVERSION = YES; |
| | | CLANG_WARN_COMMA = YES; |
| | | CLANG_WARN_CONSTANT_CONVERSION = YES; |
| | | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; |
| | | CLANG_WARN_EMPTY_BODY = YES; |
| | | CLANG_WARN_ENUM_CONVERSION = YES; |
| | | CLANG_WARN_INFINITE_RECURSION = YES; |
| | | CLANG_WARN_INT_CONVERSION = YES; |
| | | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; |
| | | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; |
| | | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; |
| | | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; |
| | | CLANG_WARN_STRICT_PROTOTYPES = YES; |
| | |
| | | /usr/X11R6/include, |
| | | "$(VULKAN_SDK)/include", |
| | | ../../src/video/khronos, |
| | | ../../src/hidapi/hidapi, |
| | | ); |
| | | MACOSX_DEPLOYMENT_TARGET = 10.6; |
| | | ONLY_ACTIVE_ARCH = YES; |
| | |
| | | 00CFA628106A568900758660 /* Debug */ = { |
| | | isa = XCBuildConfiguration; |
| | | buildSettings = { |
| | | ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; |
| | | ALWAYS_SEARCH_USER_PATHS = NO; |
| | | CLANG_LINK_OBJC_RUNTIME = NO; |
| | | COMBINE_HIDPI_IMAGES = YES; |
| | | DYLIB_COMPATIBILITY_VERSION = 1.0.0; |
| | | DYLIB_CURRENT_VERSION = 8.0.0; |
| | | DYLIB_CURRENT_VERSION = 10.0.0; |
| | | FRAMEWORK_SEARCH_PATHS = ( |
| | | "$(inherited)", |
| | | "$(PROJECT_DIR)", |
| | |
| | | FRAMEWORK_VERSION = A; |
| | | INFOPLIST_FILE = "Info-Framework.plist"; |
| | | INSTALL_PATH = "@rpath"; |
| | | OTHER_LDFLAGS = ( |
| | | "-Wl,-weak_framework,Metal", |
| | | "-liconv", |
| | | ); |
| | | OTHER_LDFLAGS = "-liconv"; |
| | | PRODUCT_BUNDLE_IDENTIFIER = org.libsdl.SDL2; |
| | | PRODUCT_NAME = SDL2; |
| | | PROVISIONING_PROFILE = ""; |
| | |
| | | 00CFA629106A568900758660 /* Debug */ = { |
| | | isa = XCBuildConfiguration; |
| | | buildSettings = { |
| | | ALWAYS_SEARCH_USER_PATHS = NO; |
| | | COMBINE_HIDPI_IMAGES = YES; |
| | | GCC_PREPROCESSOR_DEFINITIONS = ( |
| | | "$(GCC_PREPROCESSOR_DEFINITIONS)", |
| | |
| | | 00CFA62B106A568900758660 /* Debug */ = { |
| | | isa = XCBuildConfiguration; |
| | | buildSettings = { |
| | | ALWAYS_SEARCH_USER_PATHS = NO; |
| | | PRODUCT_NAME = "Standard DMG"; |
| | | PROVISIONING_PROFILE = ""; |
| | | }; |
| | |
| | | DB31407517554B71006C0E22 /* Debug */ = { |
| | | isa = XCBuildConfiguration; |
| | | buildSettings = { |
| | | ALWAYS_SEARCH_USER_PATHS = NO; |
| | | COMBINE_HIDPI_IMAGES = YES; |
| | | EXECUTABLE_PREFIX = lib; |
| | | GCC_PREPROCESSOR_DEFINITIONS = ( |
| | |
| | | DB31407617554B71006C0E22 /* Release */ = { |
| | | isa = XCBuildConfiguration; |
| | | buildSettings = { |
| | | ALWAYS_SEARCH_USER_PATHS = NO; |
| | | COMBINE_HIDPI_IMAGES = YES; |
| | | EXECUTABLE_PREFIX = lib; |
| | | GCC_PREPROCESSOR_DEFINITIONS = ( |
old mode 100755
new mode 100644
| | |
| | | |
| | | /* Begin PBXFileReference section */ |
| | | 0017958C10741F7900F5D044 /* testatomic */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testatomic; sourceTree = BUILT_PRODUCTS_DIR; }; |
| | | 0017958F1074216E00F5D044 /* testatomic.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testatomic.c; path = ../../test/testatomic.c; sourceTree = SOURCE_ROOT; }; |
| | | 0017958F1074216E00F5D044 /* testatomic.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testatomic.c; sourceTree = "<group>"; }; |
| | | 001795AD107421BF00F5D044 /* testaudioinfo */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testaudioinfo; sourceTree = BUILT_PRODUCTS_DIR; }; |
| | | 001795B01074222D00F5D044 /* testaudioinfo.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testaudioinfo.c; path = ../../test/testaudioinfo.c; sourceTree = SOURCE_ROOT; }; |
| | | 001795B01074222D00F5D044 /* testaudioinfo.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testaudioinfo.c; sourceTree = "<group>"; }; |
| | | 0017972110742F3200F5D044 /* testgl2 */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testgl2; sourceTree = BUILT_PRODUCTS_DIR; }; |
| | | 0017972710742FB900F5D044 /* testgl2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testgl2.c; path = ../../test/testgl2.c; sourceTree = SOURCE_ROOT; }; |
| | | 0017972710742FB900F5D044 /* testgl2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testgl2.c; sourceTree = "<group>"; }; |
| | | 00179748107430D600F5D044 /* testhaptic */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testhaptic; sourceTree = BUILT_PRODUCTS_DIR; }; |
| | | 0017974E1074315700F5D044 /* testhaptic.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testhaptic.c; path = ../../test/testhaptic.c; sourceTree = SOURCE_ROOT; }; |
| | | 0017974E1074315700F5D044 /* testhaptic.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testhaptic.c; sourceTree = "<group>"; }; |
| | | 0017976E107431B300F5D044 /* testdraw2 */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testdraw2; sourceTree = BUILT_PRODUCTS_DIR; }; |
| | | 001797711074320D00F5D044 /* testdraw2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testdraw2.c; path = ../../test/testdraw2.c; sourceTree = SOURCE_ROOT; }; |
| | | 001797711074320D00F5D044 /* testdraw2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testdraw2.c; sourceTree = "<group>"; }; |
| | | 0017978E107432AE00F5D044 /* testime */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testime; sourceTree = BUILT_PRODUCTS_DIR; }; |
| | | 00179791107432FA00F5D044 /* testime.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testime.c; path = ../../test/testime.c; sourceTree = SOURCE_ROOT; }; |
| | | 00179791107432FA00F5D044 /* testime.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testime.c; sourceTree = "<group>"; }; |
| | | 001797AE1074334C00F5D044 /* testintersections */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testintersections; sourceTree = BUILT_PRODUCTS_DIR; }; |
| | | 001797B31074339C00F5D044 /* testintersections.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testintersections.c; path = ../../test/testintersections.c; sourceTree = SOURCE_ROOT; }; |
| | | 001797B31074339C00F5D044 /* testintersections.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testintersections.c; sourceTree = "<group>"; }; |
| | | 001797D0107433C600F5D044 /* testloadso */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testloadso; sourceTree = BUILT_PRODUCTS_DIR; }; |
| | | 001797D31074343E00F5D044 /* testloadso.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testloadso.c; path = ../../test/testloadso.c; sourceTree = SOURCE_ROOT; }; |
| | | 001797D31074343E00F5D044 /* testloadso.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testloadso.c; sourceTree = "<group>"; }; |
| | | 001798121074355200F5D044 /* testmultiaudio */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testmultiaudio; sourceTree = BUILT_PRODUCTS_DIR; }; |
| | | 001798151074359B00F5D044 /* testmultiaudio.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testmultiaudio.c; path = ../../test/testmultiaudio.c; sourceTree = SOURCE_ROOT; }; |
| | | 0017985A107436ED00F5D044 /* testnative.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testnative.c; path = ../../test/testnative.c; sourceTree = SOURCE_ROOT; }; |
| | | 0017985B107436ED00F5D044 /* testnative.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = testnative.h; path = ../../test/testnative.h; sourceTree = SOURCE_ROOT; }; |
| | | 0017985C107436ED00F5D044 /* testnativecocoa.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = testnativecocoa.m; path = ../../test/testnativecocoa.m; sourceTree = SOURCE_ROOT; }; |
| | | 00179872107438D000F5D044 /* testnativex11.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testnativex11.c; path = ../../test/testnativex11.c; sourceTree = SOURCE_ROOT; }; |
| | | 001798151074359B00F5D044 /* testmultiaudio.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testmultiaudio.c; sourceTree = "<group>"; }; |
| | | 0017985A107436ED00F5D044 /* testnative.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testnative.c; sourceTree = "<group>"; }; |
| | | 0017985B107436ED00F5D044 /* testnative.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = testnative.h; sourceTree = "<group>"; }; |
| | | 0017985C107436ED00F5D044 /* testnativecocoa.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = testnativecocoa.m; sourceTree = "<group>"; }; |
| | | 00179872107438D000F5D044 /* testnativex11.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testnativex11.c; sourceTree = "<group>"; }; |
| | | 001798941074392D00F5D044 /* testnative */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testnative; sourceTree = BUILT_PRODUCTS_DIR; }; |
| | | 001798B5107439DF00F5D044 /* testpower */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testpower; sourceTree = BUILT_PRODUCTS_DIR; }; |
| | | 001798B910743A4900F5D044 /* testpower.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testpower.c; path = ../../test/testpower.c; sourceTree = SOURCE_ROOT; }; |
| | | 001798B910743A4900F5D044 /* testpower.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testpower.c; sourceTree = "<group>"; }; |
| | | 001798F210743BEC00F5D044 /* testresample */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testresample; sourceTree = BUILT_PRODUCTS_DIR; }; |
| | | 001798F910743E9200F5D044 /* testresample.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testresample.c; path = ../../test/testresample.c; sourceTree = SOURCE_ROOT; }; |
| | | 001798F910743E9200F5D044 /* testresample.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testresample.c; sourceTree = "<group>"; }; |
| | | 0017991610743F1000F5D044 /* testsprite2 */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testsprite2; sourceTree = BUILT_PRODUCTS_DIR; }; |
| | | 0017991910743F5300F5D044 /* testsprite2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testsprite2.c; path = ../../test/testsprite2.c; sourceTree = SOURCE_ROOT; }; |
| | | 0017991910743F5300F5D044 /* testsprite2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testsprite2.c; sourceTree = "<group>"; }; |
| | | 0017993810743FB700F5D044 /* testwm2 */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testwm2; sourceTree = BUILT_PRODUCTS_DIR; }; |
| | | 0017993B10743FEF00F5D044 /* testwm2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testwm2.c; path = ../../test/testwm2.c; sourceTree = SOURCE_ROOT; }; |
| | | 0017993B10743FEF00F5D044 /* testwm2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testwm2.c; sourceTree = "<group>"; }; |
| | | 002A863B10730545007319AE /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = /System/Library/Frameworks/CoreAudio.framework; sourceTree = "<absolute>"; }; |
| | | 002A863C10730545007319AE /* ForceFeedback.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ForceFeedback.framework; path = /System/Library/Frameworks/ForceFeedback.framework; sourceTree = "<absolute>"; }; |
| | | 002A863D10730545007319AE /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = /System/Library/Frameworks/IOKit.framework; sourceTree = "<absolute>"; }; |
| | |
| | | 002A873910730675007319AE /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = "<absolute>"; }; |
| | | 002F33A709CA188600EBEB88 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; }; |
| | | 002F341209CA1BFF00EBEB88 /* testfile */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testfile; sourceTree = BUILT_PRODUCTS_DIR; }; |
| | | 002F341709CA1C5B00EBEB88 /* testfile.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = testfile.c; path = ../../test/testfile.c; sourceTree = SOURCE_ROOT; }; |
| | | 002F341709CA1C5B00EBEB88 /* testfile.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = testfile.c; sourceTree = "<group>"; }; |
| | | 002F343109CA1F0300EBEB88 /* testiconv */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testiconv; sourceTree = BUILT_PRODUCTS_DIR; }; |
| | | 002F343609CA1F6F00EBEB88 /* testiconv.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = testiconv.c; path = ../../test/testiconv.c; sourceTree = SOURCE_ROOT; }; |
| | | 002F343609CA1F6F00EBEB88 /* testiconv.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = testiconv.c; sourceTree = "<group>"; }; |
| | | 002F344D09CA1FB300EBEB88 /* testoverlay2 */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testoverlay2; sourceTree = BUILT_PRODUCTS_DIR; }; |
| | | 002F345209CA201C00EBEB88 /* testoverlay2.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = testoverlay2.c; path = ../../test/testoverlay2.c; sourceTree = SOURCE_ROOT; }; |
| | | 002F345209CA201C00EBEB88 /* testoverlay2.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = testoverlay2.c; sourceTree = "<group>"; }; |
| | | 002F346A09CA204F00EBEB88 /* testplatform */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testplatform; sourceTree = BUILT_PRODUCTS_DIR; }; |
| | | 002F346F09CA20A600EBEB88 /* testplatform.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = testplatform.c; path = ../../test/testplatform.c; sourceTree = SOURCE_ROOT; }; |
| | | 002F346F09CA20A600EBEB88 /* testplatform.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = testplatform.c; sourceTree = "<group>"; }; |
| | | 003FA63A093FFD41000C53B3 /* SDL.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SDL.xcodeproj; path = ../SDL/SDL.xcodeproj; sourceTree = SOURCE_ROOT; }; |
| | | 00794E5D09D20839003FC8A1 /* icon.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; name = icon.bmp; path = ../../test/icon.bmp; sourceTree = SOURCE_ROOT; }; |
| | | 00794E5E09D20839003FC8A1 /* moose.dat */ = {isa = PBXFileReference; lastKnownFileType = file; name = moose.dat; path = ../../test/moose.dat; sourceTree = SOURCE_ROOT; }; |
| | | 00794E5F09D20839003FC8A1 /* picture.xbm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = picture.xbm; path = ../../test/picture.xbm; sourceTree = SOURCE_ROOT; }; |
| | | 00794E6109D20839003FC8A1 /* sample.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; name = sample.bmp; path = ../../test/sample.bmp; sourceTree = SOURCE_ROOT; }; |
| | | 00794E6209D20839003FC8A1 /* sample.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; name = sample.wav; path = ../../test/sample.wav; sourceTree = SOURCE_ROOT; }; |
| | | 00794E6309D20839003FC8A1 /* utf8.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = utf8.txt; path = ../../test/utf8.txt; sourceTree = SOURCE_ROOT; }; |
| | | 083E4872006D84C97F000001 /* loopwave.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = loopwave.c; path = ../../test/loopwave.c; sourceTree = SOURCE_ROOT; }; |
| | | 083E4878006D85357F000001 /* testerror.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = testerror.c; path = ../../test/testerror.c; sourceTree = SOURCE_ROOT; }; |
| | | 083E487E006D86A17F000001 /* testsem.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = testsem.c; path = ../../test/testsem.c; sourceTree = SOURCE_ROOT; }; |
| | | 083E4880006D86A17F000001 /* testtimer.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = testtimer.c; path = ../../test/testtimer.c; sourceTree = SOURCE_ROOT; }; |
| | | 083E4882006D86A17F000001 /* testver.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = testver.c; path = ../../test/testver.c; sourceTree = SOURCE_ROOT; }; |
| | | 083E4887006D86A17F000001 /* torturethread.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = torturethread.c; path = ../../test/torturethread.c; sourceTree = SOURCE_ROOT; }; |
| | | 092D6D10FFB30A2C7F000001 /* checkkeys.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = checkkeys.c; path = ../../test/checkkeys.c; sourceTree = SOURCE_ROOT; }; |
| | | 092D6D58FFB311A97F000001 /* testthread.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = testthread.c; path = ../../test/testthread.c; sourceTree = SOURCE_ROOT; }; |
| | | 092D6D62FFB312AA7F000001 /* testjoystick.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = testjoystick.c; path = ../../test/testjoystick.c; sourceTree = SOURCE_ROOT; }; |
| | | 092D6D6CFFB313437F000001 /* testkeys.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = testkeys.c; path = ../../test/testkeys.c; sourceTree = SOURCE_ROOT; }; |
| | | 092D6D75FFB313BB7F000001 /* testlock.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = testlock.c; path = ../../test/testlock.c; sourceTree = SOURCE_ROOT; }; |
| | | 00794E5D09D20839003FC8A1 /* icon.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; path = icon.bmp; sourceTree = "<group>"; }; |
| | | 00794E5E09D20839003FC8A1 /* moose.dat */ = {isa = PBXFileReference; lastKnownFileType = file; path = moose.dat; sourceTree = "<group>"; }; |
| | | 00794E5F09D20839003FC8A1 /* picture.xbm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = picture.xbm; sourceTree = "<group>"; }; |
| | | 00794E6109D20839003FC8A1 /* sample.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; path = sample.bmp; sourceTree = "<group>"; }; |
| | | 00794E6209D20839003FC8A1 /* sample.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; path = sample.wav; sourceTree = "<group>"; }; |
| | | 00794E6309D20839003FC8A1 /* utf8.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = utf8.txt; sourceTree = "<group>"; }; |
| | | 083E4872006D84C97F000001 /* loopwave.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = loopwave.c; sourceTree = "<group>"; }; |
| | | 083E4878006D85357F000001 /* testerror.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = testerror.c; sourceTree = "<group>"; }; |
| | | 083E487E006D86A17F000001 /* testsem.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = testsem.c; sourceTree = "<group>"; }; |
| | | 083E4880006D86A17F000001 /* testtimer.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = testtimer.c; sourceTree = "<group>"; }; |
| | | 083E4882006D86A17F000001 /* testver.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = testver.c; sourceTree = "<group>"; }; |
| | | 083E4887006D86A17F000001 /* torturethread.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = torturethread.c; sourceTree = "<group>"; }; |
| | | 092D6D10FFB30A2C7F000001 /* checkkeys.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = checkkeys.c; sourceTree = "<group>"; }; |
| | | 092D6D58FFB311A97F000001 /* testthread.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = testthread.c; sourceTree = "<group>"; }; |
| | | 092D6D62FFB312AA7F000001 /* testjoystick.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = testjoystick.c; sourceTree = "<group>"; }; |
| | | 092D6D6CFFB313437F000001 /* testkeys.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = testkeys.c; sourceTree = "<group>"; }; |
| | | 092D6D75FFB313BB7F000001 /* testlock.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = testlock.c; sourceTree = "<group>"; }; |
| | | 4537749212091504002F0F45 /* testshape */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testshape; sourceTree = BUILT_PRODUCTS_DIR; }; |
| | | 453774A4120915E3002F0F45 /* testshape.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testshape.c; path = ../../test/testshape.c; sourceTree = SOURCE_ROOT; }; |
| | | 453774A4120915E3002F0F45 /* testshape.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testshape.c; sourceTree = "<group>"; }; |
| | | 66E88E5B203B733C0004D44E /* Metal.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Metal.framework; path = System/Library/Frameworks/Metal.framework; sourceTree = SDKROOT; }; |
| | | 66E88E8A203B778F0004D44E /* testyuv_cvt.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = testyuv_cvt.c; path = ../../test/testyuv_cvt.c; sourceTree = "<group>"; }; |
| | | AAF02FF41F90089800B9A9FB /* SDL_test_memory.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_memory.c; path = ../../src/test/SDL_test_memory.c; sourceTree = "<group>"; }; |
| | | BBFC088E164C6820003E6A99 /* testgamecontroller.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testgamecontroller.c; path = ../../test/testgamecontroller.c; sourceTree = "<group>"; }; |
| | | 66E88E8A203B778F0004D44E /* testyuv_cvt.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = testyuv_cvt.c; sourceTree = "<group>"; }; |
| | | AAF02FF41F90089800B9A9FB /* SDL_test_memory.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_memory.c; sourceTree = "<group>"; }; |
| | | BBFC088E164C6820003E6A99 /* testgamecontroller.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testgamecontroller.c; sourceTree = "<group>"; }; |
| | | BBFC08CD164C6862003E6A99 /* testgamecontroller */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testgamecontroller; sourceTree = BUILT_PRODUCTS_DIR; }; |
| | | BEC566B60761D90300A33029 /* checkkeys */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = checkkeys; sourceTree = BUILT_PRODUCTS_DIR; }; |
| | | BEC566D10761D90300A33029 /* loopwave */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = loopwave; sourceTree = BUILT_PRODUCTS_DIR; }; |
| | |
| | | BEC567980761D90500A33029 /* testtimer */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testtimer; sourceTree = BUILT_PRODUCTS_DIR; }; |
| | | BEC567B20761D90500A33029 /* testversion */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testversion; sourceTree = BUILT_PRODUCTS_DIR; }; |
| | | BEC567F50761D90600A33029 /* torturethread */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = torturethread; sourceTree = BUILT_PRODUCTS_DIR; }; |
| | | DB0F48D717CA51D2008798C5 /* testdrawchessboard.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = testdrawchessboard.c; path = ../../test/testdrawchessboard.c; sourceTree = "<group>"; }; |
| | | DB0F48D817CA51D2008798C5 /* testfilesystem.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = testfilesystem.c; path = ../../test/testfilesystem.c; sourceTree = "<group>"; }; |
| | | DB0F48D717CA51D2008798C5 /* testdrawchessboard.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = testdrawchessboard.c; sourceTree = "<group>"; }; |
| | | DB0F48D817CA51D2008798C5 /* testfilesystem.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = testfilesystem.c; sourceTree = "<group>"; }; |
| | | DB0F48EC17CA51E5008798C5 /* testdrawchessboard */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testdrawchessboard; sourceTree = BUILT_PRODUCTS_DIR; }; |
| | | DB0F490117CA5212008798C5 /* testfilesystem */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testfilesystem; sourceTree = BUILT_PRODUCTS_DIR; }; |
| | | DB166CBB16A1C74100A1396C /* testgesture.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = testgesture.c; path = ../../test/testgesture.c; sourceTree = "<group>"; }; |
| | | DB166CBC16A1C74100A1396C /* testgles.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = testgles.c; path = ../../test/testgles.c; sourceTree = "<group>"; }; |
| | | DB166CBD16A1C74100A1396C /* testmessage.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = testmessage.c; path = ../../test/testmessage.c; sourceTree = "<group>"; }; |
| | | DB166CBF16A1C74100A1396C /* testrelative.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = testrelative.c; path = ../../test/testrelative.c; sourceTree = "<group>"; }; |
| | | DB166CC016A1C74100A1396C /* testrendercopyex.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = testrendercopyex.c; path = ../../test/testrendercopyex.c; sourceTree = "<group>"; }; |
| | | DB166CC116A1C74100A1396C /* testrendertarget.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = testrendertarget.c; path = ../../test/testrendertarget.c; sourceTree = "<group>"; }; |
| | | DB166CC216A1C74100A1396C /* testrumble.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = testrumble.c; path = ../../test/testrumble.c; sourceTree = "<group>"; }; |
| | | DB166CC316A1C74100A1396C /* testscale.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = testscale.c; path = ../../test/testscale.c; sourceTree = "<group>"; }; |
| | | DB166CC416A1C74100A1396C /* testshader.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = testshader.c; path = ../../test/testshader.c; sourceTree = "<group>"; }; |
| | | DB166CC516A1C74100A1396C /* testspriteminimal.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = testspriteminimal.c; path = ../../test/testspriteminimal.c; sourceTree = "<group>"; }; |
| | | DB166CC616A1C74100A1396C /* teststreaming.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = teststreaming.c; path = ../../test/teststreaming.c; sourceTree = "<group>"; }; |
| | | DB166CBB16A1C74100A1396C /* testgesture.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = testgesture.c; sourceTree = "<group>"; }; |
| | | DB166CBC16A1C74100A1396C /* testgles.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = testgles.c; sourceTree = "<group>"; }; |
| | | DB166CBD16A1C74100A1396C /* testmessage.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = testmessage.c; sourceTree = "<group>"; }; |
| | | DB166CBF16A1C74100A1396C /* testrelative.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = testrelative.c; sourceTree = "<group>"; }; |
| | | DB166CC016A1C74100A1396C /* testrendercopyex.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = testrendercopyex.c; sourceTree = "<group>"; }; |
| | | DB166CC116A1C74100A1396C /* testrendertarget.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = testrendertarget.c; sourceTree = "<group>"; }; |
| | | DB166CC216A1C74100A1396C /* testrumble.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = testrumble.c; sourceTree = "<group>"; }; |
| | | DB166CC316A1C74100A1396C /* testscale.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = testscale.c; sourceTree = "<group>"; }; |
| | | DB166CC416A1C74100A1396C /* testshader.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = testshader.c; sourceTree = "<group>"; }; |
| | | DB166CC516A1C74100A1396C /* testspriteminimal.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = testspriteminimal.c; sourceTree = "<group>"; }; |
| | | DB166CC616A1C74100A1396C /* teststreaming.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = teststreaming.c; sourceTree = "<group>"; }; |
| | | DB166D7F16A1D12400A1396C /* libSDL_test.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libSDL_test.a; sourceTree = BUILT_PRODUCTS_DIR; }; |
| | | DB166D8416A1D1A500A1396C /* SDL_test_assert.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_assert.c; path = ../../src/test/SDL_test_assert.c; sourceTree = "<group>"; }; |
| | | DB166D8516A1D1A500A1396C /* SDL_test_common.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_common.c; path = ../../src/test/SDL_test_common.c; sourceTree = "<group>"; }; |
| | | DB166D8616A1D1A500A1396C /* SDL_test_compare.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_compare.c; path = ../../src/test/SDL_test_compare.c; sourceTree = "<group>"; }; |
| | | DB166D8716A1D1A500A1396C /* SDL_test_crc32.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_crc32.c; path = ../../src/test/SDL_test_crc32.c; sourceTree = "<group>"; }; |
| | | DB166D8816A1D1A500A1396C /* SDL_test_font.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_font.c; path = ../../src/test/SDL_test_font.c; sourceTree = "<group>"; }; |
| | | DB166D8916A1D1A500A1396C /* SDL_test_fuzzer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_fuzzer.c; path = ../../src/test/SDL_test_fuzzer.c; sourceTree = "<group>"; }; |
| | | DB166D8A16A1D1A500A1396C /* SDL_test_harness.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_harness.c; path = ../../src/test/SDL_test_harness.c; sourceTree = "<group>"; }; |
| | | DB166D8B16A1D1A500A1396C /* SDL_test_imageBlit.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_imageBlit.c; path = ../../src/test/SDL_test_imageBlit.c; sourceTree = "<group>"; }; |
| | | DB166D8C16A1D1A500A1396C /* SDL_test_imageBlitBlend.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_imageBlitBlend.c; path = ../../src/test/SDL_test_imageBlitBlend.c; sourceTree = "<group>"; }; |
| | | DB166D8D16A1D1A500A1396C /* SDL_test_imageFace.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_imageFace.c; path = ../../src/test/SDL_test_imageFace.c; sourceTree = "<group>"; }; |
| | | DB166D8E16A1D1A500A1396C /* SDL_test_imagePrimitives.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_imagePrimitives.c; path = ../../src/test/SDL_test_imagePrimitives.c; sourceTree = "<group>"; }; |
| | | DB166D8F16A1D1A500A1396C /* SDL_test_imagePrimitivesBlend.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_imagePrimitivesBlend.c; path = ../../src/test/SDL_test_imagePrimitivesBlend.c; sourceTree = "<group>"; }; |
| | | DB166D9016A1D1A500A1396C /* SDL_test_log.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_log.c; path = ../../src/test/SDL_test_log.c; sourceTree = "<group>"; }; |
| | | DB166D9116A1D1A500A1396C /* SDL_test_md5.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_md5.c; path = ../../src/test/SDL_test_md5.c; sourceTree = "<group>"; }; |
| | | DB166D9216A1D1A500A1396C /* SDL_test_random.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_random.c; path = ../../src/test/SDL_test_random.c; sourceTree = "<group>"; }; |
| | | DB166D8416A1D1A500A1396C /* SDL_test_assert.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_assert.c; sourceTree = "<group>"; }; |
| | | DB166D8516A1D1A500A1396C /* SDL_test_common.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_common.c; sourceTree = "<group>"; }; |
| | | DB166D8616A1D1A500A1396C /* SDL_test_compare.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_compare.c; sourceTree = "<group>"; }; |
| | | DB166D8716A1D1A500A1396C /* SDL_test_crc32.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_crc32.c; sourceTree = "<group>"; }; |
| | | DB166D8816A1D1A500A1396C /* SDL_test_font.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_font.c; sourceTree = "<group>"; }; |
| | | DB166D8916A1D1A500A1396C /* SDL_test_fuzzer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_fuzzer.c; sourceTree = "<group>"; }; |
| | | DB166D8A16A1D1A500A1396C /* SDL_test_harness.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_harness.c; sourceTree = "<group>"; }; |
| | | DB166D8B16A1D1A500A1396C /* SDL_test_imageBlit.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_imageBlit.c; sourceTree = "<group>"; }; |
| | | DB166D8C16A1D1A500A1396C /* SDL_test_imageBlitBlend.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_imageBlitBlend.c; sourceTree = "<group>"; }; |
| | | DB166D8D16A1D1A500A1396C /* SDL_test_imageFace.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_imageFace.c; sourceTree = "<group>"; }; |
| | | DB166D8E16A1D1A500A1396C /* SDL_test_imagePrimitives.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_imagePrimitives.c; sourceTree = "<group>"; }; |
| | | DB166D8F16A1D1A500A1396C /* SDL_test_imagePrimitivesBlend.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_imagePrimitivesBlend.c; sourceTree = "<group>"; }; |
| | | DB166D9016A1D1A500A1396C /* SDL_test_log.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_log.c; sourceTree = "<group>"; }; |
| | | DB166D9116A1D1A500A1396C /* SDL_test_md5.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_md5.c; sourceTree = "<group>"; }; |
| | | DB166D9216A1D1A500A1396C /* SDL_test_random.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_random.c; sourceTree = "<group>"; }; |
| | | DB166DBF16A1D2F600A1396C /* testgesture */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testgesture; sourceTree = BUILT_PRODUCTS_DIR; }; |
| | | DB166DD516A1D36A00A1396C /* testmessage */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testmessage; sourceTree = BUILT_PRODUCTS_DIR; }; |
| | | DB166DEE16A1D50C00A1396C /* testrelative */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testrelative; sourceTree = BUILT_PRODUCTS_DIR; }; |
| | |
| | | DB166E6816A1D6F300A1396C /* testshader */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testshader; sourceTree = BUILT_PRODUCTS_DIR; }; |
| | | DB166E7E16A1D78400A1396C /* testspriteminimal */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testspriteminimal; sourceTree = BUILT_PRODUCTS_DIR; }; |
| | | DB166E9116A1D78C00A1396C /* teststreaming */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = teststreaming; sourceTree = BUILT_PRODUCTS_DIR; }; |
| | | DB166ECF16A1D87000A1396C /* shapes */ = {isa = PBXFileReference; lastKnownFileType = folder; name = shapes; path = ../../test/shapes; sourceTree = "<group>"; }; |
| | | DB166ECF16A1D87000A1396C /* shapes */ = {isa = PBXFileReference; lastKnownFileType = folder; path = shapes; sourceTree = "<group>"; }; |
| | | DB445EF818184B7000B306B0 /* testdropfile.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = testdropfile.app; sourceTree = BUILT_PRODUCTS_DIR; }; |
| | | DB445EFA18184BB600B306B0 /* testdropfile.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testdropfile.c; path = ../../test/testdropfile.c; sourceTree = "<group>"; }; |
| | | DB445EFA18184BB600B306B0 /* testdropfile.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testdropfile.c; sourceTree = "<group>"; }; |
| | | DB89957E18A19ABA0092407C /* testhotplug */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testhotplug; sourceTree = BUILT_PRODUCTS_DIR; }; |
| | | DB89958318A19B130092407C /* testhotplug.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testhotplug.c; path = ../../test/testhotplug.c; sourceTree = "<group>"; }; |
| | | DBBC552C182831D700F3CA8D /* TestDropFile-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = "TestDropFile-Info.plist"; sourceTree = "<group>"; }; |
| | | DBEC54D11A1A811D005B1EAB /* controllermap.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = controllermap.c; path = ../../test/controllermap.c; sourceTree = "<group>"; }; |
| | | DBEC54D61A1A8145005B1EAB /* axis.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; name = axis.bmp; path = ../../test/axis.bmp; sourceTree = "<group>"; }; |
| | | DBEC54D71A1A8145005B1EAB /* button.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; name = button.bmp; path = ../../test/button.bmp; sourceTree = "<group>"; }; |
| | | DBEC54D81A1A8145005B1EAB /* controllermap.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; name = controllermap.bmp; path = ../../test/controllermap.bmp; sourceTree = "<group>"; }; |
| | | DB89958318A19B130092407C /* testhotplug.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testhotplug.c; sourceTree = "<group>"; }; |
| | | DBBC552C182831D700F3CA8D /* TestDropFile-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "TestDropFile-Info.plist"; sourceTree = SOURCE_ROOT; }; |
| | | DBEC54D11A1A811D005B1EAB /* controllermap.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = controllermap.c; sourceTree = "<group>"; }; |
| | | DBEC54D61A1A8145005B1EAB /* axis.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; path = axis.bmp; sourceTree = "<group>"; }; |
| | | DBEC54D71A1A8145005B1EAB /* button.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; path = button.bmp; sourceTree = "<group>"; }; |
| | | DBEC54D81A1A8145005B1EAB /* controllermap.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; path = controllermap.bmp; sourceTree = "<group>"; }; |
| | | DBEC54EA1A1A81C3005B1EAB /* controllermap */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = controllermap; sourceTree = BUILT_PRODUCTS_DIR; }; |
| | | FA73672219A54A90004122E4 /* CoreVideo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreVideo.framework; path = /System/Library/Frameworks/CoreVideo.framework; sourceTree = "<absolute>"; }; |
| | | /* End PBXFileReference section */ |
| | |
| | | 00794E6309D20839003FC8A1 /* utf8.txt */, |
| | | ); |
| | | name = Resources; |
| | | path = ../../test; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | 08FB7794FE84155DC02AAC07 /* SDLTest */ = { |
| | |
| | | 083E4887006D86A17F000001 /* torturethread.c */, |
| | | ); |
| | | name = Source; |
| | | path = ../../test; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | 1AB674ADFE9D54B511CA2CBB /* Products */ = { |
| | |
| | | DB166D9216A1D1A500A1396C /* SDL_test_random.c */, |
| | | ); |
| | | name = SDL_Test; |
| | | path = ../../src/test; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | /* End PBXGroup section */ |
| | |
| | | 002A85B21073008E007319AE /* Debug */ = { |
| | | isa = XCBuildConfiguration; |
| | | buildSettings = { |
| | | ALWAYS_SEARCH_USER_PATHS = NO; |
| | | FRAMEWORK_SEARCH_PATHS = ( |
| | | "$(SRCROOT)/../SDL/build/$(CONFIGURATION)", |
| | | "$(HOME)/Library/Frameworks", |
| | |
| | | 002A85D41073009D007319AE /* Release */ = { |
| | | isa = XCBuildConfiguration; |
| | | buildSettings = { |
| | | ALWAYS_SEARCH_USER_PATHS = NO; |
| | | FRAMEWORK_SEARCH_PATHS = ( |
| | | "$(SRCROOT)/../SDL/build/$(CONFIGURATION)", |
| | | "$(HOME)/Library/Frameworks", |
| | |
| | | } |
| | | |
| | | android { |
| | | compileSdkVersion 19 |
| | | buildToolsVersion "26.0.1" |
| | | compileSdkVersion 26 |
| | | defaultConfig { |
| | | if (buildAsApplication) { |
| | | applicationId "org.libsdl.app" |
| | | } |
| | | minSdkVersion 14 |
| | | targetSdkVersion 19 |
| | | targetSdkVersion 26 |
| | | versionCode 1 |
| | | versionName "1.0" |
| | | externalNativeBuild { |
| | | ndkBuild { |
| | | arguments "APP_PLATFORM=android-14" |
| | | abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64' |
| | | } |
| | | } |
| | | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" |
| | | } |
| | | buildTypes { |
| | | release { |
| | |
| | | } |
| | | |
| | | dependencies { |
| | | compile fileTree(include: ['*.jar'], dir: 'libs') |
| | | androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { |
| | | exclude group: 'com.android.support', module: 'support-annotations' |
| | | }) |
| | | testCompile 'junit:junit:4.12' |
| | | implementation fileTree(include: ['*.jar'], dir: 'libs') |
| | | } |
| | |
| | | |
| | | # Uncomment this if you're using STL in your project |
| | | # See CPLUSPLUS-SUPPORT.html in the NDK documentation for more information |
| | | # APP_STL := stlport_static |
| | | # You can find more information here: |
| | | # https://developer.android.com/ndk/guides/cpp-support |
| | | # APP_STL := c++_shared |
| | | |
| | | APP_ABI := armeabi-v7a arm64-v8a x86 x86_64 |
| | | |
| | |
| | | android:versionName="1.0" |
| | | android:installLocation="auto"> |
| | | |
| | | <!-- Android 4.0.1 --> |
| | | <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="16" /> |
| | | |
| | | <!-- OpenGL ES 2.0 --> |
| | | <uses-feature android:glEsVersion="0x00020000" /> |
| | | |
| | | <!-- Touchscreen support --> |
| | | <uses-feature |
| | | android:name="android.hardware.touchscreen" |
| | | android:required="false" /> |
| | | |
| | | <!-- Game controller support --> |
| | | <uses-feature |
| | | android:name="android.hardware.gamepad" |
| | | android:required="false" /> |
| | | |
| | | <!-- External mouse input events --> |
| | | <uses-feature |
| | | android:name="android.hardware.type.pc" |
| | | android:required="false" /> |
| | | |
| | | <!-- Allow writing to external storage --> |
| | | <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> |
| | | <!-- Allow access to the vibrator --> |
| New file |
| | |
| | | package org.libsdl.app; |
| | | |
| | | interface HIDDevice |
| | | { |
| | | public int getId(); |
| | | public int getVendorId(); |
| | | public int getProductId(); |
| | | public String getSerialNumber(); |
| | | public int getVersion(); |
| | | public String getManufacturerName(); |
| | | public String getProductName(); |
| | | public boolean open(); |
| | | public int sendFeatureReport(byte[] report); |
| | | public int sendOutputReport(byte[] report); |
| | | public boolean getFeatureReport(byte[] report); |
| | | public void setFrozen(boolean frozen); |
| | | public void close(); |
| | | public void shutdown(); |
| | | } |
| New file |
| | |
| | | package org.libsdl.app; |
| | | |
| | | import android.content.Context; |
| | | import android.bluetooth.BluetoothDevice; |
| | | import android.bluetooth.BluetoothGatt; |
| | | import android.bluetooth.BluetoothGattCallback; |
| | | import android.bluetooth.BluetoothGattCharacteristic; |
| | | import android.bluetooth.BluetoothGattDescriptor; |
| | | import android.bluetooth.BluetoothManager; |
| | | import android.bluetooth.BluetoothProfile; |
| | | import android.bluetooth.BluetoothGattService; |
| | | import android.os.Handler; |
| | | import android.os.Looper; |
| | | import android.util.Log; |
| | | |
| | | //import com.android.internal.util.HexDump; |
| | | |
| | | import java.lang.Runnable; |
| | | import java.lang.reflect.InvocationTargetException; |
| | | import java.lang.reflect.Method; |
| | | import java.util.Arrays; |
| | | import java.util.LinkedList; |
| | | import java.util.UUID; |
| | | |
| | | class HIDDeviceBLESteamController extends BluetoothGattCallback implements HIDDevice { |
| | | |
| | | private static final String TAG = "hidapi"; |
| | | private HIDDeviceManager mManager; |
| | | private BluetoothDevice mDevice; |
| | | private int mDeviceId; |
| | | private BluetoothGatt mGatt; |
| | | private boolean mIsRegistered = false; |
| | | private boolean mIsConnected = false; |
| | | private boolean mIsChromebook = false; |
| | | private boolean mIsReconnecting = false; |
| | | private boolean mFrozen = false; |
| | | private LinkedList<GattOperation> mOperations; |
| | | GattOperation mCurrentOperation = null; |
| | | private Handler mHandler; |
| | | |
| | | private static final int TRANSPORT_AUTO = 0; |
| | | private static final int TRANSPORT_BREDR = 1; |
| | | private static final int TRANSPORT_LE = 2; |
| | | |
| | | private static final int CHROMEBOOK_CONNECTION_CHECK_INTERVAL = 10000; |
| | | |
| | | static public final UUID steamControllerService = UUID.fromString("100F6C32-1735-4313-B402-38567131E5F3"); |
| | | static public final UUID inputCharacteristic = UUID.fromString("100F6C33-1735-4313-B402-38567131E5F3"); |
| | | static public final UUID reportCharacteristic = UUID.fromString("100F6C34-1735-4313-B402-38567131E5F3"); |
| | | static private final byte[] enterValveMode = new byte[] { (byte)0xC0, (byte)0x87, 0x03, 0x08, 0x07, 0x00 }; |
| | | |
| | | static class GattOperation { |
| | | private enum Operation { |
| | | CHR_READ, |
| | | CHR_WRITE, |
| | | ENABLE_NOTIFICATION |
| | | } |
| | | |
| | | Operation mOp; |
| | | UUID mUuid; |
| | | byte[] mValue; |
| | | BluetoothGatt mGatt; |
| | | boolean mResult = true; |
| | | |
| | | private GattOperation(BluetoothGatt gatt, GattOperation.Operation operation, UUID uuid) { |
| | | mGatt = gatt; |
| | | mOp = operation; |
| | | mUuid = uuid; |
| | | } |
| | | |
| | | private GattOperation(BluetoothGatt gatt, GattOperation.Operation operation, UUID uuid, byte[] value) { |
| | | mGatt = gatt; |
| | | mOp = operation; |
| | | mUuid = uuid; |
| | | mValue = value; |
| | | } |
| | | |
| | | public void run() { |
| | | // This is executed in main thread |
| | | BluetoothGattCharacteristic chr; |
| | | |
| | | switch (mOp) { |
| | | case CHR_READ: |
| | | chr = getCharacteristic(mUuid); |
| | | //Log.v(TAG, "Reading characteristic " + chr.getUuid()); |
| | | if (!mGatt.readCharacteristic(chr)) { |
| | | Log.e(TAG, "Unable to read characteristic " + mUuid.toString()); |
| | | mResult = false; |
| | | break; |
| | | } |
| | | mResult = true; |
| | | break; |
| | | case CHR_WRITE: |
| | | chr = getCharacteristic(mUuid); |
| | | //Log.v(TAG, "Writing characteristic " + chr.getUuid() + " value=" + HexDump.toHexString(value)); |
| | | chr.setValue(mValue); |
| | | if (!mGatt.writeCharacteristic(chr)) { |
| | | Log.e(TAG, "Unable to write characteristic " + mUuid.toString()); |
| | | mResult = false; |
| | | break; |
| | | } |
| | | mResult = true; |
| | | break; |
| | | case ENABLE_NOTIFICATION: |
| | | chr = getCharacteristic(mUuid); |
| | | //Log.v(TAG, "Writing descriptor of " + chr.getUuid()); |
| | | if (chr != null) { |
| | | BluetoothGattDescriptor cccd = chr.getDescriptor(UUID.fromString("00002902-0000-1000-8000-00805f9b34fb")); |
| | | if (cccd != null) { |
| | | int properties = chr.getProperties(); |
| | | byte[] value; |
| | | if ((properties & BluetoothGattCharacteristic.PROPERTY_NOTIFY) == BluetoothGattCharacteristic.PROPERTY_NOTIFY) { |
| | | value = BluetoothGattDescriptor.ENABLE_NOTIFICATION_VALUE; |
| | | } else if ((properties & BluetoothGattCharacteristic.PROPERTY_INDICATE) == BluetoothGattCharacteristic.PROPERTY_INDICATE) { |
| | | value = BluetoothGattDescriptor.ENABLE_INDICATION_VALUE; |
| | | } else { |
| | | Log.e(TAG, "Unable to start notifications on input characteristic"); |
| | | mResult = false; |
| | | return; |
| | | } |
| | | |
| | | mGatt.setCharacteristicNotification(chr, true); |
| | | cccd.setValue(value); |
| | | if (!mGatt.writeDescriptor(cccd)) { |
| | | Log.e(TAG, "Unable to write descriptor " + mUuid.toString()); |
| | | mResult = false; |
| | | return; |
| | | } |
| | | mResult = true; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | public boolean finish() { |
| | | return mResult; |
| | | } |
| | | |
| | | private BluetoothGattCharacteristic getCharacteristic(UUID uuid) { |
| | | BluetoothGattService valveService = mGatt.getService(steamControllerService); |
| | | if (valveService == null) |
| | | return null; |
| | | return valveService.getCharacteristic(uuid); |
| | | } |
| | | |
| | | static public GattOperation readCharacteristic(BluetoothGatt gatt, UUID uuid) { |
| | | return new GattOperation(gatt, Operation.CHR_READ, uuid); |
| | | } |
| | | |
| | | static public GattOperation writeCharacteristic(BluetoothGatt gatt, UUID uuid, byte[] value) { |
| | | return new GattOperation(gatt, Operation.CHR_WRITE, uuid, value); |
| | | } |
| | | |
| | | static public GattOperation enableNotification(BluetoothGatt gatt, UUID uuid) { |
| | | return new GattOperation(gatt, Operation.ENABLE_NOTIFICATION, uuid); |
| | | } |
| | | } |
| | | |
| | | public HIDDeviceBLESteamController(HIDDeviceManager manager, BluetoothDevice device) { |
| | | mManager = manager; |
| | | mDevice = device; |
| | | mDeviceId = mManager.getDeviceIDForIdentifier(getIdentifier()); |
| | | mIsRegistered = false; |
| | | mIsChromebook = mManager.getContext().getPackageManager().hasSystemFeature("org.chromium.arc.device_management"); |
| | | mOperations = new LinkedList<GattOperation>(); |
| | | mHandler = new Handler(Looper.getMainLooper()); |
| | | |
| | | mGatt = connectGatt(); |
| | | final HIDDeviceBLESteamController finalThis = this; |
| | | mHandler.postDelayed(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | finalThis.checkConnectionForChromebookIssue(); |
| | | } |
| | | }, CHROMEBOOK_CONNECTION_CHECK_INTERVAL); |
| | | } |
| | | |
| | | public String getIdentifier() { |
| | | return String.format("SteamController.%s", mDevice.getAddress()); |
| | | } |
| | | |
| | | public BluetoothGatt getGatt() { |
| | | return mGatt; |
| | | } |
| | | |
| | | // Because on Chromebooks we show up as a dual-mode device, it will attempt to connect TRANSPORT_AUTO, which will use TRANSPORT_BREDR instead |
| | | // of TRANSPORT_LE. Let's force ourselves to connect low energy. |
| | | private BluetoothGatt connectGatt(boolean managed) { |
| | | try { |
| | | Method m = mDevice.getClass().getDeclaredMethod("connectGatt", Context.class, boolean.class, BluetoothGattCallback.class, int.class); |
| | | return (BluetoothGatt) m.invoke(mDevice, mManager.getContext(), managed, this, TRANSPORT_LE); |
| | | } catch (Exception e) { |
| | | return mDevice.connectGatt(mManager.getContext(), managed, this); |
| | | } |
| | | } |
| | | |
| | | private BluetoothGatt connectGatt() { |
| | | return connectGatt(false); |
| | | } |
| | | |
| | | protected int getConnectionState() { |
| | | |
| | | Context context = mManager.getContext(); |
| | | if (context == null) { |
| | | // We are lacking any context to get our Bluetooth information. We'll just assume disconnected. |
| | | return BluetoothProfile.STATE_DISCONNECTED; |
| | | } |
| | | |
| | | BluetoothManager btManager = (BluetoothManager)context.getSystemService(Context.BLUETOOTH_SERVICE); |
| | | if (btManager == null) { |
| | | // This device doesn't support Bluetooth. We should never be here, because how did |
| | | // we instantiate a device to start with? |
| | | return BluetoothProfile.STATE_DISCONNECTED; |
| | | } |
| | | |
| | | return btManager.getConnectionState(mDevice, BluetoothProfile.GATT); |
| | | } |
| | | |
| | | public void reconnect() { |
| | | |
| | | if (getConnectionState() != BluetoothProfile.STATE_CONNECTED) { |
| | | mGatt.disconnect(); |
| | | mGatt = connectGatt(); |
| | | } |
| | | |
| | | } |
| | | |
| | | protected void checkConnectionForChromebookIssue() { |
| | | if (!mIsChromebook) { |
| | | // We only do this on Chromebooks, because otherwise it's really annoying to just attempt |
| | | // over and over. |
| | | return; |
| | | } |
| | | |
| | | int connectionState = getConnectionState(); |
| | | |
| | | switch (connectionState) { |
| | | case BluetoothProfile.STATE_CONNECTED: |
| | | if (!mIsConnected) { |
| | | // We are in the Bad Chromebook Place. We can force a disconnect |
| | | // to try to recover. |
| | | Log.v(TAG, "Chromebook: We are in a very bad state; the controller shows as connected in the underlying Bluetooth layer, but we never received a callback. Forcing a reconnect."); |
| | | mIsReconnecting = true; |
| | | mGatt.disconnect(); |
| | | mGatt = connectGatt(false); |
| | | break; |
| | | } |
| | | else if (!isRegistered()) { |
| | | if (mGatt.getServices().size() > 0) { |
| | | Log.v(TAG, "Chromebook: We are connected to a controller, but never got our registration. Trying to recover."); |
| | | probeService(this); |
| | | } |
| | | else { |
| | | Log.v(TAG, "Chromebook: We are connected to a controller, but never discovered services. Trying to recover."); |
| | | mIsReconnecting = true; |
| | | mGatt.disconnect(); |
| | | mGatt = connectGatt(false); |
| | | break; |
| | | } |
| | | } |
| | | else { |
| | | Log.v(TAG, "Chromebook: We are connected, and registered. Everything's good!"); |
| | | return; |
| | | } |
| | | break; |
| | | |
| | | case BluetoothProfile.STATE_DISCONNECTED: |
| | | Log.v(TAG, "Chromebook: We have either been disconnected, or the Chromebook BtGatt.ContextMap bug has bitten us. Attempting a disconnect/reconnect, but we may not be able to recover."); |
| | | |
| | | mIsReconnecting = true; |
| | | mGatt.disconnect(); |
| | | mGatt = connectGatt(false); |
| | | break; |
| | | |
| | | case BluetoothProfile.STATE_CONNECTING: |
| | | Log.v(TAG, "Chromebook: We're still trying to connect. Waiting a bit longer."); |
| | | break; |
| | | } |
| | | |
| | | final HIDDeviceBLESteamController finalThis = this; |
| | | mHandler.postDelayed(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | finalThis.checkConnectionForChromebookIssue(); |
| | | } |
| | | }, CHROMEBOOK_CONNECTION_CHECK_INTERVAL); |
| | | } |
| | | |
| | | private boolean isRegistered() { |
| | | return mIsRegistered; |
| | | } |
| | | |
| | | private void setRegistered() { |
| | | mIsRegistered = true; |
| | | } |
| | | |
| | | private boolean probeService(HIDDeviceBLESteamController controller) { |
| | | |
| | | if (isRegistered()) { |
| | | return true; |
| | | } |
| | | |
| | | if (!mIsConnected) { |
| | | return false; |
| | | } |
| | | |
| | | Log.v(TAG, "probeService controller=" + controller); |
| | | |
| | | for (BluetoothGattService service : mGatt.getServices()) { |
| | | if (service.getUuid().equals(steamControllerService)) { |
| | | Log.v(TAG, "Found Valve steam controller service " + service.getUuid()); |
| | | |
| | | for (BluetoothGattCharacteristic chr : service.getCharacteristics()) { |
| | | if (chr.getUuid().equals(inputCharacteristic)) { |
| | | Log.v(TAG, "Found input characteristic"); |
| | | // Start notifications |
| | | BluetoothGattDescriptor cccd = chr.getDescriptor(UUID.fromString("00002902-0000-1000-8000-00805f9b34fb")); |
| | | if (cccd != null) { |
| | | enableNotification(chr.getUuid()); |
| | | } |
| | | } |
| | | } |
| | | return true; |
| | | } |
| | | } |
| | | |
| | | if ((mGatt.getServices().size() == 0) && mIsChromebook && !mIsReconnecting) { |
| | | Log.e(TAG, "Chromebook: Discovered services were empty; this almost certainly means the BtGatt.ContextMap bug has bitten us."); |
| | | mIsConnected = false; |
| | | mIsReconnecting = true; |
| | | mGatt.disconnect(); |
| | | mGatt = connectGatt(false); |
| | | } |
| | | |
| | | return false; |
| | | } |
| | | |
| | | ////////////////////////////////////////////////////////////////////////////////////////////////////// |
| | | ////////////////////////////////////////////////////////////////////////////////////////////////////// |
| | | ////////////////////////////////////////////////////////////////////////////////////////////////////// |
| | | |
| | | private void finishCurrentGattOperation() { |
| | | GattOperation op = null; |
| | | synchronized (mOperations) { |
| | | if (mCurrentOperation != null) { |
| | | op = mCurrentOperation; |
| | | mCurrentOperation = null; |
| | | } |
| | | } |
| | | if (op != null) { |
| | | boolean result = op.finish(); // TODO: Maybe in main thread as well? |
| | | |
| | | // Our operation failed, let's add it back to the beginning of our queue. |
| | | if (!result) { |
| | | mOperations.addFirst(op); |
| | | } |
| | | } |
| | | executeNextGattOperation(); |
| | | } |
| | | |
| | | private void executeNextGattOperation() { |
| | | synchronized (mOperations) { |
| | | if (mCurrentOperation != null) |
| | | return; |
| | | |
| | | if (mOperations.isEmpty()) |
| | | return; |
| | | |
| | | mCurrentOperation = mOperations.removeFirst(); |
| | | } |
| | | |
| | | // Run in main thread |
| | | mHandler.post(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | synchronized (mOperations) { |
| | | if (mCurrentOperation == null) { |
| | | Log.e(TAG, "Current operation null in executor?"); |
| | | return; |
| | | } |
| | | |
| | | mCurrentOperation.run(); |
| | | // now wait for the GATT callback and when it comes, finish this operation |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | |
| | | private void queueGattOperation(GattOperation op) { |
| | | synchronized (mOperations) { |
| | | mOperations.add(op); |
| | | } |
| | | executeNextGattOperation(); |
| | | } |
| | | |
| | | private void enableNotification(UUID chrUuid) { |
| | | GattOperation op = HIDDeviceBLESteamController.GattOperation.enableNotification(mGatt, chrUuid); |
| | | queueGattOperation(op); |
| | | } |
| | | |
| | | public void writeCharacteristic(UUID uuid, byte[] value) { |
| | | GattOperation op = HIDDeviceBLESteamController.GattOperation.writeCharacteristic(mGatt, uuid, value); |
| | | queueGattOperation(op); |
| | | } |
| | | |
| | | public void readCharacteristic(UUID uuid) { |
| | | GattOperation op = HIDDeviceBLESteamController.GattOperation.readCharacteristic(mGatt, uuid); |
| | | queueGattOperation(op); |
| | | } |
| | | |
| | | ////////////////////////////////////////////////////////////////////////////////////////////////////// |
| | | ////////////// BluetoothGattCallback overridden methods |
| | | ////////////////////////////////////////////////////////////////////////////////////////////////////// |
| | | |
| | | public void onConnectionStateChange(BluetoothGatt g, int status, int newState) { |
| | | //Log.v(TAG, "onConnectionStateChange status=" + status + " newState=" + newState); |
| | | mIsReconnecting = false; |
| | | if (newState == 2) { |
| | | mIsConnected = true; |
| | | // Run directly, without GattOperation |
| | | if (!isRegistered()) { |
| | | mHandler.post(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | mGatt.discoverServices(); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | else if (newState == 0) { |
| | | mIsConnected = false; |
| | | } |
| | | |
| | | // Disconnection is handled in SteamLink using the ACTION_ACL_DISCONNECTED Intent. |
| | | } |
| | | |
| | | public void onServicesDiscovered(BluetoothGatt gatt, int status) { |
| | | //Log.v(TAG, "onServicesDiscovered status=" + status); |
| | | if (status == 0) { |
| | | if (gatt.getServices().size() == 0) { |
| | | Log.v(TAG, "onServicesDiscovered returned zero services; something has gone horribly wrong down in Android's Bluetooth stack."); |
| | | mIsReconnecting = true; |
| | | mIsConnected = false; |
| | | gatt.disconnect(); |
| | | mGatt = connectGatt(false); |
| | | } |
| | | else { |
| | | probeService(this); |
| | | } |
| | | } |
| | | } |
| | | |
| | | public void onCharacteristicRead(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic, int status) { |
| | | //Log.v(TAG, "onCharacteristicRead status=" + status + " uuid=" + characteristic.getUuid()); |
| | | |
| | | if (characteristic.getUuid().equals(reportCharacteristic) && !mFrozen) { |
| | | mManager.HIDDeviceFeatureReport(getId(), characteristic.getValue()); |
| | | } |
| | | |
| | | finishCurrentGattOperation(); |
| | | } |
| | | |
| | | public void onCharacteristicWrite(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic, int status) { |
| | | //Log.v(TAG, "onCharacteristicWrite status=" + status + " uuid=" + characteristic.getUuid()); |
| | | |
| | | if (characteristic.getUuid().equals(reportCharacteristic)) { |
| | | // Only register controller with the native side once it has been fully configured |
| | | if (!isRegistered()) { |
| | | Log.v(TAG, "Registering Steam Controller with ID: " + getId()); |
| | | mManager.HIDDeviceConnected(getId(), getIdentifier(), getVendorId(), getProductId(), getSerialNumber(), getVersion(), getManufacturerName(), getProductName(), 0); |
| | | setRegistered(); |
| | | } |
| | | } |
| | | |
| | | finishCurrentGattOperation(); |
| | | } |
| | | |
| | | public void onCharacteristicChanged(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic) { |
| | | // Enable this for verbose logging of controller input reports |
| | | //Log.v(TAG, "onCharacteristicChanged uuid=" + characteristic.getUuid() + " data=" + HexDump.dumpHexString(characteristic.getValue())); |
| | | |
| | | if (characteristic.getUuid().equals(inputCharacteristic) && !mFrozen) { |
| | | mManager.HIDDeviceInputReport(getId(), characteristic.getValue()); |
| | | } |
| | | } |
| | | |
| | | public void onDescriptorRead(BluetoothGatt gatt, BluetoothGattDescriptor descriptor, int status) { |
| | | //Log.v(TAG, "onDescriptorRead status=" + status); |
| | | } |
| | | |
| | | public void onDescriptorWrite(BluetoothGatt gatt, BluetoothGattDescriptor descriptor, int status) { |
| | | BluetoothGattCharacteristic chr = descriptor.getCharacteristic(); |
| | | //Log.v(TAG, "onDescriptorWrite status=" + status + " uuid=" + chr.getUuid() + " descriptor=" + descriptor.getUuid()); |
| | | |
| | | if (chr.getUuid().equals(inputCharacteristic)) { |
| | | boolean hasWrittenInputDescriptor = true; |
| | | BluetoothGattCharacteristic reportChr = chr.getService().getCharacteristic(reportCharacteristic); |
| | | if (reportChr != null) { |
| | | Log.v(TAG, "Writing report characteristic to enter valve mode"); |
| | | reportChr.setValue(enterValveMode); |
| | | gatt.writeCharacteristic(reportChr); |
| | | } |
| | | } |
| | | |
| | | finishCurrentGattOperation(); |
| | | } |
| | | |
| | | public void onReliableWriteCompleted(BluetoothGatt gatt, int status) { |
| | | //Log.v(TAG, "onReliableWriteCompleted status=" + status); |
| | | } |
| | | |
| | | public void onReadRemoteRssi(BluetoothGatt gatt, int rssi, int status) { |
| | | //Log.v(TAG, "onReadRemoteRssi status=" + status); |
| | | } |
| | | |
| | | public void onMtuChanged(BluetoothGatt gatt, int mtu, int status) { |
| | | //Log.v(TAG, "onMtuChanged status=" + status); |
| | | } |
| | | |
| | | ////////////////////////////////////////////////////////////////////////////////////////////////////// |
| | | //////// Public API |
| | | ////////////////////////////////////////////////////////////////////////////////////////////////////// |
| | | |
| | | @Override |
| | | public int getId() { |
| | | return mDeviceId; |
| | | } |
| | | |
| | | @Override |
| | | public int getVendorId() { |
| | | // Valve Corporation |
| | | final int VALVE_USB_VID = 0x28DE; |
| | | return VALVE_USB_VID; |
| | | } |
| | | |
| | | @Override |
| | | public int getProductId() { |
| | | // We don't have an easy way to query from the Bluetooth device, but we know what it is |
| | | final int D0G_BLE2_PID = 0x1106; |
| | | return D0G_BLE2_PID; |
| | | } |
| | | |
| | | @Override |
| | | public String getSerialNumber() { |
| | | // This will be read later via feature report by Steam |
| | | return "12345"; |
| | | } |
| | | |
| | | @Override |
| | | public int getVersion() { |
| | | return 0; |
| | | } |
| | | |
| | | @Override |
| | | public String getManufacturerName() { |
| | | return "Valve Corporation"; |
| | | } |
| | | |
| | | @Override |
| | | public String getProductName() { |
| | | return "Steam Controller"; |
| | | } |
| | | |
| | | @Override |
| | | public boolean open() { |
| | | return true; |
| | | } |
| | | |
| | | @Override |
| | | public int sendFeatureReport(byte[] report) { |
| | | if (!isRegistered()) { |
| | | Log.e(TAG, "Attempted sendFeatureReport before Steam Controller is registered!"); |
| | | if (mIsConnected) { |
| | | probeService(this); |
| | | } |
| | | return -1; |
| | | } |
| | | |
| | | // We need to skip the first byte, as that doesn't go over the air |
| | | byte[] actual_report = Arrays.copyOfRange(report, 1, report.length - 1); |
| | | //Log.v(TAG, "sendFeatureReport " + HexDump.dumpHexString(actual_report)); |
| | | writeCharacteristic(reportCharacteristic, actual_report); |
| | | return report.length; |
| | | } |
| | | |
| | | @Override |
| | | public int sendOutputReport(byte[] report) { |
| | | if (!isRegistered()) { |
| | | Log.e(TAG, "Attempted sendOutputReport before Steam Controller is registered!"); |
| | | if (mIsConnected) { |
| | | probeService(this); |
| | | } |
| | | return -1; |
| | | } |
| | | |
| | | //Log.v(TAG, "sendFeatureReport " + HexDump.dumpHexString(report)); |
| | | writeCharacteristic(reportCharacteristic, report); |
| | | return report.length; |
| | | } |
| | | |
| | | @Override |
| | | public boolean getFeatureReport(byte[] report) { |
| | | if (!isRegistered()) { |
| | | Log.e(TAG, "Attempted getFeatureReport before Steam Controller is registered!"); |
| | | if (mIsConnected) { |
| | | probeService(this); |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | //Log.v(TAG, "getFeatureReport"); |
| | | readCharacteristic(reportCharacteristic); |
| | | return true; |
| | | } |
| | | |
| | | @Override |
| | | public void close() { |
| | | } |
| | | |
| | | @Override |
| | | public void setFrozen(boolean frozen) { |
| | | mFrozen = frozen; |
| | | } |
| | | |
| | | @Override |
| | | public void shutdown() { |
| | | close(); |
| | | |
| | | BluetoothGatt g = mGatt; |
| | | if (g != null) { |
| | | g.disconnect(); |
| | | g.close(); |
| | | mGatt = null; |
| | | } |
| | | mManager = null; |
| | | mIsRegistered = false; |
| | | mIsConnected = false; |
| | | mOperations.clear(); |
| | | } |
| | | |
| | | } |
| | | |
| New file |
| | |
| | | package org.libsdl.app; |
| | | |
| | | import android.app.Activity; |
| | | import android.app.AlertDialog; |
| | | import android.app.PendingIntent; |
| | | import android.bluetooth.BluetoothAdapter; |
| | | import android.bluetooth.BluetoothDevice; |
| | | import android.bluetooth.BluetoothManager; |
| | | import android.bluetooth.BluetoothProfile; |
| | | import android.util.Log; |
| | | import android.content.BroadcastReceiver; |
| | | import android.content.Context; |
| | | import android.content.DialogInterface; |
| | | import android.content.Intent; |
| | | import android.content.IntentFilter; |
| | | import android.content.SharedPreferences; |
| | | import android.content.pm.PackageManager; |
| | | import android.hardware.usb.*; |
| | | import android.os.Handler; |
| | | import android.os.Looper; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | public class HIDDeviceManager { |
| | | private static final String TAG = "hidapi"; |
| | | private static final String ACTION_USB_PERMISSION = "org.libsdl.app.USB_PERMISSION"; |
| | | |
| | | private static HIDDeviceManager sManager; |
| | | private static int sManagerRefCount = 0; |
| | | |
| | | public static HIDDeviceManager acquire(Context context) { |
| | | if (sManagerRefCount == 0) { |
| | | sManager = new HIDDeviceManager(context); |
| | | } |
| | | ++sManagerRefCount; |
| | | return sManager; |
| | | } |
| | | |
| | | public static void release(HIDDeviceManager manager) { |
| | | if (manager == sManager) { |
| | | --sManagerRefCount; |
| | | if (sManagerRefCount == 0) { |
| | | sManager.close(); |
| | | sManager = null; |
| | | } |
| | | } |
| | | } |
| | | |
| | | private Context mContext; |
| | | private HashMap<Integer, HIDDevice> mDevicesById = new HashMap<Integer, HIDDevice>(); |
| | | private HashMap<UsbDevice, HIDDeviceUSB> mUSBDevices = new HashMap<UsbDevice, HIDDeviceUSB>(); |
| | | private HashMap<BluetoothDevice, HIDDeviceBLESteamController> mBluetoothDevices = new HashMap<BluetoothDevice, HIDDeviceBLESteamController>(); |
| | | private int mNextDeviceId = 0; |
| | | private SharedPreferences mSharedPreferences = null; |
| | | private boolean mIsChromebook = false; |
| | | private UsbManager mUsbManager; |
| | | private Handler mHandler; |
| | | private BluetoothManager mBluetoothManager; |
| | | private List<BluetoothDevice> mLastBluetoothDevices; |
| | | |
| | | private final BroadcastReceiver mUsbBroadcast = new BroadcastReceiver() { |
| | | @Override |
| | | public void onReceive(Context context, Intent intent) { |
| | | String action = intent.getAction(); |
| | | if (action.equals(UsbManager.ACTION_USB_DEVICE_ATTACHED)) { |
| | | UsbDevice usbDevice = intent.getParcelableExtra(UsbManager.EXTRA_DEVICE); |
| | | handleUsbDeviceAttached(usbDevice); |
| | | } else if (action.equals(UsbManager.ACTION_USB_DEVICE_DETACHED)) { |
| | | UsbDevice usbDevice = intent.getParcelableExtra(UsbManager.EXTRA_DEVICE); |
| | | handleUsbDeviceDetached(usbDevice); |
| | | } else if (action.equals(HIDDeviceManager.ACTION_USB_PERMISSION)) { |
| | | UsbDevice usbDevice = intent.getParcelableExtra(UsbManager.EXTRA_DEVICE); |
| | | handleUsbDevicePermission(usbDevice, intent.getBooleanExtra(UsbManager.EXTRA_PERMISSION_GRANTED, false)); |
| | | } |
| | | } |
| | | }; |
| | | |
| | | private final BroadcastReceiver mBluetoothBroadcast = new BroadcastReceiver() { |
| | | @Override |
| | | public void onReceive(Context context, Intent intent) { |
| | | String action = intent.getAction(); |
| | | // Bluetooth device was connected. If it was a Steam Controller, handle it |
| | | if (action.equals(BluetoothDevice.ACTION_ACL_CONNECTED)) { |
| | | BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE); |
| | | Log.d(TAG, "Bluetooth device connected: " + device); |
| | | |
| | | if (isSteamController(device)) { |
| | | connectBluetoothDevice(device); |
| | | } |
| | | } |
| | | |
| | | // Bluetooth device was disconnected, remove from controller manager (if any) |
| | | if (action.equals(BluetoothDevice.ACTION_ACL_DISCONNECTED)) { |
| | | BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE); |
| | | Log.d(TAG, "Bluetooth device disconnected: " + device); |
| | | |
| | | disconnectBluetoothDevice(device); |
| | | } |
| | | } |
| | | }; |
| | | |
| | | private HIDDeviceManager(final Context context) { |
| | | mContext = context; |
| | | |
| | | // Make sure we have the HIDAPI library loaded with the native functions |
| | | try { |
| | | SDL.loadLibrary("hidapi"); |
| | | } catch (Throwable e) { |
| | | Log.w(TAG, "Couldn't load hidapi: " + e.toString()); |
| | | |
| | | AlertDialog.Builder builder = new AlertDialog.Builder(context); |
| | | builder.setCancelable(false); |
| | | builder.setTitle("SDL HIDAPI Error"); |
| | | builder.setMessage("Please report the following error to the SDL maintainers: " + e.getMessage()); |
| | | builder.setNegativeButton("Quit", new DialogInterface.OnClickListener() { |
| | | @Override |
| | | public void onClick(DialogInterface dialog, int which) { |
| | | try { |
| | | // If our context is an activity, exit rather than crashing when we can't |
| | | // call our native functions. |
| | | Activity activity = (Activity)context; |
| | | |
| | | activity.finish(); |
| | | } |
| | | catch (ClassCastException cce) { |
| | | // Context wasn't an activity, there's nothing we can do. Give up and return. |
| | | } |
| | | } |
| | | }); |
| | | builder.show(); |
| | | |
| | | return; |
| | | } |
| | | |
| | | HIDDeviceRegisterCallback(); |
| | | |
| | | mSharedPreferences = mContext.getSharedPreferences("hidapi", Context.MODE_PRIVATE); |
| | | mIsChromebook = mContext.getPackageManager().hasSystemFeature("org.chromium.arc.device_management"); |
| | | |
| | | // if (shouldClear) { |
| | | // SharedPreferences.Editor spedit = mSharedPreferences.edit(); |
| | | // spedit.clear(); |
| | | // spedit.commit(); |
| | | // } |
| | | // else |
| | | { |
| | | mNextDeviceId = mSharedPreferences.getInt("next_device_id", 0); |
| | | } |
| | | |
| | | initializeUSB(); |
| | | initializeBluetooth(); |
| | | } |
| | | |
| | | public Context getContext() { |
| | | return mContext; |
| | | } |
| | | |
| | | public int getDeviceIDForIdentifier(String identifier) { |
| | | SharedPreferences.Editor spedit = mSharedPreferences.edit(); |
| | | |
| | | int result = mSharedPreferences.getInt(identifier, 0); |
| | | if (result == 0) { |
| | | result = mNextDeviceId++; |
| | | spedit.putInt("next_device_id", mNextDeviceId); |
| | | } |
| | | |
| | | spedit.putInt(identifier, result); |
| | | spedit.commit(); |
| | | return result; |
| | | } |
| | | |
| | | private void initializeUSB() { |
| | | mUsbManager = (UsbManager)mContext.getSystemService(Context.USB_SERVICE); |
| | | |
| | | /* |
| | | // Logging |
| | | for (UsbDevice device : mUsbManager.getDeviceList().values()) { |
| | | Log.i(TAG,"Path: " + device.getDeviceName()); |
| | | Log.i(TAG,"Manufacturer: " + device.getManufacturerName()); |
| | | Log.i(TAG,"Product: " + device.getProductName()); |
| | | Log.i(TAG,"ID: " + device.getDeviceId()); |
| | | Log.i(TAG,"Class: " + device.getDeviceClass()); |
| | | Log.i(TAG,"Protocol: " + device.getDeviceProtocol()); |
| | | Log.i(TAG,"Vendor ID " + device.getVendorId()); |
| | | Log.i(TAG,"Product ID: " + device.getProductId()); |
| | | Log.i(TAG,"Interface count: " + device.getInterfaceCount()); |
| | | Log.i(TAG,"---------------------------------------"); |
| | | |
| | | // Get interface details |
| | | for (int index = 0; index < device.getInterfaceCount(); index++) { |
| | | UsbInterface mUsbInterface = device.getInterface(index); |
| | | Log.i(TAG," ***** *****"); |
| | | Log.i(TAG," Interface index: " + index); |
| | | Log.i(TAG," Interface ID: " + mUsbInterface.getId()); |
| | | Log.i(TAG," Interface class: " + mUsbInterface.getInterfaceClass()); |
| | | Log.i(TAG," Interface subclass: " + mUsbInterface.getInterfaceSubclass()); |
| | | Log.i(TAG," Interface protocol: " + mUsbInterface.getInterfaceProtocol()); |
| | | Log.i(TAG," Endpoint count: " + mUsbInterface.getEndpointCount()); |
| | | |
| | | // Get endpoint details |
| | | for (int epi = 0; epi < mUsbInterface.getEndpointCount(); epi++) |
| | | { |
| | | UsbEndpoint mEndpoint = mUsbInterface.getEndpoint(epi); |
| | | Log.i(TAG," ++++ ++++ ++++"); |
| | | Log.i(TAG," Endpoint index: " + epi); |
| | | Log.i(TAG," Attributes: " + mEndpoint.getAttributes()); |
| | | Log.i(TAG," Direction: " + mEndpoint.getDirection()); |
| | | Log.i(TAG," Number: " + mEndpoint.getEndpointNumber()); |
| | | Log.i(TAG," Interval: " + mEndpoint.getInterval()); |
| | | Log.i(TAG," Packet size: " + mEndpoint.getMaxPacketSize()); |
| | | Log.i(TAG," Type: " + mEndpoint.getType()); |
| | | } |
| | | } |
| | | } |
| | | Log.i(TAG," No more devices connected."); |
| | | */ |
| | | |
| | | // Register for USB broadcasts and permission completions |
| | | IntentFilter filter = new IntentFilter(); |
| | | filter.addAction(UsbManager.ACTION_USB_DEVICE_ATTACHED); |
| | | filter.addAction(UsbManager.ACTION_USB_DEVICE_DETACHED); |
| | | filter.addAction(HIDDeviceManager.ACTION_USB_PERMISSION); |
| | | mContext.registerReceiver(mUsbBroadcast, filter); |
| | | |
| | | for (UsbDevice usbDevice : mUsbManager.getDeviceList().values()) { |
| | | handleUsbDeviceAttached(usbDevice); |
| | | } |
| | | } |
| | | |
| | | UsbManager getUSBManager() { |
| | | return mUsbManager; |
| | | } |
| | | |
| | | private void shutdownUSB() { |
| | | try { |
| | | mContext.unregisterReceiver(mUsbBroadcast); |
| | | } catch (Exception e) { |
| | | // We may not have registered, that's okay |
| | | } |
| | | } |
| | | |
| | | private boolean isHIDDeviceUSB(UsbDevice usbDevice) { |
| | | for (int interface_number = 0; interface_number < usbDevice.getInterfaceCount(); ++interface_number) { |
| | | if (isHIDDeviceInterface(usbDevice, interface_number)) { |
| | | return true; |
| | | } |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | private boolean isHIDDeviceInterface(UsbDevice usbDevice, int interface_number) { |
| | | UsbInterface usbInterface = usbDevice.getInterface(interface_number); |
| | | if (usbInterface.getInterfaceClass() == UsbConstants.USB_CLASS_HID) { |
| | | return true; |
| | | } |
| | | if (interface_number == 0) { |
| | | if (isXbox360Controller(usbDevice, usbInterface) || isXboxOneController(usbDevice, usbInterface)) { |
| | | return true; |
| | | } |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | private boolean isXbox360Controller(UsbDevice usbDevice, UsbInterface usbInterface) { |
| | | final int XB360_IFACE_SUBCLASS = 93; |
| | | final int XB360_IFACE_PROTOCOL = 1; // Wired only |
| | | final int[] SUPPORTED_VENDORS = { |
| | | 0x0079, // GPD Win 2 |
| | | 0x044f, // Thrustmaster |
| | | 0x045e, // Microsoft |
| | | 0x046d, // Logitech |
| | | 0x056e, // Elecom |
| | | 0x06a3, // Saitek |
| | | 0x0738, // Mad Catz |
| | | 0x07ff, // Mad Catz |
| | | 0x0e6f, // Unknown |
| | | 0x0f0d, // Hori |
| | | 0x11c9, // Nacon |
| | | 0x12ab, // Unknown |
| | | 0x1430, // RedOctane |
| | | 0x146b, // BigBen |
| | | 0x1532, // Razer Sabertooth |
| | | 0x15e4, // Numark |
| | | 0x162e, // Joytech |
| | | 0x1689, // Razer Onza |
| | | 0x1bad, // Harmonix |
| | | 0x24c6, // PowerA |
| | | }; |
| | | |
| | | if (usbInterface.getInterfaceClass() == UsbConstants.USB_CLASS_VENDOR_SPEC && |
| | | usbInterface.getInterfaceSubclass() == XB360_IFACE_SUBCLASS && |
| | | usbInterface.getInterfaceProtocol() == XB360_IFACE_PROTOCOL) { |
| | | int vendor_id = usbDevice.getVendorId(); |
| | | for (int supportedVid : SUPPORTED_VENDORS) { |
| | | if (vendor_id == supportedVid) { |
| | | return true; |
| | | } |
| | | } |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | private boolean isXboxOneController(UsbDevice usbDevice, UsbInterface usbInterface) { |
| | | final int XB1_IFACE_SUBCLASS = 71; |
| | | final int XB1_IFACE_PROTOCOL = 208; |
| | | final int[] SUPPORTED_VENDORS = { |
| | | 0x045e, // Microsoft |
| | | 0x0738, // Mad Catz |
| | | 0x0e6f, // Unknown |
| | | 0x0f0d, // Hori |
| | | 0x1532, // Razer Wildcat |
| | | 0x24c6, // PowerA |
| | | }; |
| | | |
| | | if (usbInterface.getInterfaceClass() == UsbConstants.USB_CLASS_VENDOR_SPEC && |
| | | usbInterface.getInterfaceSubclass() == XB1_IFACE_SUBCLASS && |
| | | usbInterface.getInterfaceProtocol() == XB1_IFACE_PROTOCOL) { |
| | | int vendor_id = usbDevice.getVendorId(); |
| | | for (int supportedVid : SUPPORTED_VENDORS) { |
| | | if (vendor_id == supportedVid) { |
| | | return true; |
| | | } |
| | | } |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | private void handleUsbDeviceAttached(UsbDevice usbDevice) { |
| | | if (isHIDDeviceUSB(usbDevice)) { |
| | | connectHIDDeviceUSB(usbDevice); |
| | | } |
| | | } |
| | | |
| | | private void handleUsbDeviceDetached(UsbDevice usbDevice) { |
| | | HIDDeviceUSB device = mUSBDevices.get(usbDevice); |
| | | if (device == null) |
| | | return; |
| | | |
| | | int id = device.getId(); |
| | | mUSBDevices.remove(usbDevice); |
| | | mDevicesById.remove(id); |
| | | device.shutdown(); |
| | | HIDDeviceDisconnected(id); |
| | | } |
| | | |
| | | private void handleUsbDevicePermission(UsbDevice usbDevice, boolean permission_granted) { |
| | | HIDDeviceUSB device = mUSBDevices.get(usbDevice); |
| | | if (device == null) |
| | | return; |
| | | |
| | | boolean opened = false; |
| | | if (permission_granted) { |
| | | opened = device.open(); |
| | | } |
| | | HIDDeviceOpenResult(device.getId(), opened); |
| | | } |
| | | |
| | | private void connectHIDDeviceUSB(UsbDevice usbDevice) { |
| | | synchronized (this) { |
| | | for (int interface_number = 0; interface_number < usbDevice.getInterfaceCount(); interface_number++) { |
| | | if (isHIDDeviceInterface(usbDevice, interface_number)) { |
| | | HIDDeviceUSB device = new HIDDeviceUSB(this, usbDevice, interface_number); |
| | | int id = device.getId(); |
| | | mUSBDevices.put(usbDevice, device); |
| | | mDevicesById.put(id, device); |
| | | HIDDeviceConnected(id, device.getIdentifier(), device.getVendorId(), device.getProductId(), device.getSerialNumber(), device.getVersion(), device.getManufacturerName(), device.getProductName(), interface_number); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | private void initializeBluetooth() { |
| | | Log.d(TAG, "Initializing Bluetooth"); |
| | | |
| | | if (mContext.getPackageManager().checkPermission(android.Manifest.permission.BLUETOOTH, mContext.getPackageName()) != PackageManager.PERMISSION_GRANTED) { |
| | | Log.d(TAG, "Couldn't initialize Bluetooth, missing android.permission.BLUETOOTH"); |
| | | return; |
| | | } |
| | | |
| | | // Find bonded bluetooth controllers and create SteamControllers for them |
| | | mBluetoothManager = (BluetoothManager)mContext.getSystemService(Context.BLUETOOTH_SERVICE); |
| | | if (mBluetoothManager == null) { |
| | | // This device doesn't support Bluetooth. |
| | | return; |
| | | } |
| | | |
| | | BluetoothAdapter btAdapter = mBluetoothManager.getAdapter(); |
| | | if (btAdapter == null) { |
| | | // This device has Bluetooth support in the codebase, but has no available adapters. |
| | | return; |
| | | } |
| | | |
| | | // Get our bonded devices. |
| | | for (BluetoothDevice device : btAdapter.getBondedDevices()) { |
| | | |
| | | Log.d(TAG, "Bluetooth device available: " + device); |
| | | if (isSteamController(device)) { |
| | | connectBluetoothDevice(device); |
| | | } |
| | | |
| | | } |
| | | |
| | | // NOTE: These don't work on Chromebooks, to my undying dismay. |
| | | IntentFilter filter = new IntentFilter(); |
| | | filter.addAction(BluetoothDevice.ACTION_ACL_CONNECTED); |
| | | filter.addAction(BluetoothDevice.ACTION_ACL_DISCONNECTED); |
| | | mContext.registerReceiver(mBluetoothBroadcast, filter); |
| | | |
| | | if (mIsChromebook) { |
| | | mHandler = new Handler(Looper.getMainLooper()); |
| | | mLastBluetoothDevices = new ArrayList<>(); |
| | | |
| | | // final HIDDeviceManager finalThis = this; |
| | | // mHandler.postDelayed(new Runnable() { |
| | | // @Override |
| | | // public void run() { |
| | | // finalThis.chromebookConnectionHandler(); |
| | | // } |
| | | // }, 5000); |
| | | } |
| | | } |
| | | |
| | | private void shutdownBluetooth() { |
| | | try { |
| | | mContext.unregisterReceiver(mBluetoothBroadcast); |
| | | } catch (Exception e) { |
| | | // We may not have registered, that's okay |
| | | } |
| | | } |
| | | |
| | | // Chromebooks do not pass along ACTION_ACL_CONNECTED / ACTION_ACL_DISCONNECTED properly. |
| | | // This function provides a sort of dummy version of that, watching for changes in the |
| | | // connected devices and attempting to add controllers as things change. |
| | | public void chromebookConnectionHandler() { |
| | | if (!mIsChromebook) { |
| | | return; |
| | | } |
| | | |
| | | ArrayList<BluetoothDevice> disconnected = new ArrayList<>(); |
| | | ArrayList<BluetoothDevice> connected = new ArrayList<>(); |
| | | |
| | | List<BluetoothDevice> currentConnected = mBluetoothManager.getConnectedDevices(BluetoothProfile.GATT); |
| | | |
| | | for (BluetoothDevice bluetoothDevice : currentConnected) { |
| | | if (!mLastBluetoothDevices.contains(bluetoothDevice)) { |
| | | connected.add(bluetoothDevice); |
| | | } |
| | | } |
| | | for (BluetoothDevice bluetoothDevice : mLastBluetoothDevices) { |
| | | if (!currentConnected.contains(bluetoothDevice)) { |
| | | disconnected.add(bluetoothDevice); |
| | | } |
| | | } |
| | | |
| | | mLastBluetoothDevices = currentConnected; |
| | | |
| | | for (BluetoothDevice bluetoothDevice : disconnected) { |
| | | disconnectBluetoothDevice(bluetoothDevice); |
| | | } |
| | | for (BluetoothDevice bluetoothDevice : connected) { |
| | | connectBluetoothDevice(bluetoothDevice); |
| | | } |
| | | |
| | | final HIDDeviceManager finalThis = this; |
| | | mHandler.postDelayed(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | finalThis.chromebookConnectionHandler(); |
| | | } |
| | | }, 10000); |
| | | } |
| | | |
| | | public boolean connectBluetoothDevice(BluetoothDevice bluetoothDevice) { |
| | | Log.v(TAG, "connectBluetoothDevice device=" + bluetoothDevice); |
| | | synchronized (this) { |
| | | if (mBluetoothDevices.containsKey(bluetoothDevice)) { |
| | | Log.v(TAG, "Steam controller with address " + bluetoothDevice + " already exists, attempting reconnect"); |
| | | |
| | | HIDDeviceBLESteamController device = mBluetoothDevices.get(bluetoothDevice); |
| | | device.reconnect(); |
| | | |
| | | return false; |
| | | } |
| | | HIDDeviceBLESteamController device = new HIDDeviceBLESteamController(this, bluetoothDevice); |
| | | int id = device.getId(); |
| | | mBluetoothDevices.put(bluetoothDevice, device); |
| | | mDevicesById.put(id, device); |
| | | |
| | | // The Steam Controller will mark itself connected once initialization is complete |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | public void disconnectBluetoothDevice(BluetoothDevice bluetoothDevice) { |
| | | synchronized (this) { |
| | | HIDDeviceBLESteamController device = mBluetoothDevices.get(bluetoothDevice); |
| | | if (device == null) |
| | | return; |
| | | |
| | | int id = device.getId(); |
| | | mBluetoothDevices.remove(bluetoothDevice); |
| | | mDevicesById.remove(id); |
| | | device.shutdown(); |
| | | HIDDeviceDisconnected(id); |
| | | } |
| | | } |
| | | |
| | | public boolean isSteamController(BluetoothDevice bluetoothDevice) { |
| | | // Sanity check. If you pass in a null device, by definition it is never a Steam Controller. |
| | | if (bluetoothDevice == null) { |
| | | return false; |
| | | } |
| | | |
| | | // If the device has no local name, we really don't want to try an equality check against it. |
| | | if (bluetoothDevice.getName() == null) { |
| | | return false; |
| | | } |
| | | |
| | | return bluetoothDevice.getName().equals("SteamController") && ((bluetoothDevice.getType() & BluetoothDevice.DEVICE_TYPE_LE) != 0); |
| | | } |
| | | |
| | | private void close() { |
| | | shutdownUSB(); |
| | | shutdownBluetooth(); |
| | | synchronized (this) { |
| | | for (HIDDevice device : mDevicesById.values()) { |
| | | device.shutdown(); |
| | | } |
| | | mDevicesById.clear(); |
| | | mBluetoothDevices.clear(); |
| | | HIDDeviceReleaseCallback(); |
| | | } |
| | | } |
| | | |
| | | public void setFrozen(boolean frozen) { |
| | | synchronized (this) { |
| | | for (HIDDevice device : mDevicesById.values()) { |
| | | device.setFrozen(frozen); |
| | | } |
| | | } |
| | | } |
| | | |
| | | ////////////////////////////////////////////////////////////////////////////////////////////////////// |
| | | ////////////////////////////////////////////////////////////////////////////////////////////////////// |
| | | ////////////////////////////////////////////////////////////////////////////////////////////////////// |
| | | |
| | | private HIDDevice getDevice(int id) { |
| | | synchronized (this) { |
| | | HIDDevice result = mDevicesById.get(id); |
| | | if (result == null) { |
| | | Log.v(TAG, "No device for id: " + id); |
| | | Log.v(TAG, "Available devices: " + mDevicesById.keySet()); |
| | | } |
| | | return result; |
| | | } |
| | | } |
| | | |
| | | ////////////////////////////////////////////////////////////////////////////////////////////////////// |
| | | ////////// JNI interface functions |
| | | ////////////////////////////////////////////////////////////////////////////////////////////////////// |
| | | |
| | | public boolean openDevice(int deviceID) { |
| | | // Look to see if this is a USB device and we have permission to access it |
| | | for (HIDDeviceUSB device : mUSBDevices.values()) { |
| | | if (deviceID == device.getId()) { |
| | | UsbDevice usbDevice = device.getDevice(); |
| | | if (!mUsbManager.hasPermission(usbDevice)) { |
| | | HIDDeviceOpenPending(deviceID); |
| | | try { |
| | | mUsbManager.requestPermission(usbDevice, PendingIntent.getBroadcast(mContext, 0, new Intent(HIDDeviceManager.ACTION_USB_PERMISSION), 0)); |
| | | } catch (Exception e) { |
| | | Log.v(TAG, "Couldn't request permission for USB device " + usbDevice); |
| | | HIDDeviceOpenResult(deviceID, false); |
| | | } |
| | | return false; |
| | | } |
| | | break; |
| | | } |
| | | } |
| | | |
| | | try { |
| | | Log.v(TAG, "openDevice deviceID=" + deviceID); |
| | | HIDDevice device; |
| | | device = getDevice(deviceID); |
| | | if (device == null) { |
| | | HIDDeviceDisconnected(deviceID); |
| | | return false; |
| | | } |
| | | |
| | | return device.open(); |
| | | } catch (Exception e) { |
| | | Log.e(TAG, "Got exception: " + Log.getStackTraceString(e)); |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | public int sendOutputReport(int deviceID, byte[] report) { |
| | | try { |
| | | Log.v(TAG, "sendOutputReport deviceID=" + deviceID + " length=" + report.length); |
| | | HIDDevice device; |
| | | device = getDevice(deviceID); |
| | | if (device == null) { |
| | | HIDDeviceDisconnected(deviceID); |
| | | return -1; |
| | | } |
| | | |
| | | return device.sendOutputReport(report); |
| | | } catch (Exception e) { |
| | | Log.e(TAG, "Got exception: " + Log.getStackTraceString(e)); |
| | | } |
| | | return -1; |
| | | } |
| | | |
| | | public int sendFeatureReport(int deviceID, byte[] report) { |
| | | try { |
| | | Log.v(TAG, "sendFeatureReport deviceID=" + deviceID + " length=" + report.length); |
| | | HIDDevice device; |
| | | device = getDevice(deviceID); |
| | | if (device == null) { |
| | | HIDDeviceDisconnected(deviceID); |
| | | return -1; |
| | | } |
| | | |
| | | return device.sendFeatureReport(report); |
| | | } catch (Exception e) { |
| | | Log.e(TAG, "Got exception: " + Log.getStackTraceString(e)); |
| | | } |
| | | return -1; |
| | | } |
| | | |
| | | public boolean getFeatureReport(int deviceID, byte[] report) { |
| | | try { |
| | | Log.v(TAG, "getFeatureReport deviceID=" + deviceID); |
| | | HIDDevice device; |
| | | device = getDevice(deviceID); |
| | | if (device == null) { |
| | | HIDDeviceDisconnected(deviceID); |
| | | return false; |
| | | } |
| | | |
| | | return device.getFeatureReport(report); |
| | | } catch (Exception e) { |
| | | Log.e(TAG, "Got exception: " + Log.getStackTraceString(e)); |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | public void closeDevice(int deviceID) { |
| | | try { |
| | | Log.v(TAG, "closeDevice deviceID=" + deviceID); |
| | | HIDDevice device; |
| | | device = getDevice(deviceID); |
| | | if (device == null) { |
| | | HIDDeviceDisconnected(deviceID); |
| | | return; |
| | | } |
| | | |
| | | device.close(); |
| | | } catch (Exception e) { |
| | | Log.e(TAG, "Got exception: " + Log.getStackTraceString(e)); |
| | | } |
| | | } |
| | | |
| | | |
| | | ////////////////////////////////////////////////////////////////////////////////////////////////////// |
| | | /////////////// Native methods |
| | | ////////////////////////////////////////////////////////////////////////////////////////////////////// |
| | | |
| | | private native void HIDDeviceRegisterCallback(); |
| | | private native void HIDDeviceReleaseCallback(); |
| | | |
| | | native void HIDDeviceConnected(int deviceID, String identifier, int vendorId, int productId, String serial_number, int release_number, String manufacturer_string, String product_string, int interface_number); |
| | | native void HIDDeviceOpenPending(int deviceID); |
| | | native void HIDDeviceOpenResult(int deviceID, boolean opened); |
| | | native void HIDDeviceDisconnected(int deviceID); |
| | | |
| | | native void HIDDeviceInputReport(int deviceID, byte[] report); |
| | | native void HIDDeviceFeatureReport(int deviceID, byte[] report); |
| | | } |
| New file |
| | |
| | | package org.libsdl.app; |
| | | |
| | | import android.hardware.usb.*; |
| | | import android.os.Build; |
| | | import android.util.Log; |
| | | import java.util.Arrays; |
| | | |
| | | class HIDDeviceUSB implements HIDDevice { |
| | | |
| | | private static final String TAG = "hidapi"; |
| | | |
| | | protected HIDDeviceManager mManager; |
| | | protected UsbDevice mDevice; |
| | | protected int mInterface; |
| | | protected int mDeviceId; |
| | | protected UsbDeviceConnection mConnection; |
| | | protected UsbEndpoint mInputEndpoint; |
| | | protected UsbEndpoint mOutputEndpoint; |
| | | protected InputThread mInputThread; |
| | | protected boolean mRunning; |
| | | protected boolean mFrozen; |
| | | |
| | | public HIDDeviceUSB(HIDDeviceManager manager, UsbDevice usbDevice, int interface_number) { |
| | | mManager = manager; |
| | | mDevice = usbDevice; |
| | | mInterface = interface_number; |
| | | mDeviceId = manager.getDeviceIDForIdentifier(getIdentifier()); |
| | | mRunning = false; |
| | | } |
| | | |
| | | public String getIdentifier() { |
| | | return String.format("%s/%x/%x", mDevice.getDeviceName(), mDevice.getVendorId(), mDevice.getProductId()); |
| | | } |
| | | |
| | | @Override |
| | | public int getId() { |
| | | return mDeviceId; |
| | | } |
| | | |
| | | @Override |
| | | public int getVendorId() { |
| | | return mDevice.getVendorId(); |
| | | } |
| | | |
| | | @Override |
| | | public int getProductId() { |
| | | return mDevice.getProductId(); |
| | | } |
| | | |
| | | @Override |
| | | public String getSerialNumber() { |
| | | String result = null; |
| | | if (Build.VERSION.SDK_INT >= 21) { |
| | | result = mDevice.getSerialNumber(); |
| | | } |
| | | if (result == null) { |
| | | result = ""; |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | @Override |
| | | public int getVersion() { |
| | | return 0; |
| | | } |
| | | |
| | | @Override |
| | | public String getManufacturerName() { |
| | | String result = null; |
| | | if (Build.VERSION.SDK_INT >= 21) { |
| | | result = mDevice.getManufacturerName(); |
| | | } |
| | | if (result == null) { |
| | | result = String.format("%x", getVendorId()); |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | @Override |
| | | public String getProductName() { |
| | | String result = null; |
| | | if (Build.VERSION.SDK_INT >= 21) { |
| | | result = mDevice.getProductName(); |
| | | } |
| | | if (result == null) { |
| | | result = String.format("%x", getProductId()); |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | public UsbDevice getDevice() { |
| | | return mDevice; |
| | | } |
| | | |
| | | public String getDeviceName() { |
| | | return getManufacturerName() + " " + getProductName() + "(0x" + String.format("%x", getVendorId()) + "/0x" + String.format("%x", getProductId()) + ")"; |
| | | } |
| | | |
| | | @Override |
| | | public boolean open() { |
| | | mConnection = mManager.getUSBManager().openDevice(mDevice); |
| | | if (mConnection == null) { |
| | | Log.w(TAG, "Unable to open USB device " + getDeviceName()); |
| | | return false; |
| | | } |
| | | |
| | | // Force claim all interfaces |
| | | for (int i = 0; i < mDevice.getInterfaceCount(); i++) { |
| | | UsbInterface iface = mDevice.getInterface(i); |
| | | |
| | | if (!mConnection.claimInterface(iface, true)) { |
| | | Log.w(TAG, "Failed to claim interfaces on USB device " + getDeviceName()); |
| | | close(); |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | // Find the endpoints |
| | | UsbInterface iface = mDevice.getInterface(mInterface); |
| | | for (int j = 0; j < iface.getEndpointCount(); j++) { |
| | | UsbEndpoint endpt = iface.getEndpoint(j); |
| | | switch (endpt.getDirection()) { |
| | | case UsbConstants.USB_DIR_IN: |
| | | if (mInputEndpoint == null) { |
| | | mInputEndpoint = endpt; |
| | | } |
| | | break; |
| | | case UsbConstants.USB_DIR_OUT: |
| | | if (mOutputEndpoint == null) { |
| | | mOutputEndpoint = endpt; |
| | | } |
| | | break; |
| | | } |
| | | } |
| | | |
| | | // Make sure the required endpoints were present |
| | | if (mInputEndpoint == null || mOutputEndpoint == null) { |
| | | Log.w(TAG, "Missing required endpoint on USB device " + getDeviceName()); |
| | | close(); |
| | | return false; |
| | | } |
| | | |
| | | // Start listening for input |
| | | mRunning = true; |
| | | mInputThread = new InputThread(); |
| | | mInputThread.start(); |
| | | |
| | | return true; |
| | | } |
| | | |
| | | @Override |
| | | public int sendFeatureReport(byte[] report) { |
| | | int res = -1; |
| | | int offset = 0; |
| | | int length = report.length; |
| | | boolean skipped_report_id = false; |
| | | byte report_number = report[0]; |
| | | |
| | | if (report_number == 0x0) { |
| | | ++offset; |
| | | --length; |
| | | skipped_report_id = true; |
| | | } |
| | | |
| | | res = mConnection.controlTransfer( |
| | | UsbConstants.USB_TYPE_CLASS | 0x01 /*RECIPIENT_INTERFACE*/ | UsbConstants.USB_DIR_OUT, |
| | | 0x09/*HID set_report*/, |
| | | (3/*HID feature*/ << 8) | report_number, |
| | | 0, |
| | | report, offset, length, |
| | | 1000/*timeout millis*/); |
| | | |
| | | if (res < 0) { |
| | | Log.w(TAG, "sendFeatureReport() returned " + res + " on device " + getDeviceName()); |
| | | return -1; |
| | | } |
| | | |
| | | if (skipped_report_id) { |
| | | ++length; |
| | | } |
| | | return length; |
| | | } |
| | | |
| | | @Override |
| | | public int sendOutputReport(byte[] report) { |
| | | int r = mConnection.bulkTransfer(mOutputEndpoint, report, report.length, 1000); |
| | | if (r != report.length) { |
| | | Log.w(TAG, "sendOutputReport() returned " + r + " on device " + getDeviceName()); |
| | | } |
| | | return r; |
| | | } |
| | | |
| | | @Override |
| | | public boolean getFeatureReport(byte[] report) { |
| | | int res = -1; |
| | | int offset = 0; |
| | | int length = report.length; |
| | | boolean skipped_report_id = false; |
| | | byte report_number = report[0]; |
| | | |
| | | if (report_number == 0x0) { |
| | | /* Offset the return buffer by 1, so that the report ID |
| | | will remain in byte 0. */ |
| | | ++offset; |
| | | --length; |
| | | skipped_report_id = true; |
| | | } |
| | | |
| | | res = mConnection.controlTransfer( |
| | | UsbConstants.USB_TYPE_CLASS | 0x01 /*RECIPIENT_INTERFACE*/ | UsbConstants.USB_DIR_IN, |
| | | 0x01/*HID get_report*/, |
| | | (3/*HID feature*/ << 8) | report_number, |
| | | 0, |
| | | report, offset, length, |
| | | 1000/*timeout millis*/); |
| | | |
| | | if (res < 0) { |
| | | Log.w(TAG, "getFeatureReport() returned " + res + " on device " + getDeviceName()); |
| | | return false; |
| | | } |
| | | |
| | | if (skipped_report_id) { |
| | | ++res; |
| | | ++length; |
| | | } |
| | | |
| | | byte[] data; |
| | | if (res == length) { |
| | | data = report; |
| | | } else { |
| | | data = Arrays.copyOfRange(report, 0, res); |
| | | } |
| | | mManager.HIDDeviceFeatureReport(mDeviceId, data); |
| | | |
| | | return true; |
| | | } |
| | | |
| | | @Override |
| | | public void close() { |
| | | mRunning = false; |
| | | if (mInputThread != null) { |
| | | while (mInputThread.isAlive()) { |
| | | mInputThread.interrupt(); |
| | | try { |
| | | mInputThread.join(); |
| | | } catch (InterruptedException e) { |
| | | // Keep trying until we're done |
| | | } |
| | | } |
| | | mInputThread = null; |
| | | } |
| | | if (mConnection != null) { |
| | | for (int i = 0; i < mDevice.getInterfaceCount(); i++) { |
| | | UsbInterface iface = mDevice.getInterface(i); |
| | | mConnection.releaseInterface(iface); |
| | | } |
| | | mConnection.close(); |
| | | mConnection = null; |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void shutdown() { |
| | | close(); |
| | | mManager = null; |
| | | } |
| | | |
| | | @Override |
| | | public void setFrozen(boolean frozen) { |
| | | mFrozen = frozen; |
| | | } |
| | | |
| | | protected class InputThread extends Thread { |
| | | @Override |
| | | public void run() { |
| | | int packetSize = mInputEndpoint.getMaxPacketSize(); |
| | | byte[] packet = new byte[packetSize]; |
| | | while (mRunning) { |
| | | int r; |
| | | try |
| | | { |
| | | r = mConnection.bulkTransfer(mInputEndpoint, packet, packetSize, 1000); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | Log.v(TAG, "Exception in UsbDeviceConnection bulktransfer: " + e); |
| | | break; |
| | | } |
| | | if (r < 0) { |
| | | // Could be a timeout or an I/O error |
| | | } |
| | | if (r > 0) { |
| | | byte[] data; |
| | | if (r == packetSize) { |
| | | data = packet; |
| | | } else { |
| | | data = Arrays.copyOfRange(packet, 0, r); |
| | | } |
| | | |
| | | if (!mFrozen) { |
| | | mManager.HIDDeviceInputReport(mDeviceId, data); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | import android.content.Context; |
| | | |
| | | import java.lang.reflect.*; |
| | | |
| | | /** |
| | | SDL library initialization |
| | | */ |
| | |
| | | return mContext; |
| | | } |
| | | |
| | | public static void loadLibrary(String libraryName) throws UnsatisfiedLinkError, SecurityException, NullPointerException { |
| | | |
| | | if (libraryName == null) { |
| | | throw new NullPointerException("No library name provided."); |
| | | } |
| | | |
| | | try { |
| | | // Let's see if we have ReLinker available in the project. This is necessary for |
| | | // some projects that have huge numbers of local libraries bundled, and thus may |
| | | // trip a bug in Android's native library loader which ReLinker works around. (If |
| | | // loadLibrary works properly, ReLinker will simply use the normal Android method |
| | | // internally.) |
| | | // |
| | | // To use ReLinker, just add it as a dependency. For more information, see |
| | | // https://github.com/KeepSafe/ReLinker for ReLinker's repository. |
| | | // |
| | | Class relinkClass = mContext.getClassLoader().loadClass("com.getkeepsafe.relinker.ReLinker"); |
| | | Class relinkListenerClass = mContext.getClassLoader().loadClass("com.getkeepsafe.relinker.ReLinker$LoadListener"); |
| | | Class contextClass = mContext.getClassLoader().loadClass("android.content.Context"); |
| | | Class stringClass = mContext.getClassLoader().loadClass("java.lang.String"); |
| | | |
| | | // Get a 'force' instance of the ReLinker, so we can ensure libraries are reinstalled if |
| | | // they've changed during updates. |
| | | Method forceMethod = relinkClass.getDeclaredMethod("force"); |
| | | Object relinkInstance = forceMethod.invoke(null); |
| | | Class relinkInstanceClass = relinkInstance.getClass(); |
| | | |
| | | // Actually load the library! |
| | | Method loadMethod = relinkInstanceClass.getDeclaredMethod("loadLibrary", contextClass, stringClass, stringClass, relinkListenerClass); |
| | | loadMethod.invoke(relinkInstance, mContext, libraryName, null, null); |
| | | } |
| | | catch (final Throwable e) { |
| | | // Fall back |
| | | try { |
| | | System.loadLibrary(libraryName); |
| | | } |
| | | catch (final UnsatisfiedLinkError ule) { |
| | | throw ule; |
| | | } |
| | | catch (final SecurityException se) { |
| | | throw se; |
| | | } |
| | | } |
| | | } |
| | | |
| | | protected static Context mContext; |
| | | } |
| | |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.util.Arrays; |
| | | import java.util.Hashtable; |
| | | import java.lang.reflect.Method; |
| | | import java.lang.Math; |
| | | |
| | | import android.app.*; |
| | | import android.content.*; |
| | |
| | | /** |
| | | SDL Activity |
| | | */ |
| | | public class SDLActivity extends Activity { |
| | | public class SDLActivity extends Activity implements View.OnSystemUiVisibilityChangeListener { |
| | | private static final String TAG = "SDL"; |
| | | |
| | | public static boolean mIsResumedCalled, mIsSurfaceReady, mHasFocus; |
| | | |
| | | // Cursor types |
| | | private static final int SDL_SYSTEM_CURSOR_NONE = -1; |
| | | private static final int SDL_SYSTEM_CURSOR_ARROW = 0; |
| | | private static final int SDL_SYSTEM_CURSOR_IBEAM = 1; |
| | | private static final int SDL_SYSTEM_CURSOR_WAIT = 2; |
| | | private static final int SDL_SYSTEM_CURSOR_CROSSHAIR = 3; |
| | | private static final int SDL_SYSTEM_CURSOR_WAITARROW = 4; |
| | | private static final int SDL_SYSTEM_CURSOR_SIZENWSE = 5; |
| | | private static final int SDL_SYSTEM_CURSOR_SIZENESW = 6; |
| | | private static final int SDL_SYSTEM_CURSOR_SIZEWE = 7; |
| | | private static final int SDL_SYSTEM_CURSOR_SIZENS = 8; |
| | | private static final int SDL_SYSTEM_CURSOR_SIZEALL = 9; |
| | | private static final int SDL_SYSTEM_CURSOR_NO = 10; |
| | | private static final int SDL_SYSTEM_CURSOR_HAND = 11; |
| | | |
| | | protected static final int SDL_ORIENTATION_UNKNOWN = 0; |
| | | protected static final int SDL_ORIENTATION_LANDSCAPE = 1; |
| | | protected static final int SDL_ORIENTATION_LANDSCAPE_FLIPPED = 2; |
| | | protected static final int SDL_ORIENTATION_PORTRAIT = 3; |
| | | protected static final int SDL_ORIENTATION_PORTRAIT_FLIPPED = 4; |
| | | |
| | | protected static int mCurrentOrientation; |
| | | |
| | | // Handle the state of the native layer |
| | | public enum NativeState { |
| | |
| | | protected static boolean mScreenKeyboardShown; |
| | | protected static ViewGroup mLayout; |
| | | protected static SDLClipboardHandler mClipboardHandler; |
| | | |
| | | protected static Hashtable<Integer, Object> mCursors; |
| | | protected static int mLastCursorID; |
| | | protected static SDLGenericMotionListener_API12 mMotionListener; |
| | | protected static HIDDeviceManager mHIDDeviceManager; |
| | | |
| | | // This is what SDL runs in. It invokes SDL_main(), eventually |
| | | protected static Thread mSDLThread; |
| | | |
| | | protected static SDLGenericMotionListener_API12 getMotionListener() { |
| | | if (mMotionListener == null) { |
| | | if (Build.VERSION.SDK_INT >= 26) { |
| | | mMotionListener = new SDLGenericMotionListener_API26(); |
| | | } else |
| | | if (Build.VERSION.SDK_INT >= 24) { |
| | | mMotionListener = new SDLGenericMotionListener_API24(); |
| | | } else { |
| | | mMotionListener = new SDLGenericMotionListener_API12(); |
| | | } |
| | | } |
| | | |
| | | return mMotionListener; |
| | | } |
| | | |
| | | /** |
| | | * This method returns the name of the shared object with the application entry point |
| | |
| | | } else { |
| | | library = "libmain.so"; |
| | | } |
| | | return library; |
| | | return getContext().getApplicationInfo().nativeLibraryDir + "/" + library; |
| | | } |
| | | |
| | | /** |
| | |
| | | // Load the .so |
| | | public void loadLibraries() { |
| | | for (String lib : getLibraries()) { |
| | | System.loadLibrary(lib); |
| | | SDL.loadLibrary(lib); |
| | | } |
| | | } |
| | | |
| | |
| | | mTextEdit = null; |
| | | mLayout = null; |
| | | mClipboardHandler = null; |
| | | mCursors = new Hashtable<Integer, Object>(); |
| | | mLastCursorID = 0; |
| | | mSDLThread = null; |
| | | mExitCalledFromJava = false; |
| | | mBrokenLibraries = false; |
| | |
| | | // Setup |
| | | @Override |
| | | protected void onCreate(Bundle savedInstanceState) { |
| | | Log.v(TAG, "Device: " + android.os.Build.DEVICE); |
| | | Log.v(TAG, "Model: " + android.os.Build.MODEL); |
| | | Log.v(TAG, "Device: " + Build.DEVICE); |
| | | Log.v(TAG, "Model: " + Build.MODEL); |
| | | Log.v(TAG, "onCreate()"); |
| | | super.onCreate(savedInstanceState); |
| | | |
| | |
| | | mClipboardHandler = new SDLClipboardHandler_Old(); |
| | | } |
| | | |
| | | mHIDDeviceManager = HIDDeviceManager.acquire(this); |
| | | |
| | | // Set up the surface |
| | | mSurface = new SDLSurface(getApplication()); |
| | | |
| | | mLayout = new RelativeLayout(this); |
| | | mLayout.addView(mSurface); |
| | | |
| | | // Get our current screen orientation and pass it down. |
| | | mCurrentOrientation = SDLActivity.getCurrentOrientation(); |
| | | SDLActivity.onNativeOrientationChanged(mCurrentOrientation); |
| | | |
| | | setContentView(mLayout); |
| | | |
| | | setWindowStyle(false); |
| | | |
| | | getWindow().getDecorView().setOnSystemUiVisibilityChangeListener(this); |
| | | |
| | | // Get filename from "Open with" of another application |
| | | Intent intent = getIntent(); |
| | |
| | | return; |
| | | } |
| | | |
| | | if (mHIDDeviceManager != null) { |
| | | mHIDDeviceManager.setFrozen(true); |
| | | } |
| | | |
| | | SDLActivity.handleNativeState(); |
| | | } |
| | | |
| | |
| | | return; |
| | | } |
| | | |
| | | if (mHIDDeviceManager != null) { |
| | | mHIDDeviceManager.setFrozen(false); |
| | | } |
| | | |
| | | SDLActivity.handleNativeState(); |
| | | } |
| | | |
| | | public static int getCurrentOrientation() { |
| | | final Context context = SDLActivity.getContext(); |
| | | final Display display = ((WindowManager) context.getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay(); |
| | | |
| | | int result = SDL_ORIENTATION_UNKNOWN; |
| | | |
| | | switch (display.getRotation()) { |
| | | case Surface.ROTATION_0: |
| | | result = SDL_ORIENTATION_PORTRAIT; |
| | | break; |
| | | |
| | | case Surface.ROTATION_90: |
| | | result = SDL_ORIENTATION_LANDSCAPE; |
| | | break; |
| | | |
| | | case Surface.ROTATION_180: |
| | | result = SDL_ORIENTATION_PORTRAIT_FLIPPED; |
| | | break; |
| | | |
| | | case Surface.ROTATION_270: |
| | | result = SDL_ORIENTATION_LANDSCAPE_FLIPPED; |
| | | break; |
| | | } |
| | | |
| | | return result; |
| | | } |
| | | |
| | | @Override |
| | | public void onWindowFocusChanged(boolean hasFocus) { |
| | |
| | | SDLActivity.mHasFocus = hasFocus; |
| | | if (hasFocus) { |
| | | mNextNativeState = NativeState.RESUMED; |
| | | SDLActivity.getMotionListener().reclaimRelativeMouseModeIfNeeded(); |
| | | } else { |
| | | mNextNativeState = NativeState.PAUSED; |
| | | } |
| | |
| | | @Override |
| | | protected void onDestroy() { |
| | | Log.v(TAG, "onDestroy()"); |
| | | |
| | | if (mHIDDeviceManager != null) { |
| | | HIDDeviceManager.release(mHIDDeviceManager); |
| | | mHIDDeviceManager = null; |
| | | } |
| | | |
| | | if (SDLActivity.mBrokenLibraries) { |
| | | super.onDestroy(); |
| | |
| | | |
| | | // Reset everything in case the user re opens the app |
| | | SDLActivity.initialize(); |
| | | } |
| | | |
| | | @Override |
| | | public void onBackPressed() { |
| | | // Check if we want to block the back button in case of mouse right click. |
| | | // |
| | | // If we do, the normal hardware back button will no longer work and people have to use home, |
| | | // but the mouse right click will work. |
| | | // |
| | | String trapBack = SDLActivity.nativeGetHint("SDL_ANDROID_TRAP_BACK_BUTTON"); |
| | | if ((trapBack != null) && trapBack.equals("1")) { |
| | | // Exit and let the mouse handler handle this button (if appropriate) |
| | | return; |
| | | } |
| | | |
| | | // Default system back button behavior. |
| | | super.onBackPressed(); |
| | | } |
| | | |
| | | // Called by JNI from SDL. |
| | | public static void manualBackButton() { |
| | | mSingleton.pressBackButton(); |
| | | } |
| | | |
| | | // Used to get us onto the activity's main thread |
| | | public void pressBackButton() { |
| | | runOnUiThread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | SDLActivity.this.superOnBackPressed(); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | // Used to access the system back behavior. |
| | | public void superOnBackPressed() { |
| | | super.onBackPressed(); |
| | | } |
| | | |
| | | @Override |
| | |
| | | /* The native thread has finished */ |
| | | public static void handleNativeExit() { |
| | | SDLActivity.mSDLThread = null; |
| | | if (mSingleton != null) { |
| | | mSingleton.finish(); |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | static final int COMMAND_SET_KEEP_SCREEN_ON = 5; |
| | | |
| | | protected static final int COMMAND_USER = 0x8000; |
| | | |
| | | protected static boolean mFullscreenModeActive; |
| | | |
| | | /** |
| | | * This method is called by SDL if SDL did not handle a message itself. |
| | |
| | | // This version of Android doesn't support the immersive fullscreen mode |
| | | break; |
| | | } |
| | | /* This needs more testing, per bug 4096 - Enabling fullscreen on Android causes the app to toggle fullscreen mode continuously in a loop |
| | | *** |
| | | if (context instanceof Activity) { |
| | | Window window = ((Activity) context).getWindow(); |
| | | if (window != null) { |
| | | if ((msg.obj instanceof Integer) && (((Integer) msg.obj).intValue() != 0)) { |
| | | int flags = View.SYSTEM_UI_FLAG_LAYOUT_STABLE | |
| | | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | |
| | | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | |
| | | int flags = View.SYSTEM_UI_FLAG_FULLSCREEN | |
| | | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | |
| | | View.SYSTEM_UI_FLAG_FULLSCREEN | |
| | | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY; |
| | | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY | |
| | | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | |
| | | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | |
| | | View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.INVISIBLE; |
| | | window.getDecorView().setSystemUiVisibility(flags); |
| | | window.addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN); |
| | | window.clearFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN); |
| | | SDLActivity.mFullscreenModeActive = true; |
| | | } else { |
| | | int flags = View.SYSTEM_UI_FLAG_LAYOUT_STABLE; |
| | | int flags = View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_VISIBLE; |
| | | window.getDecorView().setSystemUiVisibility(flags); |
| | | window.addFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN); |
| | | window.clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN); |
| | | SDLActivity.mFullscreenModeActive = false; |
| | | } |
| | | } |
| | | } else { |
| | | Log.e(TAG, "error handling message, getContext() returned no Activity"); |
| | | } |
| | | ***/ |
| | | break; |
| | | case COMMAND_TEXTEDIT_HIDE: |
| | | if (mTextEdit != null) { |
| | |
| | | Message msg = commandHandler.obtainMessage(); |
| | | msg.arg1 = command; |
| | | msg.obj = data; |
| | | return commandHandler.sendMessage(msg); |
| | | boolean result = commandHandler.sendMessage(msg); |
| | | |
| | | if ((Build.VERSION.SDK_INT >= 19) && (command == COMMAND_CHANGE_WINDOW_STYLE)) { |
| | | // Ensure we don't return until the resize has actually happened, |
| | | // or 500ms have passed. |
| | | |
| | | boolean bShouldWait = false; |
| | | |
| | | if (data instanceof Integer) { |
| | | // Let's figure out if we're already laid out fullscreen or not. |
| | | Display display = ((WindowManager)getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay(); |
| | | android.util.DisplayMetrics realMetrics = new android.util.DisplayMetrics(); |
| | | display.getRealMetrics( realMetrics ); |
| | | |
| | | boolean bFullscreenLayout = ((realMetrics.widthPixels == mSurface.getWidth()) && |
| | | (realMetrics.heightPixels == mSurface.getHeight())); |
| | | |
| | | if (((Integer)data).intValue() == 1) { |
| | | // If we aren't laid out fullscreen or actively in fullscreen mode already, we're going |
| | | // to change size and should wait for surfaceChanged() before we return, so the size |
| | | // is right back in native code. If we're already laid out fullscreen, though, we're |
| | | // not going to change size even if we change decor modes, so we shouldn't wait for |
| | | // surfaceChanged() -- which may not even happen -- and should return immediately. |
| | | bShouldWait = !bFullscreenLayout; |
| | | } |
| | | else { |
| | | // If we're laid out fullscreen (even if the status bar and nav bar are present), |
| | | // or are actively in fullscreen, we're going to change size and should wait for |
| | | // surfaceChanged before we return, so the size is right back in native code. |
| | | bShouldWait = bFullscreenLayout; |
| | | } |
| | | } |
| | | |
| | | if (bShouldWait) { |
| | | // We'll wait for the surfaceChanged() method, which will notify us |
| | | // when called. That way, we know our current size is really the |
| | | // size we need, instead of grabbing a size that's still got |
| | | // the navigation and/or status bars before they're hidden. |
| | | // |
| | | // We'll wait for up to half a second, because some devices |
| | | // take a surprisingly long time for the surface resize, but |
| | | // then we'll just give up and return. |
| | | // |
| | | synchronized(SDLActivity.getContext()) { |
| | | try { |
| | | SDLActivity.getContext().wait(500); |
| | | } |
| | | catch (InterruptedException ie) { |
| | | ie.printStackTrace(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | return result; |
| | | } |
| | | |
| | | // C functions we call |
| | |
| | | public static native void nativePause(); |
| | | public static native void nativeResume(); |
| | | public static native void onNativeDropFile(String filename); |
| | | public static native void onNativeResize(int x, int y, int format, float rate); |
| | | public static native void onNativeResize(int surfaceWidth, int surfaceHeight, int deviceWidth, int deviceHeight, int format, float rate); |
| | | public static native void onNativeKeyDown(int keycode); |
| | | public static native void onNativeKeyUp(int keycode); |
| | | public static native void onNativeKeyboardFocusLost(); |
| | | public static native void onNativeMouse(int button, int action, float x, float y); |
| | | public static native void onNativeMouse(int button, int action, float x, float y, boolean relative); |
| | | public static native void onNativeTouch(int touchDevId, int pointerFingerId, |
| | | int action, float x, |
| | | float y, float p); |
| | |
| | | public static native void onNativeSurfaceDestroyed(); |
| | | public static native String nativeGetHint(String name); |
| | | public static native void nativeSetenv(String name, String value); |
| | | public static native void onNativeOrientationChanged(int orientation); |
| | | |
| | | /** |
| | | * This method is called by SDL using JNI. |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * This method is called by SDL using JNI. |
| | | */ |
| | |
| | | InputMethodManager imm = (InputMethodManager) SDL.getContext().getSystemService(Context.INPUT_METHOD_SERVICE); |
| | | return imm.isAcceptingText(); |
| | | |
| | | } |
| | | |
| | | /** |
| | | * This method is called by SDL using JNI. |
| | | */ |
| | | public static boolean supportsRelativeMouse() |
| | | { |
| | | // ChromeOS doesn't provide relative mouse motion via the Android 7 APIs |
| | | if (isChromebook()) { |
| | | return false; |
| | | } |
| | | |
| | | // DeX mode in Samsung Experience 9.0 and earlier doesn't support relative mice properly under |
| | | // Android 7 APIs, and simply returns no data under Android 8 APIs. |
| | | // |
| | | // This is fixed in Samsung Experience 9.5, which corresponds to Android 8.1.0, and |
| | | // thus SDK version 27. If we are in DeX mode and not API 27 or higher, as a result, |
| | | // we should stick to relative mode. |
| | | // |
| | | if ((Build.VERSION.SDK_INT < 27) && isDeXMode()) { |
| | | return false; |
| | | } |
| | | |
| | | return SDLActivity.getMotionListener().supportsRelativeMouse(); |
| | | } |
| | | |
| | | /** |
| | | * This method is called by SDL using JNI. |
| | | */ |
| | | public static boolean setRelativeMouseEnabled(boolean enabled) |
| | | { |
| | | if (enabled && !supportsRelativeMouse()) { |
| | | return false; |
| | | } |
| | | |
| | | return SDLActivity.getMotionListener().setRelativeMouseEnabled(enabled); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | public static boolean isAndroidTV() { |
| | | UiModeManager uiModeManager = (UiModeManager) getContext().getSystemService(UI_MODE_SERVICE); |
| | | return (uiModeManager.getCurrentModeType() == Configuration.UI_MODE_TYPE_TELEVISION); |
| | | if (uiModeManager.getCurrentModeType() == Configuration.UI_MODE_TYPE_TELEVISION) { |
| | | return true; |
| | | } |
| | | if (Build.MANUFACTURER.equals("MINIX") && Build.MODEL.equals("NEO-U1")) { |
| | | return true; |
| | | } |
| | | if (Build.MANUFACTURER.equals("Amlogic") && Build.MODEL.equals("X96-W")) { |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * This method is called by SDL using JNI. |
| | | */ |
| | | public static boolean isTablet() { |
| | | DisplayMetrics metrics = new DisplayMetrics(); |
| | | Activity activity = (Activity)getContext(); |
| | | activity.getWindowManager().getDefaultDisplay().getMetrics(metrics); |
| | | |
| | | double dWidthInches = metrics.widthPixels / (double)metrics.xdpi; |
| | | double dHeightInches = metrics.heightPixels / (double)metrics.ydpi; |
| | | |
| | | double dDiagonal = Math.sqrt((dWidthInches * dWidthInches) + (dHeightInches * dHeightInches)); |
| | | |
| | | // If our diagonal size is seven inches or greater, we consider ourselves a tablet. |
| | | return (dDiagonal >= 7.0); |
| | | } |
| | | |
| | | /** |
| | | * This method is called by SDL using JNI. |
| | | */ |
| | | public static boolean isChromebook() { |
| | | return getContext().getPackageManager().hasSystemFeature("org.chromium.arc.device_management"); |
| | | } |
| | | |
| | | /** |
| | | * This method is called by SDL using JNI. |
| | | */ |
| | | public static boolean isDeXMode() { |
| | | if (Build.VERSION.SDK_INT < 24) { |
| | | return false; |
| | | } |
| | | try { |
| | | final Configuration config = getContext().getResources().getConfiguration(); |
| | | final Class configClass = config.getClass(); |
| | | return configClass.getField("SEM_DESKTOP_MODE_ENABLED").getInt(configClass) |
| | | == configClass.getField("semDesktopModeEnabled").getInt(config); |
| | | } catch(Exception ignored) { |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | /** |
| | |
| | | Log.v("SDL", "exception " + e.toString()); |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | // This method is called by SDLControllerManager's API 26 Generic Motion Handler. |
| | | public static View getContentView() |
| | | { |
| | | return mSingleton.mLayout; |
| | | } |
| | | |
| | | static class ShowTextInputTask implements Runnable { |
| | |
| | | return dialog; |
| | | } |
| | | |
| | | private final Runnable rehideSystemUi = new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | int flags = View.SYSTEM_UI_FLAG_FULLSCREEN | |
| | | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | |
| | | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY | |
| | | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | |
| | | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | |
| | | View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.INVISIBLE; |
| | | |
| | | SDLActivity.this.getWindow().getDecorView().setSystemUiVisibility(flags); |
| | | } |
| | | }; |
| | | |
| | | public void onSystemUiVisibilityChange(int visibility) { |
| | | if (SDLActivity.mFullscreenModeActive && (visibility & View.SYSTEM_UI_FLAG_FULLSCREEN) == 0 || (visibility & View.SYSTEM_UI_FLAG_HIDE_NAVIGATION) == 0) { |
| | | |
| | | Handler handler = getWindow().getDecorView().getHandler(); |
| | | if (handler != null) { |
| | | handler.removeCallbacks(rehideSystemUi); // Prevent a hide loop. |
| | | handler.postDelayed(rehideSystemUi, 2000); |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * This method is called by SDL using JNI. |
| | | */ |
| | |
| | | */ |
| | | public static void clipboardSetText(String string) { |
| | | mClipboardHandler.clipboardSetText(string); |
| | | } |
| | | |
| | | /** |
| | | * This method is called by SDL using JNI. |
| | | */ |
| | | public static int createCustomCursor(int[] colors, int width, int height, int hotSpotX, int hotSpotY) { |
| | | Bitmap bitmap = Bitmap.createBitmap(colors, width, height, Bitmap.Config.ARGB_8888); |
| | | ++mLastCursorID; |
| | | // This requires API 24, so use reflection to implement this |
| | | try { |
| | | Class PointerIconClass = Class.forName("android.view.PointerIcon"); |
| | | Class[] arg_types = new Class[] { Bitmap.class, float.class, float.class }; |
| | | Method create = PointerIconClass.getMethod("create", arg_types); |
| | | mCursors.put(mLastCursorID, create.invoke(null, bitmap, hotSpotX, hotSpotY)); |
| | | } catch (Exception e) { |
| | | return 0; |
| | | } |
| | | return mLastCursorID; |
| | | } |
| | | |
| | | /** |
| | | * This method is called by SDL using JNI. |
| | | */ |
| | | public static boolean setCustomCursor(int cursorID) { |
| | | // This requires API 24, so use reflection to implement this |
| | | try { |
| | | Class PointerIconClass = Class.forName("android.view.PointerIcon"); |
| | | Method setPointerIcon = SDLSurface.class.getMethod("setPointerIcon", PointerIconClass); |
| | | setPointerIcon.invoke(mSurface, mCursors.get(cursorID)); |
| | | } catch (Exception e) { |
| | | return false; |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * This method is called by SDL using JNI. |
| | | */ |
| | | public static boolean setSystemCursor(int cursorID) { |
| | | int cursor_type = 0; //PointerIcon.TYPE_NULL; |
| | | switch (cursorID) { |
| | | case SDL_SYSTEM_CURSOR_ARROW: |
| | | cursor_type = 1000; //PointerIcon.TYPE_ARROW; |
| | | break; |
| | | case SDL_SYSTEM_CURSOR_IBEAM: |
| | | cursor_type = 1008; //PointerIcon.TYPE_TEXT; |
| | | break; |
| | | case SDL_SYSTEM_CURSOR_WAIT: |
| | | cursor_type = 1004; //PointerIcon.TYPE_WAIT; |
| | | break; |
| | | case SDL_SYSTEM_CURSOR_CROSSHAIR: |
| | | cursor_type = 1007; //PointerIcon.TYPE_CROSSHAIR; |
| | | break; |
| | | case SDL_SYSTEM_CURSOR_WAITARROW: |
| | | cursor_type = 1004; //PointerIcon.TYPE_WAIT; |
| | | break; |
| | | case SDL_SYSTEM_CURSOR_SIZENWSE: |
| | | cursor_type = 1017; //PointerIcon.TYPE_TOP_LEFT_DIAGONAL_DOUBLE_ARROW; |
| | | break; |
| | | case SDL_SYSTEM_CURSOR_SIZENESW: |
| | | cursor_type = 1016; //PointerIcon.TYPE_TOP_RIGHT_DIAGONAL_DOUBLE_ARROW; |
| | | break; |
| | | case SDL_SYSTEM_CURSOR_SIZEWE: |
| | | cursor_type = 1014; //PointerIcon.TYPE_HORIZONTAL_DOUBLE_ARROW; |
| | | break; |
| | | case SDL_SYSTEM_CURSOR_SIZENS: |
| | | cursor_type = 1015; //PointerIcon.TYPE_VERTICAL_DOUBLE_ARROW; |
| | | break; |
| | | case SDL_SYSTEM_CURSOR_SIZEALL: |
| | | cursor_type = 1020; //PointerIcon.TYPE_GRAB; |
| | | break; |
| | | case SDL_SYSTEM_CURSOR_NO: |
| | | cursor_type = 1012; //PointerIcon.TYPE_NO_DROP; |
| | | break; |
| | | case SDL_SYSTEM_CURSOR_HAND: |
| | | cursor_type = 1002; //PointerIcon.TYPE_HAND; |
| | | break; |
| | | } |
| | | // This requires API 24, so use reflection to implement this |
| | | try { |
| | | Class PointerIconClass = Class.forName("android.view.PointerIcon"); |
| | | Class[] arg_types = new Class[] { Context.class, int.class }; |
| | | Method getSystemIcon = PointerIconClass.getMethod("getSystemIcon", arg_types); |
| | | Method setPointerIcon = SDLSurface.class.getMethod("setPointerIcon", PointerIconClass); |
| | | setPointerIcon.invoke(mSurface, getSystemIcon.invoke(null, SDL.getContext(), cursor_type)); |
| | | } catch (Exception e) { |
| | | return false; |
| | | } |
| | | return true; |
| | | } |
| | | } |
| | | |
| | |
| | | mSensorManager = (SensorManager)context.getSystemService(Context.SENSOR_SERVICE); |
| | | |
| | | if (Build.VERSION.SDK_INT >= 12) { |
| | | setOnGenericMotionListener(new SDLGenericMotionListener_API12()); |
| | | setOnGenericMotionListener(SDLActivity.getMotionListener()); |
| | | } |
| | | |
| | | // Some arbitrary defaults to avoid a potential division by zero |
| | |
| | | int format, int width, int height) { |
| | | Log.v("SDL", "surfaceChanged()"); |
| | | |
| | | if (SDLActivity.mSingleton == null) { |
| | | return; |
| | | } |
| | | |
| | | int sdlFormat = 0x15151002; // SDL_PIXELFORMAT_RGB565 by default |
| | | switch (format) { |
| | | case PixelFormat.A_8: |
| | |
| | | |
| | | mWidth = width; |
| | | mHeight = height; |
| | | SDLActivity.onNativeResize(width, height, sdlFormat, mDisplay.getRefreshRate()); |
| | | Log.v("SDL", "Window size: " + width + "x" + height); |
| | | int nDeviceWidth = width; |
| | | int nDeviceHeight = height; |
| | | try |
| | | { |
| | | if (Build.VERSION.SDK_INT >= 17) { |
| | | android.util.DisplayMetrics realMetrics = new android.util.DisplayMetrics(); |
| | | mDisplay.getRealMetrics( realMetrics ); |
| | | nDeviceWidth = realMetrics.widthPixels; |
| | | nDeviceHeight = realMetrics.heightPixels; |
| | | } |
| | | } |
| | | catch ( java.lang.Throwable throwable ) {} |
| | | |
| | | synchronized(SDLActivity.getContext()) { |
| | | // In case we're waiting on a size change after going fullscreen, send a notification. |
| | | SDLActivity.getContext().notifyAll(); |
| | | } |
| | | |
| | | Log.v("SDL", "Window size: " + width + "x" + height); |
| | | Log.v("SDL", "Device size: " + nDeviceWidth + "x" + nDeviceHeight); |
| | | SDLActivity.onNativeResize(width, height, nDeviceWidth, nDeviceHeight, sdlFormat, mDisplay.getRefreshRate()); |
| | | |
| | | boolean skip = false; |
| | | int requestedOrientation = SDLActivity.mSingleton.getRequestedOrientation(); |
| | |
| | | float x,y,p; |
| | | |
| | | // !!! FIXME: dump this SDK check after 2.0.4 ships and require API14. |
| | | if (event.getSource() == InputDevice.SOURCE_MOUSE && SDLActivity.mSeparateMouseAndTouch) { |
| | | // 12290 = Samsung DeX mode desktop mouse |
| | | if ((event.getSource() == InputDevice.SOURCE_MOUSE || event.getSource() == 12290) && SDLActivity.mSeparateMouseAndTouch) { |
| | | if (Build.VERSION.SDK_INT < 14) { |
| | | mouseButton = 1; // all mouse buttons are the left button |
| | | } else { |
| | |
| | | mouseButton = 1; // oh well. |
| | | } |
| | | } |
| | | SDLActivity.onNativeMouse(mouseButton, action, event.getX(0), event.getY(0)); |
| | | |
| | | // We need to check if we're in relative mouse mode and get the axis offset rather than the x/y values |
| | | // if we are. We'll leverage our existing mouse motion listener |
| | | SDLGenericMotionListener_API12 motionListener = SDLActivity.getMotionListener(); |
| | | x = motionListener.getEventX(event); |
| | | y = motionListener.getEventY(event); |
| | | |
| | | SDLActivity.onNativeMouse(mouseButton, action, x, y, motionListener.inRelativeMode()); |
| | | } else { |
| | | switch(action) { |
| | | case MotionEvent.ACTION_MOVE: |
| | |
| | | @Override |
| | | public void onSensorChanged(SensorEvent event) { |
| | | if (event.sensor.getType() == Sensor.TYPE_ACCELEROMETER) { |
| | | |
| | | // Since we may have an orientation set, we won't receive onConfigurationChanged events. |
| | | // We thus should check here. |
| | | int newOrientation = SDLActivity.SDL_ORIENTATION_UNKNOWN; |
| | | |
| | | float x, y; |
| | | switch (mDisplay.getRotation()) { |
| | | case Surface.ROTATION_90: |
| | | x = -event.values[1]; |
| | | y = event.values[0]; |
| | | newOrientation = SDLActivity.SDL_ORIENTATION_LANDSCAPE; |
| | | break; |
| | | case Surface.ROTATION_270: |
| | | x = event.values[1]; |
| | | y = -event.values[0]; |
| | | newOrientation = SDLActivity.SDL_ORIENTATION_LANDSCAPE_FLIPPED; |
| | | break; |
| | | case Surface.ROTATION_180: |
| | | x = -event.values[1]; |
| | | y = -event.values[0]; |
| | | newOrientation = SDLActivity.SDL_ORIENTATION_PORTRAIT_FLIPPED; |
| | | break; |
| | | default: |
| | | x = event.values[0]; |
| | | y = event.values[1]; |
| | | newOrientation = SDLActivity.SDL_ORIENTATION_PORTRAIT; |
| | | break; |
| | | } |
| | | |
| | | if (newOrientation != SDLActivity.mCurrentOrientation) { |
| | | SDLActivity.mCurrentOrientation = newOrientation; |
| | | SDLActivity.onNativeOrientationChanged(newOrientation); |
| | | } |
| | | |
| | | SDLActivity.onNativeAccel(-x / SensorManager.GRAVITY_EARTH, |
| | | y / SensorManager.GRAVITY_EARTH, |
| | | event.values[2] / SensorManager.GRAVITY_EARTH); |
| | | |
| | | |
| | | } |
| | | } |
| | | |
| | | // Captured pointer events for API 26. |
| | | public boolean onCapturedPointerEvent(MotionEvent event) |
| | | { |
| | | int action = event.getActionMasked(); |
| | | |
| | | float x, y; |
| | | switch (action) { |
| | | case MotionEvent.ACTION_SCROLL: |
| | | x = event.getAxisValue(MotionEvent.AXIS_HSCROLL, 0); |
| | | y = event.getAxisValue(MotionEvent.AXIS_VSCROLL, 0); |
| | | SDLActivity.onNativeMouse(0, action, x, y, false); |
| | | return true; |
| | | |
| | | case MotionEvent.ACTION_HOVER_MOVE: |
| | | case MotionEvent.ACTION_MOVE: |
| | | x = event.getX(0); |
| | | y = event.getY(0); |
| | | SDLActivity.onNativeMouse(0, action, x, y, true); |
| | | return true; |
| | | |
| | | case MotionEvent.ACTION_BUTTON_PRESS: |
| | | case MotionEvent.ACTION_BUTTON_RELEASE: |
| | | |
| | | // Change our action value to what SDL's code expects. |
| | | if (action == MotionEvent.ACTION_BUTTON_PRESS) { |
| | | action = MotionEvent.ACTION_DOWN; |
| | | } |
| | | else if (action == MotionEvent.ACTION_BUTTON_RELEASE) { |
| | | action = MotionEvent.ACTION_UP; |
| | | } |
| | | |
| | | x = event.getX(0); |
| | | y = event.getY(0); |
| | | int button = event.getButtonState(); |
| | | |
| | | SDLActivity.onNativeMouse(button, action, x, y, true); |
| | | return true; |
| | | } |
| | | |
| | | return false; |
| | | } |
| | | |
| | | } |
| | | |
| | | /* This is a fake invisible editor view that receives the input and defines the |
| | |
| | | package org.libsdl.app; |
| | | |
| | | import android.media.*; |
| | | import android.os.Build; |
| | | import android.util.Log; |
| | | |
| | | public class SDLAudioManager |
| | |
| | | |
| | | // Audio |
| | | |
| | | /** |
| | | * This method is called by SDL using JNI. |
| | | */ |
| | | public static int audioOpen(int sampleRate, boolean is16Bit, boolean isStereo, int desiredFrames) { |
| | | int channelConfig = isStereo ? AudioFormat.CHANNEL_CONFIGURATION_STEREO : AudioFormat.CHANNEL_CONFIGURATION_MONO; |
| | | int audioFormat = is16Bit ? AudioFormat.ENCODING_PCM_16BIT : AudioFormat.ENCODING_PCM_8BIT; |
| | | int frameSize = (isStereo ? 2 : 1) * (is16Bit ? 2 : 1); |
| | | protected static String getAudioFormatString(int audioFormat) { |
| | | switch (audioFormat) { |
| | | case AudioFormat.ENCODING_PCM_8BIT: |
| | | return "8-bit"; |
| | | case AudioFormat.ENCODING_PCM_16BIT: |
| | | return "16-bit"; |
| | | case AudioFormat.ENCODING_PCM_FLOAT: |
| | | return "float"; |
| | | default: |
| | | return Integer.toString(audioFormat); |
| | | } |
| | | } |
| | | |
| | | Log.v(TAG, "SDL audio: wanted " + (isStereo ? "stereo" : "mono") + " " + (is16Bit ? "16-bit" : "8-bit") + " " + (sampleRate / 1000f) + "kHz, " + desiredFrames + " frames buffer"); |
| | | protected static int[] open(boolean isCapture, int sampleRate, int audioFormat, int desiredChannels, int desiredFrames) { |
| | | int channelConfig; |
| | | int sampleSize; |
| | | int frameSize; |
| | | |
| | | Log.v(TAG, "Opening " + (isCapture ? "capture" : "playback") + ", requested " + desiredFrames + " frames of " + desiredChannels + " channel " + getAudioFormatString(audioFormat) + " audio at " + sampleRate + " Hz"); |
| | | |
| | | /* On older devices let's use known good settings */ |
| | | if (Build.VERSION.SDK_INT < 21) { |
| | | if (desiredChannels > 2) { |
| | | desiredChannels = 2; |
| | | } |
| | | if (sampleRate < 8000) { |
| | | sampleRate = 8000; |
| | | } else if (sampleRate > 48000) { |
| | | sampleRate = 48000; |
| | | } |
| | | } |
| | | |
| | | if (audioFormat == AudioFormat.ENCODING_PCM_FLOAT) { |
| | | int minSDKVersion = (isCapture ? 23 : 21); |
| | | if (Build.VERSION.SDK_INT < minSDKVersion) { |
| | | audioFormat = AudioFormat.ENCODING_PCM_16BIT; |
| | | } |
| | | } |
| | | switch (audioFormat) |
| | | { |
| | | case AudioFormat.ENCODING_PCM_8BIT: |
| | | sampleSize = 1; |
| | | break; |
| | | case AudioFormat.ENCODING_PCM_16BIT: |
| | | sampleSize = 2; |
| | | break; |
| | | case AudioFormat.ENCODING_PCM_FLOAT: |
| | | sampleSize = 4; |
| | | break; |
| | | default: |
| | | Log.v(TAG, "Requested format " + audioFormat + ", getting ENCODING_PCM_16BIT"); |
| | | audioFormat = AudioFormat.ENCODING_PCM_16BIT; |
| | | sampleSize = 2; |
| | | break; |
| | | } |
| | | |
| | | if (isCapture) { |
| | | switch (desiredChannels) { |
| | | case 1: |
| | | channelConfig = AudioFormat.CHANNEL_IN_MONO; |
| | | break; |
| | | case 2: |
| | | channelConfig = AudioFormat.CHANNEL_IN_STEREO; |
| | | break; |
| | | default: |
| | | Log.v(TAG, "Requested " + desiredChannels + " channels, getting stereo"); |
| | | desiredChannels = 2; |
| | | channelConfig = AudioFormat.CHANNEL_IN_STEREO; |
| | | break; |
| | | } |
| | | } else { |
| | | switch (desiredChannels) { |
| | | case 1: |
| | | channelConfig = AudioFormat.CHANNEL_OUT_MONO; |
| | | break; |
| | | case 2: |
| | | channelConfig = AudioFormat.CHANNEL_OUT_STEREO; |
| | | break; |
| | | case 3: |
| | | channelConfig = AudioFormat.CHANNEL_OUT_STEREO | AudioFormat.CHANNEL_OUT_FRONT_CENTER; |
| | | break; |
| | | case 4: |
| | | channelConfig = AudioFormat.CHANNEL_OUT_QUAD; |
| | | break; |
| | | case 5: |
| | | channelConfig = AudioFormat.CHANNEL_OUT_QUAD | AudioFormat.CHANNEL_OUT_FRONT_CENTER; |
| | | break; |
| | | case 6: |
| | | channelConfig = AudioFormat.CHANNEL_OUT_5POINT1; |
| | | break; |
| | | case 7: |
| | | channelConfig = AudioFormat.CHANNEL_OUT_5POINT1 | AudioFormat.CHANNEL_OUT_BACK_CENTER; |
| | | break; |
| | | case 8: |
| | | if (Build.VERSION.SDK_INT >= 23) { |
| | | channelConfig = AudioFormat.CHANNEL_OUT_7POINT1_SURROUND; |
| | | } else { |
| | | Log.v(TAG, "Requested " + desiredChannels + " channels, getting 5.1 surround"); |
| | | desiredChannels = 6; |
| | | channelConfig = AudioFormat.CHANNEL_OUT_5POINT1; |
| | | } |
| | | break; |
| | | default: |
| | | Log.v(TAG, "Requested " + desiredChannels + " channels, getting stereo"); |
| | | desiredChannels = 2; |
| | | channelConfig = AudioFormat.CHANNEL_OUT_STEREO; |
| | | break; |
| | | } |
| | | |
| | | /* |
| | | Log.v(TAG, "Speaker configuration (and order of channels):"); |
| | | |
| | | if ((channelConfig & 0x00000004) != 0) { |
| | | Log.v(TAG, " CHANNEL_OUT_FRONT_LEFT"); |
| | | } |
| | | if ((channelConfig & 0x00000008) != 0) { |
| | | Log.v(TAG, " CHANNEL_OUT_FRONT_RIGHT"); |
| | | } |
| | | if ((channelConfig & 0x00000010) != 0) { |
| | | Log.v(TAG, " CHANNEL_OUT_FRONT_CENTER"); |
| | | } |
| | | if ((channelConfig & 0x00000020) != 0) { |
| | | Log.v(TAG, " CHANNEL_OUT_LOW_FREQUENCY"); |
| | | } |
| | | if ((channelConfig & 0x00000040) != 0) { |
| | | Log.v(TAG, " CHANNEL_OUT_BACK_LEFT"); |
| | | } |
| | | if ((channelConfig & 0x00000080) != 0) { |
| | | Log.v(TAG, " CHANNEL_OUT_BACK_RIGHT"); |
| | | } |
| | | if ((channelConfig & 0x00000100) != 0) { |
| | | Log.v(TAG, " CHANNEL_OUT_FRONT_LEFT_OF_CENTER"); |
| | | } |
| | | if ((channelConfig & 0x00000200) != 0) { |
| | | Log.v(TAG, " CHANNEL_OUT_FRONT_RIGHT_OF_CENTER"); |
| | | } |
| | | if ((channelConfig & 0x00000400) != 0) { |
| | | Log.v(TAG, " CHANNEL_OUT_BACK_CENTER"); |
| | | } |
| | | if ((channelConfig & 0x00000800) != 0) { |
| | | Log.v(TAG, " CHANNEL_OUT_SIDE_LEFT"); |
| | | } |
| | | if ((channelConfig & 0x00001000) != 0) { |
| | | Log.v(TAG, " CHANNEL_OUT_SIDE_RIGHT"); |
| | | } |
| | | */ |
| | | } |
| | | frameSize = (sampleSize * desiredChannels); |
| | | |
| | | // Let the user pick a larger buffer if they really want -- but ye |
| | | // gods they probably shouldn't, the minimums are horrifyingly high |
| | | // latency already |
| | | desiredFrames = Math.max(desiredFrames, (AudioTrack.getMinBufferSize(sampleRate, channelConfig, audioFormat) + frameSize - 1) / frameSize); |
| | | int minBufferSize; |
| | | if (isCapture) { |
| | | minBufferSize = AudioRecord.getMinBufferSize(sampleRate, channelConfig, audioFormat); |
| | | } else { |
| | | minBufferSize = AudioTrack.getMinBufferSize(sampleRate, channelConfig, audioFormat); |
| | | } |
| | | desiredFrames = Math.max(desiredFrames, (minBufferSize + frameSize - 1) / frameSize); |
| | | |
| | | int[] results = new int[4]; |
| | | |
| | | if (isCapture) { |
| | | if (mAudioRecord == null) { |
| | | mAudioRecord = new AudioRecord(MediaRecorder.AudioSource.DEFAULT, sampleRate, |
| | | channelConfig, audioFormat, desiredFrames * frameSize); |
| | | |
| | | // see notes about AudioTrack state in audioOpen(), above. Probably also applies here. |
| | | if (mAudioRecord.getState() != AudioRecord.STATE_INITIALIZED) { |
| | | Log.e(TAG, "Failed during initialization of AudioRecord"); |
| | | mAudioRecord.release(); |
| | | mAudioRecord = null; |
| | | return null; |
| | | } |
| | | |
| | | mAudioRecord.startRecording(); |
| | | } |
| | | |
| | | results[0] = mAudioRecord.getSampleRate(); |
| | | results[1] = mAudioRecord.getAudioFormat(); |
| | | results[2] = mAudioRecord.getChannelCount(); |
| | | results[3] = desiredFrames; |
| | | |
| | | } else { |
| | | if (mAudioTrack == null) { |
| | | mAudioTrack = new AudioTrack(AudioManager.STREAM_MUSIC, sampleRate, |
| | | channelConfig, audioFormat, desiredFrames * frameSize, AudioTrack.MODE_STREAM); |
| | | mAudioTrack = new AudioTrack(AudioManager.STREAM_MUSIC, sampleRate, channelConfig, audioFormat, desiredFrames * frameSize, AudioTrack.MODE_STREAM); |
| | | |
| | | // Instantiating AudioTrack can "succeed" without an exception and the track may still be invalid |
| | | // Ref: https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/media/java/android/media/AudioTrack.java |
| | | // Ref: http://developer.android.com/reference/android/media/AudioTrack.html#getState() |
| | | |
| | | if (mAudioTrack.getState() != AudioTrack.STATE_INITIALIZED) { |
| | | /* Try again, with safer values */ |
| | | |
| | | Log.e(TAG, "Failed during initialization of Audio Track"); |
| | | mAudioTrack.release(); |
| | | mAudioTrack = null; |
| | | return -1; |
| | | return null; |
| | | } |
| | | |
| | | mAudioTrack.play(); |
| | | } |
| | | |
| | | Log.v(TAG, "SDL audio: got " + ((mAudioTrack.getChannelCount() >= 2) ? "stereo" : "mono") + " " + ((mAudioTrack.getAudioFormat() == AudioFormat.ENCODING_PCM_16BIT) ? "16-bit" : "8-bit") + " " + (mAudioTrack.getSampleRate() / 1000f) + "kHz, " + desiredFrames + " frames buffer"); |
| | | results[0] = mAudioTrack.getSampleRate(); |
| | | results[1] = mAudioTrack.getAudioFormat(); |
| | | results[2] = mAudioTrack.getChannelCount(); |
| | | results[3] = desiredFrames; |
| | | } |
| | | |
| | | return 0; |
| | | Log.v(TAG, "Opening " + (isCapture ? "capture" : "playback") + ", got " + results[3] + " frames of " + results[2] + " channel " + getAudioFormatString(results[1]) + " audio at " + results[0] + " Hz"); |
| | | |
| | | return results; |
| | | } |
| | | |
| | | /** |
| | | * This method is called by SDL using JNI. |
| | | */ |
| | | public static int[] audioOpen(int sampleRate, int audioFormat, int desiredChannels, int desiredFrames) { |
| | | return open(false, sampleRate, audioFormat, desiredChannels, desiredFrames); |
| | | } |
| | | |
| | | /** |
| | | * This method is called by SDL using JNI. |
| | | */ |
| | | public static void audioWriteFloatBuffer(float[] buffer) { |
| | | if (mAudioTrack == null) { |
| | | Log.e(TAG, "Attempted to make audio call with uninitialized audio!"); |
| | | return; |
| | | } |
| | | |
| | | for (int i = 0; i < buffer.length;) { |
| | | int result = mAudioTrack.write(buffer, i, buffer.length - i, AudioTrack.WRITE_BLOCKING); |
| | | if (result > 0) { |
| | | i += result; |
| | | } else if (result == 0) { |
| | | try { |
| | | Thread.sleep(1); |
| | | } catch(InterruptedException e) { |
| | | // Nom nom |
| | | } |
| | | } else { |
| | | Log.w(TAG, "SDL audio: error return from write(float)"); |
| | | return; |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | |
| | | /** |
| | | * This method is called by SDL using JNI. |
| | | */ |
| | | public static int captureOpen(int sampleRate, boolean is16Bit, boolean isStereo, int desiredFrames) { |
| | | int channelConfig = isStereo ? AudioFormat.CHANNEL_CONFIGURATION_STEREO : AudioFormat.CHANNEL_CONFIGURATION_MONO; |
| | | int audioFormat = is16Bit ? AudioFormat.ENCODING_PCM_16BIT : AudioFormat.ENCODING_PCM_8BIT; |
| | | int frameSize = (isStereo ? 2 : 1) * (is16Bit ? 2 : 1); |
| | | |
| | | Log.v(TAG, "SDL capture: wanted " + (isStereo ? "stereo" : "mono") + " " + (is16Bit ? "16-bit" : "8-bit") + " " + (sampleRate / 1000f) + "kHz, " + desiredFrames + " frames buffer"); |
| | | |
| | | // Let the user pick a larger buffer if they really want -- but ye |
| | | // gods they probably shouldn't, the minimums are horrifyingly high |
| | | // latency already |
| | | desiredFrames = Math.max(desiredFrames, (AudioRecord.getMinBufferSize(sampleRate, channelConfig, audioFormat) + frameSize - 1) / frameSize); |
| | | |
| | | if (mAudioRecord == null) { |
| | | mAudioRecord = new AudioRecord(MediaRecorder.AudioSource.DEFAULT, sampleRate, |
| | | channelConfig, audioFormat, desiredFrames * frameSize); |
| | | |
| | | // see notes about AudioTrack state in audioOpen(), above. Probably also applies here. |
| | | if (mAudioRecord.getState() != AudioRecord.STATE_INITIALIZED) { |
| | | Log.e(TAG, "Failed during initialization of AudioRecord"); |
| | | mAudioRecord.release(); |
| | | mAudioRecord = null; |
| | | return -1; |
| | | public static int[] captureOpen(int sampleRate, int audioFormat, int desiredChannels, int desiredFrames) { |
| | | return open(true, sampleRate, audioFormat, desiredChannels, desiredFrames); |
| | | } |
| | | |
| | | mAudioRecord.startRecording(); |
| | | } |
| | | |
| | | Log.v(TAG, "SDL capture: got " + ((mAudioRecord.getChannelCount() >= 2) ? "stereo" : "mono") + " " + ((mAudioRecord.getAudioFormat() == AudioFormat.ENCODING_PCM_16BIT) ? "16-bit" : "8-bit") + " " + (mAudioRecord.getSampleRate() / 1000f) + "kHz, " + desiredFrames + " frames buffer"); |
| | | |
| | | return 0; |
| | | /** This method is called by SDL using JNI. */ |
| | | public static int captureReadFloatBuffer(float[] buffer, boolean blocking) { |
| | | return mAudioRecord.read(buffer, 0, buffer.length, blocking ? AudioRecord.READ_BLOCKING : AudioRecord.READ_NON_BLOCKING); |
| | | } |
| | | |
| | | /** This method is called by SDL using JNI. */ |
| | | public static int captureReadShortBuffer(short[] buffer, boolean blocking) { |
| | | // !!! FIXME: this is available in API Level 23. Until then, we always block. :( |
| | | //return mAudioRecord.read(buffer, 0, buffer.length, blocking ? AudioRecord.READ_BLOCKING : AudioRecord.READ_NON_BLOCKING); |
| | | if (Build.VERSION.SDK_INT < 23) { |
| | | return mAudioRecord.read(buffer, 0, buffer.length); |
| | | } else { |
| | | return mAudioRecord.read(buffer, 0, buffer.length, blocking ? AudioRecord.READ_BLOCKING : AudioRecord.READ_NON_BLOCKING); |
| | | } |
| | | } |
| | | |
| | | /** This method is called by SDL using JNI. */ |
| | | public static int captureReadByteBuffer(byte[] buffer, boolean blocking) { |
| | | // !!! FIXME: this is available in API Level 23. Until then, we always block. :( |
| | | //return mAudioRecord.read(buffer, 0, buffer.length, blocking ? AudioRecord.READ_BLOCKING : AudioRecord.READ_NON_BLOCKING); |
| | | if (Build.VERSION.SDK_INT < 23) { |
| | | return mAudioRecord.read(buffer, 0, buffer.length); |
| | | } else { |
| | | return mAudioRecord.read(buffer, 0, buffer.length, blocking ? AudioRecord.READ_BLOCKING : AudioRecord.READ_NON_BLOCKING); |
| | | } |
| | | |
| | | } |
| | | |
| | | /** This method is called by SDL using JNI. */ |
| | | public static void audioClose() { |
| | |
| | | public static native int nativeSetupJNI(); |
| | | |
| | | public static native int nativeAddJoystick(int device_id, String name, String desc, |
| | | int is_accelerometer, int nbuttons, |
| | | int vendor_id, int product_id, |
| | | boolean is_accelerometer, int button_mask, |
| | | int naxes, int nhats, int nballs); |
| | | public static native int nativeRemoveJoystick(int device_id); |
| | | public static native int nativeAddHaptic(int device_id, String name); |
| | |
| | | private static final String TAG = "SDLControllerManager"; |
| | | |
| | | public static void initialize() { |
| | | mJoystickHandler = null; |
| | | mHapticHandler = null; |
| | | |
| | | SDLControllerManager.setup(); |
| | | } |
| | | |
| | | public static void setup() { |
| | | if (Build.VERSION.SDK_INT >= 16) { |
| | | if (mJoystickHandler == null) { |
| | | if (Build.VERSION.SDK_INT >= 19) { |
| | | mJoystickHandler = new SDLJoystickHandler_API19(); |
| | | } else if (Build.VERSION.SDK_INT >= 16) { |
| | | mJoystickHandler = new SDLJoystickHandler_API16(); |
| | | } else if (Build.VERSION.SDK_INT >= 12) { |
| | | mJoystickHandler = new SDLJoystickHandler_API12(); |
| | | } else { |
| | | mJoystickHandler = new SDLJoystickHandler(); |
| | | } |
| | | } |
| | | |
| | | if (mHapticHandler == null) { |
| | | if (Build.VERSION.SDK_INT >= 26) { |
| | | mHapticHandler = new SDLHapticHandler_API26(); |
| | | } else { |
| | | mHapticHandler = new SDLHapticHandler(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | // Joystick glue code, just a series of stubs that redirect to the SDLJoystickHandler instance |
| | |
| | | /** |
| | | * This method is called by SDL using JNI. |
| | | */ |
| | | public static void hapticRun(int device_id, int length) { |
| | | mHapticHandler.run(device_id, length); |
| | | public static void hapticRun(int device_id, float intensity, int length) { |
| | | mHapticHandler.run(device_id, intensity, length); |
| | | } |
| | | |
| | | /** |
| | | * This method is called by SDL using JNI. |
| | | */ |
| | | public static void hapticStop(int device_id) |
| | | { |
| | | mHapticHandler.stop(device_id); |
| | | } |
| | | |
| | | // Check if a given device is considered a possible SDL joystick |
| | |
| | | static class RangeComparator implements Comparator<InputDevice.MotionRange> { |
| | | @Override |
| | | public int compare(InputDevice.MotionRange arg0, InputDevice.MotionRange arg1) { |
| | | return arg0.getAxis() - arg1.getAxis(); |
| | | // Some controllers, like the Moga Pro 2, return AXIS_GAS (22) for right trigger and AXIS_BRAKE (23) for left trigger - swap them so they're sorted in the right order for SDL |
| | | int arg0Axis = arg0.getAxis(); |
| | | int arg1Axis = arg1.getAxis(); |
| | | if (arg0Axis == MotionEvent.AXIS_GAS) { |
| | | arg0Axis = MotionEvent.AXIS_BRAKE; |
| | | } else if (arg0Axis == MotionEvent.AXIS_BRAKE) { |
| | | arg0Axis = MotionEvent.AXIS_GAS; |
| | | } |
| | | if (arg1Axis == MotionEvent.AXIS_GAS) { |
| | | arg1Axis = MotionEvent.AXIS_BRAKE; |
| | | } else if (arg1Axis == MotionEvent.AXIS_BRAKE) { |
| | | arg1Axis = MotionEvent.AXIS_GAS; |
| | | } |
| | | |
| | | return arg0Axis - arg1Axis; |
| | | } |
| | | } |
| | | |
| | |
| | | @Override |
| | | public void pollInputDevices() { |
| | | int[] deviceIds = InputDevice.getDeviceIds(); |
| | | // It helps processing the device ids in reverse order |
| | | // For example, in the case of the XBox 360 wireless dongle, |
| | | // so the first controller seen by SDL matches what the receiver |
| | | // considers to be the first controller |
| | | |
| | | for(int i=deviceIds.length-1; i>-1; i--) { |
| | | for(int i=0; i < deviceIds.length; ++i) { |
| | | SDLJoystick joystick = getJoystick(deviceIds[i]); |
| | | if (joystick == null) { |
| | | joystick = new SDLJoystick(); |
| | |
| | | } |
| | | |
| | | mJoysticks.add(joystick); |
| | | SDLControllerManager.nativeAddJoystick(joystick.device_id, joystick.name, joystick.desc, 0, -1, |
| | | joystick.axes.size(), joystick.hats.size()/2, 0); |
| | | SDLControllerManager.nativeAddJoystick(joystick.device_id, joystick.name, joystick.desc, getVendorId(joystickDevice), getProductId(joystickDevice), false, getButtonMask(joystickDevice), joystick.axes.size(), joystick.hats.size()/2, 0); |
| | | } |
| | | } |
| | | } |
| | |
| | | public String getJoystickDescriptor(InputDevice joystickDevice) { |
| | | return joystickDevice.getName(); |
| | | } |
| | | public int getProductId(InputDevice joystickDevice) { |
| | | return 0; |
| | | } |
| | | |
| | | public int getVendorId(InputDevice joystickDevice) { |
| | | return 0; |
| | | } |
| | | public int getButtonMask(InputDevice joystickDevice) { |
| | | return -1; |
| | | } |
| | | } |
| | | |
| | | class SDLJoystickHandler_API16 extends SDLJoystickHandler_API12 { |
| | | |
| | |
| | | } |
| | | |
| | | return super.getJoystickDescriptor(joystickDevice); |
| | | } |
| | | } |
| | | |
| | | class SDLJoystickHandler_API19 extends SDLJoystickHandler_API16 { |
| | | |
| | | @Override |
| | | public int getProductId(InputDevice joystickDevice) { |
| | | return joystickDevice.getProductId(); |
| | | } |
| | | |
| | | @Override |
| | | public int getVendorId(InputDevice joystickDevice) { |
| | | return joystickDevice.getVendorId(); |
| | | } |
| | | |
| | | @Override |
| | | public int getButtonMask(InputDevice joystickDevice) { |
| | | int button_mask = 0; |
| | | int[] keys = new int[] { |
| | | KeyEvent.KEYCODE_BUTTON_A, |
| | | KeyEvent.KEYCODE_BUTTON_B, |
| | | KeyEvent.KEYCODE_BUTTON_X, |
| | | KeyEvent.KEYCODE_BUTTON_Y, |
| | | KeyEvent.KEYCODE_BACK, |
| | | KeyEvent.KEYCODE_BUTTON_MODE, |
| | | KeyEvent.KEYCODE_BUTTON_START, |
| | | KeyEvent.KEYCODE_BUTTON_THUMBL, |
| | | KeyEvent.KEYCODE_BUTTON_THUMBR, |
| | | KeyEvent.KEYCODE_BUTTON_L1, |
| | | KeyEvent.KEYCODE_BUTTON_R1, |
| | | KeyEvent.KEYCODE_DPAD_UP, |
| | | KeyEvent.KEYCODE_DPAD_DOWN, |
| | | KeyEvent.KEYCODE_DPAD_LEFT, |
| | | KeyEvent.KEYCODE_DPAD_RIGHT, |
| | | KeyEvent.KEYCODE_BUTTON_SELECT, |
| | | KeyEvent.KEYCODE_DPAD_CENTER, |
| | | |
| | | // These don't map into any SDL controller buttons directly |
| | | KeyEvent.KEYCODE_BUTTON_L2, |
| | | KeyEvent.KEYCODE_BUTTON_R2, |
| | | KeyEvent.KEYCODE_BUTTON_C, |
| | | KeyEvent.KEYCODE_BUTTON_Z, |
| | | KeyEvent.KEYCODE_BUTTON_1, |
| | | KeyEvent.KEYCODE_BUTTON_2, |
| | | KeyEvent.KEYCODE_BUTTON_3, |
| | | KeyEvent.KEYCODE_BUTTON_4, |
| | | KeyEvent.KEYCODE_BUTTON_5, |
| | | KeyEvent.KEYCODE_BUTTON_6, |
| | | KeyEvent.KEYCODE_BUTTON_7, |
| | | KeyEvent.KEYCODE_BUTTON_8, |
| | | KeyEvent.KEYCODE_BUTTON_9, |
| | | KeyEvent.KEYCODE_BUTTON_10, |
| | | KeyEvent.KEYCODE_BUTTON_11, |
| | | KeyEvent.KEYCODE_BUTTON_12, |
| | | KeyEvent.KEYCODE_BUTTON_13, |
| | | KeyEvent.KEYCODE_BUTTON_14, |
| | | KeyEvent.KEYCODE_BUTTON_15, |
| | | KeyEvent.KEYCODE_BUTTON_16, |
| | | }; |
| | | int[] masks = new int[] { |
| | | (1 << 0), // A -> A |
| | | (1 << 1), // B -> B |
| | | (1 << 2), // X -> X |
| | | (1 << 3), // Y -> Y |
| | | (1 << 4), // BACK -> BACK |
| | | (1 << 5), // MODE -> GUIDE |
| | | (1 << 6), // START -> START |
| | | (1 << 7), // THUMBL -> LEFTSTICK |
| | | (1 << 8), // THUMBR -> RIGHTSTICK |
| | | (1 << 9), // L1 -> LEFTSHOULDER |
| | | (1 << 10), // R1 -> RIGHTSHOULDER |
| | | (1 << 11), // DPAD_UP -> DPAD_UP |
| | | (1 << 12), // DPAD_DOWN -> DPAD_DOWN |
| | | (1 << 13), // DPAD_LEFT -> DPAD_LEFT |
| | | (1 << 14), // DPAD_RIGHT -> DPAD_RIGHT |
| | | (1 << 4), // SELECT -> BACK |
| | | (1 << 0), // DPAD_CENTER -> A |
| | | (1 << 15), // L2 -> ?? |
| | | (1 << 16), // R2 -> ?? |
| | | (1 << 17), // C -> ?? |
| | | (1 << 18), // Z -> ?? |
| | | (1 << 20), // 1 -> ?? |
| | | (1 << 21), // 2 -> ?? |
| | | (1 << 22), // 3 -> ?? |
| | | (1 << 23), // 4 -> ?? |
| | | (1 << 24), // 5 -> ?? |
| | | (1 << 25), // 6 -> ?? |
| | | (1 << 26), // 7 -> ?? |
| | | (1 << 27), // 8 -> ?? |
| | | (1 << 28), // 9 -> ?? |
| | | (1 << 29), // 10 -> ?? |
| | | (1 << 30), // 11 -> ?? |
| | | (1 << 31), // 12 -> ?? |
| | | // We're out of room... |
| | | 0xFFFFFFFF, // 13 -> ?? |
| | | 0xFFFFFFFF, // 14 -> ?? |
| | | 0xFFFFFFFF, // 15 -> ?? |
| | | 0xFFFFFFFF, // 16 -> ?? |
| | | }; |
| | | boolean[] has_keys = joystickDevice.hasKeys(keys); |
| | | for (int i = 0; i < keys.length; ++i) { |
| | | if (has_keys[i]) { |
| | | button_mask |= masks[i]; |
| | | } |
| | | } |
| | | return button_mask; |
| | | } |
| | | } |
| | | |
| | | class SDLHapticHandler_API26 extends SDLHapticHandler { |
| | | @Override |
| | | public void run(int device_id, float intensity, int length) { |
| | | SDLHaptic haptic = getHaptic(device_id); |
| | | if (haptic != null) { |
| | | Log.d("SDL", "Rtest: Vibe with intensity " + intensity + " for " + length); |
| | | if (intensity == 0.0f) { |
| | | stop(device_id); |
| | | return; |
| | | } |
| | | |
| | | int vibeValue = Math.round(intensity * 255); |
| | | |
| | | if (vibeValue > 255) { |
| | | vibeValue = 255; |
| | | } |
| | | if (vibeValue < 1) { |
| | | stop(device_id); |
| | | return; |
| | | } |
| | | try { |
| | | haptic.vib.vibrate(VibrationEffect.createOneShot(length, vibeValue)); |
| | | } |
| | | catch (Exception e) { |
| | | // Fall back to the generic method, which uses DEFAULT_AMPLITUDE, but works even if |
| | | // something went horribly wrong with the Android 8.0 APIs. |
| | | haptic.vib.vibrate(length); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | mHaptics = new ArrayList<SDLHaptic>(); |
| | | } |
| | | |
| | | public void run(int device_id, int length) { |
| | | public void run(int device_id, float intensity, int length) { |
| | | SDLHaptic haptic = getHaptic(device_id); |
| | | if (haptic != null) { |
| | | haptic.vib.vibrate (length); |
| | | } |
| | | } |
| | | |
| | | public void stop(int device_id) { |
| | | SDLHaptic haptic = getHaptic(device_id); |
| | | if (haptic != null) { |
| | | haptic.vib.cancel(); |
| | | } |
| | | } |
| | | |
| | |
| | | case MotionEvent.ACTION_SCROLL: |
| | | x = event.getAxisValue(MotionEvent.AXIS_HSCROLL, 0); |
| | | y = event.getAxisValue(MotionEvent.AXIS_VSCROLL, 0); |
| | | SDLActivity.onNativeMouse(0, action, x, y); |
| | | SDLActivity.onNativeMouse(0, action, x, y, false); |
| | | return true; |
| | | |
| | | case MotionEvent.ACTION_HOVER_MOVE: |
| | | x = event.getX(0); |
| | | y = event.getY(0); |
| | | |
| | | SDLActivity.onNativeMouse(0, action, x, y); |
| | | SDLActivity.onNativeMouse(0, action, x, y, false); |
| | | return true; |
| | | |
| | | default: |
| | |
| | | // Event was not managed |
| | | return false; |
| | | } |
| | | |
| | | public boolean supportsRelativeMouse() { |
| | | return false; |
| | | } |
| | | |
| | | public boolean inRelativeMode() { |
| | | return false; |
| | | } |
| | | |
| | | public boolean setRelativeMouseEnabled(boolean enabled) { |
| | | return false; |
| | | } |
| | | |
| | | public void reclaimRelativeMouseModeIfNeeded() |
| | | { |
| | | |
| | | } |
| | | |
| | | public float getEventX(MotionEvent event) { |
| | | return event.getX(0); |
| | | } |
| | | |
| | | public float getEventY(MotionEvent event) { |
| | | return event.getY(0); |
| | | } |
| | | |
| | | } |
| | | |
| | | class SDLGenericMotionListener_API24 extends SDLGenericMotionListener_API12 { |
| | | // Generic Motion (mouse hover, joystick...) events go here |
| | | |
| | | private boolean mRelativeModeEnabled; |
| | | |
| | | @Override |
| | | public boolean onGenericMotion(View v, MotionEvent event) { |
| | | float x, y; |
| | | int action; |
| | | |
| | | switch ( event.getSource() ) { |
| | | case InputDevice.SOURCE_JOYSTICK: |
| | | case InputDevice.SOURCE_GAMEPAD: |
| | | case InputDevice.SOURCE_DPAD: |
| | | return SDLControllerManager.handleJoystickMotionEvent(event); |
| | | |
| | | case InputDevice.SOURCE_MOUSE: |
| | | if (!SDLActivity.mSeparateMouseAndTouch) { |
| | | break; |
| | | } |
| | | action = event.getActionMasked(); |
| | | switch (action) { |
| | | case MotionEvent.ACTION_SCROLL: |
| | | x = event.getAxisValue(MotionEvent.AXIS_HSCROLL, 0); |
| | | y = event.getAxisValue(MotionEvent.AXIS_VSCROLL, 0); |
| | | SDLActivity.onNativeMouse(0, action, x, y, false); |
| | | return true; |
| | | |
| | | case MotionEvent.ACTION_HOVER_MOVE: |
| | | if (mRelativeModeEnabled) { |
| | | x = event.getAxisValue(MotionEvent.AXIS_RELATIVE_X); |
| | | y = event.getAxisValue(MotionEvent.AXIS_RELATIVE_Y); |
| | | } |
| | | else { |
| | | x = event.getX(0); |
| | | y = event.getY(0); |
| | | } |
| | | |
| | | SDLActivity.onNativeMouse(0, action, x, y, mRelativeModeEnabled); |
| | | return true; |
| | | |
| | | default: |
| | | break; |
| | | } |
| | | break; |
| | | |
| | | default: |
| | | break; |
| | | } |
| | | |
| | | // Event was not managed |
| | | return false; |
| | | } |
| | | |
| | | @Override |
| | | public boolean supportsRelativeMouse() { |
| | | return true; |
| | | } |
| | | |
| | | @Override |
| | | public boolean inRelativeMode() { |
| | | return mRelativeModeEnabled; |
| | | } |
| | | |
| | | @Override |
| | | public boolean setRelativeMouseEnabled(boolean enabled) { |
| | | mRelativeModeEnabled = enabled; |
| | | return true; |
| | | } |
| | | |
| | | @Override |
| | | public float getEventX(MotionEvent event) { |
| | | if (mRelativeModeEnabled) { |
| | | return event.getAxisValue(MotionEvent.AXIS_RELATIVE_X); |
| | | } |
| | | else { |
| | | return event.getX(0); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public float getEventY(MotionEvent event) { |
| | | if (mRelativeModeEnabled) { |
| | | return event.getAxisValue(MotionEvent.AXIS_RELATIVE_Y); |
| | | } |
| | | else { |
| | | return event.getY(0); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | class SDLGenericMotionListener_API26 extends SDLGenericMotionListener_API24 { |
| | | // Generic Motion (mouse hover, joystick...) events go here |
| | | private boolean mRelativeModeEnabled; |
| | | |
| | | @Override |
| | | public boolean onGenericMotion(View v, MotionEvent event) { |
| | | float x, y; |
| | | int action; |
| | | |
| | | switch ( event.getSource() ) { |
| | | case InputDevice.SOURCE_JOYSTICK: |
| | | case InputDevice.SOURCE_GAMEPAD: |
| | | case InputDevice.SOURCE_DPAD: |
| | | return SDLControllerManager.handleJoystickMotionEvent(event); |
| | | |
| | | case InputDevice.SOURCE_MOUSE: |
| | | case 12290: // DeX desktop mouse cursor is a separate non-standard input type. |
| | | if (!SDLActivity.mSeparateMouseAndTouch) { |
| | | break; |
| | | } |
| | | |
| | | action = event.getActionMasked(); |
| | | switch (action) { |
| | | case MotionEvent.ACTION_SCROLL: |
| | | x = event.getAxisValue(MotionEvent.AXIS_HSCROLL, 0); |
| | | y = event.getAxisValue(MotionEvent.AXIS_VSCROLL, 0); |
| | | SDLActivity.onNativeMouse(0, action, x, y, false); |
| | | return true; |
| | | |
| | | case MotionEvent.ACTION_HOVER_MOVE: |
| | | x = event.getX(0); |
| | | y = event.getY(0); |
| | | SDLActivity.onNativeMouse(0, action, x, y, false); |
| | | return true; |
| | | |
| | | default: |
| | | break; |
| | | } |
| | | break; |
| | | |
| | | case InputDevice.SOURCE_MOUSE_RELATIVE: |
| | | if (!SDLActivity.mSeparateMouseAndTouch) { |
| | | break; |
| | | } |
| | | action = event.getActionMasked(); |
| | | switch (action) { |
| | | case MotionEvent.ACTION_SCROLL: |
| | | x = event.getAxisValue(MotionEvent.AXIS_HSCROLL, 0); |
| | | y = event.getAxisValue(MotionEvent.AXIS_VSCROLL, 0); |
| | | SDLActivity.onNativeMouse(0, action, x, y, false); |
| | | return true; |
| | | |
| | | case MotionEvent.ACTION_HOVER_MOVE: |
| | | x = event.getX(0); |
| | | y = event.getY(0); |
| | | SDLActivity.onNativeMouse(0, action, x, y, true); |
| | | return true; |
| | | |
| | | default: |
| | | break; |
| | | } |
| | | break; |
| | | |
| | | default: |
| | | break; |
| | | } |
| | | |
| | | // Event was not managed |
| | | return false; |
| | | } |
| | | |
| | | @Override |
| | | public boolean supportsRelativeMouse() { |
| | | return (!SDLActivity.isDeXMode() || (Build.VERSION.SDK_INT >= 27)); |
| | | } |
| | | |
| | | @Override |
| | | public boolean inRelativeMode() { |
| | | return mRelativeModeEnabled; |
| | | } |
| | | |
| | | @Override |
| | | public boolean setRelativeMouseEnabled(boolean enabled) { |
| | | if (!SDLActivity.isDeXMode() || (Build.VERSION.SDK_INT >= 27)) { |
| | | if (enabled) { |
| | | SDLActivity.getContentView().requestPointerCapture(); |
| | | } |
| | | else { |
| | | SDLActivity.getContentView().releasePointerCapture(); |
| | | } |
| | | mRelativeModeEnabled = enabled; |
| | | return true; |
| | | } |
| | | else |
| | | { |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void reclaimRelativeMouseModeIfNeeded() |
| | | { |
| | | if (mRelativeModeEnabled && !SDLActivity.isDeXMode()) { |
| | | SDLActivity.getContentView().requestPointerCapture(); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public float getEventX(MotionEvent event) { |
| | | // Relative mouse in capture mode will only have relative for X/Y |
| | | return event.getX(0); |
| | | } |
| | | |
| | | @Override |
| | | public float getEventY(MotionEvent event) { |
| | | // Relative mouse in capture mode will only have relative for X/Y |
| | | return event.getY(0); |
| | | } |
| | | } |
| | |
| | | buildscript { |
| | | repositories { |
| | | jcenter() |
| | | google() |
| | | } |
| | | dependencies { |
| | | classpath 'com.android.tools.build:gradle:2.3.3' |
| | | classpath 'com.android.tools.build:gradle:3.2.0' |
| | | |
| | | // NOTE: Do not place your application dependencies here; they belong |
| | | // in the individual module build.gradle files |
| | |
| | | allprojects { |
| | | repositories { |
| | | jcenter() |
| | | google() |
| | | } |
| | | } |
| | | |
| | |
| | | distributionPath=wrapper/dists |
| | | zipStoreBase=GRADLE_USER_HOME |
| | | zipStorePath=wrapper/dists |
| | | distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip |
| | | distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip |
| | |
| | | #!/bin/sh |
| | | # install - install a program, script, or datafile |
| | | |
| | | scriptversion=2005-02-02.21 |
| | | scriptversion=2011-11-20.07; # UTC |
| | | |
| | | # This originates from X11R5 (mit/util/scripts/install.sh), which was |
| | | # later released in X11R6 (xc/config/util/install.sh) with the |
| | |
| | | # FSF changes to this file are in the public domain. |
| | | # |
| | | # Calling this script install-sh is preferred over install.sh, to prevent |
| | | # `make' implicit rules from creating a file called install from it |
| | | # 'make' implicit rules from creating a file called install from it |
| | | # when there is no Makefile. |
| | | # |
| | | # This script is compatible with the BSD install script, but was written |
| | | # from scratch. It can only install one file at a time, a restriction |
| | | # shared with many OS's install programs. |
| | | # from scratch. |
| | | |
| | | nl=' |
| | | ' |
| | | IFS=" "" $nl" |
| | | |
| | | # set DOITPROG to echo to test this script |
| | | |
| | | # Don't use :- since 4.3BSD and earlier shells don't like it. |
| | | doit="${DOITPROG-}" |
| | | doit=${DOITPROG-} |
| | | if test -z "$doit"; then |
| | | doit_exec=exec |
| | | else |
| | | doit_exec=$doit |
| | | fi |
| | | |
| | | # put in absolute paths if you don't have them in your path; or use env. vars. |
| | | # Put in absolute file names if you don't have them in your path; |
| | | # or use environment vars. |
| | | |
| | | mvprog="${MVPROG-mv}" |
| | | cpprog="${CPPROG-cp}" |
| | | chmodprog="${CHMODPROG-chmod}" |
| | | chownprog="${CHOWNPROG-chown}" |
| | | chgrpprog="${CHGRPPROG-chgrp}" |
| | | stripprog="${STRIPPROG-strip}" |
| | | rmprog="${RMPROG-rm}" |
| | | mkdirprog="${MKDIRPROG-mkdir}" |
| | | chgrpprog=${CHGRPPROG-chgrp} |
| | | chmodprog=${CHMODPROG-chmod} |
| | | chownprog=${CHOWNPROG-chown} |
| | | cmpprog=${CMPPROG-cmp} |
| | | cpprog=${CPPROG-cp} |
| | | mkdirprog=${MKDIRPROG-mkdir} |
| | | mvprog=${MVPROG-mv} |
| | | rmprog=${RMPROG-rm} |
| | | stripprog=${STRIPPROG-strip} |
| | | |
| | | chmodcmd="$chmodprog 0755" |
| | | chowncmd= |
| | | posix_glob='?' |
| | | initialize_posix_glob=' |
| | | test "$posix_glob" != "?" || { |
| | | if (set -f) 2>/dev/null; then |
| | | posix_glob= |
| | | else |
| | | posix_glob=: |
| | | fi |
| | | } |
| | | ' |
| | | |
| | | posix_mkdir= |
| | | |
| | | # Desired mode of installed file. |
| | | mode=0755 |
| | | |
| | | chgrpcmd= |
| | | stripcmd= |
| | | chmodcmd=$chmodprog |
| | | chowncmd= |
| | | mvcmd=$mvprog |
| | | rmcmd="$rmprog -f" |
| | | mvcmd="$mvprog" |
| | | stripcmd= |
| | | |
| | | src= |
| | | dst= |
| | | dir_arg= |
| | | dstarg= |
| | | dst_arg= |
| | | |
| | | copy_on_change=false |
| | | no_target_directory= |
| | | |
| | | usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE |
| | | usage="\ |
| | | Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE |
| | | or: $0 [OPTION]... SRCFILES... DIRECTORY |
| | | or: $0 [OPTION]... -t DIRECTORY SRCFILES... |
| | | or: $0 [OPTION]... -d DIRECTORIES... |
| | |
| | | In the 4th, create DIRECTORIES. |
| | | |
| | | Options: |
| | | --help display this help and exit. |
| | | --version display version info and exit. |
| | | |
| | | -c (ignored) |
| | | -C install only if different (preserve the last data modification time) |
| | | -d create directories instead of installing files. |
| | | -g GROUP $chgrpprog installed files to GROUP. |
| | | -m MODE $chmodprog installed files to MODE. |
| | |
| | | -s $stripprog installed files. |
| | | -t DIRECTORY install into DIRECTORY. |
| | | -T report an error if DSTFILE is a directory. |
| | | --help display this help and exit. |
| | | --version display version info and exit. |
| | | |
| | | Environment variables override the default commands: |
| | | CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG |
| | | CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG |
| | | RMPROG STRIPPROG |
| | | " |
| | | |
| | | while test -n "$1"; do |
| | | while test $# -ne 0; do |
| | | case $1 in |
| | | -c) shift |
| | | continue;; |
| | | -c) ;; |
| | | |
| | | -d) dir_arg=true |
| | | shift |
| | | continue;; |
| | | -C) copy_on_change=true;; |
| | | |
| | | -d) dir_arg=true;; |
| | | |
| | | -g) chgrpcmd="$chgrpprog $2" |
| | | shift |
| | | shift |
| | | continue;; |
| | | shift;; |
| | | |
| | | --help) echo "$usage"; exit $?;; |
| | | |
| | | -m) chmodcmd="$chmodprog $2" |
| | | shift |
| | | shift |
| | | continue;; |
| | | -m) mode=$2 |
| | | case $mode in |
| | | *' '* | *' '* | *' |
| | | '* | *'*'* | *'?'* | *'['*) |
| | | echo "$0: invalid mode: $mode" >&2 |
| | | exit 1;; |
| | | esac |
| | | shift;; |
| | | |
| | | -o) chowncmd="$chownprog $2" |
| | | shift |
| | | shift |
| | | continue;; |
| | | shift;; |
| | | |
| | | -s) stripcmd=$stripprog |
| | | shift |
| | | continue;; |
| | | -s) stripcmd=$stripprog;; |
| | | |
| | | -t) dstarg=$2 |
| | | shift |
| | | shift |
| | | continue;; |
| | | -t) dst_arg=$2 |
| | | # Protect names problematic for 'test' and other utilities. |
| | | case $dst_arg in |
| | | -* | [=\(\)!]) dst_arg=./$dst_arg;; |
| | | esac |
| | | shift;; |
| | | |
| | | -T) no_target_directory=true |
| | | shift |
| | | continue;; |
| | | -T) no_target_directory=true;; |
| | | |
| | | --version) echo "$0 $scriptversion"; exit $?;; |
| | | |
| | | *) # When -d is used, all remaining arguments are directories to create. |
| | | --) shift |
| | | break;; |
| | | |
| | | -*) echo "$0: invalid option: $1" >&2 |
| | | exit 1;; |
| | | |
| | | *) break;; |
| | | esac |
| | | shift |
| | | done |
| | | |
| | | if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then |
| | | # When -d is used, all remaining arguments are directories to create. |
| | | # When -t is used, the destination is already specified. |
| | | test -n "$dir_arg$dstarg" && break |
| | | # Otherwise, the last argument is the destination. Remove it from $@. |
| | | for arg |
| | | do |
| | | if test -n "$dstarg"; then |
| | | if test -n "$dst_arg"; then |
| | | # $@ is not empty: it contains at least $arg. |
| | | set fnord "$@" "$dstarg" |
| | | set fnord "$@" "$dst_arg" |
| | | shift # fnord |
| | | fi |
| | | shift # arg |
| | | dstarg=$arg |
| | | done |
| | | break;; |
| | | dst_arg=$arg |
| | | # Protect names problematic for 'test' and other utilities. |
| | | case $dst_arg in |
| | | -* | [=\(\)!]) dst_arg=./$dst_arg;; |
| | | esac |
| | | done |
| | | fi |
| | | |
| | | if test -z "$1"; then |
| | | if test $# -eq 0; then |
| | | if test -z "$dir_arg"; then |
| | | echo "$0: no input file specified." >&2 |
| | | exit 1 |
| | | fi |
| | | # It's OK to call `install-sh -d' without argument. |
| | | # It's OK to call 'install-sh -d' without argument. |
| | | # This can happen when creating conditional directories. |
| | | exit 0 |
| | | fi |
| | | |
| | | if test -z "$dir_arg"; then |
| | | do_exit='(exit $ret); exit $ret' |
| | | trap "ret=129; $do_exit" 1 |
| | | trap "ret=130; $do_exit" 2 |
| | | trap "ret=141; $do_exit" 13 |
| | | trap "ret=143; $do_exit" 15 |
| | | |
| | | # Set umask so as not to create temps with too-generous modes. |
| | | # However, 'strip' requires both read and write access to temps. |
| | | case $mode in |
| | | # Optimize common cases. |
| | | *644) cp_umask=133;; |
| | | *755) cp_umask=22;; |
| | | |
| | | *[0-7]) |
| | | if test -z "$stripcmd"; then |
| | | u_plus_rw= |
| | | else |
| | | u_plus_rw='% 200' |
| | | fi |
| | | cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; |
| | | *) |
| | | if test -z "$stripcmd"; then |
| | | u_plus_rw= |
| | | else |
| | | u_plus_rw=,u+rw |
| | | fi |
| | | cp_umask=$mode$u_plus_rw;; |
| | | esac |
| | | fi |
| | | |
| | | for src |
| | | do |
| | | # Protect names starting with `-'. |
| | | # Protect names problematic for 'test' and other utilities. |
| | | case $src in |
| | | -*) src=./$src ;; |
| | | -* | [=\(\)!]) src=./$src;; |
| | | esac |
| | | |
| | | if test -n "$dir_arg"; then |
| | | dst=$src |
| | | src= |
| | | dstdir=$dst |
| | | test -d "$dstdir" |
| | | dstdir_status=$? |
| | | else |
| | | |
| | | if test -d "$dst"; then |
| | | mkdircmd=: |
| | | chmodcmd= |
| | | else |
| | | mkdircmd=$mkdirprog |
| | | fi |
| | | else |
| | | # Waiting for this to be detected by the "$cpprog $src $dsttmp" command |
| | | # might cause directories to be created, which would be especially bad |
| | | # if $src (and thus $dsttmp) contains '*'. |
| | |
| | | exit 1 |
| | | fi |
| | | |
| | | if test -z "$dstarg"; then |
| | | if test -z "$dst_arg"; then |
| | | echo "$0: no destination specified." >&2 |
| | | exit 1 |
| | | fi |
| | | |
| | | dst=$dstarg |
| | | # Protect names starting with `-'. |
| | | case $dst in |
| | | -*) dst=./$dst ;; |
| | | esac |
| | | dst=$dst_arg |
| | | |
| | | # If destination is a directory, append the input filename; won't work |
| | | # if double slashes aren't ignored. |
| | | if test -d "$dst"; then |
| | | if test -n "$no_target_directory"; then |
| | | echo "$0: $dstarg: Is a directory" >&2 |
| | | echo "$0: $dst_arg: Is a directory" >&2 |
| | | exit 1 |
| | | fi |
| | | dst=$dst/`basename "$src"` |
| | | dstdir=$dst |
| | | dst=$dstdir/`basename "$src"` |
| | | dstdir_status=0 |
| | | else |
| | | # Prefer dirname, but fall back on a substitute if dirname fails. |
| | | dstdir=` |
| | | (dirname "$dst") 2>/dev/null || |
| | | expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
| | | X"$dst" : 'X\(//\)[^/]' \| \ |
| | | X"$dst" : 'X\(//\)$' \| \ |
| | | X"$dst" : 'X\(/\)' \| . 2>/dev/null || |
| | | echo X"$dst" | |
| | | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ |
| | | s//\1/ |
| | | q |
| | | } |
| | | /^X\(\/\/\)[^/].*/{ |
| | | s//\1/ |
| | | q |
| | | } |
| | | /^X\(\/\/\)$/{ |
| | | s//\1/ |
| | | q |
| | | } |
| | | /^X\(\/\).*/{ |
| | | s//\1/ |
| | | q |
| | | } |
| | | s/.*/./; q' |
| | | ` |
| | | |
| | | test -d "$dstdir" |
| | | dstdir_status=$? |
| | | fi |
| | | fi |
| | | |
| | | # This sed command emulates the dirname command. |
| | | dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'` |
| | | obsolete_mkdir_used=false |
| | | |
| | | # Make sure that the destination directory exists. |
| | | if test $dstdir_status != 0; then |
| | | case $posix_mkdir in |
| | | '') |
| | | # Create intermediate dirs using mode 755 as modified by the umask. |
| | | # This is like FreeBSD 'install' as of 1997-10-28. |
| | | umask=`umask` |
| | | case $stripcmd.$umask in |
| | | # Optimize common cases. |
| | | *[2367][2367]) mkdir_umask=$umask;; |
| | | .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; |
| | | |
| | | # Skip lots of stat calls in the usual case. |
| | | if test ! -d "$dstdir"; then |
| | | defaultIFS=' |
| | | ' |
| | | IFS="${IFS-$defaultIFS}" |
| | | *[0-7]) |
| | | mkdir_umask=`expr $umask + 22 \ |
| | | - $umask % 100 % 40 + $umask % 20 \ |
| | | - $umask % 10 % 4 + $umask % 2 |
| | | `;; |
| | | *) mkdir_umask=$umask,go-w;; |
| | | esac |
| | | |
| | | # With -d, create the new directory with the user-specified mode. |
| | | # Otherwise, rely on $mkdir_umask. |
| | | if test -n "$dir_arg"; then |
| | | mkdir_mode=-m$mode |
| | | else |
| | | mkdir_mode= |
| | | fi |
| | | |
| | | posix_mkdir=false |
| | | case $umask in |
| | | *[123567][0-7][0-7]) |
| | | # POSIX mkdir -p sets u+wx bits regardless of umask, which |
| | | # is incompatible with FreeBSD 'install' when (umask & 300) != 0. |
| | | ;; |
| | | *) |
| | | tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ |
| | | trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 |
| | | |
| | | if (umask $mkdir_umask && |
| | | exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 |
| | | then |
| | | if test -z "$dir_arg" || { |
| | | # Check for POSIX incompatibilities with -m. |
| | | # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or |
| | | # other-writable bit of parent directory when it shouldn't. |
| | | # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. |
| | | ls_ld_tmpdir=`ls -ld "$tmpdir"` |
| | | case $ls_ld_tmpdir in |
| | | d????-?r-*) different_mode=700;; |
| | | d????-?--*) different_mode=755;; |
| | | *) false;; |
| | | esac && |
| | | $mkdirprog -m$different_mode -p -- "$tmpdir" && { |
| | | ls_ld_tmpdir_1=`ls -ld "$tmpdir"` |
| | | test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" |
| | | } |
| | | } |
| | | then posix_mkdir=: |
| | | fi |
| | | rmdir "$tmpdir/d" "$tmpdir" |
| | | else |
| | | # Remove any dirs left behind by ancient mkdir implementations. |
| | | rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null |
| | | fi |
| | | trap '' 0;; |
| | | esac;; |
| | | esac |
| | | |
| | | if |
| | | $posix_mkdir && ( |
| | | umask $mkdir_umask && |
| | | $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" |
| | | ) |
| | | then : |
| | | else |
| | | |
| | | # The umask is ridiculous, or mkdir does not conform to POSIX, |
| | | # or it failed possibly due to a race condition. Create the |
| | | # directory the slow way, step by step, checking for races as we go. |
| | | |
| | | case $dstdir in |
| | | /*) prefix='/';; |
| | | [-=\(\)!]*) prefix='./';; |
| | | *) prefix='';; |
| | | esac |
| | | |
| | | eval "$initialize_posix_glob" |
| | | |
| | | oIFS=$IFS |
| | | # Some sh's can't handle IFS=/ for some reason. |
| | | IFS='%' |
| | | set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` |
| | | IFS=/ |
| | | $posix_glob set -f |
| | | set fnord $dstdir |
| | | shift |
| | | $posix_glob set +f |
| | | IFS=$oIFS |
| | | |
| | | pathcomp= |
| | | prefixes= |
| | | |
| | | while test $# -ne 0 ; do |
| | | pathcomp=$pathcomp$1 |
| | | shift |
| | | if test ! -d "$pathcomp"; then |
| | | $mkdirprog "$pathcomp" |
| | | # mkdir can fail with a `File exist' error in case several |
| | | # install-sh are creating the directory concurrently. This |
| | | # is OK. |
| | | test -d "$pathcomp" || exit |
| | | for d |
| | | do |
| | | test X"$d" = X && continue |
| | | |
| | | prefix=$prefix$d |
| | | if test -d "$prefix"; then |
| | | prefixes= |
| | | else |
| | | if $posix_mkdir; then |
| | | (umask=$mkdir_umask && |
| | | $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break |
| | | # Don't fail if two instances are running concurrently. |
| | | test -d "$prefix" || exit 1 |
| | | else |
| | | case $prefix in |
| | | *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; |
| | | *) qprefix=$prefix;; |
| | | esac |
| | | prefixes="$prefixes '$qprefix'" |
| | | fi |
| | | pathcomp=$pathcomp/ |
| | | fi |
| | | prefix=$prefix/ |
| | | done |
| | | |
| | | if test -n "$prefixes"; then |
| | | # Don't fail if two instances are running concurrently. |
| | | (umask $mkdir_umask && |
| | | eval "\$doit_exec \$mkdirprog $prefixes") || |
| | | test -d "$dstdir" || exit 1 |
| | | obsolete_mkdir_used=true |
| | | fi |
| | | fi |
| | | fi |
| | | |
| | | if test -n "$dir_arg"; then |
| | | $doit $mkdircmd "$dst" \ |
| | | && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \ |
| | | && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \ |
| | | && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \ |
| | | && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; } |
| | | |
| | | { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && |
| | | { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && |
| | | { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || |
| | | test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 |
| | | else |
| | | dstfile=`basename "$dst"` |
| | | |
| | | # Make a couple of temp file names in the proper directory. |
| | | dsttmp=$dstdir/_inst.$$_ |
| | |
| | | |
| | | # Trap to clean up those temp files at exit. |
| | | trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 |
| | | trap '(exit $?); exit' 1 2 13 15 |
| | | |
| | | # Copy the file name to the temp name. |
| | | $doit $cpprog "$src" "$dsttmp" && |
| | | (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && |
| | | |
| | | # and set any options; do chmod last to preserve setuid bits. |
| | | # |
| | |
| | | # ignore errors from any of these, just make sure not to ignore |
| | | # errors from the above "$doit $cpprog $src $dsttmp" command. |
| | | # |
| | | { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ |
| | | && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ |
| | | && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ |
| | | && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } && |
| | | { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && |
| | | { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && |
| | | { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && |
| | | { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && |
| | | |
| | | # Now rename the file to the real destination. |
| | | { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \ |
| | | || { |
| | | # If -C, don't bother to copy if it wouldn't change the file. |
| | | if $copy_on_change && |
| | | old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && |
| | | new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && |
| | | |
| | | eval "$initialize_posix_glob" && |
| | | $posix_glob set -f && |
| | | set X $old && old=:$2:$4:$5:$6 && |
| | | set X $new && new=:$2:$4:$5:$6 && |
| | | $posix_glob set +f && |
| | | |
| | | test "$old" = "$new" && |
| | | $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 |
| | | then |
| | | rm -f "$dsttmp" |
| | | else |
| | | # Rename the file to the real destination. |
| | | $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || |
| | | |
| | | # The rename failed, perhaps because mv can't rename something else |
| | | # to itself, or perhaps because mv is so ancient that it does not |
| | | # support -f. |
| | | |
| | | { |
| | | # Now remove or move aside any old file at destination location. |
| | | # We try this two ways since rm can't unlink itself on some |
| | | # systems and the destination file might be busy for other |
| | | # reasons. In this case, the final cleanup might fail but the new |
| | | # file should still install successfully. |
| | | { |
| | | if test -f "$dstdir/$dstfile"; then |
| | | $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \ |
| | | || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \ |
| | | || { |
| | | echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 |
| | | test ! -f "$dst" || |
| | | $doit $rmcmd -f "$dst" 2>/dev/null || |
| | | { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && |
| | | { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } |
| | | } || |
| | | { echo "$0: cannot unlink or rename $dst" >&2 |
| | | (exit 1); exit 1 |
| | | } |
| | | else |
| | | : |
| | | fi |
| | | } && |
| | | |
| | | # Now rename the file to the real destination. |
| | | $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" |
| | | $doit $mvcmd "$dsttmp" "$dst" |
| | | } |
| | | } |
| | | fi || { (exit 1); exit 1; } |
| | | done |
| | | fi || exit 1 |
| | | |
| | | # The final little trick to "correctly" pass the exit status to the exit trap. |
| | | { |
| | | (exit 0); exit 0 |
| | | } |
| | | trap '' 0 |
| | | fi |
| | | done |
| | | |
| | | # Local variables: |
| | | # eval: (add-hook 'write-file-hooks 'time-stamp) |
| | | # time-stamp-start: "scriptversion=" |
| | | # time-stamp-format: "%:y-%02m-%02d.%02H" |
| | | # time-stamp-end: "$" |
| | | # time-stamp-time-zone: "UTC" |
| | | # time-stamp-end: "; # UTC" |
| | | # End: |
| | |
| | | # Darwin ld doesn't like 0 for these options... |
| | | func_arith $current + 1 |
| | | minor_current=$func_arith_result |
| | | xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" |
| | | verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" |
| | | #xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" |
| | | #verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" |
| | | # make the compatibility version match the Xcode project files, i.e. 1.0 |
| | | xlcverstring="${wl}-compatibility_version 1.0 ${wl}-current_version ${wl}$minor_current.$revision" |
| | | verstring="-compatibility_version 1.0 -current_version $minor_current.$revision" |
| | | ;; |
| | | |
| | | freebsd-aout) |
| | |
| | | #! /bin/sh |
| | | # mkinstalldirs --- make directory hierarchy |
| | | # Author: Noah Friedman <friedman@prep.ai.mit.edu> |
| | | # Created: 1993-05-16 |
| | | # Public domain |
| | | |
| | | scriptversion=2009-04-28.21; # UTC |
| | | |
| | | # Original author: Noah Friedman <friedman@prep.ai.mit.edu> |
| | | # Created: 1993-05-16 |
| | | # Public domain. |
| | | # |
| | | # This file is maintained in Automake, please report |
| | | # bugs to <bug-automake@gnu.org> or send patches to |
| | | # <automake-patches@gnu.org>. |
| | | |
| | | nl=' |
| | | ' |
| | | IFS=" "" $nl" |
| | | errstatus=0 |
| | | dirmode="" |
| | | dirmode= |
| | | |
| | | usage="\ |
| | | Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..." |
| | | Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ... |
| | | |
| | | Create each directory DIR (with mode MODE, if specified), including all |
| | | leading file name components. |
| | | |
| | | Report bugs to <bug-automake@gnu.org>." |
| | | |
| | | # process command line arguments |
| | | while test $# -gt 0 ; do |
| | | case "${1}" in |
| | | case $1 in |
| | | -h | --help | --h* ) # -h for help |
| | | echo "${usage}" 1>&2; exit 0 ;; |
| | | echo "$usage" |
| | | exit $? |
| | | ;; |
| | | -m ) # -m PERM arg |
| | | shift |
| | | test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; } |
| | | dirmode="${1}" |
| | | shift ;; |
| | | -- ) shift; break ;; # stop option processing |
| | | -* ) echo "${usage}" 1>&2; exit 1 ;; # unknown option |
| | | * ) break ;; # first non-opt arg |
| | | test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } |
| | | dirmode=$1 |
| | | shift |
| | | ;; |
| | | --version) |
| | | echo "$0 $scriptversion" |
| | | exit $? |
| | | ;; |
| | | --) # stop option processing |
| | | shift |
| | | break |
| | | ;; |
| | | -*) # unknown option |
| | | echo "$usage" 1>&2 |
| | | exit 1 |
| | | ;; |
| | | *) # first non-opt arg |
| | | break |
| | | ;; |
| | | esac |
| | | done |
| | | |
| | |
| | | 0) exit 0 ;; |
| | | esac |
| | | |
| | | # Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and |
| | | # mkdir -p a/c at the same time, both will detect that a is missing, |
| | | # one will create a, then the other will try to create a and die with |
| | | # a "File exists" error. This is a problem when calling mkinstalldirs |
| | | # from a parallel make. We use --version in the probe to restrict |
| | | # ourselves to GNU mkdir, which is thread-safe. |
| | | case $dirmode in |
| | | '') |
| | | if mkdir -p -- . 2>/dev/null; then |
| | | if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then |
| | | echo "mkdir -p -- $*" |
| | | exec mkdir -p -- "$@" |
| | | fi ;; |
| | | else |
| | | # On NextStep and OpenStep, the 'mkdir' command does not |
| | | # recognize any option. It will interpret all options as |
| | | # directories to create, and then abort because '.' already |
| | | # exists. |
| | | test -d ./-p && rmdir ./-p |
| | | test -d ./--version && rmdir ./--version |
| | | fi |
| | | ;; |
| | | *) |
| | | if mkdir -m "$dirmode" -p -- . 2>/dev/null; then |
| | | if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 && |
| | | test ! -d ./--version; then |
| | | echo "mkdir -m $dirmode -p -- $*" |
| | | exec mkdir -m "$dirmode" -p -- "$@" |
| | | fi ;; |
| | | else |
| | | # Clean up after NextStep and OpenStep mkdir. |
| | | for d in ./-m ./-p ./--version "./$dirmode"; |
| | | do |
| | | test -d $d && rmdir $d |
| | | done |
| | | fi |
| | | ;; |
| | | esac |
| | | |
| | | for file |
| | | do |
| | | set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` |
| | | case $file in |
| | | /*) pathcomp=/ ;; |
| | | *) pathcomp= ;; |
| | | esac |
| | | oIFS=$IFS |
| | | IFS=/ |
| | | set fnord $file |
| | | shift |
| | | IFS=$oIFS |
| | | |
| | | pathcomp= |
| | | for d |
| | | do |
| | | pathcomp="$pathcomp$d" |
| | | case "$pathcomp" in |
| | | test "x$d" = x && continue |
| | | |
| | | pathcomp=$pathcomp$d |
| | | case $pathcomp in |
| | | -* ) pathcomp=./$pathcomp ;; |
| | | esac |
| | | |
| | |
| | | else |
| | | if test ! -z "$dirmode"; then |
| | | echo "chmod $dirmode $pathcomp" |
| | | |
| | | lasterr="" |
| | | lasterr= |
| | | chmod "$dirmode" "$pathcomp" || lasterr=$? |
| | | |
| | | if test ! -z "$lasterr"; then |
| | |
| | | fi |
| | | fi |
| | | |
| | | pathcomp="$pathcomp/" |
| | | pathcomp=$pathcomp/ |
| | | done |
| | | done |
| | | |
| | |
| | | |
| | | # Local Variables: |
| | | # mode: shell-script |
| | | # sh-indentation: 3 |
| | | # sh-indentation: 2 |
| | | # eval: (add-hook 'write-file-hooks 'time-stamp) |
| | | # time-stamp-start: "scriptversion=" |
| | | # time-stamp-format: "%:y-%02m-%02d.%02H" |
| | | # time-stamp-time-zone: "UTC" |
| | | # time-stamp-end: "; # UTC" |
| | | # End: |
| | | # mkinstalldirs ends here |
| | |
| | | #
|
| | |
|
| | | # Base version of SDL, used for packaging purposes
|
| | | $SDLVersion = "2.0.7"
|
| | | $SDLVersion = "2.0.9"
|
| | |
|
| | | # Gets the .bat file that sets up an MSBuild environment, given one of
|
| | | # Visual Studio's, "PlatformToolset"s.
|
| | |
| | | FindLibraryAndSONAME("${_LIB}") |
| | | endforeach() |
| | | |
| | | find_path(X_INCLUDEDIR X11/Xlib.h) |
| | | find_path(X_INCLUDEDIR X11/Xlib.h |
| | | /usr/pkg/xorg/include |
| | | /usr/X11R6/include |
| | | /usr/X11R7/include |
| | | /usr/local/include/X11 |
| | | /usr/include/X11 |
| | | /usr/openwin/include |
| | | /usr/openwin/share/include |
| | | /opt/graphics/OpenGL/include |
| | | /opt/X11/include |
| | | ) |
| | | |
| | | if(X_INCLUDEDIR) |
| | | set(X_CFLAGS "-I${X_INCLUDEDIR}") |
| | | list(APPEND EXTRA_CFLAGS "-I${X_INCLUDEDIR}") |
| | | list(APPEND CMAKE_REQUIRED_INCLUDES "${X_INCLUDEDIR}") |
| | | endif() |
| | | |
| | | check_include_file(X11/Xcursor/Xcursor.h HAVE_XCURSOR_H) |
| | |
| | | endif() |
| | | if(NOT HAVE_SHMAT) |
| | | add_definitions(-DNO_SHARED_MEMORY) |
| | | set(X_CFLAGS "${X_CFLAGS} -DNO_SHARED_MEMORY") |
| | | list(APPEND EXTRA_CFLAGS "-DNO_SHARED_MEMORY") |
| | | endif() |
| | | endif() |
| | | |
| | |
| | | list(APPEND EXTRA_LIBS ${X11_LIB} ${XEXT_LIB}) |
| | | endif() |
| | | endif() |
| | | |
| | | set(SDL_CFLAGS "${SDL_CFLAGS} ${X_CFLAGS}") |
| | | |
| | | set(CMAKE_REQUIRED_LIBRARIES ${X11_LIB} ${X11_LIB}) |
| | | check_c_source_compiles(" |
| | |
| | | if(VIDEO_WAYLAND) |
| | | pkg_check_modules(WAYLAND wayland-client wayland-scanner wayland-protocols wayland-egl wayland-cursor egl xkbcommon) |
| | | |
| | | # We have to generate some protocol interface code for some various Wayland features. |
| | | if(WAYLAND_FOUND) |
| | | execute_process( |
| | | COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=pkgdatadir wayland-client |
| | | WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" |
| | | RESULT_VARIABLE WAYLAND_CORE_PROTOCOL_DIR_RC |
| | | OUTPUT_VARIABLE WAYLAND_CORE_PROTOCOL_DIR |
| | | ERROR_QUIET |
| | | OUTPUT_STRIP_TRAILING_WHITESPACE |
| | | ) |
| | | if(NOT WAYLAND_CORE_PROTOCOL_DIR_RC EQUAL 0) |
| | | set(WAYLAND_FOUND FALSE) |
| | | endif() |
| | | endif() |
| | | |
| | | if(WAYLAND_FOUND) |
| | | execute_process( |
| | | COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=pkgdatadir wayland-protocols |
| | | WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" |
| | | RESULT_VARIABLE WAYLAND_PROTOCOLS_DIR_RC |
| | | OUTPUT_VARIABLE WAYLAND_PROTOCOLS_DIR |
| | | ERROR_QUIET |
| | | OUTPUT_STRIP_TRAILING_WHITESPACE |
| | | ) |
| | | if(NOT WAYLAND_PROTOCOLS_DIR_RC EQUAL 0) |
| | | set(WAYLAND_FOUND FALSE) |
| | | endif() |
| | | endif() |
| | | |
| | | if(WAYLAND_FOUND) |
| | | execute_process( |
| | | COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=wayland_scanner wayland-scanner |
| | |
| | | file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/wayland-generated-protocols") |
| | | include_directories("${CMAKE_CURRENT_BINARY_DIR}/wayland-generated-protocols") |
| | | |
| | | WaylandProtocolGen("${WAYLAND_SCANNER}" "${WAYLAND_CORE_PROTOCOL_DIR}/wayland.xml" "wayland") |
| | | |
| | | foreach(_PROTL relative-pointer-unstable-v1 pointer-constraints-unstable-v1 xdg-shell-unstable-v6) |
| | | string(REGEX REPLACE "\\-unstable\\-.*$" "" PROTSUBDIR ${_PROTL}) |
| | | WaylandProtocolGen("${WAYLAND_SCANNER}" "${WAYLAND_PROTOCOLS_DIR}/unstable/${PROTSUBDIR}/${_PROTL}.xml" "${_PROTL}") |
| | | file(GLOB WAYLAND_PROTOCOLS_XML RELATIVE "${SDL2_SOURCE_DIR}/wayland-protocols/" "${SDL2_SOURCE_DIR}/wayland-protocols/*.xml") |
| | | foreach(_XML ${WAYLAND_PROTOCOLS_XML}) |
| | | string(REGEX REPLACE "\\.xml$" "" _PROTL "${_XML}") |
| | | WaylandProtocolGen("${WAYLAND_SCANNER}" "${SDL2_SOURCE_DIR}/wayland-protocols/${_XML}" "${_PROTL}") |
| | | endforeach() |
| | | |
| | | if(VIDEO_WAYLAND_QT_TOUCH) |
| | |
| | | enable_events |
| | | enable_joystick |
| | | enable_haptic |
| | | enable_sensor |
| | | enable_power |
| | | enable_filesystem |
| | | enable_threads |
| | |
| | | enable_pthreads |
| | | enable_pthread_sem |
| | | enable_directx |
| | | enable_wasapi |
| | | enable_sdl_dlopen |
| | | enable_hidapi |
| | | enable_clock_gettime |
| | | enable_rpath |
| | | enable_render_d3d |
| | |
| | | --enable-joystick Enable the joystick subsystem [[default=yes]] |
| | | --enable-haptic Enable the haptic (force feedback) subsystem |
| | | [[default=yes]] |
| | | --enable-sensor Enable the sensor subsystem [[default=yes]] |
| | | --enable-power Enable the power subsystem [[default=yes]] |
| | | --enable-filesystem Enable the filesystem subsystem [[default=yes]] |
| | | --enable-threads Enable the threading subsystem [[default=yes]] |
| | |
| | | QtWayland server support for Wayland video driver |
| | | [[default=yes]] |
| | | --enable-wayland-shared dynamically load Wayland support [[default=maybe]] |
| | | --enable-video-mir use Mir video driver [[default=yes]] |
| | | --enable-video-mir use Mir video driver [[default=no]] |
| | | --enable-mir-shared dynamically load Mir support [[default=maybe]] |
| | | --enable-video-rpi use Raspberry Pi video driver [[default=yes]] |
| | | --enable-video-x11 use X11 video driver [[default=yes]] |
| | |
| | | [[default=yes]] |
| | | --enable-pthread-sem use pthread semaphores [[default=yes]] |
| | | --enable-directx use DirectX for Windows audio/video [[default=yes]] |
| | | --enable-wasapi use the Windows WASAPI audio driver [[default=yes]] |
| | | --enable-sdl-dlopen use dlopen for shared object loading [[default=yes]] |
| | | --enable-hidapi use HIDAPI for low level joystick drivers |
| | | [[default=no]] |
| | | --enable-clock_gettime use clock_gettime() instead of gettimeofday() on |
| | | UNIX [[default=yes]] |
| | | --enable-rpath use an rpath when linking SDL [[default=yes]] |
| | |
| | | # |
| | | SDL_MAJOR_VERSION=2 |
| | | SDL_MINOR_VERSION=0 |
| | | SDL_MICRO_VERSION=8 |
| | | SDL_MICRO_VERSION=9 |
| | | SDL_INTERFACE_AGE=0 |
| | | SDL_BINARY_AGE=8 |
| | | SDL_BINARY_AGE=9 |
| | | SDL_VERSION=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION.$SDL_MICRO_VERSION |
| | | |
| | | |
| | |
| | | # fi |
| | | #done |
| | | SDL_CFLAGS="$BASE_CFLAGS" |
| | | SDL_LIBS="-lSDL2 $BASE_LDFLAGS" |
| | | SDL_LIBS="-lSDL2" |
| | | if test "x$BASE_LDFLAGS" != x; then |
| | | SDL_LIBS="$SDL_LIBS $BASE_LDFLAGS" |
| | | fi |
| | | if test "x$EXTRA_CFLAGS" != x; then |
| | | CPPFLAGS="$CPPFLAGS $EXTRA_CFLAGS" |
| | | CFLAGS="$CFLAGS $EXTRA_CFLAGS" |
| | | fi |
| | | if test "x$EXTRA_LDFLAGS" != x; then |
| | | LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS" |
| | | fi |
| | | |
| | | base_libdir=`echo \${libdir} | sed 's/.*\/\(.*\)/\1/; q'` |
| | | |
| | |
| | | LIBS="$LIBS -lm"; EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lm" |
| | | fi |
| | | |
| | | for ac_func in acos acosf asin asinf atan atanf atan2 atan2f ceil ceilf copysign copysignf cos cosf fabs fabsf floor floorf fmod fmodf log logf log10 log10f pow powf scalbn scalbnf sin sinf sqrt sqrtf tan tanf |
| | | for ac_func in acos acosf asin asinf atan atanf atan2 atan2f ceil ceilf copysign copysignf cos cosf exp expf fabs fabsf floor floorf fmod fmodf log logf log10 log10f pow powf scalbn scalbnf sin sinf sqrt sqrtf tan tanf |
| | | do : |
| | | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` |
| | | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" |
| | |
| | | #SOURCES="$SOURCES $srcdir/src/filesystem/*.c" |
| | | SOURCES="$SOURCES $srcdir/src/render/*.c" |
| | | SOURCES="$SOURCES $srcdir/src/render/*/*.c" |
| | | SOURCES="$SOURCES $srcdir/src/sensor/*.c" |
| | | SOURCES="$SOURCES $srcdir/src/stdlib/*.c" |
| | | SOURCES="$SOURCES $srcdir/src/thread/*.c" |
| | | SOURCES="$SOURCES $srcdir/src/timer/*.c" |
| | |
| | | |
| | | else |
| | | SUMMARY_modules="${SUMMARY_modules} haptic" |
| | | fi |
| | | # Check whether --enable-sensor was given. |
| | | if test "${enable_sensor+set}" = set; then : |
| | | enableval=$enable_sensor; |
| | | else |
| | | enable_sensor=yes |
| | | fi |
| | | |
| | | if test x$enable_sensor != xyes; then |
| | | |
| | | $as_echo "#define SDL_SENSOR_DISABLED 1" >>confdefs.h |
| | | |
| | | else |
| | | SUMMARY_modules="${SUMMARY_modules} sensor" |
| | | fi |
| | | # Check whether --enable-power was given. |
| | | if test "${enable_power+set}" = set; then : |
| | |
| | | WAYLAND_CFLAGS=`$PKG_CONFIG --cflags wayland-client wayland-egl wayland-cursor xkbcommon` |
| | | WAYLAND_LIBS=`$PKG_CONFIG --libs wayland-client wayland-egl wayland-cursor xkbcommon` |
| | | WAYLAND_SCANNER=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner` |
| | | WAYLAND_CORE_PROTOCOL_DIR=`$PKG_CONFIG --variable=pkgdatadir wayland-client` |
| | | WAYLAND_PROTOCOLS_DIR=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols` |
| | | video_wayland=yes |
| | | fi |
| | | fi |
| | |
| | | |
| | | fi |
| | | |
| | | WAYLAND_PROTOCOLS_UNSTABLE="relative-pointer-unstable-v1 pointer-constraints-unstable-v1 xdg-shell-unstable-v6" |
| | | |
| | | SOURCES="$SOURCES $srcdir/src/video/wayland/*.c" |
| | | WAYLAND_SOURCES="$srcdir/src/video/wayland/*.c" |
| | | SOURCES="$SOURCES $WAYLAND_SOURCES" |
| | | EXTRA_CFLAGS="$EXTRA_CFLAGS $WAYLAND_CFLAGS -I\$(gen)" |
| | | # Check whether --enable-wayland-shared was given. |
| | | if test "${enable_wayland_shared+set}" = set; then : |
| | |
| | | if test "${enable_video_mir+set}" = set; then : |
| | | enableval=$enable_video_mir; |
| | | else |
| | | enable_video_mir=yes |
| | | enable_video_mir=no |
| | | fi |
| | | |
| | | |
| | |
| | | |
| | | $as_echo "#define SDL_VIDEO_DRIVER_DIRECTFB 1" >>confdefs.h |
| | | |
| | | |
| | | $as_echo "#define SDL_VIDEO_RENDER_DIRECTFB 1" >>confdefs.h |
| | | |
| | | SOURCES="$SOURCES $srcdir/src/video/directfb/*.c" |
| | | EXTRA_CFLAGS="$EXTRA_CFLAGS $DIRECTFB_CFLAGS" |
| | | |
| | |
| | | $as_echo "#define SDL_VIDEO_RENDER_OGL 1" >>confdefs.h |
| | | |
| | | SUMMARY_video="${SUMMARY_video} opengl" |
| | | fi |
| | | } |
| | | |
| | | CheckMacGLES() |
| | | { |
| | | if test x$enable_video = xyes -a x$enable_video_opengles = xyes; then |
| | | video_opengl_egl=yes |
| | | |
| | | $as_echo "#define SDL_VIDEO_OPENGL_EGL 1" >>confdefs.h |
| | | |
| | | video_opengles_v2=yes |
| | | |
| | | $as_echo "#define SDL_VIDEO_OPENGL_ES2 1" >>confdefs.h |
| | | |
| | | |
| | | $as_echo "#define SDL_VIDEO_RENDER_OGL_ES2 1" >>confdefs.h |
| | | |
| | | SUMMARY_video="${SUMMARY_video} opengl_es2" |
| | | fi |
| | | } |
| | | |
| | |
| | | fi |
| | | |
| | | |
| | | ac_fn_c_check_header_mongrel "$LINENO" "mmdeviceapi.h" "ac_cv_header_mmdeviceapi_h" "$ac_includes_default" |
| | | if test "x$ac_cv_header_mmdeviceapi_h" = xyes; then : |
| | | have_wasapi=yes |
| | | fi |
| | | |
| | | |
| | | ac_fn_c_check_header_mongrel "$LINENO" "audioclient.h" "ac_cv_header_audioclient_h" "$ac_includes_default" |
| | | if test "x$ac_cv_header_audioclient_h" = xyes; then : |
| | | |
| | | else |
| | | have_wasapi=no |
| | | fi |
| | | |
| | | |
| | | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| | | /* end confdefs.h. */ |
| | | |
| | |
| | | ;; |
| | | esac |
| | | fi |
| | | |
| | | ac_fn_c_check_header_mongrel "$LINENO" "mmdeviceapi.h" "ac_cv_header_mmdeviceapi_h" "$ac_includes_default" |
| | | if test "x$ac_cv_header_mmdeviceapi_h" = xyes; then : |
| | | have_wasapi=yes |
| | | fi |
| | | |
| | | |
| | | if test x$have_wasapi = xyes; then |
| | | $as_echo "#define HAVE_MMDEVICEAPI_H 1" >>confdefs.h |
| | | |
| | | fi |
| | | ac_fn_c_check_header_mongrel "$LINENO" "audioclient.h" "ac_cv_header_audioclient_h" "$ac_includes_default" |
| | | if test "x$ac_cv_header_audioclient_h" = xyes; then : |
| | | |
| | | else |
| | | have_wasapi=no |
| | | fi |
| | | |
| | | |
| | | if test x$have_wasapi = xyes; then |
| | | $as_echo "#define HAVE_AUDIOCLIENT_H 1" >>confdefs.h |
| | | |
| | | fi |
| | | |
| | | ac_fn_c_check_header_mongrel "$LINENO" "endpointvolume.h" "ac_cv_header_endpointvolume_h" "$ac_includes_default" |
| | | if test "x$ac_cv_header_endpointvolume_h" = xyes; then : |
| | | $as_echo "#define HAVE_ENDPOINTVOLUME_H 1" >>confdefs.h |
| | | |
| | | fi |
| | | |
| | | |
| | | |
| | | # Check whether --enable-wasapi was given. |
| | | if test "${enable_wasapi+set}" = set; then : |
| | | enableval=$enable_wasapi; |
| | | else |
| | | enable_wasapi=yes |
| | | fi |
| | | |
| | | } |
| | | |
| | | CheckDLOPEN() |
| | |
| | | esac |
| | | } |
| | | |
| | | CheckHIDAPI() |
| | | { |
| | | # The hidraw support doesn't catch Xbox, PS4 and Nintendo controllers, |
| | | # so we'll just use libusb when it's available. |
| | | # |
| | | # Except that libusb requires root permissions to open devices, so that's not generally useful, and we'll disable this by default. |
| | | # Check whether --enable-hidapi was given. |
| | | if test "${enable_hidapi+set}" = set; then : |
| | | enableval=$enable_hidapi; |
| | | else |
| | | enable_hidapi=no |
| | | fi |
| | | |
| | | if test x$enable_joystick = xyes -a x$enable_hidapi = xyes; then |
| | | hidapi_support=no |
| | | # Extract the first word of "pkg-config", so it can be a program name with args. |
| | | set dummy pkg-config; ac_word=$2 |
| | | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| | | $as_echo_n "checking for $ac_word... " >&6; } |
| | | if ${ac_cv_path_PKG_CONFIG+:} false; then : |
| | | $as_echo_n "(cached) " >&6 |
| | | else |
| | | case $PKG_CONFIG in |
| | | [\\/]* | ?:[\\/]*) |
| | | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. |
| | | ;; |
| | | *) |
| | | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| | | for as_dir in $PATH |
| | | do |
| | | IFS=$as_save_IFS |
| | | test -z "$as_dir" && as_dir=. |
| | | for ac_exec_ext in '' $ac_executable_extensions; do |
| | | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
| | | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" |
| | | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| | | break 2 |
| | | fi |
| | | done |
| | | done |
| | | IFS=$as_save_IFS |
| | | |
| | | test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" |
| | | ;; |
| | | esac |
| | | fi |
| | | PKG_CONFIG=$ac_cv_path_PKG_CONFIG |
| | | if test -n "$PKG_CONFIG"; then |
| | | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 |
| | | $as_echo "$PKG_CONFIG" >&6; } |
| | | else |
| | | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| | | $as_echo "no" >&6; } |
| | | fi |
| | | |
| | | |
| | | if test x$PKG_CONFIG != xno; then |
| | | LIBUSB_CFLAGS=`$PKG_CONFIG --cflags libusb-1.0` |
| | | LIBUSB_LDFLAGS=`$PKG_CONFIG --libs libusb-1.0` |
| | | save_CFLAGS="$CFLAGS" |
| | | CFLAGS="$save_CFLAGS $LIBUSB_CFLAGS" |
| | | ac_fn_c_check_header_mongrel "$LINENO" "libusb.h" "ac_cv_header_libusb_h" "$ac_includes_default" |
| | | if test "x$ac_cv_header_libusb_h" = xyes; then : |
| | | have_libusb_h=yes |
| | | fi |
| | | |
| | | |
| | | CFLAGS="$save_CFLAGS" |
| | | fi |
| | | if test x$have_libusb_h = xyes; then |
| | | hidapi_support=yes |
| | | |
| | | $as_echo "#define SDL_JOYSTICK_HIDAPI 1" >>confdefs.h |
| | | |
| | | EXTRA_CFLAGS="$EXTRA_CFLAGS -I$srcdir/src/hidapi/hidapi" |
| | | SOURCES="$SOURCES $srcdir/src/joystick/hidapi/*.c" |
| | | SOURCES="$SOURCES $srcdir/src/hidapi/libusb/hid.c" |
| | | EXTRA_CFLAGS="$EXTRA_CFLAGS $LIBUSB_CFLAGS" |
| | | EXTRA_LDFLAGS="$EXTRA_LDFLAGS $LIBUSB_LDFLAGS" |
| | | fi |
| | | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hidapi support" >&5 |
| | | $as_echo_n "checking for hidapi support... " >&6; } |
| | | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hidapi_support" >&5 |
| | | $as_echo "$hidapi_support" >&6; } |
| | | fi |
| | | } |
| | | |
| | | CheckClockGettime() |
| | | { |
| | | # Check whether --enable-clock_gettime was given. |
| | |
| | | esac |
| | | CheckTslib |
| | | CheckUSBHID |
| | | CheckHIDAPI |
| | | CheckPTHREAD |
| | | CheckClockGettime |
| | | CheckLinuxVersion |
| | |
| | | |
| | | SOURCES="$SOURCES $srcdir/src/haptic/android/*.c" |
| | | have_haptic=yes |
| | | ;; |
| | | esac |
| | | fi |
| | | # Set up files for the sensor library |
| | | if test x$enable_sensor = xyes; then |
| | | case $ARCH in |
| | | android) |
| | | |
| | | $as_echo "#define SDL_SENSOR_ANDROID 1" >>confdefs.h |
| | | |
| | | SOURCES="$SOURCES $srcdir/src/sensor/android/*.c" |
| | | have_sensor=yes |
| | | ;; |
| | | esac |
| | | fi |
| | |
| | | |
| | | SOURCES="$SOURCES $srcdir/src/audio/directsound/*.c" |
| | | fi |
| | | if test x$have_wasapi = xyes; then |
| | | if test x$have_wasapi = xyes -a x$enable_wasapi = xyes; then |
| | | |
| | | $as_echo "#define SDL_AUDIO_DRIVER_WASAPI 1" >>confdefs.h |
| | | |
| | | SUMMARY_audio="${SUMMARY_audio} wasapi" |
| | | SOURCES="$SOURCES $srcdir/src/audio/wasapi/*.c" |
| | | fi |
| | | have_audio=yes |
| | |
| | | $as_echo "#define SDL_JOYSTICK_WINMM 1" >>confdefs.h |
| | | |
| | | fi |
| | | |
| | | $as_echo "#define SDL_JOYSTICK_HIDAPI 1" >>confdefs.h |
| | | |
| | | SOURCES="$SOURCES $srcdir/src/joystick/windows/*.c" |
| | | SOURCES="$SOURCES $srcdir/src/joystick/hidapi/*.c" |
| | | SOURCES="$SOURCES $srcdir/src/hidapi/windows/hid.c" |
| | | EXTRA_CFLAGS="$EXTRA_CFLAGS -I$srcdir/src/hidapi/hidapi" |
| | | have_joystick=yes |
| | | fi |
| | | if test x$enable_haptic = xyes; then |
| | |
| | | else |
| | | LIBUUID=-luuid |
| | | fi |
| | | EXTRA_LDFLAGS="$EXTRA_LDFLAGS -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lversion $LIBUUID -static-libgcc" |
| | | EXTRA_LDFLAGS="$EXTRA_LDFLAGS -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lsetupapi -lversion $LIBUUID -static-libgcc" |
| | | # The Windows platform requires special setup |
| | | VERSION_SOURCES="$srcdir/src/main/windows/*.rc" |
| | | SDLMAIN_SOURCES="$srcdir/src/main/windows/*.c" |
| | |
| | | CheckMETAL |
| | | CheckX11 |
| | | CheckMacGL |
| | | CheckMacGLES |
| | | CheckOpenGLX11 |
| | | CheckVulkan |
| | | CheckPTHREAD |
| | |
| | | |
| | | $as_echo "#define SDL_JOYSTICK_IOKIT 1" >>confdefs.h |
| | | |
| | | |
| | | $as_echo "#define SDL_JOYSTICK_HIDAPI 1" >>confdefs.h |
| | | |
| | | SOURCES="$SOURCES $srcdir/src/joystick/darwin/*.c" |
| | | SOURCES="$SOURCES $srcdir/src/joystick/hidapi/*.c" |
| | | SOURCES="$SOURCES $srcdir/src/hidapi/mac/hid.c" |
| | | EXTRA_CFLAGS="$EXTRA_CFLAGS -I$srcdir/src/hidapi/hidapi" |
| | | have_joystick=yes |
| | | fi |
| | | # Set up files for the haptic library |
| | |
| | | if test x$have_joystick != xyes; then |
| | | if test x$enable_joystick = xyes; then |
| | | |
| | | $as_echo "#define SDL_JOYSTICK_DISABLED 1" >>confdefs.h |
| | | $as_echo "#define SDL_JOYSTICK_DUMMY 1" >>confdefs.h |
| | | |
| | | fi |
| | | SOURCES="$SOURCES $srcdir/src/joystick/dummy/*.c" |
| | |
| | | if test x$have_haptic != xyes; then |
| | | if test x$enable_haptic = xyes; then |
| | | |
| | | $as_echo "#define SDL_HAPTIC_DISABLED 1" >>confdefs.h |
| | | $as_echo "#define SDL_HAPTIC_DUMMY 1" >>confdefs.h |
| | | |
| | | fi |
| | | SOURCES="$SOURCES $srcdir/src/haptic/dummy/*.c" |
| | | fi |
| | | if test x$have_sensor != xyes; then |
| | | if test x$enable_sensor = xyes; then |
| | | |
| | | $as_echo "#define SDL_SENSOR_DUMMY 1" >>confdefs.h |
| | | |
| | | fi |
| | | SOURCES="$SOURCES $srcdir/src/sensor/dummy/*.c" |
| | | fi |
| | | if test x$have_threads != xyes; then |
| | | if test x$enable_threads = xyes; then |
| | |
| | | SDLTEST_SOURCES="$srcdir/src/test/*.c" |
| | | |
| | | if test x$video_wayland = xyes; then |
| | | WAYLAND_CORE_PROTOCOL_SOURCE='$(gen)/wayland-protocol.c' |
| | | WAYLAND_CORE_PROTOCOL_HEADER='$(gen)/wayland-client-protocol.h' |
| | | WAYLAND_PROTOCOLS_UNSTABLE_SOURCES=`echo $WAYLAND_PROTOCOLS_UNSTABLE |\ |
| | | sed 's,[^ ]\+,\\$(gen)/&-protocol.c,g'` |
| | | WAYLAND_PROTOCOLS_UNSTABLE_HEADERS=`echo $WAYLAND_PROTOCOLS_UNSTABLE |\ |
| | | sed 's,[^ ]\+,\\$(gen)/&-client-protocol.h,g'` |
| | | GEN_SOURCES="$GEN_SOURCES $WAYLAND_CORE_PROTOCOL_SOURCE $WAYLAND_PROTOCOLS_UNSTABLE_SOURCES" |
| | | GEN_HEADERS="$GEN_HEADERS $WAYLAND_CORE_PROTOCOL_HEADER $WAYLAND_PROTOCOLS_UNSTABLE_HEADERS" |
| | | WAYLAND_PROTOCOLS=`cd $srcdir/wayland-protocols ; for p in *.xml ; do echo -n "\$p" |sed 's,\\.xml\$, ,g' ; done` |
| | | WAYLAND_PROTOCOLS_SOURCES=`for p in $WAYLAND_PROTOCOLS ; do echo -n "\\$(gen)/\$p-protocol.c " ; done` |
| | | WAYLAND_PROTOCOLS_HEADERS=`for p in $WAYLAND_PROTOCOLS ; do echo -n "\\$(gen)/\$p-client-protocol.h " ; done` |
| | | GEN_SOURCES="$GEN_SOURCES $WAYLAND_PROTOCOLS_SOURCES" |
| | | GEN_HEADERS="$GEN_HEADERS $WAYLAND_PROTOCOLS_HEADERS" |
| | | |
| | | WAYLAND_CORE_PROTOCOL_SOURCE_DEPENDS=" |
| | | $WAYLAND_CORE_PROTOCOL_SOURCE: $WAYLAND_CORE_PROTOCOL_DIR/wayland.xml |
| | | \$(SHELL) \$(auxdir)/mkinstalldirs \$(gen) |
| | | \$(RUN_CMD_GEN)\$(WAYLAND_SCANNER) code \$< \$@" |
| | | |
| | | WAYLAND_CORE_PROTOCOL_HEADER_DEPENDS=" |
| | | $WAYLAND_CORE_PROTOCOL_HEADER: $WAYLAND_CORE_PROTOCOL_DIR/wayland.xml |
| | | \$(SHELL) \$(auxdir)/mkinstalldirs \$(gen) |
| | | \$(RUN_CMD_GEN)\$(WAYLAND_SCANNER) client-header \$< \$@" |
| | | |
| | | WAYLAND_CORE_PROTOCOL_OBJECT=" |
| | | \$(objects)/`echo $WAYLAND_CORE_PROTOCOL_SOURCE | sed 's/\$(gen)\/\(.*\).c$/\1.lo/'`: $WAYLAND_CORE_PROTOCOL_SOURCE |
| | | \$(RUN_CMD_CC)\$(LIBTOOL) --tag=CC --mode=compile \$(CC) \$(CFLAGS) \$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \$< -o \$@" |
| | | |
| | | WAYLAND_PROTOCOLS_CLIENT_HEADER_UNSTABLE_DEPENDS=`for p in $WAYLAND_PROTOCOLS_UNSTABLE;\ |
| | | do echo ; echo \$p | sed\ |
| | | "s,^\\([a-z\\-]\\+\\)-unstable-\\(v[0-9]\+\\)\$,\\$(gen)/&-client-protocol.h: $WAYLAND_PROTOCOLS_DIR/unstable/\1/&.xml\\\\ |
| | | \\$(SHELL) \\$(auxdir)/mkinstalldirs \\$(gen)\\\\ |
| | | \\$(RUN_CMD_GEN)\\$(WAYLAND_SCANNER) client-header \\$< \\$@," ; done` |
| | | |
| | | WAYLAND_PROTOCOLS_CODE_UNSTABLE_DEPENDS=`for p in $WAYLAND_PROTOCOLS_UNSTABLE;\ |
| | | do echo ; echo \$p | sed\ |
| | | "s,^\\([a-z\\-]\\+\\)-unstable-\\(v[0-9]\+\\)\$,\\$(gen)/&-protocol.c: $WAYLAND_PROTOCOLS_DIR/unstable/\1/&.xml\\\\ |
| | | \\$(SHELL) \\$(auxdir)/mkinstalldirs \\$(gen)\\\\ |
| | | \\$(RUN_CMD_GEN)\\$(WAYLAND_SCANNER) code \\$< \\$@," ; done` |
| | | |
| | | WAYLAND_PROTOCOLS_OBJECTS_UNSTABLE=`for p in $WAYLAND_PROTOCOLS_UNSTABLE;\ |
| | | do echo ; echo \$p | sed\ |
| | | "s,^\\([a-z\\-]\\+\\)-unstable-\\(v[0-9]\+\\)\$,\\\$(objects)/&-protocol.lo: \\$(gen)/&-protocol.c \\$(gen)/&-client-protocol.h\\\\ |
| | | \\$(RUN_CMD_CC)\\$(LIBTOOL) --tag=CC --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@," ; done` |
| | | |
| | | WAYLAND_PROTOCOLS_DEPENDS=" |
| | | $WAYLAND_CORE_PROTOCOL_SOURCE_DEPENDS |
| | | $WAYLAND_CORE_PROTOCOL_HEADER_DEPENDS |
| | | $WAYLAND_CORE_PROTOCOL_OBJECT |
| | | $WAYLAND_PROTOCOLS_CLIENT_HEADER_UNSTABLE_DEPENDS |
| | | $WAYLAND_PROTOCOLS_CODE_UNSTABLE_DEPENDS |
| | | $WAYLAND_PROTOCOLS_OBJECTS_UNSTABLE |
| | | " |
| | | WAYLAND_PROTOCOLS_DEPENDS=`for p in $WAYLAND_PROTOCOLS ; do\ |
| | | echo ;\ |
| | | echo "\\$(gen)/\$p-client-protocol.h: \\$(srcdir)/wayland-protocols/\$p.xml" ;\ |
| | | echo " @\\$(SHELL) \\$(auxdir)/mkinstalldirs \\$(gen)" ;\ |
| | | echo " \\$(RUN_CMD_GEN)\\$(WAYLAND_SCANNER) client-header \\$< \\$@" ;\ |
| | | echo ;\ |
| | | echo "\\$(gen)/\$p-protocol.c: \\$(srcdir)/wayland-protocols/\$p.xml" ;\ |
| | | echo " @\\$(SHELL) \\$(auxdir)/mkinstalldirs \\$(gen)" ;\ |
| | | echo " \\$(RUN_CMD_GEN)\\$(WAYLAND_SCANNER) code \\$< \\$@" ;\ |
| | | echo ;\ |
| | | echo "\\$(objects)/\$p-protocol.lo: \\$(gen)/\$p-protocol.c \\$(gen)/\$p-client-protocol.h" ;\ |
| | | echo " \\$(RUN_CMD_CC)\\$(LIBTOOL) --tag=CC --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@" ;\ |
| | | done ;\ |
| | | echo ;\ |
| | | for s in $WAYLAND_SOURCES ; do echo -n "\$s:" ; for p in $WAYLAND_PROTOCOLS ; do echo -n " \\$(gen)/\$p-client-protocol.h" ; done ; echo ; done ; echo` |
| | | fi |
| | | |
| | | OBJECTS=`echo $SOURCES` |
| | |
| | | # |
| | | SDL_MAJOR_VERSION=2 |
| | | SDL_MINOR_VERSION=0 |
| | | SDL_MICRO_VERSION=8 |
| | | SDL_MICRO_VERSION=9 |
| | | SDL_INTERFACE_AGE=0 |
| | | SDL_BINARY_AGE=8 |
| | | SDL_BINARY_AGE=9 |
| | | SDL_VERSION=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION.$SDL_MICRO_VERSION |
| | | |
| | | AC_SUBST(SDL_MAJOR_VERSION) |
| | |
| | | # fi |
| | | #done |
| | | SDL_CFLAGS="$BASE_CFLAGS" |
| | | SDL_LIBS="-lSDL2 $BASE_LDFLAGS" |
| | | SDL_LIBS="-lSDL2" |
| | | if test "x$BASE_LDFLAGS" != x; then |
| | | SDL_LIBS="$SDL_LIBS $BASE_LDFLAGS" |
| | | fi |
| | | if test "x$EXTRA_CFLAGS" != x; then |
| | | CPPFLAGS="$CPPFLAGS $EXTRA_CFLAGS" |
| | | CFLAGS="$CFLAGS $EXTRA_CFLAGS" |
| | | fi |
| | | if test "x$EXTRA_LDFLAGS" != x; then |
| | | LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS" |
| | | fi |
| | | |
| | | dnl set this to use on systems that use lib64 instead of lib |
| | | base_libdir=`echo \${libdir} | sed 's/.*\/\(.*\)/\1/; q'` |
| | |
| | | AC_CHECK_FUNCS(malloc calloc realloc free getenv setenv putenv unsetenv qsort abs bcopy memset memcpy memmove wcslen wcscmp strlen strlcpy strlcat _strrev _strupr _strlwr strchr strrchr strstr itoa _ltoa _uitoa _ultoa strtol strtoul _i64toa _ui64toa strtoll strtoull atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp vsscanf vsnprintf fopen64 fseeko fseeko64 sigaction setjmp nanosleep sysconf sysctlbyname getauxval poll) |
| | | |
| | | AC_CHECK_LIB(m, pow, [LIBS="$LIBS -lm"; EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lm"]) |
| | | AC_CHECK_FUNCS(acos acosf asin asinf atan atanf atan2 atan2f ceil ceilf copysign copysignf cos cosf fabs fabsf floor floorf fmod fmodf log logf log10 log10f pow powf scalbn scalbnf sin sinf sqrt sqrtf tan tanf) |
| | | AC_CHECK_FUNCS(acos acosf asin asinf atan atanf atan2 atan2f ceil ceilf copysign copysignf cos cosf exp expf fabs fabsf floor floorf fmod fmodf log logf log10 log10f pow powf scalbn scalbnf sin sinf sqrt sqrtf tan tanf) |
| | | |
| | | AC_CHECK_LIB(iconv, iconv_open, [LIBS="$LIBS -liconv"; EXTRA_LDFLAGS="$EXTRA_LDFLAGS -liconv"]) |
| | | AC_CHECK_FUNCS(iconv) |
| | |
| | | #SOURCES="$SOURCES $srcdir/src/filesystem/*.c" |
| | | SOURCES="$SOURCES $srcdir/src/render/*.c" |
| | | SOURCES="$SOURCES $srcdir/src/render/*/*.c" |
| | | SOURCES="$SOURCES $srcdir/src/sensor/*.c" |
| | | SOURCES="$SOURCES $srcdir/src/stdlib/*.c" |
| | | SOURCES="$SOURCES $srcdir/src/thread/*.c" |
| | | SOURCES="$SOURCES $srcdir/src/timer/*.c" |
| | |
| | | AC_DEFINE(SDL_HAPTIC_DISABLED, 1, [ ]) |
| | | else |
| | | SUMMARY_modules="${SUMMARY_modules} haptic" |
| | | fi |
| | | AC_ARG_ENABLE(sensor, |
| | | AC_HELP_STRING([--enable-sensor], [Enable the sensor subsystem [[default=yes]]]), |
| | | , enable_sensor=yes) |
| | | if test x$enable_sensor != xyes; then |
| | | AC_DEFINE(SDL_SENSOR_DISABLED, 1, [ ]) |
| | | else |
| | | SUMMARY_modules="${SUMMARY_modules} sensor" |
| | | fi |
| | | AC_ARG_ENABLE(power, |
| | | AC_HELP_STRING([--enable-power], [Enable the power subsystem [[default=yes]]]), |
| | |
| | | WAYLAND_CFLAGS=`$PKG_CONFIG --cflags wayland-client wayland-egl wayland-cursor xkbcommon` |
| | | WAYLAND_LIBS=`$PKG_CONFIG --libs wayland-client wayland-egl wayland-cursor xkbcommon` |
| | | WAYLAND_SCANNER=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner` |
| | | WAYLAND_CORE_PROTOCOL_DIR=`$PKG_CONFIG --variable=pkgdatadir wayland-client` |
| | | WAYLAND_PROTOCOLS_DIR=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols` |
| | | video_wayland=yes |
| | | fi |
| | | fi |
| | |
| | | AC_DEFINE(SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH, 1, [ ]) |
| | | fi |
| | | |
| | | WAYLAND_PROTOCOLS_UNSTABLE="relative-pointer-unstable-v1 pointer-constraints-unstable-v1 xdg-shell-unstable-v6" |
| | | |
| | | SOURCES="$SOURCES $srcdir/src/video/wayland/*.c" |
| | | WAYLAND_SOURCES="$srcdir/src/video/wayland/*.c" |
| | | SOURCES="$SOURCES $WAYLAND_SOURCES" |
| | | EXTRA_CFLAGS="$EXTRA_CFLAGS $WAYLAND_CFLAGS -I\$(gen)" |
| | | AC_ARG_ENABLE(wayland-shared, |
| | | AC_HELP_STRING([--enable-wayland-shared], [dynamically load Wayland support [[default=maybe]]]), |
| | |
| | | , enable_directfb_shared=yes) |
| | | |
| | | AC_DEFINE(SDL_VIDEO_DRIVER_DIRECTFB, 1, [ ]) |
| | | AC_DEFINE(SDL_VIDEO_RENDER_DIRECTFB, 1, [ ]) |
| | | SOURCES="$SOURCES $srcdir/src/video/directfb/*.c" |
| | | EXTRA_CFLAGS="$EXTRA_CFLAGS $DIRECTFB_CFLAGS" |
| | | |
| | |
| | | AC_DEFINE(SDL_VIDEO_OPENGL_CGL, 1, [ ]) |
| | | AC_DEFINE(SDL_VIDEO_RENDER_OGL, 1, [ ]) |
| | | SUMMARY_video="${SUMMARY_video} opengl" |
| | | fi |
| | | } |
| | | |
| | | dnl Check for MacOS OpenGLES |
| | | CheckMacGLES() |
| | | { |
| | | if test x$enable_video = xyes -a x$enable_video_opengles = xyes; then |
| | | video_opengl_egl=yes |
| | | AC_DEFINE(SDL_VIDEO_OPENGL_EGL, 1, [ ]) |
| | | video_opengles_v2=yes |
| | | AC_DEFINE(SDL_VIDEO_OPENGL_ES2, 1, [ ]) |
| | | AC_DEFINE(SDL_VIDEO_RENDER_OGL_ES2, 1, [ ]) |
| | | SUMMARY_video="${SUMMARY_video} opengl_es2" |
| | | fi |
| | | } |
| | | |
| | |
| | | AC_CHECK_HEADER(dinput.h, have_dinput=yes) |
| | | AC_CHECK_HEADER(dxgi.h, have_dxgi=yes) |
| | | AC_CHECK_HEADER(xinput.h, have_xinput=yes) |
| | | AC_CHECK_HEADER(mmdeviceapi.h, have_wasapi=yes) |
| | | AC_CHECK_HEADER(audioclient.h,,have_wasapi=no) |
| | | AC_TRY_COMPILE([ |
| | | #include <windows.h> |
| | | #include <xinput.h> |
| | |
| | | ;; |
| | | esac |
| | | fi |
| | | |
| | | AC_CHECK_HEADER(mmdeviceapi.h, have_wasapi=yes) |
| | | if test x$have_wasapi = xyes; then |
| | | AC_DEFINE(HAVE_MMDEVICEAPI_H,1,[]) |
| | | fi |
| | | AC_CHECK_HEADER(audioclient.h,,have_wasapi=no) |
| | | if test x$have_wasapi = xyes; then |
| | | AC_DEFINE(HAVE_AUDIOCLIENT_H,1,[]) |
| | | fi |
| | | |
| | | AC_CHECK_HEADER(endpointvolume.h,AC_DEFINE(HAVE_ENDPOINTVOLUME_H,1,[])) |
| | | |
| | | AC_ARG_ENABLE(wasapi, |
| | | AC_HELP_STRING([--enable-wasapi], [use the Windows WASAPI audio driver [[default=yes]]]), |
| | | , enable_wasapi=yes) |
| | | } |
| | | |
| | | dnl Check for the dlfcn.h interface for dynamically loading objects |
| | |
| | | esac |
| | | } |
| | | |
| | | dnl Check for HIDAPI joystick drivers |
| | | CheckHIDAPI() |
| | | { |
| | | # The hidraw support doesn't catch Xbox, PS4 and Nintendo controllers, |
| | | # so we'll just use libusb when it's available. |
| | | # |
| | | # Except that libusb requires root permissions to open devices, so that's not generally useful, and we'll disable this by default. |
| | | AC_ARG_ENABLE(hidapi, |
| | | AC_HELP_STRING([--enable-hidapi], [use HIDAPI for low level joystick drivers [[default=no]]]), |
| | | , enable_hidapi=no) |
| | | if test x$enable_joystick = xyes -a x$enable_hidapi = xyes; then |
| | | hidapi_support=no |
| | | AC_PATH_PROG(PKG_CONFIG, pkg-config, no) |
| | | if test x$PKG_CONFIG != xno; then |
| | | LIBUSB_CFLAGS=`$PKG_CONFIG --cflags libusb-1.0` |
| | | LIBUSB_LDFLAGS=`$PKG_CONFIG --libs libusb-1.0` |
| | | save_CFLAGS="$CFLAGS" |
| | | CFLAGS="$save_CFLAGS $LIBUSB_CFLAGS" |
| | | AC_CHECK_HEADER(libusb.h, have_libusb_h=yes) |
| | | CFLAGS="$save_CFLAGS" |
| | | fi |
| | | if test x$have_libusb_h = xyes; then |
| | | hidapi_support=yes |
| | | AC_DEFINE(SDL_JOYSTICK_HIDAPI, 1, [ ]) |
| | | EXTRA_CFLAGS="$EXTRA_CFLAGS -I$srcdir/src/hidapi/hidapi" |
| | | SOURCES="$SOURCES $srcdir/src/joystick/hidapi/*.c" |
| | | SOURCES="$SOURCES $srcdir/src/hidapi/libusb/hid.c" |
| | | EXTRA_CFLAGS="$EXTRA_CFLAGS $LIBUSB_CFLAGS" |
| | | EXTRA_LDFLAGS="$EXTRA_LDFLAGS $LIBUSB_LDFLAGS" |
| | | fi |
| | | AC_MSG_CHECKING(for hidapi support) |
| | | AC_MSG_RESULT($hidapi_support) |
| | | fi |
| | | } |
| | | |
| | | dnl Check for clock_gettime() |
| | | CheckClockGettime() |
| | | { |
| | |
| | | esac |
| | | CheckTslib |
| | | CheckUSBHID |
| | | CheckHIDAPI |
| | | CheckPTHREAD |
| | | CheckClockGettime |
| | | CheckLinuxVersion |
| | |
| | | AC_DEFINE(SDL_HAPTIC_ANDROID, 1, [ ]) |
| | | SOURCES="$SOURCES $srcdir/src/haptic/android/*.c" |
| | | have_haptic=yes |
| | | ;; |
| | | esac |
| | | fi |
| | | # Set up files for the sensor library |
| | | if test x$enable_sensor = xyes; then |
| | | case $ARCH in |
| | | android) |
| | | AC_DEFINE(SDL_SENSOR_ANDROID, 1, [ ]) |
| | | SOURCES="$SOURCES $srcdir/src/sensor/android/*.c" |
| | | have_sensor=yes |
| | | ;; |
| | | esac |
| | | fi |
| | |
| | | AC_DEFINE(SDL_AUDIO_DRIVER_DSOUND, 1, [ ]) |
| | | SOURCES="$SOURCES $srcdir/src/audio/directsound/*.c" |
| | | fi |
| | | if test x$have_wasapi = xyes; then |
| | | if test x$have_wasapi = xyes -a x$enable_wasapi = xyes; then |
| | | AC_DEFINE(SDL_AUDIO_DRIVER_WASAPI, 1, [ ]) |
| | | SUMMARY_audio="${SUMMARY_audio} wasapi" |
| | | SOURCES="$SOURCES $srcdir/src/audio/wasapi/*.c" |
| | | fi |
| | | have_audio=yes |
| | |
| | | else |
| | | AC_DEFINE(SDL_JOYSTICK_WINMM, 1, [ ]) |
| | | fi |
| | | AC_DEFINE(SDL_JOYSTICK_HIDAPI, 1, [ ]) |
| | | SOURCES="$SOURCES $srcdir/src/joystick/windows/*.c" |
| | | SOURCES="$SOURCES $srcdir/src/joystick/hidapi/*.c" |
| | | SOURCES="$SOURCES $srcdir/src/hidapi/windows/hid.c" |
| | | EXTRA_CFLAGS="$EXTRA_CFLAGS -I$srcdir/src/hidapi/hidapi" |
| | | have_joystick=yes |
| | | fi |
| | | if test x$enable_haptic = xyes; then |
| | |
| | | else |
| | | LIBUUID=-luuid |
| | | fi |
| | | EXTRA_LDFLAGS="$EXTRA_LDFLAGS -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lversion $LIBUUID -static-libgcc" |
| | | EXTRA_LDFLAGS="$EXTRA_LDFLAGS -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lsetupapi -lversion $LIBUUID -static-libgcc" |
| | | # The Windows platform requires special setup |
| | | VERSION_SOURCES="$srcdir/src/main/windows/*.rc" |
| | | SDLMAIN_SOURCES="$srcdir/src/main/windows/*.c" |
| | |
| | | CheckMETAL |
| | | CheckX11 |
| | | CheckMacGL |
| | | CheckMacGLES |
| | | CheckOpenGLX11 |
| | | CheckVulkan |
| | | CheckPTHREAD |
| | |
| | | # Set up files for the joystick library |
| | | if test x$enable_joystick = xyes; then |
| | | AC_DEFINE(SDL_JOYSTICK_IOKIT, 1, [ ]) |
| | | AC_DEFINE(SDL_JOYSTICK_HIDAPI, 1, [ ]) |
| | | SOURCES="$SOURCES $srcdir/src/joystick/darwin/*.c" |
| | | SOURCES="$SOURCES $srcdir/src/joystick/hidapi/*.c" |
| | | SOURCES="$SOURCES $srcdir/src/hidapi/mac/hid.c" |
| | | EXTRA_CFLAGS="$EXTRA_CFLAGS -I$srcdir/src/hidapi/hidapi" |
| | | have_joystick=yes |
| | | fi |
| | | # Set up files for the haptic library |
| | |
| | | |
| | | if test x$have_joystick != xyes; then |
| | | if test x$enable_joystick = xyes; then |
| | | AC_DEFINE(SDL_JOYSTICK_DISABLED, 1, [ ]) |
| | | AC_DEFINE(SDL_JOYSTICK_DUMMY, 1, [ ]) |
| | | fi |
| | | SOURCES="$SOURCES $srcdir/src/joystick/dummy/*.c" |
| | | fi |
| | | if test x$have_haptic != xyes; then |
| | | if test x$enable_haptic = xyes; then |
| | | AC_DEFINE(SDL_HAPTIC_DISABLED, 1, [ ]) |
| | | AC_DEFINE(SDL_HAPTIC_DUMMY, 1, [ ]) |
| | | fi |
| | | SOURCES="$SOURCES $srcdir/src/haptic/dummy/*.c" |
| | | fi |
| | | if test x$have_sensor != xyes; then |
| | | if test x$enable_sensor = xyes; then |
| | | AC_DEFINE(SDL_SENSOR_DUMMY, 1, [ ]) |
| | | fi |
| | | SOURCES="$SOURCES $srcdir/src/sensor/dummy/*.c" |
| | | fi |
| | | if test x$have_threads != xyes; then |
| | | if test x$enable_threads = xyes; then |
| | |
| | | SDLTEST_SOURCES="$srcdir/src/test/*.c" |
| | | |
| | | if test x$video_wayland = xyes; then |
| | | WAYLAND_CORE_PROTOCOL_SOURCE='$(gen)/wayland-protocol.c' |
| | | WAYLAND_CORE_PROTOCOL_HEADER='$(gen)/wayland-client-protocol.h' |
| | | WAYLAND_PROTOCOLS_UNSTABLE_SOURCES=`echo $WAYLAND_PROTOCOLS_UNSTABLE |\ |
| | | sed 's,[[^ ]]\+,\\$(gen)/&-protocol.c,g'` |
| | | WAYLAND_PROTOCOLS_UNSTABLE_HEADERS=`echo $WAYLAND_PROTOCOLS_UNSTABLE |\ |
| | | sed 's,[[^ ]]\+,\\$(gen)/&-client-protocol.h,g'` |
| | | GEN_SOURCES="$GEN_SOURCES $WAYLAND_CORE_PROTOCOL_SOURCE $WAYLAND_PROTOCOLS_UNSTABLE_SOURCES" |
| | | GEN_HEADERS="$GEN_HEADERS $WAYLAND_CORE_PROTOCOL_HEADER $WAYLAND_PROTOCOLS_UNSTABLE_HEADERS" |
| | | WAYLAND_PROTOCOLS=`cd $srcdir/wayland-protocols ; for p in *.xml ; do echo -n "\$p" |sed 's,\\.xml\$, ,g' ; done` |
| | | WAYLAND_PROTOCOLS_SOURCES=`for p in $WAYLAND_PROTOCOLS ; do echo -n "\\$(gen)/\$p-protocol.c " ; done` |
| | | WAYLAND_PROTOCOLS_HEADERS=`for p in $WAYLAND_PROTOCOLS ; do echo -n "\\$(gen)/\$p-client-protocol.h " ; done` |
| | | GEN_SOURCES="$GEN_SOURCES $WAYLAND_PROTOCOLS_SOURCES" |
| | | GEN_HEADERS="$GEN_HEADERS $WAYLAND_PROTOCOLS_HEADERS" |
| | | |
| | | WAYLAND_CORE_PROTOCOL_SOURCE_DEPENDS=" |
| | | $WAYLAND_CORE_PROTOCOL_SOURCE: $WAYLAND_CORE_PROTOCOL_DIR/wayland.xml |
| | | \$(SHELL) \$(auxdir)/mkinstalldirs \$(gen) |
| | | \$(RUN_CMD_GEN)\$(WAYLAND_SCANNER) code \$< \$@" |
| | | |
| | | WAYLAND_CORE_PROTOCOL_HEADER_DEPENDS=" |
| | | $WAYLAND_CORE_PROTOCOL_HEADER: $WAYLAND_CORE_PROTOCOL_DIR/wayland.xml |
| | | \$(SHELL) \$(auxdir)/mkinstalldirs \$(gen) |
| | | \$(RUN_CMD_GEN)\$(WAYLAND_SCANNER) client-header \$< \$@" |
| | | |
| | | WAYLAND_CORE_PROTOCOL_OBJECT=" |
| | | \$(objects)/`echo $WAYLAND_CORE_PROTOCOL_SOURCE | sed 's/\$(gen)\/\(.*\).c$/\1.lo/'`: $WAYLAND_CORE_PROTOCOL_SOURCE |
| | | \$(RUN_CMD_CC)\$(LIBTOOL) --tag=CC --mode=compile \$(CC) \$(CFLAGS) \$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \$< -o \$@" |
| | | |
| | | WAYLAND_PROTOCOLS_CLIENT_HEADER_UNSTABLE_DEPENDS=`for p in $WAYLAND_PROTOCOLS_UNSTABLE;\ |
| | | do echo ; echo \$p | sed\ |
| | | "s,^\\([[a-z\\-]]\\+\\)-unstable-\\(v[[0-9]]\+\\)\$,\\$(gen)/&-client-protocol.h: $WAYLAND_PROTOCOLS_DIR/unstable/\1/&.xml\\\\ |
| | | \\$(SHELL) \\$(auxdir)/mkinstalldirs \\$(gen)\\\\ |
| | | \\$(RUN_CMD_GEN)\\$(WAYLAND_SCANNER) client-header \\$< \\$@," ; done` |
| | | |
| | | WAYLAND_PROTOCOLS_CODE_UNSTABLE_DEPENDS=`for p in $WAYLAND_PROTOCOLS_UNSTABLE;\ |
| | | do echo ; echo \$p | sed\ |
| | | "s,^\\([[a-z\\-]]\\+\\)-unstable-\\(v[[0-9]]\+\\)\$,\\$(gen)/&-protocol.c: $WAYLAND_PROTOCOLS_DIR/unstable/\1/&.xml\\\\ |
| | | \\$(SHELL) \\$(auxdir)/mkinstalldirs \\$(gen)\\\\ |
| | | \\$(RUN_CMD_GEN)\\$(WAYLAND_SCANNER) code \\$< \\$@," ; done` |
| | | |
| | | WAYLAND_PROTOCOLS_OBJECTS_UNSTABLE=`for p in $WAYLAND_PROTOCOLS_UNSTABLE;\ |
| | | do echo ; echo \$p | sed\ |
| | | "s,^\\([[a-z\\-]]\\+\\)-unstable-\\(v[[0-9]]\+\\)\$,\\\$(objects)/&-protocol.lo: \\$(gen)/&-protocol.c \\$(gen)/&-client-protocol.h\\\\ |
| | | \\$(RUN_CMD_CC)\\$(LIBTOOL) --tag=CC --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@," ; done` |
| | | |
| | | WAYLAND_PROTOCOLS_DEPENDS=" |
| | | $WAYLAND_CORE_PROTOCOL_SOURCE_DEPENDS |
| | | $WAYLAND_CORE_PROTOCOL_HEADER_DEPENDS |
| | | $WAYLAND_CORE_PROTOCOL_OBJECT |
| | | $WAYLAND_PROTOCOLS_CLIENT_HEADER_UNSTABLE_DEPENDS |
| | | $WAYLAND_PROTOCOLS_CODE_UNSTABLE_DEPENDS |
| | | $WAYLAND_PROTOCOLS_OBJECTS_UNSTABLE |
| | | " |
| | | WAYLAND_PROTOCOLS_DEPENDS=`for p in $WAYLAND_PROTOCOLS ; do\ |
| | | echo ;\ |
| | | echo "\\$(gen)/\$p-client-protocol.h: \\$(srcdir)/wayland-protocols/\$p.xml" ;\ |
| | | echo " @\\$(SHELL) \\$(auxdir)/mkinstalldirs \\$(gen)" ;\ |
| | | echo " \\$(RUN_CMD_GEN)\\$(WAYLAND_SCANNER) client-header \\$< \\$@" ;\ |
| | | echo ;\ |
| | | echo "\\$(gen)/\$p-protocol.c: \\$(srcdir)/wayland-protocols/\$p.xml" ;\ |
| | | echo " @\\$(SHELL) \\$(auxdir)/mkinstalldirs \\$(gen)" ;\ |
| | | echo " \\$(RUN_CMD_GEN)\\$(WAYLAND_SCANNER) code \\$< \\$@" ;\ |
| | | echo ;\ |
| | | echo "\\$(objects)/\$p-protocol.lo: \\$(gen)/\$p-protocol.c \\$(gen)/\$p-client-protocol.h" ;\ |
| | | echo " \\$(RUN_CMD_CC)\\$(LIBTOOL) --tag=CC --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@" ;\ |
| | | done ;\ |
| | | echo ;\ |
| | | for s in $WAYLAND_SOURCES ; do echo -n "\$s:" ; for p in $WAYLAND_PROTOCOLS ; do echo -n " \\$(gen)/\$p-client-protocol.h" ; done ; echo ; done ; echo` |
| | | fi |
| | | |
| | | OBJECTS=`echo $SOURCES` |
| | |
| | | libsdl2 (2.0.9) UNRELEASED; urgency=low |
| | | |
| | | * Updated SDL to version 2.0.9 |
| | | |
| | | -- Sam Lantinga <slouken@libsdl.org> Wed, 26 Sep 2018 10:02:21 -0800 |
| | | |
| | | libsdl2 (2.0.8) UNRELEASED; urgency=low |
| | | |
| | | * Updated SDL to version 2.0.8 |
| | |
| | | Requirements
|
| | | ================================================================================
|
| | |
|
| | | Android SDK (version 19 or later)
|
| | | Android SDK (version 26 or later)
|
| | | https://developer.android.com/sdk/index.html
|
| | |
|
| | | Android NDK r10e or later
|
| | | Android NDK r15c or later
|
| | | https://developer.android.com/tools/sdk/ndk/index.html
|
| | |
|
| | | Minimum API level supported by SDL: 14 (Android 4.0.1)
|
| | |
| | | and rename it to the name of your project.
|
| | | 2. Move or symlink this SDL directory into the "<project>/app/jni" directory
|
| | | 3. Edit "<project>/app/jni/src/Android.mk" to include your source files
|
| | | 4. Run 'ndk-build' (a script provided by the NDK). This compiles the C source
|
| | |
|
| | | If you want to use Android Studio (recommended), skip to the Android Studio section below.
|
| | | 4a. If you want to use Android Studio, simply open your <project> directory and start building.
|
| | |
|
| | | 5. Run './gradlew installDebug' in the project directory. This compiles the .java, creates an .apk with the native code embedded, and installs it on any connected Android device
|
| | | 4b. If you want to build manually, run './gradlew installDebug' in the project directory. This compiles the .java, creates an .apk with the native code embedded, and installs it on any connected Android device
|
| | |
|
| | | Here's an explanation of the files in the Android project, so you can customize them:
|
| | |
|
| | | android-project/app
|
| | | build.gradle - build info including the application version and SDK
|
| | | src/main/AndroidManifest.xml - package manifest. Among others, it contains the class name
|
| | | of the main Activity and the package name of the application.
|
| | | src/main/AndroidManifest.xml - package manifest. Among others, it contains the class name of the main Activity and the package name of the application.
|
| | | jni/ - directory holding native code
|
| | | jni/Application.mk - Application JNI settings, including target platform and STL library
|
| | | jni/Android.mk - Android makefile that can call recursively the Android.mk files in all subdirectories
|
| | |
| | | You can use STL in your project by creating an Application.mk file in the jni
|
| | | folder and adding the following line:
|
| | |
|
| | | APP_STL := stlport_static
|
| | | APP_STL := c++_shared
|
| | |
|
| | | For more information check out CPLUSPLUS-SUPPORT.html in the NDK documentation.
|
| | |
|
| | |
|
| | | ================================================================================
|
| | | Additional documentation
|
| | | ================================================================================
|
| | |
|
| | | The documentation in the NDK docs directory is very helpful in understanding the
|
| | | build process and how to work with native code on the Android platform.
|
| | |
|
| | | The best place to start is with docs/OVERVIEW.TXT
|
| | |
|
| | |
|
| | | ================================================================================
|
| | | Using Android Studio
|
| | | ================================================================================
|
| | |
|
| | | You can open your project directory with Android Studio and run it normally.
|
| | | For more information go here:
|
| | | https://developer.android.com/ndk/guides/cpp-support
|
| | |
|
| | |
|
| | | ================================================================================
|
| | |
| | |
|
| | | ndk-build V=1
|
| | |
|
| | | If your application crashes in native code, you can use addr2line to convert the
|
| | | If your application crashes in native code, you can use ndk-stack to get a symbolic stack trace:
|
| | | https://developer.android.com/ndk/guides/ndk-stack
|
| | |
|
| | | If you want to go through the process manually, you can use addr2line to convert the
|
| | | addresses in the stack trace to lines in your code.
|
| | |
|
| | | For example, if your crash looks like this:
|
| | |
| | |
|
| | | sudo apt-get install libraspberrypi0 libraspberrypi-bin libraspberrypi-dev
|
| | |
|
| | |
|
| | | ================================================================================
|
| | | NEON
|
| | | ================================================================================
|
| | |
|
| | | If your Pi has NEON support, make sure you add -mfpu=neon to your CFLAGS so
|
| | | that SDL will select some otherwise-disabled highly-optimized code. The
|
| | | original Pi units don't have NEON, the Pi2 probably does, and the Pi3
|
| | | definitely does.
|
| | |
|
| | | ================================================================================
|
| | | Cross compiling from x86 Linux
|
| | | ================================================================================
|
| | |
| | | #include "SDL_power.h" |
| | | #include "SDL_render.h" |
| | | #include "SDL_rwops.h" |
| | | #include "SDL_sensor.h" |
| | | #include "SDL_shape.h" |
| | | #include "SDL_system.h" |
| | | #include "SDL_thread.h" |
| | |
| | | #define SDL_INIT_HAPTIC 0x00001000u |
| | | #define SDL_INIT_GAMECONTROLLER 0x00002000u /**< SDL_INIT_GAMECONTROLLER implies SDL_INIT_JOYSTICK */ |
| | | #define SDL_INIT_EVENTS 0x00004000u |
| | | #define SDL_INIT_SENSOR 0x00008000u |
| | | #define SDL_INIT_NOPARACHUTE 0x00100000u /**< compatibility; this flag is ignored. */ |
| | | #define SDL_INIT_EVERYTHING ( \ |
| | | SDL_INIT_TIMER | SDL_INIT_AUDIO | SDL_INIT_VIDEO | SDL_INIT_EVENTS | \ |
| | | SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC | SDL_INIT_GAMECONTROLLER \ |
| | | SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC | SDL_INIT_GAMECONTROLLER | SDL_INIT_SENSOR \ |
| | | ) |
| | | /* @} */ |
| | | |
| | |
| | | #define SDL_AUDIO_ALLOW_FREQUENCY_CHANGE 0x00000001 |
| | | #define SDL_AUDIO_ALLOW_FORMAT_CHANGE 0x00000002 |
| | | #define SDL_AUDIO_ALLOW_CHANNELS_CHANGE 0x00000004 |
| | | #define SDL_AUDIO_ALLOW_ANY_CHANGE (SDL_AUDIO_ALLOW_FREQUENCY_CHANGE|SDL_AUDIO_ALLOW_FORMAT_CHANGE|SDL_AUDIO_ALLOW_CHANNELS_CHANGE) |
| | | #define SDL_AUDIO_ALLOW_SAMPLES_CHANGE 0x00000008 |
| | | #define SDL_AUDIO_ALLOW_ANY_CHANGE (SDL_AUDIO_ALLOW_FREQUENCY_CHANGE|SDL_AUDIO_ALLOW_FORMAT_CHANGE|SDL_AUDIO_ALLOW_CHANNELS_CHANGE|SDL_AUDIO_ALLOW_SAMPLES_CHANGE) |
| | | /* @} */ |
| | | |
| | | /* @} *//* Audio flags */ |
| | |
| | | #include "SDL_config_android.h" |
| | | #elif defined(__PSP__) |
| | | #include "SDL_config_psp.h" |
| | | #elif defined(__OS2__) |
| | | #include "SDL_config_os2.h" |
| | | #else |
| | | /* This is a minimal configuration just to get SDL running on new platforms */ |
| | | /* This is a minimal configuration just to get SDL running on new platforms. */ |
| | | #include "SDL_config_minimal.h" |
| | | #endif /* platform config */ |
| | | |
| | |
| | | #cmakedefine HAVE_COPYSIGNF 1 |
| | | #cmakedefine HAVE_COS 1 |
| | | #cmakedefine HAVE_COSF 1 |
| | | #cmakedefine HAVE_EXP 1 |
| | | #cmakedefine HAVE_EXPF 1 |
| | | #cmakedefine HAVE_FABS 1 |
| | | #cmakedefine HAVE_FABSF 1 |
| | | #cmakedefine HAVE_FLOOR 1 |
| | |
| | | #cmakedefine HAVE_DINPUT_H @HAVE_DINPUT_H@ |
| | | #cmakedefine HAVE_XINPUT_H @HAVE_XINPUT_H@ |
| | | #cmakedefine HAVE_DXGI_H @HAVE_DXGI_H@ |
| | | |
| | | #cmakedefine HAVE_ENDPOINTVOLUME_H @HAVE_ENDPOINTVOLUME_H@ |
| | | #cmakedefine HAVE_MMDEVICEAPI_H @HAVE_MMDEVICEAPI_H@ |
| | | #cmakedefine HAVE_AUDIOCLIENT_H @HAVE_AUDIOCLIENT_H@ |
| | | |
| | | #cmakedefine HAVE_XINPUT_GAMEPAD_EX @HAVE_XINPUT_GAMEPAD_EX@ |
| | | #cmakedefine HAVE_XINPUT_STATE_EX @HAVE_XINPUT_STATE_EX@ |
| | | |
| | |
| | | #cmakedefine SDL_FILE_DISABLED @SDL_FILE_DISABLED@ |
| | | #cmakedefine SDL_JOYSTICK_DISABLED @SDL_JOYSTICK_DISABLED@ |
| | | #cmakedefine SDL_HAPTIC_DISABLED @SDL_HAPTIC_DISABLED@ |
| | | #cmakedefine SDL_SENSOR_DISABLED @SDL_SENSOR_DISABLED@ |
| | | #cmakedefine SDL_LOADSO_DISABLED @SDL_LOADSO_DISABLED@ |
| | | #cmakedefine SDL_RENDER_DISABLED @SDL_RENDER_DISABLED@ |
| | | #cmakedefine SDL_THREADS_DISABLED @SDL_THREADS_DISABLED@ |
| | |
| | | #cmakedefine SDL_HAPTIC_XINPUT @SDL_HAPTIC_XINPUT@ |
| | | #cmakedefine SDL_HAPTIC_ANDROID @SDL_HAPTIC_ANDROID@ |
| | | |
| | | /* Enable various sensor drivers */ |
| | | #cmakedefine SDL_SENSOR_ANDROID @SDL_SENSOR_ANDROID@ |
| | | #cmakedefine SDL_SENSOR_DUMMY @SDL_SENSOR_DUMMY@ |
| | | |
| | | /* Enable various shared object loading systems */ |
| | | #cmakedefine SDL_LOADSO_DLOPEN @SDL_LOADSO_DLOPEN@ |
| | | #cmakedefine SDL_LOADSO_DUMMY @SDL_LOADSO_DUMMY@ |
| | |
| | | #undef HAVE_COPYSIGNF |
| | | #undef HAVE_COS |
| | | #undef HAVE_COSF |
| | | #undef HAVE_EXP |
| | | #undef HAVE_EXPF |
| | | #undef HAVE_FABS |
| | | #undef HAVE_FABSF |
| | | #undef HAVE_FLOOR |
| | |
| | | #undef HAVE_DSOUND_H |
| | | #undef HAVE_DXGI_H |
| | | #undef HAVE_XINPUT_H |
| | | #undef HAVE_ENDPOINTVOLUME_H |
| | | #undef HAVE_MMDEVICEAPI_H |
| | | #undef HAVE_AUDIOCLIENT_H |
| | | #undef HAVE_XINPUT_GAMEPAD_EX |
| | | #undef HAVE_XINPUT_STATE_EX |
| | | |
| | |
| | | #undef SDL_FILE_DISABLED |
| | | #undef SDL_JOYSTICK_DISABLED |
| | | #undef SDL_HAPTIC_DISABLED |
| | | #undef SDL_SENSOR_DISABLED |
| | | #undef SDL_LOADSO_DISABLED |
| | | #undef SDL_RENDER_DISABLED |
| | | #undef SDL_THREADS_DISABLED |
| | |
| | | #undef SDL_JOYSTICK_WINMM |
| | | #undef SDL_JOYSTICK_USBHID |
| | | #undef SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H |
| | | #undef SDL_JOYSTICK_HIDAPI |
| | | #undef SDL_JOYSTICK_EMSCRIPTEN |
| | | #undef SDL_HAPTIC_DUMMY |
| | | #undef SDL_HAPTIC_ANDROID |
| | |
| | | #undef SDL_HAPTIC_DINPUT |
| | | #undef SDL_HAPTIC_XINPUT |
| | | |
| | | /* Enable various sensor drivers */ |
| | | #undef SDL_SENSOR_ANDROID |
| | | #undef SDL_SENSOR_DUMMY |
| | | |
| | | /* Enable various shared object loading systems */ |
| | | #undef SDL_LOADSO_DLOPEN |
| | | #undef SDL_LOADSO_DUMMY |
| | |
| | | #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 |
| | |
| | | |
| | | /* Enable various input drivers */ |
| | | #define SDL_JOYSTICK_ANDROID 1 |
| | | #define SDL_JOYSTICK_HIDAPI 1 |
| | | #define SDL_HAPTIC_ANDROID 1 |
| | | |
| | | /* Enable sensor driver */ |
| | | #define SDL_SENSOR_ANDROID 1 |
| | | |
| | | /* Enable various shared object loading systems */ |
| | | #define SDL_LOADSO_DLOPEN 1 |
| | | |
| | |
| | | #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 |
| | |
| | | |
| | | /* Enable MFi joystick support */ |
| | | #define SDL_JOYSTICK_MFI 1 |
| | | /*#define SDL_JOYSTICK_HIDAPI 1*/ |
| | | |
| | | #ifdef __TVOS__ |
| | | #define SDL_SENSOR_DUMMY 1 |
| | | #else |
| | | /* Enable the CoreMotion sensor driver */ |
| | | #define SDL_SENSOR_COREMOTION 1 |
| | | #endif |
| | | |
| | | /* Enable Unix style SO loading */ |
| | | #define SDL_LOADSO_DLOPEN 1 |
| | |
| | | #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 |
| | |
| | | |
| | | /* Enable various input drivers */ |
| | | #define SDL_JOYSTICK_IOKIT 1 |
| | | #define SDL_JOYSTICK_HIDAPI 1 |
| | | #define SDL_HAPTIC_IOKIT 1 |
| | | |
| | | /* Enable the dummy sensor driver */ |
| | | #define SDL_SENSOR_DUMMY 1 |
| | | |
| | | /* Enable various shared object loading systems */ |
| | | #define SDL_LOADSO_DLOPEN 1 |
| | | |
| | |
| | | /* Enable the stub haptic driver (src/haptic/dummy/\*.c) */ |
| | | #define SDL_HAPTIC_DISABLED 1 |
| | | |
| | | /* Enable the stub sensor driver (src/sensor/dummy/\*.c) */ |
| | | #define SDL_SENSOR_DISABLED 1 |
| | | |
| | | /* Enable the stub shared object loader (src/loadso/dummy/\*.c) */ |
| | | #define SDL_LOADSO_DISABLED 1 |
| | | |
| New file |
| | |
| | | /* |
| | | Simple DirectMedia Layer |
| | | Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> |
| | | |
| | | This software is provided 'as-is', without any express or implied |
| | | warranty. In no event will the authors be held liable for any damages |
| | | arising from the use of this software. |
| | | |
| | | Permission is granted to anyone to use this software for any purpose, |
| | | including commercial applications, and to alter it and redistribute it |
| | | freely, subject to the following restrictions: |
| | | |
| | | 1. The origin of this software must not be misrepresented; you must not |
| | | claim that you wrote the original software. If you use this software |
| | | in a product, an acknowledgment in the product documentation would be |
| | | appreciated but is not required. |
| | | 2. Altered source versions must be plainly marked as such, and must not be |
| | | misrepresented as being the original software. |
| | | 3. This notice may not be removed or altered from any source distribution. |
| | | */ |
| | | |
| | | #ifndef SDL_config_os2_h_ |
| | | #define SDL_config_os2_h_ |
| | | #define SDL_config_h_ |
| | | |
| | | #include "SDL_platform.h" |
| | | |
| | | #define SDL_AUDIO_DRIVER_DUMMY 1 |
| | | #define SDL_AUDIO_DRIVER_DISK 1 |
| | | |
| | | #define SDL_POWER_DISABLED 1 |
| | | #define SDL_JOYSTICK_DISABLED 1 |
| | | #define SDL_HAPTIC_DISABLED 1 |
| | | /*#undef SDL_JOYSTICK_HIDAPI */ |
| | | |
| | | #define SDL_SENSOR_DUMMY 1 |
| | | #define SDL_VIDEO_DRIVER_DUMMY 1 |
| | | |
| | | /* Enable OpenGL support */ |
| | | /* #undef SDL_VIDEO_OPENGL */ |
| | | |
| | | /* Enable Vulkan support */ |
| | | /* #undef SDL_VIDEO_VULKAN */ |
| | | |
| | | #define SDL_LOADSO_DISABLED 1 |
| | | #define SDL_THREADS_DISABLED 1 |
| | | #define SDL_TIMERS_DISABLED 1 |
| | | #define SDL_FILESYSTEM_DUMMY 1 |
| | | |
| | | /* Enable assembly routines */ |
| | | #define SDL_ASSEMBLY_ROUTINES 1 |
| | | |
| | | /* #undef HAVE_LIBSAMPLERATE_H */ |
| | | |
| | | /* Enable dynamic libsamplerate support */ |
| | | /* #undef SDL_LIBSAMPLERATE_DYNAMIC */ |
| | | |
| | | #define HAVE_LIBC 1 |
| | | |
| | | #define HAVE_SYS_TYPES_H 1 |
| | | #define HAVE_STDIO_H 1 |
| | | #define STDC_HEADERS 1 |
| | | #define HAVE_STDLIB_H 1 |
| | | #define HAVE_STDARG_H 1 |
| | | #define HAVE_STDDEF_H 1 |
| | | #define HAVE_MALLOC_H 1 |
| | | #define HAVE_MEMORY_H 1 |
| | | #define HAVE_STRING_H 1 |
| | | #define HAVE_STRINGS_H 1 |
| | | #define HAVE_WCHAR_H 1 |
| | | #define HAVE_INTTYPES_H 1 |
| | | #define HAVE_STDINT_H 1 |
| | | #define HAVE_LIMITS_H 1 |
| | | #define HAVE_CTYPE_H 1 |
| | | #define HAVE_MATH_H 1 |
| | | #define HAVE_FLOAT_H 1 |
| | | #define HAVE_SIGNAL_H 1 |
| | | |
| | | #define HAVE_MALLOC 1 |
| | | #define HAVE_CALLOC 1 |
| | | #define HAVE_REALLOC 1 |
| | | #define HAVE_FREE 1 |
| | | #if defined(__WATCOMC__) |
| | | #define HAVE__FSEEKI64 1 |
| | | #define HAVE__FTELLI64 1 |
| | | #endif |
| | | #define HAVE_ALLOCA 1 |
| | | #define HAVE_GETENV 1 |
| | | #define HAVE_SETENV 1 |
| | | #define HAVE_PUTENV 1 |
| | | #define HAVE_QSORT 1 |
| | | #define HAVE_ABS 1 |
| | | #define HAVE_BCOPY 1 |
| | | #define HAVE_MEMSET 1 |
| | | #define HAVE_MEMCPY 1 |
| | | #define HAVE_MEMMOVE 1 |
| | | #define HAVE_MEMCMP 1 |
| | | #define HAVE_WCSLEN 1 |
| | | #define HAVE_WCSLCPY 1 |
| | | #define HAVE_WCSLCAT 1 |
| | | #define HAVE_WCSCMP 1 |
| | | #define HAVE_STRLEN 1 |
| | | #define HAVE_STRLCPY 1 |
| | | #define HAVE_STRLCAT 1 |
| | | #define HAVE__STRREV 1 |
| | | #define HAVE__STRUPR 1 |
| | | #define HAVE__STRLWR 1 |
| | | #define HAVE_INDEX 1 |
| | | #define HAVE_RINDEX 1 |
| | | #define HAVE_STRCHR 1 |
| | | #define HAVE_STRRCHR 1 |
| | | #define HAVE_STRSTR 1 |
| | | #define HAVE_ITOA 1 |
| | | #define HAVE__LTOA 1 |
| | | #define HAVE__ULTOA 1 |
| | | #define HAVE_STRTOL 1 |
| | | #define HAVE_STRTOUL 1 |
| | | #define HAVE__I64TOA 1 |
| | | #define HAVE__UI64TOA 1 |
| | | #define HAVE_STRTOLL 1 |
| | | #define HAVE_STRTOULL 1 |
| | | #define HAVE_STRTOD 1 |
| | | #define HAVE_ATOI 1 |
| | | #define HAVE_ATOF 1 |
| | | #define HAVE_STRCMP 1 |
| | | #define HAVE_STRNCMP 1 |
| | | #define HAVE_STRICMP 1 |
| | | #define HAVE_STRCASECMP 1 |
| | | #define HAVE_STRNCASECMP 1 |
| | | #define HAVE_SSCANF 1 |
| | | #define HAVE_SNPRINTF 1 |
| | | #define HAVE_VSNPRINTF 1 |
| | | #define HAVE_SETJMP 1 |
| | | #define HAVE_ACOS 1 |
| | | /* #undef HAVE_ACOSF */ |
| | | #define HAVE_ASIN 1 |
| | | /* #undef HAVE_ASINF */ |
| | | #define HAVE_ATAN 1 |
| | | #define HAVE_ATAN2 1 |
| | | /* #undef HAVE_ATAN2F */ |
| | | #define HAVE_CEIL 1 |
| | | /* #undef HAVE_CEILF */ |
| | | /* #undef HAVE_COPYSIGN */ |
| | | /* #undef HAVE_COPYSIGNF */ |
| | | #define HAVE_COS 1 |
| | | /* #undef HAVE_COSF */ |
| | | #define HAVE_EXP 1 |
| | | /* #undef HAVE_EXPF */ |
| | | #define HAVE_FABS 1 |
| | | /* #undef HAVE_FABSF */ |
| | | #define HAVE_FLOOR 1 |
| | | /* #undef HAVE_FLOORF */ |
| | | #define HAVE_FMOD 1 |
| | | /* #undef HAVE_FMODF */ |
| | | #define HAVE_LOG 1 |
| | | /* #undef HAVE_LOGF */ |
| | | #define HAVE_LOG10 1 |
| | | /* #undef HAVE_LOG10F */ |
| | | #define HAVE_POW 1 |
| | | /* #undef HAVE_POWF */ |
| | | #define HAVE_SIN 1 |
| | | /* #undef HAVE_SINF */ |
| | | /* #undef HAVE_SCALBN */ |
| | | /* #undef HAVE_SCALBNF */ |
| | | #define HAVE_SQRT 1 |
| | | /* #undef HAVE_SQRTF */ |
| | | #define HAVE_TAN 1 |
| | | /* #undef HAVE_TANF */ |
| | | |
| | | #endif /* SDL_config_os2_h_ */ |
| | |
| | | #define HAVE_COPYSIGN 1 |
| | | #define HAVE_COS 1 |
| | | #define HAVE_COSF 1 |
| | | #define HAVE_EXP 1 |
| | | #define HAVE_FABS 1 |
| | | #define HAVE_FLOOR 1 |
| | | #define HAVE_LOG 1 |
| | |
| | | #define SDL_JOYSTICK_LINUX 1 |
| | | #define SDL_HAPTIC_LINUX 1 |
| | | |
| | | #define SDL_SENSOR_DUMMY 1 |
| | | |
| | | #define SDL_LOADSO_DLOPEN 1 |
| | | |
| | | #define SDL_THREAD_PTHREAD 1 |
| | |
| | | #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 |
| | |
| | | /* PSP isn't that sophisticated */ |
| | | #define LACKS_SYS_MMAN_H 1 |
| | | |
| | | /* Enable the stub thread support (src/thread/psp/\*.c) */ |
| | | /* Enable the PSP thread support (src/thread/psp/\*.c) */ |
| | | #define SDL_THREAD_PSP 1 |
| | | |
| | | /* Enable the stub timer support (src/timer/psp/\*.c) */ |
| | | /* Enable the PSP timer support (src/timer/psp/\*.c) */ |
| | | #define SDL_TIMERS_PSP 1 |
| | | |
| | | /* Enable the stub joystick driver (src/joystick/psp/\*.c) */ |
| | | /* Enable the PSP joystick driver (src/joystick/psp/\*.c) */ |
| | | #define SDL_JOYSTICK_PSP 1 |
| | | |
| | | /* Enable the stub audio driver (src/audio/psp/\*.c) */ |
| | | /* Enable the dummy sensor driver */ |
| | | #define SDL_SENSOR_DUMMY 1 |
| | | |
| | | /* Enable the PSP audio driver (src/audio/psp/\*.c) */ |
| | | #define SDL_AUDIO_DRIVER_PSP 1 |
| | | |
| | | /* PSP video dirver */ |
| | | /* PSP video driver */ |
| | | #define SDL_VIDEO_DRIVER_PSP 1 |
| | | |
| | | /* PSP render dirver */ |
| | | /* PSP render driver */ |
| | | #define SDL_VIDEO_RENDER_PSP 1 |
| | | |
| | | #define SDL_POWER_PSP 1 |
| | |
| | | #define HAVE_DSOUND_H 1 |
| | | #define HAVE_DXGI_H 1 |
| | | #define HAVE_XINPUT_H 1 |
| | | #define HAVE_MMDEVICEAPI_H 1 |
| | | #define HAVE_AUDIOCLIENT_H 1 |
| | | #define HAVE_ENDPOINTVOLUME_H 1 |
| | | |
| | | /* This is disabled by default to avoid C runtime dependencies and manifest requirements */ |
| | | #ifdef HAVE_LIBC |
| | |
| | | #define HAVE__COPYSIGN 1 |
| | | #define HAVE_COS 1 |
| | | #define HAVE_COSF 1 |
| | | #define HAVE_EXP 1 |
| | | #define HAVE_EXPF 1 |
| | | #define HAVE_FABS 1 |
| | | #define HAVE_FABSF 1 |
| | | #define HAVE_FLOOR 1 |
| | |
| | | /* Enable various input drivers */ |
| | | #define SDL_JOYSTICK_DINPUT 1 |
| | | #define SDL_JOYSTICK_XINPUT 1 |
| | | #define SDL_JOYSTICK_HIDAPI 1 |
| | | #define SDL_HAPTIC_DINPUT 1 |
| | | #define SDL_HAPTIC_XINPUT 1 |
| | | |
| | | /* Enable the dummy sensor driver */ |
| | | #define SDL_SENSOR_DUMMY 1 |
| | | |
| | | /* Enable various shared object loading systems */ |
| | | #define SDL_LOADSO_WINDOWS 1 |
| | | |
| | |
| | | #if WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP |
| | | #define HAVE_XINPUT_H 1 |
| | | #endif |
| | | |
| | | #define HAVE_MMDEVICEAPI_H 1 |
| | | #define HAVE_AUDIOCLIENT_H 1 |
| | | #define HAVE_ENDPOINTVOLUME_H 1 |
| | | |
| | | #define HAVE_LIBC 1 |
| | | #define STDC_HEADERS 1 |
| | | #define HAVE_CTYPE_H 1 |
| | |
| | | #define HAVE__COPYSIGN 1 |
| | | #define HAVE_COS 1 |
| | | #define HAVE_COSF 1 |
| | | #define HAVE_EXP 1 |
| | | #define HAVE_EXPF 1 |
| | | #define HAVE_FABS 1 |
| | | #define HAVE_FABSF 1 |
| | | #define HAVE_FLOOR 1 |
| | |
| | | #define SDL_HAPTIC_XINPUT 1 |
| | | #endif |
| | | |
| | | /* Enable the dummy sensor driver */ |
| | | #define SDL_SENSOR_DUMMY 1 |
| | | |
| | | /* Enable various shared object loading systems */ |
| | | #define SDL_LOADSO_WINDOWS 1 |
| | | |
| | |
| | | #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 SDL_JOYSTICK_LINUX 1 |
| | | #define SDL_HAPTIC_LINUX 1 |
| | | |
| | | #define SDL_SENSOR_DUMMY 1 |
| | | |
| | | #define SDL_LOADSO_DLOPEN 1 |
| | | |
| | | #define SDL_THREAD_PTHREAD 1 |
| | |
| | | #include <intrin.h> |
| | | #else |
| | | #ifdef __ALTIVEC__ |
| | | #if HAVE_ALTIVEC_H && !defined(__APPLE_ALTIVEC__) && !defined(SDL_DISABLE_ALTIVEC_H) |
| | | #if defined(HAVE_ALTIVEC_H) && !defined(__APPLE_ALTIVEC__) && !defined(SDL_DISABLE_ALTIVEC_H) |
| | | #include <altivec.h> |
| | | #undef pixel |
| | | #undef bool |
| | | #endif |
| | | #endif |
| | | #if defined(__ARM_NEON__) && !defined(SDL_DISABLE_ARM_NEON_H) |
| | | #include <arm_neon.h> |
| | | #endif |
| | | #if defined(__3dNOW__) && !defined(SDL_DISABLE_MM3DNOW_H) |
| | | #include <mm3dnow.h> |
| | | #endif |
| | | #if HAVE_IMMINTRIN_H && !defined(SDL_DISABLE_IMMINTRIN_H) |
| | | #if defined(HAVE_IMMINTRIN_H) && !defined(SDL_DISABLE_IMMINTRIN_H) |
| | | #include <immintrin.h> |
| | | #else |
| | | #if defined(__MMX__) && !defined(SDL_DISABLE_MMINTRIN_H) |
| | |
| | | extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX2(void); |
| | | |
| | | /** |
| | | * This function returns true if the CPU has AVX-512F (foundation) features. |
| | | */ |
| | | extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX512F(void); |
| | | |
| | | /** |
| | | * This function returns true if the CPU has NEON (ARM SIMD) features. |
| | | */ |
| | | extern DECLSPEC SDL_bool SDLCALL SDL_HasNEON(void); |
| | |
| | | * This function returns the amount of RAM configured in the system, in MB. |
| | | */ |
| | | extern DECLSPEC int SDLCALL SDL_GetSystemRAM(void); |
| | | |
| | | |
| | | /* Ends C function definitions when using C++ */ |
| | | #ifdef __cplusplus |
| | |
| | | Called on Android in onResume() |
| | | */ |
| | | |
| | | /* Display events */ |
| | | SDL_DISPLAYEVENT = 0x150, /**< Display state change */ |
| | | |
| | | /* Window events */ |
| | | SDL_WINDOWEVENT = 0x200, /**< Window state change */ |
| | | SDL_SYSWMEVENT, /**< System specific event */ |
| | |
| | | SDL_AUDIODEVICEADDED = 0x1100, /**< A new audio device is available */ |
| | | SDL_AUDIODEVICEREMOVED, /**< An audio device has been removed. */ |
| | | |
| | | /* Sensor events */ |
| | | SDL_SENSORUPDATE = 0x1200, /**< A sensor was updated */ |
| | | |
| | | /* Render events */ |
| | | SDL_RENDER_TARGETS_RESET = 0x2000, /**< The render targets have been reset and their contents need to be updated */ |
| | | SDL_RENDER_DEVICE_RESET, /**< The device has been reset and all textures need to be recreated */ |
| | |
| | | Uint32 type; |
| | | Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */ |
| | | } SDL_CommonEvent; |
| | | |
| | | /** |
| | | * \brief Display state change event data (event.display.*) |
| | | */ |
| | | typedef struct SDL_DisplayEvent |
| | | { |
| | | Uint32 type; /**< ::SDL_DISPLAYEVENT */ |
| | | Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */ |
| | | Uint32 display; /**< The associated display index */ |
| | | Uint8 event; /**< ::SDL_DisplayEventID */ |
| | | Uint8 padding1; |
| | | Uint8 padding2; |
| | | Uint8 padding3; |
| | | Sint32 data1; /**< event dependent data */ |
| | | } SDL_DisplayEvent; |
| | | |
| | | /** |
| | | * \brief Window state change event data (event.window.*) |
| | |
| | | |
| | | |
| | | /** |
| | | * \brief Sensor event structure (event.sensor.*) |
| | | */ |
| | | typedef struct SDL_SensorEvent |
| | | { |
| | | Uint32 type; /**< ::SDL_SENSORUPDATE */ |
| | | Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */ |
| | | Sint32 which; /**< The instance ID of the sensor */ |
| | | float data[6]; /**< Up to 6 values from the sensor - additional values can be queried using SDL_SensorGetData() */ |
| | | } SDL_SensorEvent; |
| | | |
| | | /** |
| | | * \brief The "quit requested" event |
| | | */ |
| | | typedef struct SDL_QuitEvent |
| | |
| | | { |
| | | Uint32 type; /**< Event type, shared with all events */ |
| | | SDL_CommonEvent common; /**< Common event data */ |
| | | SDL_DisplayEvent display; /**< Window event data */ |
| | | SDL_WindowEvent window; /**< Window event data */ |
| | | SDL_KeyboardEvent key; /**< Keyboard event data */ |
| | | SDL_TextEditingEvent edit; /**< Text editing event data */ |
| | |
| | | SDL_ControllerButtonEvent cbutton; /**< Game Controller button event data */ |
| | | SDL_ControllerDeviceEvent cdevice; /**< Game Controller device event data */ |
| | | SDL_AudioDeviceEvent adevice; /**< Audio device event data */ |
| | | SDL_SensorEvent sensor; /**< Sensor event data */ |
| | | SDL_QuitEvent quit; /**< Quit request event data */ |
| | | SDL_UserEvent user; /**< Custom event data */ |
| | | SDL_SysWMEvent syswm; /**< System dependent window event data */ |
| | |
| | | extern DECLSPEC const char *SDLCALL SDL_GameControllerNameForIndex(int joystick_index); |
| | | |
| | | /** |
| | | * Get the mapping of a game controller. |
| | | * This can be called before any controllers are opened. |
| | | * |
| | | * \return the mapping string. Must be freed with SDL_free(). Returns NULL if no mapping is available |
| | | */ |
| | | extern DECLSPEC char *SDLCALL SDL_GameControllerMappingForDeviceIndex(int joystick_index); |
| | | |
| | | /** |
| | | * Open a game controller for use. |
| | | * The index passed as an argument refers to the N'th game controller on the system. |
| | | * This index is not the value which will identify this controller in future |
| | |
| | | * Return the name for this currently opened controller |
| | | */ |
| | | extern DECLSPEC const char *SDLCALL SDL_GameControllerName(SDL_GameController *gamecontroller); |
| | | |
| | | /** |
| | | * Get the player index of an opened game controller, or -1 if it's not available |
| | | * |
| | | * For XInput controllers this returns the XInput user index. |
| | | */ |
| | | extern DECLSPEC int SDLCALL SDL_GameControllerGetPlayerIndex(SDL_GameController *gamecontroller); |
| | | |
| | | /** |
| | | * Get the USB vendor ID of an opened controller, if available. |
| | |
| | | SDL_GameControllerButton button); |
| | | |
| | | /** |
| | | * Trigger a rumble effect |
| | | * Each call to this function cancels any previous rumble effect, and calling it with 0 intensity stops any rumbling. |
| | | * |
| | | * \param gamecontroller The controller to vibrate |
| | | * \param low_frequency_rumble The intensity of the low frequency (left) rumble motor, from 0 to 0xFFFF |
| | | * \param high_frequency_rumble The intensity of the high frequency (right) rumble motor, from 0 to 0xFFFF |
| | | * \param duration_ms The duration of the rumble effect, in milliseconds |
| | | * |
| | | * \return 0, or -1 if rumble isn't supported on this joystick |
| | | */ |
| | | extern DECLSPEC int SDLCALL SDL_GameControllerRumble(SDL_GameController *gamecontroller, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms); |
| | | |
| | | /** |
| | | * Close a controller previously opened with SDL_GameControllerOpen(). |
| | | */ |
| | | extern DECLSPEC void SDLCALL SDL_GameControllerClose(SDL_GameController *gamecontroller); |
| | |
| | | extern "C" { |
| | | #endif /* __cplusplus */ |
| | | |
| | | /* FIXME: For SDL 2.1, adjust all the magnitude variables to be Uint16 (0xFFFF). |
| | | * |
| | | * At the moment the magnitude variables are mixed between signed/unsigned, and |
| | | * it is also not made clear that ALL of those variables expect a max of 0x7FFF. |
| | | * |
| | | * Some platforms may have higher precision than that (Linux FF, Windows XInput) |
| | | * so we should fix the inconsistency in favor of higher possible precision, |
| | | * adjusting for platforms that use different scales. |
| | | * -flibit |
| | | */ |
| | | |
| | | /** |
| | | * \typedef SDL_Haptic |
| | | * |
| | |
| | | * This struct is exclusively for the ::SDL_HAPTIC_LEFTRIGHT effect. |
| | | * |
| | | * The Left/Right effect is used to explicitly control the large and small |
| | | * motors, commonly found in modern game controllers. One motor is high |
| | | * frequency, the other is low frequency. |
| | | * motors, commonly found in modern game controllers. The small (right) motor |
| | | * is high frequency, and the large (left) motor is low frequency. |
| | | * |
| | | * \sa SDL_HAPTIC_LEFTRIGHT |
| | | * \sa SDL_HapticEffect |
| | |
| | | Uint16 type; /**< ::SDL_HAPTIC_LEFTRIGHT */ |
| | | |
| | | /* Replay */ |
| | | Uint32 length; /**< Duration of the effect. */ |
| | | Uint32 length; /**< Duration of the effect in milliseconds. */ |
| | | |
| | | /* Rumble */ |
| | | Uint16 large_magnitude; /**< Control of the large controller motor. */ |
| | |
| | | #define SDL_HINT_GRAB_KEYBOARD "SDL_GRAB_KEYBOARD" |
| | | |
| | | /** |
| | | * \brief A variable setting the double click time, in milliseconds. |
| | | */ |
| | | #define SDL_HINT_MOUSE_DOUBLE_CLICK_TIME "SDL_MOUSE_DOUBLE_CLICK_TIME" |
| | | |
| | | /** |
| | | * \brief A variable setting the double click radius, in pixels. |
| | | */ |
| | | #define SDL_HINT_MOUSE_DOUBLE_CLICK_RADIUS "SDL_MOUSE_DOUBLE_CLICK_RADIUS" |
| | | |
| | | /** |
| | | * \brief A variable setting the speed scale for mouse motion, in floating point, when the mouse is not in relative mode |
| | | */ |
| | | #define SDL_HINT_MOUSE_NORMAL_SPEED_SCALE "SDL_MOUSE_NORMAL_SPEED_SCALE" |
| | |
| | | #define SDL_HINT_IDLE_TIMER_DISABLED "SDL_IOS_IDLE_TIMER_DISABLED" |
| | | |
| | | /** |
| | | * \brief A variable controlling which orientations are allowed on iOS. |
| | | * \brief A variable controlling which orientations are allowed on iOS/Android. |
| | | * |
| | | * In some circumstances it is necessary to be able to explicitly control |
| | | * which UI orientations are allowed. |
| | |
| | | #define SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS "SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS" |
| | | |
| | | /** |
| | | * \brief A variable controlling whether the HIDAPI joystick drivers should be used. |
| | | * |
| | | * This variable can be set to the following values: |
| | | * "0" - HIDAPI drivers are not used |
| | | * "1" - HIDAPI drivers are used (the default) |
| | | * |
| | | * This variable is the default for all drivers, but can be overridden by the hints for specific drivers below. |
| | | */ |
| | | #define SDL_HINT_JOYSTICK_HIDAPI "SDL_JOYSTICK_HIDAPI" |
| | | |
| | | /** |
| | | * \brief A variable controlling whether the HIDAPI driver for PS4 controllers should be used. |
| | | * |
| | | * This variable can be set to the following values: |
| | | * "0" - HIDAPI driver is not used |
| | | * "1" - HIDAPI driver is used |
| | | * |
| | | * The default is the value of SDL_HINT_JOYSTICK_HIDAPI |
| | | */ |
| | | #define SDL_HINT_JOYSTICK_HIDAPI_PS4 "SDL_JOYSTICK_HIDAPI_PS4" |
| | | |
| | | /** |
| | | * \brief A variable controlling whether extended input reports should be used for PS4 controllers when using the HIDAPI driver. |
| | | * |
| | | * This variable can be set to the following values: |
| | | * "0" - extended reports are not enabled (the default) |
| | | * "1" - extended reports |
| | | * |
| | | * Extended input reports allow rumble on Bluetooth PS4 controllers, but |
| | | * break DirectInput handling for applications that don't use SDL. |
| | | * |
| | | * Once extended reports are enabled, they can not be disabled without |
| | | * power cycling the controller. |
| | | */ |
| | | #define SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE "SDL_JOYSTICK_HIDAPI_PS4_RUMBLE" |
| | | |
| | | /** |
| | | * \brief A variable controlling whether the HIDAPI driver for Steam Controllers should be used. |
| | | * |
| | | * This variable can be set to the following values: |
| | | * "0" - HIDAPI driver is not used |
| | | * "1" - HIDAPI driver is used |
| | | * |
| | | * The default is the value of SDL_HINT_JOYSTICK_HIDAPI |
| | | */ |
| | | #define SDL_HINT_JOYSTICK_HIDAPI_STEAM "SDL_JOYSTICK_HIDAPI_STEAM" |
| | | |
| | | /** |
| | | * \brief A variable controlling whether the HIDAPI driver for Nintendo Switch controllers should be used. |
| | | * |
| | | * This variable can be set to the following values: |
| | | * "0" - HIDAPI driver is not used |
| | | * "1" - HIDAPI driver is used |
| | | * |
| | | * The default is the value of SDL_HINT_JOYSTICK_HIDAPI |
| | | */ |
| | | #define SDL_HINT_JOYSTICK_HIDAPI_SWITCH "SDL_JOYSTICK_HIDAPI_SWITCH" |
| | | |
| | | /** |
| | | * \brief A variable controlling whether the HIDAPI driver for XBox controllers should be used. |
| | | * |
| | | * This variable can be set to the following values: |
| | | * "0" - HIDAPI driver is not used |
| | | * "1" - HIDAPI driver is used |
| | | * |
| | | * The default is the value of SDL_HINT_JOYSTICK_HIDAPI |
| | | */ |
| | | #define SDL_HINT_JOYSTICK_HIDAPI_XBOX "SDL_JOYSTICK_HIDAPI_XBOX" |
| | | |
| | | /** |
| | | * \brief A variable that controls whether Steam Controllers should be exposed using the SDL joystick and game controller APIs |
| | | * |
| | | * The variable can be set to the following values: |
| | | * "0" - Do not scan for Steam Controllers |
| | | * "1" - Scan for Steam Controllers (the default) |
| | | * |
| | | * The default value is "1". This hint must be set before initializing the joystick subsystem. |
| | | */ |
| | | #define SDL_HINT_ENABLE_STEAM_CONTROLLERS "SDL_ENABLE_STEAM_CONTROLLERS" |
| | | |
| | | |
| | | /** |
| | | * \brief If set to "0" then never set the top most bit on a SDL Window, even if the video mode expects it. |
| | | * This is a debugging aid for developers and not expected to be used by end users. The default is "1" |
| | | * |
| | |
| | | * This is specially useful if you build SDL against a non glibc libc library (such as musl) which |
| | | * provides a relatively small default thread stack size (a few kilobytes versus the default 8MB glibc uses). |
| | | * Support for this hint is currently available only in the pthread, Windows, and PSP backend. |
| | | * |
| | | * Instead of this hint, in 2.0.9 and later, you can use |
| | | * SDL_CreateThreadWithStackSize(). This hint only works with the classic |
| | | * SDL_CreateThread(). |
| | | */ |
| | | #define SDL_HINT_THREAD_STACK_SIZE "SDL_THREAD_STACK_SIZE" |
| | | |
| | |
| | | #define SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH "SDL_ANDROID_SEPARATE_MOUSE_AND_TOUCH" |
| | | |
| | | /** |
| | | * \brief A variable to control whether we trap the Android back button to handle it manually. |
| | | * This is necessary for the right mouse button to work on some Android devices, or |
| | | * to be able to trap the back button for use in your code reliably. If set to true, |
| | | * the back button will show up as an SDL_KEYDOWN / SDL_KEYUP pair with a keycode of |
| | | * SDL_SCANCODE_AC_BACK. |
| | | * |
| | | * The variable can be set to the following values: |
| | | * "0" - Back button will be handled as usual for system. (default) |
| | | * "1" - Back button will be trapped, allowing you to handle the key press |
| | | * manually. (This will also let right mouse click work on systems |
| | | * where the right mouse button functions as back.) |
| | | * |
| | | * The value of this hint is used at runtime, so it can be changed at any time. |
| | | */ |
| | | #define SDL_HINT_ANDROID_TRAP_BACK_BUTTON "SDL_ANDROID_TRAP_BACK_BUTTON" |
| | | |
| | | /** |
| | | * \brief A variable to control whether the return key on the soft keyboard |
| | | * should hide the soft keyboard on Android and iOS. |
| | | * |
| | |
| | | typedef enum |
| | | { |
| | | SDL_JOYSTICK_POWER_UNKNOWN = -1, |
| | | SDL_JOYSTICK_POWER_EMPTY, |
| | | SDL_JOYSTICK_POWER_LOW, |
| | | SDL_JOYSTICK_POWER_MEDIUM, |
| | | SDL_JOYSTICK_POWER_FULL, |
| | | SDL_JOYSTICK_POWER_EMPTY, /* <= 5% */ |
| | | SDL_JOYSTICK_POWER_LOW, /* <= 20% */ |
| | | SDL_JOYSTICK_POWER_MEDIUM, /* <= 70% */ |
| | | SDL_JOYSTICK_POWER_FULL, /* <= 100% */ |
| | | SDL_JOYSTICK_POWER_WIRED, |
| | | SDL_JOYSTICK_POWER_MAX |
| | | } SDL_JoystickPowerLevel; |
| | |
| | | * If no name can be found, this function returns NULL. |
| | | */ |
| | | extern DECLSPEC const char *SDLCALL SDL_JoystickNameForIndex(int device_index); |
| | | |
| | | /** |
| | | * Get the player index of a joystick, or -1 if it's not available |
| | | * This can be called before any joysticks are opened. |
| | | */ |
| | | extern DECLSPEC int SDLCALL SDL_JoystickGetDevicePlayerIndex(int device_index); |
| | | |
| | | /** |
| | | * Return the GUID for the joystick at this index |
| | |
| | | * If no name can be found, this function returns NULL. |
| | | */ |
| | | extern DECLSPEC const char *SDLCALL SDL_JoystickName(SDL_Joystick * joystick); |
| | | |
| | | /** |
| | | * Get the player index of an opened joystick, or -1 if it's not available |
| | | * |
| | | * For XInput controllers this returns the XInput user index. |
| | | */ |
| | | extern DECLSPEC int SDLCALL SDL_JoystickGetPlayerIndex(SDL_Joystick * joystick); |
| | | |
| | | /** |
| | | * Return the GUID for this opened joystick |
| | |
| | | int button); |
| | | |
| | | /** |
| | | * Trigger a rumble effect |
| | | * Each call to this function cancels any previous rumble effect, and calling it with 0 intensity stops any rumbling. |
| | | * |
| | | * \param joystick The joystick to vibrate |
| | | * \param low_frequency_rumble The intensity of the low frequency (left) rumble motor, from 0 to 0xFFFF |
| | | * \param high_frequency_rumble The intensity of the high frequency (right) rumble motor, from 0 to 0xFFFF |
| | | * \param duration_ms The duration of the rumble effect, in milliseconds |
| | | * |
| | | * \return 0, or -1 if rumble isn't supported on this joystick |
| | | */ |
| | | extern DECLSPEC int SDLCALL SDL_JoystickRumble(SDL_Joystick * joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms); |
| | | |
| | | /** |
| | | * Close a joystick previously opened with SDL_JoystickOpen(). |
| | | */ |
| | | extern DECLSPEC void SDLCALL SDL_JoystickClose(SDL_Joystick * joystick); |
| New file |
| | |
| | | /* |
| | | Simple DirectMedia Layer |
| | | Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> |
| | | |
| | | This software is provided 'as-is', without any express or implied |
| | | warranty. In no event will the authors be held liable for any damages |
| | | arising from the use of this software. |
| | | |
| | | Permission is granted to anyone to use this software for any purpose, |
| | | including commercial applications, and to alter it and redistribute it |
| | | freely, subject to the following restrictions: |
| | | |
| | | 1. The origin of this software must not be misrepresented; you must not |
| | | claim that you wrote the original software. If you use this software |
| | | in a product, an acknowledgment in the product documentation would be |
| | | appreciated but is not required. |
| | | 2. Altered source versions must be plainly marked as such, and must not be |
| | | misrepresented as being the original software. |
| | | 3. This notice may not be removed or altered from any source distribution. |
| | | */ |
| | | |
| | | /** |
| | | * \file SDL_sensor.h |
| | | * |
| | | * Include file for SDL sensor event handling |
| | | * |
| | | */ |
| | | |
| | | #ifndef _SDL_sensor_h |
| | | #define _SDL_sensor_h |
| | | |
| | | #include "SDL_stdinc.h" |
| | | #include "SDL_error.h" |
| | | |
| | | #include "begin_code.h" |
| | | /* Set up for C function definitions, even when using C++ */ |
| | | #ifdef __cplusplus |
| | | /* *INDENT-OFF* */ |
| | | extern "C" { |
| | | /* *INDENT-ON* */ |
| | | #endif |
| | | |
| | | /** |
| | | * \brief SDL_sensor.h |
| | | * |
| | | * In order to use these functions, SDL_Init() must have been called |
| | | * with the ::SDL_INIT_SENSOR flag. This causes SDL to scan the system |
| | | * for sensors, and load appropriate drivers. |
| | | */ |
| | | |
| | | struct _SDL_Sensor; |
| | | typedef struct _SDL_Sensor SDL_Sensor; |
| | | |
| | | /** |
| | | * This is a unique ID for a sensor for the time it is connected to the system, |
| | | * and is never reused for the lifetime of the application. |
| | | * |
| | | * The ID value starts at 0 and increments from there. The value -1 is an invalid ID. |
| | | */ |
| | | typedef Sint32 SDL_SensorID; |
| | | |
| | | /* The different sensors defined by SDL |
| | | * |
| | | * Additional sensors may be available, using platform dependent semantics. |
| | | * |
| | | * Hare are the additional Android sensors: |
| | | * https://developer.android.com/reference/android/hardware/SensorEvent.html#values |
| | | */ |
| | | typedef enum |
| | | { |
| | | SDL_SENSOR_INVALID = -1, /**< Returned for an invalid sensor */ |
| | | SDL_SENSOR_UNKNOWN, /**< Unknown sensor type */ |
| | | SDL_SENSOR_ACCEL, /**< Accelerometer */ |
| | | SDL_SENSOR_GYRO /**< Gyroscope */ |
| | | } SDL_SensorType; |
| | | |
| | | /** |
| | | * Accelerometer sensor |
| | | * |
| | | * The accelerometer returns the current acceleration in SI meters per |
| | | * second squared. This includes gravity, so a device at rest will have |
| | | * an acceleration of SDL_STANDARD_GRAVITY straight down. |
| | | * |
| | | * values[0]: Acceleration on the x axis |
| | | * values[1]: Acceleration on the y axis |
| | | * values[2]: Acceleration on the z axis |
| | | * |
| | | * For phones held in portrait mode, the axes are defined as follows: |
| | | * -X ... +X : left ... right |
| | | * -Y ... +Y : bottom ... top |
| | | * -Z ... +Z : farther ... closer |
| | | * |
| | | * The axis data is not changed when the phone is rotated. |
| | | * |
| | | * \sa SDL_GetDisplayOrientation() |
| | | */ |
| | | #define SDL_STANDARD_GRAVITY 9.80665f |
| | | |
| | | /** |
| | | * Gyroscope sensor |
| | | * |
| | | * The gyroscope returns the current rate of rotation in radians per second. |
| | | * The rotation is positive in the counter-clockwise direction. That is, |
| | | * an observer looking from a positive location on one of the axes would |
| | | * see positive rotation on that axis when it appeared to be rotating |
| | | * counter-clockwise. |
| | | * |
| | | * values[0]: Angular speed around the x axis |
| | | * values[1]: Angular speed around the y axis |
| | | * values[2]: Angular speed around the z axis |
| | | * |
| | | * For phones held in portrait mode, the axes are defined as follows: |
| | | * -X ... +X : left ... right |
| | | * -Y ... +Y : bottom ... top |
| | | * -Z ... +Z : farther ... closer |
| | | * |
| | | * The axis data is not changed when the phone is rotated. |
| | | * |
| | | * \sa SDL_GetDisplayOrientation() |
| | | */ |
| | | |
| | | /* Function prototypes */ |
| | | |
| | | /** |
| | | * \brief Count the number of sensors attached to the system right now |
| | | */ |
| | | extern DECLSPEC int SDLCALL SDL_NumSensors(void); |
| | | |
| | | /** |
| | | * \brief Get the implementation dependent name of a sensor. |
| | | * |
| | | * This can be called before any sensors are opened. |
| | | * |
| | | * \return The sensor name, or NULL if device_index is out of range. |
| | | */ |
| | | extern DECLSPEC const char *SDLCALL SDL_SensorGetDeviceName(int device_index); |
| | | |
| | | /** |
| | | * \brief Get the type of a sensor. |
| | | * |
| | | * This can be called before any sensors are opened. |
| | | * |
| | | * \return The sensor type, or SDL_SENSOR_INVALID if device_index is out of range. |
| | | */ |
| | | extern DECLSPEC SDL_SensorType SDLCALL SDL_SensorGetDeviceType(int device_index); |
| | | |
| | | /** |
| | | * \brief Get the platform dependent type of a sensor. |
| | | * |
| | | * This can be called before any sensors are opened. |
| | | * |
| | | * \return The sensor platform dependent type, or -1 if device_index is out of range. |
| | | */ |
| | | extern DECLSPEC int SDLCALL SDL_SensorGetDeviceNonPortableType(int device_index); |
| | | |
| | | /** |
| | | * \brief Get the instance ID of a sensor. |
| | | * |
| | | * This can be called before any sensors are opened. |
| | | * |
| | | * \return The sensor instance ID, or -1 if device_index is out of range. |
| | | */ |
| | | extern DECLSPEC SDL_SensorID SDLCALL SDL_SensorGetDeviceInstanceID(int device_index); |
| | | |
| | | /** |
| | | * \brief Open a sensor for use. |
| | | * |
| | | * The index passed as an argument refers to the N'th sensor on the system. |
| | | * |
| | | * \return A sensor identifier, or NULL if an error occurred. |
| | | */ |
| | | extern DECLSPEC SDL_Sensor *SDLCALL SDL_SensorOpen(int device_index); |
| | | |
| | | /** |
| | | * Return the SDL_Sensor associated with an instance id. |
| | | */ |
| | | extern DECLSPEC SDL_Sensor *SDLCALL SDL_SensorFromInstanceID(SDL_SensorID instance_id); |
| | | |
| | | /** |
| | | * \brief Get the implementation dependent name of a sensor. |
| | | * |
| | | * \return The sensor name, or NULL if the sensor is NULL. |
| | | */ |
| | | extern DECLSPEC const char *SDLCALL SDL_SensorGetName(SDL_Sensor *sensor); |
| | | |
| | | /** |
| | | * \brief Get the type of a sensor. |
| | | * |
| | | * This can be called before any sensors are opened. |
| | | * |
| | | * \return The sensor type, or SDL_SENSOR_INVALID if the sensor is NULL. |
| | | */ |
| | | extern DECLSPEC SDL_SensorType SDLCALL SDL_SensorGetType(SDL_Sensor *sensor); |
| | | |
| | | /** |
| | | * \brief Get the platform dependent type of a sensor. |
| | | * |
| | | * This can be called before any sensors are opened. |
| | | * |
| | | * \return The sensor platform dependent type, or -1 if the sensor is NULL. |
| | | */ |
| | | extern DECLSPEC int SDLCALL SDL_SensorGetNonPortableType(SDL_Sensor *sensor); |
| | | |
| | | /** |
| | | * \brief Get the instance ID of a sensor. |
| | | * |
| | | * This can be called before any sensors are opened. |
| | | * |
| | | * \return The sensor instance ID, or -1 if the sensor is NULL. |
| | | */ |
| | | extern DECLSPEC SDL_SensorID SDLCALL SDL_SensorGetInstanceID(SDL_Sensor *sensor); |
| | | |
| | | /** |
| | | * Get the current state of an opened sensor. |
| | | * |
| | | * The number of values and interpretation of the data is sensor dependent. |
| | | * |
| | | * \param sensor The sensor to query |
| | | * \param data A pointer filled with the current sensor state |
| | | * \param num_values The number of values to write to data |
| | | * |
| | | * \return 0 or -1 if an error occurred. |
| | | */ |
| | | extern DECLSPEC int SDLCALL SDL_SensorGetData(SDL_Sensor * sensor, float *data, int num_values); |
| | | |
| | | /** |
| | | * Close a sensor previously opened with SDL_SensorOpen() |
| | | */ |
| | | extern DECLSPEC void SDLCALL SDL_SensorClose(SDL_Sensor * sensor); |
| | | |
| | | /** |
| | | * Update the current state of the open sensors. |
| | | * |
| | | * This is called automatically by the event loop if sensor events are enabled. |
| | | * |
| | | * This needs to be called from the thread that initialized the sensor subsystem. |
| | | */ |
| | | extern DECLSPEC void SDLCALL SDL_SensorUpdate(void); |
| | | |
| | | |
| | | /* Ends C function definitions when using C++ */ |
| | | #ifdef __cplusplus |
| | | /* *INDENT-OFF* */ |
| | | } |
| | | /* *INDENT-ON* */ |
| | | #endif |
| | | #include "close_code.h" |
| | | |
| | | #endif /* _SDL_sensor_h */ |
| | | |
| | | /* vi: set ts=4 sw=4 expandtab: */ |
| | |
| | | #ifdef HAVE_FLOAT_H |
| | | # include <float.h> |
| | | #endif |
| | | #if defined(HAVE_ALLOCA) && !defined(alloca) |
| | | # if defined(HAVE_ALLOCA_H) |
| | | # include <alloca.h> |
| | | # elif defined(__GNUC__) |
| | | # define alloca __builtin_alloca |
| | | # elif defined(_MSC_VER) |
| | | # include <malloc.h> |
| | | # define alloca _alloca |
| | | # elif defined(__WATCOMC__) |
| | | # include <malloc.h> |
| | | # elif defined(__BORLANDC__) |
| | | # include <malloc.h> |
| | | # elif defined(__DMC__) |
| | | # include <stdlib.h> |
| | | # elif defined(__AIX__) |
| | | #pragma alloca |
| | | # elif defined(__MRC__) |
| | | void *alloca(unsigned); |
| | | # else |
| | | char *alloca(); |
| | | # endif |
| | | #endif |
| | | |
| | | /** |
| | | * The number of elements in an array. |
| | |
| | | extern "C" { |
| | | #endif |
| | | |
| | | #if defined(HAVE_ALLOCA) && !defined(alloca) |
| | | # if defined(HAVE_ALLOCA_H) |
| | | # include <alloca.h> |
| | | # elif defined(__GNUC__) |
| | | # define alloca __builtin_alloca |
| | | # elif defined(_MSC_VER) |
| | | # include <malloc.h> |
| | | # define alloca _alloca |
| | | # elif defined(__WATCOMC__) |
| | | # include <malloc.h> |
| | | # elif defined(__BORLANDC__) |
| | | # include <malloc.h> |
| | | # elif defined(__DMC__) |
| | | # include <stdlib.h> |
| | | # elif defined(__AIX__) |
| | | #pragma alloca |
| | | # elif defined(__MRC__) |
| | | void *alloca(unsigned); |
| | | # else |
| | | char *alloca(); |
| | | # endif |
| | | #endif |
| | | #ifdef HAVE_ALLOCA |
| | | #define SDL_stack_alloc(type, count) (type*)alloca(sizeof(type)*(count)) |
| | | #define SDL_stack_free(data) |
| | |
| | | #endif |
| | | } |
| | | |
| | | |
| | | extern DECLSPEC void *SDLCALL SDL_memcpy(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len); |
| | | |
| | | extern DECLSPEC void *SDLCALL SDL_memmove(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len); |
| | | extern DECLSPEC int SDLCALL SDL_memcmp(const void *s1, const void *s2, size_t len); |
| | | |
| | | extern DECLSPEC wchar_t *SDLCALL SDL_wcsdup(const wchar_t *wstr); |
| | | extern DECLSPEC size_t SDLCALL SDL_wcslen(const wchar_t *wstr); |
| | | extern DECLSPEC size_t SDLCALL SDL_wcslcpy(SDL_OUT_Z_CAP(maxlen) wchar_t *dst, const wchar_t *src, size_t maxlen); |
| | | extern DECLSPEC size_t SDLCALL SDL_wcslcat(SDL_INOUT_Z_CAP(maxlen) wchar_t *dst, const wchar_t *src, size_t maxlen); |
| | |
| | | extern DECLSPEC float SDLCALL SDL_copysignf(float x, float y); |
| | | extern DECLSPEC double SDLCALL SDL_cos(double x); |
| | | extern DECLSPEC float SDLCALL SDL_cosf(float x); |
| | | extern DECLSPEC double SDLCALL SDL_exp(double x); |
| | | extern DECLSPEC float SDLCALL SDL_expf(float x); |
| | | extern DECLSPEC double SDLCALL SDL_fabs(double x); |
| | | extern DECLSPEC float SDLCALL SDL_fabsf(float x); |
| | | extern DECLSPEC double SDLCALL SDL_floor(double x); |
| | |
| | | int flag, Uint32 key); |
| | | |
| | | /** |
| | | * \brief Returns whether the surface has a color key |
| | | * |
| | | * \return SDL_TRUE if the surface has a color key, or SDL_FALSE if the surface is NULL or has no color key |
| | | */ |
| | | extern DECLSPEC SDL_bool SDLCALL SDL_HasColorKey(SDL_Surface * surface); |
| | | |
| | | /** |
| | | * \brief Gets the color key (transparent pixel) in a blittable surface. |
| | | * |
| | | * \param surface The surface to update |
| | |
| | | #endif /* __WIN32__ */ |
| | | |
| | | |
| | | /* Platform specific functions for Linux */ |
| | | #ifdef __LINUX__ |
| | | |
| | | /** |
| | | \brief Sets the UNIX nice value for a thread, using setpriority() if possible, and RealtimeKit if available. |
| | | |
| | | \return 0 on success, or -1 on error. |
| | | */ |
| | | extern DECLSPEC int SDLCALL SDL_LinuxSetThreadPriority(Sint64 threadID, int priority); |
| | | |
| | | #endif /* __LINUX__ */ |
| | | |
| | | /* Platform specific functions for iOS */ |
| | | #if defined(__IPHONEOS__) && __IPHONEOS__ |
| | | |
| | |
| | | \brief Return true if the application is running on Android TV |
| | | */ |
| | | extern DECLSPEC SDL_bool SDLCALL SDL_IsAndroidTV(void); |
| | | |
| | | /** |
| | | \brief Return true if the application is running on a Chromebook |
| | | */ |
| | | extern DECLSPEC SDL_bool SDLCALL SDL_IsChromebook(void); |
| | | |
| | | /** |
| | | \brief Return true is the application is running on a Samsung DeX docking station |
| | | */ |
| | | extern DECLSPEC SDL_bool SDLCALL SDL_IsDeXMode(void); |
| | | |
| | | /** |
| | | \brief Trigger the Android system back button behavior. |
| | | */ |
| | | extern DECLSPEC void SDLCALL SDL_AndroidBackButton(void); |
| | | |
| | | /** |
| | | See the official Android developer guide for more information: |
| | |
| | | |
| | | #endif /* __WINRT__ */ |
| | | |
| | | /** |
| | | \brief Return true if the current device is a tablet. |
| | | */ |
| | | extern DECLSPEC SDL_bool SDLCALL SDL_IsTablet(void); |
| | | |
| | | /* Ends C function definitions when using C++ */ |
| | | #ifdef __cplusplus |
| | | } |
| | |
| | | #include "SDL_video.h" |
| | | #include "SDL_version.h" |
| | | |
| | | #include "begin_code.h" |
| | | /* Set up for C function definitions, even when using C++ */ |
| | | #ifdef __cplusplus |
| | | extern "C" { |
| | | #endif |
| | | |
| | | /** |
| | | * \file SDL_syswm.h |
| | | * |
| | |
| | | #include "SDL_egl.h" |
| | | #endif |
| | | |
| | | #include "begin_code.h" |
| | | /* Set up for C function definitions, even when using C++ */ |
| | | #ifdef __cplusplus |
| | | extern "C" { |
| | | #endif |
| | | |
| | | /** |
| | | * These are the various supported windowing subsystems |
| | | */ |
| | |
| | | /** |
| | | * The SDL thread priority. |
| | | * |
| | | * \note On many systems you require special privileges to set high priority. |
| | | * \note On many systems you require special privileges to set high or time critical priority. |
| | | */ |
| | | typedef enum { |
| | | SDL_THREAD_PRIORITY_LOW, |
| | | SDL_THREAD_PRIORITY_NORMAL, |
| | | SDL_THREAD_PRIORITY_HIGH |
| | | SDL_THREAD_PRIORITY_HIGH, |
| | | SDL_THREAD_PRIORITY_TIME_CRITICAL |
| | | } SDL_ThreadPriority; |
| | | |
| | | /** |
| | |
| | | pfnSDL_CurrentBeginThread pfnBeginThread, |
| | | pfnSDL_CurrentEndThread pfnEndThread); |
| | | |
| | | extern DECLSPEC SDL_Thread *SDLCALL |
| | | SDL_CreateThreadWithStackSize(int (SDLCALL * fn) (void *), |
| | | const char *name, const size_t stacksize, void *data, |
| | | pfnSDL_CurrentBeginThread pfnBeginThread, |
| | | pfnSDL_CurrentEndThread pfnEndThread); |
| | | |
| | | |
| | | /** |
| | | * Create a thread. |
| | | */ |
| | | #if defined(SDL_CreateThread) && SDL_DYNAMIC_API |
| | | #undef SDL_CreateThread |
| | | #define SDL_CreateThread(fn, name, data) SDL_CreateThread_REAL(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthreadex, (pfnSDL_CurrentEndThread)_endthreadex) |
| | | #undef SDL_CreateThreadWithStackSize |
| | | #define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize_REAL(fn, name, stacksize, data, (pfnSDL_CurrentBeginThread)_beginthreadex, (pfnSDL_CurrentEndThread)_endthreadex) |
| | | #else |
| | | #define SDL_CreateThread(fn, name, data) SDL_CreateThread(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthreadex, (pfnSDL_CurrentEndThread)_endthreadex) |
| | | #define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthreadex, (pfnSDL_CurrentEndThread)_endthreadex) |
| | | #endif |
| | | |
| | | #elif defined(__OS2__) |
| | |
| | | SDL_CreateThread(SDL_ThreadFunction fn, const char *name, void *data, |
| | | pfnSDL_CurrentBeginThread pfnBeginThread, |
| | | pfnSDL_CurrentEndThread pfnEndThread); |
| | | extern DECLSPEC SDL_Thread *SDLCALL |
| | | SDL_CreateThreadWithStackSize(SDL_ThreadFunction fn, const char *name, const size_t stacksize, void *data, |
| | | pfnSDL_CurrentBeginThread pfnBeginThread, |
| | | pfnSDL_CurrentEndThread pfnEndThread); |
| | | #if defined(SDL_CreateThread) && SDL_DYNAMIC_API |
| | | #undef SDL_CreateThread |
| | | #define SDL_CreateThread(fn, name, data) SDL_CreateThread_REAL(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthread, (pfnSDL_CurrentEndThread)_endthread) |
| | | #undef SDL_CreateThreadWithStackSize |
| | | #define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize_REAL(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthread, (pfnSDL_CurrentEndThread)_endthread) |
| | | #else |
| | | #define SDL_CreateThread(fn, name, data) SDL_CreateThread(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthread, (pfnSDL_CurrentEndThread)_endthread) |
| | | #define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize(fn, name, stacksize, data, (pfnSDL_CurrentBeginThread)_beginthread, (pfnSDL_CurrentEndThread)_endthread) |
| | | #endif |
| | | |
| | | #else |
| | | |
| | | /** |
| | | * Create a thread with a default stack size. |
| | | * |
| | | * This is equivalent to calling: |
| | | * SDL_CreateThreadWithStackSize(fn, name, 0, data); |
| | | */ |
| | | extern DECLSPEC SDL_Thread *SDLCALL |
| | | SDL_CreateThread(SDL_ThreadFunction fn, const char *name, void *data); |
| | | |
| | | /** |
| | | * Create a thread. |
| | |
| | | * If a system imposes requirements, SDL will try to munge the string for |
| | | * it (truncate, etc), but the original string contents will be available |
| | | * from SDL_GetThreadName(). |
| | | * |
| | | * The size (in bytes) of the new stack can be specified. Zero means "use |
| | | * the system default" which might be wildly different between platforms |
| | | * (x86 Linux generally defaults to eight megabytes, an embedded device |
| | | * might be a few kilobytes instead). |
| | | * |
| | | * In SDL 2.1, stacksize will be folded into the original SDL_CreateThread |
| | | * function. |
| | | */ |
| | | extern DECLSPEC SDL_Thread *SDLCALL |
| | | SDL_CreateThread(SDL_ThreadFunction fn, const char *name, void *data); |
| | | SDL_CreateThreadWithStackSize(SDL_ThreadFunction fn, const char *name, const size_t stacksize, void *data); |
| | | |
| | | #endif |
| | | |
| | |
| | | */ |
| | | #define SDL_MAJOR_VERSION 2 |
| | | #define SDL_MINOR_VERSION 0 |
| | | #define SDL_PATCHLEVEL 8 |
| | | #define SDL_PATCHLEVEL 9 |
| | | |
| | | /** |
| | | * \brief Macro to determine SDL version program was compiled against. |
| | |
| | | } SDL_WindowEventID; |
| | | |
| | | /** |
| | | * \brief Event subtype for display events |
| | | */ |
| | | typedef enum |
| | | { |
| | | SDL_DISPLAYEVENT_NONE, /**< Never used */ |
| | | SDL_DISPLAYEVENT_ORIENTATION /**< Display orientation has changed to data1 */ |
| | | } SDL_DisplayEventID; |
| | | |
| | | typedef enum |
| | | { |
| | | SDL_ORIENTATION_UNKNOWN, /**< The display orientation can't be determined */ |
| | | SDL_ORIENTATION_LANDSCAPE, /**< The display is in landscape mode, with the right side up, relative to portrait mode */ |
| | | SDL_ORIENTATION_LANDSCAPE_FLIPPED, /**< The display is in landscape mode, with the left side up, relative to portrait mode */ |
| | | SDL_ORIENTATION_PORTRAIT, /**< The display is in portrait mode */ |
| | | SDL_ORIENTATION_PORTRAIT_FLIPPED /**< The display is in portrait mode, upside down */ |
| | | } SDL_DisplayOrientation; |
| | | |
| | | /** |
| | | * \brief An opaque handle to an OpenGL context. |
| | | */ |
| | | typedef void *SDL_GLContext; |
| | |
| | | extern DECLSPEC int SDLCALL SDL_GetDisplayBounds(int displayIndex, SDL_Rect * rect); |
| | | |
| | | /** |
| | | * \brief Get the dots/pixels-per-inch for a display |
| | | * |
| | | * \note Diagonal, horizontal and vertical DPI can all be optionally |
| | | * returned if the parameter is non-NULL. |
| | | * |
| | | * \return 0 on success, or -1 if no DPI information is available or the index is out of range. |
| | | * |
| | | * \sa SDL_GetNumVideoDisplays() |
| | | */ |
| | | extern DECLSPEC int SDLCALL SDL_GetDisplayDPI(int displayIndex, float * ddpi, float * hdpi, float * vdpi); |
| | | |
| | | /** |
| | | * \brief Get the usable desktop area represented by a display, with the |
| | | * primary display located at 0,0 |
| | | * |
| | |
| | | extern DECLSPEC int SDLCALL SDL_GetDisplayUsableBounds(int displayIndex, SDL_Rect * rect); |
| | | |
| | | /** |
| | | * \brief Get the dots/pixels-per-inch for a display |
| | | * |
| | | * \note Diagonal, horizontal and vertical DPI can all be optionally |
| | | * returned if the parameter is non-NULL. |
| | | * |
| | | * \return 0 on success, or -1 if no DPI information is available or the index is out of range. |
| | | * |
| | | * \sa SDL_GetNumVideoDisplays() |
| | | */ |
| | | extern DECLSPEC int SDLCALL SDL_GetDisplayDPI(int displayIndex, float * ddpi, float * hdpi, float * vdpi); |
| | | |
| | | /** |
| | | * \brief Get the orientation of a display |
| | | * |
| | | * \return The orientation of the display, or SDL_ORIENTATION_UNKNOWN if it isn't available. |
| | | * |
| | | * \sa SDL_GetNumVideoDisplays() |
| | | */ |
| | | extern DECLSPEC SDL_DisplayOrientation SDLCALL SDL_GetDisplayOrientation(int displayIndex); |
| | | |
| | | /** |
| | | * \brief Returns the number of available display modes. |
| | | * |
| | | * \sa SDL_GetDisplayMode() |
| | |
| | | * \brief Get the names of the Vulkan instance extensions needed to create |
| | | * a surface with \c SDL_Vulkan_CreateSurface(). |
| | | * |
| | | * \param [in] window Window for which the required Vulkan instance |
| | | * \param [in] \c NULL or window Window for which the required Vulkan instance |
| | | * extensions should be retrieved |
| | | * \param [in,out] count pointer to an \c unsigned related to the number of |
| | | * \param [in,out] pCount pointer to an \c unsigned related to the number of |
| | | * required Vulkan instance extensions |
| | | * \param [out] names \c NULL or a pointer to an array to be filled with the |
| | | * \param [out] pNames \c NULL or a pointer to an array to be filled with the |
| | | * required Vulkan instance extensions |
| | | * |
| | | * \return \c SDL_TRUE on success, \c SDL_FALSE on error. |
| | |
| | | * returned instead of \c SDL_TRUE, to indicate that not all the required |
| | | * extensions were returned. |
| | | * |
| | | * \note If \c window is not NULL, it will be checked against its creation |
| | | * flags to ensure that the Vulkan flag is present. This parameter |
| | | * will be removed in a future major release. |
| | | * |
| | | * \note The returned list of extensions will contain \c VK_KHR_surface |
| | | * and zero or more platform specific extensions |
| | | * |
| | | * \note The extension names queried here must be enabled when calling |
| | | * VkCreateInstance, otherwise surface creation will fail. |
| | | * |
| | | * \note \c window should have been created with the \c SDL_WINDOW_VULKAN flag. |
| | | * \note \c window should have been created with the \c SDL_WINDOW_VULKAN flag |
| | | * or be \c NULL |
| | | * |
| | | * \code |
| | | * unsigned int count; |
| | | * // get count of required extensions |
| | | * if(!SDL_Vulkan_GetInstanceExtensions(window, &count, NULL)) |
| | | * if(!SDL_Vulkan_GetInstanceExtensions(NULL, &count, NULL)) |
| | | * handle_error(); |
| | | * |
| | | * static const char *const additionalExtensions[] = |
| | |
| | | * handle_error(); |
| | | * |
| | | * // get names of required extensions |
| | | * if(!SDL_Vulkan_GetInstanceExtensions(window, &count, names)) |
| | | * if(!SDL_Vulkan_GetInstanceExtensions(NULL, &count, names)) |
| | | * handle_error(); |
| | | * |
| | | * // copy additional extensions after required extensions |
| | |
| | | #include "events/SDL_events_c.h" |
| | | #include "haptic/SDL_haptic_c.h" |
| | | #include "joystick/SDL_joystick_c.h" |
| | | #include "sensor/SDL_sensor_c.h" |
| | | |
| | | /* Initialization/Cleanup routines */ |
| | | #if !SDL_TIMERS_DISABLED |
| | |
| | | #endif |
| | | } |
| | | |
| | | /* Initialize the sensor subsystem */ |
| | | if ((flags & SDL_INIT_SENSOR)){ |
| | | #if !SDL_SENSOR_DISABLED |
| | | if (SDL_PrivateShouldInitSubsystem(SDL_INIT_SENSOR)) { |
| | | if (SDL_SensorInit() < 0) { |
| | | return (-1); |
| | | } |
| | | } |
| | | SDL_PrivateSubsystemRefCountIncr(SDL_INIT_SENSOR); |
| | | #else |
| | | return SDL_SetError("SDL not built with sensor support"); |
| | | #endif |
| | | } |
| | | |
| | | return (0); |
| | | } |
| | | |
| | |
| | | SDL_QuitSubSystem(Uint32 flags) |
| | | { |
| | | /* Shut down requested initialized subsystems */ |
| | | #if !SDL_SENSOR_DISABLED |
| | | if ((flags & SDL_INIT_SENSOR)) { |
| | | if (SDL_PrivateShouldQuitSubsystem(SDL_INIT_SENSOR)) { |
| | | SDL_SensorQuit(); |
| | | } |
| | | SDL_PrivateSubsystemRefCountDecr(SDL_INIT_SENSOR); |
| | | } |
| | | #endif |
| | | |
| | | #if !SDL_JOYSTICK_DISABLED |
| | | if ((flags & SDL_INIT_GAMECONTROLLER)) { |
| | | /* game controller implies joystick */ |
| | |
| | | #endif |
| | | } |
| | | |
| | | SDL_bool |
| | | SDL_IsTablet() |
| | | { |
| | | #if __ANDROID__ |
| | | extern SDL_bool SDL_IsAndroidTablet(void); |
| | | return SDL_IsAndroidTablet(); |
| | | #elif __IPHONEOS__ |
| | | extern SDL_bool SDL_IsIPad(void); |
| | | return SDL_IsIPad(); |
| | | #else |
| | | return SDL_FALSE; |
| | | #endif |
| | | } |
| | | |
| | | #if defined(__WIN32__) |
| | | |
| | | #if (!defined(HAVE_LIBC) || defined(__WATCOMC__)) && !defined(SDL_STATIC_LIB) |
| | |
| | | } |
| | | |
| | | |
| | | static SDL_NORETURN void SDL_ExitProcess(int exitcode) |
| | | #if defined(__WATCOMC__) |
| | | #pragma aux SDL_ExitProcess aborts; |
| | | #endif |
| | | static void SDL_ExitProcess(int exitcode) |
| | | { |
| | | #ifdef __WIN32__ |
| | | ExitProcess(exitcode); |
| | | /* "if you do not know the state of all threads in your process, it is |
| | | better to call TerminateProcess than ExitProcess" |
| | | https://msdn.microsoft.com/en-us/library/windows/desktop/ms682658(v=vs.85).aspx */ |
| | | TerminateProcess(GetCurrentProcess(), exitcode); |
| | | |
| | | #elif defined(__EMSCRIPTEN__) |
| | | emscripten_cancel_main_loop(); /* this should "kill" the app. */ |
| | | emscripten_force_exit(exitcode); /* this should "kill" the app. */ |
| | |
| | | } |
| | | |
| | | |
| | | static SDL_NORETURN void SDL_AbortAssertion(void) |
| | | #if defined(__WATCOMC__) |
| | | #pragma aux SDL_AbortAssertion aborts; |
| | | #endif |
| | | static void SDL_AbortAssertion(void) |
| | | { |
| | | SDL_Quit(); |
| | | SDL_ExitProcess(42); |
| | |
| | | 3. This notice may not be removed or altered from any source distribution. |
| | | */ |
| | | |
| | | #ifndef SDL_assert_c_h_ |
| | | #define SDL_assert_c_h_ |
| | | |
| | | extern void SDL_AssertionsQuit(void); |
| | | |
| | | #endif /* SDL_assert_c_h_ */ |
| | | |
| | | /* vi: set ts=4 sw=4 expandtab: */ |
| | |
| | | #endif |
| | | |
| | | #if defined(__WATCOMC__) && defined(__386__) |
| | | SDL_COMPILE_TIME_ASSERT(intsize, 4==sizeof(int)); |
| | | #define HAVE_WATCOM_ATOMICS |
| | | extern _inline int _SDL_xchg_watcom(volatile int *a, int v); |
| | | #pragma aux _SDL_xchg_watcom = \ |
| | | "xchg [ecx], eax" \ |
| | | "lock xchg [ecx], eax" \ |
| | | parm [ecx] [eax] \ |
| | | value [eax] \ |
| | | modify exact [eax]; |
| | |
| | | #include <atomic.h> |
| | | #endif |
| | | |
| | | #if defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_X64)) |
| | | #include <xmmintrin.h> |
| | | #endif |
| | | |
| | | #if defined(__WATCOMC__) && defined(__386__) |
| | | SDL_COMPILE_TIME_ASSERT(locksize, 4==sizeof(SDL_SpinLock)); |
| | | extern _inline int _SDL_xchg_watcom(volatile int *a, int v); |
| | | #pragma aux _SDL_xchg_watcom = \ |
| | | "xchg [ecx], eax" \ |
| | | "lock xchg [ecx], eax" \ |
| | | parm [ecx] [eax] \ |
| | | value [eax] \ |
| | | modify exact [eax]; |
| | |
| | | #endif |
| | | } |
| | | |
| | | /* "REP NOP" is PAUSE, coded for tools that don't know it by that name. */ |
| | | #if (defined(__GNUC__) || defined(__clang__)) && (defined(__i386__) || defined(__x86_64__)) |
| | | #define PAUSE_INSTRUCTION() __asm__ __volatile__("pause\n") /* Some assemblers can't do REP NOP, so go with PAUSE. */ |
| | | #elif defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_X64)) |
| | | #define PAUSE_INSTRUCTION() _mm_pause() /* this is actually "rep nop" and not a SIMD instruction. No inline asm in MSVC x86-64! */ |
| | | #elif defined(__WATCOMC__) && defined(__386__) |
| | | /* watcom assembler rejects PAUSE if CPU < i686, and it refuses REP NOP as an invalid combination. Hardcode the bytes. */ |
| | | extern _inline void PAUSE_INSTRUCTION(void); |
| | | #pragma aux PAUSE_INSTRUCTION = "db 0f3h,90h" |
| | | #else |
| | | #define PAUSE_INSTRUCTION() |
| | | #endif |
| | | |
| | | void |
| | | SDL_AtomicLock(SDL_SpinLock *lock) |
| | | { |
| | | int iterations = 0; |
| | | /* FIXME: Should we have an eventual timeout? */ |
| | | while (!SDL_AtomicTryLock(lock)) { |
| | | if (iterations < 32) { |
| | | iterations++; |
| | | PAUSE_INSTRUCTION(); |
| | | } else { |
| | | /* !!! FIXME: this doesn't definitely give up the current timeslice, it does different things on various platforms. */ |
| | | SDL_Delay(0); |
| | | } |
| | | } |
| | | } |
| | | |
| | | void |
| | | SDL_AtomicUnlock(SDL_SpinLock *lock) |
| | |
| | | add_audio_device(const char *name, void *handle, SDL_AudioDeviceItem **devices, int *devCount) |
| | | { |
| | | int retval = -1; |
| | | const size_t size = sizeof (SDL_AudioDeviceItem) + SDL_strlen(name) + 1; |
| | | SDL_AudioDeviceItem *item = (SDL_AudioDeviceItem *) SDL_malloc(size); |
| | | if (item == NULL) { |
| | | SDL_AudioDeviceItem *item; |
| | | const SDL_AudioDeviceItem *i; |
| | | int dupenum = 0; |
| | | |
| | | SDL_assert(handle != NULL); /* we reserve NULL, audio backends can't use it. */ |
| | | SDL_assert(name != NULL); |
| | | |
| | | item = (SDL_AudioDeviceItem *) SDL_malloc(sizeof (SDL_AudioDeviceItem)); |
| | | if (!item) { |
| | | return SDL_OutOfMemory(); |
| | | } |
| | | |
| | | item->original_name = SDL_strdup(name); |
| | | if (!item->original_name) { |
| | | SDL_free(item); |
| | | return SDL_OutOfMemory(); |
| | | } |
| | | |
| | | item->dupenum = 0; |
| | | item->name = item->original_name; |
| | | item->handle = handle; |
| | | |
| | | SDL_LockMutex(current_audio.detectionLock); |
| | | |
| | | for (i = *devices; i != NULL; i = i->next) { |
| | | if (SDL_strcmp(name, i->original_name) == 0) { |
| | | dupenum = i->dupenum + 1; |
| | | break; /* stop at the highest-numbered dupe. */ |
| | | } |
| | | } |
| | | |
| | | if (dupenum) { |
| | | const size_t len = SDL_strlen(name) + 16; |
| | | char *replacement = (char *) SDL_malloc(len); |
| | | if (!replacement) { |
| | | SDL_UnlockMutex(current_audio.detectionLock); |
| | | SDL_free(item->original_name); |
| | | SDL_free(item); |
| | | SDL_OutOfMemory(); |
| | | return -1; |
| | | } |
| | | |
| | | SDL_assert(handle != NULL); /* we reserve NULL, audio backends can't use it. */ |
| | | SDL_snprintf(replacement, len, "%s (%d)", name, dupenum + 1); |
| | | item->dupenum = dupenum; |
| | | item->name = replacement; |
| | | } |
| | | |
| | | item->handle = handle; |
| | | SDL_strlcpy(item->name, name, size - sizeof (SDL_AudioDeviceItem)); |
| | | |
| | | SDL_LockMutex(current_audio.detectionLock); |
| | | item->next = *devices; |
| | | *devices = item; |
| | | retval = (*devCount)++; |
| | | retval = (*devCount)++; /* !!! FIXME: this should be an atomic increment */ |
| | | |
| | | SDL_UnlockMutex(current_audio.detectionLock); |
| | | |
| | | return retval; |
| | |
| | | if (item->handle != NULL) { |
| | | current_audio.impl.FreeDeviceHandle(item->handle); |
| | | } |
| | | /* these two pointers are the same if not a duplicate devname */ |
| | | if (item->name != item->original_name) { |
| | | SDL_free(item->name); |
| | | } |
| | | SDL_free(item->original_name); |
| | | SDL_free(item); |
| | | } |
| | | *devices = NULL; |
| | |
| | | SDL_assert(get_audio_device(device->id) == device); |
| | | |
| | | if (!SDL_AtomicGet(&device->enabled)) { |
| | | return; |
| | | return; /* don't report disconnects more than once. */ |
| | | } |
| | | |
| | | if (SDL_AtomicGet(&device->shutdown)) { |
| | | return; /* don't report disconnect if we're trying to close device. */ |
| | | } |
| | | |
| | | /* Ends the audio callback and mark the device as STOPPED, but the |
| | |
| | | SDL_assert(!device->iscapture); |
| | | |
| | | /* The audio mixing is always a high priority thread */ |
| | | SDL_SetThreadPriority(SDL_THREAD_PRIORITY_HIGH); |
| | | SDL_SetThreadPriority(SDL_THREAD_PRIORITY_TIME_CRITICAL); |
| | | |
| | | /* Perform any thread setup */ |
| | | device->threadid = SDL_ThreadID(); |
| | |
| | | } |
| | | } |
| | | |
| | | current_audio.impl.PrepareToClose(device); |
| | | |
| | | current_audio.impl.FlushCapture(device); |
| | | |
| | | current_audio.impl.ThreadDeinit(device); |
| | |
| | | } else { |
| | | *devices = next; |
| | | } |
| | | /* these two pointers are the same if not a duplicate devname */ |
| | | if (item->name != item->original_name) { |
| | | SDL_free(item->name); |
| | | } |
| | | SDL_free(item->original_name); |
| | | SDL_free(item); |
| | | } |
| | | item = next; |
| | |
| | | |
| | | if (!iscapture && current_audio.outputDevicesRemoved) { |
| | | clean_out_device_list(¤t_audio.outputDevices, ¤t_audio.outputDeviceCount, ¤t_audio.outputDevicesRemoved); |
| | | current_audio.outputDevicesRemoved = SDL_FALSE; |
| | | } |
| | | |
| | | retval = iscapture ? current_audio.inputDeviceCount : current_audio.outputDeviceCount; |
| | |
| | | return; |
| | | } |
| | | |
| | | if (device->id > 0) { |
| | | SDL_AudioDevice *opendev = open_devices[device->id - 1]; |
| | | SDL_assert((opendev == device) || (opendev == NULL)); |
| | | if (opendev == device) { |
| | | open_devices[device->id - 1] = NULL; |
| | | } |
| | | } |
| | | |
| | | /* make sure the device is paused before we do anything else, so the |
| | | audio callback definitely won't fire again. */ |
| | | current_audio.impl.LockDevice(device); |
| | | SDL_AtomicSet(&device->paused, 1); |
| | | SDL_AtomicSet(&device->shutdown, 1); |
| | | SDL_AtomicSet(&device->enabled, 0); |
| | | current_audio.impl.UnlockDevice(device); |
| | | |
| | | if (device->thread != NULL) { |
| | | SDL_WaitThread(device->thread, NULL); |
| | | } |
| | |
| | | |
| | | SDL_free(device->work_buffer); |
| | | SDL_FreeAudioStream(device->stream); |
| | | |
| | | if (device->id > 0) { |
| | | SDL_AudioDevice *opendev = open_devices[device->id - 1]; |
| | | SDL_assert((opendev == device) || (opendev == NULL)); |
| | | if (opendev == device) { |
| | | open_devices[device->id - 1] = NULL; |
| | | } |
| | | } |
| | | |
| | | if (device->hidden != NULL) { |
| | | current_audio.impl.CloseDevice(device); |
| | |
| | | } |
| | | case 1: /* Mono */ |
| | | case 2: /* Stereo */ |
| | | case 4: /* surround */ |
| | | case 6: /* surround with center and lfe */ |
| | | case 4: /* Quadrophonic */ |
| | | case 6: /* 5.1 surround */ |
| | | case 8: /* 7.1 surround */ |
| | | break; |
| | | default: |
| | | SDL_SetError("Unsupported number of audio channels."); |
| | |
| | | build_stream = SDL_TRUE; |
| | | } |
| | | } |
| | | |
| | | /* !!! FIXME in 2.1: add SDL_AUDIO_ALLOW_SAMPLES_CHANGE flag? |
| | | As of 2.0.6, we will build a stream to buffer the difference between |
| | | what the app wants to feed and the device wants to eat, so everyone |
| | | gets their way. In prior releases, SDL would force the callback to |
| | | feed at the rate the device requested, adjusted for resampling. |
| | | */ |
| | | if (device->spec.samples != obtained->samples) { |
| | | if (allowed_changes & SDL_AUDIO_ALLOW_SAMPLES_CHANGE) { |
| | | obtained->samples = device->spec.samples; |
| | | } else { |
| | | build_stream = SDL_TRUE; |
| | | } |
| | | } |
| | | |
| | | SDL_CalculateAudioSpec(obtained); /* recalc after possible changes. */ |
| | | |
| | |
| | | SDL_assert(format == AUDIO_F32SYS); |
| | | |
| | | /* we keep no streaming state here, so pad with silence on both ends. */ |
| | | padding = (float *) SDL_calloc(paddingsamples, sizeof (float)); |
| | | padding = (float *) SDL_calloc(paddingsamples ? paddingsamples : 1, sizeof (float)); |
| | | if (!padding) { |
| | | SDL_OutOfMemory(); |
| | | return; |
| | |
| | | retval->packetlen = packetlen; |
| | | retval->rate_incr = ((double) dst_rate) / ((double) src_rate); |
| | | retval->resampler_padding_samples = ResamplerPadding(retval->src_rate, retval->dst_rate) * pre_resample_channels; |
| | | retval->resampler_padding = (float *) SDL_calloc(retval->resampler_padding_samples, sizeof (float)); |
| | | retval->resampler_padding = (float *) SDL_calloc(retval->resampler_padding_samples ? retval->resampler_padding_samples : 1, sizeof (float)); |
| | | |
| | | if (retval->resampler_padding == NULL) { |
| | | SDL_FreeAudioStream(retval); |
| | |
| | | misrepresented as being the original software. |
| | | 3. This notice may not be removed or altered from any source distribution. |
| | | */ |
| | | |
| | | #ifndef SDL_audiodev_c_h_ |
| | | #define SDL_audiodev_c_h_ |
| | | |
| | | #include "SDL.h" |
| | | #include "../SDL_internal.h" |
| | | #include "SDL_sysaudio.h" |
| | |
| | | |
| | | extern void SDL_EnumUnixAudioDevices(const int classic, int (*test)(int)); |
| | | |
| | | #endif /* SDL_audiodev_c_h_ */ |
| | | |
| | | /* vi: set ts=4 sw=4 expandtab: */ |
| | |
| | | #include "SDL_cpuinfo.h" |
| | | #include "SDL_assert.h" |
| | | |
| | | /* !!! FIXME: write NEON code. */ |
| | | #define HAVE_NEON_INTRINSICS 0 |
| | | /* !!! FIXME: disabled until we fix https://bugzilla.libsdl.org/show_bug.cgi?id=4186 */ |
| | | #if 0 /*def __ARM_NEON__*/ |
| | | #define HAVE_NEON_INTRINSICS 1 |
| | | #endif |
| | | |
| | | #ifdef __SSE2__ |
| | | #define HAVE_SSE2_INTRINSICS 1 |
| | |
| | | |
| | | #define DIVBY128 0.0078125f |
| | | #define DIVBY32768 0.000030517578125f |
| | | #define DIVBY2147483648 0.00000000046566128730773926 |
| | | #define DIVBY8388607 0.00000011920930376163766f |
| | | |
| | | |
| | | #if NEED_SCALAR_CONVERTER_FALLBACKS |
| | |
| | | LOG_DEBUG_CONVERT("AUDIO_S32", "AUDIO_F32"); |
| | | |
| | | for (i = cvt->len_cvt / sizeof (Sint32); i; --i, ++src, ++dst) { |
| | | *dst = (float) (((double) *src) * DIVBY2147483648); |
| | | *dst = ((float) (*src>>8)) * DIVBY8388607; |
| | | } |
| | | |
| | | if (cvt->filters[++cvt->filter_index]) { |
| | |
| | | |
| | | for (i = cvt->len_cvt / sizeof (float); i; --i, ++src, ++dst) { |
| | | const float sample = *src; |
| | | if (sample > 1.0f) { |
| | | if (sample >= 1.0f) { |
| | | *dst = 127; |
| | | } else if (sample < -1.0f) { |
| | | *dst = -127; |
| | | } else if (sample <= -1.0f) { |
| | | *dst = -128; |
| | | } else { |
| | | *dst = (Sint8)(sample * 127.0f); |
| | | } |
| | |
| | | |
| | | for (i = cvt->len_cvt / sizeof (float); i; --i, ++src, ++dst) { |
| | | const float sample = *src; |
| | | if (sample > 1.0f) { |
| | | if (sample >= 1.0f) { |
| | | *dst = 255; |
| | | } else if (sample < -1.0f) { |
| | | } else if (sample <= -1.0f) { |
| | | *dst = 0; |
| | | } else { |
| | | *dst = (Uint8)((sample + 1.0f) * 127.0f); |
| | |
| | | |
| | | for (i = cvt->len_cvt / sizeof (float); i; --i, ++src, ++dst) { |
| | | const float sample = *src; |
| | | if (sample > 1.0f) { |
| | | if (sample >= 1.0f) { |
| | | *dst = 32767; |
| | | } else if (sample < -1.0f) { |
| | | *dst = -32767; |
| | | } else if (sample <= -1.0f) { |
| | | *dst = -32768; |
| | | } else { |
| | | *dst = (Sint16)(sample * 32767.0f); |
| | | } |
| | |
| | | |
| | | for (i = cvt->len_cvt / sizeof (float); i; --i, ++src, ++dst) { |
| | | const float sample = *src; |
| | | if (sample > 1.0f) { |
| | | *dst = 65534; |
| | | } else if (sample < -1.0f) { |
| | | if (sample >= 1.0f) { |
| | | *dst = 65535; |
| | | } else if (sample <= -1.0f) { |
| | | *dst = 0; |
| | | } else { |
| | | *dst = (Uint16)((sample + 1.0f) * 32767.0f); |
| | |
| | | |
| | | for (i = cvt->len_cvt / sizeof (float); i; --i, ++src, ++dst) { |
| | | const float sample = *src; |
| | | if (sample > 1.0f) { |
| | | if (sample >= 1.0f) { |
| | | *dst = 2147483647; |
| | | } else if (sample < -1.0f) { |
| | | *dst = -2147483647; |
| | | } else if (sample <= -1.0f) { |
| | | *dst = (Sint32) -2147483648LL; |
| | | } else { |
| | | *dst = (Sint32)((double)sample * 2147483647.0); |
| | | *dst = ((Sint32)(sample * 8388607.0f)) << 8; |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | #if defined(__GNUC__) && (__GNUC__ < 4) |
| | | /* these were added as of gcc-4.0: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19418 */ |
| | | static inline __m128 _mm_castsi128_ps(__m128i __A) { |
| | | return (__m128) __A; |
| | | } |
| | | static inline __m128i _mm_castps_si128(__m128 __A) { |
| | | return (__m128i) __A; |
| | | } |
| | | #endif |
| | | |
| | | static void SDLCALL |
| | | SDL_Convert_S32_to_F32_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format) |
| | | { |
| | |
| | | |
| | | /* Get dst aligned to 16 bytes */ |
| | | for (i = cvt->len_cvt / sizeof (Sint32); i && (((size_t) dst) & 15); --i, ++src, ++dst) { |
| | | *dst = (float) (((double) *src) * DIVBY2147483648); |
| | | *dst = ((float) (*src>>8)) * DIVBY8388607; |
| | | } |
| | | |
| | | SDL_assert(!i || ((((size_t) dst) & 15) == 0)); |
| | |
| | | |
| | | { |
| | | /* Aligned! Do SSE blocks as long as we have 16 bytes available. */ |
| | | const __m128d divby2147483648 = _mm_set1_pd(DIVBY2147483648); |
| | | const __m128 divby8388607 = _mm_set1_ps(DIVBY8388607); |
| | | const __m128i *mmsrc = (const __m128i *) src; |
| | | while (i >= 4) { /* 4 * sint32 */ |
| | | const __m128i ints = _mm_load_si128(mmsrc); |
| | | /* bitshift the whole register over, so _mm_cvtepi32_pd can read the top ints in the bottom of the vector. */ |
| | | const __m128d doubles1 = _mm_mul_pd(_mm_cvtepi32_pd(_mm_srli_si128(ints, 8)), divby2147483648); |
| | | const __m128d doubles2 = _mm_mul_pd(_mm_cvtepi32_pd(ints), divby2147483648); |
| | | /* convert to float32, bitshift/or to get these into a vector to store. */ |
| | | _mm_store_ps(dst, _mm_castsi128_ps(_mm_or_si128(_mm_slli_si128(_mm_castps_si128(_mm_cvtpd_ps(doubles1)), 8), _mm_castps_si128(_mm_cvtpd_ps(doubles2))))); |
| | | /* shift out lowest bits so int fits in a float32. Small precision loss, but much faster. */ |
| | | _mm_store_ps(dst, _mm_mul_ps(_mm_cvtepi32_ps(_mm_srai_epi32(_mm_load_si128(mmsrc), 8)), divby8388607)); |
| | | i -= 4; mmsrc++; dst += 4; |
| | | } |
| | | src = (const Sint32 *) mmsrc; |
| | |
| | | |
| | | /* Finish off any leftovers with scalar operations. */ |
| | | while (i) { |
| | | *dst = (float) (((double) *src) * DIVBY2147483648); |
| | | *dst = ((float) (*src>>8)) * DIVBY8388607; |
| | | i--; src++; dst++; |
| | | } |
| | | |
| | |
| | | |
| | | /* Get dst aligned to 16 bytes */ |
| | | for (i = cvt->len_cvt / sizeof (float); i && (((size_t) dst) & 15); --i, ++src, ++dst) { |
| | | *dst = (Sint8) (*src * 127.0f); |
| | | const float sample = *src; |
| | | if (sample >= 1.0f) { |
| | | *dst = 127; |
| | | } else if (sample <= -1.0f) { |
| | | *dst = -128; |
| | | } else { |
| | | *dst = (Sint8)(sample * 127.0f); |
| | | } |
| | | } |
| | | |
| | | SDL_assert(!i || ((((size_t) dst) & 15) == 0)); |
| | |
| | | /* Make sure src is aligned too. */ |
| | | if ((((size_t) src) & 15) == 0) { |
| | | /* Aligned! Do SSE blocks as long as we have 16 bytes available. */ |
| | | const __m128 one = _mm_set1_ps(1.0f); |
| | | const __m128 negone = _mm_set1_ps(-1.0f); |
| | | const __m128 mulby127 = _mm_set1_ps(127.0f); |
| | | __m128i *mmdst = (__m128i *) dst; |
| | | while (i >= 16) { /* 16 * float32 */ |
| | | const __m128i ints1 = _mm_cvtps_epi32(_mm_mul_ps(_mm_load_ps(src), mulby127)); /* load 4 floats, convert to sint32 */ |
| | | const __m128i ints2 = _mm_cvtps_epi32(_mm_mul_ps(_mm_load_ps(src+4), mulby127)); /* load 4 floats, convert to sint32 */ |
| | | const __m128i ints3 = _mm_cvtps_epi32(_mm_mul_ps(_mm_load_ps(src+8), mulby127)); /* load 4 floats, convert to sint32 */ |
| | | const __m128i ints4 = _mm_cvtps_epi32(_mm_mul_ps(_mm_load_ps(src+12), mulby127)); /* load 4 floats, convert to sint32 */ |
| | | const __m128i ints1 = _mm_cvtps_epi32(_mm_mul_ps(_mm_min_ps(_mm_max_ps(negone, _mm_load_ps(src)), one), mulby127)); /* load 4 floats, clamp, convert to sint32 */ |
| | | const __m128i ints2 = _mm_cvtps_epi32(_mm_mul_ps(_mm_min_ps(_mm_max_ps(negone, _mm_load_ps(src+4)), one), mulby127)); /* load 4 floats, clamp, convert to sint32 */ |
| | | const __m128i ints3 = _mm_cvtps_epi32(_mm_mul_ps(_mm_min_ps(_mm_max_ps(negone, _mm_load_ps(src+8)), one), mulby127)); /* load 4 floats, clamp, convert to sint32 */ |
| | | const __m128i ints4 = _mm_cvtps_epi32(_mm_mul_ps(_mm_min_ps(_mm_max_ps(negone, _mm_load_ps(src+12)), one), mulby127)); /* load 4 floats, clamp, convert to sint32 */ |
| | | _mm_store_si128(mmdst, _mm_packs_epi16(_mm_packs_epi32(ints1, ints2), _mm_packs_epi32(ints3, ints4))); /* pack down, store out. */ |
| | | i -= 16; src += 16; mmdst++; |
| | | } |
| | |
| | | |
| | | /* Finish off any leftovers with scalar operations. */ |
| | | while (i) { |
| | | *dst = (Sint8) (*src * 127.0f); |
| | | const float sample = *src; |
| | | if (sample >= 1.0f) { |
| | | *dst = 127; |
| | | } else if (sample <= -1.0f) { |
| | | *dst = -128; |
| | | } else { |
| | | *dst = (Sint8)(sample * 127.0f); |
| | | } |
| | | i--; src++; dst++; |
| | | } |
| | | |
| | |
| | | |
| | | /* Get dst aligned to 16 bytes */ |
| | | for (i = cvt->len_cvt / sizeof (float); i && (((size_t) dst) & 15); --i, ++src, ++dst) { |
| | | *dst = (Uint8) ((*src + 1.0f) * 127.0f); |
| | | const float sample = *src; |
| | | if (sample >= 1.0f) { |
| | | *dst = 255; |
| | | } else if (sample <= -1.0f) { |
| | | *dst = 0; |
| | | } else { |
| | | *dst = (Uint8)((sample + 1.0f) * 127.0f); |
| | | } |
| | | } |
| | | |
| | | SDL_assert(!i || ((((size_t) dst) & 15) == 0)); |
| | |
| | | /* Make sure src is aligned too. */ |
| | | if ((((size_t) src) & 15) == 0) { |
| | | /* Aligned! Do SSE blocks as long as we have 16 bytes available. */ |
| | | const __m128 add1 = _mm_set1_ps(1.0f); |
| | | const __m128 one = _mm_set1_ps(1.0f); |
| | | const __m128 negone = _mm_set1_ps(-1.0f); |
| | | const __m128 mulby127 = _mm_set1_ps(127.0f); |
| | | __m128i *mmdst = (__m128i *) dst; |
| | | while (i >= 16) { /* 16 * float32 */ |
| | | const __m128i ints1 = _mm_cvtps_epi32(_mm_mul_ps(_mm_add_ps(_mm_load_ps(src), add1), mulby127)); /* load 4 floats, convert to sint32 */ |
| | | const __m128i ints2 = _mm_cvtps_epi32(_mm_mul_ps(_mm_add_ps(_mm_load_ps(src+4), add1), mulby127)); /* load 4 floats, convert to sint32 */ |
| | | const __m128i ints3 = _mm_cvtps_epi32(_mm_mul_ps(_mm_add_ps(_mm_load_ps(src+8), add1), mulby127)); /* load 4 floats, convert to sint32 */ |
| | | const __m128i ints4 = _mm_cvtps_epi32(_mm_mul_ps(_mm_add_ps(_mm_load_ps(src+12), add1), mulby127)); /* load 4 floats, convert to sint32 */ |
| | | const __m128i ints1 = _mm_cvtps_epi32(_mm_mul_ps(_mm_add_ps(_mm_min_ps(_mm_max_ps(negone, _mm_load_ps(src)), one), one), mulby127)); /* load 4 floats, clamp, convert to sint32 */ |
| | | const __m128i ints2 = _mm_cvtps_epi32(_mm_mul_ps(_mm_add_ps(_mm_min_ps(_mm_max_ps(negone, _mm_load_ps(src+4)), one), one), mulby127)); /* load 4 floats, clamp, convert to sint32 */ |
| | | const __m128i ints3 = _mm_cvtps_epi32(_mm_mul_ps(_mm_add_ps(_mm_min_ps(_mm_max_ps(negone, _mm_load_ps(src+8)), one), one), mulby127)); /* load 4 floats, clamp, convert to sint32 */ |
| | | const __m128i ints4 = _mm_cvtps_epi32(_mm_mul_ps(_mm_add_ps(_mm_min_ps(_mm_max_ps(negone, _mm_load_ps(src+12)), one), one), mulby127)); /* load 4 floats, clamp, convert to sint32 */ |
| | | _mm_store_si128(mmdst, _mm_packus_epi16(_mm_packs_epi32(ints1, ints2), _mm_packs_epi32(ints3, ints4))); /* pack down, store out. */ |
| | | i -= 16; src += 16; mmdst++; |
| | | } |
| | |
| | | |
| | | /* Finish off any leftovers with scalar operations. */ |
| | | while (i) { |
| | | *dst = (Uint8) ((*src + 1.0f) * 127.0f); |
| | | const float sample = *src; |
| | | if (sample >= 1.0f) { |
| | | *dst = 255; |
| | | } else if (sample <= -1.0f) { |
| | | *dst = 0; |
| | | } else { |
| | | *dst = (Uint8)((sample + 1.0f) * 127.0f); |
| | | } |
| | | i--; src++; dst++; |
| | | } |
| | | |
| | |
| | | |
| | | /* Get dst aligned to 16 bytes */ |
| | | for (i = cvt->len_cvt / sizeof (float); i && (((size_t) dst) & 15); --i, ++src, ++dst) { |
| | | *dst = (Sint16) (*src * 32767.0f); |
| | | const float sample = *src; |
| | | if (sample >= 1.0f) { |
| | | *dst = 32767; |
| | | } else if (sample <= -1.0f) { |
| | | *dst = -32768; |
| | | } else { |
| | | *dst = (Sint16)(sample * 32767.0f); |
| | | } |
| | | } |
| | | |
| | | SDL_assert(!i || ((((size_t) dst) & 15) == 0)); |
| | |
| | | /* Make sure src is aligned too. */ |
| | | if ((((size_t) src) & 15) == 0) { |
| | | /* Aligned! Do SSE blocks as long as we have 16 bytes available. */ |
| | | const __m128 one = _mm_set1_ps(1.0f); |
| | | const __m128 negone = _mm_set1_ps(-1.0f); |
| | | const __m128 mulby32767 = _mm_set1_ps(32767.0f); |
| | | __m128i *mmdst = (__m128i *) dst; |
| | | while (i >= 8) { /* 8 * float32 */ |
| | | const __m128i ints1 = _mm_cvtps_epi32(_mm_mul_ps(_mm_load_ps(src), mulby32767)); /* load 4 floats, convert to sint32 */ |
| | | const __m128i ints2 = _mm_cvtps_epi32(_mm_mul_ps(_mm_load_ps(src+4), mulby32767)); /* load 4 floats, convert to sint32 */ |
| | | const __m128i ints1 = _mm_cvtps_epi32(_mm_mul_ps(_mm_min_ps(_mm_max_ps(negone, _mm_load_ps(src)), one), mulby32767)); /* load 4 floats, clamp, convert to sint32 */ |
| | | const __m128i ints2 = _mm_cvtps_epi32(_mm_mul_ps(_mm_min_ps(_mm_max_ps(negone, _mm_load_ps(src+4)), one), mulby32767)); /* load 4 floats, clamp, convert to sint32 */ |
| | | _mm_store_si128(mmdst, _mm_packs_epi32(ints1, ints2)); /* pack to sint16, store out. */ |
| | | i -= 8; src += 8; mmdst++; |
| | | } |
| | |
| | | |
| | | /* Finish off any leftovers with scalar operations. */ |
| | | while (i) { |
| | | *dst = (Sint16) (*src * 32767.0f); |
| | | const float sample = *src; |
| | | if (sample >= 1.0f) { |
| | | *dst = 32767; |
| | | } else if (sample <= -1.0f) { |
| | | *dst = -32768; |
| | | } else { |
| | | *dst = (Sint16)(sample * 32767.0f); |
| | | } |
| | | i--; src++; dst++; |
| | | } |
| | | |
| | |
| | | |
| | | /* Get dst aligned to 16 bytes */ |
| | | for (i = cvt->len_cvt / sizeof (float); i && (((size_t) dst) & 15); --i, ++src, ++dst) { |
| | | *dst = (Uint16) ((*src + 1.0f) * 32767.0f); |
| | | const float sample = *src; |
| | | if (sample >= 1.0f) { |
| | | *dst = 65535; |
| | | } else if (sample <= -1.0f) { |
| | | *dst = 0; |
| | | } else { |
| | | *dst = (Uint16)((sample + 1.0f) * 32767.0f); |
| | | } |
| | | } |
| | | |
| | | SDL_assert(!i || ((((size_t) dst) & 15) == 0)); |
| | |
| | | though it looks like dark magic. */ |
| | | const __m128 mulby32767 = _mm_set1_ps(32767.0f); |
| | | const __m128i topbit = _mm_set1_epi16(-32768); |
| | | const __m128 one = _mm_set1_ps(1.0f); |
| | | const __m128 negone = _mm_set1_ps(-1.0f); |
| | | __m128i *mmdst = (__m128i *) dst; |
| | | while (i >= 8) { /* 8 * float32 */ |
| | | const __m128i ints1 = _mm_cvtps_epi32(_mm_mul_ps(_mm_load_ps(src), mulby32767)); /* load 4 floats, convert to sint32 */ |
| | | const __m128i ints2 = _mm_cvtps_epi32(_mm_mul_ps(_mm_load_ps(src+4), mulby32767)); /* load 4 floats, convert to sint32 */ |
| | | const __m128i ints1 = _mm_cvtps_epi32(_mm_mul_ps(_mm_min_ps(_mm_max_ps(negone, _mm_load_ps(src)), one), mulby32767)); /* load 4 floats, clamp, convert to sint32 */ |
| | | const __m128i ints2 = _mm_cvtps_epi32(_mm_mul_ps(_mm_min_ps(_mm_max_ps(negone, _mm_load_ps(src+4)), one), mulby32767)); /* load 4 floats, clamp, convert to sint32 */ |
| | | _mm_store_si128(mmdst, _mm_xor_si128(_mm_packs_epi32(ints1, ints2), topbit)); /* pack to sint16, xor top bit, store out. */ |
| | | i -= 8; src += 8; mmdst++; |
| | | } |
| | |
| | | |
| | | /* Finish off any leftovers with scalar operations. */ |
| | | while (i) { |
| | | *dst = (Uint16) ((*src + 1.0f) * 32767.0f); |
| | | const float sample = *src; |
| | | if (sample >= 1.0f) { |
| | | *dst = 65535; |
| | | } else if (sample <= -1.0f) { |
| | | *dst = 0; |
| | | } else { |
| | | *dst = (Uint16)((sample + 1.0f) * 32767.0f); |
| | | } |
| | | i--; src++; dst++; |
| | | } |
| | | |
| | |
| | | |
| | | /* Get dst aligned to 16 bytes */ |
| | | for (i = cvt->len_cvt / sizeof (float); i && (((size_t) dst) & 15); --i, ++src, ++dst) { |
| | | *dst = (Sint32) (((double) *src) * 2147483647.0); |
| | | const float sample = *src; |
| | | if (sample >= 1.0f) { |
| | | *dst = 2147483647; |
| | | } else if (sample <= -1.0f) { |
| | | *dst = (Sint32) -2147483648LL; |
| | | } else { |
| | | *dst = ((Sint32)(sample * 8388607.0f)) << 8; |
| | | } |
| | | } |
| | | |
| | | SDL_assert(!i || ((((size_t) dst) & 15) == 0)); |
| | |
| | | |
| | | { |
| | | /* Aligned! Do SSE blocks as long as we have 16 bytes available. */ |
| | | const __m128d mulby2147483647 = _mm_set1_pd(2147483647.0); |
| | | const __m128 one = _mm_set1_ps(1.0f); |
| | | const __m128 negone = _mm_set1_ps(-1.0f); |
| | | const __m128 mulby8388607 = _mm_set1_ps(8388607.0f); |
| | | __m128i *mmdst = (__m128i *) dst; |
| | | while (i >= 4) { /* 4 * float32 */ |
| | | const __m128 floats = _mm_load_ps(src); |
| | | /* bitshift the whole register over, so _mm_cvtps_pd can read the top floats in the bottom of the vector. */ |
| | | const __m128d doubles1 = _mm_mul_pd(_mm_cvtps_pd(_mm_castsi128_ps(_mm_srli_si128(_mm_castps_si128(floats), 8))), mulby2147483647); |
| | | const __m128d doubles2 = _mm_mul_pd(_mm_cvtps_pd(floats), mulby2147483647); |
| | | _mm_store_si128(mmdst, _mm_or_si128(_mm_slli_si128(_mm_cvtpd_epi32(doubles1), 8), _mm_cvtpd_epi32(doubles2))); |
| | | _mm_store_si128(mmdst, _mm_slli_epi32(_mm_cvtps_epi32(_mm_mul_ps(_mm_min_ps(_mm_max_ps(negone, _mm_load_ps(src)), one), mulby8388607)), 8)); /* load 4 floats, clamp, convert to sint32 */ |
| | | i -= 4; src += 4; mmdst++; |
| | | } |
| | | dst = (Sint32 *) mmdst; |
| | |
| | | |
| | | /* Finish off any leftovers with scalar operations. */ |
| | | while (i) { |
| | | *dst = (Sint32) (((double) *src) * 2147483647.0); |
| | | const float sample = *src; |
| | | if (sample >= 1.0f) { |
| | | *dst = 2147483647; |
| | | } else if (sample <= -1.0f) { |
| | | *dst = (Sint32) -2147483648LL; |
| | | } else { |
| | | *dst = ((Sint32)(sample * 8388607.0f)) << 8; |
| | | } |
| | | i--; src++; dst++; |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | #endif |
| | | |
| | | |
| | | #if HAVE_NEON_INTRINSICS |
| | | static void SDLCALL |
| | | SDL_Convert_S8_to_F32_NEON(SDL_AudioCVT *cvt, SDL_AudioFormat format) |
| | | { |
| | | const Sint8 *src = ((const Sint8 *) (cvt->buf + cvt->len_cvt)) - 1; |
| | | float *dst = ((float *) (cvt->buf + cvt->len_cvt * 4)) - 1; |
| | | int i; |
| | | |
| | | LOG_DEBUG_CONVERT("AUDIO_S8", "AUDIO_F32 (using NEON)"); |
| | | |
| | | /* Get dst aligned to 16 bytes (since buffer is growing, we don't have to worry about overreading from src) */ |
| | | for (i = cvt->len_cvt; i && (((size_t) (dst-15)) & 15); --i, --src, --dst) { |
| | | *dst = ((float) *src) * DIVBY128; |
| | | } |
| | | |
| | | src -= 15; dst -= 15; /* adjust to read NEON blocks from the start. */ |
| | | SDL_assert(!i || ((((size_t) dst) & 15) == 0)); |
| | | |
| | | /* Make sure src is aligned too. */ |
| | | if ((((size_t) src) & 15) == 0) { |
| | | /* Aligned! Do NEON blocks as long as we have 16 bytes available. */ |
| | | const int8_t *mmsrc = (const int8_t *) src; |
| | | const float32x4_t divby128 = vdupq_n_f32(DIVBY128); |
| | | while (i >= 16) { /* 16 * 8-bit */ |
| | | const int8x16_t bytes = vld1q_s8(mmsrc); /* get 16 sint8 into a NEON register. */ |
| | | const int16x8_t int16hi = vmovl_s8(vget_high_s8(bytes)); /* convert top 8 bytes to 8 int16 */ |
| | | const int16x8_t int16lo = vmovl_s8(vget_low_s8(bytes)); /* convert bottom 8 bytes to 8 int16 */ |
| | | /* split int16 to two int32, then convert to float, then multiply to normalize, store. */ |
| | | vst1q_f32(dst, vmulq_f32(vcvtq_f32_s32(vmovl_s16(vget_high_s16(int16hi))), divby128)); |
| | | vst1q_f32(dst+4, vmulq_f32(vcvtq_f32_s32(vmovl_s16(vget_low_s16(int16hi))), divby128)); |
| | | vst1q_f32(dst+8, vmulq_f32(vcvtq_f32_s32(vmovl_s16(vget_high_s16(int16lo))), divby128)); |
| | | vst1q_f32(dst+12, vmulq_f32(vcvtq_f32_s32(vmovl_s16(vget_low_s16(int16lo))), divby128)); |
| | | i -= 16; mmsrc -= 16; dst -= 16; |
| | | } |
| | | |
| | | src = (const Sint8 *) mmsrc; |
| | | } |
| | | |
| | | src += 15; dst += 15; /* adjust for any scalar finishing. */ |
| | | |
| | | /* Finish off any leftovers with scalar operations. */ |
| | | while (i) { |
| | | *dst = ((float) *src) * DIVBY128; |
| | | i--; src--; dst--; |
| | | } |
| | | |
| | | cvt->len_cvt *= 4; |
| | | if (cvt->filters[++cvt->filter_index]) { |
| | | cvt->filters[cvt->filter_index](cvt, AUDIO_F32SYS); |
| | | } |
| | | } |
| | | |
| | | static void SDLCALL |
| | | SDL_Convert_U8_to_F32_NEON(SDL_AudioCVT *cvt, SDL_AudioFormat format) |
| | | { |
| | | const Uint8 *src = ((const Uint8 *) (cvt->buf + cvt->len_cvt)) - 1; |
| | | float *dst = ((float *) (cvt->buf + cvt->len_cvt * 4)) - 1; |
| | | int i; |
| | | |
| | | LOG_DEBUG_CONVERT("AUDIO_U8", "AUDIO_F32 (using NEON)"); |
| | | |
| | | /* Get dst aligned to 16 bytes (since buffer is growing, we don't have to worry about overreading from src) */ |
| | | for (i = cvt->len_cvt; i && (((size_t) (dst-15)) & 15); --i, --src, --dst) { |
| | | *dst = (((float) *src) * DIVBY128) - 1.0f; |
| | | } |
| | | |
| | | src -= 15; dst -= 15; /* adjust to read NEON blocks from the start. */ |
| | | SDL_assert(!i || ((((size_t) dst) & 15) == 0)); |
| | | |
| | | /* Make sure src is aligned too. */ |
| | | if ((((size_t) src) & 15) == 0) { |
| | | /* Aligned! Do NEON blocks as long as we have 16 bytes available. */ |
| | | const uint8_t *mmsrc = (const uint8_t *) src; |
| | | const float32x4_t divby128 = vdupq_n_f32(DIVBY128); |
| | | const float32x4_t one = vdupq_n_f32(1.0f); |
| | | while (i >= 16) { /* 16 * 8-bit */ |
| | | const uint8x16_t bytes = vld1q_u8(mmsrc); /* get 16 uint8 into a NEON register. */ |
| | | const uint16x8_t uint16hi = vmovl_u8(vget_high_u8(bytes)); /* convert top 8 bytes to 8 uint16 */ |
| | | const uint16x8_t uint16lo = vmovl_u8(vget_low_u8(bytes)); /* convert bottom 8 bytes to 8 uint16 */ |
| | | /* split uint16 to two uint32, then convert to float, then multiply to normalize, subtract to adjust for sign, store. */ |
| | | vst1q_f32(dst, vmlsq_f32(vcvtq_f32_u32(vmovl_u16(vget_high_u16(uint16hi))), divby128, one)); |
| | | vst1q_f32(dst+4, vmlsq_f32(vcvtq_f32_u32(vmovl_u16(vget_low_u16(uint16hi))), divby128, one)); |
| | | vst1q_f32(dst+8, vmlsq_f32(vcvtq_f32_u32(vmovl_u16(vget_high_u16(uint16lo))), divby128, one)); |
| | | vst1q_f32(dst+12, vmlsq_f32(vcvtq_f32_u32(vmovl_u16(vget_low_u16(uint16lo))), divby128, one)); |
| | | i -= 16; mmsrc -= 16; dst -= 16; |
| | | } |
| | | |
| | | src = (const Uint8 *) mmsrc; |
| | | } |
| | | |
| | | src += 15; dst += 15; /* adjust for any scalar finishing. */ |
| | | |
| | | /* Finish off any leftovers with scalar operations. */ |
| | | while (i) { |
| | | *dst = (((float) *src) * DIVBY128) - 1.0f; |
| | | i--; src--; dst--; |
| | | } |
| | | |
| | | cvt->len_cvt *= 4; |
| | | if (cvt->filters[++cvt->filter_index]) { |
| | | cvt->filters[cvt->filter_index](cvt, AUDIO_F32SYS); |
| | | } |
| | | } |
| | | |
| | | static void SDLCALL |
| | | SDL_Convert_S16_to_F32_NEON(SDL_AudioCVT *cvt, SDL_AudioFormat format) |
| | | { |
| | | const Sint16 *src = ((const Sint16 *) (cvt->buf + cvt->len_cvt)) - 1; |
| | | float *dst = ((float *) (cvt->buf + cvt->len_cvt * 2)) - 1; |
| | | int i; |
| | | |
| | | LOG_DEBUG_CONVERT("AUDIO_S16", "AUDIO_F32 (using NEON)"); |
| | | |
| | | /* Get dst aligned to 16 bytes (since buffer is growing, we don't have to worry about overreading from src) */ |
| | | for (i = cvt->len_cvt / sizeof (Sint16); i && (((size_t) (dst-7)) & 15); --i, --src, --dst) { |
| | | *dst = ((float) *src) * DIVBY32768; |
| | | } |
| | | |
| | | src -= 7; dst -= 7; /* adjust to read NEON blocks from the start. */ |
| | | SDL_assert(!i || ((((size_t) dst) & 15) == 0)); |
| | | |
| | | /* Make sure src is aligned too. */ |
| | | if ((((size_t) src) & 15) == 0) { |
| | | /* Aligned! Do NEON blocks as long as we have 16 bytes available. */ |
| | | const float32x4_t divby32768 = vdupq_n_f32(DIVBY32768); |
| | | while (i >= 8) { /* 8 * 16-bit */ |
| | | const int16x8_t ints = vld1q_s16((int16_t const *) src); /* get 8 sint16 into a NEON register. */ |
| | | /* split int16 to two int32, then convert to float, then multiply to normalize, store. */ |
| | | vst1q_f32(dst, vmulq_f32(vcvtq_f32_s32(vmovl_s16(vget_low_s16(ints))), divby32768)); |
| | | vst1q_f32(dst+4, vmulq_f32(vcvtq_f32_s32(vmovl_s16(vget_high_s16(ints))), divby32768)); |
| | | i -= 8; src -= 8; dst -= 8; |
| | | } |
| | | } |
| | | |
| | | src += 7; dst += 7; /* adjust for any scalar finishing. */ |
| | | |
| | | /* Finish off any leftovers with scalar operations. */ |
| | | while (i) { |
| | | *dst = ((float) *src) * DIVBY32768; |
| | | i--; src--; dst--; |
| | | } |
| | | |
| | | cvt->len_cvt *= 2; |
| | | if (cvt->filters[++cvt->filter_index]) { |
| | | cvt->filters[cvt->filter_index](cvt, AUDIO_F32SYS); |
| | | } |
| | | } |
| | | |
| | | static void SDLCALL |
| | | SDL_Convert_U16_to_F32_NEON(SDL_AudioCVT *cvt, SDL_AudioFormat format) |
| | | { |
| | | const Uint16 *src = ((const Uint16 *) (cvt->buf + cvt->len_cvt)) - 1; |
| | | float *dst = ((float *) (cvt->buf + cvt->len_cvt * 2)) - 1; |
| | | int i; |
| | | |
| | | LOG_DEBUG_CONVERT("AUDIO_U16", "AUDIO_F32 (using NEON)"); |
| | | |
| | | /* Get dst aligned to 16 bytes (since buffer is growing, we don't have to worry about overreading from src) */ |
| | | for (i = cvt->len_cvt / sizeof (Sint16); i && (((size_t) (dst-7)) & 15); --i, --src, --dst) { |
| | | *dst = (((float) *src) * DIVBY32768) - 1.0f; |
| | | } |
| | | |
| | | src -= 7; dst -= 7; /* adjust to read NEON blocks from the start. */ |
| | | SDL_assert(!i || ((((size_t) dst) & 15) == 0)); |
| | | |
| | | /* Make sure src is aligned too. */ |
| | | if ((((size_t) src) & 15) == 0) { |
| | | /* Aligned! Do NEON blocks as long as we have 16 bytes available. */ |
| | | const float32x4_t divby32768 = vdupq_n_f32(DIVBY32768); |
| | | const float32x4_t one = vdupq_n_f32(1.0f); |
| | | while (i >= 8) { /* 8 * 16-bit */ |
| | | const uint16x8_t uints = vld1q_u16((uint16_t const *) src); /* get 8 uint16 into a NEON register. */ |
| | | /* split uint16 to two int32, then convert to float, then multiply to normalize, subtract for sign, store. */ |
| | | vst1q_f32(dst, vmlsq_f32(one, vcvtq_f32_u32(vmovl_u16(vget_low_u16(uints))), divby32768)); |
| | | vst1q_f32(dst+4, vmlsq_f32(one, vcvtq_f32_u32(vmovl_u16(vget_high_u16(uints))), divby32768)); |
| | | i -= 8; src -= 8; dst -= 8; |
| | | } |
| | | } |
| | | |
| | | src += 7; dst += 7; /* adjust for any scalar finishing. */ |
| | | |
| | | /* Finish off any leftovers with scalar operations. */ |
| | | while (i) { |
| | | *dst = (((float) *src) * DIVBY32768) - 1.0f; |
| | | i--; src--; dst--; |
| | | } |
| | | |
| | | cvt->len_cvt *= 2; |
| | | if (cvt->filters[++cvt->filter_index]) { |
| | | cvt->filters[cvt->filter_index](cvt, AUDIO_F32SYS); |
| | | } |
| | | } |
| | | |
| | | static void SDLCALL |
| | | SDL_Convert_S32_to_F32_NEON(SDL_AudioCVT *cvt, SDL_AudioFormat format) |
| | | { |
| | | const Sint32 *src = (const Sint32 *) cvt->buf; |
| | | float *dst = (float *) cvt->buf; |
| | | int i; |
| | | |
| | | LOG_DEBUG_CONVERT("AUDIO_S32", "AUDIO_F32 (using NEON)"); |
| | | |
| | | /* Get dst aligned to 16 bytes */ |
| | | for (i = cvt->len_cvt / sizeof (Sint32); i && (((size_t) dst) & 15); --i, ++src, ++dst) { |
| | | *dst = ((float) (*src>>8)) * DIVBY8388607; |
| | | } |
| | | |
| | | SDL_assert(!i || ((((size_t) dst) & 15) == 0)); |
| | | SDL_assert(!i || ((((size_t) src) & 15) == 0)); |
| | | |
| | | { |
| | | /* Aligned! Do NEON blocks as long as we have 16 bytes available. */ |
| | | const float32x4_t divby8388607 = vdupq_n_f32(DIVBY8388607); |
| | | const int32_t *mmsrc = (const int32_t *) src; |
| | | while (i >= 4) { /* 4 * sint32 */ |
| | | /* shift out lowest bits so int fits in a float32. Small precision loss, but much faster. */ |
| | | vst1q_f32(dst, vmulq_f32(vcvtq_f32_s32(vshrq_n_s32(vld1q_s32(mmsrc), 8)), divby8388607)); |
| | | i -= 4; mmsrc += 4; dst += 4; |
| | | } |
| | | src = (const Sint32 *) mmsrc; |
| | | } |
| | | |
| | | /* Finish off any leftovers with scalar operations. */ |
| | | while (i) { |
| | | *dst = ((float) (*src>>8)) * DIVBY8388607; |
| | | i--; src++; dst++; |
| | | } |
| | | |
| | | if (cvt->filters[++cvt->filter_index]) { |
| | | cvt->filters[cvt->filter_index](cvt, AUDIO_F32SYS); |
| | | } |
| | | } |
| | | |
| | | static void SDLCALL |
| | | SDL_Convert_F32_to_S8_NEON(SDL_AudioCVT *cvt, SDL_AudioFormat format) |
| | | { |
| | | const float *src = (const float *) cvt->buf; |
| | | Sint8 *dst = (Sint8 *) cvt->buf; |
| | | int i; |
| | | |
| | | LOG_DEBUG_CONVERT("AUDIO_F32", "AUDIO_S8 (using NEON)"); |
| | | |
| | | /* Get dst aligned to 16 bytes */ |
| | | for (i = cvt->len_cvt / sizeof (float); i && (((size_t) dst) & 15); --i, ++src, ++dst) { |
| | | const float sample = *src; |
| | | if (sample >= 1.0f) { |
| | | *dst = 127; |
| | | } else if (sample <= -1.0f) { |
| | | *dst = -128; |
| | | } else { |
| | | *dst = (Sint8)(sample * 127.0f); |
| | | } |
| | | } |
| | | |
| | | SDL_assert(!i || ((((size_t) dst) & 15) == 0)); |
| | | |
| | | /* Make sure src is aligned too. */ |
| | | if ((((size_t) src) & 15) == 0) { |
| | | /* Aligned! Do NEON blocks as long as we have 16 bytes available. */ |
| | | const float32x4_t one = vdupq_n_f32(1.0f); |
| | | const float32x4_t negone = vdupq_n_f32(-1.0f); |
| | | const float32x4_t mulby127 = vdupq_n_f32(127.0f); |
| | | int8_t *mmdst = (int8_t *) dst; |
| | | while (i >= 16) { /* 16 * float32 */ |
| | | const int32x4_t ints1 = vcvtq_s32_f32(vmulq_f32(vminq_f32(vmaxq_f32(negone, vld1q_f32(src)), one), mulby127)); /* load 4 floats, clamp, convert to sint32 */ |
| | | const int32x4_t ints2 = vcvtq_s32_f32(vmulq_f32(vminq_f32(vmaxq_f32(negone, vld1q_f32(src+4)), one), mulby127)); /* load 4 floats, clamp, convert to sint32 */ |
| | | const int32x4_t ints3 = vcvtq_s32_f32(vmulq_f32(vminq_f32(vmaxq_f32(negone, vld1q_f32(src+8)), one), mulby127)); /* load 4 floats, clamp, convert to sint32 */ |
| | | const int32x4_t ints4 = vcvtq_s32_f32(vmulq_f32(vminq_f32(vmaxq_f32(negone, vld1q_f32(src+12)), one), mulby127)); /* load 4 floats, clamp, convert to sint32 */ |
| | | const int8x8_t i8lo = vmovn_s16(vcombine_s16(vmovn_s32(ints1), vmovn_s32(ints2))); /* narrow to sint16, combine, narrow to sint8 */ |
| | | const int8x8_t i8hi = vmovn_s16(vcombine_s16(vmovn_s32(ints3), vmovn_s32(ints4))); /* narrow to sint16, combine, narrow to sint8 */ |
| | | vst1q_s8(mmdst, vcombine_s8(i8lo, i8hi)); /* combine to int8x16_t, store out */ |
| | | i -= 16; src += 16; mmdst += 16; |
| | | } |
| | | dst = (Sint8 *) mmdst; |
| | | } |
| | | |
| | | /* Finish off any leftovers with scalar operations. */ |
| | | while (i) { |
| | | const float sample = *src; |
| | | if (sample >= 1.0f) { |
| | | *dst = 127; |
| | | } else if (sample <= -1.0f) { |
| | | *dst = -128; |
| | | } else { |
| | | *dst = (Sint8)(sample * 127.0f); |
| | | } |
| | | i--; src++; dst++; |
| | | } |
| | | |
| | | cvt->len_cvt /= 4; |
| | | if (cvt->filters[++cvt->filter_index]) { |
| | | cvt->filters[cvt->filter_index](cvt, AUDIO_S8); |
| | | } |
| | | } |
| | | |
| | | static void SDLCALL |
| | | SDL_Convert_F32_to_U8_NEON(SDL_AudioCVT *cvt, SDL_AudioFormat format) |
| | | { |
| | | const float *src = (const float *) cvt->buf; |
| | | Uint8 *dst = (Uint8 *) cvt->buf; |
| | | int i; |
| | | |
| | | LOG_DEBUG_CONVERT("AUDIO_F32", "AUDIO_U8 (using NEON)"); |
| | | |
| | | /* Get dst aligned to 16 bytes */ |
| | | for (i = cvt->len_cvt / sizeof (float); i && (((size_t) dst) & 15); --i, ++src, ++dst) { |
| | | const float sample = *src; |
| | | if (sample >= 1.0f) { |
| | | *dst = 255; |
| | | } else if (sample <= -1.0f) { |
| | | *dst = 0; |
| | | } else { |
| | | *dst = (Uint8)((sample + 1.0f) * 127.0f); |
| | | } |
| | | } |
| | | |
| | | SDL_assert(!i || ((((size_t) dst) & 15) == 0)); |
| | | |
| | | /* Make sure src is aligned too. */ |
| | | if ((((size_t) src) & 15) == 0) { |
| | | /* Aligned! Do NEON blocks as long as we have 16 bytes available. */ |
| | | const float32x4_t one = vdupq_n_f32(1.0f); |
| | | const float32x4_t negone = vdupq_n_f32(-1.0f); |
| | | const float32x4_t mulby127 = vdupq_n_f32(127.0f); |
| | | uint8_t *mmdst = (uint8_t *) dst; |
| | | while (i >= 16) { /* 16 * float32 */ |
| | | const uint32x4_t uints1 = vcvtq_u32_f32(vmulq_f32(vaddq_f32(vminq_f32(vmaxq_f32(negone, vld1q_f32(src)), one), one), mulby127)); /* load 4 floats, clamp, convert to uint32 */ |
| | | const uint32x4_t uints2 = vcvtq_u32_f32(vmulq_f32(vaddq_f32(vminq_f32(vmaxq_f32(negone, vld1q_f32(src+4)), one), one), mulby127)); /* load 4 floats, clamp, convert to uint32 */ |
| | | const uint32x4_t uints3 = vcvtq_u32_f32(vmulq_f32(vaddq_f32(vminq_f32(vmaxq_f32(negone, vld1q_f32(src+8)), one), one), mulby127)); /* load 4 floats, clamp, convert to uint32 */ |
| | | const uint32x4_t uints4 = vcvtq_u32_f32(vmulq_f32(vaddq_f32(vminq_f32(vmaxq_f32(negone, vld1q_f32(src+12)), one), one), mulby127)); /* load 4 floats, clamp, convert to uint32 */ |
| | | const uint8x8_t ui8lo = vmovn_u16(vcombine_u16(vmovn_u32(uints1), vmovn_u32(uints2))); /* narrow to uint16, combine, narrow to uint8 */ |
| | | const uint8x8_t ui8hi = vmovn_u16(vcombine_u16(vmovn_u32(uints3), vmovn_u32(uints4))); /* narrow to uint16, combine, narrow to uint8 */ |
| | | vst1q_u8(mmdst, vcombine_u8(ui8lo, ui8hi)); /* combine to uint8x16_t, store out */ |
| | | i -= 16; src += 16; mmdst += 16; |
| | | } |
| | | |
| | | dst = (Uint8 *) mmdst; |
| | | } |
| | | |
| | | /* Finish off any leftovers with scalar operations. */ |
| | | while (i) { |
| | | const float sample = *src; |
| | | if (sample >= 1.0f) { |
| | | *dst = 255; |
| | | } else if (sample <= -1.0f) { |
| | | *dst = 0; |
| | | } else { |
| | | *dst = (Uint8)((sample + 1.0f) * 127.0f); |
| | | } |
| | | i--; src++; dst++; |
| | | } |
| | | |
| | | cvt->len_cvt /= 4; |
| | | if (cvt->filters[++cvt->filter_index]) { |
| | | cvt->filters[cvt->filter_index](cvt, AUDIO_U8); |
| | | } |
| | | } |
| | | |
| | | static void SDLCALL |
| | | SDL_Convert_F32_to_S16_NEON(SDL_AudioCVT *cvt, SDL_AudioFormat format) |
| | | { |
| | | const float *src = (const float *) cvt->buf; |
| | | Sint16 *dst = (Sint16 *) cvt->buf; |
| | | int i; |
| | | |
| | | LOG_DEBUG_CONVERT("AUDIO_F32", "AUDIO_S16 (using NEON)"); |
| | | |
| | | /* Get dst aligned to 16 bytes */ |
| | | for (i = cvt->len_cvt / sizeof (float); i && (((size_t) dst) & 15); --i, ++src, ++dst) { |
| | | const float sample = *src; |
| | | if (sample >= 1.0f) { |
| | | *dst = 32767; |
| | | } else if (sample <= -1.0f) { |
| | | *dst = -32768; |
| | | } else { |
| | | *dst = (Sint16)(sample * 32767.0f); |
| | | } |
| | | } |
| | | |
| | | SDL_assert(!i || ((((size_t) dst) & 15) == 0)); |
| | | |
| | | /* Make sure src is aligned too. */ |
| | | if ((((size_t) src) & 15) == 0) { |
| | | /* Aligned! Do NEON blocks as long as we have 16 bytes available. */ |
| | | const float32x4_t one = vdupq_n_f32(1.0f); |
| | | const float32x4_t negone = vdupq_n_f32(-1.0f); |
| | | const float32x4_t mulby32767 = vdupq_n_f32(32767.0f); |
| | | int16_t *mmdst = (int16_t *) dst; |
| | | while (i >= 8) { /* 8 * float32 */ |
| | | const int32x4_t ints1 = vcvtq_s32_f32(vmulq_f32(vminq_f32(vmaxq_f32(negone, vld1q_f32(src)), one), mulby32767)); /* load 4 floats, clamp, convert to sint32 */ |
| | | const int32x4_t ints2 = vcvtq_s32_f32(vmulq_f32(vminq_f32(vmaxq_f32(negone, vld1q_f32(src+4)), one), mulby32767)); /* load 4 floats, clamp, convert to sint32 */ |
| | | vst1q_s16(mmdst, vcombine_s16(vmovn_s32(ints1), vmovn_s32(ints2))); /* narrow to sint16, combine, store out. */ |
| | | i -= 8; src += 8; mmdst += 8; |
| | | } |
| | | dst = (Sint16 *) mmdst; |
| | | } |
| | | |
| | | /* Finish off any leftovers with scalar operations. */ |
| | | while (i) { |
| | | const float sample = *src; |
| | | if (sample >= 1.0f) { |
| | | *dst = 32767; |
| | | } else if (sample <= -1.0f) { |
| | | *dst = -32768; |
| | | } else { |
| | | *dst = (Sint16)(sample * 32767.0f); |
| | | } |
| | | i--; src++; dst++; |
| | | } |
| | | |
| | | cvt->len_cvt /= 2; |
| | | if (cvt->filters[++cvt->filter_index]) { |
| | | cvt->filters[cvt->filter_index](cvt, AUDIO_S16SYS); |
| | | } |
| | | } |
| | | |
| | | static void SDLCALL |
| | | SDL_Convert_F32_to_U16_NEON(SDL_AudioCVT *cvt, SDL_AudioFormat format) |
| | | { |
| | | const float *src = (const float *) cvt->buf; |
| | | Uint16 *dst = (Uint16 *) cvt->buf; |
| | | int i; |
| | | |
| | | LOG_DEBUG_CONVERT("AUDIO_F32", "AUDIO_U16 (using NEON)"); |
| | | |
| | | /* Get dst aligned to 16 bytes */ |
| | | for (i = cvt->len_cvt / sizeof (float); i && (((size_t) dst) & 15); --i, ++src, ++dst) { |
| | | const float sample = *src; |
| | | if (sample >= 1.0f) { |
| | | *dst = 65535; |
| | | } else if (sample <= -1.0f) { |
| | | *dst = 0; |
| | | } else { |
| | | *dst = (Uint16)((sample + 1.0f) * 32767.0f); |
| | | } |
| | | } |
| | | |
| | | SDL_assert(!i || ((((size_t) dst) & 15) == 0)); |
| | | |
| | | /* Make sure src is aligned too. */ |
| | | if ((((size_t) src) & 15) == 0) { |
| | | /* Aligned! Do NEON blocks as long as we have 16 bytes available. */ |
| | | const float32x4_t one = vdupq_n_f32(1.0f); |
| | | const float32x4_t negone = vdupq_n_f32(-1.0f); |
| | | const float32x4_t mulby32767 = vdupq_n_f32(32767.0f); |
| | | uint16_t *mmdst = (uint16_t *) dst; |
| | | while (i >= 8) { /* 8 * float32 */ |
| | | const uint32x4_t uints1 = vcvtq_u32_f32(vmulq_f32(vaddq_f32(vminq_f32(vmaxq_f32(negone, vld1q_f32(src)), one), one), mulby32767)); /* load 4 floats, clamp, convert to uint32 */ |
| | | const uint32x4_t uints2 = vcvtq_u32_f32(vmulq_f32(vaddq_f32(vminq_f32(vmaxq_f32(negone, vld1q_f32(src+4)), one), one), mulby32767)); /* load 4 floats, clamp, convert to uint32 */ |
| | | vst1q_u16(mmdst, vcombine_u16(vmovn_u32(uints1), vmovn_u32(uints2))); /* narrow to uint16, combine, store out. */ |
| | | i -= 8; src += 8; mmdst += 8; |
| | | } |
| | | dst = (Uint16 *) mmdst; |
| | | } |
| | | |
| | | /* Finish off any leftovers with scalar operations. */ |
| | | while (i) { |
| | | const float sample = *src; |
| | | if (sample >= 1.0f) { |
| | | *dst = 65535; |
| | | } else if (sample <= -1.0f) { |
| | | *dst = 0; |
| | | } else { |
| | | *dst = (Uint16)((sample + 1.0f) * 32767.0f); |
| | | } |
| | | i--; src++; dst++; |
| | | } |
| | | |
| | | cvt->len_cvt /= 2; |
| | | if (cvt->filters[++cvt->filter_index]) { |
| | | cvt->filters[cvt->filter_index](cvt, AUDIO_U16SYS); |
| | | } |
| | | } |
| | | |
| | | static void SDLCALL |
| | | SDL_Convert_F32_to_S32_NEON(SDL_AudioCVT *cvt, SDL_AudioFormat format) |
| | | { |
| | | const float *src = (const float *) cvt->buf; |
| | | Sint32 *dst = (Sint32 *) cvt->buf; |
| | | int i; |
| | | |
| | | LOG_DEBUG_CONVERT("AUDIO_F32", "AUDIO_S32 (using NEON)"); |
| | | |
| | | /* Get dst aligned to 16 bytes */ |
| | | for (i = cvt->len_cvt / sizeof (float); i && (((size_t) dst) & 15); --i, ++src, ++dst) { |
| | | const float sample = *src; |
| | | if (sample >= 1.0f) { |
| | | *dst = 2147483647; |
| | | } else if (sample <= -1.0f) { |
| | | *dst = -2147483648; |
| | | } else { |
| | | *dst = ((Sint32)(sample * 8388607.0f)) << 8; |
| | | } |
| | | } |
| | | |
| | | SDL_assert(!i || ((((size_t) dst) & 15) == 0)); |
| | | SDL_assert(!i || ((((size_t) src) & 15) == 0)); |
| | | |
| | | { |
| | | /* Aligned! Do NEON blocks as long as we have 16 bytes available. */ |
| | | const float32x4_t one = vdupq_n_f32(1.0f); |
| | | const float32x4_t negone = vdupq_n_f32(-1.0f); |
| | | const float32x4_t mulby8388607 = vdupq_n_f32(8388607.0f); |
| | | int32_t *mmdst = (int32_t *) dst; |
| | | while (i >= 4) { /* 4 * float32 */ |
| | | vst1q_s32(mmdst, vshlq_n_s32(vcvtq_s32_f32(vmulq_f32(vminq_f32(vmaxq_f32(negone, vld1q_f32(src)), one), mulby8388607)), 8)); |
| | | i -= 4; src += 4; mmdst += 4; |
| | | } |
| | | dst = (Sint32 *) mmdst; |
| | | } |
| | | |
| | | /* Finish off any leftovers with scalar operations. */ |
| | | while (i) { |
| | | const float sample = *src; |
| | | if (sample >= 1.0f) { |
| | | *dst = 2147483647; |
| | | } else if (sample <= -1.0f) { |
| | | *dst = -2147483648; |
| | | } else { |
| | | *dst = ((Sint32)(sample * 8388607.0f)) << 8; |
| | | } |
| | | i--; src++; dst++; |
| | | } |
| | | |
| | | if (cvt->filters[++cvt->filter_index]) { |
| | | cvt->filters[cvt->filter_index](cvt, AUDIO_S32SYS); |
| | | } |
| | | } |
| | | #endif |
| | | |
| | | |
| | | |
| | | void SDL_ChooseAudioConverters(void) |
| | |
| | | } |
| | | #endif |
| | | |
| | | #if HAVE_NEON_INTRINSICS |
| | | if (SDL_HasNEON()) { |
| | | SET_CONVERTER_FUNCS(NEON); |
| | | return; |
| | | } |
| | | #endif |
| | | |
| | | #if NEED_SCALAR_CONVERTER_FALLBACKS |
| | | SET_CONVERTER_FUNCS(Scalar); |
| | | #endif |
| | |
| | | typedef struct SDL_AudioDeviceItem |
| | | { |
| | | void *handle; |
| | | char *name; |
| | | char *original_name; |
| | | int dupenum; |
| | | struct SDL_AudioDeviceItem *next; |
| | | char name[SDL_VARIABLE_LENGTH_ARRAY]; |
| | | } SDL_AudioDeviceItem; |
| | | |
| | | |
| | |
| | | |
| | | #if SDL_AUDIO_DRIVER_ALSA |
| | | |
| | | #ifndef SDL_ALSA_NON_BLOCKING |
| | | #define SDL_ALSA_NON_BLOCKING 0 |
| | | #endif |
| | | |
| | | /* Allow access to a raw mixing buffer */ |
| | | |
| | | #include <sys/types.h> |
| | |
| | | static int (*ALSA_snd_device_name_hint) (int, const char *, void ***); |
| | | static char* (*ALSA_snd_device_name_get_hint) (const void *, const char *); |
| | | static int (*ALSA_snd_device_name_free_hint) (void **); |
| | | static snd_pcm_sframes_t (*ALSA_snd_pcm_avail)(snd_pcm_t *); |
| | | #ifdef SND_CHMAP_API_VERSION |
| | | static snd_pcm_chmap_t* (*ALSA_snd_pcm_get_chmap) (snd_pcm_t *); |
| | | static int (*ALSA_snd_pcm_chmap_print) (const snd_pcm_chmap_t *map, size_t maxlen, char *buf); |
| | |
| | | SDL_ALSA_SYM(snd_device_name_hint); |
| | | SDL_ALSA_SYM(snd_device_name_get_hint); |
| | | SDL_ALSA_SYM(snd_device_name_free_hint); |
| | | SDL_ALSA_SYM(snd_pcm_avail); |
| | | #ifdef SND_CHMAP_API_VERSION |
| | | SDL_ALSA_SYM(snd_pcm_get_chmap); |
| | | SDL_ALSA_SYM(snd_pcm_chmap_print); |
| | |
| | | static void |
| | | ALSA_WaitDevice(_THIS) |
| | | { |
| | | /* We're in blocking mode, so there's nothing to do here */ |
| | | #if SDL_ALSA_NON_BLOCKING |
| | | const snd_pcm_sframes_t needed = (snd_pcm_sframes_t) this->spec.samples; |
| | | while (SDL_AtomicGet(&this->enabled)) { |
| | | const snd_pcm_sframes_t rc = ALSA_snd_pcm_avail(this->hidden->pcm_handle); |
| | | if ((rc < 0) && (rc != -EAGAIN)) { |
| | | /* Hmm, not much we can do - abort */ |
| | | fprintf(stderr, "ALSA snd_pcm_avail failed (unrecoverable): %s\n", |
| | | ALSA_snd_strerror(rc)); |
| | | SDL_OpenedAudioDeviceDisconnected(this); |
| | | return; |
| | | } else if (rc < needed) { |
| | | const Uint32 delay = ((needed - (SDL_max(rc, 0))) * 1000) / this->spec.freq; |
| | | SDL_Delay(SDL_max(delay, 10)); |
| | | } else { |
| | | break; /* ready to go! */ |
| | | } |
| | | } |
| | | #endif |
| | | } |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | static int |
| | | ALSA_finalize_hardware(_THIS, snd_pcm_hw_params_t *hwparams, int override) |
| | | ALSA_set_buffer_size(_THIS, snd_pcm_hw_params_t *params) |
| | | { |
| | | int status; |
| | | snd_pcm_hw_params_t *hwparams; |
| | | snd_pcm_uframes_t bufsize; |
| | | snd_pcm_uframes_t persize; |
| | | |
| | | /* Copy the hardware parameters for this setup */ |
| | | snd_pcm_hw_params_alloca(&hwparams); |
| | | ALSA_snd_pcm_hw_params_copy(hwparams, params); |
| | | |
| | | /* Prioritize matching the period size to the requested buffer size */ |
| | | persize = this->spec.samples; |
| | | status = ALSA_snd_pcm_hw_params_set_period_size_near( |
| | | this->hidden->pcm_handle, hwparams, &persize, NULL); |
| | | if ( status < 0 ) { |
| | | return(-1); |
| | | } |
| | | |
| | | /* Next try to restrict the parameters to having only two periods */ |
| | | bufsize = this->spec.samples * 2; |
| | | status = ALSA_snd_pcm_hw_params_set_buffer_size_near( |
| | | this->hidden->pcm_handle, hwparams, &bufsize); |
| | | if ( status < 0 ) { |
| | | return(-1); |
| | | } |
| | | |
| | | /* "set" the hardware with the desired parameters */ |
| | | status = ALSA_snd_pcm_hw_params(this->hidden->pcm_handle, hwparams); |
| | |
| | | return(-1); |
| | | } |
| | | |
| | | /* Get samples for the actual buffer size */ |
| | | status = ALSA_snd_pcm_hw_params_get_buffer_size(hwparams, &bufsize); |
| | | if ( status < 0 ) { |
| | | return(-1); |
| | | } |
| | | if ( !override && bufsize != this->spec.samples * 2 ) { |
| | | return(-1); |
| | | } |
| | | |
| | | /* !!! FIXME: Is this safe to do? */ |
| | | this->spec.samples = bufsize / 2; |
| | | this->spec.samples = persize; |
| | | |
| | | /* This is useful for debugging */ |
| | | if ( SDL_getenv("SDL_AUDIO_ALSA_DEBUG") ) { |
| | | snd_pcm_uframes_t persize = 0; |
| | | unsigned int periods = 0; |
| | | |
| | | ALSA_snd_pcm_hw_params_get_period_size(hwparams, &persize, NULL); |
| | | ALSA_snd_pcm_hw_params_get_periods(hwparams, &periods, NULL); |
| | | |
| | | fprintf(stderr, |
| | |
| | | } |
| | | |
| | | return(0); |
| | | } |
| | | |
| | | static int |
| | | ALSA_set_period_size(_THIS, snd_pcm_hw_params_t *params, int override) |
| | | { |
| | | const char *env; |
| | | int status; |
| | | snd_pcm_hw_params_t *hwparams; |
| | | snd_pcm_uframes_t frames; |
| | | unsigned int periods; |
| | | |
| | | /* Copy the hardware parameters for this setup */ |
| | | snd_pcm_hw_params_alloca(&hwparams); |
| | | ALSA_snd_pcm_hw_params_copy(hwparams, params); |
| | | |
| | | if ( !override ) { |
| | | env = SDL_getenv("SDL_AUDIO_ALSA_SET_PERIOD_SIZE"); |
| | | if ( env ) { |
| | | override = SDL_atoi(env); |
| | | if ( override == 0 ) { |
| | | return(-1); |
| | | } |
| | | } |
| | | } |
| | | |
| | | frames = this->spec.samples; |
| | | status = ALSA_snd_pcm_hw_params_set_period_size_near( |
| | | this->hidden->pcm_handle, hwparams, &frames, NULL); |
| | | if ( status < 0 ) { |
| | | return(-1); |
| | | } |
| | | |
| | | periods = 2; |
| | | status = ALSA_snd_pcm_hw_params_set_periods_near( |
| | | this->hidden->pcm_handle, hwparams, &periods, NULL); |
| | | if ( status < 0 ) { |
| | | return(-1); |
| | | } |
| | | |
| | | return ALSA_finalize_hardware(this, hwparams, override); |
| | | } |
| | | |
| | | static int |
| | | ALSA_set_buffer_size(_THIS, snd_pcm_hw_params_t *params, int override) |
| | | { |
| | | const char *env; |
| | | int status; |
| | | snd_pcm_hw_params_t *hwparams; |
| | | snd_pcm_uframes_t frames; |
| | | |
| | | /* Copy the hardware parameters for this setup */ |
| | | snd_pcm_hw_params_alloca(&hwparams); |
| | | ALSA_snd_pcm_hw_params_copy(hwparams, params); |
| | | |
| | | if ( !override ) { |
| | | env = SDL_getenv("SDL_AUDIO_ALSA_SET_BUFFER_SIZE"); |
| | | if ( env ) { |
| | | override = SDL_atoi(env); |
| | | if ( override == 0 ) { |
| | | return(-1); |
| | | } |
| | | } |
| | | } |
| | | |
| | | frames = this->spec.samples * 2; |
| | | status = ALSA_snd_pcm_hw_params_set_buffer_size_near( |
| | | this->hidden->pcm_handle, hwparams, &frames); |
| | | if ( status < 0 ) { |
| | | return(-1); |
| | | } |
| | | |
| | | return ALSA_finalize_hardware(this, hwparams, override); |
| | | } |
| | | |
| | | static int |
| | |
| | | this->spec.freq = rate; |
| | | |
| | | /* Set the buffer size, in samples */ |
| | | if ( ALSA_set_period_size(this, hwparams, 0) < 0 && |
| | | ALSA_set_buffer_size(this, hwparams, 0) < 0 ) { |
| | | /* Failed to set desired buffer size, do the best you can... */ |
| | | status = ALSA_set_period_size(this, hwparams, 1); |
| | | status = ALSA_set_buffer_size(this, hwparams); |
| | | if (status < 0) { |
| | | return SDL_SetError("Couldn't set hardware audio parameters: %s", ALSA_snd_strerror(status)); |
| | | } |
| | | } |
| | | |
| | | /* Set the software parameters */ |
| | | snd_pcm_sw_params_alloca(&swparams); |
| | | status = ALSA_snd_pcm_sw_params_current(pcm_handle, swparams); |
| | |
| | | SDL_memset(this->hidden->mixbuf, this->spec.silence, this->hidden->mixlen); |
| | | } |
| | | |
| | | #if !SDL_ALSA_NON_BLOCKING |
| | | if (!iscapture) { |
| | | ALSA_snd_pcm_nonblock(pcm_handle, 0); |
| | | } |
| | | #endif |
| | | |
| | | /* We're ready to rock and roll. :-) */ |
| | | return 0; |
| | |
| | | |
| | | test_format = SDL_FirstAudioFormat(this->spec.format); |
| | | while (test_format != 0) { /* no "UNKNOWN" constant */ |
| | | if ((test_format == AUDIO_U8) || (test_format == AUDIO_S16LSB)) { |
| | | if ((test_format == AUDIO_U8) || |
| | | (test_format == AUDIO_S16) || |
| | | (test_format == AUDIO_F32)) { |
| | | this->spec.format = test_format; |
| | | break; |
| | | } |
| | |
| | | return SDL_SetError("No compatible audio format!"); |
| | | } |
| | | |
| | | if (this->spec.channels > 1) { |
| | | this->spec.channels = 2; |
| | | } else { |
| | | this->spec.channels = 1; |
| | | } |
| | | |
| | | if (this->spec.freq < 8000) { |
| | | this->spec.freq = 8000; |
| | | } |
| | | if (this->spec.freq > 48000) { |
| | | this->spec.freq = 48000; |
| | | } |
| | | |
| | | /* TODO: pass in/return a (Java) device ID */ |
| | | this->spec.samples = Android_JNI_OpenAudioDevice(iscapture, this->spec.freq, this->spec.format == AUDIO_U8 ? 0 : 1, this->spec.channels, this->spec.samples); |
| | | |
| | | if (this->spec.samples == 0) { |
| | | /* Init failed? */ |
| | | return SDL_SetError("Java-side initialization failed!"); |
| | | if (Android_JNI_OpenAudioDevice(iscapture, &this->spec) < 0) { |
| | | return -1; |
| | | } |
| | | |
| | | SDL_CalculateAudioSpec(&this->spec); |
| | |
| | | |
| | | struct SDL_PrivateAudioData |
| | | { |
| | | SDL_Thread *thread; |
| | | AudioQueueRef audioQueue; |
| | | int numAudioBuffers; |
| | | AudioQueueBufferRef *audioBuffer; |
| | | void *buffer; |
| | | UInt32 bufferOffset; |
| | | UInt32 bufferSize; |
| | | AudioStreamBasicDescription strdesc; |
| | | SDL_sem *ready_semaphore; |
| | | char *thread_error; |
| | | SDL_atomic_t shutdown; |
| | | SDL_bool refill; |
| | | SDL_AudioStream *capturestream; |
| | | #if MACOSX_COREAUDIO |
| | | AudioDeviceID deviceID; |
| | | #else |
| | |
| | | |
| | | #include "SDL_audio.h" |
| | | #include "SDL_hints.h" |
| | | #include "SDL_timer.h" |
| | | #include "../SDL_audio_c.h" |
| | | #include "../SDL_sysaudio.h" |
| | | #include "SDL_coreaudio.h" |
| | |
| | | return NO; |
| | | } |
| | | |
| | | if (open_playback_devices + open_capture_devices == 1) { |
| | | if (open && (open_playback_devices + open_capture_devices) == 1) { |
| | | if (![session setActive:YES error:&err]) { |
| | | NSString *desc = err.description; |
| | | SDL_SetError("Could not activate Audio Session: %s", desc.UTF8String); |
| | |
| | | if (this->hidden->interruption_listener != NULL) { |
| | | SDLInterruptionListener *listener = nil; |
| | | listener = (SDLInterruptionListener *) CFBridgingRelease(this->hidden->interruption_listener); |
| | | [center removeObserver:listener]; |
| | | @synchronized (listener) { |
| | | listener.device = NULL; |
| | | } |
| | | [center removeObserver:listener]; |
| | | } |
| | | } |
| | | } |
| | |
| | | outputCallback(void *inUserData, AudioQueueRef inAQ, AudioQueueBufferRef inBuffer) |
| | | { |
| | | SDL_AudioDevice *this = (SDL_AudioDevice *) inUserData; |
| | | if (SDL_AtomicGet(&this->hidden->shutdown)) { |
| | | return; /* don't do anything. */ |
| | | } |
| | | |
| | | if (!SDL_AtomicGet(&this->enabled) || SDL_AtomicGet(&this->paused)) { |
| | | /* Supply silence if audio is not enabled or paused */ |
| | | SDL_memset(inBuffer->mAudioData, this->spec.silence, inBuffer->mAudioDataBytesCapacity); |
| | | } else { |
| | | UInt32 remaining = inBuffer->mAudioDataBytesCapacity; |
| | | Uint8 *ptr = (Uint8 *) inBuffer->mAudioData; |
| | | |
| | | while (remaining > 0) { |
| | | UInt32 len; |
| | | if (this->hidden->bufferOffset >= this->hidden->bufferSize) { |
| | | /* Generate the data */ |
| | | SDL_LockMutex(this->mixer_lock); |
| | | (*this->callbackspec.callback)(this->callbackspec.userdata, |
| | | this->hidden->buffer, this->hidden->bufferSize); |
| | | SDL_UnlockMutex(this->mixer_lock); |
| | | this->hidden->bufferOffset = 0; |
| | | } |
| | | |
| | | len = this->hidden->bufferSize - this->hidden->bufferOffset; |
| | | if (len > remaining) { |
| | | len = remaining; |
| | | } |
| | | SDL_memcpy(ptr, (char *)this->hidden->buffer + |
| | | this->hidden->bufferOffset, len); |
| | | ptr = ptr + len; |
| | | remaining -= len; |
| | | this->hidden->bufferOffset += len; |
| | | } |
| | | } |
| | | |
| | | SDL_assert(inBuffer->mAudioDataBytesCapacity == this->hidden->bufferSize); |
| | | SDL_memcpy(inBuffer->mAudioData, this->hidden->buffer, this->hidden->bufferSize); |
| | | SDL_memset(this->hidden->buffer, '\0', this->hidden->bufferSize); /* zero out in case we have to fill again without new data. */ |
| | | inBuffer->mAudioDataByteSize = this->hidden->bufferSize; |
| | | AudioQueueEnqueueBuffer(this->hidden->audioQueue, inBuffer, 0, NULL); |
| | | this->hidden->refill = SDL_TRUE; |
| | | } |
| | | |
| | | inBuffer->mAudioDataByteSize = inBuffer->mAudioDataBytesCapacity; |
| | | static Uint8 * |
| | | COREAUDIO_GetDeviceBuf(_THIS) |
| | | { |
| | | return this->hidden->buffer; |
| | | } |
| | | |
| | | static void |
| | | COREAUDIO_WaitDevice(_THIS) |
| | | { |
| | | while (SDL_AtomicGet(&this->enabled) && !this->hidden->refill) { |
| | | CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0.10, 1); |
| | | } |
| | | this->hidden->refill = SDL_FALSE; |
| | | } |
| | | |
| | | static void |
| | |
| | | const AudioStreamPacketDescription *inPacketDescs ) |
| | | { |
| | | SDL_AudioDevice *this = (SDL_AudioDevice *) inUserData; |
| | | |
| | | if (SDL_AtomicGet(&this->shutdown)) { |
| | | return; /* don't do anything. */ |
| | | if (SDL_AtomicGet(&this->enabled)) { |
| | | SDL_AudioStream *stream = this->hidden->capturestream; |
| | | if (SDL_AudioStreamPut(stream, inBuffer->mAudioData, inBuffer->mAudioDataByteSize) == -1) { |
| | | /* yikes, out of memory or something. I guess drop the buffer. Our WASAPI target kills the device in this case, though */ |
| | | } |
| | | |
| | | /* ignore unless we're active. */ |
| | | if (!SDL_AtomicGet(&this->paused) && SDL_AtomicGet(&this->enabled) && !SDL_AtomicGet(&this->paused)) { |
| | | const Uint8 *ptr = (const Uint8 *) inBuffer->mAudioData; |
| | | UInt32 remaining = inBuffer->mAudioDataByteSize; |
| | | while (remaining > 0) { |
| | | UInt32 len = this->hidden->bufferSize - this->hidden->bufferOffset; |
| | | if (len > remaining) { |
| | | len = remaining; |
| | | } |
| | | |
| | | SDL_memcpy((char *)this->hidden->buffer + this->hidden->bufferOffset, ptr, len); |
| | | ptr += len; |
| | | remaining -= len; |
| | | this->hidden->bufferOffset += len; |
| | | |
| | | if (this->hidden->bufferOffset >= this->hidden->bufferSize) { |
| | | SDL_LockMutex(this->mixer_lock); |
| | | (*this->callbackspec.callback)(this->callbackspec.userdata, this->hidden->buffer, this->hidden->bufferSize); |
| | | SDL_UnlockMutex(this->mixer_lock); |
| | | this->hidden->bufferOffset = 0; |
| | | } |
| | | } |
| | | } |
| | | |
| | | AudioQueueEnqueueBuffer(this->hidden->audioQueue, inBuffer, 0, NULL); |
| | | this->hidden->refill = SDL_TRUE; |
| | | } |
| | | } |
| | | |
| | | static int |
| | | COREAUDIO_CaptureFromDevice(_THIS, void *buffer, int buflen) |
| | | { |
| | | SDL_AudioStream *stream = this->hidden->capturestream; |
| | | while (SDL_AtomicGet(&this->enabled)) { |
| | | const int avail = SDL_AudioStreamAvailable(stream); |
| | | if (avail > 0) { |
| | | const int cpy = SDL_min(buflen, avail); |
| | | SDL_AudioStreamGet(stream, buffer, cpy); |
| | | return cpy; |
| | | } |
| | | |
| | | /* wait for more data, try again. */ |
| | | while (SDL_AtomicGet(&this->enabled) && !this->hidden->refill) { |
| | | CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0.10, 1); |
| | | } |
| | | this->hidden->refill = SDL_FALSE; |
| | | } |
| | | |
| | | return 0; /* not enabled, giving up. */ |
| | | } |
| | | |
| | | static void |
| | | COREAUDIO_FlushCapture(_THIS) |
| | | { |
| | | while (CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0, 1) == kCFRunLoopRunHandledSource) { |
| | | /* spin. */ |
| | | } |
| | | this->hidden->refill = SDL_FALSE; |
| | | SDL_AudioStreamClear(this->hidden->capturestream); |
| | | } |
| | | |
| | | |
| | |
| | | update_audio_session(this, SDL_FALSE); |
| | | #endif |
| | | |
| | | /* if callback fires again, feed silence; don't call into the app. */ |
| | | SDL_AtomicSet(&this->paused, 1); |
| | | |
| | | if (this->hidden->audioQueue) { |
| | | AudioQueueDispose(this->hidden->audioQueue, 1); |
| | | } |
| | | |
| | | if (this->hidden->thread) { |
| | | SDL_AtomicSet(&this->hidden->shutdown, 1); |
| | | SDL_WaitThread(this->hidden->thread, NULL); |
| | | } |
| | | |
| | | if (this->hidden->ready_semaphore) { |
| | | SDL_DestroySemaphore(this->hidden->ready_semaphore); |
| | | if (this->hidden->capturestream) { |
| | | SDL_FreeAudioStream(this->hidden->capturestream); |
| | | } |
| | | |
| | | /* AudioQueueDispose() frees the actual buffer objects. */ |
| | | SDL_free(this->hidden->audioBuffer); |
| | | SDL_free(this->hidden->thread_error); |
| | | SDL_free(this->hidden->buffer); |
| | | SDL_free(this->hidden); |
| | | |
| | |
| | | } |
| | | #endif |
| | | |
| | | |
| | | /* this all happens in the audio thread, since it needs a separate runloop. */ |
| | | static int |
| | | prepare_audioqueue(_THIS) |
| | | { |
| | |
| | | } |
| | | #endif |
| | | |
| | | /* Calculate the final parameters for this audio specification */ |
| | | SDL_CalculateAudioSpec(&this->spec); |
| | | |
| | | /* Allocate a sample buffer */ |
| | | this->hidden->bufferSize = this->spec.size; |
| | | this->hidden->bufferOffset = iscapture ? 0 : this->hidden->bufferSize; |
| | | |
| | | this->hidden->buffer = SDL_malloc(this->hidden->bufferSize); |
| | | if (this->hidden->buffer == NULL) { |
| | | SDL_OutOfMemory(); |
| | | return 0; |
| | | } |
| | | |
| | | /* Make sure we can feed the device a minimum amount of time */ |
| | | double MINIMUM_AUDIO_BUFFER_TIME_MS = 15.0; |
| | | #if defined(__IPHONEOS__) |
| | |
| | | numAudioBuffers = ((int)SDL_ceil(MINIMUM_AUDIO_BUFFER_TIME_MS / msecs) * 2); |
| | | } |
| | | |
| | | this->hidden->numAudioBuffers = numAudioBuffers; |
| | | this->hidden->audioBuffer = SDL_calloc(1, sizeof (AudioQueueBufferRef) * numAudioBuffers); |
| | | if (this->hidden->audioBuffer == NULL) { |
| | | SDL_OutOfMemory(); |
| | |
| | | return 1; |
| | | } |
| | | |
| | | static int |
| | | audioqueue_thread(void *arg) |
| | | static void |
| | | COREAUDIO_ThreadInit(_THIS) |
| | | { |
| | | SDL_AudioDevice *this = (SDL_AudioDevice *) arg; |
| | | const int rc = prepare_audioqueue(this); |
| | | if (!rc) { |
| | | this->hidden->thread_error = SDL_strdup(SDL_GetError()); |
| | | SDL_SemPost(this->hidden->ready_semaphore); |
| | | return 0; |
| | | /* !!! FIXME: do this in RunAudio, and maybe block OpenDevice until ThreadInit finishes, too, to report an opening error */ |
| | | SDL_OpenedAudioDeviceDisconnected(this); /* oh well. */ |
| | | } |
| | | } |
| | | |
| | | /* init was successful, alert parent thread and start running... */ |
| | | SDL_SemPost(this->hidden->ready_semaphore); |
| | | while (!SDL_AtomicGet(&this->hidden->shutdown)) { |
| | | CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0.10, 1); |
| | | } |
| | | |
| | | if (!this->iscapture) { /* Drain off any pending playback. */ |
| | | const CFTimeInterval secs = (((this->spec.size / (SDL_AUDIO_BITSIZE(this->spec.format) / 8)) / this->spec.channels) / ((CFTimeInterval) this->spec.freq)) * 2.0; |
| | | CFRunLoopRunInMode(kCFRunLoopDefaultMode, secs, 0); |
| | | } |
| | | |
| | | return 0; |
| | | static void |
| | | COREAUDIO_PrepareToClose(_THIS) |
| | | { |
| | | /* run long enough to queue some silence, so we know our actual audio |
| | | has been played */ |
| | | CFRunLoopRunInMode(kCFRunLoopDefaultMode, (((this->spec.samples * 1000) / this->spec.freq) * 2) / 1000.0f, 0); |
| | | AudioQueueStop(this->hidden->audioQueue, 1); |
| | | } |
| | | |
| | | static int |
| | |
| | | } |
| | | #endif |
| | | |
| | | /* This has to init in a new thread so it can get its own CFRunLoop. :/ */ |
| | | SDL_AtomicSet(&this->hidden->shutdown, 0); |
| | | this->hidden->ready_semaphore = SDL_CreateSemaphore(0); |
| | | if (!this->hidden->ready_semaphore) { |
| | | return -1; /* oh well. */ |
| | | /* Calculate the final parameters for this audio specification */ |
| | | SDL_CalculateAudioSpec(&this->spec); |
| | | |
| | | if (iscapture) { |
| | | this->hidden->capturestream = SDL_NewAudioStream(this->spec.format, this->spec.channels, this->spec.freq, this->spec.format, this->spec.channels, this->spec.freq); |
| | | if (!this->hidden->capturestream) { |
| | | return -1; /* already set SDL_Error */ |
| | | } |
| | | } else { |
| | | this->hidden->bufferSize = this->spec.size; |
| | | this->hidden->buffer = SDL_malloc(this->hidden->bufferSize); |
| | | if (this->hidden->buffer == NULL) { |
| | | return SDL_OutOfMemory(); |
| | | } |
| | | } |
| | | |
| | | this->hidden->thread = SDL_CreateThreadInternal(audioqueue_thread, "AudioQueue thread", 512 * 1024, this); |
| | | if (!this->hidden->thread) { |
| | | return -1; |
| | | } |
| | | |
| | | SDL_SemWait(this->hidden->ready_semaphore); |
| | | SDL_DestroySemaphore(this->hidden->ready_semaphore); |
| | | this->hidden->ready_semaphore = NULL; |
| | | |
| | | if ((this->hidden->thread != NULL) && (this->hidden->thread_error != NULL)) { |
| | | SDL_SetError("%s", this->hidden->thread_error); |
| | | return -1; |
| | | } |
| | | |
| | | return (this->hidden->thread != NULL) ? 0 : -1; |
| | | return 0; |
| | | } |
| | | |
| | | static void |
| | |
| | | impl->OpenDevice = COREAUDIO_OpenDevice; |
| | | impl->CloseDevice = COREAUDIO_CloseDevice; |
| | | impl->Deinitialize = COREAUDIO_Deinitialize; |
| | | impl->ThreadInit = COREAUDIO_ThreadInit; |
| | | impl->WaitDevice = COREAUDIO_WaitDevice; |
| | | impl->GetDeviceBuf = COREAUDIO_GetDeviceBuf; |
| | | impl->PrepareToClose = COREAUDIO_PrepareToClose; |
| | | impl->CaptureFromDevice = COREAUDIO_CaptureFromDevice; |
| | | impl->FlushCapture = COREAUDIO_FlushCapture; |
| | | |
| | | #if MACOSX_COREAUDIO |
| | | impl->DetectDevices = COREAUDIO_DetectDevices; |
| | |
| | | impl->OnlyHasDefaultCaptureDevice = 1; |
| | | #endif |
| | | |
| | | impl->ProvidesOwnCallbackThread = 1; |
| | | impl->HasCaptureSupport = 1; |
| | | |
| | | return 1; /* this audio target is available. */ |
| | |
| | | static jack_nframes_t (*JACK_jack_get_sample_rate) (jack_client_t *); |
| | | static jack_nframes_t (*JACK_jack_get_buffer_size) (jack_client_t *); |
| | | static jack_port_t * (*JACK_jack_port_register) (jack_client_t *, const char *, const char *, unsigned long, unsigned long); |
| | | static jack_port_t * (*JACK_jack_port_by_name) (jack_client_t *, const char *); |
| | | static const char * (*JACK_jack_port_name) (const jack_port_t *); |
| | | static const char * (*JACK_jack_port_type) (const jack_port_t *); |
| | | static int (*JACK_jack_connect) (jack_client_t *, const char *, const char *); |
| | | static int (*JACK_jack_set_process_callback) (jack_client_t *, JackProcessCallback, void *); |
| | | |
| | |
| | | SDL_JACK_SYM(jack_get_sample_rate); |
| | | SDL_JACK_SYM(jack_get_buffer_size); |
| | | SDL_JACK_SYM(jack_port_register); |
| | | SDL_JACK_SYM(jack_port_by_name); |
| | | SDL_JACK_SYM(jack_port_name); |
| | | SDL_JACK_SYM(jack_port_type); |
| | | SDL_JACK_SYM(jack_connect); |
| | | SDL_JACK_SYM(jack_set_process_callback); |
| | | return 0; |
| | |
| | | SDL_DestroySemaphore(this->hidden->iosem); |
| | | } |
| | | |
| | | if (this->hidden->devports) { |
| | | JACK_jack_free(this->hidden->devports); |
| | | } |
| | | |
| | | SDL_free(this->hidden->iobuffer); |
| | | } |
| | | |
| | |
| | | const JackProcessCallback callback = iscapture ? jackProcessCaptureCallback : jackProcessPlaybackCallback; |
| | | const char *sdlportstr = iscapture ? "input" : "output"; |
| | | const char **devports = NULL; |
| | | int *audio_ports; |
| | | jack_client_t *client = NULL; |
| | | jack_status_t status; |
| | | int channels = 0; |
| | | int ports = 0; |
| | | int i; |
| | | |
| | | /* Initialize all variables that we clean on shutdown */ |
| | |
| | | } |
| | | |
| | | devports = JACK_jack_get_ports(client, NULL, NULL, JackPortIsPhysical | sysportflags); |
| | | this->hidden->devports = devports; |
| | | if (!devports || !devports[0]) { |
| | | return SDL_SetError("No physical JACK ports available"); |
| | | } |
| | | |
| | | while (devports[++channels]) { |
| | | while (devports[++ports]) { |
| | | /* spin to count devports */ |
| | | } |
| | | |
| | | /* Filter out non-audio ports */ |
| | | audio_ports = SDL_calloc(ports, sizeof *audio_ports); |
| | | for (i = 0; i < ports; i++) { |
| | | const jack_port_t *dport = JACK_jack_port_by_name(client, devports[i]); |
| | | const char *type = JACK_jack_port_type(dport); |
| | | const int len = SDL_strlen(type); |
| | | /* See if type ends with "audio" */ |
| | | if (len >= 5 && !SDL_memcmp(type+len-5, "audio", 5)) { |
| | | audio_ports[channels++] = i; |
| | | } |
| | | } |
| | | if (channels == 0) { |
| | | return SDL_SetError("No physical JACK ports available"); |
| | | } |
| | | |
| | | |
| | | /* !!! FIXME: docs say about buffer size: "This size may change, clients that depend on it must register a bufsize_callback so they will be notified if it does." */ |
| | | |
| | |
| | | /* once activated, we can connect all the ports. */ |
| | | for (i = 0; i < channels; i++) { |
| | | const char *sdlport = JACK_jack_port_name(this->hidden->sdlports[i]); |
| | | const char *srcport = iscapture ? devports[i] : sdlport; |
| | | const char *dstport = iscapture ? sdlport : devports[i]; |
| | | const char *srcport = iscapture ? devports[audio_ports[i]] : sdlport; |
| | | const char *dstport = iscapture ? sdlport : devports[audio_ports[i]]; |
| | | if (JACK_jack_connect(client, srcport, dstport) != 0) { |
| | | return SDL_SetError("Couldn't connect JACK ports: %s => %s", srcport, dstport); |
| | | } |
| | | } |
| | | |
| | | /* don't need these anymore. */ |
| | | this->hidden->devports = NULL; |
| | | JACK_jack_free(devports); |
| | | SDL_free(audio_ports); |
| | | |
| | | /* We're ready to rock and roll. :-) */ |
| | | return 0; |
| | |
| | | jack_client_t *client; |
| | | SDL_sem *iosem; |
| | | float *iobuffer; |
| | | const char **devports; |
| | | jack_port_t **sdlports; |
| | | }; |
| | | |
| | |
| | | WASAPI_PlatformThreadDeinit(this); |
| | | } |
| | | |
| | | void |
| | | WASAPI_BeginLoopIteration(_THIS) |
| | | { |
| | | /* no-op. */ |
| | | } |
| | | |
| | | static void |
| | | WASAPI_Deinitialize(void) |
| | | { |
| | |
| | | } |
| | | |
| | | |
| | | typedef struct |
| | | { |
| | | LPWSTR devid; |
| | | char *devname; |
| | | } EndpointItem; |
| | | |
| | | static int sort_endpoints(const void *_a, const void *_b) |
| | | { |
| | | LPWSTR a = ((const EndpointItem *) _a)->devid; |
| | | LPWSTR b = ((const EndpointItem *) _b)->devid; |
| | | if (!a && b) { |
| | | return -1; |
| | | } else if (a && !b) { |
| | | return 1; |
| | | } |
| | | |
| | | while (SDL_TRUE) { |
| | | if (*a < *b) { |
| | | return -1; |
| | | } else if (*a > *b) { |
| | | return 1; |
| | | } else if (*a == 0) { |
| | | break; |
| | | } |
| | | a++; |
| | | b++; |
| | | } |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | static void |
| | | WASAPI_EnumerateEndpointsForFlow(const SDL_bool iscapture) |
| | | { |
| | | IMMDeviceCollection *collection = NULL; |
| | | EndpointItem *items; |
| | | UINT i, total; |
| | | |
| | | /* Note that WASAPI separates "adapter devices" from "audio endpoint devices" |
| | |
| | | return; |
| | | } |
| | | |
| | | items = (EndpointItem *) SDL_calloc(total, sizeof (EndpointItem)); |
| | | if (!items) { |
| | | return; /* oh well. */ |
| | | } |
| | | |
| | | for (i = 0; i < total; i++) { |
| | | EndpointItem *item = items + i; |
| | | IMMDevice *device = NULL; |
| | | if (SUCCEEDED(IMMDeviceCollection_Item(collection, i, &device))) { |
| | | LPWSTR devid = NULL; |
| | | if (SUCCEEDED(IMMDevice_GetId(device, &devid))) { |
| | | char *devname = GetWasapiDeviceName(device); |
| | | if (devname) { |
| | | WASAPI_AddDevice(iscapture, devname, devid); |
| | | SDL_free(devname); |
| | | } |
| | | CoTaskMemFree(devid); |
| | | if (SUCCEEDED(IMMDevice_GetId(device, &item->devid))) { |
| | | item->devname = GetWasapiDeviceName(device); |
| | | } |
| | | IMMDevice_Release(device); |
| | | } |
| | | } |
| | | |
| | | /* sort the list of devices by their guid so list is consistent between runs */ |
| | | SDL_qsort(items, total, sizeof (*items), sort_endpoints); |
| | | |
| | | /* Send the sorted list on to the SDL's higher level. */ |
| | | for (i = 0; i < total; i++) { |
| | | EndpointItem *item = items + i; |
| | | if ((item->devid) && (item->devname)) { |
| | | WASAPI_AddDevice(iscapture, item->devname, item->devid); |
| | | } |
| | | SDL_free(item->devname); |
| | | CoTaskMemFree(item->devid); |
| | | } |
| | | |
| | | SDL_free(items); |
| | | IMMDeviceCollection_Release(collection); |
| | | } |
| | | |
| | |
| | | { |
| | | /* not asynchronous. */ |
| | | SDL_assert(!"This function should have only been called on WinRT."); |
| | | } |
| | | |
| | | void |
| | | WASAPI_BeginLoopIteration(_THIS) |
| | | { |
| | | /* no-op. */ |
| | | } |
| | | |
| | | #endif /* SDL_AUDIO_DRIVER_WASAPI && !defined(__WINRT__) */ |
| | |
| | | HRESULT |
| | | SDL_WasapiActivationHandler::ActivateCompleted(IActivateAudioInterfaceAsyncOperation *async) |
| | | { |
| | | HRESULT result = S_OK; |
| | | IUnknown *iunknown = nullptr; |
| | | const HRESULT ret = async->GetActivateResult(&result, &iunknown); |
| | | |
| | | if (SUCCEEDED(ret) && SUCCEEDED(result)) { |
| | | iunknown->QueryInterface(IID_PPV_ARGS(&device->hidden->client)); |
| | | if (device->hidden->client) { |
| | | // Just set a flag, since we're probably in a different thread. We'll pick it up and init everything on our own thread to prevent races. |
| | | SDL_AtomicSet(&device->hidden->just_activated, 1); |
| | | } |
| | | } |
| | | |
| | | WASAPI_UnrefDevice(device); |
| | | |
| | | return S_OK; |
| | | } |
| | | |
| | |
| | | IActivateAudioInterfaceAsyncOperation *async = nullptr; |
| | | const HRESULT ret = ActivateAudioInterfaceAsync(devid, __uuidof(IAudioClient), nullptr, handler.Get(), &async); |
| | | |
| | | if (FAILED(ret) || async == nullptr) { |
| | | if (async != nullptr) { |
| | | async->Release(); |
| | | } |
| | | |
| | | if (FAILED(ret)) { |
| | | handler.Get()->Release(); |
| | | WASAPI_UnrefDevice(_this); |
| | | return WIN_SetErrorFromHRESULT("WASAPI can't activate requested audio endpoint", ret); |
| | | } |
| | | |
| | | return 0; |
| | | /* Spin until the async operation is complete. |
| | | * If we don't PrepDevice before leaving this function, the bug list gets LONG: |
| | | * - device.spec is not filled with the correct information |
| | | * - The 'obtained' spec will be wrong for ALLOW_CHANGE properties |
| | | * - SDL_AudioStreams will/will not be allocated at the right time |
| | | * - SDL_assert(device->callbackspec.size == device->spec.size) will fail |
| | | * - When the assert is ignored, skipping or a buffer overflow will occur |
| | | */ |
| | | while (!SDL_AtomicCAS(&_this->hidden->just_activated, 1, 0)) { |
| | | SDL_Delay(1); |
| | | } |
| | | |
| | | void |
| | | WASAPI_BeginLoopIteration(_THIS) |
| | | { |
| | | if (SDL_AtomicCAS(&_this->hidden->just_activated, 1, 0)) { |
| | | if (WASAPI_PrepDevice(_this, SDL_TRUE) == -1) { |
| | | SDL_OpenedAudioDeviceDisconnected(_this); |
| | | HRESULT activateRes = S_OK; |
| | | IUnknown *iunknown = nullptr; |
| | | const HRESULT getActivateRes = async->GetActivateResult(&activateRes, &iunknown); |
| | | async->Release(); |
| | | if (FAILED(getActivateRes)) { |
| | | return WIN_SetErrorFromHRESULT("Failed to get WASAPI activate result", getActivateRes); |
| | | } else if (FAILED(activateRes)) { |
| | | return WIN_SetErrorFromHRESULT("Failed to activate WASAPI device", activateRes); |
| | | } |
| | | |
| | | iunknown->QueryInterface(IID_PPV_ARGS(&_this->hidden->client)); |
| | | if (!_this->hidden->client) { |
| | | return SDL_SetError("Failed to query WASAPI client interface"); |
| | | } |
| | | |
| | | if (WASAPI_PrepDevice(_this, isrecovery) == -1) { |
| | | return -1; |
| | | } |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | void |
| | |
| | | #endif |
| | | |
| | | /* Create the audio buffer semaphore */ |
| | | this->hidden->audio_sem = |
| | | CreateSemaphore(NULL, iscapture ? 0 : NUM_BUFFERS - 1, NUM_BUFFERS, NULL); |
| | | this->hidden->audio_sem = CreateSemaphore(NULL, iscapture ? 0 : NUM_BUFFERS - 1, NUM_BUFFERS, NULL); |
| | | if (this->hidden->audio_sem == NULL) { |
| | | return SDL_SetError("Couldn't create semaphore"); |
| | | } |
| | |
| | | #define SDL_JAVA_CONTROLLER_INTERFACE(function) CONCAT1(SDL_JAVA_PREFIX, SDLControllerManager, function) |
| | | #define SDL_JAVA_INTERFACE_INPUT_CONNECTION(function) CONCAT1(SDL_JAVA_PREFIX, SDLInputConnection, function) |
| | | |
| | | /* Audio encoding definitions */ |
| | | #define ENCODING_PCM_8BIT 3 |
| | | #define ENCODING_PCM_16BIT 2 |
| | | #define ENCODING_PCM_FLOAT 4 |
| | | |
| | | /* Java class SDLActivity */ |
| | | JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(nativeSetupJNI)( |
| | |
| | | |
| | | JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(onNativeResize)( |
| | | JNIEnv* env, jclass jcls, |
| | | jint width, jint height, jint format, jfloat rate); |
| | | jint surfaceWidth, jint surfaceHeight, |
| | | jint deviceWidth, jint deviceHeight, jint format, jfloat rate); |
| | | |
| | | JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(onNativeSurfaceChanged)( |
| | | JNIEnv* env, jclass jcls); |
| | |
| | | |
| | | JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(onNativeMouse)( |
| | | JNIEnv* env, jclass jcls, |
| | | jint button, jint action, jfloat x, jfloat y); |
| | | jint button, jint action, jfloat x, jfloat y, jboolean relative); |
| | | |
| | | JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(onNativeAccel)( |
| | | JNIEnv* env, jclass jcls, |
| | |
| | | JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(nativeEnvironmentVariablesSet)( |
| | | JNIEnv* env, jclass cls); |
| | | |
| | | JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(onNativeOrientationChanged)( |
| | | JNIEnv* env, jclass cls, |
| | | jint orientation); |
| | | |
| | | /* Java class SDLInputConnection */ |
| | | JNIEXPORT void JNICALL SDL_JAVA_INTERFACE_INPUT_CONNECTION(nativeCommitText)( |
| | | JNIEnv* env, jclass cls, |
| | | jstring text, jint newCursorPosition); |
| | | |
| | | JNIEXPORT void JNICALL SDL_JAVA_INTERFACE_INPUT_CONNECTION(nativeGenerateScancodeForUnichar)( |
| | | JNIEnv* env, jclass cls, |
| | | jchar chUnicode); |
| | | |
| | | JNIEXPORT void JNICALL SDL_JAVA_INTERFACE_INPUT_CONNECTION(nativeSetComposingText)( |
| | | JNIEnv* env, jclass cls, |
| | |
| | | |
| | | JNIEXPORT jint JNICALL SDL_JAVA_CONTROLLER_INTERFACE(nativeAddJoystick)( |
| | | JNIEnv* env, jclass jcls, |
| | | jint device_id, jstring device_name, jstring device_desc, jint is_accelerometer, |
| | | jint nbuttons, jint naxes, jint nhats, jint nballs); |
| | | jint device_id, jstring device_name, jstring device_desc, jint vendor_id, jint product_id, |
| | | jboolean is_accelerometer, jint button_mask, jint naxes, jint nhats, jint nballs); |
| | | |
| | | JNIEXPORT jint JNICALL SDL_JAVA_CONTROLLER_INTERFACE(nativeRemoveJoystick)( |
| | | JNIEnv* env, jclass jcls, |
| | |
| | | /* #define DEBUG_JNI */ |
| | | |
| | | static void Android_JNI_ThreadDestroyed(void*); |
| | | static void checkJNIReady(void); |
| | | |
| | | /******************************************************************************* |
| | | This file links the Java side of Android with libsdl |
| | |
| | | static jmethodID midSetWindowStyle; |
| | | static jmethodID midSetOrientation; |
| | | static jmethodID midGetContext; |
| | | static jmethodID midIsTablet; |
| | | static jmethodID midIsAndroidTV; |
| | | static jmethodID midIsChromebook; |
| | | static jmethodID midIsDeXMode; |
| | | static jmethodID midManualBackButton; |
| | | static jmethodID midInputGetInputDeviceIds; |
| | | static jmethodID midSendMessage; |
| | | static jmethodID midShowTextInput; |
| | |
| | | static jmethodID midOpenAPKExpansionInputStream; |
| | | static jmethodID midGetManifestEnvironmentVariables; |
| | | static jmethodID midGetDisplayDPI; |
| | | static jmethodID midCreateCustomCursor; |
| | | static jmethodID midSetCustomCursor; |
| | | static jmethodID midSetSystemCursor; |
| | | static jmethodID midSupportsRelativeMouse; |
| | | static jmethodID midSetRelativeMouseEnabled; |
| | | |
| | | /* audio manager */ |
| | | static jclass mAudioManagerClass; |
| | | |
| | | /* method signatures */ |
| | | static jmethodID midAudioOpen; |
| | | static jmethodID midAudioWriteShortBuffer; |
| | | static jmethodID midAudioWriteByteBuffer; |
| | | static jmethodID midAudioWriteShortBuffer; |
| | | static jmethodID midAudioWriteFloatBuffer; |
| | | static jmethodID midAudioClose; |
| | | static jmethodID midCaptureOpen; |
| | | static jmethodID midCaptureReadShortBuffer; |
| | | static jmethodID midCaptureReadByteBuffer; |
| | | static jmethodID midCaptureReadShortBuffer; |
| | | static jmethodID midCaptureReadFloatBuffer; |
| | | static jmethodID midCaptureClose; |
| | | |
| | | /* controller manager */ |
| | |
| | | static jmethodID midPollInputDevices; |
| | | static jmethodID midPollHapticDevices; |
| | | static jmethodID midHapticRun; |
| | | static jmethodID midHapticStop; |
| | | |
| | | /* static fields */ |
| | | static jfieldID fidSeparateMouseAndTouch; |
| | |
| | | "setOrientation","(IIZLjava/lang/String;)V"); |
| | | midGetContext = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass, |
| | | "getContext","()Landroid/content/Context;"); |
| | | midIsTablet = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass, |
| | | "isTablet", "()Z"); |
| | | midIsAndroidTV = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass, |
| | | "isAndroidTV","()Z"); |
| | | midIsChromebook = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass, |
| | | "isChromebook", "()Z"); |
| | | midIsDeXMode = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass, |
| | | "isDeXMode", "()Z"); |
| | | midManualBackButton = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass, |
| | | "manualBackButton", "()V"); |
| | | midInputGetInputDeviceIds = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass, |
| | | "inputGetInputDeviceIds", "(I)[I"); |
| | | midSendMessage = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass, |
| | |
| | | "getManifestEnvironmentVariables", "()Z"); |
| | | |
| | | midGetDisplayDPI = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass, "getDisplayDPI", "()Landroid/util/DisplayMetrics;"); |
| | | midGetDisplayDPI = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass, "getDisplayDPI", "()Landroid/util/DisplayMetrics;"); |
| | | midCreateCustomCursor = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass, "createCustomCursor", "([IIIII)I"); |
| | | midSetCustomCursor = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass, "setCustomCursor", "(I)Z"); |
| | | midSetSystemCursor = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass, "setSystemCursor", "(I)Z"); |
| | | |
| | | midSupportsRelativeMouse = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass, "supportsRelativeMouse", "()Z"); |
| | | midSetRelativeMouseEnabled = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass, "setRelativeMouseEnabled", "(Z)Z"); |
| | | |
| | | |
| | | if (!midGetNativeSurface || |
| | | !midSetActivityTitle || !midSetWindowStyle || !midSetOrientation || !midGetContext || !midIsAndroidTV || !midInputGetInputDeviceIds || |
| | | !midSetActivityTitle || !midSetWindowStyle || !midSetOrientation || !midGetContext || !midIsTablet || !midIsAndroidTV || !midInputGetInputDeviceIds || |
| | | !midSendMessage || !midShowTextInput || !midIsScreenKeyboardShown || |
| | | !midClipboardSetText || !midClipboardGetText || !midClipboardHasText || |
| | | !midOpenAPKExpansionInputStream || !midGetManifestEnvironmentVariables|| !midGetDisplayDPI) { |
| | | !midOpenAPKExpansionInputStream || !midGetManifestEnvironmentVariables || !midGetDisplayDPI || |
| | | !midCreateCustomCursor || !midSetCustomCursor || !midSetSystemCursor || !midSupportsRelativeMouse || !midSetRelativeMouseEnabled || |
| | | !midIsChromebook || !midIsDeXMode || !midManualBackButton) { |
| | | __android_log_print(ANDROID_LOG_WARN, "SDL", "Missing some Java callbacks, do you have the latest version of SDLActivity.java?"); |
| | | } |
| | | |
| | |
| | | mAudioManagerClass = (jclass)((*mEnv)->NewGlobalRef(mEnv, cls)); |
| | | |
| | | midAudioOpen = (*mEnv)->GetStaticMethodID(mEnv, mAudioManagerClass, |
| | | "audioOpen", "(IZZI)I"); |
| | | midAudioWriteShortBuffer = (*mEnv)->GetStaticMethodID(mEnv, mAudioManagerClass, |
| | | "audioWriteShortBuffer", "([S)V"); |
| | | "audioOpen", "(IIII)[I"); |
| | | midAudioWriteByteBuffer = (*mEnv)->GetStaticMethodID(mEnv, mAudioManagerClass, |
| | | "audioWriteByteBuffer", "([B)V"); |
| | | midAudioWriteShortBuffer = (*mEnv)->GetStaticMethodID(mEnv, mAudioManagerClass, |
| | | "audioWriteShortBuffer", "([S)V"); |
| | | midAudioWriteFloatBuffer = (*mEnv)->GetStaticMethodID(mEnv, mAudioManagerClass, |
| | | "audioWriteFloatBuffer", "([F)V"); |
| | | midAudioClose = (*mEnv)->GetStaticMethodID(mEnv, mAudioManagerClass, |
| | | "audioClose", "()V"); |
| | | midCaptureOpen = (*mEnv)->GetStaticMethodID(mEnv, mAudioManagerClass, |
| | | "captureOpen", "(IZZI)I"); |
| | | midCaptureReadShortBuffer = (*mEnv)->GetStaticMethodID(mEnv, mAudioManagerClass, |
| | | "captureReadShortBuffer", "([SZ)I"); |
| | | "captureOpen", "(IIII)[I"); |
| | | midCaptureReadByteBuffer = (*mEnv)->GetStaticMethodID(mEnv, mAudioManagerClass, |
| | | "captureReadByteBuffer", "([BZ)I"); |
| | | midCaptureReadShortBuffer = (*mEnv)->GetStaticMethodID(mEnv, mAudioManagerClass, |
| | | "captureReadShortBuffer", "([SZ)I"); |
| | | midCaptureReadFloatBuffer = (*mEnv)->GetStaticMethodID(mEnv, mAudioManagerClass, |
| | | "captureReadFloatBuffer", "([FZ)I"); |
| | | midCaptureClose = (*mEnv)->GetStaticMethodID(mEnv, mAudioManagerClass, |
| | | "captureClose", "()V"); |
| | | |
| | | if (!midAudioOpen || !midAudioWriteShortBuffer || !midAudioWriteByteBuffer || !midAudioClose || |
| | | !midCaptureOpen || !midCaptureReadShortBuffer || !midCaptureReadByteBuffer || !midCaptureClose) { |
| | | if (!midAudioOpen || !midAudioWriteByteBuffer || !midAudioWriteShortBuffer || !midAudioWriteFloatBuffer || !midAudioClose || |
| | | !midCaptureOpen || !midCaptureReadByteBuffer || !midCaptureReadShortBuffer || !midCaptureReadFloatBuffer || !midCaptureClose) { |
| | | __android_log_print(ANDROID_LOG_WARN, "SDL", "Missing some Java callbacks, do you have the latest version of SDLAudioManager.java?"); |
| | | } |
| | | |
| | |
| | | midPollHapticDevices = (*mEnv)->GetStaticMethodID(mEnv, mControllerManagerClass, |
| | | "pollHapticDevices", "()V"); |
| | | midHapticRun = (*mEnv)->GetStaticMethodID(mEnv, mControllerManagerClass, |
| | | "hapticRun", "(II)V"); |
| | | "hapticRun", "(IFI)V"); |
| | | midHapticStop = (*mEnv)->GetStaticMethodID(mEnv, mControllerManagerClass, |
| | | "hapticStop", "(I)V"); |
| | | |
| | | if (!midPollInputDevices || !midPollHapticDevices || !midHapticRun) { |
| | | if (!midPollInputDevices || !midPollHapticDevices || !midHapticRun || !midHapticStop) { |
| | | __android_log_print(ANDROID_LOG_WARN, "SDL", "Missing some Java callbacks, do you have the latest version of SDLControllerManager.java?"); |
| | | } |
| | | |
| | |
| | | /* Resize */ |
| | | JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(onNativeResize)( |
| | | JNIEnv* env, jclass jcls, |
| | | jint width, jint height, jint format, jfloat rate) |
| | | jint surfaceWidth, jint surfaceHeight, |
| | | jint deviceWidth, jint deviceHeight, jint format, jfloat rate) |
| | | { |
| | | Android_SetScreenResolution(width, height, format, rate); |
| | | Android_SetScreenResolution(surfaceWidth, surfaceHeight, deviceWidth, deviceHeight, format, rate); |
| | | } |
| | | |
| | | JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(onNativeOrientationChanged)( |
| | | JNIEnv *env, jclass jcls, |
| | | jint orientation) |
| | | { |
| | | SDL_VideoDisplay *display = SDL_GetDisplay(0); |
| | | SDL_SendDisplayEvent(display, SDL_DISPLAYEVENT_ORIENTATION, orientation); |
| | | } |
| | | |
| | | /* Paddown */ |
| | |
| | | |
| | | JNIEXPORT jint JNICALL SDL_JAVA_CONTROLLER_INTERFACE(nativeAddJoystick)( |
| | | JNIEnv* env, jclass jcls, |
| | | jint device_id, jstring device_name, jstring device_desc, jint is_accelerometer, |
| | | jint nbuttons, jint naxes, jint nhats, jint nballs) |
| | | jint device_id, jstring device_name, jstring device_desc, |
| | | jint vendor_id, jint product_id, jboolean is_accelerometer, |
| | | jint button_mask, jint naxes, jint nhats, jint nballs) |
| | | { |
| | | int retval; |
| | | const char *name = (*env)->GetStringUTFChars(env, device_name, NULL); |
| | | const char *desc = (*env)->GetStringUTFChars(env, device_desc, NULL); |
| | | |
| | | retval = Android_AddJoystick(device_id, name, desc, (SDL_bool) is_accelerometer, nbuttons, naxes, nhats, nballs); |
| | | retval = Android_AddJoystick(device_id, name, desc, vendor_id, product_id, is_accelerometer ? SDL_TRUE : SDL_FALSE, button_mask, naxes, nhats, nballs); |
| | | |
| | | (*env)->ReleaseStringUTFChars(env, device_name, name); |
| | | (*env)->ReleaseStringUTFChars(env, device_desc, desc); |
| | |
| | | /* Mouse */ |
| | | JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(onNativeMouse)( |
| | | JNIEnv* env, jclass jcls, |
| | | jint button, jint action, jfloat x, jfloat y) |
| | | jint button, jint action, jfloat x, jfloat y, jboolean relative) |
| | | { |
| | | Android_OnMouse(button, action, x, y); |
| | | Android_OnMouse(button, action, x, y, relative); |
| | | } |
| | | |
| | | /* Accelerometer */ |
| | |
| | | /* |
| | | * Audio support |
| | | */ |
| | | static jboolean audioBuffer16Bit = JNI_FALSE; |
| | | static int audioBufferFormat = 0; |
| | | static jobject audioBuffer = NULL; |
| | | static void* audioBufferPinned = NULL; |
| | | static jboolean captureBuffer16Bit = JNI_FALSE; |
| | | static int captureBufferFormat = 0; |
| | | static jobject captureBuffer = NULL; |
| | | |
| | | int Android_JNI_OpenAudioDevice(int iscapture, int sampleRate, int is16Bit, int channelCount, int desiredBufferFrames) |
| | | int Android_JNI_OpenAudioDevice(int iscapture, SDL_AudioSpec *spec) |
| | | { |
| | | jboolean audioBufferStereo; |
| | | int audioBufferFrames; |
| | | int audioformat; |
| | | int numBufferFrames; |
| | | jobject jbufobj = NULL; |
| | | jobject result; |
| | | int *resultElements; |
| | | jboolean isCopy; |
| | | |
| | | JNIEnv *env = Android_JNI_GetEnv(); |
| | |
| | | } |
| | | Android_JNI_SetupThread(); |
| | | |
| | | audioBufferStereo = channelCount > 1; |
| | | switch (spec->format) { |
| | | case AUDIO_U8: |
| | | audioformat = ENCODING_PCM_8BIT; |
| | | break; |
| | | case AUDIO_S16: |
| | | audioformat = ENCODING_PCM_16BIT; |
| | | break; |
| | | case AUDIO_F32: |
| | | audioformat = ENCODING_PCM_FLOAT; |
| | | break; |
| | | default: |
| | | return SDL_SetError("Unsupported audio format: 0x%x", spec->format); |
| | | } |
| | | |
| | | if (iscapture) { |
| | | __android_log_print(ANDROID_LOG_VERBOSE, "SDL", "SDL audio: opening device for capture"); |
| | | captureBuffer16Bit = is16Bit; |
| | | if ((*env)->CallStaticIntMethod(env, mAudioManagerClass, midCaptureOpen, sampleRate, audioBuffer16Bit, audioBufferStereo, desiredBufferFrames) != 0) { |
| | | /* Error during audio initialization */ |
| | | __android_log_print(ANDROID_LOG_WARN, "SDL", "SDL audio: error on AudioRecord initialization!"); |
| | | return 0; |
| | | } |
| | | result = (*env)->CallStaticObjectMethod(env, mAudioManagerClass, midCaptureOpen, spec->freq, audioformat, spec->channels, spec->samples); |
| | | } else { |
| | | __android_log_print(ANDROID_LOG_VERBOSE, "SDL", "SDL audio: opening device for output"); |
| | | audioBuffer16Bit = is16Bit; |
| | | if ((*env)->CallStaticIntMethod(env, mAudioManagerClass, midAudioOpen, sampleRate, audioBuffer16Bit, audioBufferStereo, desiredBufferFrames) != 0) { |
| | | /* Error during audio initialization */ |
| | | __android_log_print(ANDROID_LOG_WARN, "SDL", "SDL audio: error on AudioTrack initialization!"); |
| | | return 0; |
| | | result = (*env)->CallStaticObjectMethod(env, mAudioManagerClass, midAudioOpen, spec->freq, audioformat, spec->channels, spec->samples); |
| | | } |
| | | if (result == NULL) { |
| | | /* Error during audio initialization, error printed from Java */ |
| | | return SDL_SetError("Java-side initialization failed"); |
| | | } |
| | | |
| | | if ((*env)->GetArrayLength(env, (jintArray)result) != 4) { |
| | | return SDL_SetError("Unexpected results from Java, expected 4, got %d", (*env)->GetArrayLength(env, (jintArray)result)); |
| | | } |
| | | isCopy = JNI_FALSE; |
| | | resultElements = (*env)->GetIntArrayElements(env, (jintArray)result, &isCopy); |
| | | spec->freq = resultElements[0]; |
| | | audioformat = resultElements[1]; |
| | | switch (audioformat) { |
| | | case ENCODING_PCM_8BIT: |
| | | spec->format = AUDIO_U8; |
| | | break; |
| | | case ENCODING_PCM_16BIT: |
| | | spec->format = AUDIO_S16; |
| | | break; |
| | | case ENCODING_PCM_FLOAT: |
| | | spec->format = AUDIO_F32; |
| | | break; |
| | | default: |
| | | return SDL_SetError("Unexpected audio format from Java: %d\n", audioformat); |
| | | } |
| | | spec->channels = resultElements[2]; |
| | | spec->samples = resultElements[3]; |
| | | (*env)->ReleaseIntArrayElements(env, (jintArray)result, resultElements, JNI_ABORT); |
| | | (*env)->DeleteLocalRef(env, result); |
| | | |
| | | /* Allocating the audio buffer from the Java side and passing it as the return value for audioInit no longer works on |
| | | * Android >= 4.2 due to a "stale global reference" error. So now we allocate this buffer directly from this side. */ |
| | | |
| | | if (is16Bit) { |
| | | jshortArray audioBufferLocal = (*env)->NewShortArray(env, desiredBufferFrames * (audioBufferStereo ? 2 : 1)); |
| | | switch (audioformat) { |
| | | case ENCODING_PCM_8BIT: |
| | | { |
| | | jbyteArray audioBufferLocal = (*env)->NewByteArray(env, spec->samples * spec->channels); |
| | | if (audioBufferLocal) { |
| | | jbufobj = (*env)->NewGlobalRef(env, audioBufferLocal); |
| | | (*env)->DeleteLocalRef(env, audioBufferLocal); |
| | | } |
| | | } |
| | | else { |
| | | jbyteArray audioBufferLocal = (*env)->NewByteArray(env, desiredBufferFrames * (audioBufferStereo ? 2 : 1)); |
| | | break; |
| | | case ENCODING_PCM_16BIT: |
| | | { |
| | | jshortArray audioBufferLocal = (*env)->NewShortArray(env, spec->samples * spec->channels); |
| | | if (audioBufferLocal) { |
| | | jbufobj = (*env)->NewGlobalRef(env, audioBufferLocal); |
| | | (*env)->DeleteLocalRef(env, audioBufferLocal); |
| | | } |
| | | } |
| | | break; |
| | | case ENCODING_PCM_FLOAT: |
| | | { |
| | | jfloatArray audioBufferLocal = (*env)->NewFloatArray(env, spec->samples * spec->channels); |
| | | if (audioBufferLocal) { |
| | | jbufobj = (*env)->NewGlobalRef(env, audioBufferLocal); |
| | | (*env)->DeleteLocalRef(env, audioBufferLocal); |
| | | } |
| | | } |
| | | break; |
| | | default: |
| | | return SDL_SetError("Unexpected audio format from Java: %d\n", audioformat); |
| | | } |
| | | |
| | | if (jbufobj == NULL) { |
| | | __android_log_print(ANDROID_LOG_WARN, "SDL", "SDL audio: could not allocate an audio buffer!"); |
| | | return 0; |
| | | __android_log_print(ANDROID_LOG_WARN, "SDL", "SDL audio: could not allocate an audio buffer"); |
| | | return SDL_OutOfMemory(); |
| | | } |
| | | |
| | | if (iscapture) { |
| | | captureBufferFormat = audioformat; |
| | | captureBuffer = jbufobj; |
| | | } else { |
| | | audioBufferFormat = audioformat; |
| | | audioBuffer = jbufobj; |
| | | } |
| | | numBufferFrames = (*env)->GetArrayLength(env, (jarray)jbufobj); |
| | | |
| | | if (!iscapture) { |
| | | isCopy = JNI_FALSE; |
| | | |
| | | if (is16Bit) { |
| | | if (!iscapture) { |
| | | audioBufferPinned = (*env)->GetShortArrayElements(env, (jshortArray)audioBuffer, &isCopy); |
| | | } |
| | | audioBufferFrames = (*env)->GetArrayLength(env, (jshortArray)audioBuffer); |
| | | } else { |
| | | if (!iscapture) { |
| | | switch (audioformat) { |
| | | case ENCODING_PCM_8BIT: |
| | | audioBufferPinned = (*env)->GetByteArrayElements(env, (jbyteArray)audioBuffer, &isCopy); |
| | | break; |
| | | case ENCODING_PCM_16BIT: |
| | | audioBufferPinned = (*env)->GetShortArrayElements(env, (jshortArray)audioBuffer, &isCopy); |
| | | break; |
| | | case ENCODING_PCM_FLOAT: |
| | | audioBufferPinned = (*env)->GetFloatArrayElements(env, (jfloatArray)audioBuffer, &isCopy); |
| | | break; |
| | | default: |
| | | return SDL_SetError("Unexpected audio format from Java: %d\n", audioformat); |
| | | } |
| | | audioBufferFrames = (*env)->GetArrayLength(env, (jbyteArray)audioBuffer); |
| | | } |
| | | |
| | | if (audioBufferStereo) { |
| | | audioBufferFrames /= 2; |
| | | } |
| | | |
| | | return audioBufferFrames; |
| | | return 0; |
| | | } |
| | | |
| | | int Android_JNI_GetDisplayDPI(float *ddpi, float *xdpi, float *ydpi) |
| | |
| | | { |
| | | JNIEnv *mAudioEnv = Android_JNI_GetEnv(); |
| | | |
| | | if (audioBuffer16Bit) { |
| | | (*mAudioEnv)->ReleaseShortArrayElements(mAudioEnv, (jshortArray)audioBuffer, (jshort *)audioBufferPinned, JNI_COMMIT); |
| | | (*mAudioEnv)->CallStaticVoidMethod(mAudioEnv, mAudioManagerClass, midAudioWriteShortBuffer, (jshortArray)audioBuffer); |
| | | } else { |
| | | switch (audioBufferFormat) { |
| | | case ENCODING_PCM_8BIT: |
| | | (*mAudioEnv)->ReleaseByteArrayElements(mAudioEnv, (jbyteArray)audioBuffer, (jbyte *)audioBufferPinned, JNI_COMMIT); |
| | | (*mAudioEnv)->CallStaticVoidMethod(mAudioEnv, mAudioManagerClass, midAudioWriteByteBuffer, (jbyteArray)audioBuffer); |
| | | break; |
| | | case ENCODING_PCM_16BIT: |
| | | (*mAudioEnv)->ReleaseShortArrayElements(mAudioEnv, (jshortArray)audioBuffer, (jshort *)audioBufferPinned, JNI_COMMIT); |
| | | (*mAudioEnv)->CallStaticVoidMethod(mAudioEnv, mAudioManagerClass, midAudioWriteShortBuffer, (jshortArray)audioBuffer); |
| | | break; |
| | | case ENCODING_PCM_FLOAT: |
| | | (*mAudioEnv)->ReleaseFloatArrayElements(mAudioEnv, (jfloatArray)audioBuffer, (jfloat *)audioBufferPinned, JNI_COMMIT); |
| | | (*mAudioEnv)->CallStaticVoidMethod(mAudioEnv, mAudioManagerClass, midAudioWriteFloatBuffer, (jfloatArray)audioBuffer); |
| | | break; |
| | | default: |
| | | __android_log_print(ANDROID_LOG_WARN, "SDL", "SDL audio: unhandled audio buffer format"); |
| | | break; |
| | | } |
| | | |
| | | /* JNI_COMMIT means the changes are committed to the VM but the buffer remains pinned */ |
| | |
| | | jboolean isCopy = JNI_FALSE; |
| | | jint br; |
| | | |
| | | if (captureBuffer16Bit) { |
| | | SDL_assert((*env)->GetArrayLength(env, (jshortArray)captureBuffer) == (buflen / 2)); |
| | | br = (*env)->CallStaticIntMethod(env, mAudioManagerClass, midCaptureReadShortBuffer, (jshortArray)captureBuffer, JNI_TRUE); |
| | | if (br > 0) { |
| | | jshort *ptr = (*env)->GetShortArrayElements(env, (jshortArray)captureBuffer, &isCopy); |
| | | br *= 2; |
| | | SDL_memcpy(buffer, ptr, br); |
| | | (*env)->ReleaseShortArrayElements(env, (jshortArray)captureBuffer, (jshort *)ptr, JNI_ABORT); |
| | | } |
| | | } else { |
| | | switch (captureBufferFormat) { |
| | | case ENCODING_PCM_8BIT: |
| | | SDL_assert((*env)->GetArrayLength(env, (jshortArray)captureBuffer) == buflen); |
| | | br = (*env)->CallStaticIntMethod(env, mAudioManagerClass, midCaptureReadByteBuffer, (jbyteArray)captureBuffer, JNI_TRUE); |
| | | if (br > 0) { |
| | |
| | | SDL_memcpy(buffer, ptr, br); |
| | | (*env)->ReleaseByteArrayElements(env, (jbyteArray)captureBuffer, (jbyte *)ptr, JNI_ABORT); |
| | | } |
| | | break; |
| | | case ENCODING_PCM_16BIT: |
| | | SDL_assert((*env)->GetArrayLength(env, (jshortArray)captureBuffer) == (buflen / sizeof(Sint16))); |
| | | br = (*env)->CallStaticIntMethod(env, mAudioManagerClass, midCaptureReadShortBuffer, (jshortArray)captureBuffer, JNI_TRUE); |
| | | if (br > 0) { |
| | | jshort *ptr = (*env)->GetShortArrayElements(env, (jshortArray)captureBuffer, &isCopy); |
| | | br *= sizeof(Sint16); |
| | | SDL_memcpy(buffer, ptr, br); |
| | | (*env)->ReleaseShortArrayElements(env, (jshortArray)captureBuffer, (jshort *)ptr, JNI_ABORT); |
| | | } |
| | | |
| | | return (int) br; |
| | | break; |
| | | case ENCODING_PCM_FLOAT: |
| | | SDL_assert((*env)->GetArrayLength(env, (jfloatArray)captureBuffer) == (buflen / sizeof(float))); |
| | | br = (*env)->CallStaticIntMethod(env, mAudioManagerClass, midCaptureReadFloatBuffer, (jfloatArray)captureBuffer, JNI_TRUE); |
| | | if (br > 0) { |
| | | jfloat *ptr = (*env)->GetFloatArrayElements(env, (jfloatArray)captureBuffer, &isCopy); |
| | | br *= sizeof(float); |
| | | SDL_memcpy(buffer, ptr, br); |
| | | (*env)->ReleaseFloatArrayElements(env, (jfloatArray)captureBuffer, (jfloat *)ptr, JNI_ABORT); |
| | | } |
| | | break; |
| | | default: |
| | | __android_log_print(ANDROID_LOG_WARN, "SDL", "SDL audio: unhandled capture buffer format"); |
| | | break; |
| | | } |
| | | return br; |
| | | } |
| | | |
| | | void Android_JNI_FlushCapturedAudio(void) |
| | | { |
| | | JNIEnv *env = Android_JNI_GetEnv(); |
| | | #if 0 /* !!! FIXME: this needs API 23, or it'll do blocking reads and never end. */ |
| | | if (captureBuffer16Bit) { |
| | | const jint len = (*env)->GetArrayLength(env, (jshortArray)captureBuffer); |
| | | while ((*env)->CallStaticIntMethod(env, mActivityClass, midCaptureReadShortBuffer, (jshortArray)captureBuffer, JNI_FALSE) == len) { /* spin */ } |
| | | } else { |
| | | switch (captureBufferFormat) { |
| | | case ENCODING_PCM_8BIT: |
| | | { |
| | | const jint len = (*env)->GetArrayLength(env, (jbyteArray)captureBuffer); |
| | | while ((*env)->CallStaticIntMethod(env, mActivityClass, midCaptureReadByteBuffer, (jbyteArray)captureBuffer, JNI_FALSE) == len) { /* spin */ } |
| | | } |
| | | break; |
| | | case ENCODING_PCM_16BIT: |
| | | { |
| | | const jint len = (*env)->GetArrayLength(env, (jshortArray)captureBuffer); |
| | | while ((*env)->CallStaticIntMethod(env, mActivityClass, midCaptureReadShortBuffer, (jshortArray)captureBuffer, JNI_FALSE) == len) { /* spin */ } |
| | | } |
| | | break; |
| | | case ENCODING_PCM_FLOAT: |
| | | { |
| | | const jint len = (*env)->GetArrayLength(env, (jfloatArray)captureBuffer); |
| | | while ((*env)->CallStaticIntMethod(env, mActivityClass, midCaptureReadFloatBuffer, (jfloatArray)captureBuffer, JNI_FALSE) == len) { /* spin */ } |
| | | } |
| | | break; |
| | | default: |
| | | __android_log_print(ANDROID_LOG_WARN, "SDL", "SDL audio: flushing unhandled capture buffer format"); |
| | | break; |
| | | } |
| | | #else |
| | | if (captureBuffer16Bit) { |
| | | (*env)->CallStaticIntMethod(env, mAudioManagerClass, midCaptureReadShortBuffer, (jshortArray)captureBuffer, JNI_FALSE); |
| | | } else { |
| | | switch (captureBufferFormat) { |
| | | case ENCODING_PCM_8BIT: |
| | | (*env)->CallStaticIntMethod(env, mAudioManagerClass, midCaptureReadByteBuffer, (jbyteArray)captureBuffer, JNI_FALSE); |
| | | break; |
| | | case ENCODING_PCM_16BIT: |
| | | (*env)->CallStaticIntMethod(env, mAudioManagerClass, midCaptureReadShortBuffer, (jshortArray)captureBuffer, JNI_FALSE); |
| | | break; |
| | | case ENCODING_PCM_FLOAT: |
| | | (*env)->CallStaticIntMethod(env, mAudioManagerClass, midCaptureReadFloatBuffer, (jfloatArray)captureBuffer, JNI_FALSE); |
| | | break; |
| | | default: |
| | | __android_log_print(ANDROID_LOG_WARN, "SDL", "SDL audio: flushing unhandled capture buffer format"); |
| | | break; |
| | | } |
| | | #endif |
| | | } |
| | |
| | | (*env)->CallStaticVoidMethod(env, mControllerManagerClass, midPollHapticDevices); |
| | | } |
| | | |
| | | void Android_JNI_HapticRun(int device_id, int length) |
| | | void Android_JNI_HapticRun(int device_id, float intensity, int length) |
| | | { |
| | | JNIEnv *env = Android_JNI_GetEnv(); |
| | | (*env)->CallStaticVoidMethod(env, mControllerManagerClass, midHapticRun, device_id, length); |
| | | (*env)->CallStaticVoidMethod(env, mControllerManagerClass, midHapticRun, device_id, intensity, length); |
| | | } |
| | | |
| | | void Android_JNI_HapticStop(int device_id) |
| | | { |
| | | JNIEnv *env = Android_JNI_GetEnv(); |
| | | (*env)->CallStaticVoidMethod(env, mControllerManagerClass, midHapticStop, device_id); |
| | | } |
| | | |
| | | /* See SDLActivity.java for constants. */ |
| | | #define COMMAND_SET_KEEP_SCREEN_ON 5 |
| | |
| | | return (*env)->CallStaticObjectMethod(env, mActivityClass, midGetContext); |
| | | } |
| | | |
| | | SDL_bool SDL_IsAndroidTablet(void) |
| | | { |
| | | JNIEnv *env = Android_JNI_GetEnv(); |
| | | return (*env)->CallStaticBooleanMethod(env, mActivityClass, midIsTablet); |
| | | } |
| | | |
| | | SDL_bool SDL_IsAndroidTV(void) |
| | | { |
| | | JNIEnv *env = Android_JNI_GetEnv(); |
| | | return (*env)->CallStaticBooleanMethod(env, mActivityClass, midIsAndroidTV); |
| | | } |
| | | |
| | | SDL_bool SDL_IsChromebook(void) |
| | | { |
| | | JNIEnv *env = Android_JNI_GetEnv(); |
| | | return (*env)->CallStaticBooleanMethod(env, mActivityClass, midIsChromebook); |
| | | } |
| | | |
| | | SDL_bool SDL_IsDeXMode(void) |
| | | { |
| | | JNIEnv *env = Android_JNI_GetEnv(); |
| | | return (*env)->CallStaticBooleanMethod(env, mActivityClass, midIsDeXMode); |
| | | } |
| | | |
| | | void SDL_AndroidBackButton(void) |
| | | { |
| | | JNIEnv *env = Android_JNI_GetEnv(); |
| | | return (*env)->CallStaticVoidMethod(env, mActivityClass, midManualBackButton); |
| | | } |
| | | |
| | | const char * SDL_AndroidGetInternalStoragePath(void) |
| | |
| | | } |
| | | } |
| | | |
| | | int Android_JNI_CreateCustomCursor(SDL_Surface *surface, int hot_x, int hot_y) |
| | | { |
| | | JNIEnv *mEnv = Android_JNI_GetEnv(); |
| | | int custom_cursor = 0; |
| | | jintArray pixels; |
| | | pixels = (*mEnv)->NewIntArray(mEnv, surface->w * surface->h); |
| | | if (pixels) { |
| | | (*mEnv)->SetIntArrayRegion(mEnv, pixels, 0, surface->w * surface->h, (int *)surface->pixels); |
| | | custom_cursor = (*mEnv)->CallStaticIntMethod(mEnv, mActivityClass, midCreateCustomCursor, pixels, surface->w, surface->h, hot_x, hot_y); |
| | | (*mEnv)->DeleteLocalRef(mEnv, pixels); |
| | | } else { |
| | | SDL_OutOfMemory(); |
| | | } |
| | | return custom_cursor; |
| | | } |
| | | |
| | | |
| | | SDL_bool Android_JNI_SetCustomCursor(int cursorID) |
| | | { |
| | | JNIEnv *mEnv = Android_JNI_GetEnv(); |
| | | return (*mEnv)->CallStaticBooleanMethod(mEnv, mActivityClass, midSetCustomCursor, cursorID); |
| | | } |
| | | |
| | | SDL_bool Android_JNI_SetSystemCursor(int cursorID) |
| | | { |
| | | JNIEnv *mEnv = Android_JNI_GetEnv(); |
| | | return (*mEnv)->CallStaticBooleanMethod(mEnv, mActivityClass, midSetSystemCursor, cursorID); |
| | | } |
| | | |
| | | SDL_bool Android_JNI_SupportsRelativeMouse() |
| | | { |
| | | JNIEnv *mEnv = Android_JNI_GetEnv(); |
| | | return (*mEnv)->CallStaticBooleanMethod(mEnv, mActivityClass, midSupportsRelativeMouse); |
| | | } |
| | | |
| | | SDL_bool Android_JNI_SetRelativeMouseEnabled(SDL_bool enabled) |
| | | { |
| | | JNIEnv *mEnv = Android_JNI_GetEnv(); |
| | | return (*mEnv)->CallStaticBooleanMethod(mEnv, mActivityClass, midSetRelativeMouseEnabled, (enabled == 1)); |
| | | } |
| | | |
| | | |
| | | #endif /* __ANDROID__ */ |
| | | |
| | | /* vi: set ts=4 sw=4 expandtab: */ |
| | |
| | | 3. This notice may not be removed or altered from any source distribution. |
| | | */ |
| | | #include "../../SDL_internal.h" |
| | | #include "SDL_system.h" |
| | | |
| | | /* Set up for C function definitions, even when using C++ */ |
| | | #ifdef __cplusplus |
| | |
| | | #include <EGL/eglplatform.h> |
| | | #include <android/native_window_jni.h> |
| | | |
| | | #include "SDL_audio.h" |
| | | #include "SDL_rect.h" |
| | | |
| | | /* Interface from the SDL library into the Android Java activity */ |
| | |
| | | extern int Android_JNI_GetDisplayDPI(float *ddpi, float *xdpi, float *ydpi); |
| | | |
| | | /* Audio support */ |
| | | extern int Android_JNI_OpenAudioDevice(int iscapture, int sampleRate, int is16Bit, int channelCount, int desiredBufferFrames); |
| | | extern int Android_JNI_OpenAudioDevice(int iscapture, SDL_AudioSpec *spec); |
| | | extern void* Android_JNI_GetAudioBuffer(void); |
| | | extern void Android_JNI_WriteAudioBuffer(void); |
| | | extern int Android_JNI_CaptureAudioBuffer(void *buffer, int buflen); |
| | | extern void Android_JNI_FlushCapturedAudio(void); |
| | | extern void Android_JNI_CloseAudioDevice(const int iscapture); |
| | | |
| | | /* Detecting device type */ |
| | | extern SDL_bool Android_IsDeXMode(); |
| | | extern SDL_bool Android_IsChromebook(); |
| | | |
| | | #include "SDL_rwops.h" |
| | | |
| | |
| | | |
| | | /* Haptic support */ |
| | | void Android_JNI_PollHapticDevices(void); |
| | | void Android_JNI_HapticRun(int device_id, int length); |
| | | void Android_JNI_HapticRun(int device_id, float intensity, int length); |
| | | void Android_JNI_HapticStop(int device_id); |
| | | |
| | | /* Video */ |
| | | void Android_JNI_SuspendScreenSaver(SDL_bool suspend); |
| | | |
| | | /* Touch support */ |
| | | int Android_JNI_GetTouchDeviceIds(int **ids); |
| | | int Android_JNI_InitTouch(void); |
| | | void Android_JNI_SetSeparateMouseAndTouch(SDL_bool new_value); |
| | | int Android_JNI_GetTouchDeviceIds(int **ids); |
| | | |
| | | /* Threads */ |
| | | #include <jni.h> |
| | |
| | | #include "SDL_messagebox.h" |
| | | int Android_JNI_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid); |
| | | |
| | | /* Cursor support */ |
| | | int Android_JNI_CreateCustomCursor(SDL_Surface *surface, int hot_x, int hot_y); |
| | | SDL_bool Android_JNI_SetCustomCursor(int cursorID); |
| | | SDL_bool Android_JNI_SetSystemCursor(int cursorID); |
| | | |
| | | /* Relative mouse support */ |
| | | SDL_bool Android_JNI_SupportsRelativeMouse(void); |
| | | SDL_bool Android_JNI_SetRelativeMouseEnabled(SDL_bool enabled); |
| | | |
| | | |
| | | SDL_bool SDL_IsAndroidTablet(void); |
| | | SDL_bool SDL_IsAndroidTV(void); |
| | | SDL_bool SDL_IsChromebook(void); |
| | | SDL_bool SDL_IsDeXMode(void); |
| | | |
| | | /* Ends C function definitions when using C++ */ |
| | | #ifdef __cplusplus |
| | | /* *INDENT-OFF* */ |
| | |
| | | if (conn) { |
| | | DBusMessage *msg = dbus.message_new_method_call(node, path, interface, method); |
| | | if (msg) { |
| | | int firstarg = va_arg(ap, int); |
| | | int firstarg; |
| | | va_list ap_reply; |
| | | va_copy(ap_reply, ap); /* copy the arg list so we don't compete with D-Bus for it */ |
| | | firstarg = va_arg(ap, int); |
| | | if ((firstarg == DBUS_TYPE_INVALID) || dbus.message_append_args_valist(msg, firstarg, ap)) { |
| | | DBusMessage *reply = dbus.connection_send_with_reply_and_block(conn, msg, 300, NULL); |
| | | if (reply) { |
| | | firstarg = va_arg(ap, int); |
| | | if ((firstarg == DBUS_TYPE_INVALID) || dbus.message_get_args_valist(reply, NULL, firstarg, ap)) { |
| | | /* skip any input args, get to output args. */ |
| | | while ((firstarg = va_arg(ap_reply, int)) != DBUS_TYPE_INVALID) { |
| | | /* we assume D-Bus already validated all this. */ |
| | | { void *dumpptr = va_arg(ap_reply, void*); (void) dumpptr; } |
| | | if (firstarg == DBUS_TYPE_ARRAY) { |
| | | { const int dumpint = va_arg(ap_reply, int); (void) dumpint; } |
| | | } |
| | | } |
| | | firstarg = va_arg(ap_reply, int); |
| | | if ((firstarg == DBUS_TYPE_INVALID) || dbus.message_get_args_valist(reply, NULL, firstarg, ap_reply)) { |
| | | retval = SDL_TRUE; |
| | | } |
| | | dbus.message_unref(reply); |
| | | } |
| | | } |
| | | va_end(ap_reply); |
| | | dbus.message_unref(msg); |
| | | } |
| | | } |
| | |
| | | DBusConnection * (*connection_open_private)(const char *, DBusError *); |
| | | void (*connection_set_exit_on_disconnect)(DBusConnection *, dbus_bool_t); |
| | | dbus_bool_t (*connection_get_is_connected)(DBusConnection *); |
| | | dbus_bool_t (*connection_add_filter)(DBusConnection *, DBusHandleMessageFunction, |
| | | void *, DBusFreeFunction); |
| | | dbus_bool_t (*connection_add_filter)(DBusConnection *, DBusHandleMessageFunction, void *, DBusFreeFunction); |
| | | dbus_bool_t (*connection_try_register_object_path)(DBusConnection *, const char *, |
| | | const DBusObjectPathVTable *, void *, DBusError *); |
| | | dbus_bool_t (*connection_send)(DBusConnection *, DBusMessage *, dbus_uint32_t *); |
| | |
| | | SDL_EVDEV_keyboard_state *kbd; |
| | | } SDL_EVDEV_PrivateData; |
| | | |
| | | #undef _THIS |
| | | #define _THIS SDL_EVDEV_PrivateData *_this |
| | | static _THIS = NULL; |
| | | |
| | |
| | | #include "../../SDL_internal.h" |
| | | |
| | | #include "SDL_evdev_kbd.h" |
| | | #include "SDL_hints.h" |
| | | |
| | | #ifdef SDL_INPUT_LINUXKD |
| | | |
| | |
| | | #include <linux/keyboard.h> |
| | | #include <linux/vt.h> |
| | | #include <linux/tiocl.h> /* for TIOCL_GETSHIFTSTATE */ |
| | | |
| | | #include <signal.h> |
| | | |
| | | #include "../../events/SDL_events_c.h" |
| | | #include "SDL_evdev_kbd_default_accents.h" |
| | |
| | | return 0; |
| | | } |
| | | |
| | | static SDL_EVDEV_keyboard_state * kbd_cleanup_state = NULL; |
| | | static int kbd_cleanup_sigactions_installed = 0; |
| | | static int kbd_cleanup_atexit_installed = 0; |
| | | |
| | | static struct sigaction old_sigaction[NSIG]; |
| | | |
| | | static int fatal_signals[] = |
| | | { |
| | | /* Handlers for SIGTERM and SIGINT are installed in SDL_QuitInit. */ |
| | | SIGHUP, SIGQUIT, SIGILL, SIGABRT, |
| | | SIGFPE, SIGSEGV, SIGPIPE, SIGBUS, |
| | | SIGSYS |
| | | }; |
| | | |
| | | static void kbd_cleanup(void) |
| | | { |
| | | SDL_EVDEV_keyboard_state* kbd = kbd_cleanup_state; |
| | | if (kbd == NULL) { |
| | | return; |
| | | } |
| | | kbd_cleanup_state = NULL; |
| | | |
| | | fprintf(stderr, "(SDL restoring keyboard) "); |
| | | ioctl(kbd->console_fd, KDSKBMODE, kbd->old_kbd_mode); |
| | | } |
| | | |
| | | void |
| | | SDL_EVDEV_kbd_reraise_signal(int sig) |
| | | { |
| | | raise(sig); |
| | | } |
| | | |
| | | siginfo_t* SDL_EVDEV_kdb_cleanup_siginfo = NULL; |
| | | void* SDL_EVDEV_kdb_cleanup_ucontext = NULL; |
| | | |
| | | static void kbd_cleanup_signal_action(int signum, siginfo_t* info, void* ucontext) |
| | | { |
| | | struct sigaction* old_action_p = &(old_sigaction[signum]); |
| | | sigset_t sigset; |
| | | |
| | | /* Restore original signal handler before going any further. */ |
| | | sigaction(signum, old_action_p, NULL); |
| | | |
| | | /* Unmask current signal. */ |
| | | sigemptyset(&sigset); |
| | | sigaddset(&sigset, signum); |
| | | sigprocmask(SIG_UNBLOCK, &sigset, NULL); |
| | | |
| | | /* Save original signal info and context for archeologists. */ |
| | | SDL_EVDEV_kdb_cleanup_siginfo = info; |
| | | SDL_EVDEV_kdb_cleanup_ucontext = ucontext; |
| | | |
| | | /* Restore keyboard. */ |
| | | kbd_cleanup(); |
| | | |
| | | /* Reraise signal. */ |
| | | SDL_EVDEV_kbd_reraise_signal(signum); |
| | | } |
| | | |
| | | static void kbd_unregister_emerg_cleanup() |
| | | { |
| | | int tabidx, signum; |
| | | |
| | | kbd_cleanup_state = NULL; |
| | | |
| | | if (!kbd_cleanup_sigactions_installed) { |
| | | return; |
| | | } |
| | | kbd_cleanup_sigactions_installed = 0; |
| | | |
| | | for (tabidx = 0; tabidx < sizeof(fatal_signals) / sizeof(fatal_signals[0]); ++tabidx) { |
| | | struct sigaction* old_action_p; |
| | | struct sigaction cur_action; |
| | | signum = fatal_signals[tabidx]; |
| | | old_action_p = &(old_sigaction[signum]); |
| | | |
| | | /* Examine current signal action */ |
| | | if (sigaction(signum, NULL, &cur_action)) |
| | | continue; |
| | | |
| | | /* Check if action installed and not modifed */ |
| | | if (!(cur_action.sa_flags & SA_SIGINFO) |
| | | || cur_action.sa_sigaction != &kbd_cleanup_signal_action) |
| | | continue; |
| | | |
| | | /* Restore original action */ |
| | | sigaction(signum, old_action_p, NULL); |
| | | } |
| | | } |
| | | |
| | | static void kbd_cleanup_atexit(void) |
| | | { |
| | | /* Restore keyboard. */ |
| | | kbd_cleanup(); |
| | | |
| | | /* Try to restore signal handlers in case shared library is being unloaded */ |
| | | kbd_unregister_emerg_cleanup(); |
| | | } |
| | | |
| | | static void kbd_register_emerg_cleanup(SDL_EVDEV_keyboard_state * kbd) |
| | | { |
| | | int tabidx, signum; |
| | | |
| | | if (kbd_cleanup_state != NULL) { |
| | | return; |
| | | } |
| | | kbd_cleanup_state = kbd; |
| | | |
| | | if (!kbd_cleanup_atexit_installed) { |
| | | /* Since glibc 2.2.3, atexit() (and on_exit(3)) can be used within a shared library to establish |
| | | * functions that are called when the shared library is unloaded. |
| | | * -- man atexit(3) |
| | | */ |
| | | atexit(kbd_cleanup_atexit); |
| | | kbd_cleanup_atexit_installed = 1; |
| | | } |
| | | |
| | | if (kbd_cleanup_sigactions_installed) { |
| | | return; |
| | | } |
| | | kbd_cleanup_sigactions_installed = 1; |
| | | |
| | | for (tabidx = 0; tabidx < sizeof(fatal_signals) / sizeof(fatal_signals[0]); ++tabidx) { |
| | | struct sigaction* old_action_p; |
| | | struct sigaction new_action; |
| | | signum = fatal_signals[tabidx]; |
| | | old_action_p = &(old_sigaction[signum]); |
| | | if (sigaction(signum, NULL, old_action_p)) |
| | | continue; |
| | | |
| | | /* Skip SIGHUP and SIGPIPE if handler is already installed |
| | | * - assume the handler will do the cleanup |
| | | */ |
| | | if ((signum == SIGHUP || signum == SIGPIPE) |
| | | && (old_action_p->sa_handler != SIG_DFL |
| | | || (void (*)(int))old_action_p->sa_sigaction != SIG_DFL)) |
| | | continue; |
| | | |
| | | new_action = *old_action_p; |
| | | new_action.sa_flags |= SA_SIGINFO; |
| | | new_action.sa_sigaction = &kbd_cleanup_signal_action; |
| | | sigaction(signum, &new_action, NULL); |
| | | } |
| | | } |
| | | |
| | | SDL_EVDEV_keyboard_state * |
| | | SDL_EVDEV_kbd_init(void) |
| | | { |
| | |
| | | kbd->key_maps = default_key_maps; |
| | | } |
| | | |
| | | /* Allow inhibiting keyboard mute with env. variable for debugging etc. */ |
| | | if (getenv("SDL_INPUT_LINUX_KEEP_KBD") == NULL) { |
| | | /* Mute the keyboard so keystrokes only generate evdev events |
| | | * and do not leak through to the console |
| | | */ |
| | | ioctl(kbd->console_fd, KDSKBMODE, K_OFF); |
| | | |
| | | /* Make sure to restore keyboard if application fails to call |
| | | * SDL_Quit before exit or fatal signal is raised. |
| | | */ |
| | | if (!SDL_GetHintBoolean(SDL_HINT_NO_SIGNAL_HANDLERS, SDL_FALSE)) { |
| | | kbd_register_emerg_cleanup(kbd); |
| | | } |
| | | } |
| | | } |
| | | |
| | | #ifdef DUMP_ACCENTS |
| | |
| | | if (!kbd) { |
| | | return; |
| | | } |
| | | |
| | | kbd_unregister_emerg_cleanup(); |
| | | |
| | | if (kbd->console_fd >= 0) { |
| | | /* Restore the original keyboard mode */ |
| | |
| | | shift_final = (kbd->shift_state | kbd->slockstate) ^ kbd->lockstate; |
| | | key_map = kbd->key_maps[shift_final]; |
| | | if (!key_map) { |
| | | /* Unsupported shift state (e.g. ctrl = 4, alt = 8), just reset to the default state */ |
| | | kbd->shift_state = 0; |
| | | kbd->slockstate = 0; |
| | | kbd->lockstate = 0; |
| | | return; |
| | | } |
| | | |
| | |
| | | 3. This notice may not be removed or altered from any source distribution. |
| | | */ |
| | | |
| | | #ifndef SDL_evdev_kbd_h_ |
| | | #define SDL_evdev_kbd_h_ |
| | | |
| | | struct SDL_EVDEV_keyboard_state; |
| | | typedef struct SDL_EVDEV_keyboard_state SDL_EVDEV_keyboard_state; |
| | | |
| | |
| | | extern void SDL_EVDEV_kbd_keycode(SDL_EVDEV_keyboard_state *state, unsigned int keycode, int down); |
| | | extern void SDL_EVDEV_kbd_quit(SDL_EVDEV_keyboard_state *state); |
| | | |
| | | #endif /* SDL_evdev_kbd_h_ */ |
| | | |
| | | /* vi: set ts=4 sw=4 expandtab: */ |
| | |
| | | { |
| | | /* cast funcs to char* first, to please GCC's strict aliasing rules. */ |
| | | #define SDL_UDEV_SYM(x) \ |
| | | if (!SDL_UDEV_load_sym(#x, (void **) (char *) & _this->x)) return -1 |
| | | if (!SDL_UDEV_load_sym(#x, (void **) (char *) & _this->syms.x)) return -1 |
| | | |
| | | SDL_UDEV_SYM(udev_device_get_action); |
| | | SDL_UDEV_SYM(udev_device_get_devnode); |
| | |
| | | SDL_UDEV_hotplug_update_available(void) |
| | | { |
| | | if (_this->udev_mon != NULL) { |
| | | const int fd = _this->udev_monitor_get_fd(_this->udev_mon); |
| | | const int fd = _this->syms.udev_monitor_get_fd(_this->udev_mon); |
| | | if (SDL_IOReady(fd, SDL_FALSE, 0)) { |
| | | return SDL_TRUE; |
| | | } |
| | |
| | | * Listen for input devices (mouse, keyboard, joystick, etc) and sound devices |
| | | */ |
| | | |
| | | _this->udev = _this->udev_new(); |
| | | _this->udev = _this->syms.udev_new(); |
| | | if (_this->udev == NULL) { |
| | | SDL_UDEV_Quit(); |
| | | return SDL_SetError("udev_new() failed"); |
| | | } |
| | | |
| | | _this->udev_mon = _this->udev_monitor_new_from_netlink(_this->udev, "udev"); |
| | | _this->udev_mon = _this->syms.udev_monitor_new_from_netlink(_this->udev, "udev"); |
| | | if (_this->udev_mon == NULL) { |
| | | SDL_UDEV_Quit(); |
| | | return SDL_SetError("udev_monitor_new_from_netlink() failed"); |
| | | } |
| | | |
| | | _this->udev_monitor_filter_add_match_subsystem_devtype(_this->udev_mon, "input", NULL); |
| | | _this->udev_monitor_filter_add_match_subsystem_devtype(_this->udev_mon, "sound", NULL); |
| | | _this->udev_monitor_enable_receiving(_this->udev_mon); |
| | | _this->syms.udev_monitor_filter_add_match_subsystem_devtype(_this->udev_mon, "input", NULL); |
| | | _this->syms.udev_monitor_filter_add_match_subsystem_devtype(_this->udev_mon, "sound", NULL); |
| | | _this->syms.udev_monitor_enable_receiving(_this->udev_mon); |
| | | |
| | | /* Do an initial scan of existing devices */ |
| | | SDL_UDEV_Scan(); |
| | |
| | | if (_this->ref_count < 1) { |
| | | |
| | | if (_this->udev_mon != NULL) { |
| | | _this->udev_monitor_unref(_this->udev_mon); |
| | | _this->syms.udev_monitor_unref(_this->udev_mon); |
| | | _this->udev_mon = NULL; |
| | | } |
| | | if (_this->udev != NULL) { |
| | | _this->udev_unref(_this->udev); |
| | | _this->syms.udev_unref(_this->udev); |
| | | _this->udev = NULL; |
| | | } |
| | | |
| | |
| | | return; |
| | | } |
| | | |
| | | enumerate = _this->udev_enumerate_new(_this->udev); |
| | | enumerate = _this->syms.udev_enumerate_new(_this->udev); |
| | | if (enumerate == NULL) { |
| | | SDL_UDEV_Quit(); |
| | | SDL_SetError("udev_enumerate_new() failed"); |
| | | return; |
| | | } |
| | | |
| | | _this->udev_enumerate_add_match_subsystem(enumerate, "input"); |
| | | _this->udev_enumerate_add_match_subsystem(enumerate, "sound"); |
| | | _this->syms.udev_enumerate_add_match_subsystem(enumerate, "input"); |
| | | _this->syms.udev_enumerate_add_match_subsystem(enumerate, "sound"); |
| | | |
| | | _this->udev_enumerate_scan_devices(enumerate); |
| | | devs = _this->udev_enumerate_get_list_entry(enumerate); |
| | | for (item = devs; item; item = _this->udev_list_entry_get_next(item)) { |
| | | const char *path = _this->udev_list_entry_get_name(item); |
| | | struct udev_device *dev = _this->udev_device_new_from_syspath(_this->udev, path); |
| | | _this->syms.udev_enumerate_scan_devices(enumerate); |
| | | devs = _this->syms.udev_enumerate_get_list_entry(enumerate); |
| | | for (item = devs; item; item = _this->syms.udev_list_entry_get_next(item)) { |
| | | const char *path = _this->syms.udev_list_entry_get_name(item); |
| | | struct udev_device *dev = _this->syms.udev_device_new_from_syspath(_this->udev, path); |
| | | if (dev != NULL) { |
| | | device_event(SDL_UDEV_DEVICEADDED, dev); |
| | | _this->udev_device_unref(dev); |
| | | _this->syms.udev_device_unref(dev); |
| | | } |
| | | } |
| | | |
| | | _this->udev_enumerate_unref(enumerate); |
| | | _this->syms.udev_enumerate_unref(enumerate); |
| | | } |
| | | |
| | | |
| | |
| | | unsigned long v; |
| | | |
| | | SDL_memset(bitmask, 0, bitmask_len*sizeof(*bitmask)); |
| | | value = _this->udev_device_get_sysattr_value(pdev, attr); |
| | | value = _this->syms.udev_device_get_sysattr_value(pdev, attr); |
| | | if (!value) { |
| | | return; |
| | | } |
| | |
| | | /* walk up the parental chain until we find the real input device; the |
| | | * argument is very likely a subdevice of this, like eventN */ |
| | | pdev = dev; |
| | | while (pdev && !_this->udev_device_get_sysattr_value(pdev, "capabilities/ev")) { |
| | | pdev = _this->udev_device_get_parent_with_subsystem_devtype(pdev, "input", NULL); |
| | | while (pdev && !_this->syms.udev_device_get_sysattr_value(pdev, "capabilities/ev")) { |
| | | pdev = _this->syms.udev_device_get_parent_with_subsystem_devtype(pdev, "input", NULL); |
| | | } |
| | | if (!pdev) { |
| | | return 0; |
| | |
| | | const char *path; |
| | | SDL_UDEV_CallbackList *item; |
| | | |
| | | path = _this->udev_device_get_devnode(dev); |
| | | path = _this->syms.udev_device_get_devnode(dev); |
| | | if (path == NULL) { |
| | | return; |
| | | } |
| | | |
| | | subsystem = _this->udev_device_get_subsystem(dev); |
| | | subsystem = _this->syms.udev_device_get_subsystem(dev); |
| | | if (SDL_strcmp(subsystem, "sound") == 0) { |
| | | devclass = SDL_UDEV_DEVICE_SOUND; |
| | | } else if (SDL_strcmp(subsystem, "input") == 0) { |
| | | /* udev rules reference: http://cgit.freedesktop.org/systemd/systemd/tree/src/udev/udev-builtin-input_id.c */ |
| | | |
| | | val = _this->udev_device_get_property_value(dev, "ID_INPUT_JOYSTICK"); |
| | | val = _this->syms.udev_device_get_property_value(dev, "ID_INPUT_JOYSTICK"); |
| | | if (val != NULL && SDL_strcmp(val, "1") == 0 ) { |
| | | devclass |= SDL_UDEV_DEVICE_JOYSTICK; |
| | | } |
| | | |
| | | val = _this->udev_device_get_property_value(dev, "ID_INPUT_MOUSE"); |
| | | val = _this->syms.udev_device_get_property_value(dev, "ID_INPUT_MOUSE"); |
| | | if (val != NULL && SDL_strcmp(val, "1") == 0 ) { |
| | | devclass |= SDL_UDEV_DEVICE_MOUSE; |
| | | } |
| | | |
| | | val = _this->udev_device_get_property_value(dev, "ID_INPUT_TOUCHSCREEN"); |
| | | val = _this->syms.udev_device_get_property_value(dev, "ID_INPUT_TOUCHSCREEN"); |
| | | if (val != NULL && SDL_strcmp(val, "1") == 0 ) { |
| | | devclass |= SDL_UDEV_DEVICE_TOUCHSCREEN; |
| | | } |
| | |
| | | |
| | | Ref: http://cgit.freedesktop.org/systemd/systemd/tree/src/udev/udev-builtin-input_id.c#n183 |
| | | */ |
| | | val = _this->udev_device_get_property_value(dev, "ID_INPUT_KEY"); |
| | | val = _this->syms.udev_device_get_property_value(dev, "ID_INPUT_KEY"); |
| | | if (val != NULL && SDL_strcmp(val, "1") == 0 ) { |
| | | devclass |= SDL_UDEV_DEVICE_KEYBOARD; |
| | | } |
| | | |
| | | if (devclass == 0) { |
| | | /* Fall back to old style input classes */ |
| | | val = _this->udev_device_get_property_value(dev, "ID_CLASS"); |
| | | val = _this->syms.udev_device_get_property_value(dev, "ID_CLASS"); |
| | | if (val != NULL) { |
| | | if (SDL_strcmp(val, "joystick") == 0) { |
| | | devclass = SDL_UDEV_DEVICE_JOYSTICK; |
| | |
| | | } |
| | | |
| | | while (SDL_UDEV_hotplug_update_available()) { |
| | | dev = _this->udev_monitor_receive_device(_this->udev_mon); |
| | | dev = _this->syms.udev_monitor_receive_device(_this->udev_mon); |
| | | if (dev == NULL) { |
| | | break; |
| | | } |
| | | action = _this->udev_device_get_action(dev); |
| | | action = _this->syms.udev_device_get_action(dev); |
| | | |
| | | if (SDL_strcmp(action, "add") == 0) { |
| | | /* Wait for the device to finish initialization */ |
| | |
| | | device_event(SDL_UDEV_DEVICEREMOVED, dev); |
| | | } |
| | | |
| | | _this->udev_device_unref(dev); |
| | | _this->syms.udev_device_unref(dev); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | } |
| | | |
| | | const SDL_UDEV_Symbols * |
| | | SDL_UDEV_GetUdevSyms(void) |
| | | { |
| | | if (SDL_UDEV_Init() < 0) { |
| | | SDL_SetError("Could not initialize UDEV"); |
| | | return NULL; |
| | | } |
| | | |
| | | return &_this->syms; |
| | | } |
| | | |
| | | void |
| | | SDL_UDEV_ReleaseUdevSyms(void) |
| | | { |
| | | SDL_UDEV_Quit(); |
| | | } |
| | | |
| | | #endif /* SDL_USE_LIBUDEV */ |
| | | |
| | |
| | | struct SDL_UDEV_CallbackList *next; |
| | | } SDL_UDEV_CallbackList; |
| | | |
| | | typedef struct SDL_UDEV_PrivateData |
| | | { |
| | | const char *udev_library; |
| | | void *udev_handle; |
| | | struct udev *udev; |
| | | struct udev_monitor *udev_mon; |
| | | int ref_count; |
| | | SDL_UDEV_CallbackList *first, *last; |
| | | |
| | | /* Function pointers */ |
| | | typedef struct SDL_UDEV_Symbols { |
| | | const char *(*udev_device_get_action)(struct udev_device *); |
| | | const char *(*udev_device_get_devnode)(struct udev_device *); |
| | | const char *(*udev_device_get_subsystem)(struct udev_device *); |
| | |
| | | void (*udev_unref)(struct udev *); |
| | | struct udev_device * (*udev_device_new_from_devnum)(struct udev *udev, char type, dev_t devnum); |
| | | dev_t (*udev_device_get_devnum) (struct udev_device *udev_device); |
| | | } SDL_UDEV_Symbols; |
| | | |
| | | typedef struct SDL_UDEV_PrivateData |
| | | { |
| | | const char *udev_library; |
| | | void *udev_handle; |
| | | struct udev *udev; |
| | | struct udev_monitor *udev_mon; |
| | | int ref_count; |
| | | SDL_UDEV_CallbackList *first, *last; |
| | | |
| | | /* Function pointers */ |
| | | SDL_UDEV_Symbols syms; |
| | | } SDL_UDEV_PrivateData; |
| | | |
| | | extern int SDL_UDEV_Init(void); |
| | |
| | | extern void SDL_UDEV_Scan(void); |
| | | extern int SDL_UDEV_AddCallback(SDL_UDEV_Callback cb); |
| | | extern void SDL_UDEV_DelCallback(SDL_UDEV_Callback cb); |
| | | |
| | | |
| | | extern const SDL_UDEV_Symbols *SDL_UDEV_GetUdevSyms(void); |
| | | extern void SDL_UDEV_ReleaseUdevSyms(void); |
| | | |
| | | |
| | | #endif /* HAVE_LIBUDEV_H */ |
| | |
| | | #ifndef _WIN32_WINNT_VISTA |
| | | #define _WIN32_WINNT_VISTA 0x0600 |
| | | #endif |
| | | #ifndef _WIN32_WINNT_WIN7 |
| | | #define _WIN32_WINNT_WIN7 0x0601 |
| | | #endif |
| | | |
| | | |
| | | /* Sets an error message based on an HRESULT */ |
| | |
| | | #include "SDL_config.h" |
| | | #else |
| | | #include "../SDL_internal.h" |
| | | #include "SDL_simd.h" |
| | | #endif |
| | | |
| | | #if defined(__WIN32__) |
| | |
| | | /* CPU feature detection for SDL */ |
| | | |
| | | #include "SDL_cpuinfo.h" |
| | | #include "SDL_assert.h" |
| | | |
| | | #ifdef HAVE_SYSCONF |
| | | #include <unistd.h> |
| | |
| | | #endif |
| | | #endif |
| | | |
| | | #define CPU_HAS_RDTSC 0x00000001 |
| | | #define CPU_HAS_ALTIVEC 0x00000002 |
| | | #define CPU_HAS_MMX 0x00000004 |
| | | #define CPU_HAS_3DNOW 0x00000008 |
| | | #define CPU_HAS_SSE 0x00000010 |
| | | #define CPU_HAS_SSE2 0x00000020 |
| | | #define CPU_HAS_SSE3 0x00000040 |
| | | #define CPU_HAS_SSE41 0x00000100 |
| | | #define CPU_HAS_SSE42 0x00000200 |
| | | #define CPU_HAS_AVX 0x00000400 |
| | | #define CPU_HAS_AVX2 0x00000800 |
| | | #define CPU_HAS_NEON 0x00001000 |
| | | #define CPU_HAS_RDTSC (1 << 0) |
| | | #define CPU_HAS_ALTIVEC (1 << 1) |
| | | #define CPU_HAS_MMX (1 << 2) |
| | | #define CPU_HAS_3DNOW (1 << 3) |
| | | #define CPU_HAS_SSE (1 << 4) |
| | | #define CPU_HAS_SSE2 (1 << 5) |
| | | #define CPU_HAS_SSE3 (1 << 6) |
| | | #define CPU_HAS_SSE41 (1 << 7) |
| | | #define CPU_HAS_SSE42 (1 << 8) |
| | | #define CPU_HAS_AVX (1 << 9) |
| | | #define CPU_HAS_AVX2 (1 << 10) |
| | | #define CPU_HAS_NEON (1 << 11) |
| | | #define CPU_HAS_AVX512F (1 << 12) |
| | | |
| | | #if SDL_ALTIVEC_BLITTERS && HAVE_SETJMP && !__MACOSX__ && !__OpenBSD__ |
| | | /* This is the brute force way of detecting instruction sets... |
| | |
| | | static int CPU_CPUIDFeatures[4]; |
| | | static int CPU_CPUIDMaxFunction = 0; |
| | | static SDL_bool CPU_OSSavesYMM = SDL_FALSE; |
| | | static SDL_bool CPU_OSSavesZMM = SDL_FALSE; |
| | | |
| | | static void |
| | | CPU_calcCPUIDFeatures(void) |
| | |
| | | |
| | | /* Check to make sure we can call xgetbv */ |
| | | if (c & 0x08000000) { |
| | | /* Call xgetbv to see if YMM register state is saved */ |
| | | /* Call xgetbv to see if YMM (etc) register state is saved */ |
| | | #if defined(__GNUC__) && (defined(i386) || defined(__x86_64__)) |
| | | __asm__(".byte 0x0f, 0x01, 0xd0" : "=a" (a) : "c" (0) : "%edx"); |
| | | #elif defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_X64)) && (_MSC_FULL_VER >= 160040219) /* VS2010 SP1 */ |
| | |
| | | } |
| | | #endif |
| | | CPU_OSSavesYMM = ((a & 6) == 6) ? SDL_TRUE : SDL_FALSE; |
| | | CPU_OSSavesZMM = (CPU_OSSavesYMM && ((a & 0xe0) == 0xe0)) ? SDL_TRUE : SDL_FALSE; |
| | | } |
| | | } |
| | | } |
| | |
| | | (void) a; (void) b; (void) c; (void) d; /* compiler warnings... */ |
| | | cpuid(7, a, b, c, d); |
| | | return (b & 0x00000020); |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | static int |
| | | CPU_haveAVX512F(void) |
| | | { |
| | | if (CPU_OSSavesZMM && (CPU_CPUIDMaxFunction >= 7)) { |
| | | int a, b, c, d; |
| | | (void) a; (void) b; (void) c; (void) d; /* compiler warnings... */ |
| | | cpuid(7, a, b, c, d); |
| | | return (b & 0x00010000); |
| | | } |
| | | return 0; |
| | | } |
| | |
| | | } |
| | | |
| | | static Uint32 SDL_CPUFeatures = 0xFFFFFFFF; |
| | | static Uint32 SDL_SIMDAlignment = 0xFFFFFFFF; |
| | | |
| | | static Uint32 |
| | | SDL_GetCPUFeatures(void) |
| | |
| | | if (SDL_CPUFeatures == 0xFFFFFFFF) { |
| | | CPU_calcCPUIDFeatures(); |
| | | SDL_CPUFeatures = 0; |
| | | SDL_SIMDAlignment = 4; /* a good safe base value */ |
| | | if (CPU_haveRDTSC()) { |
| | | SDL_CPUFeatures |= CPU_HAS_RDTSC; |
| | | } |
| | | if (CPU_haveAltiVec()) { |
| | | SDL_CPUFeatures |= CPU_HAS_ALTIVEC; |
| | | SDL_SIMDAlignment = SDL_max(SDL_SIMDAlignment, 16); |
| | | } |
| | | if (CPU_haveMMX()) { |
| | | SDL_CPUFeatures |= CPU_HAS_MMX; |
| | | SDL_SIMDAlignment = SDL_max(SDL_SIMDAlignment, 8); |
| | | } |
| | | if (CPU_have3DNow()) { |
| | | SDL_CPUFeatures |= CPU_HAS_3DNOW; |
| | | SDL_SIMDAlignment = SDL_max(SDL_SIMDAlignment, 8); |
| | | } |
| | | if (CPU_haveSSE()) { |
| | | SDL_CPUFeatures |= CPU_HAS_SSE; |
| | | SDL_SIMDAlignment = SDL_max(SDL_SIMDAlignment, 16); |
| | | } |
| | | if (CPU_haveSSE2()) { |
| | | SDL_CPUFeatures |= CPU_HAS_SSE2; |
| | | SDL_SIMDAlignment = SDL_max(SDL_SIMDAlignment, 16); |
| | | } |
| | | if (CPU_haveSSE3()) { |
| | | SDL_CPUFeatures |= CPU_HAS_SSE3; |
| | | SDL_SIMDAlignment = SDL_max(SDL_SIMDAlignment, 16); |
| | | } |
| | | if (CPU_haveSSE41()) { |
| | | SDL_CPUFeatures |= CPU_HAS_SSE41; |
| | | SDL_SIMDAlignment = SDL_max(SDL_SIMDAlignment, 16); |
| | | } |
| | | if (CPU_haveSSE42()) { |
| | | SDL_CPUFeatures |= CPU_HAS_SSE42; |
| | | SDL_SIMDAlignment = SDL_max(SDL_SIMDAlignment, 16); |
| | | } |
| | | if (CPU_haveAVX()) { |
| | | SDL_CPUFeatures |= CPU_HAS_AVX; |
| | | SDL_SIMDAlignment = SDL_max(SDL_SIMDAlignment, 32); |
| | | } |
| | | if (CPU_haveAVX2()) { |
| | | SDL_CPUFeatures |= CPU_HAS_AVX2; |
| | | SDL_SIMDAlignment = SDL_max(SDL_SIMDAlignment, 32); |
| | | } |
| | | if (CPU_haveAVX512F()) { |
| | | SDL_CPUFeatures |= CPU_HAS_AVX512F; |
| | | SDL_SIMDAlignment = SDL_max(SDL_SIMDAlignment, 64); |
| | | } |
| | | if (CPU_haveNEON()) { |
| | | SDL_CPUFeatures |= CPU_HAS_NEON; |
| | | SDL_SIMDAlignment = SDL_max(SDL_SIMDAlignment, 16); |
| | | } |
| | | } |
| | | return SDL_CPUFeatures; |
| | |
| | | } |
| | | |
| | | SDL_bool |
| | | SDL_HasAVX512F(void) |
| | | { |
| | | return CPU_FEATURE_AVAILABLE(CPU_HAS_AVX512F); |
| | | } |
| | | |
| | | SDL_bool |
| | | SDL_HasNEON(void) |
| | | { |
| | | return CPU_FEATURE_AVAILABLE(CPU_HAS_NEON); |
| | |
| | | } |
| | | |
| | | |
| | | size_t |
| | | SDL_SIMDGetAlignment(void) |
| | | { |
| | | if (SDL_SIMDAlignment == 0xFFFFFFFF) { |
| | | SDL_GetCPUFeatures(); /* make sure this has been calculated */ |
| | | } |
| | | SDL_assert(SDL_SIMDAlignment != 0); |
| | | return SDL_SIMDAlignment; |
| | | } |
| | | |
| | | void * |
| | | SDL_SIMDAlloc(const size_t len) |
| | | { |
| | | const size_t alignment = SDL_SIMDGetAlignment(); |
| | | const size_t padding = alignment - (len % alignment); |
| | | const size_t padded = (padding != alignment) ? (len + padding) : len; |
| | | Uint8 *retval = NULL; |
| | | Uint8 *ptr = (Uint8 *) SDL_malloc(padded + alignment + sizeof (void *)); |
| | | if (ptr) { |
| | | /* store the actual malloc pointer right before our aligned pointer. */ |
| | | retval = ptr + sizeof (void *); |
| | | retval += alignment - (((size_t) retval) % alignment); |
| | | *(((void **) retval) - 1) = ptr; |
| | | } |
| | | return retval; |
| | | } |
| | | |
| | | void |
| | | SDL_SIMDFree(void *ptr) |
| | | { |
| | | if (ptr) { |
| | | void **realptr = (void **) ptr; |
| | | realptr--; |
| | | SDL_free(*(((void **) ptr) - 1)); |
| | | } |
| | | } |
| | | |
| | | |
| | | #ifdef TEST_MAIN |
| | | |
| | | #include <stdio.h> |
| | |
| | | printf("SSE4.2: %d\n", SDL_HasSSE42()); |
| | | printf("AVX: %d\n", SDL_HasAVX()); |
| | | printf("AVX2: %d\n", SDL_HasAVX2()); |
| | | printf("AVX-512F: %d\n", SDL_HasAVX512F()); |
| | | printf("NEON: %d\n", SDL_HasNEON()); |
| | | printf("RAM: %d MB\n", SDL_GetSystemRAM()); |
| | | return 0; |
| New file |
| | |
| | | /* |
| | | Simple DirectMedia Layer |
| | | Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> |
| | | |
| | | This software is provided 'as-is', without any express or implied |
| | | warranty. In no event will the authors be held liable for any damages |
| | | arising from the use of this software. |
| | | |
| | | Permission is granted to anyone to use this software for any purpose, |
| | | including commercial applications, and to alter it and redistribute it |
| | | freely, subject to the following restrictions: |
| | | |
| | | 1. The origin of this software must not be misrepresented; you must not |
| | | claim that you wrote the original software. If you use this software |
| | | in a product, an acknowledgment in the product documentation would be |
| | | appreciated but is not required. |
| | | 2. Altered source versions must be plainly marked as such, and must not be |
| | | misrepresented as being the original software. |
| | | 3. This notice may not be removed or altered from any source distribution. |
| | | */ |
| | | |
| | | #include "SDL.h" |
| | | #include "../SDL_internal.h" |
| | | |
| | | /** |
| | | * \brief Report the alignment this system needs for SIMD allocations. |
| | | * |
| | | * This will return the minimum number of bytes to which a pointer must be |
| | | * aligned to be compatible with SIMD instructions on the current machine. |
| | | * For example, if the machine supports SSE only, it will return 16, but if |
| | | * it supports AVX-512F, it'll return 64 (etc). This only reports values for |
| | | * instruction sets SDL knows about, so if your SDL build doesn't have |
| | | * SDL_HasAVX512F(), then it might return 16 for the SSE support it sees and |
| | | * not 64 for the AVX-512 instructions that exist but SDL doesn't know about. |
| | | * Plan accordingly. |
| | | */ |
| | | extern size_t SDL_SIMDGetAlignment(void); |
| | | |
| | | /** |
| | | * \brief Allocate memory in a SIMD-friendly way. |
| | | * |
| | | * This will allocate a block of memory that is suitable for use with SIMD |
| | | * instructions. Specifically, it will be properly aligned and padded for |
| | | * the system's supported vector instructions. |
| | | * |
| | | * The memory returned will be padded such that it is safe to read or write |
| | | * an incomplete vector at the end of the memory block. This can be useful |
| | | * so you don't have to drop back to a scalar fallback at the end of your |
| | | * SIMD processing loop to deal with the final elements without overflowing |
| | | * the allocated buffer. |
| | | * |
| | | * You must free this memory with SDL_FreeSIMD(), not free() or SDL_free() |
| | | * or delete[], etc. |
| | | * |
| | | * Note that SDL will only deal with SIMD instruction sets it is aware of; |
| | | * for example, SDL 2.0.8 knows that SSE wants 16-byte vectors |
| | | * (SDL_HasSSE()), and AVX2 wants 32 bytes (SDL_HasAVX2()), but doesn't |
| | | * know that AVX-512 wants 64. To be clear: if you can't decide to use an |
| | | * instruction set with an SDL_Has*() function, don't use that instruction |
| | | * set with memory allocated through here. |
| | | * |
| | | * SDL_AllocSIMD(0) will return a non-NULL pointer, assuming the system isn't |
| | | * out of memory. |
| | | * |
| | | * \param len The length, in bytes, of the block to allocated. The actual |
| | | * allocated block might be larger due to padding, etc. |
| | | * \return Pointer to newly-allocated block, NULL if out of memory. |
| | | * |
| | | * \sa SDL_SIMDAlignment |
| | | * \sa SDL_SIMDFree |
| | | */ |
| | | extern void * SDL_SIMDAlloc(const size_t len); |
| | | |
| | | /** |
| | | * \brief Deallocate memory obtained from SDL_SIMDAlloc |
| | | * |
| | | * It is not valid to use this function on a pointer from anything but |
| | | * SDL_SIMDAlloc(). It can't be used on pointers from malloc, realloc, |
| | | * SDL_malloc, memalign, new[], etc. |
| | | * |
| | | * However, SDL_SIMDFree(NULL) is a legal no-op. |
| | | * |
| | | * \sa SDL_SIMDAlloc |
| | | */ |
| | | extern void SDL_SIMDFree(void *ptr); |
| | | |
| | | /* vi: set ts=4 sw=4 expandtab: */ |
| | | |
| | |
| | | #if defined(__OS2__) |
| | | #define INCL_DOS |
| | | #define INCL_DOSERRORS |
| | | #include <os2.h> |
| | | #include <dos.h> |
| | | #endif |
| | | |
| | |
| | | #error Write me. |
| | | #endif |
| | | |
| | | |
| | | |
| | | /* Here's the exported entry point that fills in the jump table. */ |
| | | /* Use specific types when an "int" might suffice to keep this sane. */ |
| | | typedef Sint32 (SDLCALL *SDL_DYNAPI_ENTRYFN)(Uint32 apiver, void *table, Uint32 tablesize); |
| | | extern DECLSPEC Sint32 SDLCALL SDL_DYNAPI_entry(Uint32, void *, Uint32); |
| | | |
| | | Sint32 |
| | | SDL_DYNAPI_entry(Uint32 apiver, void *table, Uint32 tablesize) |
| | | /* we make this a static function so we can call the correct one without the |
| | | system's dynamic linker resolving to the wrong version of this. */ |
| | | static Sint32 |
| | | initialize_jumptable(Uint32 apiver, void *table, Uint32 tablesize) |
| | | { |
| | | SDL_DYNAPI_jump_table *output_jump_table = (SDL_DYNAPI_jump_table *) table; |
| | | |
| | |
| | | /* Safe to call SDL functions now; jump table is initialized! */ |
| | | |
| | | return 0; /* success! */ |
| | | } |
| | | |
| | | |
| | | /* Here's the exported entry point that fills in the jump table. */ |
| | | /* Use specific types when an "int" might suffice to keep this sane. */ |
| | | typedef Sint32 (SDLCALL *SDL_DYNAPI_ENTRYFN)(Uint32 apiver, void *table, Uint32 tablesize); |
| | | extern DECLSPEC Sint32 SDLCALL SDL_DYNAPI_entry(Uint32, void *, Uint32); |
| | | |
| | | Sint32 |
| | | SDL_DYNAPI_entry(Uint32 apiver, void *table, Uint32 tablesize) |
| | | { |
| | | return initialize_jumptable(apiver, table, tablesize); |
| | | } |
| | | |
| | | |
| | |
| | | SDL_InitDynamicAPILocked(void) |
| | | { |
| | | const char *libname = SDL_getenv_REAL("SDL_DYNAMIC_API"); |
| | | SDL_DYNAPI_ENTRYFN entry = SDL_DYNAPI_entry; /* funcs from here by default. */ |
| | | SDL_DYNAPI_ENTRYFN entry = NULL; /* funcs from here by default. */ |
| | | |
| | | if (libname) { |
| | | entry = (SDL_DYNAPI_ENTRYFN) get_sdlapi_entry(libname, "SDL_DYNAPI_entry"); |
| | |
| | | /* !!! FIXME: fail to startup here instead? */ |
| | | /* !!! FIXME: definitely warn user. */ |
| | | /* Just fill in the function pointers from this library. */ |
| | | entry = SDL_DYNAPI_entry; |
| | | } |
| | | } |
| | | |
| | | if (entry(SDL_DYNAPI_VERSION, &jump_table, sizeof (jump_table)) < 0) { |
| | | if (!entry || (entry(SDL_DYNAPI_VERSION, &jump_table, sizeof (jump_table)) < 0)) { |
| | | /* !!! FIXME: fail to startup here instead? */ |
| | | /* !!! FIXME: definitely warn user. */ |
| | | /* Just fill in the function pointers from this library. */ |
| | | if (entry != SDL_DYNAPI_entry) { |
| | | if (!SDL_DYNAPI_entry(SDL_DYNAPI_VERSION, &jump_table, sizeof (jump_table))) { |
| | | if (!entry) { |
| | | if (!initialize_jumptable(SDL_DYNAPI_VERSION, &jump_table, sizeof (jump_table))) { |
| | | /* !!! FIXME: now we're screwed. Should definitely abort now. */ |
| | | } |
| | | } |
| | |
| | | #define SDL_WinRTGetDeviceFamily SDL_WinRTGetDeviceFamily_REAL |
| | | #define SDL_log10 SDL_log10_REAL |
| | | #define SDL_log10f SDL_log10f_REAL |
| | | #define SDL_GameControllerMappingForDeviceIndex SDL_GameControllerMappingForDeviceIndex_REAL |
| | | #define SDL_LinuxSetThreadPriority SDL_LinuxSetThreadPriority_REAL |
| | | #define SDL_HasAVX512F SDL_HasAVX512F_REAL |
| | | #define SDL_IsChromebook SDL_IsChromebook_REAL |
| | | #define SDL_IsDeXMode SDL_IsDeXMode_REAL |
| | | #define SDL_AndroidBackButton SDL_AndroidBackButton_REAL |
| | | #define SDL_exp SDL_exp_REAL |
| | | #define SDL_expf SDL_expf_REAL |
| | | #define SDL_wcsdup SDL_wcsdup_REAL |
| | | #define SDL_GameControllerRumble SDL_GameControllerRumble_REAL |
| | | #define SDL_JoystickRumble SDL_JoystickRumble_REAL |
| | | #define SDL_NumSensors SDL_NumSensors_REAL |
| | | #define SDL_SensorGetDeviceName SDL_SensorGetDeviceName_REAL |
| | | #define SDL_SensorGetDeviceType SDL_SensorGetDeviceType_REAL |
| | | #define SDL_SensorGetDeviceNonPortableType SDL_SensorGetDeviceNonPortableType_REAL |
| | | #define SDL_SensorGetDeviceInstanceID SDL_SensorGetDeviceInstanceID_REAL |
| | | #define SDL_SensorOpen SDL_SensorOpen_REAL |
| | | #define SDL_SensorFromInstanceID SDL_SensorFromInstanceID_REAL |
| | | #define SDL_SensorGetName SDL_SensorGetName_REAL |
| | | #define SDL_SensorGetType SDL_SensorGetType_REAL |
| | | #define SDL_SensorGetNonPortableType SDL_SensorGetNonPortableType_REAL |
| | | #define SDL_SensorGetInstanceID SDL_SensorGetInstanceID_REAL |
| | | #define SDL_SensorGetData SDL_SensorGetData_REAL |
| | | #define SDL_SensorClose SDL_SensorClose_REAL |
| | | #define SDL_SensorUpdate SDL_SensorUpdate_REAL |
| | | #define SDL_IsTablet SDL_IsTablet_REAL |
| | | #define SDL_GetDisplayOrientation SDL_GetDisplayOrientation_REAL |
| | | #define SDL_HasColorKey SDL_HasColorKey_REAL |
| | | #define SDL_CreateThreadWithStackSize SDL_CreateThreadWithStackSize_REAL |
| | | #define SDL_JoystickGetDevicePlayerIndex SDL_JoystickGetDevicePlayerIndex_REAL |
| | | #define SDL_JoystickGetPlayerIndex SDL_JoystickGetPlayerIndex_REAL |
| | | #define SDL_GameControllerGetPlayerIndex SDL_GameControllerGetPlayerIndex_REAL |
| | |
| | | #endif |
| | | SDL_DYNAPI_PROC(double,SDL_log10,(double a),(a),return) |
| | | SDL_DYNAPI_PROC(float,SDL_log10f,(float a),(a),return) |
| | | SDL_DYNAPI_PROC(char*,SDL_GameControllerMappingForDeviceIndex,(int a),(a),return) |
| | | #ifdef __LINUX__ |
| | | SDL_DYNAPI_PROC(int,SDL_LinuxSetThreadPriority,(Sint64 a, int b),(a,b),return) |
| | | #endif |
| | | SDL_DYNAPI_PROC(SDL_bool,SDL_HasAVX512F,(void),(),return) |
| | | #ifdef __ANDROID__ |
| | | SDL_DYNAPI_PROC(SDL_bool,SDL_IsChromebook,(void),(),return) |
| | | SDL_DYNAPI_PROC(SDL_bool,SDL_IsDeXMode,(void),(),return) |
| | | SDL_DYNAPI_PROC(void,SDL_AndroidBackButton,(void),(),return) |
| | | #endif |
| | | SDL_DYNAPI_PROC(double,SDL_exp,(double a),(a),return) |
| | | SDL_DYNAPI_PROC(float,SDL_expf,(float a),(a),return) |
| | | SDL_DYNAPI_PROC(wchar_t*,SDL_wcsdup,(const wchar_t *a),(a),return) |
| | | SDL_DYNAPI_PROC(int,SDL_GameControllerRumble,(SDL_GameController *a, Uint16 b, Uint16 c, Uint32 d),(a,b,c,d),return) |
| | | SDL_DYNAPI_PROC(int,SDL_JoystickRumble,(SDL_Joystick *a, Uint16 b, Uint16 c, Uint32 d),(a,b,c,d),return) |
| | | SDL_DYNAPI_PROC(int,SDL_NumSensors,(void),(),return) |
| | | SDL_DYNAPI_PROC(const char*,SDL_SensorGetDeviceName,(int a),(a),return) |
| | | SDL_DYNAPI_PROC(SDL_SensorType,SDL_SensorGetDeviceType,(int a),(a),return) |
| | | SDL_DYNAPI_PROC(int,SDL_SensorGetDeviceNonPortableType,(int a),(a),return) |
| | | SDL_DYNAPI_PROC(SDL_SensorID,SDL_SensorGetDeviceInstanceID,(int a),(a),return) |
| | | SDL_DYNAPI_PROC(SDL_Sensor*,SDL_SensorOpen,(int a),(a),return) |
| | | SDL_DYNAPI_PROC(SDL_Sensor*,SDL_SensorFromInstanceID,(SDL_SensorID a),(a),return) |
| | | SDL_DYNAPI_PROC(const char*,SDL_SensorGetName,(SDL_Sensor *a),(a),return) |
| | | SDL_DYNAPI_PROC(SDL_SensorType,SDL_SensorGetType,(SDL_Sensor *a),(a),return) |
| | | SDL_DYNAPI_PROC(int,SDL_SensorGetNonPortableType,(SDL_Sensor *a),(a),return) |
| | | SDL_DYNAPI_PROC(SDL_SensorID,SDL_SensorGetInstanceID,(SDL_Sensor *a),(a),return) |
| | | SDL_DYNAPI_PROC(int,SDL_SensorGetData,(SDL_Sensor *a, float *b, int c),(a,b,c),return) |
| | | SDL_DYNAPI_PROC(void,SDL_SensorClose,(SDL_Sensor *a),(a),) |
| | | SDL_DYNAPI_PROC(void,SDL_SensorUpdate,(void),(),) |
| | | SDL_DYNAPI_PROC(SDL_bool,SDL_IsTablet,(void),(),return) |
| | | SDL_DYNAPI_PROC(SDL_DisplayOrientation,SDL_GetDisplayOrientation,(int a),(a),return) |
| | | SDL_DYNAPI_PROC(SDL_bool,SDL_HasColorKey,(SDL_Surface *a),(a),return) |
| | | |
| | | #ifdef SDL_CreateThreadWithStackSize |
| | | #undef SDL_CreateThreadWithStackSize |
| | | #endif |
| | | |
| | | #if defined(__WIN32__) && !defined(HAVE_LIBC) |
| | | SDL_DYNAPI_PROC(SDL_Thread*,SDL_CreateThreadWithStackSize,(SDL_ThreadFunction a, const char *b, const size_t c, void *d, pfnSDL_CurrentBeginThread e, pfnSDL_CurrentEndThread f),(a,b,c,d,e,f),return) |
| | | #elif defined(__OS2__) |
| | | SDL_DYNAPI_PROC(SDL_Thread*,SDL_CreateThreadWithStackSize,(SDL_ThreadFunction a, const char *b, const size_t c, void *d, pfnSDL_CurrentBeginThread e, pfnSDL_CurrentEndThread f),(a,b,c,d,e,f),return) |
| | | #else |
| | | SDL_DYNAPI_PROC(SDL_Thread*,SDL_CreateThreadWithStackSize,(SDL_ThreadFunction a, const char *b, const size_t c, void *d),(a,b,c,d),return) |
| | | #endif |
| | | |
| | | SDL_DYNAPI_PROC(int,SDL_JoystickGetDevicePlayerIndex,(int a),(a),return) |
| | | SDL_DYNAPI_PROC(int,SDL_JoystickGetPlayerIndex,(SDL_Joystick *a),(a),return) |
| | | SDL_DYNAPI_PROC(int,SDL_GameControllerGetPlayerIndex,(SDL_GameController *a),(a),return) |
| New file |
| | |
| | | /* |
| | | Simple DirectMedia Layer |
| | | Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> |
| | | |
| | | This software is provided 'as-is', without any express or implied |
| | | warranty. In no event will the authors be held liable for any damages |
| | | arising from the use of this software. |
| | | |
| | | Permission is granted to anyone to use this software for any purpose, |
| | | including commercial applications, and to alter it and redistribute it |
| | | freely, subject to the following restrictions: |
| | | |
| | | 1. The origin of this software must not be misrepresented; you must not |
| | | claim that you wrote the original software. If you use this software |
| | | in a product, an acknowledgment in the product documentation would be |
| | | appreciated but is not required. |
| | | 2. Altered source versions must be plainly marked as such, and must not be |
| | | misrepresented as being the original software. |
| | | 3. This notice may not be removed or altered from any source distribution. |
| | | */ |
| | | #include "../SDL_internal.h" |
| | | |
| | | /* Display event handling code for SDL */ |
| | | |
| | | #include "SDL_events.h" |
| | | #include "SDL_events_c.h" |
| | | |
| | | |
| | | int |
| | | SDL_SendDisplayEvent(SDL_VideoDisplay *display, Uint8 displayevent, int data1) |
| | | { |
| | | int posted; |
| | | |
| | | if (!display) { |
| | | return 0; |
| | | } |
| | | switch (displayevent) { |
| | | case SDL_DISPLAYEVENT_ORIENTATION: |
| | | if (data1 == SDL_ORIENTATION_UNKNOWN || data1 == display->orientation) { |
| | | return 0; |
| | | } |
| | | display->orientation = (SDL_DisplayOrientation)data1; |
| | | break; |
| | | } |
| | | |
| | | /* Post the event, if desired */ |
| | | posted = 0; |
| | | if (SDL_GetEventState(SDL_DISPLAYEVENT) == SDL_ENABLE) { |
| | | SDL_Event event; |
| | | event.type = SDL_DISPLAYEVENT; |
| | | event.display.event = displayevent; |
| | | event.display.display = SDL_GetIndexOfDisplay(display); |
| | | event.display.data1 = data1; |
| | | posted = (SDL_PushEvent(&event) > 0); |
| | | } |
| | | |
| | | return (posted); |
| | | } |
| | | |
| | | /* vi: set ts=4 sw=4 expandtab: */ |
| New file |
| | |
| | | /* |
| | | Simple DirectMedia Layer |
| | | Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> |
| | | |
| | | This software is provided 'as-is', without any express or implied |
| | | warranty. In no event will the authors be held liable for any damages |
| | | arising from the use of this software. |
| | | |
| | | Permission is granted to anyone to use this software for any purpose, |
| | | including commercial applications, and to alter it and redistribute it |
| | | freely, subject to the following restrictions: |
| | | |
| | | 1. The origin of this software must not be misrepresented; you must not |
| | | claim that you wrote the original software. If you use this software |
| | | in a product, an acknowledgment in the product documentation would be |
| | | appreciated but is not required. |
| | | 2. Altered source versions must be plainly marked as such, and must not be |
| | | misrepresented as being the original software. |
| | | 3. This notice may not be removed or altered from any source distribution. |
| | | */ |
| | | #include "../SDL_internal.h" |
| | | |
| | | #ifndef SDL_displayevents_c_h_ |
| | | #define SDL_displayevents_c_h_ |
| | | |
| | | extern int SDL_SendDisplayEvent(SDL_VideoDisplay *display, Uint8 displayevent, int data1); |
| | | |
| | | #endif /* SDL_displayevents_c_h_ */ |
| | | |
| | | /* vi: set ts=4 sw=4 expandtab: */ |
| | |
| | | SDL_EventState(SDL_TEXTINPUT, SDL_DISABLE); |
| | | SDL_EventState(SDL_TEXTEDITING, SDL_DISABLE); |
| | | SDL_EventState(SDL_SYSWMEVENT, SDL_DISABLE); |
| | | #if 0 /* Leave these events enabled so apps can respond to items being dragged onto them at startup */ |
| | | SDL_EventState(SDL_DROPFILE, SDL_DISABLE); |
| | | SDL_EventState(SDL_DROPTEXT, SDL_DISABLE); |
| | | #endif |
| | | |
| | | SDL_AtomicSet(&SDL_EventQ.active, 1); |
| | | |
| | |
| | | void |
| | | SDL_FlushEvents(Uint32 minType, Uint32 maxType) |
| | | { |
| | | /* !!! FIXME: we need to manually SDL_free() the strings in TEXTINPUT and |
| | | drag'n'drop events if we're flushing them without passing them to the |
| | | app, but I don't know if this is the right place to do that. */ |
| | | |
| | | /* Don't look after we've quit */ |
| | | if (!SDL_AtomicGet(&SDL_EventQ.active)) { |
| | | return; |
| | |
| | | /* Check for joystick state change */ |
| | | if ((!SDL_disabled_events[SDL_JOYAXISMOTION >> 8] || SDL_JoystickEventState(SDL_QUERY))) { |
| | | SDL_JoystickUpdate(); |
| | | } |
| | | #endif |
| | | |
| | | #if !SDL_SENSOR_DISABLED |
| | | /* Check for sensor state change */ |
| | | if (!SDL_disabled_events[SDL_SENSORUPDATE >> 8]) { |
| | | SDL_SensorUpdate(); |
| | | } |
| | | #endif |
| | | |
| | |
| | | Uint8 |
| | | SDL_EventState(Uint32 type, int state) |
| | | { |
| | | const SDL_bool isdnd = ((state == SDL_DISABLE) || (state == SDL_ENABLE)) && |
| | | ((type == SDL_DROPFILE) || (type == SDL_DROPTEXT)); |
| | | Uint8 current_state; |
| | | Uint8 hi = ((type >> 8) & 0xff); |
| | | Uint8 lo = (type & 0xff); |
| | |
| | | } |
| | | } |
| | | |
| | | /* turn off drag'n'drop support if we've disabled the events. |
| | | This might change some UI details at the OS level. */ |
| | | if (isdnd) { |
| | | SDL_ToggleDragAndDropSupport(); |
| | | } |
| | | |
| | | return current_state; |
| | | } |
| | | |
| | |
| | | misrepresented as being the original software. |
| | | 3. This notice may not be removed or altered from any source distribution. |
| | | */ |
| | | |
| | | #ifndef SDL_events_c_h_ |
| | | #define SDL_events_c_h_ |
| | | |
| | | #include "../SDL_internal.h" |
| | | |
| | | /* Useful functions and variables from SDL_events.c */ |
| | | #include "SDL_events.h" |
| | | #include "SDL_thread.h" |
| | | #include "../video/SDL_sysvideo.h" |
| | | |
| | | #include "SDL_clipboardevents_c.h" |
| | | #include "SDL_displayevents_c.h" |
| | | #include "SDL_dropevents_c.h" |
| | | #include "SDL_gesture_c.h" |
| | | #include "SDL_keyboard_c.h" |
| | |
| | | |
| | | extern void SDL_SendPendingQuit(void); |
| | | |
| | | #endif /* SDL_events_c_h_ */ |
| | | |
| | | /* vi: set ts=4 sw=4 expandtab: */ |
| | |
| | | |
| | | /* The mouse state */ |
| | | static SDL_Mouse SDL_mouse; |
| | | static Uint32 SDL_double_click_time = 500; |
| | | static int SDL_double_click_radius = 1; |
| | | |
| | | static int |
| | | SDL_PrivateSendMouseMotion(SDL_Window * window, SDL_MouseID mouseID, int relative, int x, int y); |
| | | |
| | | static void SDLCALL |
| | | SDL_MouseDoubleClickTimeChanged(void *userdata, const char *name, const char *oldValue, const char *hint) |
| | | { |
| | | SDL_Mouse *mouse = (SDL_Mouse *)userdata; |
| | | |
| | | if (hint && *hint) { |
| | | mouse->double_click_time = SDL_atoi(hint); |
| | | } else { |
| | | #ifdef __WIN32__ |
| | | mouse->double_click_time = GetDoubleClickTime(); |
| | | #else |
| | | mouse->double_click_time = 500; |
| | | #endif |
| | | } |
| | | } |
| | | |
| | | static void SDLCALL |
| | | SDL_MouseDoubleClickRadiusChanged(void *userdata, const char *name, const char *oldValue, const char *hint) |
| | | { |
| | | SDL_Mouse *mouse = (SDL_Mouse *)userdata; |
| | | |
| | | if (hint && *hint) { |
| | | mouse->double_click_radius = SDL_atoi(hint); |
| | | } else { |
| | | mouse->double_click_radius = 32; /* 32 pixels seems about right for touch interfaces */ |
| | | } |
| | | } |
| | | |
| | | static void SDLCALL |
| | | SDL_MouseNormalSpeedScaleChanged(void *userdata, const char *name, const char *oldValue, const char *hint) |
| | |
| | | |
| | | SDL_zerop(mouse); |
| | | |
| | | SDL_AddHintCallback(SDL_HINT_MOUSE_DOUBLE_CLICK_TIME, |
| | | SDL_MouseDoubleClickTimeChanged, mouse); |
| | | |
| | | SDL_AddHintCallback(SDL_HINT_MOUSE_DOUBLE_CLICK_RADIUS, |
| | | SDL_MouseDoubleClickRadiusChanged, mouse); |
| | | |
| | | SDL_AddHintCallback(SDL_HINT_MOUSE_NORMAL_SPEED_SCALE, |
| | | SDL_MouseNormalSpeedScaleChanged, mouse); |
| | | |
| | |
| | | SDL_GetMouse(void) |
| | | { |
| | | return &SDL_mouse; |
| | | } |
| | | |
| | | void |
| | | SDL_SetDoubleClickTime(Uint32 interval) |
| | | { |
| | | SDL_double_click_time = interval; |
| | | } |
| | | |
| | | SDL_Window * |
| | |
| | | if (state == SDL_PRESSED) { |
| | | Uint32 now = SDL_GetTicks(); |
| | | |
| | | if (SDL_TICKS_PASSED(now, clickstate->last_timestamp + SDL_double_click_time) || |
| | | SDL_abs(mouse->x - clickstate->last_x) > SDL_double_click_radius || |
| | | SDL_abs(mouse->y - clickstate->last_y) > SDL_double_click_radius) { |
| | | if (SDL_TICKS_PASSED(now, clickstate->last_timestamp + mouse->double_click_time) || |
| | | SDL_abs(mouse->x - clickstate->last_x) > mouse->double_click_radius || |
| | | SDL_abs(mouse->y - clickstate->last_y) > mouse->double_click_radius) { |
| | | clickstate->click_count = 0; |
| | | } |
| | | clickstate->last_timestamp = now; |
| | |
| | | ShouldUseRelativeModeWarp(SDL_Mouse *mouse) |
| | | { |
| | | if (!mouse->SetRelativeMouseMode) { |
| | | SDL_assert(mouse->WarpMouse); /* Need this functionality for relative mode warp implementation */ |
| | | return SDL_TRUE; |
| | | } |
| | | |
| | |
| | | } else if (mouse->SetRelativeMouseMode(enabled) < 0) { |
| | | if (enabled) { |
| | | /* Fall back to warp mode if native relative mode failed */ |
| | | if (!mouse->WarpMouse) { |
| | | return SDL_SetError("No relative mode implementation available"); |
| | | } |
| | | mouse->relative_mode_warp = SDL_TRUE; |
| | | } |
| | | } |
| | |
| | | float relative_speed_scale; |
| | | float scale_accum_x; |
| | | float scale_accum_y; |
| | | Uint32 double_click_time; |
| | | int double_click_radius; |
| | | SDL_bool touch_mouse_events; |
| | | |
| | | /* Data for double-click tracking */ |
| | |
| | | |
| | | /* Get the mouse state structure */ |
| | | SDL_Mouse *SDL_GetMouse(void); |
| | | |
| | | /* Set the default double-click interval */ |
| | | extern void SDL_SetDoubleClickTime(Uint32 interval); |
| | | |
| | | /* Set the default mouse cursor */ |
| | | extern void SDL_SetDefaultCursor(SDL_Cursor * cursor); |
| | |
| | | #include "SDL_events.h" |
| | | #include "SDL_events_c.h" |
| | | #include "SDL_mouse_c.h" |
| | | #include "../video/SDL_sysvideo.h" |
| | | |
| | | |
| | | static int SDLCALL |
| | | RemovePendingResizedEvents(void * userdata, SDL_Event *event) |
| | | RemovePendingSizeChangedAndResizedEvents(void * userdata, SDL_Event *event) |
| | | { |
| | | SDL_Event *new_event = (SDL_Event *)userdata; |
| | | |
| | | if (event->type == SDL_WINDOWEVENT && |
| | | event->window.event == SDL_WINDOWEVENT_RESIZED && |
| | | event->window.windowID == new_event->window.windowID) { |
| | | /* We're about to post a new size event, drop the old one */ |
| | | return 0; |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | static int SDLCALL |
| | | RemovePendingSizeChangedEvents(void * userdata, SDL_Event *event) |
| | | { |
| | | SDL_Event *new_event = (SDL_Event *)userdata; |
| | | |
| | | if (event->type == SDL_WINDOWEVENT && |
| | | event->window.event == SDL_WINDOWEVENT_SIZE_CHANGED && |
| | | (event->window.event == SDL_WINDOWEVENT_SIZE_CHANGED || |
| | | event->window.event == SDL_WINDOWEVENT_RESIZED) && |
| | | event->window.windowID == new_event->window.windowID) { |
| | | /* We're about to post a new size event, drop the old one */ |
| | | return 0; |
| | |
| | | event.window.windowID = window->id; |
| | | |
| | | /* Fixes queue overflow with resize events that aren't processed */ |
| | | if (windowevent == SDL_WINDOWEVENT_RESIZED) { |
| | | SDL_FilterEvents(RemovePendingResizedEvents, &event); |
| | | } |
| | | if (windowevent == SDL_WINDOWEVENT_SIZE_CHANGED) { |
| | | SDL_FilterEvents(RemovePendingSizeChangedEvents, &event); |
| | | SDL_FilterEvents(RemovePendingSizeChangedAndResizedEvents, &event); |
| | | } |
| | | if (windowevent == SDL_WINDOWEVENT_MOVED) { |
| | | SDL_FilterEvents(RemovePendingMoveEvents, &event); |
| | |
| | | misrepresented as being the original software. |
| | | 3. This notice may not be removed or altered from any source distribution. |
| | | */ |
| | | |
| | | #ifndef scancodes_xfree86_h_ |
| | | #define scancodes_xfree86_h_ |
| | | |
| | | #include "../../include/SDL_scancode.h" |
| | | |
| | | /* XFree86 key code to SDL scancode mapping table |
| | |
| | | /* 80 */ SDL_SCANCODE_F12, |
| | | }; |
| | | |
| | | #endif /* scancodes_xfree86_h_ */ |
| | | |
| | | /* *INDENT-ON* */ |
| | |
| | | void |
| | | SDL_HapticQuit(void) |
| | | { |
| | | while (SDL_haptics) { |
| | | SDL_HapticClose(SDL_haptics); |
| | | } |
| | | |
| | | SDL_SYS_HapticQuit(); |
| | | SDL_assert(SDL_haptics == NULL); |
| | | SDL_haptics = NULL; |
| | | } |
| | | |
| | | /* |
| | |
| | | SDL_zerop(efx); |
| | | if (haptic->supported & SDL_HAPTIC_SINE) { |
| | | efx->type = SDL_HAPTIC_SINE; |
| | | efx->periodic.direction.type = SDL_HAPTIC_CARTESIAN; |
| | | efx->periodic.period = 1000; |
| | | efx->periodic.magnitude = 0x4000; |
| | | efx->periodic.length = 5000; |
| | |
| | | 3. This notice may not be removed or altered from any source distribution. |
| | | */ |
| | | |
| | | #ifndef SDL_haptic_c_h_ |
| | | #define SDL_haptic_c_h_ |
| | | |
| | | extern int SDL_HapticInit(void); |
| | | extern void SDL_HapticQuit(void); |
| | | |
| | | #endif /* SDL_haptic_c_h_ */ |
| | | |
| | | /* vi: set ts=4 sw=4 expandtab: */ |
| | |
| | | void |
| | | SDL_SYS_HapticQuit(void) |
| | | { |
| | | /* We don't have any way to scan for joysticks (and their vibrators) at init, so don't wipe the list |
| | | * of joysticks here in case this is a reinit. |
| | | */ |
| | | #if 0 |
| | | SDL_hapticlist_item *item = NULL; |
| | | SDL_hapticlist_item *next = NULL; |
| | | |
| | |
| | | SDL_hapticlist = SDL_hapticlist_tail = NULL; |
| | | numhaptics = 0; |
| | | return; |
| | | #endif |
| | | } |
| | | |
| | | |
| | |
| | | SDL_SYS_HapticRunEffect(SDL_Haptic * haptic, struct haptic_effect *effect, |
| | | Uint32 iterations) |
| | | { |
| | | Android_JNI_HapticRun (((SDL_hapticlist_item *)haptic->hwdata)->device_id, effect->effect.leftright.length); |
| | | float large = effect->effect.leftright.large_magnitude / 32767.0f; |
| | | float small = effect->effect.leftright.small_magnitude / 32767.0f; |
| | | |
| | | float total = (large * 0.6f) + (small * 0.4f); |
| | | |
| | | Android_JNI_HapticRun (((SDL_hapticlist_item *)haptic->hwdata)->device_id, total, effect->effect.leftright.length); |
| | | return 0; |
| | | } |
| | | |
| | |
| | | int |
| | | SDL_SYS_HapticStopEffect(SDL_Haptic * haptic, struct haptic_effect *effect) |
| | | { |
| | | Android_JNI_HapticStop (((SDL_hapticlist_item *)haptic->hwdata)->device_id); |
| | | return 0; |
| | | } |
| | | |
| | |
| | | SDL_UDEV_Quit(); |
| | | return SDL_SetError("Could not setup haptic <-> udev callback"); |
| | | } |
| | | |
| | | /* Force a scan to build the initial device list */ |
| | | SDL_UDEV_Scan(); |
| | | #endif /* SDL_USE_LIBUDEV */ |
| | | |
| | | return numhaptics; |
| | |
| | | else if (periodic->type == SDL_HAPTIC_SAWTOOTHDOWN) |
| | | dest->u.periodic.waveform = FF_SAW_DOWN; |
| | | dest->u.periodic.period = CLAMP(periodic->period); |
| | | dest->u.periodic.magnitude = periodic->magnitude; |
| | | /* Linux expects 0-65535, so multiply by 2 */ |
| | | dest->u.periodic.magnitude = CLAMP(periodic->magnitude) * 2; |
| | | dest->u.periodic.offset = periodic->offset; |
| | | /* Linux phase is defined in interval "[0x0000, 0x10000[", corresponds with "[0deg, 360deg[" phase shift. */ |
| | | dest->u.periodic.phase = ((Uint32)periodic->phase * 0x10000U) / 36000; |
| | |
| | | dest->trigger.button = 0; |
| | | dest->trigger.interval = 0; |
| | | |
| | | /* Rumble */ |
| | | dest->u.rumble.strong_magnitude = leftright->large_magnitude; |
| | | dest->u.rumble.weak_magnitude = leftright->small_magnitude; |
| | | /* Rumble (Linux expects 0-65535, so multiply by 2) */ |
| | | dest->u.rumble.strong_magnitude = CLAMP(leftright->large_magnitude) * 2; |
| | | dest->u.rumble.weak_magnitude = CLAMP(leftright->small_magnitude) * 2; |
| | | |
| | | break; |
| | | |
| | |
| | | int |
| | | SDL_SYS_JoystickIsHaptic(SDL_Joystick * joystick) |
| | | { |
| | | const struct joystick_hwdata *hwdata = joystick->hwdata; |
| | | if (joystick->driver != &SDL_WINDOWS_JoystickDriver) { |
| | | return 0; |
| | | } |
| | | #if SDL_HAPTIC_XINPUT |
| | | if (hwdata->bXInputHaptic) { |
| | | if (joystick->hwdata->bXInputHaptic) { |
| | | return 1; |
| | | } |
| | | #endif |
| | | #if SDL_HAPTIC_DINPUT |
| | | if (hwdata->Capabilities.dwFlags & DIDC_FORCEFEEDBACK) { |
| | | if (joystick->hwdata->Capabilities.dwFlags & DIDC_FORCEFEEDBACK) { |
| | | return 1; |
| | | } |
| | | #endif |
| | |
| | | int |
| | | SDL_SYS_JoystickSameHaptic(SDL_Haptic * haptic, SDL_Joystick * joystick) |
| | | { |
| | | if (joystick->driver != &SDL_WINDOWS_JoystickDriver) { |
| | | return 0; |
| | | } |
| | | if (joystick->hwdata->bXInputHaptic != haptic->hwdata->bXInputHaptic) { |
| | | return 0; /* one is XInput, one is not; not the same device. */ |
| | | } else if (joystick->hwdata->bXInputHaptic) { |
| | |
| | | int |
| | | SDL_SYS_HapticOpenFromJoystick(SDL_Haptic * haptic, SDL_Joystick * joystick) |
| | | { |
| | | SDL_assert(joystick->driver == &SDL_WINDOWS_JoystickDriver); |
| | | |
| | | if (joystick->hwdata->bXInputDevice) { |
| | | return SDL_XINPUT_HapticOpenFromJoystick(haptic, joystick); |
| | | } else { |
| New file |
| | |
| | | |
| | | HIDAPI Authors: |
| | | |
| | | Alan Ott <alan@signal11.us>: |
| | | Original Author and Maintainer |
| | | Linux, Windows, and Mac implementations |
| | | |
| | | Ludovic Rousseau <rousseau@debian.org>: |
| | | Formatting for Doxygen documentation |
| | | Bug fixes |
| | | Correctness fixes |
| | | |
| | | |
| | | For a comprehensive list of contributions, see the commit list at github: |
| | | http://github.com/signal11/hidapi/commits/master |
| | | |
| New file |
| | |
| | | This file is mostly for the maintainer. |
| | | |
| | | 1. Build hidapi.dll |
| | | 2. Build hidtest.exe in DEBUG and RELEASE |
| | | 3. Commit all |
| | | |
| | | 4. Run the Following |
| | | export VERSION=0.1.0 |
| | | export TAG_NAME=hidapi-$VERSION |
| | | git tag $TAG_NAME |
| | | git archive --format zip --prefix $TAG_NAME/ $TAG_NAME >../$TAG_NAME.zip |
| | | 5. Test the zip file. |
| | | 6. Run the following: |
| | | git push origin $TAG_NAME |
| | | |
| New file |
| | |
| | | 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. |
| New file |
| | |
| | | GNU GENERAL PUBLIC LICENSE |
| | | Version 3, 29 June 2007 |
| | | |
| | | Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> |
| | | Everyone is permitted to copy and distribute verbatim copies |
| | | of this license document, but changing it is not allowed. |
| | | |
| | | Preamble |
| | | |
| | | The GNU General Public License is a free, copyleft license for |
| | | software and other kinds of works. |
| | | |
| | | The licenses for most software and other practical works are designed |
| | | to take away your freedom to share and change the works. By contrast, |
| | | the GNU General Public License is intended to guarantee your freedom to |
| | | share and change all versions of a program--to make sure it remains free |
| | | software for all its users. We, the Free Software Foundation, use the |
| | | GNU General Public License for most of our software; it applies also to |
| | | any other work released this way by its authors. You can apply it to |
| | | your programs, too. |
| | | |
| | | When we speak of free software, we are referring to freedom, not |
| | | price. Our General Public Licenses are designed to make sure that you |
| | | have the freedom to distribute copies of free software (and charge for |
| | | them if you wish), that you receive source code or can get it if you |
| | | want it, that you can change the software or use pieces of it in new |
| | | free programs, and that you know you can do these things. |
| | | |
| | | To protect your rights, we need to prevent others from denying you |
| | | these rights or asking you to surrender the rights. Therefore, you have |
| | | certain responsibilities if you distribute copies of the software, or if |
| | | you modify it: responsibilities to respect the freedom of others. |
| | | |
| | | For example, if you distribute copies of such a program, whether |
| | | gratis or for a fee, you must pass on to the recipients the same |
| | | freedoms that you received. You must make sure that they, too, receive |
| | | or can get the source code. And you must show them these terms so they |
| | | know their rights. |
| | | |
| | | Developers that use the GNU GPL protect your rights with two steps: |
| | | (1) assert copyright on the software, and (2) offer you this License |
| | | giving you legal permission to copy, distribute and/or modify it. |
| | | |
| | | For the developers' and authors' protection, the GPL clearly explains |
| | | that there is no warranty for this free software. For both users' and |
| | | authors' sake, the GPL requires that modified versions be marked as |
| | | changed, so that their problems will not be attributed erroneously to |
| | | authors of previous versions. |
| | | |
| | | Some devices are designed to deny users access to install or run |
| | | modified versions of the software inside them, although the manufacturer |
| | | can do so. This is fundamentally incompatible with the aim of |
| | | protecting users' freedom to change the software. The systematic |
| | | pattern of such abuse occurs in the area of products for individuals to |
| | | use, which is precisely where it is most unacceptable. Therefore, we |
| | | have designed this version of the GPL to prohibit the practice for those |
| | | products. If such problems arise substantially in other domains, we |
| | | stand ready to extend this provision to those domains in future versions |
| | | of the GPL, as needed to protect the freedom of users. |
| | | |
| | | Finally, every program is threatened constantly by software patents. |
| | | States should not allow patents to restrict development and use of |
| | | software on general-purpose computers, but in those that do, we wish to |
| | | avoid the special danger that patents applied to a free program could |
| | | make it effectively proprietary. To prevent this, the GPL assures that |
| | | patents cannot be used to render the program non-free. |
| | | |
| | | The precise terms and conditions for copying, distribution and |
| | | modification follow. |
| | | |
| | | TERMS AND CONDITIONS |
| | | |
| | | 0. Definitions. |
| | | |
| | | "This License" refers to version 3 of the GNU General Public License. |
| | | |
| | | "Copyright" also means copyright-like laws that apply to other kinds of |
| | | works, such as semiconductor masks. |
| | | |
| | | "The Program" refers to any copyrightable work licensed under this |
| | | License. Each licensee is addressed as "you". "Licensees" and |
| | | "recipients" may be individuals or organizations. |
| | | |
| | | To "modify" a work means to copy from or adapt all or part of the work |
| | | in a fashion requiring copyright permission, other than the making of an |
| | | exact copy. The resulting work is called a "modified version" of the |
| | | earlier work or a work "based on" the earlier work. |
| | | |
| | | A "covered work" means either the unmodified Program or a work based |
| | | on the Program. |
| | | |
| | | To "propagate" a work means to do anything with it that, without |
| | | permission, would make you directly or secondarily liable for |
| | | infringement under applicable copyright law, except executing it on a |
| | | computer or modifying a private copy. Propagation includes copying, |
| | | distribution (with or without modification), making available to the |
| | | public, and in some countries other activities as well. |
| | | |
| | | To "convey" a work means any kind of propagation that enables other |
| | | parties to make or receive copies. Mere interaction with a user through |
| | | a computer network, with no transfer of a copy, is not conveying. |
| | | |
| | | An interactive user interface displays "Appropriate Legal Notices" |
| | | to the extent that it includes a convenient and prominently visible |
| | | feature that (1) displays an appropriate copyright notice, and (2) |
| | | tells the user that there is no warranty for the work (except to the |
| | | extent that warranties are provided), that licensees may convey the |
| | | work under this License, and how to view a copy of this License. If |
| | | the interface presents a list of user commands or options, such as a |
| | | menu, a prominent item in the list meets this criterion. |
| | | |
| | | 1. Source Code. |
| | | |
| | | The "source code" for a work means the preferred form of the work |
| | | for making modifications to it. "Object code" means any non-source |
| | | form of a work. |
| | | |
| | | A "Standard Interface" means an interface that either is an official |
| | | standard defined by a recognized standards body, or, in the case of |
| | | interfaces specified for a particular programming language, one that |
| | | is widely used among developers working in that language. |
| | | |
| | | The "System Libraries" of an executable work include anything, other |
| | | than the work as a whole, that (a) is included in the normal form of |
| | | packaging a Major Component, but which is not part of that Major |
| | | Component, and (b) serves only to enable use of the work with that |
| | | Major Component, or to implement a Standard Interface for which an |
| | | implementation is available to the public in source code form. A |
| | | "Major Component", in this context, means a major essential component |
| | | (kernel, window system, and so on) of the specific operating system |
| | | (if any) on which the executable work runs, or a compiler used to |
| | | produce the work, or an object code interpreter used to run it. |
| | | |
| | | The "Corresponding Source" for a work in object code form means all |
| | | the source code needed to generate, install, and (for an executable |
| | | work) run the object code and to modify the work, including scripts to |
| | | control those activities. However, it does not include the work's |
| | | System Libraries, or general-purpose tools or generally available free |
| | | programs which are used unmodified in performing those activities but |
| | | which are not part of the work. For example, Corresponding Source |
| | | includes interface definition files associated with source files for |
| | | the work, and the source code for shared libraries and dynamically |
| | | linked subprograms that the work is specifically designed to require, |
| | | such as by intimate data communication or control flow between those |
| | | subprograms and other parts of the work. |
| | | |
| | | The Corresponding Source need not include anything that users |
| | | can regenerate automatically from other parts of the Corresponding |
| | | Source. |
| | | |
| | | The Corresponding Source for a work in source code form is that |
| | | same work. |
| | | |
| | | 2. Basic Permissions. |
| | | |
| | | All rights granted under this License are granted for the term of |
| | | copyright on the Program, and are irrevocable provided the stated |
| | | conditions are met. This License explicitly affirms your unlimited |
| | | permission to run the unmodified Program. The output from running a |
| | | covered work is covered by this License only if the output, given its |
| | | content, constitutes a covered work. This License acknowledges your |
| | | rights of fair use or other equivalent, as provided by copyright law. |
| | | |
| | | You may make, run and propagate covered works that you do not |
| | | convey, without conditions so long as your license otherwise remains |
| | | in force. You may convey covered works to others for the sole purpose |
| | | of having them make modifications exclusively for you, or provide you |
| | | with facilities for running those works, provided that you comply with |
| | | the terms of this License in conveying all material for which you do |
| | | not control copyright. Those thus making or running the covered works |
| | | for you must do so exclusively on your behalf, under your direction |
| | | and control, on terms that prohibit them from making any copies of |
| | | your copyrighted material outside their relationship with you. |
| | | |
| | | Conveying under any other circumstances is permitted solely under |
| | | the conditions stated below. Sublicensing is not allowed; section 10 |
| | | makes it unnecessary. |
| | | |
| | | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. |
| | | |
| | | No covered work shall be deemed part of an effective technological |
| | | measure under any applicable law fulfilling obligations under article |
| | | 11 of the WIPO copyright treaty adopted on 20 December 1996, or |
| | | similar laws prohibiting or restricting circumvention of such |
| | | measures. |
| | | |
| | | When you convey a covered work, you waive any legal power to forbid |
| | | circumvention of technological measures to the extent such circumvention |
| | | is effected by exercising rights under this License with respect to |
| | | the covered work, and you disclaim any intention to limit operation or |
| | | modification of the work as a means of enforcing, against the work's |
| | | users, your or third parties' legal rights to forbid circumvention of |
| | | technological measures. |
| | | |
| | | 4. Conveying Verbatim Copies. |
| | | |
| | | You may convey verbatim copies of the Program's source code as you |
| | | receive it, in any medium, provided that you conspicuously and |
| | | appropriately publish on each copy an appropriate copyright notice; |
| | | keep intact all notices stating that this License and any |
| | | non-permissive terms added in accord with section 7 apply to the code; |
| | | keep intact all notices of the absence of any warranty; and give all |
| | | recipients a copy of this License along with the Program. |
| | | |
| | | You may charge any price or no price for each copy that you convey, |
| | | and you may offer support or warranty protection for a fee. |
| | | |
| | | 5. Conveying Modified Source Versions. |
| | | |
| | | You may convey a work based on the Program, or the modifications to |
| | | produce it from the Program, in the form of source code under the |
| | | terms of section 4, provided that you also meet all of these conditions: |
| | | |
| | | a) The work must carry prominent notices stating that you modified |
| | | it, and giving a relevant date. |
| | | |
| | | b) The work must carry prominent notices stating that it is |
| | | released under this License and any conditions added under section |
| | | 7. This requirement modifies the requirement in section 4 to |
| | | "keep intact all notices". |
| | | |
| | | c) You must license the entire work, as a whole, under this |
| | | License to anyone who comes into possession of a copy. This |
| | | License will therefore apply, along with any applicable section 7 |
| | | additional terms, to the whole of the work, and all its parts, |
| | | regardless of how they are packaged. This License gives no |
| | | permission to license the work in any other way, but it does not |
| | | invalidate such permission if you have separately received it. |
| | | |
| | | d) If the work has interactive user interfaces, each must display |
| | | Appropriate Legal Notices; however, if the Program has interactive |
| | | interfaces that do not display Appropriate Legal Notices, your |
| | | work need not make them do so. |
| | | |
| | | A compilation of a covered work with other separate and independent |
| | | works, which are not by their nature extensions of the covered work, |
| | | and which are not combined with it such as to form a larger program, |
| | | in or on a volume of a storage or distribution medium, is called an |
| | | "aggregate" if the compilation and its resulting copyright are not |
| | | used to limit the access or legal rights of the compilation's users |
| | | beyond what the individual works permit. Inclusion of a covered work |
| | | in an aggregate does not cause this License to apply to the other |
| | | parts of the aggregate. |
| | | |
| | | 6. Conveying Non-Source Forms. |
| | | |
| | | You may convey a covered work in object code form under the terms |
| | | of sections 4 and 5, provided that you also convey the |
| | | machine-readable Corresponding Source under the terms of this License, |
| | | in one of these ways: |
| | | |
| | | a) Convey the object code in, or embodied in, a physical product |
| | | (including a physical distribution medium), accompanied by the |
| | | Corresponding Source fixed on a durable physical medium |
| | | customarily used for software interchange. |
| | | |
| | | b) Convey the object code in, or embodied in, a physical product |
| | | (including a physical distribution medium), accompanied by a |
| | | written offer, valid for at least three years and valid for as |
| | | long as you offer spare parts or customer support for that product |
| | | model, to give anyone who possesses the object code either (1) a |
| | | copy of the Corresponding Source for all the software in the |
| | | product that is covered by this License, on a durable physical |
| | | medium customarily used for software interchange, for a price no |
| | | more than your reasonable cost of physically performing this |
| | | conveying of source, or (2) access to copy the |
| | | Corresponding Source from a network server at no charge. |
| | | |
| | | c) Convey individual copies of the object code with a copy of the |
| | | written offer to provide the Corresponding Source. This |
| | | alternative is allowed only occasionally and noncommercially, and |
| | | only if you received the object code with such an offer, in accord |
| | | with subsection 6b. |
| | | |
| | | d) Convey the object code by offering access from a designated |
| | | place (gratis or for a charge), and offer equivalent access to the |
| | | Corresponding Source in the same way through the same place at no |
| | | further charge. You need not require recipients to copy the |
| | | Corresponding Source along with the object code. If the place to |
| | | copy the object code is a network server, the Corresponding Source |
| | | may be on a different server (operated by you or a third party) |
| | | that supports equivalent copying facilities, provided you maintain |
| | | clear directions next to the object code saying where to find the |
| | | Corresponding Source. Regardless of what server hosts the |
| | | Corresponding Source, you remain obligated to ensure that it is |
| | | available for as long as needed to satisfy these requirements. |
| | | |
| | | e) Convey the object code using peer-to-peer transmission, provided |
| | | you inform other peers where the object code and Corresponding |
| | | Source of the work are being offered to the general public at no |
| | | charge under subsection 6d. |
| | | |
| | | A separable portion of the object code, whose source code is excluded |
| | | from the Corresponding Source as a System Library, need not be |
| | | included in conveying the object code work. |
| | | |
| | | A "User Product" is either (1) a "consumer product", which means any |
| | | tangible personal property which is normally used for personal, family, |
| | | or household purposes, or (2) anything designed or sold for incorporation |
| | | into a dwelling. In determining whether a product is a consumer product, |
| | | doubtful cases shall be resolved in favor of coverage. For a particular |
| | | product received by a particular user, "normally used" refers to a |
| | | typical or common use of that class of product, regardless of the status |
| | | of the particular user or of the way in which the particular user |
| | | actually uses, or expects or is expected to use, the product. A product |
| | | is a consumer product regardless of whether the product has substantial |
| | | commercial, industrial or non-consumer uses, unless such uses represent |
| | | the only significant mode of use of the product. |
| | | |
| | | "Installation Information" for a User Product means any methods, |
| | | procedures, authorization keys, or other information required to install |
| | | and execute modified versions of a covered work in that User Product from |
| | | a modified version of its Corresponding Source. The information must |
| | | suffice to ensure that the continued functioning of the modified object |
| | | code is in no case prevented or interfered with solely because |
| | | modification has been made. |
| | | |
| | | If you convey an object code work under this section in, or with, or |
| | | specifically for use in, a User Product, and the conveying occurs as |
| | | part of a transaction in which the right of possession and use of the |
| | | User Product is transferred to the recipient in perpetuity or for a |
| | | fixed term (regardless of how the transaction is characterized), the |
| | | Corresponding Source conveyed under this section must be accompanied |
| | | by the Installation Information. But this requirement does not apply |
| | | if neither you nor any third party retains the ability to install |
| | | modified object code on the User Product (for example, the work has |
| | | been installed in ROM). |
| | | |
| | | The requirement to provide Installation Information does not include a |
| | | requirement to continue to provide support service, warranty, or updates |
| | | for a work that has been modified or installed by the recipient, or for |
| | | the User Product in which it has been modified or installed. Access to a |
| | | network may be denied when the modification itself materially and |
| | | adversely affects the operation of the network or violates the rules and |
| | | protocols for communication across the network. |
| | | |
| | | Corresponding Source conveyed, and Installation Information provided, |
| | | in accord with this section must be in a format that is publicly |
| | | documented (and with an implementation available to the public in |
| | | source code form), and must require no special password or key for |
| | | unpacking, reading or copying. |
| | | |
| | | 7. Additional Terms. |
| | | |
| | | "Additional permissions" are terms that supplement the terms of this |
| | | License by making exceptions from one or more of its conditions. |
| | | Additional permissions that are applicable to the entire Program shall |
| | | be treated as though they were included in this License, to the extent |
| | | that they are valid under applicable law. If additional permissions |
| | | apply only to part of the Program, that part may be used separately |
| | | under those permissions, but the entire Program remains governed by |
| | | this License without regard to the additional permissions. |
| | | |
| | | When you convey a copy of a covered work, you may at your option |
| | | remove any additional permissions from that copy, or from any part of |
| | | it. (Additional permissions may be written to require their own |
| | | removal in certain cases when you modify the work.) You may place |
| | | additional permissions on material, added by you to a covered work, |
| | | for which you have or can give appropriate copyright permission. |
| | | |
| | | Notwithstanding any other provision of this License, for material you |
| | | add to a covered work, you may (if authorized by the copyright holders of |
| | | that material) supplement the terms of this License with terms: |
| | | |
| | | a) Disclaiming warranty or limiting liability differently from the |
| | | terms of sections 15 and 16 of this License; or |
| | | |
| | | b) Requiring preservation of specified reasonable legal notices or |
| | | author attributions in that material or in the Appropriate Legal |
| | | Notices displayed by works containing it; or |
| | | |
| | | c) Prohibiting misrepresentation of the origin of that material, or |
| | | requiring that modified versions of such material be marked in |
| | | reasonable ways as different from the original version; or |
| | | |
| | | d) Limiting the use for publicity purposes of names of licensors or |
| | | authors of the material; or |
| | | |
| | | e) Declining to grant rights under trademark law for use of some |
| | | trade names, trademarks, or service marks; or |
| | | |
| | | f) Requiring indemnification of licensors and authors of that |
| | | material by anyone who conveys the material (or modified versions of |
| | | it) with contractual assumptions of liability to the recipient, for |
| | | any liability that these contractual assumptions directly impose on |
| | | those licensors and authors. |
| | | |
| | | All other non-permissive additional terms are considered "further |
| | | restrictions" within the meaning of section 10. If the Program as you |
| | | received it, or any part of it, contains a notice stating that it is |
| | | governed by this License along with a term that is a further |
| | | restriction, you may remove that term. If a license document contains |
| | | a further restriction but permits relicensing or conveying under this |
| | | License, you may add to a covered work material governed by the terms |
| | | of that license document, provided that the further restriction does |
| | | not survive such relicensing or conveying. |
| | | |
| | | If you add terms to a covered work in accord with this section, you |
| | | must place, in the relevant source files, a statement of the |
| | | additional terms that apply to those files, or a notice indicating |
| | | where to find the applicable terms. |
| | | |
| | | Additional terms, permissive or non-permissive, may be stated in the |
| | | form of a separately written license, or stated as exceptions; |
| | | the above requirements apply either way. |
| | | |
| | | 8. Termination. |
| | | |
| | | You may not propagate or modify a covered work except as expressly |
| | | provided under this License. Any attempt otherwise to propagate or |
| | | modify it is void, and will automatically terminate your rights under |
| | | this License (including any patent licenses granted under the third |
| | | paragraph of section 11). |
| | | |
| | | However, if you cease all violation of this License, then your |
| | | license from a particular copyright holder is reinstated (a) |
| | | provisionally, unless and until the copyright holder explicitly and |
| | | finally terminates your license, and (b) permanently, if the copyright |
| | | holder fails to notify you of the violation by some reasonable means |
| | | prior to 60 days after the cessation. |
| | | |
| | | Moreover, your license from a particular copyright holder is |
| | | reinstated permanently if the copyright holder notifies you of the |
| | | violation by some reasonable means, this is the first time you have |
| | | received notice of violation of this License (for any work) from that |
| | | copyright holder, and you cure the violation prior to 30 days after |
| | | your receipt of the notice. |
| | | |
| | | Termination of your rights under this section does not terminate the |
| | | licenses of parties who have received copies or rights from you under |
| | | this License. If your rights have been terminated and not permanently |
| | | reinstated, you do not qualify to receive new licenses for the same |
| | | material under section 10. |
| | | |
| | | 9. Acceptance Not Required for Having Copies. |
| | | |
| | | You are not required to accept this License in order to receive or |
| | | run a copy of the Program. Ancillary propagation of a covered work |
| | | occurring solely as a consequence of using peer-to-peer transmission |
| | | to receive a copy likewise does not require acceptance. However, |
| | | nothing other than this License grants you permission to propagate or |
| | | modify any covered work. These actions infringe copyright if you do |
| | | not accept this License. Therefore, by modifying or propagating a |
| | | covered work, you indicate your acceptance of this License to do so. |
| | | |
| | | 10. Automatic Licensing of Downstream Recipients. |
| | | |
| | | Each time you convey a covered work, the recipient automatically |
| | | receives a license from the original licensors, to run, modify and |
| | | propagate that work, subject to this License. You are not responsible |
| | | for enforcing compliance by third parties with this License. |
| | | |
| | | An "entity transaction" is a transaction transferring control of an |
| | | organization, or substantially all assets of one, or subdividing an |
| | | organization, or merging organizations. If propagation of a covered |
| | | work results from an entity transaction, each party to that |
| | | transaction who receives a copy of the work also receives whatever |
| | | licenses to the work the party's predecessor in interest had or could |
| | | give under the previous paragraph, plus a right to possession of the |
| | | Corresponding Source of the work from the predecessor in interest, if |
| | | the predecessor has it or can get it with reasonable efforts. |
| | | |
| | | You may not impose any further restrictions on the exercise of the |
| | | rights granted or affirmed under this License. For example, you may |
| | | not impose a license fee, royalty, or other charge for exercise of |
| | | rights granted under this License, and you may not initiate litigation |
| | | (including a cross-claim or counterclaim in a lawsuit) alleging that |
| | | any patent claim is infringed by making, using, selling, offering for |
| | | sale, or importing the Program or any portion of it. |
| | | |
| | | 11. Patents. |
| | | |
| | | A "contributor" is a copyright holder who authorizes use under this |
| | | License of the Program or a work on which the Program is based. The |
| | | work thus licensed is called the contributor's "contributor version". |
| | | |
| | | A contributor's "essential patent claims" are all patent claims |
| | | owned or controlled by the contributor, whether already acquired or |
| | | hereafter acquired, that would be infringed by some manner, permitted |
| | | by this License, of making, using, or selling its contributor version, |
| | | but do not include claims that would be infringed only as a |
| | | consequence of further modification of the contributor version. For |
| | | purposes of this definition, "control" includes the right to grant |
| | | patent sublicenses in a manner consistent with the requirements of |
| | | this License. |
| | | |
| | | Each contributor grants you a non-exclusive, worldwide, royalty-free |
| | | patent license under the contributor's essential patent claims, to |
| | | make, use, sell, offer for sale, import and otherwise run, modify and |
| | | propagate the contents of its contributor version. |
| | | |
| | | In the following three paragraphs, a "patent license" is any express |
| | | agreement or commitment, however denominated, not to enforce a patent |
| | | (such as an express permission to practice a patent or covenant not to |
| | | sue for patent infringement). To "grant" such a patent license to a |
| | | party means to make such an agreement or commitment not to enforce a |
| | | patent against the party. |
| | | |
| | | If you convey a covered work, knowingly relying on a patent license, |
| | | and the Corresponding Source of the work is not available for anyone |
| | | to copy, free of charge and under the terms of this License, through a |
| | | publicly available network server or other readily accessible means, |
| | | then you must either (1) cause the Corresponding Source to be so |
| | | available, or (2) arrange to deprive yourself of the benefit of the |
| | | patent license for this particular work, or (3) arrange, in a manner |
| | | consistent with the requirements of this License, to extend the patent |
| | | license to downstream recipients. "Knowingly relying" means you have |
| | | actual knowledge that, but for the patent license, your conveying the |
| | | covered work in a country, or your recipient's use of the covered work |
| | | in a country, would infringe one or more identifiable patents in that |
| | | country that you have reason to believe are valid. |
| | | |
| | | If, pursuant to or in connection with a single transaction or |
| | | arrangement, you convey, or propagate by procuring conveyance of, a |
| | | covered work, and grant a patent license to some of the parties |
| | | receiving the covered work authorizing them to use, propagate, modify |
| | | or convey a specific copy of the covered work, then the patent license |
| | | you grant is automatically extended to all recipients of the covered |
| | | work and works based on it. |
| | | |
| | | A patent license is "discriminatory" if it does not include within |
| | | the scope of its coverage, prohibits the exercise of, or is |
| | | conditioned on the non-exercise of one or more of the rights that are |
| | | specifically granted under this License. You may not convey a covered |
| | | work if you are a party to an arrangement with a third party that is |
| | | in the business of distributing software, under which you make payment |
| | | to the third party based on the extent of your activity of conveying |
| | | the work, and under which the third party grants, to any of the |
| | | parties who would receive the covered work from you, a discriminatory |
| | | patent license (a) in connection with copies of the covered work |
| | | conveyed by you (or copies made from those copies), or (b) primarily |
| | | for and in connection with specific products or compilations that |
| | | contain the covered work, unless you entered into that arrangement, |
| | | or that patent license was granted, prior to 28 March 2007. |
| | | |
| | | Nothing in this License shall be construed as excluding or limiting |
| | | any implied license or other defenses to infringement that may |
| | | otherwise be available to you under applicable patent law. |
| | | |
| | | 12. No Surrender of Others' Freedom. |
| | | |
| | | If conditions are imposed on you (whether by court order, agreement or |
| | | otherwise) that contradict the conditions of this License, they do not |
| | | excuse you from the conditions of this License. If you cannot convey a |
| | | covered work so as to satisfy simultaneously your obligations under this |
| | | License and any other pertinent obligations, then as a consequence you may |
| | | not convey it at all. For example, if you agree to terms that obligate you |
| | | to collect a royalty for further conveying from those to whom you convey |
| | | the Program, the only way you could satisfy both those terms and this |
| | | License would be to refrain entirely from conveying the Program. |
| | | |
| | | 13. Use with the GNU Affero General Public License. |
| | | |
| | | Notwithstanding any other provision of this License, you have |
| | | permission to link or combine any covered work with a work licensed |
| | | under version 3 of the GNU Affero General Public License into a single |
| | | combined work, and to convey the resulting work. The terms of this |
| | | License will continue to apply to the part which is the covered work, |
| | | but the special requirements of the GNU Affero General Public License, |
| | | section 13, concerning interaction through a network will apply to the |
| | | combination as such. |
| | | |
| | | 14. Revised Versions of this License. |
| | | |
| | | The Free Software Foundation may publish revised and/or new versions of |
| | | the GNU General Public License from time to time. Such new versions will |
| | | be similar in spirit to the present version, but may differ in detail to |
| | | address new problems or concerns. |
| | | |
| | | Each version is given a distinguishing version number. If the |
| | | Program specifies that a certain numbered version of the GNU General |
| | | Public License "or any later version" applies to it, you have the |
| | | option of following the terms and conditions either of that numbered |
| | | version or of any later version published by the Free Software |
| | | Foundation. If the Program does not specify a version number of the |
| | | GNU General Public License, you may choose any version ever published |
| | | by the Free Software Foundation. |
| | | |
| | | If the Program specifies that a proxy can decide which future |
| | | versions of the GNU General Public License can be used, that proxy's |
| | | public statement of acceptance of a version permanently authorizes you |
| | | to choose that version for the Program. |
| | | |
| | | Later license versions may give you additional or different |
| | | permissions. However, no additional obligations are imposed on any |
| | | author or copyright holder as a result of your choosing to follow a |
| | | later version. |
| | | |
| | | 15. Disclaimer of Warranty. |
| | | |
| | | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY |
| | | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT |
| | | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY |
| | | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, |
| | | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
| | | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM |
| | | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF |
| | | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. |
| | | |
| | | 16. Limitation of Liability. |
| | | |
| | | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING |
| | | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS |
| | | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY |
| | | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE |
| | | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF |
| | | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD |
| | | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), |
| | | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF |
| | | SUCH DAMAGES. |
| | | |
| | | 17. Interpretation of Sections 15 and 16. |
| | | |
| | | If the disclaimer of warranty and limitation of liability provided |
| | | above cannot be given local legal effect according to their terms, |
| | | reviewing courts shall apply local law that most closely approximates |
| | | an absolute waiver of all civil liability in connection with the |
| | | Program, unless a warranty or assumption of liability accompanies a |
| | | copy of the Program in return for a fee. |
| | | |
| | | END OF TERMS AND CONDITIONS |
| | | |
| | | How to Apply These Terms to Your New Programs |
| | | |
| | | If you develop a new program, and you want it to be of the greatest |
| | | possible use to the public, the best way to achieve this is to make it |
| | | free software which everyone can redistribute and change under these terms. |
| | | |
| | | To do so, attach the following notices to the program. It is safest |
| | | to attach them to the start of each source file to most effectively |
| | | state the exclusion of warranty; and each file should have at least |
| | | the "copyright" line and a pointer to where the full notice is found. |
| | | |
| | | <one line to give the program's name and a brief idea of what it does.> |
| | | Copyright (C) <year> <name of author> |
| | | |
| | | This program is free software: you can redistribute it and/or modify |
| | | it under the terms of the GNU General Public License as published by |
| | | the Free Software Foundation, either version 3 of the License, or |
| | | (at your option) any later version. |
| | | |
| | | This program is distributed in the hope that it will be useful, |
| | | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| | | GNU General Public License for more details. |
| | | |
| | | You should have received a copy of the GNU General Public License |
| | | along with this program. If not, see <http://www.gnu.org/licenses/>. |
| | | |
| | | Also add information on how to contact you by electronic and paper mail. |
| | | |
| | | If the program does terminal interaction, make it output a short |
| | | notice like this when it starts in an interactive mode: |
| | | |
| | | <program> Copyright (C) <year> <name of author> |
| | | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. |
| | | This is free software, and you are welcome to redistribute it |
| | | under certain conditions; type `show c' for details. |
| | | |
| | | The hypothetical commands `show w' and `show c' should show the appropriate |
| | | parts of the General Public License. Of course, your program's commands |
| | | might be different; for a GUI interface, you would use an "about box". |
| | | |
| | | You should also get your employer (if you work as a programmer) or school, |
| | | if any, to sign a "copyright disclaimer" for the program, if necessary. |
| | | For more information on this, and how to apply and follow the GNU GPL, see |
| | | <http://www.gnu.org/licenses/>. |
| | | |
| | | The GNU General Public License does not permit incorporating your program |
| | | into proprietary programs. If your program is a subroutine library, you |
| | | may consider it more useful to permit linking proprietary applications with |
| | | the library. If this is what you want to do, use the GNU Lesser General |
| | | Public License instead of this License. But first, please read |
| | | <http://www.gnu.org/philosophy/why-not-lgpl.html>. |
| New file |
| | |
| | | HIDAPI - Multi-Platform library for |
| | | communication with HID devices. |
| | | |
| | | Copyright 2009, Alan Ott, Signal 11 Software. |
| | | All Rights Reserved. |
| | | |
| | | This software may be used by anyone for any reason so |
| | | long as the copyright notice in the source files |
| | | remains intact. |
| New file |
| | |
| | | HIDAPI can be used under one of three licenses. |
| | | |
| | | 1. The GNU General Public License, version 3.0, in LICENSE-gpl3.txt |
| | | 2. A BSD-Style License, in LICENSE-bsd.txt. |
| | | 3. The more liberal original HIDAPI license. LICENSE-orig.txt |
| | | |
| | | The license chosen is at the discretion of the user of HIDAPI. For example: |
| | | 1. An author of GPL software would likely use HIDAPI under the terms of the |
| | | GPL. |
| | | |
| | | 2. An author of commercial closed-source software would likely use HIDAPI |
| | | under the terms of the BSD-style license or the original HIDAPI license. |
| | | |
| New file |
| | |
| | | |
| | | ACLOCAL_AMFLAGS = -I m4 |
| | | |
| | | if OS_FREEBSD |
| | | pkgconfigdir=$(prefix)/libdata/pkgconfig |
| | | else |
| | | pkgconfigdir=$(libdir)/pkgconfig |
| | | endif |
| | | |
| | | if OS_LINUX |
| | | pkgconfig_DATA=pc/hidapi-hidraw.pc pc/hidapi-libusb.pc |
| | | else |
| | | pkgconfig_DATA=pc/hidapi.pc |
| | | endif |
| | | |
| | | SUBDIRS= |
| | | |
| | | if OS_LINUX |
| | | SUBDIRS += linux libusb |
| | | endif |
| | | |
| | | if OS_DARWIN |
| | | SUBDIRS += mac |
| | | endif |
| | | |
| | | if OS_IOS |
| | | SUBDIRS += ios |
| | | endif |
| | | |
| | | if OS_FREEBSD |
| | | SUBDIRS += libusb |
| | | endif |
| | | |
| | | if OS_KFREEBSD |
| | | SUBDIRS += libusb |
| | | endif |
| | | |
| | | if OS_WINDOWS |
| | | SUBDIRS += windows |
| | | endif |
| | | |
| | | SUBDIRS += hidtest |
| | | |
| | | if BUILD_TESTGUI |
| | | SUBDIRS += testgui |
| | | endif |
| | | |
| | | EXTRA_DIST = udev doxygen |
| | | |
| | | dist_doc_DATA = \ |
| | | README.txt \ |
| | | AUTHORS.txt \ |
| | | LICENSE-bsd.txt \ |
| | | LICENSE-gpl3.txt \ |
| | | LICENSE-orig.txt \ |
| | | LICENSE.txt |
| | | |
| | | SCMCLEAN_TARGETS= \ |
| | | aclocal.m4 \ |
| | | config.guess \ |
| | | config.sub \ |
| | | configure \ |
| | | config.h.in \ |
| | | depcomp \ |
| | | install-sh \ |
| | | ltmain.sh \ |
| | | missing \ |
| | | mac/Makefile.in \ |
| | | testgui/Makefile.in \ |
| | | libusb/Makefile.in \ |
| | | Makefile.in \ |
| | | linux/Makefile.in \ |
| | | windows/Makefile.in \ |
| | | m4/libtool.m4 \ |
| | | m4/lt~obsolete.m4 \ |
| | | m4/ltoptions.m4 \ |
| | | m4/ltsugar.m4 \ |
| | | m4/ltversion.m4 |
| | | |
| | | SCMCLEAN_DIR_TARGETS = \ |
| | | autom4te.cache |
| | | |
| | | scm-clean: distclean |
| | | rm -f $(SCMCLEAN_TARGETS) |
| | | rm -Rf $(SCMCLEAN_DIR_TARGETS) |
| New file |
| | |
| | | HIDAPI library for Windows, Linux, FreeBSD and Mac OS X |
| | | ========================================================= |
| | | |
| | | About |
| | | ====== |
| | | |
| | | HIDAPI is a multi-platform library which allows an application to interface |
| | | with USB and Bluetooth HID-Class devices on Windows, Linux, FreeBSD, and Mac |
| | | OS X. HIDAPI can be either built as a shared library (.so or .dll) or |
| | | can be embedded directly into a target application by adding a single source |
| | | file (per platform) and a single header. |
| | | |
| | | HIDAPI has four back-ends: |
| | | * Windows (using hid.dll) |
| | | * Linux/hidraw (using the Kernel's hidraw driver) |
| | | * Linux/libusb (using libusb-1.0) |
| | | * FreeBSD (using libusb-1.0) |
| | | * Mac (using IOHidManager) |
| | | |
| | | On Linux, either the hidraw or the libusb back-end can be used. There are |
| | | tradeoffs, and the functionality supported is slightly different. |
| | | |
| | | Linux/hidraw (linux/hid.c): |
| | | This back-end uses the hidraw interface in the Linux kernel. While this |
| | | back-end will support both USB and Bluetooth, it has some limitations on |
| | | kernels prior to 2.6.39, including the inability to send or receive feature |
| | | reports. In addition, it will only communicate with devices which have |
| | | hidraw nodes associated with them. Keyboards, mice, and some other devices |
| | | which are blacklisted from having hidraw nodes will not work. Fortunately, |
| | | for nearly all the uses of hidraw, this is not a problem. |
| | | |
| | | Linux/FreeBSD/libusb (libusb/hid.c): |
| | | This back-end uses libusb-1.0 to communicate directly to a USB device. This |
| | | back-end will of course not work with Bluetooth devices. |
| | | |
| | | HIDAPI also comes with a Test GUI. The Test GUI is cross-platform and uses |
| | | Fox Toolkit (http://www.fox-toolkit.org). It will build on every platform |
| | | which HIDAPI supports. Since it relies on a 3rd party library, building it |
| | | is optional but recommended because it is so useful when debugging hardware. |
| | | |
| | | What Does the API Look Like? |
| | | ============================= |
| | | The API provides the the most commonly used HID functions including sending |
| | | and receiving of input, output, and feature reports. The sample program, |
| | | which communicates with a heavily hacked up version of the Microchip USB |
| | | Generic HID sample looks like this (with error checking removed for |
| | | simplicity): |
| | | |
| | | #ifdef WIN32 |
| | | #include <windows.h> |
| | | #endif |
| | | #include <stdio.h> |
| | | #include <stdlib.h> |
| | | #include "hidapi.h" |
| | | |
| | | #define MAX_STR 255 |
| | | |
| | | int main(int argc, char* argv[]) |
| | | { |
| | | int res; |
| | | unsigned char buf[65]; |
| | | wchar_t wstr[MAX_STR]; |
| | | hid_device *handle; |
| | | int i; |
| | | |
| | | // Initialize the hidapi library |
| | | res = hid_init(); |
| | | |
| | | // Open the device using the VID, PID, |
| | | // and optionally the Serial number. |
| | | handle = hid_open(0x4d8, 0x3f, NULL); |
| | | |
| | | // Read the Manufacturer String |
| | | res = hid_get_manufacturer_string(handle, wstr, MAX_STR); |
| | | wprintf(L"Manufacturer String: %s\n", wstr); |
| | | |
| | | // Read the Product String |
| | | res = hid_get_product_string(handle, wstr, MAX_STR); |
| | | wprintf(L"Product String: %s\n", wstr); |
| | | |
| | | // Read the Serial Number String |
| | | res = hid_get_serial_number_string(handle, wstr, MAX_STR); |
| | | wprintf(L"Serial Number String: (%d) %s\n", wstr[0], wstr); |
| | | |
| | | // Read Indexed String 1 |
| | | res = hid_get_indexed_string(handle, 1, wstr, MAX_STR); |
| | | wprintf(L"Indexed String 1: %s\n", wstr); |
| | | |
| | | // Toggle LED (cmd 0x80). The first byte is the report number (0x0). |
| | | buf[0] = 0x0; |
| | | buf[1] = 0x80; |
| | | res = hid_write(handle, buf, 65); |
| | | |
| | | // Request state (cmd 0x81). The first byte is the report number (0x0). |
| | | buf[0] = 0x0; |
| | | buf[1] = 0x81; |
| | | res = hid_write(handle, buf, 65); |
| | | |
| | | // Read requested state |
| | | res = hid_read(handle, buf, 65); |
| | | |
| | | // Print out the returned buffer. |
| | | for (i = 0; i < 4; i++) |
| | | printf("buf[%d]: %d\n", i, buf[i]); |
| | | |
| | | // Finalize the hidapi library |
| | | res = hid_exit(); |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | If you have your own simple test programs which communicate with standard |
| | | hardware development boards (such as those from Microchip, TI, Atmel, |
| | | FreeScale and others), please consider sending me something like the above |
| | | for inclusion into the HIDAPI source. This will help others who have the |
| | | same hardware as you do. |
| | | |
| | | License |
| | | ======== |
| | | HIDAPI may be used by one of three licenses as outlined in LICENSE.txt. |
| | | |
| | | Download |
| | | ========= |
| | | HIDAPI can be downloaded from github |
| | | git clone git://github.com/signal11/hidapi.git |
| | | |
| | | Build Instructions |
| | | =================== |
| | | |
| | | This section is long. Don't be put off by this. It's not long because it's |
| | | complicated to build HIDAPI; it's quite the opposite. This section is long |
| | | because of the flexibility of HIDAPI and the large number of ways in which |
| | | it can be built and used. You will likely pick a single build method. |
| | | |
| | | HIDAPI can be built in several different ways. If you elect to build a |
| | | shared library, you will need to build it from the HIDAPI source |
| | | distribution. If you choose instead to embed HIDAPI directly into your |
| | | application, you can skip the building and look at the provided platform |
| | | Makefiles for guidance. These platform Makefiles are located in linux/ |
| | | libusb/ mac/ and windows/ and are called Makefile-manual. In addition, |
| | | Visual Studio projects are provided. Even if you're going to embed HIDAPI |
| | | into your project, it is still beneficial to build the example programs. |
| | | |
| | | |
| | | Prerequisites: |
| | | --------------- |
| | | |
| | | Linux: |
| | | ------- |
| | | On Linux, you will need to install development packages for libudev, |
| | | libusb and optionally Fox-toolkit (for the test GUI). On |
| | | Debian/Ubuntu systems these can be installed by running: |
| | | sudo apt-get install libudev-dev libusb-1.0-0-dev libfox-1.6-dev |
| | | |
| | | If you downloaded the source directly from the git repository (using |
| | | git clone), you'll need Autotools: |
| | | sudo apt-get install autotools-dev autoconf automake libtool |
| | | |
| | | FreeBSD: |
| | | --------- |
| | | On FreeBSD you will need to install GNU make, libiconv, and |
| | | optionally Fox-Toolkit (for the test GUI). This is done by running |
| | | the following: |
| | | pkg_add -r gmake libiconv fox16 |
| | | |
| | | If you downloaded the source directly from the git repository (using |
| | | git clone), you'll need Autotools: |
| | | pkg_add -r autotools |
| | | |
| | | Mac: |
| | | ----- |
| | | On Mac, you will need to install Fox-Toolkit if you wish to build |
| | | the Test GUI. There are two ways to do this, and each has a slight |
| | | complication. Which method you use depends on your use case. |
| | | |
| | | If you wish to build the Test GUI just for your own testing on your |
| | | own computer, then the easiest method is to install Fox-Toolkit |
| | | using ports: |
| | | sudo port install fox |
| | | |
| | | If you wish to build the TestGUI app bundle to redistribute to |
| | | others, you will need to install Fox-toolkit from source. This is |
| | | because the version of fox that gets installed using ports uses the |
| | | ports X11 libraries which are not compatible with the Apple X11 |
| | | libraries. If you install Fox with ports and then try to distribute |
| | | your built app bundle, it will simply fail to run on other systems. |
| | | To install Fox-Toolkit manually, download the source package from |
| | | http://www.fox-toolkit.org, extract it, and run the following from |
| | | within the extracted source: |
| | | ./configure && make && make install |
| | | |
| | | Windows: |
| | | --------- |
| | | On Windows, if you want to build the test GUI, you will need to get |
| | | the hidapi-externals.zip package from the download site. This |
| | | contains pre-built binaries for Fox-toolkit. Extract |
| | | hidapi-externals.zip just outside of hidapi, so that |
| | | hidapi-externals and hidapi are on the same level, as shown: |
| | | |
| | | Parent_Folder |
| | | | |
| | | +hidapi |
| | | +hidapi-externals |
| | | |
| | | Again, this step is not required if you do not wish to build the |
| | | test GUI. |
| | | |
| | | |
| | | Building HIDAPI into a shared library on Unix Platforms: |
| | | --------------------------------------------------------- |
| | | |
| | | On Unix-like systems such as Linux, FreeBSD, Mac, and even Windows, using |
| | | Mingw or Cygwin, the easiest way to build a standard system-installed shared |
| | | library is to use the GNU Autotools build system. If you checked out the |
| | | source from the git repository, run the following: |
| | | |
| | | ./bootstrap |
| | | ./configure |
| | | make |
| | | make install <----- as root, or using sudo |
| | | |
| | | If you downloaded a source package (ie: if you did not run git clone), you |
| | | can skip the ./bootstrap step. |
| | | |
| | | ./configure can take several arguments which control the build. The two most |
| | | likely to be used are: |
| | | --enable-testgui |
| | | Enable build of the Test GUI. This requires Fox toolkit to |
| | | be installed. Instructions for installing Fox-Toolkit on |
| | | each platform are in the Prerequisites section above. |
| | | |
| | | --prefix=/usr |
| | | Specify where you want the output headers and libraries to |
| | | be installed. The example above will put the headers in |
| | | /usr/include and the binaries in /usr/lib. The default is to |
| | | install into /usr/local which is fine on most systems. |
| | | |
| | | Building the manual way on Unix platforms: |
| | | ------------------------------------------- |
| | | |
| | | Manual Makefiles are provided mostly to give the user and idea what it takes |
| | | to build a program which embeds HIDAPI directly inside of it. These should |
| | | really be used as examples only. If you want to build a system-wide shared |
| | | library, use the Autotools method described above. |
| | | |
| | | To build HIDAPI using the manual makefiles, change to the directory |
| | | of your platform and run make. For example, on Linux run: |
| | | cd linux/ |
| | | make -f Makefile-manual |
| | | |
| | | To build the Test GUI using the manual makefiles: |
| | | cd testgui/ |
| | | make -f Makefile-manual |
| | | |
| | | Building on Windows: |
| | | --------------------- |
| | | |
| | | To build the HIDAPI DLL on Windows using Visual Studio, build the .sln file |
| | | in the windows/ directory. |
| | | |
| | | To build the Test GUI on windows using Visual Studio, build the .sln file in |
| | | the testgui/ directory. |
| | | |
| | | To build HIDAPI using MinGW or Cygwin using Autotools, use the instructions |
| | | in the section titled "Building HIDAPI into a shared library on Unix |
| | | Platforms" above. Note that building the Test GUI with MinGW or Cygwin will |
| | | require the Windows procedure in the Prerequisites section above (ie: |
| | | hidapi-externals.zip). |
| | | |
| | | To build HIDAPI using MinGW using the Manual Makefiles, see the section |
| | | "Building the manual way on Unix platforms" above. |
| | | |
| | | HIDAPI can also be built using the Windows DDK (now also called the Windows |
| | | Driver Kit or WDK). This method was originally required for the HIDAPI build |
| | | but not anymore. However, some users still prefer this method. It is not as |
| | | well supported anymore but should still work. Patches are welcome if it does |
| | | not. To build using the DDK: |
| | | |
| | | 1. Install the Windows Driver Kit (WDK) from Microsoft. |
| | | 2. From the Start menu, in the Windows Driver Kits folder, select Build |
| | | Environments, then your operating system, then the x86 Free Build |
| | | Environment (or one that is appropriate for your system). |
| | | 3. From the console, change directory to the windows/ddk_build/ directory, |
| | | which is part of the HIDAPI distribution. |
| | | 4. Type build. |
| | | 5. You can find the output files (DLL and LIB) in a subdirectory created |
| | | by the build system which is appropriate for your environment. On |
| | | Windows XP, this directory is objfre_wxp_x86/i386. |
| | | |
| | | Cross Compiling |
| | | ================ |
| | | |
| | | This section talks about cross compiling HIDAPI for Linux using autotools. |
| | | This is useful for using HIDAPI on embedded Linux targets. These |
| | | instructions assume the most raw kind of embedded Linux build, where all |
| | | prerequisites will need to be built first. This process will of course vary |
| | | based on your embedded Linux build system if you are using one, such as |
| | | OpenEmbedded or Buildroot. |
| | | |
| | | For the purpose of this section, it will be assumed that the following |
| | | environment variables are exported. |
| | | |
| | | $ export STAGING=$HOME/out |
| | | $ export HOST=arm-linux |
| | | |
| | | STAGING and HOST can be modified to suit your setup. |
| | | |
| | | Prerequisites |
| | | -------------- |
| | | |
| | | Note that the build of libudev is the very basic configuration. |
| | | |
| | | Build Libusb. From the libusb source directory, run: |
| | | ./configure --host=$HOST --prefix=$STAGING |
| | | make |
| | | make install |
| | | |
| | | Build libudev. From the libudev source directory, run: |
| | | ./configure --disable-gudev --disable-introspection --disable-hwdb \ |
| | | --host=$HOST --prefix=$STAGING |
| | | make |
| | | make install |
| | | |
| | | Building HIDAPI |
| | | ---------------- |
| | | |
| | | Build HIDAPI: |
| | | |
| | | PKG_CONFIG_DIR= \ |
| | | PKG_CONFIG_LIBDIR=$STAGING/lib/pkgconfig:$STAGING/share/pkgconfig \ |
| | | PKG_CONFIG_SYSROOT_DIR=$STAGING \ |
| | | ./configure --host=$HOST --prefix=$STAGING |
| | | |
| | | |
| | | Signal 11 Software - 2010-04-11 |
| | | 2010-07-28 |
| | | 2011-09-10 |
| | | 2012-05-01 |
| | | 2012-07-03 |
| New file |
| | |
| | | //=================== Copyright Valve Corporation, All rights reserved. ======= |
| | | // |
| | | // Purpose: A wrapper implementing "HID" API for Android |
| | | // |
| | | // This layer glues the hidapi API to Android's USB and BLE stack. |
| | | // |
| | | //============================================================================= |
| | | |
| | | #include <jni.h> |
| | | #include <android/log.h> |
| | | #include <pthread.h> |
| | | #include <errno.h> // For ETIMEDOUT and ECONNRESET |
| | | #include <stdlib.h> // For malloc() and free() |
| | | #include <string.h> // For memcpy() |
| | | |
| | | #define TAG "hidapi" |
| | | |
| | | // Have error log always available |
| | | #define LOGE(...) __android_log_print(ANDROID_LOG_ERROR, TAG, __VA_ARGS__) |
| | | |
| | | #ifdef DEBUG |
| | | #define LOGV(...) __android_log_print(ANDROID_LOG_VERBOSE, TAG, __VA_ARGS__) |
| | | #define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG, TAG, __VA_ARGS__) |
| | | #else |
| | | #define LOGV(...) |
| | | #define LOGD(...) |
| | | #endif |
| | | |
| | | #define SDL_JAVA_PREFIX org_libsdl_app |
| | | #define CONCAT1(prefix, class, function) CONCAT2(prefix, class, function) |
| | | #define CONCAT2(prefix, class, function) Java_ ## prefix ## _ ## class ## _ ## function |
| | | #define HID_DEVICE_MANAGER_JAVA_INTERFACE(function) CONCAT1(SDL_JAVA_PREFIX, HIDDeviceManager, function) |
| | | |
| | | #include "../hidapi/hidapi.h" |
| | | |
| | | typedef uint32_t uint32; |
| | | typedef uint64_t uint64; |
| | | |
| | | |
| | | struct hid_device_ |
| | | { |
| | | int m_nId; |
| | | int m_nDeviceRefCount; |
| | | }; |
| | | |
| | | static JavaVM *g_JVM; |
| | | static pthread_key_t g_ThreadKey; |
| | | |
| | | template<class T> |
| | | class hid_device_ref |
| | | { |
| | | public: |
| | | hid_device_ref( T *pObject = nullptr ) : m_pObject( nullptr ) |
| | | { |
| | | SetObject( pObject ); |
| | | } |
| | | |
| | | hid_device_ref( const hid_device_ref &rhs ) : m_pObject( nullptr ) |
| | | { |
| | | SetObject( rhs.GetObject() ); |
| | | } |
| | | |
| | | ~hid_device_ref() |
| | | { |
| | | SetObject( nullptr ); |
| | | } |
| | | |
| | | void SetObject( T *pObject ) |
| | | { |
| | | if ( m_pObject && m_pObject->DecrementRefCount() == 0 ) |
| | | { |
| | | delete m_pObject; |
| | | } |
| | | |
| | | m_pObject = pObject; |
| | | |
| | | if ( m_pObject ) |
| | | { |
| | | m_pObject->IncrementRefCount(); |
| | | } |
| | | } |
| | | |
| | | hid_device_ref &operator =( T *pObject ) |
| | | { |
| | | SetObject( pObject ); |
| | | return *this; |
| | | } |
| | | |
| | | hid_device_ref &operator =( const hid_device_ref &rhs ) |
| | | { |
| | | SetObject( rhs.GetObject() ); |
| | | return *this; |
| | | } |
| | | |
| | | T *GetObject() const |
| | | { |
| | | return m_pObject; |
| | | } |
| | | |
| | | T* operator->() const |
| | | { |
| | | return m_pObject; |
| | | } |
| | | |
| | | operator bool() const |
| | | { |
| | | return ( m_pObject != nullptr ); |
| | | } |
| | | |
| | | private: |
| | | T *m_pObject; |
| | | }; |
| | | |
| | | class hid_mutex_guard |
| | | { |
| | | public: |
| | | hid_mutex_guard( pthread_mutex_t *pMutex ) : m_pMutex( pMutex ) |
| | | { |
| | | pthread_mutex_lock( m_pMutex ); |
| | | } |
| | | ~hid_mutex_guard() |
| | | { |
| | | pthread_mutex_unlock( m_pMutex ); |
| | | } |
| | | |
| | | private: |
| | | pthread_mutex_t *m_pMutex; |
| | | }; |
| | | |
| | | class hid_buffer |
| | | { |
| | | public: |
| | | hid_buffer() : m_pData( nullptr ), m_nSize( 0 ), m_nAllocated( 0 ) |
| | | { |
| | | } |
| | | |
| | | hid_buffer( const uint8_t *pData, size_t nSize ) : m_pData( nullptr ), m_nSize( 0 ), m_nAllocated( 0 ) |
| | | { |
| | | assign( pData, nSize ); |
| | | } |
| | | |
| | | ~hid_buffer() |
| | | { |
| | | delete[] m_pData; |
| | | } |
| | | |
| | | void assign( const uint8_t *pData, size_t nSize ) |
| | | { |
| | | if ( nSize > m_nAllocated ) |
| | | { |
| | | delete[] m_pData; |
| | | m_pData = new uint8_t[ nSize ]; |
| | | m_nAllocated = nSize; |
| | | } |
| | | |
| | | m_nSize = nSize; |
| | | memcpy( m_pData, pData, nSize ); |
| | | } |
| | | |
| | | void clear() |
| | | { |
| | | m_nSize = 0; |
| | | } |
| | | |
| | | size_t size() const |
| | | { |
| | | return m_nSize; |
| | | } |
| | | |
| | | const uint8_t *data() const |
| | | { |
| | | return m_pData; |
| | | } |
| | | |
| | | private: |
| | | uint8_t *m_pData; |
| | | size_t m_nSize; |
| | | size_t m_nAllocated; |
| | | }; |
| | | |
| | | class hid_buffer_pool |
| | | { |
| | | public: |
| | | hid_buffer_pool() : m_nSize( 0 ), m_pHead( nullptr ), m_pTail( nullptr ), m_pFree( nullptr ) |
| | | { |
| | | } |
| | | |
| | | ~hid_buffer_pool() |
| | | { |
| | | clear(); |
| | | |
| | | while ( m_pFree ) |
| | | { |
| | | hid_buffer_entry *pEntry = m_pFree; |
| | | m_pFree = m_pFree->m_pNext; |
| | | delete pEntry; |
| | | } |
| | | } |
| | | |
| | | size_t size() const { return m_nSize; } |
| | | |
| | | const hid_buffer &front() const { return m_pHead->m_buffer; } |
| | | |
| | | void pop_front() |
| | | { |
| | | hid_buffer_entry *pEntry = m_pHead; |
| | | if ( pEntry ) |
| | | { |
| | | m_pHead = pEntry->m_pNext; |
| | | if ( !m_pHead ) |
| | | { |
| | | m_pTail = nullptr; |
| | | } |
| | | pEntry->m_pNext = m_pFree; |
| | | m_pFree = pEntry; |
| | | --m_nSize; |
| | | } |
| | | } |
| | | |
| | | void emplace_back( const uint8_t *pData, size_t nSize ) |
| | | { |
| | | hid_buffer_entry *pEntry; |
| | | |
| | | if ( m_pFree ) |
| | | { |
| | | pEntry = m_pFree; |
| | | m_pFree = m_pFree->m_pNext; |
| | | } |
| | | else |
| | | { |
| | | pEntry = new hid_buffer_entry; |
| | | } |
| | | pEntry->m_pNext = nullptr; |
| | | |
| | | if ( m_pTail ) |
| | | { |
| | | m_pTail->m_pNext = pEntry; |
| | | } |
| | | else |
| | | { |
| | | m_pHead = pEntry; |
| | | } |
| | | m_pTail = pEntry; |
| | | |
| | | pEntry->m_buffer.assign( pData, nSize ); |
| | | ++m_nSize; |
| | | } |
| | | |
| | | void clear() |
| | | { |
| | | while ( size() > 0 ) |
| | | { |
| | | pop_front(); |
| | | } |
| | | } |
| | | |
| | | private: |
| | | struct hid_buffer_entry |
| | | { |
| | | hid_buffer m_buffer; |
| | | hid_buffer_entry *m_pNext; |
| | | }; |
| | | |
| | | size_t m_nSize; |
| | | hid_buffer_entry *m_pHead; |
| | | hid_buffer_entry *m_pTail; |
| | | hid_buffer_entry *m_pFree; |
| | | }; |
| | | |
| | | static jbyteArray NewByteArray( JNIEnv* env, const uint8_t *pData, size_t nDataLen ) |
| | | { |
| | | jbyteArray array = env->NewByteArray( nDataLen ); |
| | | jbyte *pBuf = env->GetByteArrayElements( array, NULL ); |
| | | memcpy( pBuf, pData, nDataLen ); |
| | | env->ReleaseByteArrayElements( array, pBuf, 0 ); |
| | | |
| | | return array; |
| | | } |
| | | |
| | | static char *CreateStringFromJString( JNIEnv *env, const jstring &sString ) |
| | | { |
| | | size_t nLength = env->GetStringUTFLength( sString ); |
| | | const char *pjChars = env->GetStringUTFChars( sString, NULL ); |
| | | char *psString = (char*)malloc( nLength + 1 ); |
| | | memcpy( psString, pjChars, nLength ); |
| | | psString[ nLength ] = '\0'; |
| | | env->ReleaseStringUTFChars( sString, pjChars ); |
| | | return psString; |
| | | } |
| | | |
| | | static wchar_t *CreateWStringFromJString( JNIEnv *env, const jstring &sString ) |
| | | { |
| | | size_t nLength = env->GetStringLength( sString ); |
| | | const jchar *pjChars = env->GetStringChars( sString, NULL ); |
| | | wchar_t *pwString = (wchar_t*)malloc( ( nLength + 1 ) * sizeof( wchar_t ) ); |
| | | wchar_t *pwChars = pwString; |
| | | for ( size_t iIndex = 0; iIndex < nLength; ++iIndex ) |
| | | { |
| | | pwChars[ iIndex ] = pjChars[ iIndex ]; |
| | | } |
| | | pwString[ nLength ] = '\0'; |
| | | env->ReleaseStringChars( sString, pjChars ); |
| | | return pwString; |
| | | } |
| | | |
| | | static wchar_t *CreateWStringFromWString( const wchar_t *pwSrc ) |
| | | { |
| | | size_t nLength = wcslen( pwSrc ); |
| | | wchar_t *pwString = (wchar_t*)malloc( ( nLength + 1 ) * sizeof( wchar_t ) ); |
| | | memcpy( pwString, pwSrc, nLength * sizeof( wchar_t ) ); |
| | | pwString[ nLength ] = '\0'; |
| | | return pwString; |
| | | } |
| | | |
| | | static hid_device_info *CopyHIDDeviceInfo( const hid_device_info *pInfo ) |
| | | { |
| | | hid_device_info *pCopy = new hid_device_info; |
| | | *pCopy = *pInfo; |
| | | pCopy->path = strdup( pInfo->path ); |
| | | pCopy->product_string = CreateWStringFromWString( pInfo->product_string ); |
| | | pCopy->manufacturer_string = CreateWStringFromWString( pInfo->manufacturer_string ); |
| | | pCopy->serial_number = CreateWStringFromWString( pInfo->serial_number ); |
| | | return pCopy; |
| | | } |
| | | |
| | | static void FreeHIDDeviceInfo( hid_device_info *pInfo ) |
| | | { |
| | | free( pInfo->path ); |
| | | free( pInfo->serial_number ); |
| | | free( pInfo->manufacturer_string ); |
| | | free( pInfo->product_string ); |
| | | delete pInfo; |
| | | } |
| | | |
| | | static jclass g_HIDDeviceManagerCallbackClass; |
| | | static jobject g_HIDDeviceManagerCallbackHandler; |
| | | static jmethodID g_midHIDDeviceManagerOpen; |
| | | static jmethodID g_midHIDDeviceManagerSendOutputReport; |
| | | static jmethodID g_midHIDDeviceManagerSendFeatureReport; |
| | | static jmethodID g_midHIDDeviceManagerGetFeatureReport; |
| | | static jmethodID g_midHIDDeviceManagerClose; |
| | | |
| | | static uint64_t get_timespec_ms( const struct timespec &ts ) |
| | | { |
| | | return (uint64_t)ts.tv_sec * 1000 + ts.tv_nsec / 1000000; |
| | | } |
| | | |
| | | class CHIDDevice |
| | | { |
| | | public: |
| | | CHIDDevice( int nDeviceID, hid_device_info *pInfo ) |
| | | { |
| | | m_nId = nDeviceID; |
| | | m_pInfo = pInfo; |
| | | |
| | | // The Bluetooth Steam Controller needs special handling |
| | | const int VALVE_USB_VID = 0x28DE; |
| | | const int D0G_BLE2_PID = 0x1106; |
| | | if ( pInfo->vendor_id == VALVE_USB_VID && pInfo->product_id == D0G_BLE2_PID ) |
| | | { |
| | | m_bIsBLESteamController = true; |
| | | } |
| | | } |
| | | |
| | | ~CHIDDevice() |
| | | { |
| | | FreeHIDDeviceInfo( m_pInfo ); |
| | | |
| | | // Note that we don't delete m_pDevice, as the app may still have a reference to it |
| | | } |
| | | |
| | | int IncrementRefCount() |
| | | { |
| | | int nValue; |
| | | pthread_mutex_lock( &m_refCountLock ); |
| | | nValue = ++m_nRefCount; |
| | | pthread_mutex_unlock( &m_refCountLock ); |
| | | return nValue; |
| | | } |
| | | |
| | | int DecrementRefCount() |
| | | { |
| | | int nValue; |
| | | pthread_mutex_lock( &m_refCountLock ); |
| | | nValue = --m_nRefCount; |
| | | pthread_mutex_unlock( &m_refCountLock ); |
| | | return nValue; |
| | | } |
| | | |
| | | int GetId() |
| | | { |
| | | return m_nId; |
| | | } |
| | | |
| | | const hid_device_info *GetDeviceInfo() |
| | | { |
| | | return m_pInfo; |
| | | } |
| | | |
| | | hid_device *GetDevice() |
| | | { |
| | | return m_pDevice; |
| | | } |
| | | |
| | | void ExceptionCheck( JNIEnv *env, const char *pszMethodName ) |
| | | { |
| | | if ( env->ExceptionCheck() ) |
| | | { |
| | | // Get our exception |
| | | jthrowable jExcept = env->ExceptionOccurred(); |
| | | |
| | | // Clear the exception so we can call JNI again |
| | | env->ExceptionClear(); |
| | | |
| | | // Get our exception message |
| | | jclass jExceptClass = env->GetObjectClass( jExcept ); |
| | | jmethodID jMessageMethod = env->GetMethodID( jExceptClass, "getMessage", "()Ljava/lang/String;" ); |
| | | jstring jMessage = (jstring)( env->CallObjectMethod( jExcept, jMessageMethod ) ); |
| | | const char *pszMessage = env->GetStringUTFChars( jMessage, NULL ); |
| | | |
| | | // ...and log it. |
| | | LOGE( "CHIDDevice::%s threw an exception: %s", pszMethodName, pszMessage ); |
| | | |
| | | // Cleanup |
| | | env->ReleaseStringUTFChars( jMessage, pszMessage ); |
| | | env->DeleteLocalRef( jMessage ); |
| | | env->DeleteLocalRef( jExceptClass ); |
| | | env->DeleteLocalRef( jExcept ); |
| | | } |
| | | } |
| | | |
| | | bool BOpen() |
| | | { |
| | | // Make sure thread is attached to JVM/env |
| | | JNIEnv *env; |
| | | g_JVM->AttachCurrentThread( &env, NULL ); |
| | | pthread_setspecific( g_ThreadKey, (void*)env ); |
| | | |
| | | m_bIsWaitingForOpen = false; |
| | | m_bOpenResult = env->CallBooleanMethod( g_HIDDeviceManagerCallbackHandler, g_midHIDDeviceManagerOpen, m_nId ); |
| | | ExceptionCheck( env, "BOpen" ); |
| | | |
| | | if ( m_bIsWaitingForOpen ) |
| | | { |
| | | hid_mutex_guard cvl( &m_cvLock ); |
| | | |
| | | const int OPEN_TIMEOUT_SECONDS = 60; |
| | | struct timespec ts, endtime; |
| | | clock_gettime( CLOCK_REALTIME, &ts ); |
| | | endtime = ts; |
| | | endtime.tv_sec += OPEN_TIMEOUT_SECONDS; |
| | | do |
| | | { |
| | | if ( pthread_cond_timedwait( &m_cv, &m_cvLock, &endtime ) != 0 ) |
| | | { |
| | | break; |
| | | } |
| | | } |
| | | while ( m_bIsWaitingForOpen && get_timespec_ms( ts ) < get_timespec_ms( endtime ) ); |
| | | } |
| | | |
| | | if ( !m_bOpenResult ) |
| | | { |
| | | if ( m_bIsWaitingForOpen ) |
| | | { |
| | | LOGV( "Device open failed - timed out waiting for device permission" ); |
| | | } |
| | | else |
| | | { |
| | | LOGV( "Device open failed" ); |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | m_pDevice = new hid_device; |
| | | m_pDevice->m_nId = m_nId; |
| | | m_pDevice->m_nDeviceRefCount = 1; |
| | | LOGD("Creating device %d (%p), refCount = 1\n", m_pDevice->m_nId, m_pDevice); |
| | | return true; |
| | | } |
| | | |
| | | void SetOpenPending() |
| | | { |
| | | m_bIsWaitingForOpen = true; |
| | | } |
| | | |
| | | void SetOpenResult( bool bResult ) |
| | | { |
| | | if ( m_bIsWaitingForOpen ) |
| | | { |
| | | m_bOpenResult = bResult; |
| | | m_bIsWaitingForOpen = false; |
| | | pthread_cond_signal( &m_cv ); |
| | | } |
| | | } |
| | | |
| | | void ProcessInput( const uint8_t *pBuf, size_t nBufSize ) |
| | | { |
| | | hid_mutex_guard l( &m_dataLock ); |
| | | |
| | | size_t MAX_REPORT_QUEUE_SIZE = 16; |
| | | if ( m_vecData.size() >= MAX_REPORT_QUEUE_SIZE ) |
| | | { |
| | | m_vecData.pop_front(); |
| | | } |
| | | m_vecData.emplace_back( pBuf, nBufSize ); |
| | | } |
| | | |
| | | int GetInput( unsigned char *data, size_t length ) |
| | | { |
| | | hid_mutex_guard l( &m_dataLock ); |
| | | |
| | | if ( m_vecData.size() == 0 ) |
| | | { |
| | | // LOGV( "hid_read_timeout no data available" ); |
| | | return 0; |
| | | } |
| | | |
| | | const hid_buffer &buffer = m_vecData.front(); |
| | | size_t nDataLen = buffer.size() > length ? length : buffer.size(); |
| | | if ( m_bIsBLESteamController ) |
| | | { |
| | | data[0] = 0x03; |
| | | memcpy( data + 1, buffer.data(), nDataLen ); |
| | | ++nDataLen; |
| | | } |
| | | else |
| | | { |
| | | memcpy( data, buffer.data(), nDataLen ); |
| | | } |
| | | m_vecData.pop_front(); |
| | | |
| | | // LOGV("Read %u bytes", nDataLen); |
| | | // LOGV("%02x %02x %02x %02x %02x %02x %02x %02x ....", |
| | | // data[0], data[1], data[2], data[3], |
| | | // data[4], data[5], data[6], data[7]); |
| | | |
| | | return nDataLen; |
| | | } |
| | | |
| | | int SendOutputReport( const unsigned char *pData, size_t nDataLen ) |
| | | { |
| | | // Make sure thread is attached to JVM/env |
| | | JNIEnv *env; |
| | | g_JVM->AttachCurrentThread( &env, NULL ); |
| | | pthread_setspecific( g_ThreadKey, (void*)env ); |
| | | |
| | | jbyteArray pBuf = NewByteArray( env, pData, nDataLen ); |
| | | int nRet = env->CallIntMethod( g_HIDDeviceManagerCallbackHandler, g_midHIDDeviceManagerSendOutputReport, m_nId, pBuf ); |
| | | ExceptionCheck( env, "SendOutputReport" ); |
| | | |
| | | env->DeleteLocalRef( pBuf ); |
| | | return nRet; |
| | | } |
| | | |
| | | int SendFeatureReport( const unsigned char *pData, size_t nDataLen ) |
| | | { |
| | | // Make sure thread is attached to JVM/env |
| | | JNIEnv *env; |
| | | g_JVM->AttachCurrentThread( &env, NULL ); |
| | | pthread_setspecific( g_ThreadKey, (void*)env ); |
| | | |
| | | jbyteArray pBuf = NewByteArray( env, pData, nDataLen ); |
| | | int nRet = env->CallIntMethod( g_HIDDeviceManagerCallbackHandler, g_midHIDDeviceManagerSendFeatureReport, m_nId, pBuf ); |
| | | ExceptionCheck( env, "SendFeatureReport" ); |
| | | env->DeleteLocalRef( pBuf ); |
| | | return nRet; |
| | | } |
| | | |
| | | void ProcessFeatureReport( const uint8_t *pBuf, size_t nBufSize ) |
| | | { |
| | | hid_mutex_guard cvl( &m_cvLock ); |
| | | if ( m_bIsWaitingForFeatureReport ) |
| | | { |
| | | m_featureReport.assign( pBuf, nBufSize ); |
| | | |
| | | m_bIsWaitingForFeatureReport = false; |
| | | m_nFeatureReportError = 0; |
| | | pthread_cond_signal( &m_cv ); |
| | | } |
| | | } |
| | | |
| | | int GetFeatureReport( unsigned char *pData, size_t nDataLen ) |
| | | { |
| | | // Make sure thread is attached to JVM/env |
| | | JNIEnv *env; |
| | | g_JVM->AttachCurrentThread( &env, NULL ); |
| | | pthread_setspecific( g_ThreadKey, (void*)env ); |
| | | |
| | | { |
| | | hid_mutex_guard cvl( &m_cvLock ); |
| | | if ( m_bIsWaitingForFeatureReport ) |
| | | { |
| | | LOGV( "Get feature report already ongoing... bail" ); |
| | | return -1; // Read already ongoing, we currently do not serialize, TODO |
| | | } |
| | | m_bIsWaitingForFeatureReport = true; |
| | | } |
| | | |
| | | jbyteArray pBuf = NewByteArray( env, pData, nDataLen ); |
| | | int nRet = env->CallBooleanMethod( g_HIDDeviceManagerCallbackHandler, g_midHIDDeviceManagerGetFeatureReport, m_nId, pBuf ) ? 0 : -1; |
| | | ExceptionCheck( env, "GetFeatureReport" ); |
| | | env->DeleteLocalRef( pBuf ); |
| | | if ( nRet < 0 ) |
| | | { |
| | | LOGV( "GetFeatureReport failed" ); |
| | | m_bIsWaitingForFeatureReport = false; |
| | | return -1; |
| | | } |
| | | |
| | | { |
| | | hid_mutex_guard cvl( &m_cvLock ); |
| | | if ( m_bIsWaitingForFeatureReport ) |
| | | { |
| | | LOGV("=== Going to sleep" ); |
| | | // Wait in CV until we are no longer waiting for a feature report. |
| | | const int FEATURE_REPORT_TIMEOUT_SECONDS = 2; |
| | | struct timespec ts, endtime; |
| | | clock_gettime( CLOCK_REALTIME, &ts ); |
| | | endtime = ts; |
| | | endtime.tv_sec += FEATURE_REPORT_TIMEOUT_SECONDS; |
| | | do |
| | | { |
| | | if ( pthread_cond_timedwait( &m_cv, &m_cvLock, &endtime ) != 0 ) |
| | | { |
| | | break; |
| | | } |
| | | } |
| | | while ( m_bIsWaitingForFeatureReport && get_timespec_ms( ts ) < get_timespec_ms( endtime ) ); |
| | | |
| | | // We are back |
| | | if ( m_bIsWaitingForFeatureReport ) |
| | | { |
| | | m_nFeatureReportError = -ETIMEDOUT; |
| | | m_bIsWaitingForFeatureReport = false; |
| | | } |
| | | LOGV( "=== Got feature report err=%d", m_nFeatureReportError ); |
| | | if ( m_nFeatureReportError != 0 ) |
| | | { |
| | | return m_nFeatureReportError; |
| | | } |
| | | } |
| | | |
| | | size_t uBytesToCopy = m_featureReport.size() > nDataLen ? nDataLen : m_featureReport.size(); |
| | | memcpy( pData, m_featureReport.data(), uBytesToCopy ); |
| | | m_featureReport.clear(); |
| | | LOGV( "=== Got %u bytes", uBytesToCopy ); |
| | | |
| | | return uBytesToCopy; |
| | | } |
| | | } |
| | | |
| | | void Close( bool bDeleteDevice ) |
| | | { |
| | | // Make sure thread is attached to JVM/env |
| | | JNIEnv *env; |
| | | g_JVM->AttachCurrentThread( &env, NULL ); |
| | | pthread_setspecific( g_ThreadKey, (void*)env ); |
| | | |
| | | env->CallVoidMethod( g_HIDDeviceManagerCallbackHandler, g_midHIDDeviceManagerClose, m_nId ); |
| | | ExceptionCheck( env, "Close" ); |
| | | |
| | | hid_mutex_guard dataLock( &m_dataLock ); |
| | | m_vecData.clear(); |
| | | |
| | | // Clean and release pending feature report reads |
| | | hid_mutex_guard cvLock( &m_cvLock ); |
| | | m_featureReport.clear(); |
| | | m_bIsWaitingForFeatureReport = false; |
| | | m_nFeatureReportError = -ECONNRESET; |
| | | pthread_cond_broadcast( &m_cv ); |
| | | |
| | | if ( bDeleteDevice ) |
| | | { |
| | | delete m_pDevice; |
| | | m_pDevice = nullptr; |
| | | } |
| | | } |
| | | |
| | | private: |
| | | pthread_mutex_t m_refCountLock = PTHREAD_MUTEX_INITIALIZER; |
| | | int m_nRefCount = 0; |
| | | int m_nId = 0; |
| | | hid_device_info *m_pInfo = nullptr; |
| | | hid_device *m_pDevice = nullptr; |
| | | bool m_bIsBLESteamController = false; |
| | | |
| | | pthread_mutex_t m_dataLock = PTHREAD_MUTEX_INITIALIZER; // This lock has to be held to access m_vecData |
| | | hid_buffer_pool m_vecData; |
| | | |
| | | // For handling get_feature_report |
| | | pthread_mutex_t m_cvLock = PTHREAD_MUTEX_INITIALIZER; // This lock has to be held to access any variables below |
| | | pthread_cond_t m_cv = PTHREAD_COND_INITIALIZER; |
| | | bool m_bIsWaitingForOpen = false; |
| | | bool m_bOpenResult = false; |
| | | bool m_bIsWaitingForFeatureReport = false; |
| | | int m_nFeatureReportError = 0; |
| | | hid_buffer m_featureReport; |
| | | |
| | | public: |
| | | hid_device_ref<CHIDDevice> next; |
| | | }; |
| | | |
| | | class CHIDDevice; |
| | | static pthread_mutex_t g_DevicesMutex = PTHREAD_MUTEX_INITIALIZER; |
| | | static pthread_mutex_t g_DevicesRefCountMutex = PTHREAD_MUTEX_INITIALIZER; |
| | | static hid_device_ref<CHIDDevice> g_Devices; |
| | | |
| | | static hid_device_ref<CHIDDevice> FindDevice( int nDeviceId ) |
| | | { |
| | | hid_device_ref<CHIDDevice> pDevice; |
| | | |
| | | hid_mutex_guard l( &g_DevicesMutex ); |
| | | for ( pDevice = g_Devices; pDevice; pDevice = pDevice->next ) |
| | | { |
| | | if ( pDevice->GetId() == nDeviceId ) |
| | | { |
| | | break; |
| | | } |
| | | } |
| | | return pDevice; |
| | | } |
| | | |
| | | static void ThreadDestroyed(void* value) |
| | | { |
| | | /* The thread is being destroyed, detach it from the Java VM and set the g_ThreadKey value to NULL as required */ |
| | | JNIEnv *env = (JNIEnv*) value; |
| | | if (env != NULL) { |
| | | g_JVM->DetachCurrentThread(); |
| | | pthread_setspecific(g_ThreadKey, NULL); |
| | | } |
| | | } |
| | | |
| | | |
| | | extern "C" |
| | | JNIEXPORT void JNICALL HID_DEVICE_MANAGER_JAVA_INTERFACE(HIDDeviceRegisterCallback)(JNIEnv *env, jobject thiz); |
| | | |
| | | extern "C" |
| | | JNIEXPORT void JNICALL HID_DEVICE_MANAGER_JAVA_INTERFACE(HIDDeviceReleaseCallback)(JNIEnv *env, jobject thiz); |
| | | |
| | | extern "C" |
| | | JNIEXPORT void JNICALL HID_DEVICE_MANAGER_JAVA_INTERFACE(HIDDeviceConnected)(JNIEnv *env, jobject thiz, int nDeviceID, jstring sIdentifier, int nVendorId, int nProductId, jstring sSerialNumber, int nReleaseNumber, jstring sManufacturer, jstring sProduct, int nInterface ); |
| | | |
| | | extern "C" |
| | | JNIEXPORT void JNICALL HID_DEVICE_MANAGER_JAVA_INTERFACE(HIDDeviceOpenPending)(JNIEnv *env, jobject thiz, int nDeviceID); |
| | | |
| | | extern "C" |
| | | JNIEXPORT void JNICALL HID_DEVICE_MANAGER_JAVA_INTERFACE(HIDDeviceOpenResult)(JNIEnv *env, jobject thiz, int nDeviceID, bool bOpened); |
| | | |
| | | extern "C" |
| | | JNIEXPORT void JNICALL HID_DEVICE_MANAGER_JAVA_INTERFACE(HIDDeviceDisconnected)(JNIEnv *env, jobject thiz, int nDeviceID); |
| | | |
| | | extern "C" |
| | | JNIEXPORT void JNICALL HID_DEVICE_MANAGER_JAVA_INTERFACE(HIDDeviceInputReport)(JNIEnv *env, jobject thiz, int nDeviceID, jbyteArray value); |
| | | |
| | | extern "C" |
| | | JNIEXPORT void JNICALL HID_DEVICE_MANAGER_JAVA_INTERFACE(HIDDeviceFeatureReport)(JNIEnv *env, jobject thiz, int nDeviceID, jbyteArray value); |
| | | |
| | | |
| | | extern "C" |
| | | JNIEXPORT void JNICALL HID_DEVICE_MANAGER_JAVA_INTERFACE(HIDDeviceRegisterCallback)(JNIEnv *env, jobject thiz ) |
| | | { |
| | | LOGV( "HIDDeviceRegisterCallback()"); |
| | | |
| | | env->GetJavaVM( &g_JVM ); |
| | | |
| | | /* |
| | | * Create mThreadKey so we can keep track of the JNIEnv assigned to each thread |
| | | * Refer to http://developer.android.com/guide/practices/design/jni.html for the rationale behind this |
| | | */ |
| | | if (pthread_key_create(&g_ThreadKey, ThreadDestroyed) != 0) { |
| | | __android_log_print(ANDROID_LOG_ERROR, TAG, "Error initializing pthread key"); |
| | | } |
| | | |
| | | if ( g_HIDDeviceManagerCallbackHandler != NULL ) |
| | | { |
| | | env->DeleteGlobalRef( g_HIDDeviceManagerCallbackClass ); |
| | | g_HIDDeviceManagerCallbackClass = NULL; |
| | | env->DeleteGlobalRef( g_HIDDeviceManagerCallbackHandler ); |
| | | g_HIDDeviceManagerCallbackHandler = NULL; |
| | | } |
| | | |
| | | g_HIDDeviceManagerCallbackHandler = env->NewGlobalRef( thiz ); |
| | | jclass objClass = env->GetObjectClass( thiz ); |
| | | if ( objClass ) |
| | | { |
| | | g_HIDDeviceManagerCallbackClass = reinterpret_cast< jclass >( env->NewGlobalRef( objClass ) ); |
| | | g_midHIDDeviceManagerOpen = env->GetMethodID( g_HIDDeviceManagerCallbackClass, "openDevice", "(I)Z" ); |
| | | if ( !g_midHIDDeviceManagerOpen ) |
| | | { |
| | | __android_log_print(ANDROID_LOG_ERROR, TAG, "HIDDeviceRegisterCallback: callback class missing openDevice" ); |
| | | } |
| | | g_midHIDDeviceManagerSendOutputReport = env->GetMethodID( g_HIDDeviceManagerCallbackClass, "sendOutputReport", "(I[B)I" ); |
| | | if ( !g_midHIDDeviceManagerSendOutputReport ) |
| | | { |
| | | __android_log_print(ANDROID_LOG_ERROR, TAG, "HIDDeviceRegisterCallback: callback class missing sendOutputReport" ); |
| | | } |
| | | g_midHIDDeviceManagerSendFeatureReport = env->GetMethodID( g_HIDDeviceManagerCallbackClass, "sendFeatureReport", "(I[B)I" ); |
| | | if ( !g_midHIDDeviceManagerSendFeatureReport ) |
| | | { |
| | | __android_log_print(ANDROID_LOG_ERROR, TAG, "HIDDeviceRegisterCallback: callback class missing sendFeatureReport" ); |
| | | } |
| | | g_midHIDDeviceManagerGetFeatureReport = env->GetMethodID( g_HIDDeviceManagerCallbackClass, "getFeatureReport", "(I[B)Z" ); |
| | | if ( !g_midHIDDeviceManagerGetFeatureReport ) |
| | | { |
| | | __android_log_print(ANDROID_LOG_ERROR, TAG, "HIDDeviceRegisterCallback: callback class missing getFeatureReport" ); |
| | | } |
| | | g_midHIDDeviceManagerClose = env->GetMethodID( g_HIDDeviceManagerCallbackClass, "closeDevice", "(I)V" ); |
| | | if ( !g_midHIDDeviceManagerClose ) |
| | | { |
| | | __android_log_print(ANDROID_LOG_ERROR, TAG, "HIDDeviceRegisterCallback: callback class missing closeDevice" ); |
| | | } |
| | | env->DeleteLocalRef( objClass ); |
| | | } |
| | | } |
| | | |
| | | extern "C" |
| | | JNIEXPORT void JNICALL HID_DEVICE_MANAGER_JAVA_INTERFACE(HIDDeviceReleaseCallback)(JNIEnv *env, jobject thiz) |
| | | { |
| | | LOGV("HIDDeviceReleaseCallback"); |
| | | if ( env->IsSameObject( thiz, g_HIDDeviceManagerCallbackHandler ) ) |
| | | { |
| | | env->DeleteGlobalRef( g_HIDDeviceManagerCallbackClass ); |
| | | g_HIDDeviceManagerCallbackClass = NULL; |
| | | env->DeleteGlobalRef( g_HIDDeviceManagerCallbackHandler ); |
| | | g_HIDDeviceManagerCallbackHandler = NULL; |
| | | } |
| | | } |
| | | |
| | | extern "C" |
| | | JNIEXPORT void JNICALL HID_DEVICE_MANAGER_JAVA_INTERFACE(HIDDeviceConnected)(JNIEnv *env, jobject thiz, int nDeviceID, jstring sIdentifier, int nVendorId, int nProductId, jstring sSerialNumber, int nReleaseNumber, jstring sManufacturer, jstring sProduct, int nInterface ) |
| | | { |
| | | LOGV( "HIDDeviceConnected() id=%d VID/PID = %.4x/%.4x, interface %d\n", nDeviceID, nVendorId, nProductId, nInterface ); |
| | | |
| | | hid_device_info *pInfo = new hid_device_info; |
| | | memset( pInfo, 0, sizeof( *pInfo ) ); |
| | | pInfo->path = CreateStringFromJString( env, sIdentifier ); |
| | | pInfo->vendor_id = nVendorId; |
| | | pInfo->product_id = nProductId; |
| | | pInfo->serial_number = CreateWStringFromJString( env, sSerialNumber ); |
| | | pInfo->release_number = nReleaseNumber; |
| | | pInfo->manufacturer_string = CreateWStringFromJString( env, sManufacturer ); |
| | | pInfo->product_string = CreateWStringFromJString( env, sProduct ); |
| | | pInfo->interface_number = nInterface; |
| | | |
| | | hid_device_ref<CHIDDevice> pDevice( new CHIDDevice( nDeviceID, pInfo ) ); |
| | | |
| | | hid_mutex_guard l( &g_DevicesMutex ); |
| | | hid_device_ref<CHIDDevice> pLast, pCurr; |
| | | for ( pCurr = g_Devices; pCurr; pLast = pCurr, pCurr = pCurr->next ) |
| | | { |
| | | continue; |
| | | } |
| | | if ( pLast ) |
| | | { |
| | | pLast->next = pDevice; |
| | | } |
| | | else |
| | | { |
| | | g_Devices = pDevice; |
| | | } |
| | | } |
| | | |
| | | extern "C" |
| | | JNIEXPORT void JNICALL HID_DEVICE_MANAGER_JAVA_INTERFACE(HIDDeviceOpenPending)(JNIEnv *env, jobject thiz, int nDeviceID) |
| | | { |
| | | LOGV( "HIDDeviceOpenPending() id=%d\n", nDeviceID ); |
| | | hid_device_ref<CHIDDevice> pDevice = FindDevice( nDeviceID ); |
| | | if ( pDevice ) |
| | | { |
| | | pDevice->SetOpenPending(); |
| | | } |
| | | } |
| | | |
| | | extern "C" |
| | | JNIEXPORT void JNICALL HID_DEVICE_MANAGER_JAVA_INTERFACE(HIDDeviceOpenResult)(JNIEnv *env, jobject thiz, int nDeviceID, bool bOpened) |
| | | { |
| | | LOGV( "HIDDeviceOpenResult() id=%d, result=%s\n", nDeviceID, bOpened ? "true" : "false" ); |
| | | hid_device_ref<CHIDDevice> pDevice = FindDevice( nDeviceID ); |
| | | if ( pDevice ) |
| | | { |
| | | pDevice->SetOpenResult( bOpened ); |
| | | } |
| | | } |
| | | |
| | | extern "C" |
| | | JNIEXPORT void JNICALL HID_DEVICE_MANAGER_JAVA_INTERFACE(HIDDeviceDisconnected)(JNIEnv *env, jobject thiz, int nDeviceID) |
| | | { |
| | | LOGV( "HIDDeviceDisconnected() id=%d\n", nDeviceID ); |
| | | hid_device_ref<CHIDDevice> pDevice; |
| | | { |
| | | hid_mutex_guard l( &g_DevicesMutex ); |
| | | hid_device_ref<CHIDDevice> pLast, pCurr; |
| | | for ( pCurr = g_Devices; pCurr; pLast = pCurr, pCurr = pCurr->next ) |
| | | { |
| | | if ( pCurr->GetId() == nDeviceID ) |
| | | { |
| | | pDevice = pCurr; |
| | | |
| | | if ( pLast ) |
| | | { |
| | | pLast->next = pCurr->next; |
| | | } |
| | | else |
| | | { |
| | | g_Devices = pCurr->next; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | if ( pDevice ) |
| | | { |
| | | pDevice->Close( false ); |
| | | } |
| | | } |
| | | |
| | | extern "C" |
| | | JNIEXPORT void JNICALL HID_DEVICE_MANAGER_JAVA_INTERFACE(HIDDeviceInputReport)(JNIEnv *env, jobject thiz, int nDeviceID, jbyteArray value) |
| | | { |
| | | jbyte *pBuf = env->GetByteArrayElements(value, NULL); |
| | | jsize nBufSize = env->GetArrayLength(value); |
| | | |
| | | // LOGV( "HIDDeviceInput() id=%d len=%u\n", nDeviceID, nBufSize ); |
| | | hid_device_ref<CHIDDevice> pDevice = FindDevice( nDeviceID ); |
| | | if ( pDevice ) |
| | | { |
| | | pDevice->ProcessInput( reinterpret_cast< const uint8_t* >( pBuf ), nBufSize ); |
| | | } |
| | | |
| | | env->ReleaseByteArrayElements(value, pBuf, 0); |
| | | } |
| | | |
| | | extern "C" |
| | | JNIEXPORT void JNICALL HID_DEVICE_MANAGER_JAVA_INTERFACE(HIDDeviceFeatureReport)(JNIEnv *env, jobject thiz, int nDeviceID, jbyteArray value) |
| | | { |
| | | jbyte *pBuf = env->GetByteArrayElements(value, NULL); |
| | | jsize nBufSize = env->GetArrayLength(value); |
| | | |
| | | LOGV( "HIDDeviceFeatureReport() id=%d len=%u\n", nDeviceID, nBufSize ); |
| | | hid_device_ref<CHIDDevice> pDevice = FindDevice( nDeviceID ); |
| | | if ( pDevice ) |
| | | { |
| | | pDevice->ProcessFeatureReport( reinterpret_cast< const uint8_t* >( pBuf ), nBufSize ); |
| | | } |
| | | |
| | | env->ReleaseByteArrayElements(value, pBuf, 0); |
| | | } |
| | | |
| | | ////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
| | | ////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
| | | ////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
| | | |
| | | extern "C" |
| | | { |
| | | |
| | | int hid_init(void) |
| | | { |
| | | return 0; |
| | | } |
| | | |
| | | struct hid_device_info HID_API_EXPORT * HID_API_CALL hid_enumerate(unsigned short vendor_id, unsigned short product_id) |
| | | { |
| | | struct hid_device_info *root = NULL; |
| | | hid_mutex_guard l( &g_DevicesMutex ); |
| | | for ( hid_device_ref<CHIDDevice> pDevice = g_Devices; pDevice; pDevice = pDevice->next ) |
| | | { |
| | | const hid_device_info *info = pDevice->GetDeviceInfo(); |
| | | if ( ( vendor_id == 0 && product_id == 0 ) || |
| | | ( vendor_id == info->vendor_id && product_id == info->product_id ) ) |
| | | { |
| | | hid_device_info *dev = CopyHIDDeviceInfo( info ); |
| | | dev->next = root; |
| | | root = dev; |
| | | } |
| | | } |
| | | return root; |
| | | } |
| | | |
| | | void HID_API_EXPORT HID_API_CALL hid_free_enumeration(struct hid_device_info *devs) |
| | | { |
| | | while ( devs ) |
| | | { |
| | | struct hid_device_info *next = devs->next; |
| | | FreeHIDDeviceInfo( devs ); |
| | | devs = next; |
| | | } |
| | | } |
| | | |
| | | HID_API_EXPORT hid_device * HID_API_CALL hid_open(unsigned short vendor_id, unsigned short product_id, const wchar_t *serial_number) |
| | | { |
| | | // TODO: Implement |
| | | return NULL; |
| | | } |
| | | |
| | | HID_API_EXPORT hid_device * HID_API_CALL hid_open_path(const char *path, int bExclusive) |
| | | { |
| | | LOGV( "hid_open_path( %s )", path ); |
| | | |
| | | hid_device_ref< CHIDDevice > pDevice; |
| | | { |
| | | hid_mutex_guard r( &g_DevicesRefCountMutex ); |
| | | hid_mutex_guard l( &g_DevicesMutex ); |
| | | for ( hid_device_ref<CHIDDevice> pCurr = g_Devices; pCurr; pCurr = pCurr->next ) |
| | | { |
| | | if ( strcmp( pCurr->GetDeviceInfo()->path, path ) == 0 ) |
| | | { |
| | | hid_device *pValue = pCurr->GetDevice(); |
| | | if ( pValue ) |
| | | { |
| | | ++pValue->m_nDeviceRefCount; |
| | | LOGD("Incrementing device %d (%p), refCount = %d\n", pValue->m_nId, pValue, pValue->m_nDeviceRefCount); |
| | | return pValue; |
| | | } |
| | | |
| | | // Hold a shared pointer to the controller for the duration |
| | | pDevice = pCurr; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | if ( pDevice && pDevice->BOpen() ) |
| | | { |
| | | return pDevice->GetDevice(); |
| | | } |
| | | return NULL; |
| | | } |
| | | |
| | | int HID_API_EXPORT HID_API_CALL hid_write(hid_device *device, const unsigned char *data, size_t length) |
| | | { |
| | | LOGV( "hid_write id=%d length=%u", device->m_nId, length ); |
| | | hid_device_ref<CHIDDevice> pDevice = FindDevice( device->m_nId ); |
| | | if ( pDevice ) |
| | | { |
| | | return pDevice->SendOutputReport( data, length ); |
| | | } |
| | | return -1; // Controller was disconnected |
| | | } |
| | | |
| | | // TODO: Implement timeout? |
| | | int HID_API_EXPORT HID_API_CALL hid_read_timeout(hid_device *device, unsigned char *data, size_t length, int milliseconds) |
| | | { |
| | | // LOGV( "hid_read_timeout id=%d length=%u timeout=%d", device->m_nId, length, milliseconds ); |
| | | hid_device_ref<CHIDDevice> pDevice = FindDevice( device->m_nId ); |
| | | if ( pDevice ) |
| | | { |
| | | return pDevice->GetInput( data, length ); |
| | | } |
| | | LOGV( "controller was disconnected" ); |
| | | return -1; // Controller was disconnected |
| | | } |
| | | |
| | | // TODO: Implement blocking |
| | | int HID_API_EXPORT HID_API_CALL hid_read(hid_device *device, unsigned char *data, size_t length) |
| | | { |
| | | LOGV( "hid_read id=%d length=%u", device->m_nId, length ); |
| | | return hid_read_timeout( device, data, length, 0 ); |
| | | } |
| | | |
| | | // TODO: Implement? |
| | | int HID_API_EXPORT HID_API_CALL hid_set_nonblocking(hid_device *device, int nonblock) |
| | | { |
| | | return -1; |
| | | } |
| | | |
| | | int HID_API_EXPORT HID_API_CALL hid_send_feature_report(hid_device *device, const unsigned char *data, size_t length) |
| | | { |
| | | LOGV( "hid_send_feature_report id=%d length=%u", device->m_nId, length ); |
| | | hid_device_ref<CHIDDevice> pDevice = FindDevice( device->m_nId ); |
| | | if ( pDevice ) |
| | | { |
| | | return pDevice->SendFeatureReport( data, length ); |
| | | } |
| | | return -1; // Controller was disconnected |
| | | } |
| | | |
| | | |
| | | // Synchronous operation. Will block until completed. |
| | | int HID_API_EXPORT HID_API_CALL hid_get_feature_report(hid_device *device, unsigned char *data, size_t length) |
| | | { |
| | | LOGV( "hid_get_feature_report id=%d length=%u", device->m_nId, length ); |
| | | hid_device_ref<CHIDDevice> pDevice = FindDevice( device->m_nId ); |
| | | if ( pDevice ) |
| | | { |
| | | return pDevice->GetFeatureReport( data, length ); |
| | | } |
| | | return -1; // Controller was disconnected |
| | | } |
| | | |
| | | |
| | | void HID_API_EXPORT HID_API_CALL hid_close(hid_device *device) |
| | | { |
| | | LOGV( "hid_close id=%d", device->m_nId ); |
| | | hid_mutex_guard r( &g_DevicesRefCountMutex ); |
| | | LOGD("Decrementing device %d (%p), refCount = %d\n", device->m_nId, device, device->m_nDeviceRefCount - 1); |
| | | if ( --device->m_nDeviceRefCount == 0 ) |
| | | { |
| | | hid_device_ref<CHIDDevice> pDevice = FindDevice( device->m_nId ); |
| | | if ( pDevice ) |
| | | { |
| | | pDevice->Close( true ); |
| | | } |
| | | else |
| | | { |
| | | delete device; |
| | | } |
| | | LOGD("Deleted device %p\n", device); |
| | | } |
| | | |
| | | } |
| | | |
| | | int HID_API_EXPORT_CALL hid_get_manufacturer_string(hid_device *device, wchar_t *string, size_t maxlen) |
| | | { |
| | | hid_device_ref<CHIDDevice> pDevice = FindDevice( device->m_nId ); |
| | | if ( pDevice ) |
| | | { |
| | | wcsncpy( string, pDevice->GetDeviceInfo()->manufacturer_string, maxlen ); |
| | | return 0; |
| | | } |
| | | return -1; |
| | | } |
| | | |
| | | int HID_API_EXPORT_CALL hid_get_product_string(hid_device *device, wchar_t *string, size_t maxlen) |
| | | { |
| | | hid_device_ref<CHIDDevice> pDevice = FindDevice( device->m_nId ); |
| | | if ( pDevice ) |
| | | { |
| | | wcsncpy( string, pDevice->GetDeviceInfo()->product_string, maxlen ); |
| | | return 0; |
| | | } |
| | | return -1; |
| | | } |
| | | |
| | | int HID_API_EXPORT_CALL hid_get_serial_number_string(hid_device *device, wchar_t *string, size_t maxlen) |
| | | { |
| | | hid_device_ref<CHIDDevice> pDevice = FindDevice( device->m_nId ); |
| | | if ( pDevice ) |
| | | { |
| | | wcsncpy( string, pDevice->GetDeviceInfo()->serial_number, maxlen ); |
| | | return 0; |
| | | } |
| | | return -1; |
| | | } |
| | | |
| | | int HID_API_EXPORT_CALL hid_get_indexed_string(hid_device *device, int string_index, wchar_t *string, size_t maxlen) |
| | | { |
| | | return -1; |
| | | } |
| | | |
| | | HID_API_EXPORT const wchar_t* HID_API_CALL hid_error(hid_device *device) |
| | | { |
| | | return NULL; |
| | | } |
| | | |
| | | int hid_exit(void) |
| | | { |
| | | return 0; |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | LOCAL_PATH:= $(call my-dir) |
| | | |
| | | HIDAPI_ROOT_REL:= ../.. |
| | | HIDAPI_ROOT_ABS:= $(LOCAL_PATH)/../.. |
| | | |
| | | include $(CLEAR_VARS) |
| | | |
| | | LOCAL_CPPFLAGS += -std=c++11 |
| | | |
| | | LOCAL_SRC_FILES := \ |
| | | $(HIDAPI_ROOT_REL)/android/hid.cpp |
| | | |
| | | LOCAL_MODULE := libhidapi |
| | | LOCAL_LDLIBS := -llog |
| | | |
| | | include $(BUILD_SHARED_LIBRARY) |
| New file |
| | |
| | | APP_STL := gnustl_static |
| | | APP_ABI := armeabi-v7a |
| New file |
| | |
| | | # This file is automatically generated by Android Tools. |
| | | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! |
| | | # |
| | | # This file must be checked in Version Control Systems. |
| | | # |
| | | # To customize properties used by the Ant build system edit |
| | | # "ant.properties", and override values to adapt the script to your |
| | | # project structure. |
| | | # |
| | | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): |
| | | #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt |
| | | |
| | | # Project target. |
| | | target=android-21 |
| New file |
| | |
| | | #!/bin/sh -x |
| | | autoreconf --install --verbose --force |
| New file |
| | |
| | | AC_PREREQ(2.63) |
| | | |
| | | # Version number. This is currently the only place. |
| | | m4_define([HIDAPI_MAJOR], 0) |
| | | m4_define([HIDAPI_MINOR], 8) |
| | | m4_define([HIDAPI_RELEASE], 0) |
| | | m4_define([HIDAPI_RC], -rc1) |
| | | m4_define([VERSION_STRING], HIDAPI_MAJOR[.]HIDAPI_MINOR[.]HIDAPI_RELEASE[]HIDAPI_RC) |
| | | |
| | | AC_INIT([hidapi],[VERSION_STRING],[alan@signal11.us]) |
| | | |
| | | # Library soname version |
| | | # Follow the following rules (particularly the ones in the second link): |
| | | # http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html |
| | | # http://sourceware.org/autobook/autobook/autobook_91.html |
| | | lt_current="0" |
| | | lt_revision="0" |
| | | lt_age="0" |
| | | LTLDFLAGS="-version-info ${lt_current}:${lt_revision}:${lt_age}" |
| | | |
| | | AC_CONFIG_MACRO_DIR([m4]) |
| | | AM_INIT_AUTOMAKE([foreign -Wall -Werror]) |
| | | AC_CONFIG_MACRO_DIR([m4]) |
| | | |
| | | m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) |
| | | LT_INIT |
| | | |
| | | AC_PROG_CC |
| | | AC_PROG_CXX |
| | | AC_PROG_OBJC |
| | | PKG_PROG_PKG_CONFIG |
| | | |
| | | |
| | | m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) |
| | | |
| | | hidapi_lib_error() { |
| | | echo "" |
| | | echo " Library $1 was not found on this system." |
| | | echo " Please install it and re-run ./configure" |
| | | echo "" |
| | | exit 1 |
| | | } |
| | | |
| | | hidapi_prog_error() { |
| | | echo "" |
| | | echo " Program $1 was not found on this system." |
| | | echo " This program is part of $2." |
| | | echo " Please install it and re-run ./configure" |
| | | echo "" |
| | | exit 1 |
| | | } |
| | | |
| | | AC_MSG_CHECKING([operating system]) |
| | | AC_MSG_RESULT($host) |
| | | case $host in |
| | | *-linux*) |
| | | AC_MSG_RESULT([ (Linux back-end)]) |
| | | AC_DEFINE(OS_LINUX, 1, [Linux implementations]) |
| | | AC_SUBST(OS_LINUX) |
| | | backend="linux" |
| | | os="linux" |
| | | threads="pthreads" |
| | | |
| | | # HIDAPI/hidraw libs |
| | | PKG_CHECK_MODULES([libudev], [libudev], true, [hidapi_lib_error libudev]) |
| | | LIBS_HIDRAW_PR+=" $libudev_LIBS" |
| | | CFLAGS_HIDRAW+=" $libudev_CFLAGS" |
| | | |
| | | # HIDAPI/libusb libs |
| | | AC_CHECK_LIB([rt], [clock_gettime], [LIBS_LIBUSB_PRIVATE+=" -lrt"], [hidapi_lib_error librt]) |
| | | PKG_CHECK_MODULES([libusb], [libusb-1.0 >= 1.0.9], true, [hidapi_lib_error libusb-1.0]) |
| | | LIBS_LIBUSB_PRIVATE+=" $libusb_LIBS" |
| | | CFLAGS_LIBUSB+=" $libusb_CFLAGS" |
| | | ;; |
| | | *-darwin*) |
| | | AC_MSG_RESULT([ (Mac OS X back-end)]) |
| | | AC_DEFINE(OS_DARWIN, 1, [Mac implementation]) |
| | | AC_SUBST(OS_DARWIN) |
| | | backend="mac" |
| | | os="darwin" |
| | | threads="pthreads" |
| | | LIBS="${LIBS} -framework IOKit -framework CoreFoundation" |
| | | ;; |
| | | *-freebsd*) |
| | | AC_MSG_RESULT([ (FreeBSD back-end)]) |
| | | AC_DEFINE(OS_FREEBSD, 1, [FreeBSD implementation]) |
| | | AC_SUBST(OS_FREEBSD) |
| | | backend="libusb" |
| | | os="freebsd" |
| | | threads="pthreads" |
| | | |
| | | CFLAGS="$CFLAGS -I/usr/local/include" |
| | | LDFLAGS="$LDFLAGS -L/usr/local/lib" |
| | | LIBS="${LIBS}" |
| | | AC_CHECK_LIB([usb], [libusb_init], [LIBS_LIBUSB_PRIVATE="${LIBS_LIBUSB_PRIVATE} -lusb"], [hidapi_lib_error libusb]) |
| | | AC_CHECK_LIB([iconv], [iconv_open], [LIBS_LIBUSB_PRIVATE="${LIBS_LIBUSB_PRIVATE} -liconv"], [hidapi_lib_error libiconv]) |
| | | echo libs_priv: $LIBS_LIBUSB_PRIVATE |
| | | ;; |
| | | *-kfreebsd*) |
| | | AC_MSG_RESULT([ (kFreeBSD back-end)]) |
| | | AC_DEFINE(OS_KFREEBSD, 1, [kFreeBSD implementation]) |
| | | AC_SUBST(OS_KFREEBSD) |
| | | backend="libusb" |
| | | os="kfreebsd" |
| | | threads="pthreads" |
| | | |
| | | AC_CHECK_LIB([usb], [libusb_init], [LIBS_LIBUSB_PRIVATE="${LIBS_LIBUSB_PRIVATE} -lusb"], [hidapi_lib_error libusb]) |
| | | echo libs_priv: $LIBS_LIBUSB_PRIVATE |
| | | ;; |
| | | *-mingw*) |
| | | AC_MSG_RESULT([ (Windows back-end, using MinGW)]) |
| | | backend="windows" |
| | | os="windows" |
| | | threads="windows" |
| | | win_implementation="mingw" |
| | | ;; |
| | | *-cygwin*) |
| | | AC_MSG_RESULT([ (Windows back-end, using Cygwin)]) |
| | | backend="windows" |
| | | os="windows" |
| | | threads="windows" |
| | | win_implementation="cygwin" |
| | | ;; |
| | | *) |
| | | AC_MSG_ERROR([HIDAPI is not supported on your operating system yet]) |
| | | esac |
| | | |
| | | LIBS_HIDRAW="${LIBS} ${LIBS_HIDRAW_PR}" |
| | | LIBS_LIBUSB="${LIBS} ${LIBS_LIBUSB_PRIVATE}" |
| | | AC_SUBST([LIBS_HIDRAW]) |
| | | AC_SUBST([LIBS_LIBUSB]) |
| | | AC_SUBST([CFLAGS_LIBUSB]) |
| | | AC_SUBST([CFLAGS_HIDRAW]) |
| | | |
| | | if test "x$os" = xwindows; then |
| | | AC_DEFINE(OS_WINDOWS, 1, [Windows implementations]) |
| | | AC_SUBST(OS_WINDOWS) |
| | | LDFLAGS="${LDFLAGS} -no-undefined" |
| | | LIBS="${LIBS} -lsetupapi" |
| | | fi |
| | | |
| | | if test "x$threads" = xpthreads; then |
| | | AX_PTHREAD([found_pthreads=yes], [found_pthreads=no]) |
| | | |
| | | if test "x$found_pthreads" = xyes; then |
| | | if test "x$os" = xlinux; then |
| | | # Only use pthreads for libusb implementation on Linux. |
| | | LIBS_LIBUSB="$PTHREAD_LIBS $LIBS_LIBUSB" |
| | | CFLAGS_LIBUSB="$CFLAGS_LIBUSB $PTHREAD_CFLAGS" |
| | | # There's no separate CC on Linux for threading, |
| | | # so it's ok that both implementations use $PTHREAD_CC |
| | | CC="$PTHREAD_CC" |
| | | else |
| | | LIBS="$PTHREAD_LIBS $LIBS" |
| | | CFLAGS="$CFLAGS $PTHREAD_CFLAGS" |
| | | CC="$PTHREAD_CC" |
| | | fi |
| | | fi |
| | | fi |
| | | |
| | | # Test GUI |
| | | AC_ARG_ENABLE([testgui], |
| | | [AS_HELP_STRING([--enable-testgui], |
| | | [enable building of test GUI (default n)])], |
| | | [testgui_enabled=$enableval], |
| | | [testgui_enabled='no']) |
| | | AM_CONDITIONAL([BUILD_TESTGUI], [test "x$testgui_enabled" != "xno"]) |
| | | |
| | | # Configure the MacOS TestGUI app bundle |
| | | rm -Rf testgui/TestGUI.app |
| | | mkdir -p testgui/TestGUI.app |
| | | cp -R ${srcdir}/testgui/TestGUI.app.in/* testgui/TestGUI.app |
| | | chmod -R u+w testgui/TestGUI.app |
| | | mkdir testgui/TestGUI.app/Contents/MacOS/ |
| | | |
| | | if test "x$testgui_enabled" != "xno"; then |
| | | if test "x$os" = xdarwin; then |
| | | # On Mac OS, don't use pkg-config. |
| | | AC_CHECK_PROG([foxconfig], [fox-config], [fox-config], false) |
| | | if test "x$foxconfig" = "xfalse"; then |
| | | hidapi_prog_error fox-config "FOX Toolkit" |
| | | fi |
| | | LIBS_TESTGUI+=`$foxconfig --libs` |
| | | LIBS_TESTGUI+=" -framework Cocoa -L/usr/X11R6/lib" |
| | | CFLAGS_TESTGUI+=`$foxconfig --cflags` |
| | | OBJCFLAGS+=" -x objective-c++" |
| | | elif test "x$os" = xwindows; then |
| | | # On Windows, just set the paths for Fox toolkit |
| | | if test "x$win_implementation" = xmingw; then |
| | | CFLAGS_TESTGUI="-I\$(srcdir)/../../hidapi-externals/fox/include -g -c" |
| | | LIBS_TESTGUI=" -mwindows \$(srcdir)/../../hidapi-externals/fox/lib/libFOX-1.6.a -lgdi32 -Wl,--enable-auto-import -static-libgcc -static-libstdc++ -lkernel32" |
| | | else |
| | | # Cygwin |
| | | CFLAGS_TESTGUI="-DWIN32 -I\$(srcdir)/../../hidapi-externals/fox/include -g -c" |
| | | LIBS_TESTGUI="\$(srcdir)/../../hidapi-externals/fox/lib/libFOX-cygwin-1.6.a -lgdi32 -Wl,--enable-auto-import -static-libgcc -static-libstdc++ -lkernel32" |
| | | fi |
| | | else |
| | | # On Linux and FreeBSD platforms, use pkg-config to find fox. |
| | | PKG_CHECK_MODULES([fox], [fox17], [], [PKG_CHECK_MODULES([fox], [fox])]) |
| | | LIBS_TESTGUI="${LIBS_TESTGUI} $fox_LIBS" |
| | | if test "x$os" = xfreebsd; then |
| | | LIBS_TESTGUI="${LIBS_TESTGUI} -L/usr/local/lib" |
| | | fi |
| | | CFLAGS_TESTGUI="${CFLAGS_TESTGUI} $fox_CFLAGS" |
| | | fi |
| | | fi |
| | | AC_SUBST([LIBS_TESTGUI]) |
| | | AC_SUBST([CFLAGS_TESTGUI]) |
| | | AC_SUBST([backend]) |
| | | |
| | | # OS info for Automake |
| | | AM_CONDITIONAL(OS_LINUX, test "x$os" = xlinux) |
| | | AM_CONDITIONAL(OS_DARWIN, test "x$os" = xdarwin) |
| | | AM_CONDITIONAL(OS_FREEBSD, test "x$os" = xfreebsd) |
| | | AM_CONDITIONAL(OS_KFREEBSD, test "x$os" = xkfreebsd) |
| | | AM_CONDITIONAL(OS_WINDOWS, test "x$os" = xwindows) |
| | | |
| | | AC_CONFIG_HEADERS([config.h]) |
| | | |
| | | if test "x$os" = "xlinux"; then |
| | | AC_CONFIG_FILES([pc/hidapi-hidraw.pc]) |
| | | AC_CONFIG_FILES([pc/hidapi-libusb.pc]) |
| | | else |
| | | AC_CONFIG_FILES([pc/hidapi.pc]) |
| | | fi |
| | | |
| | | AC_SUBST(LTLDFLAGS) |
| | | |
| | | AC_CONFIG_FILES([Makefile \ |
| | | hidtest/Makefile \ |
| | | libusb/Makefile \ |
| | | linux/Makefile \ |
| | | mac/Makefile \ |
| | | testgui/Makefile \ |
| | | windows/Makefile]) |
| | | AC_OUTPUT |
| New file |
| | |
| | | # Doxyfile 1.7.1 |
| | | |
| | | # This file describes the settings to be used by the documentation system |
| | | # doxygen (www.doxygen.org) for a project |
| | | # |
| | | # All text after a hash (#) is considered a comment and will be ignored |
| | | # The format is: |
| | | # TAG = value [value, ...] |
| | | # For lists items can also be appended using: |
| | | # TAG += value [value, ...] |
| | | # Values that contain spaces should be placed between quotes (" ") |
| | | |
| | | #--------------------------------------------------------------------------- |
| | | # Project related configuration options |
| | | #--------------------------------------------------------------------------- |
| | | |
| | | # This tag specifies the encoding used for all characters in the config file |
| | | # that follow. The default is UTF-8 which is also the encoding used for all |
| | | # text before the first occurrence of this tag. Doxygen uses libiconv (or the |
| | | # iconv built into libc) for the transcoding. See |
| | | # http://www.gnu.org/software/libiconv for the list of possible encodings. |
| | | |
| | | DOXYFILE_ENCODING = UTF-8 |
| | | |
| | | # The PROJECT_NAME tag is a single word (or a sequence of words surrounded |
| | | # by quotes) that should identify the project. |
| | | |
| | | PROJECT_NAME = hidapi |
| | | |
| | | # The PROJECT_NUMBER tag can be used to enter a project or revision number. |
| | | # This could be handy for archiving the generated documentation or |
| | | # if some version control system is used. |
| | | |
| | | PROJECT_NUMBER = |
| | | |
| | | # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) |
| | | # base path where the generated documentation will be put. |
| | | # If a relative path is entered, it will be relative to the location |
| | | # where doxygen was started. If left blank the current directory will be used. |
| | | |
| | | OUTPUT_DIRECTORY = |
| | | |
| | | # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create |
| | | # 4096 sub-directories (in 2 levels) under the output directory of each output |
| | | # format and will distribute the generated files over these directories. |
| | | # Enabling this option can be useful when feeding doxygen a huge amount of |
| | | # source files, where putting all generated files in the same directory would |
| | | # otherwise cause performance problems for the file system. |
| | | |
| | | CREATE_SUBDIRS = NO |
| | | |
| | | # The OUTPUT_LANGUAGE tag is used to specify the language in which all |
| | | # documentation generated by doxygen is written. Doxygen will use this |
| | | # information to generate all constant output in the proper language. |
| | | # The default language is English, other supported languages are: |
| | | # Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, |
| | | # Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, |
| | | # Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English |
| | | # messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, |
| | | # Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, |
| | | # Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. |
| | | |
| | | OUTPUT_LANGUAGE = English |
| | | |
| | | # If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will |
| | | # include brief member descriptions after the members that are listed in |
| | | # the file and class documentation (similar to JavaDoc). |
| | | # Set to NO to disable this. |
| | | |
| | | BRIEF_MEMBER_DESC = YES |
| | | |
| | | # If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend |
| | | # the brief description of a member or function before the detailed description. |
| | | # Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the |
| | | # brief descriptions will be completely suppressed. |
| | | |
| | | REPEAT_BRIEF = YES |
| | | |
| | | # This tag implements a quasi-intelligent brief description abbreviator |
| | | # that is used to form the text in various listings. Each string |
| | | # in this list, if found as the leading text of the brief description, will be |
| | | # stripped from the text and the result after processing the whole list, is |
| | | # used as the annotated text. Otherwise, the brief description is used as-is. |
| | | # If left blank, the following values are used ("$name" is automatically |
| | | # replaced with the name of the entity): "The $name class" "The $name widget" |
| | | # "The $name file" "is" "provides" "specifies" "contains" |
| | | # "represents" "a" "an" "the" |
| | | |
| | | ABBREVIATE_BRIEF = |
| | | |
| | | # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then |
| | | # Doxygen will generate a detailed section even if there is only a brief |
| | | # description. |
| | | |
| | | ALWAYS_DETAILED_SEC = NO |
| | | |
| | | # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all |
| | | # inherited members of a class in the documentation of that class as if those |
| | | # members were ordinary class members. Constructors, destructors and assignment |
| | | # operators of the base classes will not be shown. |
| | | |
| | | INLINE_INHERITED_MEMB = NO |
| | | |
| | | # If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full |
| | | # path before files name in the file list and in the header files. If set |
| | | # to NO the shortest path that makes the file name unique will be used. |
| | | |
| | | FULL_PATH_NAMES = YES |
| | | |
| | | # If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag |
| | | # can be used to strip a user-defined part of the path. Stripping is |
| | | # only done if one of the specified strings matches the left-hand part of |
| | | # the path. The tag can be used to show relative paths in the file list. |
| | | # If left blank the directory from which doxygen is run is used as the |
| | | # path to strip. |
| | | |
| | | STRIP_FROM_PATH = |
| | | |
| | | # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of |
| | | # the path mentioned in the documentation of a class, which tells |
| | | # the reader which header file to include in order to use a class. |
| | | # If left blank only the name of the header file containing the class |
| | | # definition is used. Otherwise one should specify the include paths that |
| | | # are normally passed to the compiler using the -I flag. |
| | | |
| | | STRIP_FROM_INC_PATH = |
| | | |
| | | # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter |
| | | # (but less readable) file names. This can be useful is your file systems |
| | | # doesn't support long names like on DOS, Mac, or CD-ROM. |
| | | |
| | | SHORT_NAMES = NO |
| | | |
| | | # If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen |
| | | # will interpret the first line (until the first dot) of a JavaDoc-style |
| | | # comment as the brief description. If set to NO, the JavaDoc |
| | | # comments will behave just like regular Qt-style comments |
| | | # (thus requiring an explicit @brief command for a brief description.) |
| | | |
| | | JAVADOC_AUTOBRIEF = NO |
| | | |
| | | # If the QT_AUTOBRIEF tag is set to YES then Doxygen will |
| | | # interpret the first line (until the first dot) of a Qt-style |
| | | # comment as the brief description. If set to NO, the comments |
| | | # will behave just like regular Qt-style comments (thus requiring |
| | | # an explicit \brief command for a brief description.) |
| | | |
| | | QT_AUTOBRIEF = NO |
| | | |
| | | # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen |
| | | # treat a multi-line C++ special comment block (i.e. a block of //! or /// |
| | | # comments) as a brief description. This used to be the default behaviour. |
| | | # The new default is to treat a multi-line C++ comment block as a detailed |
| | | # description. Set this tag to YES if you prefer the old behaviour instead. |
| | | |
| | | MULTILINE_CPP_IS_BRIEF = NO |
| | | |
| | | # If the INHERIT_DOCS tag is set to YES (the default) then an undocumented |
| | | # member inherits the documentation from any documented member that it |
| | | # re-implements. |
| | | |
| | | INHERIT_DOCS = YES |
| | | |
| | | # If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce |
| | | # a new page for each member. If set to NO, the documentation of a member will |
| | | # be part of the file/class/namespace that contains it. |
| | | |
| | | SEPARATE_MEMBER_PAGES = NO |
| | | |
| | | # The TAB_SIZE tag can be used to set the number of spaces in a tab. |
| | | # Doxygen uses this value to replace tabs by spaces in code fragments. |
| | | |
| | | TAB_SIZE = 8 |
| | | |
| | | # This tag can be used to specify a number of aliases that acts |
| | | # as commands in the documentation. An alias has the form "name=value". |
| | | # For example adding "sideeffect=\par Side Effects:\n" will allow you to |
| | | # put the command \sideeffect (or @sideeffect) in the documentation, which |
| | | # will result in a user-defined paragraph with heading "Side Effects:". |
| | | # You can put \n's in the value part of an alias to insert newlines. |
| | | |
| | | ALIASES = |
| | | |
| | | # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C |
| | | # sources only. Doxygen will then generate output that is more tailored for C. |
| | | # For instance, some of the names that are used will be different. The list |
| | | # of all members will be omitted, etc. |
| | | |
| | | OPTIMIZE_OUTPUT_FOR_C = YES |
| | | |
| | | # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java |
| | | # sources only. Doxygen will then generate output that is more tailored for |
| | | # Java. For instance, namespaces will be presented as packages, qualified |
| | | # scopes will look different, etc. |
| | | |
| | | OPTIMIZE_OUTPUT_JAVA = NO |
| | | |
| | | # Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran |
| | | # sources only. Doxygen will then generate output that is more tailored for |
| | | # Fortran. |
| | | |
| | | OPTIMIZE_FOR_FORTRAN = NO |
| | | |
| | | # Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL |
| | | # sources. Doxygen will then generate output that is tailored for |
| | | # VHDL. |
| | | |
| | | OPTIMIZE_OUTPUT_VHDL = NO |
| | | |
| | | # Doxygen selects the parser to use depending on the extension of the files it |
| | | # parses. With this tag you can assign which parser to use for a given extension. |
| | | # Doxygen has a built-in mapping, but you can override or extend it using this |
| | | # tag. The format is ext=language, where ext is a file extension, and language |
| | | # is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C, |
| | | # C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make |
| | | # doxygen treat .inc files as Fortran files (default is PHP), and .f files as C |
| | | # (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions |
| | | # you also need to set FILE_PATTERNS otherwise the files are not read by doxygen. |
| | | |
| | | EXTENSION_MAPPING = |
| | | |
| | | # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want |
| | | # to include (a tag file for) the STL sources as input, then you should |
| | | # set this tag to YES in order to let doxygen match functions declarations and |
| | | # definitions whose arguments contain STL classes (e.g. func(std::string); v.s. |
| | | # func(std::string) {}). This also make the inheritance and collaboration |
| | | # diagrams that involve STL classes more complete and accurate. |
| | | |
| | | BUILTIN_STL_SUPPORT = NO |
| | | |
| | | # If you use Microsoft's C++/CLI language, you should set this option to YES to |
| | | # enable parsing support. |
| | | |
| | | CPP_CLI_SUPPORT = NO |
| | | |
| | | # Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. |
| | | # Doxygen will parse them like normal C++ but will assume all classes use public |
| | | # instead of private inheritance when no explicit protection keyword is present. |
| | | |
| | | SIP_SUPPORT = NO |
| | | |
| | | # For Microsoft's IDL there are propget and propput attributes to indicate getter |
| | | # and setter methods for a property. Setting this option to YES (the default) |
| | | # will make doxygen to replace the get and set methods by a property in the |
| | | # documentation. This will only work if the methods are indeed getting or |
| | | # setting a simple type. If this is not the case, or you want to show the |
| | | # methods anyway, you should set this option to NO. |
| | | |
| | | IDL_PROPERTY_SUPPORT = YES |
| | | |
| | | # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC |
| | | # tag is set to YES, then doxygen will reuse the documentation of the first |
| | | # member in the group (if any) for the other members of the group. By default |
| | | # all members of a group must be documented explicitly. |
| | | |
| | | DISTRIBUTE_GROUP_DOC = NO |
| | | |
| | | # Set the SUBGROUPING tag to YES (the default) to allow class member groups of |
| | | # the same type (for instance a group of public functions) to be put as a |
| | | # subgroup of that type (e.g. under the Public Functions section). Set it to |
| | | # NO to prevent subgrouping. Alternatively, this can be done per class using |
| | | # the \nosubgrouping command. |
| | | |
| | | SUBGROUPING = YES |
| | | |
| | | # When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum |
| | | # is documented as struct, union, or enum with the name of the typedef. So |
| | | # typedef struct TypeS {} TypeT, will appear in the documentation as a struct |
| | | # with name TypeT. When disabled the typedef will appear as a member of a file, |
| | | # namespace, or class. And the struct will be named TypeS. This can typically |
| | | # be useful for C code in case the coding convention dictates that all compound |
| | | # types are typedef'ed and only the typedef is referenced, never the tag name. |
| | | |
| | | TYPEDEF_HIDES_STRUCT = NO |
| | | |
| | | # The SYMBOL_CACHE_SIZE determines the size of the internal cache use to |
| | | # determine which symbols to keep in memory and which to flush to disk. |
| | | # When the cache is full, less often used symbols will be written to disk. |
| | | # For small to medium size projects (<1000 input files) the default value is |
| | | # probably good enough. For larger projects a too small cache size can cause |
| | | # doxygen to be busy swapping symbols to and from disk most of the time |
| | | # causing a significant performance penality. |
| | | # If the system has enough physical memory increasing the cache will improve the |
| | | # performance by keeping more symbols in memory. Note that the value works on |
| | | # a logarithmic scale so increasing the size by one will rougly double the |
| | | # memory usage. The cache size is given by this formula: |
| | | # 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, |
| | | # corresponding to a cache size of 2^16 = 65536 symbols |
| | | |
| | | SYMBOL_CACHE_SIZE = 0 |
| | | |
| | | #--------------------------------------------------------------------------- |
| | | # Build related configuration options |
| | | #--------------------------------------------------------------------------- |
| | | |
| | | # If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in |
| | | # documentation are documented, even if no documentation was available. |
| | | # Private class members and static file members will be hidden unless |
| | | # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES |
| | | |
| | | EXTRACT_ALL = NO |
| | | |
| | | # If the EXTRACT_PRIVATE tag is set to YES all private members of a class |
| | | # will be included in the documentation. |
| | | |
| | | EXTRACT_PRIVATE = NO |
| | | |
| | | # If the EXTRACT_STATIC tag is set to YES all static members of a file |
| | | # will be included in the documentation. |
| | | |
| | | EXTRACT_STATIC = NO |
| | | |
| | | # If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) |
| | | # defined locally in source files will be included in the documentation. |
| | | # If set to NO only classes defined in header files are included. |
| | | |
| | | EXTRACT_LOCAL_CLASSES = YES |
| | | |
| | | # This flag is only useful for Objective-C code. When set to YES local |
| | | # methods, which are defined in the implementation section but not in |
| | | # the interface are included in the documentation. |
| | | # If set to NO (the default) only methods in the interface are included. |
| | | |
| | | EXTRACT_LOCAL_METHODS = NO |
| | | |
| | | # If this flag is set to YES, the members of anonymous namespaces will be |
| | | # extracted and appear in the documentation as a namespace called |
| | | # 'anonymous_namespace{file}', where file will be replaced with the base |
| | | # name of the file that contains the anonymous namespace. By default |
| | | # anonymous namespace are hidden. |
| | | |
| | | EXTRACT_ANON_NSPACES = NO |
| | | |
| | | # If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all |
| | | # undocumented members of documented classes, files or namespaces. |
| | | # If set to NO (the default) these members will be included in the |
| | | # various overviews, but no documentation section is generated. |
| | | # This option has no effect if EXTRACT_ALL is enabled. |
| | | |
| | | HIDE_UNDOC_MEMBERS = NO |
| | | |
| | | # If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all |
| | | # undocumented classes that are normally visible in the class hierarchy. |
| | | # If set to NO (the default) these classes will be included in the various |
| | | # overviews. This option has no effect if EXTRACT_ALL is enabled. |
| | | |
| | | HIDE_UNDOC_CLASSES = NO |
| | | |
| | | # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all |
| | | # friend (class|struct|union) declarations. |
| | | # If set to NO (the default) these declarations will be included in the |
| | | # documentation. |
| | | |
| | | HIDE_FRIEND_COMPOUNDS = NO |
| | | |
| | | # If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any |
| | | # documentation blocks found inside the body of a function. |
| | | # If set to NO (the default) these blocks will be appended to the |
| | | # function's detailed documentation block. |
| | | |
| | | HIDE_IN_BODY_DOCS = NO |
| | | |
| | | # The INTERNAL_DOCS tag determines if documentation |
| | | # that is typed after a \internal command is included. If the tag is set |
| | | # to NO (the default) then the documentation will be excluded. |
| | | # Set it to YES to include the internal documentation. |
| | | |
| | | INTERNAL_DOCS = NO |
| | | |
| | | # If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate |
| | | # file names in lower-case letters. If set to YES upper-case letters are also |
| | | # allowed. This is useful if you have classes or files whose names only differ |
| | | # in case and if your file system supports case sensitive file names. Windows |
| | | # and Mac users are advised to set this option to NO. |
| | | |
| | | CASE_SENSE_NAMES = YES |
| | | |
| | | # If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen |
| | | # will show members with their full class and namespace scopes in the |
| | | # documentation. If set to YES the scope will be hidden. |
| | | |
| | | HIDE_SCOPE_NAMES = NO |
| | | |
| | | # If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen |
| | | # will put a list of the files that are included by a file in the documentation |
| | | # of that file. |
| | | |
| | | SHOW_INCLUDE_FILES = YES |
| | | |
| | | # If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen |
| | | # will list include files with double quotes in the documentation |
| | | # rather than with sharp brackets. |
| | | |
| | | FORCE_LOCAL_INCLUDES = NO |
| | | |
| | | # If the INLINE_INFO tag is set to YES (the default) then a tag [inline] |
| | | # is inserted in the documentation for inline members. |
| | | |
| | | INLINE_INFO = YES |
| | | |
| | | # If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen |
| | | # will sort the (detailed) documentation of file and class members |
| | | # alphabetically by member name. If set to NO the members will appear in |
| | | # declaration order. |
| | | |
| | | SORT_MEMBER_DOCS = YES |
| | | |
| | | # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the |
| | | # brief documentation of file, namespace and class members alphabetically |
| | | # by member name. If set to NO (the default) the members will appear in |
| | | # declaration order. |
| | | |
| | | SORT_BRIEF_DOCS = NO |
| | | |
| | | # If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen |
| | | # will sort the (brief and detailed) documentation of class members so that |
| | | # constructors and destructors are listed first. If set to NO (the default) |
| | | # the constructors will appear in the respective orders defined by |
| | | # SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. |
| | | # This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO |
| | | # and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. |
| | | |
| | | SORT_MEMBERS_CTORS_1ST = NO |
| | | |
| | | # If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the |
| | | # hierarchy of group names into alphabetical order. If set to NO (the default) |
| | | # the group names will appear in their defined order. |
| | | |
| | | SORT_GROUP_NAMES = NO |
| | | |
| | | # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be |
| | | # sorted by fully-qualified names, including namespaces. If set to |
| | | # NO (the default), the class list will be sorted only by class name, |
| | | # not including the namespace part. |
| | | # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. |
| | | # Note: This option applies only to the class list, not to the |
| | | # alphabetical list. |
| | | |
| | | SORT_BY_SCOPE_NAME = NO |
| | | |
| | | # The GENERATE_TODOLIST tag can be used to enable (YES) or |
| | | # disable (NO) the todo list. This list is created by putting \todo |
| | | # commands in the documentation. |
| | | |
| | | GENERATE_TODOLIST = YES |
| | | |
| | | # The GENERATE_TESTLIST tag can be used to enable (YES) or |
| | | # disable (NO) the test list. This list is created by putting \test |
| | | # commands in the documentation. |
| | | |
| | | GENERATE_TESTLIST = YES |
| | | |
| | | # The GENERATE_BUGLIST tag can be used to enable (YES) or |
| | | # disable (NO) the bug list. This list is created by putting \bug |
| | | # commands in the documentation. |
| | | |
| | | GENERATE_BUGLIST = YES |
| | | |
| | | # The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or |
| | | # disable (NO) the deprecated list. This list is created by putting |
| | | # \deprecated commands in the documentation. |
| | | |
| | | GENERATE_DEPRECATEDLIST= YES |
| | | |
| | | # The ENABLED_SECTIONS tag can be used to enable conditional |
| | | # documentation sections, marked by \if sectionname ... \endif. |
| | | |
| | | ENABLED_SECTIONS = |
| | | |
| | | # The MAX_INITIALIZER_LINES tag determines the maximum number of lines |
| | | # the initial value of a variable or define consists of for it to appear in |
| | | # the documentation. If the initializer consists of more lines than specified |
| | | # here it will be hidden. Use a value of 0 to hide initializers completely. |
| | | # The appearance of the initializer of individual variables and defines in the |
| | | # documentation can be controlled using \showinitializer or \hideinitializer |
| | | # command in the documentation regardless of this setting. |
| | | |
| | | MAX_INITIALIZER_LINES = 30 |
| | | |
| | | # Set the SHOW_USED_FILES tag to NO to disable the list of files generated |
| | | # at the bottom of the documentation of classes and structs. If set to YES the |
| | | # list will mention the files that were used to generate the documentation. |
| | | |
| | | SHOW_USED_FILES = YES |
| | | |
| | | # If the sources in your project are distributed over multiple directories |
| | | # then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy |
| | | # in the documentation. The default is NO. |
| | | |
| | | SHOW_DIRECTORIES = NO |
| | | |
| | | # Set the SHOW_FILES tag to NO to disable the generation of the Files page. |
| | | # This will remove the Files entry from the Quick Index and from the |
| | | # Folder Tree View (if specified). The default is YES. |
| | | |
| | | SHOW_FILES = YES |
| | | |
| | | # Set the SHOW_NAMESPACES tag to NO to disable the generation of the |
| | | # Namespaces page. |
| | | # This will remove the Namespaces entry from the Quick Index |
| | | # and from the Folder Tree View (if specified). The default is YES. |
| | | |
| | | SHOW_NAMESPACES = YES |
| | | |
| | | # The FILE_VERSION_FILTER tag can be used to specify a program or script that |
| | | # doxygen should invoke to get the current version for each file (typically from |
| | | # the version control system). Doxygen will invoke the program by executing (via |
| | | # popen()) the command <command> <input-file>, where <command> is the value of |
| | | # the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file |
| | | # provided by doxygen. Whatever the program writes to standard output |
| | | # is used as the file version. See the manual for examples. |
| | | |
| | | FILE_VERSION_FILTER = |
| | | |
| | | # The LAYOUT_FILE tag can be used to specify a layout file which will be parsed |
| | | # by doxygen. The layout file controls the global structure of the generated |
| | | # output files in an output format independent way. The create the layout file |
| | | # that represents doxygen's defaults, run doxygen with the -l option. |
| | | # You can optionally specify a file name after the option, if omitted |
| | | # DoxygenLayout.xml will be used as the name of the layout file. |
| | | |
| | | LAYOUT_FILE = |
| | | |
| | | #--------------------------------------------------------------------------- |
| | | # configuration options related to warning and progress messages |
| | | #--------------------------------------------------------------------------- |
| | | |
| | | # The QUIET tag can be used to turn on/off the messages that are generated |
| | | # by doxygen. Possible values are YES and NO. If left blank NO is used. |
| | | |
| | | QUIET = NO |
| | | |
| | | # The WARNINGS tag can be used to turn on/off the warning messages that are |
| | | # generated by doxygen. Possible values are YES and NO. If left blank |
| | | # NO is used. |
| | | |
| | | WARNINGS = YES |
| | | |
| | | # If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings |
| | | # for undocumented members. If EXTRACT_ALL is set to YES then this flag will |
| | | # automatically be disabled. |
| | | |
| | | WARN_IF_UNDOCUMENTED = YES |
| | | |
| | | # If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for |
| | | # potential errors in the documentation, such as not documenting some |
| | | # parameters in a documented function, or documenting parameters that |
| | | # don't exist or using markup commands wrongly. |
| | | |
| | | WARN_IF_DOC_ERROR = YES |
| | | |
| | | # This WARN_NO_PARAMDOC option can be abled to get warnings for |
| | | # functions that are documented, but have no documentation for their parameters |
| | | # or return value. If set to NO (the default) doxygen will only warn about |
| | | # wrong or incomplete parameter documentation, but not about the absence of |
| | | # documentation. |
| | | |
| | | WARN_NO_PARAMDOC = NO |
| | | |
| | | # The WARN_FORMAT tag determines the format of the warning messages that |
| | | # doxygen can produce. The string should contain the $file, $line, and $text |
| | | # tags, which will be replaced by the file and line number from which the |
| | | # warning originated and the warning text. Optionally the format may contain |
| | | # $version, which will be replaced by the version of the file (if it could |
| | | # be obtained via FILE_VERSION_FILTER) |
| | | |
| | | WARN_FORMAT = "$file:$line: $text" |
| | | |
| | | # The WARN_LOGFILE tag can be used to specify a file to which warning |
| | | # and error messages should be written. If left blank the output is written |
| | | # to stderr. |
| | | |
| | | WARN_LOGFILE = |
| | | |
| | | #--------------------------------------------------------------------------- |
| | | # configuration options related to the input files |
| | | #--------------------------------------------------------------------------- |
| | | |
| | | # The INPUT tag can be used to specify the files and/or directories that contain |
| | | # documented source files. You may enter file names like "myfile.cpp" or |
| | | # directories like "/usr/src/myproject". Separate the files or directories |
| | | # with spaces. |
| | | |
| | | INPUT = ../hidapi |
| | | |
| | | # This tag can be used to specify the character encoding of the source files |
| | | # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is |
| | | # also the default input encoding. Doxygen uses libiconv (or the iconv built |
| | | # into libc) for the transcoding. See http://www.gnu.org/software/libiconv for |
| | | # the list of possible encodings. |
| | | |
| | | INPUT_ENCODING = UTF-8 |
| | | |
| | | # If the value of the INPUT tag contains directories, you can use the |
| | | # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp |
| | | # and *.h) to filter out the source-files in the directories. If left |
| | | # blank the following patterns are tested: |
| | | # *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx |
| | | # *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90 |
| | | |
| | | FILE_PATTERNS = |
| | | |
| | | # The RECURSIVE tag can be used to turn specify whether or not subdirectories |
| | | # should be searched for input files as well. Possible values are YES and NO. |
| | | # If left blank NO is used. |
| | | |
| | | RECURSIVE = NO |
| | | |
| | | # The EXCLUDE tag can be used to specify files and/or directories that should |
| | | # excluded from the INPUT source files. This way you can easily exclude a |
| | | # subdirectory from a directory tree whose root is specified with the INPUT tag. |
| | | |
| | | EXCLUDE = |
| | | |
| | | # The EXCLUDE_SYMLINKS tag can be used select whether or not files or |
| | | # directories that are symbolic links (a Unix filesystem feature) are excluded |
| | | # from the input. |
| | | |
| | | EXCLUDE_SYMLINKS = NO |
| | | |
| | | # If the value of the INPUT tag contains directories, you can use the |
| | | # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude |
| | | # certain files from those directories. Note that the wildcards are matched |
| | | # against the file with absolute path, so to exclude all test directories |
| | | # for example use the pattern */test/* |
| | | |
| | | EXCLUDE_PATTERNS = |
| | | |
| | | # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names |
| | | # (namespaces, classes, functions, etc.) that should be excluded from the |
| | | # output. The symbol name can be a fully qualified name, a word, or if the |
| | | # wildcard * is used, a substring. Examples: ANamespace, AClass, |
| | | # AClass::ANamespace, ANamespace::*Test |
| | | |
| | | EXCLUDE_SYMBOLS = |
| | | |
| | | # The EXAMPLE_PATH tag can be used to specify one or more files or |
| | | # directories that contain example code fragments that are included (see |
| | | # the \include command). |
| | | |
| | | EXAMPLE_PATH = |
| | | |
| | | # If the value of the EXAMPLE_PATH tag contains directories, you can use the |
| | | # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp |
| | | # and *.h) to filter out the source-files in the directories. If left |
| | | # blank all files are included. |
| | | |
| | | EXAMPLE_PATTERNS = |
| | | |
| | | # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be |
| | | # searched for input files to be used with the \include or \dontinclude |
| | | # commands irrespective of the value of the RECURSIVE tag. |
| | | # Possible values are YES and NO. If left blank NO is used. |
| | | |
| | | EXAMPLE_RECURSIVE = NO |
| | | |
| | | # The IMAGE_PATH tag can be used to specify one or more files or |
| | | # directories that contain image that are included in the documentation (see |
| | | # the \image command). |
| | | |
| | | IMAGE_PATH = |
| | | |
| | | # The INPUT_FILTER tag can be used to specify a program that doxygen should |
| | | # invoke to filter for each input file. Doxygen will invoke the filter program |
| | | # by executing (via popen()) the command <filter> <input-file>, where <filter> |
| | | # is the value of the INPUT_FILTER tag, and <input-file> is the name of an |
| | | # input file. Doxygen will then use the output that the filter program writes |
| | | # to standard output. |
| | | # If FILTER_PATTERNS is specified, this tag will be |
| | | # ignored. |
| | | |
| | | INPUT_FILTER = |
| | | |
| | | # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern |
| | | # basis. |
| | | # Doxygen will compare the file name with each pattern and apply the |
| | | # filter if there is a match. |
| | | # The filters are a list of the form: |
| | | # pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further |
| | | # info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER |
| | | # is applied to all files. |
| | | |
| | | FILTER_PATTERNS = |
| | | |
| | | # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using |
| | | # INPUT_FILTER) will be used to filter the input files when producing source |
| | | # files to browse (i.e. when SOURCE_BROWSER is set to YES). |
| | | |
| | | FILTER_SOURCE_FILES = NO |
| | | |
| | | #--------------------------------------------------------------------------- |
| | | # configuration options related to source browsing |
| | | #--------------------------------------------------------------------------- |
| | | |
| | | # If the SOURCE_BROWSER tag is set to YES then a list of source files will |
| | | # be generated. Documented entities will be cross-referenced with these sources. |
| | | # Note: To get rid of all source code in the generated output, make sure also |
| | | # VERBATIM_HEADERS is set to NO. |
| | | |
| | | SOURCE_BROWSER = NO |
| | | |
| | | # Setting the INLINE_SOURCES tag to YES will include the body |
| | | # of functions and classes directly in the documentation. |
| | | |
| | | INLINE_SOURCES = NO |
| | | |
| | | # Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct |
| | | # doxygen to hide any special comment blocks from generated source code |
| | | # fragments. Normal C and C++ comments will always remain visible. |
| | | |
| | | STRIP_CODE_COMMENTS = YES |
| | | |
| | | # If the REFERENCED_BY_RELATION tag is set to YES |
| | | # then for each documented function all documented |
| | | # functions referencing it will be listed. |
| | | |
| | | REFERENCED_BY_RELATION = NO |
| | | |
| | | # If the REFERENCES_RELATION tag is set to YES |
| | | # then for each documented function all documented entities |
| | | # called/used by that function will be listed. |
| | | |
| | | REFERENCES_RELATION = NO |
| | | |
| | | # If the REFERENCES_LINK_SOURCE tag is set to YES (the default) |
| | | # and SOURCE_BROWSER tag is set to YES, then the hyperlinks from |
| | | # functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will |
| | | # link to the source code. |
| | | # Otherwise they will link to the documentation. |
| | | |
| | | REFERENCES_LINK_SOURCE = YES |
| | | |
| | | # If the USE_HTAGS tag is set to YES then the references to source code |
| | | # will point to the HTML generated by the htags(1) tool instead of doxygen |
| | | # built-in source browser. The htags tool is part of GNU's global source |
| | | # tagging system (see http://www.gnu.org/software/global/global.html). You |
| | | # will need version 4.8.6 or higher. |
| | | |
| | | USE_HTAGS = NO |
| | | |
| | | # If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen |
| | | # will generate a verbatim copy of the header file for each class for |
| | | # which an include is specified. Set to NO to disable this. |
| | | |
| | | VERBATIM_HEADERS = YES |
| | | |
| | | #--------------------------------------------------------------------------- |
| | | # configuration options related to the alphabetical class index |
| | | #--------------------------------------------------------------------------- |
| | | |
| | | # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index |
| | | # of all compounds will be generated. Enable this if the project |
| | | # contains a lot of classes, structs, unions or interfaces. |
| | | |
| | | ALPHABETICAL_INDEX = YES |
| | | |
| | | # If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then |
| | | # the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns |
| | | # in which this list will be split (can be a number in the range [1..20]) |
| | | |
| | | COLS_IN_ALPHA_INDEX = 5 |
| | | |
| | | # In case all classes in a project start with a common prefix, all |
| | | # classes will be put under the same header in the alphabetical index. |
| | | # The IGNORE_PREFIX tag can be used to specify one or more prefixes that |
| | | # should be ignored while generating the index headers. |
| | | |
| | | IGNORE_PREFIX = |
| | | |
| | | #--------------------------------------------------------------------------- |
| | | # configuration options related to the HTML output |
| | | #--------------------------------------------------------------------------- |
| | | |
| | | # If the GENERATE_HTML tag is set to YES (the default) Doxygen will |
| | | # generate HTML output. |
| | | |
| | | GENERATE_HTML = YES |
| | | |
| | | # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. |
| | | # If a relative path is entered the value of OUTPUT_DIRECTORY will be |
| | | # put in front of it. If left blank `html' will be used as the default path. |
| | | |
| | | HTML_OUTPUT = html |
| | | |
| | | # The HTML_FILE_EXTENSION tag can be used to specify the file extension for |
| | | # each generated HTML page (for example: .htm,.php,.asp). If it is left blank |
| | | # doxygen will generate files with .html extension. |
| | | |
| | | HTML_FILE_EXTENSION = .html |
| | | |
| | | # The HTML_HEADER tag can be used to specify a personal HTML header for |
| | | # each generated HTML page. If it is left blank doxygen will generate a |
| | | # standard header. |
| | | |
| | | HTML_HEADER = |
| | | |
| | | # The HTML_FOOTER tag can be used to specify a personal HTML footer for |
| | | # each generated HTML page. If it is left blank doxygen will generate a |
| | | # standard footer. |
| | | |
| | | HTML_FOOTER = |
| | | |
| | | # The HTML_STYLESHEET tag can be used to specify a user-defined cascading |
| | | # style sheet that is used by each HTML page. It can be used to |
| | | # fine-tune the look of the HTML output. If the tag is left blank doxygen |
| | | # will generate a default style sheet. Note that doxygen will try to copy |
| | | # the style sheet file to the HTML output directory, so don't put your own |
| | | # stylesheet in the HTML output directory as well, or it will be erased! |
| | | |
| | | HTML_STYLESHEET = |
| | | |
| | | # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. |
| | | # Doxygen will adjust the colors in the stylesheet and background images |
| | | # according to this color. Hue is specified as an angle on a colorwheel, |
| | | # see http://en.wikipedia.org/wiki/Hue for more information. |
| | | # For instance the value 0 represents red, 60 is yellow, 120 is green, |
| | | # 180 is cyan, 240 is blue, 300 purple, and 360 is red again. |
| | | # The allowed range is 0 to 359. |
| | | |
| | | HTML_COLORSTYLE_HUE = 220 |
| | | |
| | | # The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of |
| | | # the colors in the HTML output. For a value of 0 the output will use |
| | | # grayscales only. A value of 255 will produce the most vivid colors. |
| | | |
| | | HTML_COLORSTYLE_SAT = 100 |
| | | |
| | | # The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to |
| | | # the luminance component of the colors in the HTML output. Values below |
| | | # 100 gradually make the output lighter, whereas values above 100 make |
| | | # the output darker. The value divided by 100 is the actual gamma applied, |
| | | # so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2, |
| | | # and 100 does not change the gamma. |
| | | |
| | | HTML_COLORSTYLE_GAMMA = 80 |
| | | |
| | | # If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML |
| | | # page will contain the date and time when the page was generated. Setting |
| | | # this to NO can help when comparing the output of multiple runs. |
| | | |
| | | HTML_TIMESTAMP = YES |
| | | |
| | | # If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, |
| | | # files or namespaces will be aligned in HTML using tables. If set to |
| | | # NO a bullet list will be used. |
| | | |
| | | HTML_ALIGN_MEMBERS = YES |
| | | |
| | | # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML |
| | | # documentation will contain sections that can be hidden and shown after the |
| | | # page has loaded. For this to work a browser that supports |
| | | # JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox |
| | | # Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). |
| | | |
| | | HTML_DYNAMIC_SECTIONS = NO |
| | | |
| | | # If the GENERATE_DOCSET tag is set to YES, additional index files |
| | | # will be generated that can be used as input for Apple's Xcode 3 |
| | | # integrated development environment, introduced with OSX 10.5 (Leopard). |
| | | # To create a documentation set, doxygen will generate a Makefile in the |
| | | # HTML output directory. Running make will produce the docset in that |
| | | # directory and running "make install" will install the docset in |
| | | # ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find |
| | | # it at startup. |
| | | # See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html |
| | | # for more information. |
| | | |
| | | GENERATE_DOCSET = NO |
| | | |
| | | # When GENERATE_DOCSET tag is set to YES, this tag determines the name of the |
| | | # feed. A documentation feed provides an umbrella under which multiple |
| | | # documentation sets from a single provider (such as a company or product suite) |
| | | # can be grouped. |
| | | |
| | | DOCSET_FEEDNAME = "Doxygen generated docs" |
| | | |
| | | # When GENERATE_DOCSET tag is set to YES, this tag specifies a string that |
| | | # should uniquely identify the documentation set bundle. This should be a |
| | | # reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen |
| | | # will append .docset to the name. |
| | | |
| | | DOCSET_BUNDLE_ID = org.doxygen.Project |
| | | |
| | | # When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify |
| | | # the documentation publisher. This should be a reverse domain-name style |
| | | # string, e.g. com.mycompany.MyDocSet.documentation. |
| | | |
| | | DOCSET_PUBLISHER_ID = org.doxygen.Publisher |
| | | |
| | | # The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher. |
| | | |
| | | DOCSET_PUBLISHER_NAME = Publisher |
| | | |
| | | # If the GENERATE_HTMLHELP tag is set to YES, additional index files |
| | | # will be generated that can be used as input for tools like the |
| | | # Microsoft HTML help workshop to generate a compiled HTML help file (.chm) |
| | | # of the generated HTML documentation. |
| | | |
| | | GENERATE_HTMLHELP = NO |
| | | |
| | | # If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can |
| | | # be used to specify the file name of the resulting .chm file. You |
| | | # can add a path in front of the file if the result should not be |
| | | # written to the html output directory. |
| | | |
| | | CHM_FILE = |
| | | |
| | | # If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can |
| | | # be used to specify the location (absolute path including file name) of |
| | | # the HTML help compiler (hhc.exe). If non-empty doxygen will try to run |
| | | # the HTML help compiler on the generated index.hhp. |
| | | |
| | | HHC_LOCATION = |
| | | |
| | | # If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag |
| | | # controls if a separate .chi index file is generated (YES) or that |
| | | # it should be included in the master .chm file (NO). |
| | | |
| | | GENERATE_CHI = NO |
| | | |
| | | # If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING |
| | | # is used to encode HtmlHelp index (hhk), content (hhc) and project file |
| | | # content. |
| | | |
| | | CHM_INDEX_ENCODING = |
| | | |
| | | # If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag |
| | | # controls whether a binary table of contents is generated (YES) or a |
| | | # normal table of contents (NO) in the .chm file. |
| | | |
| | | BINARY_TOC = NO |
| | | |
| | | # The TOC_EXPAND flag can be set to YES to add extra items for group members |
| | | # to the contents of the HTML help documentation and to the tree view. |
| | | |
| | | TOC_EXPAND = NO |
| | | |
| | | # If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and |
| | | # QHP_VIRTUAL_FOLDER are set, an additional index file will be generated |
| | | # that can be used as input for Qt's qhelpgenerator to generate a |
| | | # Qt Compressed Help (.qch) of the generated HTML documentation. |
| | | |
| | | GENERATE_QHP = NO |
| | | |
| | | # If the QHG_LOCATION tag is specified, the QCH_FILE tag can |
| | | # be used to specify the file name of the resulting .qch file. |
| | | # The path specified is relative to the HTML output folder. |
| | | |
| | | QCH_FILE = |
| | | |
| | | # The QHP_NAMESPACE tag specifies the namespace to use when generating |
| | | # Qt Help Project output. For more information please see |
| | | # http://doc.trolltech.com/qthelpproject.html#namespace |
| | | |
| | | QHP_NAMESPACE = org.doxygen.Project |
| | | |
| | | # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating |
| | | # Qt Help Project output. For more information please see |
| | | # http://doc.trolltech.com/qthelpproject.html#virtual-folders |
| | | |
| | | QHP_VIRTUAL_FOLDER = doc |
| | | |
| | | # If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to |
| | | # add. For more information please see |
| | | # http://doc.trolltech.com/qthelpproject.html#custom-filters |
| | | |
| | | QHP_CUST_FILTER_NAME = |
| | | |
| | | # The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the |
| | | # custom filter to add. For more information please see |
| | | # <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters"> |
| | | # Qt Help Project / Custom Filters</a>. |
| | | |
| | | QHP_CUST_FILTER_ATTRS = |
| | | |
| | | # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this |
| | | # project's |
| | | # filter section matches. |
| | | # <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes"> |
| | | # Qt Help Project / Filter Attributes</a>. |
| | | |
| | | QHP_SECT_FILTER_ATTRS = |
| | | |
| | | # If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can |
| | | # be used to specify the location of Qt's qhelpgenerator. |
| | | # If non-empty doxygen will try to run qhelpgenerator on the generated |
| | | # .qhp file. |
| | | |
| | | QHG_LOCATION = |
| | | |
| | | # If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files |
| | | # will be generated, which together with the HTML files, form an Eclipse help |
| | | # plugin. To install this plugin and make it available under the help contents |
| | | # menu in Eclipse, the contents of the directory containing the HTML and XML |
| | | # files needs to be copied into the plugins directory of eclipse. The name of |
| | | # the directory within the plugins directory should be the same as |
| | | # the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before |
| | | # the help appears. |
| | | |
| | | GENERATE_ECLIPSEHELP = NO |
| | | |
| | | # A unique identifier for the eclipse help plugin. When installing the plugin |
| | | # the directory name containing the HTML and XML files should also have |
| | | # this name. |
| | | |
| | | ECLIPSE_DOC_ID = org.doxygen.Project |
| | | |
| | | # The DISABLE_INDEX tag can be used to turn on/off the condensed index at |
| | | # top of each HTML page. The value NO (the default) enables the index and |
| | | # the value YES disables it. |
| | | |
| | | DISABLE_INDEX = NO |
| | | |
| | | # This tag can be used to set the number of enum values (range [1..20]) |
| | | # that doxygen will group on one line in the generated HTML documentation. |
| | | |
| | | ENUM_VALUES_PER_LINE = 4 |
| | | |
| | | # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index |
| | | # structure should be generated to display hierarchical information. |
| | | # If the tag value is set to YES, a side panel will be generated |
| | | # containing a tree-like index structure (just like the one that |
| | | # is generated for HTML Help). For this to work a browser that supports |
| | | # JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). |
| | | # Windows users are probably better off using the HTML help feature. |
| | | |
| | | GENERATE_TREEVIEW = NO |
| | | |
| | | # By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, |
| | | # and Class Hierarchy pages using a tree view instead of an ordered list. |
| | | |
| | | USE_INLINE_TREES = NO |
| | | |
| | | # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be |
| | | # used to set the initial width (in pixels) of the frame in which the tree |
| | | # is shown. |
| | | |
| | | TREEVIEW_WIDTH = 250 |
| | | |
| | | # When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open |
| | | # links to external symbols imported via tag files in a separate window. |
| | | |
| | | EXT_LINKS_IN_WINDOW = NO |
| | | |
| | | # Use this tag to change the font size of Latex formulas included |
| | | # as images in the HTML documentation. The default is 10. Note that |
| | | # when you change the font size after a successful doxygen run you need |
| | | # to manually remove any form_*.png images from the HTML output directory |
| | | # to force them to be regenerated. |
| | | |
| | | FORMULA_FONTSIZE = 10 |
| | | |
| | | # Use the FORMULA_TRANPARENT tag to determine whether or not the images |
| | | # generated for formulas are transparent PNGs. Transparent PNGs are |
| | | # not supported properly for IE 6.0, but are supported on all modern browsers. |
| | | # Note that when changing this option you need to delete any form_*.png files |
| | | # in the HTML output before the changes have effect. |
| | | |
| | | FORMULA_TRANSPARENT = YES |
| | | |
| | | # When the SEARCHENGINE tag is enabled doxygen will generate a search box |
| | | # for the HTML output. The underlying search engine uses javascript |
| | | # and DHTML and should work on any modern browser. Note that when using |
| | | # HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets |
| | | # (GENERATE_DOCSET) there is already a search function so this one should |
| | | # typically be disabled. For large projects the javascript based search engine |
| | | # can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution. |
| | | |
| | | SEARCHENGINE = YES |
| | | |
| | | # When the SERVER_BASED_SEARCH tag is enabled the search engine will be |
| | | # implemented using a PHP enabled web server instead of at the web client |
| | | # using Javascript. Doxygen will generate the search PHP script and index |
| | | # file to put on the web server. The advantage of the server |
| | | # based approach is that it scales better to large projects and allows |
| | | # full text search. The disadvances is that it is more difficult to setup |
| | | # and does not have live searching capabilities. |
| | | |
| | | SERVER_BASED_SEARCH = NO |
| | | |
| | | #--------------------------------------------------------------------------- |
| | | # configuration options related to the LaTeX output |
| | | #--------------------------------------------------------------------------- |
| | | |
| | | # If the GENERATE_LATEX tag is set to YES (the default) Doxygen will |
| | | # generate Latex output. |
| | | |
| | | GENERATE_LATEX = NO |
| | | |
| | | # The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. |
| | | # If a relative path is entered the value of OUTPUT_DIRECTORY will be |
| | | # put in front of it. If left blank `latex' will be used as the default path. |
| | | |
| | | LATEX_OUTPUT = latex |
| | | |
| | | # The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be |
| | | # invoked. If left blank `latex' will be used as the default command name. |
| | | # Note that when enabling USE_PDFLATEX this option is only used for |
| | | # generating bitmaps for formulas in the HTML output, but not in the |
| | | # Makefile that is written to the output directory. |
| | | |
| | | LATEX_CMD_NAME = latex |
| | | |
| | | # The MAKEINDEX_CMD_NAME tag can be used to specify the command name to |
| | | # generate index for LaTeX. If left blank `makeindex' will be used as the |
| | | # default command name. |
| | | |
| | | MAKEINDEX_CMD_NAME = makeindex |
| | | |
| | | # If the COMPACT_LATEX tag is set to YES Doxygen generates more compact |
| | | # LaTeX documents. This may be useful for small projects and may help to |
| | | # save some trees in general. |
| | | |
| | | COMPACT_LATEX = NO |
| | | |
| | | # The PAPER_TYPE tag can be used to set the paper type that is used |
| | | # by the printer. Possible values are: a4, a4wide, letter, legal and |
| | | # executive. If left blank a4wide will be used. |
| | | |
| | | PAPER_TYPE = a4wide |
| | | |
| | | # The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX |
| | | # packages that should be included in the LaTeX output. |
| | | |
| | | EXTRA_PACKAGES = |
| | | |
| | | # The LATEX_HEADER tag can be used to specify a personal LaTeX header for |
| | | # the generated latex document. The header should contain everything until |
| | | # the first chapter. If it is left blank doxygen will generate a |
| | | # standard header. Notice: only use this tag if you know what you are doing! |
| | | |
| | | LATEX_HEADER = |
| | | |
| | | # If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated |
| | | # is prepared for conversion to pdf (using ps2pdf). The pdf file will |
| | | # contain links (just like the HTML output) instead of page references |
| | | # This makes the output suitable for online browsing using a pdf viewer. |
| | | |
| | | PDF_HYPERLINKS = YES |
| | | |
| | | # If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of |
| | | # plain latex in the generated Makefile. Set this option to YES to get a |
| | | # higher quality PDF documentation. |
| | | |
| | | USE_PDFLATEX = YES |
| | | |
| | | # If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. |
| | | # command to the generated LaTeX files. This will instruct LaTeX to keep |
| | | # running if errors occur, instead of asking the user for help. |
| | | # This option is also used when generating formulas in HTML. |
| | | |
| | | LATEX_BATCHMODE = NO |
| | | |
| | | # If LATEX_HIDE_INDICES is set to YES then doxygen will not |
| | | # include the index chapters (such as File Index, Compound Index, etc.) |
| | | # in the output. |
| | | |
| | | LATEX_HIDE_INDICES = NO |
| | | |
| | | # If LATEX_SOURCE_CODE is set to YES then doxygen will include |
| | | # source code with syntax highlighting in the LaTeX output. |
| | | # Note that which sources are shown also depends on other settings |
| | | # such as SOURCE_BROWSER. |
| | | |
| | | LATEX_SOURCE_CODE = NO |
| | | |
| | | #--------------------------------------------------------------------------- |
| | | # configuration options related to the RTF output |
| | | #--------------------------------------------------------------------------- |
| | | |
| | | # If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output |
| | | # The RTF output is optimized for Word 97 and may not look very pretty with |
| | | # other RTF readers or editors. |
| | | |
| | | GENERATE_RTF = NO |
| | | |
| | | # The RTF_OUTPUT tag is used to specify where the RTF docs will be put. |
| | | # If a relative path is entered the value of OUTPUT_DIRECTORY will be |
| | | # put in front of it. If left blank `rtf' will be used as the default path. |
| | | |
| | | RTF_OUTPUT = rtf |
| | | |
| | | # If the COMPACT_RTF tag is set to YES Doxygen generates more compact |
| | | # RTF documents. This may be useful for small projects and may help to |
| | | # save some trees in general. |
| | | |
| | | COMPACT_RTF = NO |
| | | |
| | | # If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated |
| | | # will contain hyperlink fields. The RTF file will |
| | | # contain links (just like the HTML output) instead of page references. |
| | | # This makes the output suitable for online browsing using WORD or other |
| | | # programs which support those fields. |
| | | # Note: wordpad (write) and others do not support links. |
| | | |
| | | RTF_HYPERLINKS = NO |
| | | |
| | | # Load stylesheet definitions from file. Syntax is similar to doxygen's |
| | | # config file, i.e. a series of assignments. You only have to provide |
| | | # replacements, missing definitions are set to their default value. |
| | | |
| | | RTF_STYLESHEET_FILE = |
| | | |
| | | # Set optional variables used in the generation of an rtf document. |
| | | # Syntax is similar to doxygen's config file. |
| | | |
| | | RTF_EXTENSIONS_FILE = |
| | | |
| | | #--------------------------------------------------------------------------- |
| | | # configuration options related to the man page output |
| | | #--------------------------------------------------------------------------- |
| | | |
| | | # If the GENERATE_MAN tag is set to YES (the default) Doxygen will |
| | | # generate man pages |
| | | |
| | | GENERATE_MAN = NO |
| | | |
| | | # The MAN_OUTPUT tag is used to specify where the man pages will be put. |
| | | # If a relative path is entered the value of OUTPUT_DIRECTORY will be |
| | | # put in front of it. If left blank `man' will be used as the default path. |
| | | |
| | | MAN_OUTPUT = man |
| | | |
| | | # The MAN_EXTENSION tag determines the extension that is added to |
| | | # the generated man pages (default is the subroutine's section .3) |
| | | |
| | | MAN_EXTENSION = .3 |
| | | |
| | | # If the MAN_LINKS tag is set to YES and Doxygen generates man output, |
| | | # then it will generate one additional man file for each entity |
| | | # documented in the real man page(s). These additional files |
| | | # only source the real man page, but without them the man command |
| | | # would be unable to find the correct page. The default is NO. |
| | | |
| | | MAN_LINKS = NO |
| | | |
| | | #--------------------------------------------------------------------------- |
| | | # configuration options related to the XML output |
| | | #--------------------------------------------------------------------------- |
| | | |
| | | # If the GENERATE_XML tag is set to YES Doxygen will |
| | | # generate an XML file that captures the structure of |
| | | # the code including all documentation. |
| | | |
| | | GENERATE_XML = NO |
| | | |
| | | # The XML_OUTPUT tag is used to specify where the XML pages will be put. |
| | | # If a relative path is entered the value of OUTPUT_DIRECTORY will be |
| | | # put in front of it. If left blank `xml' will be used as the default path. |
| | | |
| | | XML_OUTPUT = xml |
| | | |
| | | # The XML_SCHEMA tag can be used to specify an XML schema, |
| | | # which can be used by a validating XML parser to check the |
| | | # syntax of the XML files. |
| | | |
| | | XML_SCHEMA = |
| | | |
| | | # The XML_DTD tag can be used to specify an XML DTD, |
| | | # which can be used by a validating XML parser to check the |
| | | # syntax of the XML files. |
| | | |
| | | XML_DTD = |
| | | |
| | | # If the XML_PROGRAMLISTING tag is set to YES Doxygen will |
| | | # dump the program listings (including syntax highlighting |
| | | # and cross-referencing information) to the XML output. Note that |
| | | # enabling this will significantly increase the size of the XML output. |
| | | |
| | | XML_PROGRAMLISTING = YES |
| | | |
| | | #--------------------------------------------------------------------------- |
| | | # configuration options for the AutoGen Definitions output |
| | | #--------------------------------------------------------------------------- |
| | | |
| | | # If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will |
| | | # generate an AutoGen Definitions (see autogen.sf.net) file |
| | | # that captures the structure of the code including all |
| | | # documentation. Note that this feature is still experimental |
| | | # and incomplete at the moment. |
| | | |
| | | GENERATE_AUTOGEN_DEF = NO |
| | | |
| | | #--------------------------------------------------------------------------- |
| | | # configuration options related to the Perl module output |
| | | #--------------------------------------------------------------------------- |
| | | |
| | | # If the GENERATE_PERLMOD tag is set to YES Doxygen will |
| | | # generate a Perl module file that captures the structure of |
| | | # the code including all documentation. Note that this |
| | | # feature is still experimental and incomplete at the |
| | | # moment. |
| | | |
| | | GENERATE_PERLMOD = NO |
| | | |
| | | # If the PERLMOD_LATEX tag is set to YES Doxygen will generate |
| | | # the necessary Makefile rules, Perl scripts and LaTeX code to be able |
| | | # to generate PDF and DVI output from the Perl module output. |
| | | |
| | | PERLMOD_LATEX = NO |
| | | |
| | | # If the PERLMOD_PRETTY tag is set to YES the Perl module output will be |
| | | # nicely formatted so it can be parsed by a human reader. |
| | | # This is useful |
| | | # if you want to understand what is going on. |
| | | # On the other hand, if this |
| | | # tag is set to NO the size of the Perl module output will be much smaller |
| | | # and Perl will parse it just the same. |
| | | |
| | | PERLMOD_PRETTY = YES |
| | | |
| | | # The names of the make variables in the generated doxyrules.make file |
| | | # are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. |
| | | # This is useful so different doxyrules.make files included by the same |
| | | # Makefile don't overwrite each other's variables. |
| | | |
| | | PERLMOD_MAKEVAR_PREFIX = |
| | | |
| | | #--------------------------------------------------------------------------- |
| | | # Configuration options related to the preprocessor |
| | | #--------------------------------------------------------------------------- |
| | | |
| | | # If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will |
| | | # evaluate all C-preprocessor directives found in the sources and include |
| | | # files. |
| | | |
| | | ENABLE_PREPROCESSING = YES |
| | | |
| | | # If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro |
| | | # names in the source code. If set to NO (the default) only conditional |
| | | # compilation will be performed. Macro expansion can be done in a controlled |
| | | # way by setting EXPAND_ONLY_PREDEF to YES. |
| | | |
| | | MACRO_EXPANSION = NO |
| | | |
| | | # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES |
| | | # then the macro expansion is limited to the macros specified with the |
| | | # PREDEFINED and EXPAND_AS_DEFINED tags. |
| | | |
| | | EXPAND_ONLY_PREDEF = NO |
| | | |
| | | # If the SEARCH_INCLUDES tag is set to YES (the default) the includes files |
| | | # in the INCLUDE_PATH (see below) will be search if a #include is found. |
| | | |
| | | SEARCH_INCLUDES = YES |
| | | |
| | | # The INCLUDE_PATH tag can be used to specify one or more directories that |
| | | # contain include files that are not input files but should be processed by |
| | | # the preprocessor. |
| | | |
| | | INCLUDE_PATH = |
| | | |
| | | # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard |
| | | # patterns (like *.h and *.hpp) to filter out the header-files in the |
| | | # directories. If left blank, the patterns specified with FILE_PATTERNS will |
| | | # be used. |
| | | |
| | | INCLUDE_FILE_PATTERNS = |
| | | |
| | | # The PREDEFINED tag can be used to specify one or more macro names that |
| | | # are defined before the preprocessor is started (similar to the -D option of |
| | | # gcc). The argument of the tag is a list of macros of the form: name |
| | | # or name=definition (no spaces). If the definition and the = are |
| | | # omitted =1 is assumed. To prevent a macro definition from being |
| | | # undefined via #undef or recursively expanded use the := operator |
| | | # instead of the = operator. |
| | | |
| | | PREDEFINED = |
| | | |
| | | # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then |
| | | # this tag can be used to specify a list of macro names that should be expanded. |
| | | # The macro definition that is found in the sources will be used. |
| | | # Use the PREDEFINED tag if you want to use a different macro definition. |
| | | |
| | | EXPAND_AS_DEFINED = |
| | | |
| | | # If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then |
| | | # doxygen's preprocessor will remove all function-like macros that are alone |
| | | # on a line, have an all uppercase name, and do not end with a semicolon. Such |
| | | # function macros are typically used for boiler-plate code, and will confuse |
| | | # the parser if not removed. |
| | | |
| | | SKIP_FUNCTION_MACROS = YES |
| | | |
| | | #--------------------------------------------------------------------------- |
| | | # Configuration::additions related to external references |
| | | #--------------------------------------------------------------------------- |
| | | |
| | | # The TAGFILES option can be used to specify one or more tagfiles. |
| | | # Optionally an initial location of the external documentation |
| | | # can be added for each tagfile. The format of a tag file without |
| | | # this location is as follows: |
| | | # |
| | | # TAGFILES = file1 file2 ... |
| | | # Adding location for the tag files is done as follows: |
| | | # |
| | | # TAGFILES = file1=loc1 "file2 = loc2" ... |
| | | # where "loc1" and "loc2" can be relative or absolute paths or |
| | | # URLs. If a location is present for each tag, the installdox tool |
| | | # does not have to be run to correct the links. |
| | | # Note that each tag file must have a unique name |
| | | # (where the name does NOT include the path) |
| | | # If a tag file is not located in the directory in which doxygen |
| | | # is run, you must also specify the path to the tagfile here. |
| | | |
| | | TAGFILES = |
| | | |
| | | # When a file name is specified after GENERATE_TAGFILE, doxygen will create |
| | | # a tag file that is based on the input files it reads. |
| | | |
| | | GENERATE_TAGFILE = |
| | | |
| | | # If the ALLEXTERNALS tag is set to YES all external classes will be listed |
| | | # in the class index. If set to NO only the inherited external classes |
| | | # will be listed. |
| | | |
| | | ALLEXTERNALS = NO |
| | | |
| | | # If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed |
| | | # in the modules index. If set to NO, only the current project's groups will |
| | | # be listed. |
| | | |
| | | EXTERNAL_GROUPS = YES |
| | | |
| | | # The PERL_PATH should be the absolute path and name of the perl script |
| | | # interpreter (i.e. the result of `which perl'). |
| | | |
| | | PERL_PATH = /usr/bin/perl |
| | | |
| | | #--------------------------------------------------------------------------- |
| | | # Configuration options related to the dot tool |
| | | #--------------------------------------------------------------------------- |
| | | |
| | | # If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will |
| | | # generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base |
| | | # or super classes. Setting the tag to NO turns the diagrams off. Note that |
| | | # this option is superseded by the HAVE_DOT option below. This is only a |
| | | # fallback. It is recommended to install and use dot, since it yields more |
| | | # powerful graphs. |
| | | |
| | | CLASS_DIAGRAMS = YES |
| | | |
| | | # You can define message sequence charts within doxygen comments using the \msc |
| | | # command. Doxygen will then run the mscgen tool (see |
| | | # http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the |
| | | # documentation. The MSCGEN_PATH tag allows you to specify the directory where |
| | | # the mscgen tool resides. If left empty the tool is assumed to be found in the |
| | | # default search path. |
| | | |
| | | MSCGEN_PATH = |
| | | |
| | | # If set to YES, the inheritance and collaboration graphs will hide |
| | | # inheritance and usage relations if the target is undocumented |
| | | # or is not a class. |
| | | |
| | | HIDE_UNDOC_RELATIONS = YES |
| | | |
| | | # If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is |
| | | # available from the path. This tool is part of Graphviz, a graph visualization |
| | | # toolkit from AT&T and Lucent Bell Labs. The other options in this section |
| | | # have no effect if this option is set to NO (the default) |
| | | |
| | | HAVE_DOT = NO |
| | | |
| | | # The DOT_NUM_THREADS specifies the number of dot invocations doxygen is |
| | | # allowed to run in parallel. When set to 0 (the default) doxygen will |
| | | # base this on the number of processors available in the system. You can set it |
| | | # explicitly to a value larger than 0 to get control over the balance |
| | | # between CPU load and processing speed. |
| | | |
| | | DOT_NUM_THREADS = 0 |
| | | |
| | | # By default doxygen will write a font called FreeSans.ttf to the output |
| | | # directory and reference it in all dot files that doxygen generates. This |
| | | # font does not include all possible unicode characters however, so when you need |
| | | # these (or just want a differently looking font) you can specify the font name |
| | | # using DOT_FONTNAME. You need need to make sure dot is able to find the font, |
| | | # which can be done by putting it in a standard location or by setting the |
| | | # DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory |
| | | # containing the font. |
| | | |
| | | DOT_FONTNAME = FreeSans.ttf |
| | | |
| | | # The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. |
| | | # The default size is 10pt. |
| | | |
| | | DOT_FONTSIZE = 10 |
| | | |
| | | # By default doxygen will tell dot to use the output directory to look for the |
| | | # FreeSans.ttf font (which doxygen will put there itself). If you specify a |
| | | # different font using DOT_FONTNAME you can set the path where dot |
| | | # can find it using this tag. |
| | | |
| | | DOT_FONTPATH = |
| | | |
| | | # If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen |
| | | # will generate a graph for each documented class showing the direct and |
| | | # indirect inheritance relations. Setting this tag to YES will force the |
| | | # the CLASS_DIAGRAMS tag to NO. |
| | | |
| | | CLASS_GRAPH = YES |
| | | |
| | | # If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen |
| | | # will generate a graph for each documented class showing the direct and |
| | | # indirect implementation dependencies (inheritance, containment, and |
| | | # class references variables) of the class with other documented classes. |
| | | |
| | | COLLABORATION_GRAPH = YES |
| | | |
| | | # If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen |
| | | # will generate a graph for groups, showing the direct groups dependencies |
| | | |
| | | GROUP_GRAPHS = YES |
| | | |
| | | # If the UML_LOOK tag is set to YES doxygen will generate inheritance and |
| | | # collaboration diagrams in a style similar to the OMG's Unified Modeling |
| | | # Language. |
| | | |
| | | UML_LOOK = NO |
| | | |
| | | # If set to YES, the inheritance and collaboration graphs will show the |
| | | # relations between templates and their instances. |
| | | |
| | | TEMPLATE_RELATIONS = NO |
| | | |
| | | # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT |
| | | # tags are set to YES then doxygen will generate a graph for each documented |
| | | # file showing the direct and indirect include dependencies of the file with |
| | | # other documented files. |
| | | |
| | | INCLUDE_GRAPH = YES |
| | | |
| | | # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and |
| | | # HAVE_DOT tags are set to YES then doxygen will generate a graph for each |
| | | # documented header file showing the documented files that directly or |
| | | # indirectly include this file. |
| | | |
| | | INCLUDED_BY_GRAPH = YES |
| | | |
| | | # If the CALL_GRAPH and HAVE_DOT options are set to YES then |
| | | # doxygen will generate a call dependency graph for every global function |
| | | # or class method. Note that enabling this option will significantly increase |
| | | # the time of a run. So in most cases it will be better to enable call graphs |
| | | # for selected functions only using the \callgraph command. |
| | | |
| | | CALL_GRAPH = NO |
| | | |
| | | # If the CALLER_GRAPH and HAVE_DOT tags are set to YES then |
| | | # doxygen will generate a caller dependency graph for every global function |
| | | # or class method. Note that enabling this option will significantly increase |
| | | # the time of a run. So in most cases it will be better to enable caller |
| | | # graphs for selected functions only using the \callergraph command. |
| | | |
| | | CALLER_GRAPH = NO |
| | | |
| | | # If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen |
| | | # will graphical hierarchy of all classes instead of a textual one. |
| | | |
| | | GRAPHICAL_HIERARCHY = YES |
| | | |
| | | # If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES |
| | | # then doxygen will show the dependencies a directory has on other directories |
| | | # in a graphical way. The dependency relations are determined by the #include |
| | | # relations between the files in the directories. |
| | | |
| | | DIRECTORY_GRAPH = YES |
| | | |
| | | # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images |
| | | # generated by dot. Possible values are png, jpg, or gif |
| | | # If left blank png will be used. |
| | | |
| | | DOT_IMAGE_FORMAT = png |
| | | |
| | | # The tag DOT_PATH can be used to specify the path where the dot tool can be |
| | | # found. If left blank, it is assumed the dot tool can be found in the path. |
| | | |
| | | DOT_PATH = |
| | | |
| | | # The DOTFILE_DIRS tag can be used to specify one or more directories that |
| | | # contain dot files that are included in the documentation (see the |
| | | # \dotfile command). |
| | | |
| | | DOTFILE_DIRS = |
| | | |
| | | # The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of |
| | | # nodes that will be shown in the graph. If the number of nodes in a graph |
| | | # becomes larger than this value, doxygen will truncate the graph, which is |
| | | # visualized by representing a node as a red box. Note that doxygen if the |
| | | # number of direct children of the root node in a graph is already larger than |
| | | # DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note |
| | | # that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. |
| | | |
| | | DOT_GRAPH_MAX_NODES = 50 |
| | | |
| | | # The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the |
| | | # graphs generated by dot. A depth value of 3 means that only nodes reachable |
| | | # from the root by following a path via at most 3 edges will be shown. Nodes |
| | | # that lay further from the root node will be omitted. Note that setting this |
| | | # option to 1 or 2 may greatly reduce the computation time needed for large |
| | | # code bases. Also note that the size of a graph can be further restricted by |
| | | # DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. |
| | | |
| | | MAX_DOT_GRAPH_DEPTH = 0 |
| | | |
| | | # Set the DOT_TRANSPARENT tag to YES to generate images with a transparent |
| | | # background. This is disabled by default, because dot on Windows does not |
| | | # seem to support this out of the box. Warning: Depending on the platform used, |
| | | # enabling this option may lead to badly anti-aliased labels on the edges of |
| | | # a graph (i.e. they become hard to read). |
| | | |
| | | DOT_TRANSPARENT = NO |
| | | |
| | | # Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output |
| | | # files in one run (i.e. multiple -o and -T options on the command line). This |
| | | # makes dot run faster, but since only newer versions of dot (>1.8.10) |
| | | # support this, this feature is disabled by default. |
| | | |
| | | DOT_MULTI_TARGETS = YES |
| | | |
| | | # If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will |
| | | # generate a legend page explaining the meaning of the various boxes and |
| | | # arrows in the dot generated graphs. |
| | | |
| | | GENERATE_LEGEND = YES |
| | | |
| | | # If the DOT_CLEANUP tag is set to YES (the default) Doxygen will |
| | | # remove the intermediate dot files that are used to generate |
| | | # the various graphs. |
| | | |
| | | DOT_CLEANUP = YES |
| New file |
| | |
| | | /******************************************************* |
| | | HIDAPI - Multi-Platform library for |
| | | communication with HID devices. |
| | | |
| | | Alan Ott |
| | | Signal 11 Software |
| | | |
| | | 8/22/2009 |
| | | |
| | | Copyright 2009, All Rights Reserved. |
| | | |
| | | At the discretion of the user of this library, |
| | | this software may be licensed under the terms of the |
| | | GNU General Public License v3, a BSD-Style license, or the |
| | | original HIDAPI license as outlined in the LICENSE.txt, |
| | | LICENSE-gpl3.txt, LICENSE-bsd.txt, and LICENSE-orig.txt |
| | | files located at the root of the source distribution. |
| | | These files may also be found in the public source |
| | | code repository located at: |
| | | http://github.com/signal11/hidapi . |
| | | ********************************************************/ |
| | | |
| | | /** @file |
| | | * @defgroup API hidapi API |
| | | */ |
| | | |
| | | #ifndef HIDAPI_H__ |
| | | #define HIDAPI_H__ |
| | | |
| | | #include <wchar.h> |
| | | |
| | | #if defined(_WIN32) && !defined(NAMESPACE) && (0) /* SDL: don't export hidapi syms */ |
| | | #define HID_API_EXPORT __declspec(dllexport) |
| | | #define HID_API_CALL |
| | | #else |
| | | #define HID_API_EXPORT /**< API export macro */ |
| | | #define HID_API_CALL /**< API call macro */ |
| | | #endif |
| | | |
| | | #define HID_API_EXPORT_CALL HID_API_EXPORT HID_API_CALL /**< API export and call macro*/ |
| | | |
| | | #if defined(__cplusplus) && !defined(NAMESPACE) |
| | | extern "C" { |
| | | #endif |
| | | #ifdef NAMESPACE |
| | | namespace NAMESPACE { |
| | | #endif |
| | | |
| | | struct hid_device_; |
| | | typedef struct hid_device_ hid_device; /**< opaque hidapi structure */ |
| | | |
| | | /** hidapi info structure */ |
| | | struct 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, and valid on the Windows implementation |
| | | only if the device contains more than one interface. */ |
| | | int interface_number; |
| | | |
| | | /** Pointer to the next device */ |
| | | struct hid_device_info *next; |
| | | }; |
| | | |
| | | |
| | | /** @brief Initialize the HIDAPI library. |
| | | |
| | | This function initializes the HIDAPI library. Calling it is not |
| | | strictly necessary, as it will be called automatically by |
| | | hid_enumerate() and any of the 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. |
| | | |
| | | @ingroup API |
| | | |
| | | @returns |
| | | This function returns 0 on success and -1 on error. |
| | | */ |
| | | int HID_API_EXPORT HID_API_CALL hid_init(void); |
| | | |
| | | /** @brief 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. |
| | | |
| | | @ingroup API |
| | | |
| | | @returns |
| | | This function returns 0 on success and -1 on error. |
| | | */ |
| | | int HID_API_EXPORT HID_API_CALL hid_exit(void); |
| | | |
| | | /** @brief 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 @p vendor_id is set to 0 then any vendor matches. |
| | | If @p product_id is set to 0 then any product matches. |
| | | If @p vendor_id and @p product_id are both set to 0, then |
| | | all HID devices will be returned. |
| | | |
| | | @ingroup API |
| | | @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 |
| | | This function returns a pointer to a linked list of type |
| | | struct #hid_device, containing information about the HID devices |
| | | attached to the system, or NULL in the case of failure. Free |
| | | this linked list by calling hid_free_enumeration(). |
| | | */ |
| | | struct hid_device_info HID_API_EXPORT * HID_API_CALL hid_enumerate(unsigned short vendor_id, unsigned short product_id); |
| | | |
| | | /** @brief Free an enumeration Linked List |
| | | |
| | | This function frees a linked list created by hid_enumerate(). |
| | | |
| | | @ingroup API |
| | | @param devs Pointer to a list of struct_device returned from |
| | | hid_enumerate(). |
| | | */ |
| | | void HID_API_EXPORT HID_API_CALL hid_free_enumeration(struct hid_device_info *devs); |
| | | |
| | | /** @brief Open a HID device using a Vendor ID (VID), Product ID |
| | | (PID) and optionally a serial number. |
| | | |
| | | If @p serial_number is NULL, the first device with the |
| | | specified VID and PID is opened. |
| | | |
| | | @ingroup API |
| | | @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 |
| | | This function returns a pointer to a #hid_device object on |
| | | success or NULL on failure. |
| | | */ |
| | | HID_API_EXPORT hid_device * HID_API_CALL hid_open(unsigned short vendor_id, unsigned short product_id, const wchar_t *serial_number); |
| | | |
| | | /** @brief Open a HID device by its path name. |
| | | |
| | | The path name be determined by calling hid_enumerate(), or a |
| | | platform-specific path name can be used (eg: /dev/hidraw0 on |
| | | Linux). |
| | | |
| | | @ingroup API |
| | | @param path The path name of the device to open |
| | | |
| | | @returns |
| | | This function returns a pointer to a #hid_device object on |
| | | success or NULL on failure. |
| | | */ |
| | | HID_API_EXPORT hid_device * HID_API_CALL hid_open_path(const char *path, int bExclusive /* = false */); |
| | | |
| | | /** @brief Write an Output report to a HID device. |
| | | |
| | | The first byte of @p 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 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 |
| | | 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. |
| | | |
| | | 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). |
| | | |
| | | @ingroup API |
| | | @param device A device handle returned from 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 |
| | | This function returns the actual number of bytes written and |
| | | -1 on error. |
| | | */ |
| | | int HID_API_EXPORT HID_API_CALL hid_write(hid_device *device, const unsigned char *data, size_t length); |
| | | |
| | | /** @brief 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. |
| | | |
| | | @ingroup API |
| | | @param device A device handle returned from 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 |
| | | This function 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. |
| | | */ |
| | | int HID_API_EXPORT HID_API_CALL hid_read_timeout(hid_device *device, unsigned char *data, size_t length, int milliseconds); |
| | | |
| | | /** @brief 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. |
| | | |
| | | @ingroup API |
| | | @param device A device handle returned from 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 |
| | | This function 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. |
| | | */ |
| | | int HID_API_EXPORT HID_API_CALL hid_read(hid_device *device, unsigned char *data, size_t length); |
| | | |
| | | /** @brief Set the device handle to be non-blocking. |
| | | |
| | | In non-blocking mode calls to hid_read() will return |
| | | immediately with a value of 0 if there is no data to be |
| | | read. In blocking mode, hid_read() will wait (block) until |
| | | there is data to read before returning. |
| | | |
| | | Nonblocking can be turned on and off at any time. |
| | | |
| | | @ingroup API |
| | | @param device A device handle returned from hid_open(). |
| | | @param nonblock enable or not the nonblocking reads |
| | | - 1 to enable nonblocking |
| | | - 0 to disable nonblocking. |
| | | |
| | | @returns |
| | | This function returns 0 on success and -1 on error. |
| | | */ |
| | | int HID_API_EXPORT HID_API_CALL hid_set_nonblocking(hid_device *device, int nonblock); |
| | | |
| | | /** @brief Send a Feature report to the device. |
| | | |
| | | Feature reports are sent over the Control endpoint as a |
| | | Set_Report transfer. The first byte of @p 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 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 |
| | | 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. |
| | | |
| | | @ingroup API |
| | | @param device A device handle returned from 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 |
| | | This function returns the actual number of bytes written and |
| | | -1 on error. |
| | | */ |
| | | int HID_API_EXPORT HID_API_CALL hid_send_feature_report(hid_device *device, const unsigned char *data, size_t length); |
| | | |
| | | /** @brief Get a feature report from a HID device. |
| | | |
| | | Set the first byte of @p data[] to the Report ID of the |
| | | report to be read. Make sure to allow space for this |
| | | extra byte in @p data[]. Upon return, the first byte will |
| | | still contain the Report ID, and the report data will |
| | | start in data[1]. |
| | | |
| | | @ingroup API |
| | | @param device A device handle returned from hid_open(). |
| | | @param data A buffer to put the read data into, including |
| | | the Report ID. Set the first byte of @p 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 |
| | | This function returns the number of bytes read plus |
| | | one for the report ID (which is still in the first |
| | | byte), or -1 on error. |
| | | */ |
| | | int HID_API_EXPORT HID_API_CALL hid_get_feature_report(hid_device *device, unsigned char *data, size_t length); |
| | | |
| | | /** @brief Close a HID device. |
| | | |
| | | @ingroup API |
| | | @param device A device handle returned from hid_open(). |
| | | */ |
| | | void HID_API_EXPORT HID_API_CALL hid_close(hid_device *device); |
| | | |
| | | /** @brief Get The Manufacturer String from a HID device. |
| | | |
| | | @ingroup API |
| | | @param device A device handle returned from 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 |
| | | This function returns 0 on success and -1 on error. |
| | | */ |
| | | int HID_API_EXPORT_CALL hid_get_manufacturer_string(hid_device *device, wchar_t *string, size_t maxlen); |
| | | |
| | | /** @brief Get The Product String from a HID device. |
| | | |
| | | @ingroup API |
| | | @param device A device handle returned from 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 |
| | | This function returns 0 on success and -1 on error. |
| | | */ |
| | | int HID_API_EXPORT_CALL hid_get_product_string(hid_device *device, wchar_t *string, size_t maxlen); |
| | | |
| | | /** @brief Get The Serial Number String from a HID device. |
| | | |
| | | @ingroup API |
| | | @param device A device handle returned from 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 |
| | | This function returns 0 on success and -1 on error. |
| | | */ |
| | | int HID_API_EXPORT_CALL hid_get_serial_number_string(hid_device *device, wchar_t *string, size_t maxlen); |
| | | |
| | | /** @brief Get a string from a HID device, based on its string index. |
| | | |
| | | @ingroup API |
| | | @param device A device handle returned from 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 |
| | | This function returns 0 on success and -1 on error. |
| | | */ |
| | | int HID_API_EXPORT_CALL hid_get_indexed_string(hid_device *device, int string_index, wchar_t *string, size_t maxlen); |
| | | |
| | | /** @brief Get a string describing the last error which occurred. |
| | | |
| | | @ingroup API |
| | | @param device A device handle returned from hid_open(). |
| | | |
| | | @returns |
| | | This function returns a string containing the last error |
| | | which occurred or NULL if none has occurred. |
| | | */ |
| | | HID_API_EXPORT const wchar_t* HID_API_CALL hid_error(hid_device *device); |
| | | |
| | | #if defined(__cplusplus) && !defined(NAMESPACE) |
| | | } |
| | | #endif |
| | | #ifdef NAMESPACE |
| | | } |
| | | #endif |
| | | |
| | | #endif |
| | | |
| New file |
| | |
| | | AM_CPPFLAGS = -I$(top_srcdir)/hidapi/ |
| | | |
| | | ## Linux |
| | | if OS_LINUX |
| | | noinst_PROGRAMS = hidtest-libusb hidtest-hidraw |
| | | |
| | | hidtest_hidraw_SOURCES = hidtest.cpp |
| | | hidtest_hidraw_LDADD = $(top_builddir)/linux/libhidapi-hidraw.la |
| | | |
| | | hidtest_libusb_SOURCES = hidtest.cpp |
| | | hidtest_libusb_LDADD = $(top_builddir)/libusb/libhidapi-libusb.la |
| | | else |
| | | |
| | | # Other OS's |
| | | noinst_PROGRAMS = hidtest |
| | | |
| | | hidtest_SOURCES = hidtest.cpp |
| | | hidtest_LDADD = $(top_builddir)/$(backend)/libhidapi.la |
| | | |
| | | endif |
| New file |
| | |
| | | /******************************************************* |
| | | Windows HID simplification |
| | | |
| | | Alan Ott |
| | | Signal 11 Software |
| | | |
| | | 8/22/2009 |
| | | |
| | | Copyright 2009 |
| | | |
| | | This contents of this file may be used by anyone |
| | | for any reason without any conditions and may be |
| | | used as a starting point for your own applications |
| | | which use HIDAPI. |
| | | ********************************************************/ |
| | | |
| | | #include <stdio.h> |
| | | #include <wchar.h> |
| | | #include <string.h> |
| | | #include <stdlib.h> |
| | | #include "hidapi.h" |
| | | |
| | | // Headers needed for sleeping. |
| | | #ifdef _WIN32 |
| | | #include <windows.h> |
| | | #else |
| | | #include <unistd.h> |
| | | #endif |
| | | |
| | | int main(int argc, char* argv[]) |
| | | { |
| | | int res; |
| | | unsigned char buf[256]; |
| | | #define MAX_STR 255 |
| | | wchar_t wstr[MAX_STR]; |
| | | hid_device *handle; |
| | | int i; |
| | | |
| | | #ifdef WIN32 |
| | | UNREFERENCED_PARAMETER(argc); |
| | | UNREFERENCED_PARAMETER(argv); |
| | | #endif |
| | | |
| | | struct hid_device_info *devs, *cur_dev; |
| | | |
| | | if (hid_init()) |
| | | return -1; |
| | | |
| | | devs = hid_enumerate(0x0, 0x0); |
| | | cur_dev = devs; |
| | | while (cur_dev) { |
| | | printf("Device Found\n type: %04hx %04hx\n path: %s\n serial_number: %ls", cur_dev->vendor_id, cur_dev->product_id, cur_dev->path, cur_dev->serial_number); |
| | | printf("\n"); |
| | | printf(" Manufacturer: %ls\n", cur_dev->manufacturer_string); |
| | | printf(" Product: %ls\n", cur_dev->product_string); |
| | | printf(" Release: %hx\n", cur_dev->release_number); |
| | | printf(" Interface: %d\n", cur_dev->interface_number); |
| | | printf("\n"); |
| | | cur_dev = cur_dev->next; |
| | | } |
| | | hid_free_enumeration(devs); |
| | | |
| | | // Set up the command buffer. |
| | | memset(buf,0x00,sizeof(buf)); |
| | | buf[0] = 0x01; |
| | | buf[1] = 0x81; |
| | | |
| | | |
| | | // Open the device using the VID, PID, |
| | | // and optionally the Serial number. |
| | | ////handle = hid_open(0x4d8, 0x3f, L"12345"); |
| | | handle = hid_open(0x4d8, 0x3f, NULL); |
| | | if (!handle) { |
| | | printf("unable to open device\n"); |
| | | return 1; |
| | | } |
| | | |
| | | // Read the Manufacturer String |
| | | wstr[0] = 0x0000; |
| | | res = hid_get_manufacturer_string(handle, wstr, MAX_STR); |
| | | if (res < 0) |
| | | printf("Unable to read manufacturer string\n"); |
| | | printf("Manufacturer String: %ls\n", wstr); |
| | | |
| | | // Read the Product String |
| | | wstr[0] = 0x0000; |
| | | res = hid_get_product_string(handle, wstr, MAX_STR); |
| | | if (res < 0) |
| | | printf("Unable to read product string\n"); |
| | | printf("Product String: %ls\n", wstr); |
| | | |
| | | // Read the Serial Number String |
| | | wstr[0] = 0x0000; |
| | | res = hid_get_serial_number_string(handle, wstr, MAX_STR); |
| | | if (res < 0) |
| | | printf("Unable to read serial number string\n"); |
| | | printf("Serial Number String: (%d) %ls", wstr[0], wstr); |
| | | printf("\n"); |
| | | |
| | | // Read Indexed String 1 |
| | | wstr[0] = 0x0000; |
| | | res = hid_get_indexed_string(handle, 1, wstr, MAX_STR); |
| | | if (res < 0) |
| | | printf("Unable to read indexed string 1\n"); |
| | | printf("Indexed String 1: %ls\n", wstr); |
| | | |
| | | // Set the hid_read() function to be non-blocking. |
| | | hid_set_nonblocking(handle, 1); |
| | | |
| | | // Try to read from the device. There shoud be no |
| | | // data here, but execution should not block. |
| | | res = hid_read(handle, buf, 17); |
| | | |
| | | // Send a Feature Report to the device |
| | | buf[0] = 0x2; |
| | | buf[1] = 0xa0; |
| | | buf[2] = 0x0a; |
| | | buf[3] = 0x00; |
| | | buf[4] = 0x00; |
| | | res = hid_send_feature_report(handle, buf, 17); |
| | | if (res < 0) { |
| | | printf("Unable to send a feature report.\n"); |
| | | } |
| | | |
| | | memset(buf,0,sizeof(buf)); |
| | | |
| | | // Read a Feature Report from the device |
| | | buf[0] = 0x2; |
| | | res = hid_get_feature_report(handle, buf, sizeof(buf)); |
| | | if (res < 0) { |
| | | printf("Unable to get a feature report.\n"); |
| | | printf("%ls", hid_error(handle)); |
| | | } |
| | | else { |
| | | // Print out the returned buffer. |
| | | printf("Feature Report\n "); |
| | | for (i = 0; i < res; i++) |
| | | printf("%02hhx ", buf[i]); |
| | | printf("\n"); |
| | | } |
| | | |
| | | memset(buf,0,sizeof(buf)); |
| | | |
| | | // Toggle LED (cmd 0x80). The first byte is the report number (0x1). |
| | | buf[0] = 0x1; |
| | | buf[1] = 0x80; |
| | | res = hid_write(handle, buf, 17); |
| | | if (res < 0) { |
| | | printf("Unable to write()\n"); |
| | | printf("Error: %ls\n", hid_error(handle)); |
| | | } |
| | | |
| | | |
| | | // Request state (cmd 0x81). The first byte is the report number (0x1). |
| | | buf[0] = 0x1; |
| | | buf[1] = 0x81; |
| | | hid_write(handle, buf, 17); |
| | | if (res < 0) |
| | | printf("Unable to write() (2)\n"); |
| | | |
| | | // Read requested state. hid_read() has been set to be |
| | | // non-blocking by the call to hid_set_nonblocking() above. |
| | | // This loop demonstrates the non-blocking nature of hid_read(). |
| | | res = 0; |
| | | while (res == 0) { |
| | | res = hid_read(handle, buf, sizeof(buf)); |
| | | if (res == 0) |
| | | printf("waiting...\n"); |
| | | if (res < 0) |
| | | printf("Unable to read()\n"); |
| | | #ifdef WIN32 |
| | | Sleep(500); |
| | | #else |
| | | usleep(500*1000); |
| | | #endif |
| | | } |
| | | |
| | | printf("Data read:\n "); |
| | | // Print out the returned buffer. |
| | | for (i = 0; i < res; i++) |
| | | printf("%02hhx ", buf[i]); |
| | | printf("\n"); |
| | | |
| | | hid_close(handle); |
| | | |
| | | /* Free static HIDAPI objects. */ |
| | | hid_exit(); |
| | | |
| | | #ifdef WIN32 |
| | | system("pause"); |
| | | #endif |
| | | |
| | | return 0; |
| | | } |
| source/src/hidapi/ios/Makefile-manual
source/src/hidapi/ios/Makefile.am
source/src/hidapi/ios/hid.m
source/src/hidapi/libusb/Makefile-manual
source/src/hidapi/libusb/Makefile.am
source/src/hidapi/libusb/Makefile.freebsd
source/src/hidapi/libusb/Makefile.linux
source/src/hidapi/libusb/hid.c
source/src/hidapi/libusb/hidusb.cpp
source/src/hidapi/linux/Makefile-manual
source/src/hidapi/linux/Makefile.am
source/src/hidapi/linux/README.txt
source/src/hidapi/linux/hid.c
source/src/hidapi/linux/hid.cpp
source/src/hidapi/linux/hidraw.cpp
source/src/hidapi/m4/ax_pthread.m4
source/src/hidapi/m4/pkg.m4
source/src/hidapi/mac/Makefile-manual
source/src/hidapi/mac/Makefile.am
source/src/hidapi/mac/hid.c
source/src/hidapi/pc/hidapi-hidraw.pc.in
source/src/hidapi/pc/hidapi-libusb.pc.in
source/src/hidapi/pc/hidapi.pc.in
source/src/hidapi/testgui/Makefile-manual
source/src/hidapi/testgui/Makefile.am
source/src/hidapi/testgui/Makefile.freebsd
source/src/hidapi/testgui/Makefile.linux
source/src/hidapi/testgui/Makefile.mac
source/src/hidapi/testgui/Makefile.mingw
source/src/hidapi/testgui/TestGUI.app.in/Contents/Info.plist
source/src/hidapi/testgui/TestGUI.app.in/Contents/PkgInfo
source/src/hidapi/testgui/TestGUI.app.in/Contents/Resources/English.lproj/InfoPlist.strings
source/src/hidapi/testgui/TestGUI.app.in/Contents/Resources/Signal11.icns
source/src/hidapi/testgui/copy_to_bundle.sh
source/src/hidapi/testgui/mac_support.cpp
source/src/hidapi/testgui/mac_support.h
source/src/hidapi/testgui/mac_support_cocoa.m
source/src/hidapi/testgui/start.sh
source/src/hidapi/testgui/test.cpp
source/src/hidapi/testgui/testgui.sln
source/src/hidapi/testgui/testgui.vcproj
source/src/hidapi/udev/99-hid.rules
source/src/hidapi/windows/Makefile-manual
source/src/hidapi/windows/Makefile.am
source/src/hidapi/windows/Makefile.mingw
source/src/hidapi/windows/ddk_build/hidapi.def
source/src/hidapi/windows/ddk_build/makefile
source/src/hidapi/windows/ddk_build/sources
source/src/hidapi/windows/hid.c
source/src/hidapi/windows/hidapi.sln
source/src/hidapi/windows/hidapi.vcproj
source/src/hidapi/windows/hidtest.vcproj
source/src/joystick/SDL_gamecontroller.c
source/src/joystick/SDL_gamecontrollerdb.h
source/src/joystick/SDL_joystick.c
source/src/joystick/SDL_joystick_c.h
source/src/joystick/SDL_sysjoystick.h
source/src/joystick/android/SDL_sysjoystick.c
source/src/joystick/android/SDL_sysjoystick_c.h
source/src/joystick/bsd/SDL_sysjoystick.c
source/src/joystick/controller_type.h
source/src/joystick/darwin/SDL_sysjoystick.c
source/src/joystick/darwin/SDL_sysjoystick_c.h
source/src/joystick/dummy/SDL_sysjoystick.c
source/src/joystick/emscripten/SDL_sysjoystick.c
source/src/joystick/haiku/SDL_haikujoystick.cc
source/src/joystick/hidapi/SDL_hidapi_ps4.c
source/src/joystick/hidapi/SDL_hidapi_switch.c
source/src/joystick/hidapi/SDL_hidapi_xbox360.c
source/src/joystick/hidapi/SDL_hidapi_xboxone.c
source/src/joystick/hidapi/SDL_hidapijoystick.c
source/src/joystick/hidapi/SDL_hidapijoystick_c.h
source/src/joystick/iphoneos/SDL_sysjoystick.m
source/src/joystick/iphoneos/SDL_sysjoystick_c.h
source/src/joystick/linux/SDL_sysjoystick.c
source/src/joystick/linux/SDL_sysjoystick_c.h
source/src/joystick/psp/SDL_sysjoystick.c
source/src/joystick/sort_controllers.py
source/src/joystick/steam/SDL_steamcontroller.h
source/src/joystick/windows/SDL_dinputjoystick.c
source/src/joystick/windows/SDL_dinputjoystick_c.h
source/src/joystick/windows/SDL_mmjoystick.c
source/src/joystick/windows/SDL_windowsjoystick.c
source/src/joystick/windows/SDL_windowsjoystick_c.h
source/src/joystick/windows/SDL_xinputjoystick.c
source/src/joystick/windows/SDL_xinputjoystick_c.h
source/src/libm/e_exp.c
source/src/libm/e_rem_pio2.c
source/src/libm/k_rem_pio2.c
source/src/libm/math_libm.h
source/src/libm/math_private.h
source/src/main/haiku/SDL_BApp.h
source/src/main/haiku/SDL_BeApp.cc
source/src/main/windows/SDL_windows_main.c
source/src/main/windows/version.rc
source/src/power/SDL_power.c
source/src/power/SDL_syspower.h
source/src/power/linux/SDL_syspower.c
source/src/render/SDL_render.c
source/src/render/SDL_sysrender.h
source/src/render/SDL_yuv_sw_c.h
source/src/render/direct3d/SDL_render_d3d.c
source/src/render/direct3d11/SDL_render_d3d11.c
source/src/render/metal/SDL_render_metal.m
source/src/render/opengl/SDL_render_gl.c
source/src/render/opengl/SDL_shaders_gl.h
source/src/render/opengles/SDL_render_gles.c
source/src/render/opengles2/SDL_render_gles2.c
source/src/render/opengles2/SDL_shaders_gles2.c
source/src/render/psp/SDL_render_psp.c
source/src/render/software/SDL_blendfillrect.h
source/src/render/software/SDL_blendline.h
source/src/render/software/SDL_blendpoint.h
source/src/render/software/SDL_drawline.h
source/src/render/software/SDL_drawpoint.h
source/src/render/software/SDL_render_sw.c
source/src/render/software/SDL_render_sw_c.h
source/src/render/software/SDL_rotate.c
source/src/render/software/SDL_rotate.h
source/src/sensor/SDL_sensor.c
source/src/sensor/SDL_sensor_c.h
source/src/sensor/SDL_syssensor.h
source/src/sensor/android/SDL_androidsensor.c
source/src/sensor/android/SDL_androidsensor.h
source/src/sensor/coremotion/SDL_coremotionsensor.h
source/src/sensor/coremotion/SDL_coremotionsensor.m
source/src/sensor/dummy/SDL_dummysensor.c
source/src/sensor/dummy/SDL_dummysensor.h
source/src/stdlib/SDL_iconv.c
source/src/stdlib/SDL_stdlib.c
source/src/stdlib/SDL_string.c
source/src/test/SDL_test_common.c
source/src/test/SDL_test_harness.c
source/src/thread/SDL_thread.c
source/src/thread/psp/SDL_systhread.c
source/src/thread/pthread/SDL_sysmutex.c
source/src/thread/pthread/SDL_systhread.c
source/src/thread/windows/SDL_systhread.c
source/src/timer/SDL_timer_c.h
source/src/video/SDL_RLEaccel_c.h
source/src/video/SDL_blit.h
source/src/video/SDL_blit_1.c
source/src/video/SDL_blit_A.c
source/src/video/SDL_blit_N.c
source/src/video/SDL_blit_copy.h
source/src/video/SDL_blit_slow.h
source/src/video/SDL_egl.c
source/src/video/SDL_egl_c.h
source/src/video/SDL_pixels.c
source/src/video/SDL_pixels_c.h
source/src/video/SDL_rect_c.h
source/src/video/SDL_shape_internals.h
source/src/video/SDL_surface.c
source/src/video/SDL_sysvideo.h
source/src/video/SDL_video.c
source/src/video/SDL_vulkan_utils.c
source/src/video/SDL_yuv.c
source/src/video/SDL_yuv_c.h
source/src/video/android/SDL_androidmouse.c
source/src/video/android/SDL_androidmouse.h
source/src/video/android/SDL_androidvideo.c
source/src/video/android/SDL_androidvideo.h
source/src/video/android/SDL_androidwindow.c
source/src/video/cocoa/SDL_cocoaevents.m
source/src/video/cocoa/SDL_cocoametalview.h
source/src/video/cocoa/SDL_cocoametalview.m
source/src/video/cocoa/SDL_cocoamouse.m
source/src/video/cocoa/SDL_cocoamousetap.m
source/src/video/cocoa/SDL_cocoaopengl.m
source/src/video/cocoa/SDL_cocoavideo.h
source/src/video/cocoa/SDL_cocoavideo.m
source/src/video/cocoa/SDL_cocoavulkan.m
source/src/video/cocoa/SDL_cocoawindow.h
source/src/video/cocoa/SDL_cocoawindow.m
source/src/video/directfb/SDL_DirectFB_video.c
source/src/video/dummy/SDL_nullevents_c.h
source/src/video/dummy/SDL_nullframebuffer_c.h
source/src/video/emscripten/SDL_emscriptenmouse.c
source/src/video/emscripten/SDL_emscriptenopengles.c
source/src/video/haiku/SDL_BWin.h
source/src/video/haiku/SDL_bclipboard.cc
source/src/video/haiku/SDL_bclipboard.h
source/src/video/haiku/SDL_bevents.cc
source/src/video/haiku/SDL_bevents.h
source/src/video/haiku/SDL_bframebuffer.cc
source/src/video/haiku/SDL_bframebuffer.h
source/src/video/haiku/SDL_bkeyboard.cc
source/src/video/haiku/SDL_bkeyboard.h
source/src/video/haiku/SDL_bmodes.cc
source/src/video/haiku/SDL_bmodes.h
source/src/video/haiku/SDL_bopengl.cc
source/src/video/haiku/SDL_bopengl.h
source/src/video/haiku/SDL_bvideo.cc
source/src/video/haiku/SDL_bvideo.h
source/src/video/haiku/SDL_bwindow.cc
source/src/video/haiku/SDL_bwindow.h
source/src/video/kmsdrm/SDL_kmsdrmmouse.c
source/src/video/kmsdrm/SDL_kmsdrmopengles.c
source/src/video/kmsdrm/SDL_kmsdrmvideo.c
source/src/video/kmsdrm/SDL_kmsdrmvideo.h
source/src/video/raspberry/SDL_rpivideo.c
source/src/video/uikit/SDL_uikitappdelegate.m
source/src/video/uikit/SDL_uikitmessagebox.m
source/src/video/uikit/SDL_uikitmetalview.m
source/src/video/uikit/SDL_uikitmodes.h
source/src/video/uikit/SDL_uikitmodes.m
source/src/video/uikit/SDL_uikitopenglview.m
source/src/video/uikit/SDL_uikitvideo.m
source/src/video/uikit/SDL_uikitview.m
source/src/video/uikit/SDL_uikitviewcontroller.m
source/src/video/wayland/SDL_waylandevents.c
source/src/video/wayland/SDL_waylandtouch.c
source/src/video/wayland/SDL_waylandtouch.h
source/src/video/wayland/SDL_waylandvideo.c
source/src/video/wayland/SDL_waylandvideo.h
source/src/video/wayland/SDL_waylandwindow.c
source/src/video/wayland/SDL_waylandwindow.h
source/src/video/windows/SDL_windowsevents.c
source/src/video/windows/SDL_windowsmessagebox.c
source/src/video/windows/SDL_windowsmouse.c
source/src/video/windows/SDL_windowsopengl.h
source/src/video/windows/SDL_windowstaskdialog.h
source/src/video/windows/SDL_windowsvideo.c
source/src/video/windows/SDL_windowsvulkan.c
source/src/video/windows/SDL_windowswindow.c
source/src/video/windows/SDL_windowswindow.h
source/src/video/x11/SDL_x11framebuffer.h
source/src/video/x11/SDL_x11keyboard.c
source/src/video/x11/SDL_x11messagebox.c
source/src/video/x11/SDL_x11messagebox.h
source/src/video/x11/SDL_x11opengl.h
source/src/video/x11/SDL_x11sym.h
source/src/video/x11/SDL_x11video.c
source/src/video/x11/SDL_x11window.c
source/src/video/x11/SDL_x11window.h
source/src/video/yuv2rgb/yuv_rgb_std_func.h
source/test/Makefile.in
source/test/testcustomcursor.c
source/test/testgamecontroller.c
source/test/testjoystick.c
source/test/testplatform.c
source/test/testresample.c
source/test/testsensor.c
source/test/testthread.c
source/test/testvulkan.c
source/test/testwm2.c
source/wayland-protocols/pointer-constraints-unstable-v1.xml
source/wayland-protocols/relative-pointer-unstable-v1.xml
source/wayland-protocols/wayland.xml
source/wayland-protocols/xdg-shell-unstable-v6.xml
source/wayland-protocols/xdg-shell.xml |