├── .gitignore ├── .hgignore ├── .hgtags ├── Android.mk ├── BUGS.txt ├── CMakeLists.txt ├── COPYING.txt ├── CREDITS.txt ├── INSTALL.txt ├── Makefile.in ├── Makefile.minimal ├── Makefile.os2 ├── Makefile.pandora ├── Makefile.psp ├── Makefile.wiz ├── README-SDL.txt ├── README.txt ├── SDL2.spec.in ├── SDL2Config.cmake ├── TODO.txt ├── VisualC-WinRT ├── SDL2-WinRT.nuspec ├── SDL2-WinRT.targets ├── SDL2main-WinRT-NonXAML.nuspec ├── SDL2main-WinRT-NonXAML.targets ├── UWP_VS2015 │ ├── SDL-UWP.sln │ ├── SDL-UWP.vcxproj │ └── SDL-UWP.vcxproj.filters ├── WinPhone81_VS2013 │ ├── SDL-WinPhone81.sln │ ├── SDL-WinPhone81.vcxproj │ └── SDL-WinPhone81.vcxproj.filters ├── WinRT81_VS2013 │ ├── SDL-WinRT81.sln │ ├── SDL-WinRT81.vcxproj │ └── SDL-WinRT81.vcxproj.filters └── tests │ ├── loopwave │ ├── Assets │ │ ├── Logo.png │ │ ├── SmallLogo.png │ │ ├── SplashScreen.png │ │ └── StoreLogo.png │ ├── Package.appxmanifest │ ├── loopwave_VS2012.vcxproj │ └── loopwave_VS2012_TemporaryKey.pfx │ └── testthread │ ├── Assets │ ├── Logo.png │ ├── SmallLogo.png │ ├── SplashScreen.png │ └── StoreLogo.png │ ├── Package.appxmanifest │ ├── testthread_VS2012.vcxproj │ └── testthread_VS2012_TemporaryKey.pfx ├── VisualC.html ├── VisualC ├── SDL.sln ├── SDL │ ├── SDL.vcxproj │ └── SDL.vcxproj.filters ├── SDLmain │ └── SDLmain.vcxproj ├── SDLtest │ └── SDLtest.vcxproj ├── clean.sh ├── tests │ ├── checkkeys │ │ └── checkkeys.vcxproj │ ├── controllermap │ │ └── controllermap.vcxproj │ ├── loopwave │ │ └── loopwave.vcxproj │ ├── testatomic │ │ └── testatomic.vcxproj │ ├── testautomation │ │ └── testautomation.vcxproj │ ├── testdraw2 │ │ └── testdraw2.vcxproj │ ├── testfile │ │ └── testfile.vcxproj │ ├── testgamecontroller │ │ └── testgamecontroller.vcxproj │ ├── testgesture │ │ └── testgesture.vcxproj │ ├── testgl2 │ │ └── testgl2.vcxproj │ ├── testgles2 │ │ └── testgles2.vcxproj │ ├── testjoystick │ │ └── testjoystick.vcxproj │ ├── testoverlay2 │ │ └── testoverlay2.vcxproj │ ├── testplatform │ │ └── testplatform.vcxproj │ ├── testpower │ │ └── testpower.vcxproj │ ├── testrendertarget │ │ └── testrendertarget.vcxproj │ ├── testrumble │ │ └── testrumble.vcxproj │ ├── testscale │ │ └── testscale.vcxproj │ ├── testsensor │ │ └── testsensor.vcxproj │ ├── testshape │ │ └── testshape.vcxproj │ ├── testsprite2 │ │ └── testsprite2.vcxproj │ ├── testvulkan │ │ └── testvulkan.vcxproj │ └── testyuv │ │ └── testyuv.vcxproj └── visualtest │ ├── unittest │ └── testquit │ │ └── testquit_VS2012.vcxproj │ └── visualtest_VS2012.vcxproj ├── WhatsNew.txt ├── Xcode-iOS ├── Demos │ ├── Default.png │ ├── Demos.xcodeproj │ │ └── project.pbxproj │ ├── Icon.png │ ├── Info.plist │ ├── README │ ├── data │ │ ├── bitmapfont │ │ │ ├── kromasky_16x16.bmp │ │ │ └── license.txt │ │ ├── drums │ │ │ ├── ds_brush_snare.wav │ │ │ ├── ds_china.wav │ │ │ ├── ds_kick_big_amb.wav │ │ │ └── ds_loose_skin_mute.wav │ │ ├── icon.bmp │ │ ├── ship.bmp │ │ ├── space.bmp │ │ └── stroke.bmp │ ├── iOS Launch Screen.storyboard │ └── src │ │ ├── accelerometer.c │ │ ├── common.c │ │ ├── common.h │ │ ├── fireworks.c │ │ ├── happy.c │ │ ├── keyboard.c │ │ ├── mixer.c │ │ ├── rectangles.c │ │ └── touch.c ├── SDLtest │ └── SDL2test.xcodeproj │ │ └── project.pbxproj ├── Template │ └── SDL iOS Application │ │ ├── Default-568h@2x.png │ │ ├── Default.png │ │ ├── Icon.png │ │ ├── Info.plist │ │ ├── ___PROJECTNAME___.xcodeproj │ │ ├── TemplateIcon.icns │ │ ├── TemplateInfo.plist │ │ └── project.pbxproj │ │ └── main.c └── Test │ ├── Info.plist │ ├── README │ └── TestiPhoneOS.xcodeproj │ └── project.pbxproj ├── Xcode ├── SDL │ ├── Info-Framework.plist │ ├── SDL.xcodeproj │ │ └── project.pbxproj │ ├── hidapi │ │ └── Info.plist │ └── pkg-support │ │ ├── SDL.info │ │ ├── resources │ │ ├── License.txt │ │ ├── ReadMe.txt │ │ └── SDL_DS_Store │ │ └── sdl_logo.pdf ├── SDLTest │ ├── SDLTest.xcodeproj │ │ └── project.pbxproj │ └── TestDropFile-Info.plist └── XcodeDocSet │ └── Doxyfile ├── acinclude ├── ac_check_define.m4 ├── alsa.m4 ├── ax_check_compiler_flags.m4 ├── ax_gcc_archflag.m4 ├── ax_gcc_x86_cpuid.m4 ├── esd.m4 ├── libtool.m4 ├── ltoptions.m4 ├── ltsugar.m4 ├── ltversion.m4 ├── lt~obsolete.m4 └── pkg.m4 ├── android-project-ant ├── AndroidManifest.xml ├── ant.properties ├── build.properties ├── build.xml ├── default.properties ├── jni │ ├── Android.mk │ ├── Application.mk │ └── src │ │ ├── Android.mk │ │ └── Android_static.mk ├── proguard-project.txt ├── project.properties ├── res │ ├── drawable-hdpi │ │ └── ic_launcher.png │ ├── drawable-mdpi │ │ └── ic_launcher.png │ ├── drawable-xhdpi │ │ └── ic_launcher.png │ ├── drawable-xxhdpi │ │ └── ic_launcher.png │ ├── layout │ │ └── main.xml │ └── values │ │ └── strings.xml └── src ├── android-project ├── app │ ├── build.gradle │ ├── jni │ │ ├── Android.mk │ │ ├── Application.mk │ │ ├── CMakeLists.txt │ │ └── src │ │ │ ├── Android.mk │ │ │ └── CMakeLists.txt │ ├── proguard-rules.pro │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ └── org │ │ │ └── libsdl │ │ │ └── app │ │ │ ├── HIDDevice.java │ │ │ ├── HIDDeviceBLESteamController.java │ │ │ ├── HIDDeviceManager.java │ │ │ ├── HIDDeviceUSB.java │ │ │ ├── SDL.java │ │ │ ├── SDLActivity.java │ │ │ ├── SDLAudioManager.java │ │ │ └── SDLControllerManager.java │ │ └── res │ │ ├── mipmap-hdpi │ │ └── ic_launcher.png │ │ ├── mipmap-mdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xhdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xxhdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xxxhdpi │ │ └── ic_launcher.png │ │ └── values │ │ ├── colors.xml │ │ ├── strings.xml │ │ └── styles.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── settings.gradle ├── autogen.sh ├── build-scripts ├── androidbuild.sh ├── androidbuildlibs.sh ├── checker-buildbot.sh ├── config.guess ├── config.sub ├── emscripten-buildbot.sh ├── g++-fat.sh ├── gcc-fat.sh ├── install-sh ├── iosbuild.sh ├── ltmain.sh ├── mkinstalldirs ├── nacl-buildbot.sh ├── naclbuild.sh ├── os2-buildbot.sh ├── raspberrypi-buildbot.sh ├── showrev.sh ├── strip_fPIC.sh ├── update-copyright.sh ├── updaterev.sh ├── windows-buildbot-zipper.bat ├── winrtbuild.bat └── winrtbuild.ps1 ├── cmake ├── macros.cmake └── sdlchecks.cmake ├── cmake_uninstall.cmake.in ├── configure ├── configure.ac ├── debian ├── changelog ├── compat ├── control ├── copyright ├── docs ├── libsdl2-dev.install ├── libsdl2-dev.manpages ├── libsdl2.install ├── rules ├── sdl2-config.1 ├── source │ └── format └── watch ├── docs ├── README-android.md ├── README-cmake.md ├── README-directfb.md ├── README-dynapi.md ├── README-emscripten.md ├── README-gesture.md ├── README-hg.md ├── README-ios.md ├── README-linux.md ├── README-macosx.md ├── README-nacl.md ├── README-os2.md ├── README-pandora.md ├── README-platforms.md ├── README-porting.md ├── README-psp.md ├── README-raspberrypi.md ├── README-touch.md ├── README-wince.md ├── README-windows.md ├── README-winrt.md ├── README.md └── doxyfile ├── include ├── SDL.h ├── SDL_assert.h ├── SDL_atomic.h ├── SDL_audio.h ├── SDL_bits.h ├── SDL_blendmode.h ├── SDL_clipboard.h ├── SDL_config.h ├── SDL_config.h.cmake ├── SDL_config.h.in ├── SDL_config_android.h ├── SDL_config_iphoneos.h ├── SDL_config_macosx.h ├── SDL_config_minimal.h ├── SDL_config_os2.h ├── SDL_config_pandora.h ├── SDL_config_psp.h ├── SDL_config_windows.h ├── SDL_config_winrt.h ├── SDL_config_wiz.h ├── SDL_copying.h ├── SDL_cpuinfo.h ├── SDL_egl.h ├── SDL_endian.h ├── SDL_error.h ├── SDL_events.h ├── SDL_filesystem.h ├── SDL_gamecontroller.h ├── SDL_gesture.h ├── SDL_haptic.h ├── SDL_hints.h ├── SDL_joystick.h ├── SDL_keyboard.h ├── SDL_keycode.h ├── SDL_loadso.h ├── SDL_locale.h ├── SDL_log.h ├── SDL_main.h ├── SDL_messagebox.h ├── SDL_metal.h ├── SDL_misc.h ├── SDL_mouse.h ├── SDL_mutex.h ├── SDL_name.h ├── SDL_opengl.h ├── SDL_opengl_glext.h ├── SDL_opengles.h ├── SDL_opengles2.h ├── SDL_opengles2_gl2.h ├── SDL_opengles2_gl2ext.h ├── SDL_opengles2_gl2platform.h ├── SDL_opengles2_khrplatform.h ├── SDL_pixels.h ├── SDL_platform.h ├── SDL_power.h ├── SDL_quit.h ├── SDL_rect.h ├── SDL_render.h ├── SDL_revision.h ├── SDL_rwops.h ├── SDL_scancode.h ├── SDL_sensor.h ├── SDL_shape.h ├── SDL_stdinc.h ├── SDL_surface.h ├── SDL_system.h ├── SDL_syswm.h ├── SDL_test.h ├── SDL_test_assert.h ├── SDL_test_common.h ├── SDL_test_compare.h ├── SDL_test_crc32.h ├── SDL_test_font.h ├── SDL_test_fuzzer.h ├── SDL_test_harness.h ├── SDL_test_images.h ├── SDL_test_log.h ├── SDL_test_md5.h ├── SDL_test_memory.h ├── SDL_test_random.h ├── SDL_thread.h ├── SDL_timer.h ├── SDL_touch.h ├── SDL_types.h ├── SDL_version.h ├── SDL_video.h ├── SDL_vulkan.h ├── begin_code.h └── close_code.h ├── sdl2-config-version.cmake.in ├── sdl2-config.cmake.in ├── sdl2-config.in ├── sdl2.m4 ├── sdl2.pc.in ├── src ├── SDL.c ├── SDL_assert.c ├── SDL_assert_c.h ├── SDL_dataqueue.c ├── SDL_dataqueue.h ├── SDL_error.c ├── SDL_error_c.h ├── SDL_hints.c ├── SDL_hints_c.h ├── SDL_internal.h ├── SDL_log.c ├── atomic │ ├── SDL_atomic.c │ └── SDL_spinlock.c ├── audio │ ├── SDL_audio.c │ ├── SDL_audio_c.h │ ├── SDL_audiocvt.c │ ├── SDL_audiodev.c │ ├── SDL_audiodev_c.h │ ├── SDL_audiotypecvt.c │ ├── SDL_mixer.c │ ├── SDL_sysaudio.h │ ├── SDL_wave.c │ ├── SDL_wave.h │ ├── alsa │ │ ├── SDL_alsa_audio.c │ │ └── SDL_alsa_audio.h │ ├── android │ │ ├── SDL_androidaudio.c │ │ └── SDL_androidaudio.h │ ├── arts │ │ ├── SDL_artsaudio.c │ │ └── SDL_artsaudio.h │ ├── coreaudio │ │ ├── SDL_coreaudio.h │ │ └── SDL_coreaudio.m │ ├── directsound │ │ ├── SDL_directsound.c │ │ └── SDL_directsound.h │ ├── disk │ │ ├── SDL_diskaudio.c │ │ └── SDL_diskaudio.h │ ├── dsp │ │ ├── SDL_dspaudio.c │ │ └── SDL_dspaudio.h │ ├── dummy │ │ ├── SDL_dummyaudio.c │ │ └── SDL_dummyaudio.h │ ├── emscripten │ │ ├── SDL_emscriptenaudio.c │ │ └── SDL_emscriptenaudio.h │ ├── esd │ │ ├── SDL_esdaudio.c │ │ └── SDL_esdaudio.h │ ├── fusionsound │ │ ├── SDL_fsaudio.c │ │ └── SDL_fsaudio.h │ ├── haiku │ │ ├── SDL_haikuaudio.cc │ │ └── SDL_haikuaudio.h │ ├── jack │ │ ├── SDL_jackaudio.c │ │ └── SDL_jackaudio.h │ ├── nacl │ │ ├── SDL_naclaudio.c │ │ └── SDL_naclaudio.h │ ├── nas │ │ ├── SDL_nasaudio.c │ │ └── SDL_nasaudio.h │ ├── netbsd │ │ ├── SDL_netbsdaudio.c │ │ └── SDL_netbsdaudio.h │ ├── openslES │ │ ├── SDL_openslES.c │ │ └── SDL_openslES.h │ ├── os2 │ │ ├── SDL_os2audio.c │ │ └── SDL_os2audio.h │ ├── paudio │ │ ├── SDL_paudio.c │ │ └── SDL_paudio.h │ ├── psp │ │ ├── SDL_pspaudio.c │ │ └── SDL_pspaudio.h │ ├── pulseaudio │ │ ├── SDL_pulseaudio.c │ │ └── SDL_pulseaudio.h │ ├── qsa │ │ ├── SDL_qsa_audio.c │ │ └── SDL_qsa_audio.h │ ├── sndio │ │ ├── SDL_sndioaudio.c │ │ └── SDL_sndioaudio.h │ ├── sun │ │ ├── SDL_sunaudio.c │ │ └── SDL_sunaudio.h │ ├── wasapi │ │ ├── SDL_wasapi.c │ │ ├── SDL_wasapi.h │ │ ├── SDL_wasapi_win32.c │ │ └── SDL_wasapi_winrt.cpp │ └── winmm │ │ ├── SDL_winmm.c │ │ └── SDL_winmm.h ├── core │ ├── android │ │ ├── SDL_android.c │ │ ├── SDL_android.h │ │ └── keyinfotable.h │ ├── freebsd │ │ ├── SDL_evdev_kbd_default_keyaccmap.h │ │ └── SDL_evdev_kbd_freebsd.c │ ├── linux │ │ ├── SDL_dbus.c │ │ ├── SDL_dbus.h │ │ ├── SDL_evdev.c │ │ ├── SDL_evdev.h │ │ ├── SDL_evdev_capabilities.c │ │ ├── SDL_evdev_capabilities.h │ │ ├── SDL_evdev_kbd.c │ │ ├── SDL_evdev_kbd.h │ │ ├── SDL_evdev_kbd_default_accents.h │ │ ├── SDL_evdev_kbd_default_keymap.h │ │ ├── SDL_fcitx.c │ │ ├── SDL_fcitx.h │ │ ├── SDL_ibus.c │ │ ├── SDL_ibus.h │ │ ├── SDL_ime.c │ │ ├── SDL_ime.h │ │ ├── SDL_threadprio.c │ │ ├── SDL_udev.c │ │ └── SDL_udev.h │ ├── openbsd │ │ ├── SDL_wscons.h │ │ ├── SDL_wscons_kbd.c │ │ └── SDL_wscons_mouse.c │ ├── os2 │ │ ├── SDL_os2.c │ │ ├── SDL_os2.h │ │ └── geniconv │ │ │ ├── geniconv.c │ │ │ ├── geniconv.h │ │ │ ├── iconv.h │ │ │ ├── makefile │ │ │ ├── os2cp.c │ │ │ ├── os2cp.h │ │ │ ├── os2iconv.c │ │ │ ├── sys2utf8.c │ │ │ └── test.c │ ├── unix │ │ ├── SDL_poll.c │ │ └── SDL_poll.h │ ├── windows │ │ ├── SDL_directx.h │ │ ├── SDL_hid.c │ │ ├── SDL_hid.h │ │ ├── SDL_windows.c │ │ ├── SDL_windows.h │ │ ├── SDL_xinput.c │ │ └── SDL_xinput.h │ └── winrt │ │ ├── SDL_winrtapp_common.cpp │ │ ├── SDL_winrtapp_common.h │ │ ├── SDL_winrtapp_direct3d.cpp │ │ ├── SDL_winrtapp_direct3d.h │ │ ├── SDL_winrtapp_xaml.cpp │ │ └── SDL_winrtapp_xaml.h ├── cpuinfo │ └── SDL_cpuinfo.c ├── dynapi │ ├── SDL_dynapi.c │ ├── SDL_dynapi.h │ ├── SDL_dynapi_overrides.h │ ├── SDL_dynapi_procs.h │ └── gendynapi.pl ├── events │ ├── SDL_clipboardevents.c │ ├── SDL_clipboardevents_c.h │ ├── SDL_displayevents.c │ ├── SDL_displayevents_c.h │ ├── SDL_dropevents.c │ ├── SDL_dropevents_c.h │ ├── SDL_events.c │ ├── SDL_events_c.h │ ├── SDL_gesture.c │ ├── SDL_gesture_c.h │ ├── SDL_keyboard.c │ ├── SDL_keyboard_c.h │ ├── SDL_mouse.c │ ├── SDL_mouse_c.h │ ├── SDL_quit.c │ ├── SDL_sysevents.h │ ├── SDL_touch.c │ ├── SDL_touch_c.h │ ├── SDL_windowevents.c │ ├── SDL_windowevents_c.h │ ├── blank_cursor.h │ ├── default_cursor.h │ ├── scancodes_darwin.h │ ├── scancodes_linux.h │ ├── scancodes_windows.h │ └── scancodes_xfree86.h ├── file │ ├── SDL_rwops.c │ └── cocoa │ │ ├── SDL_rwopsbundlesupport.h │ │ └── SDL_rwopsbundlesupport.m ├── filesystem │ ├── android │ │ └── SDL_sysfilesystem.c │ ├── cocoa │ │ └── SDL_sysfilesystem.m │ ├── dummy │ │ └── SDL_sysfilesystem.c │ ├── emscripten │ │ └── SDL_sysfilesystem.c │ ├── haiku │ │ └── SDL_sysfilesystem.cc │ ├── nacl │ │ └── SDL_sysfilesystem.c │ ├── os2 │ │ └── SDL_sysfilesystem.c │ ├── unix │ │ └── SDL_sysfilesystem.c │ ├── windows │ │ └── SDL_sysfilesystem.c │ └── winrt │ │ └── SDL_sysfilesystem.cpp ├── haptic │ ├── SDL_haptic.c │ ├── SDL_haptic_c.h │ ├── SDL_syshaptic.h │ ├── android │ │ ├── SDL_syshaptic.c │ │ └── SDL_syshaptic_c.h │ ├── darwin │ │ ├── SDL_syshaptic.c │ │ └── SDL_syshaptic_c.h │ ├── dummy │ │ └── SDL_syshaptic.c │ ├── linux │ │ └── SDL_syshaptic.c │ └── windows │ │ ├── SDL_dinputhaptic.c │ │ ├── SDL_dinputhaptic_c.h │ │ ├── SDL_windowshaptic.c │ │ ├── SDL_windowshaptic_c.h │ │ ├── SDL_xinputhaptic.c │ │ └── SDL_xinputhaptic_c.h ├── hidapi │ ├── AUTHORS.txt │ ├── HACKING.txt │ ├── LICENSE-bsd.txt │ ├── LICENSE-gpl3.txt │ ├── LICENSE-orig.txt │ ├── LICENSE.txt │ ├── Makefile.am │ ├── README.txt │ ├── SDL_hidapi.c │ ├── SDL_hidapi.h │ ├── android │ │ ├── hid.cpp │ │ ├── jni │ │ │ ├── Android.mk │ │ │ └── Application.mk │ │ └── project.properties │ ├── bootstrap │ ├── configure.ac │ ├── doxygen │ │ └── Doxyfile │ ├── hidapi │ │ └── hidapi.h │ ├── hidtest │ │ ├── Makefile.am │ │ └── hidtest.cpp │ ├── ios │ │ ├── Makefile-manual │ │ ├── Makefile.am │ │ └── hid.m │ ├── libusb │ │ ├── Makefile-manual │ │ ├── Makefile.am │ │ ├── Makefile.freebsd │ │ ├── Makefile.linux │ │ ├── hid.c │ │ └── hidusb.cpp │ ├── linux │ │ ├── Makefile-manual │ │ ├── Makefile.am │ │ ├── README.txt │ │ ├── hid.c │ │ └── hidraw.cpp │ ├── m4 │ │ ├── ax_pthread.m4 │ │ └── pkg.m4 │ ├── mac │ │ ├── Makefile-manual │ │ ├── Makefile.am │ │ └── hid.c │ ├── pc │ │ ├── hidapi-hidraw.pc.in │ │ ├── hidapi-libusb.pc.in │ │ └── hidapi.pc.in │ ├── testgui │ │ ├── Makefile-manual │ │ ├── Makefile.am │ │ ├── Makefile.freebsd │ │ ├── Makefile.linux │ │ ├── Makefile.mac │ │ ├── Makefile.mingw │ │ ├── TestGUI.app.in │ │ │ └── Contents │ │ │ │ ├── Info.plist │ │ │ │ ├── PkgInfo │ │ │ │ └── Resources │ │ │ │ ├── English.lproj │ │ │ │ └── InfoPlist.strings │ │ │ │ └── Signal11.icns │ │ ├── copy_to_bundle.sh │ │ ├── mac_support.cpp │ │ ├── mac_support.h │ │ ├── mac_support_cocoa.m │ │ ├── start.sh │ │ ├── test.cpp │ │ ├── testgui.sln │ │ └── testgui.vcproj │ ├── udev │ │ └── 99-hid.rules │ └── windows │ │ ├── Makefile-manual │ │ ├── Makefile.am │ │ ├── Makefile.mingw │ │ ├── ddk_build │ │ ├── hidapi.def │ │ ├── makefile │ │ └── sources │ │ ├── hid.c │ │ ├── hidapi.sln │ │ ├── hidapi.vcproj │ │ └── hidtest.vcproj ├── joystick │ ├── SDL_gamecontroller.c │ ├── SDL_gamecontrollerdb.h │ ├── SDL_joystick.c │ ├── SDL_joystick_c.h │ ├── SDL_sysjoystick.h │ ├── android │ │ ├── SDL_sysjoystick.c │ │ └── SDL_sysjoystick_c.h │ ├── bsd │ │ └── SDL_bsdjoystick.c │ ├── check_8bitdo.sh │ ├── controller_type.h │ ├── darwin │ │ ├── SDL_iokitjoystick.c │ │ └── SDL_iokitjoystick_c.h │ ├── dummy │ │ └── SDL_sysjoystick.c │ ├── emscripten │ │ ├── SDL_sysjoystick.c │ │ └── SDL_sysjoystick_c.h │ ├── haiku │ │ └── SDL_haikujoystick.cc │ ├── hidapi │ │ ├── SDL_hidapi_gamecube.c │ │ ├── SDL_hidapi_ps4.c │ │ ├── SDL_hidapi_ps5.c │ │ ├── SDL_hidapi_rumble.c │ │ ├── SDL_hidapi_rumble.h │ │ ├── SDL_hidapi_stadia.c │ │ ├── SDL_hidapi_steam.c │ │ ├── SDL_hidapi_switch.c │ │ ├── SDL_hidapi_xbox360.c │ │ ├── SDL_hidapi_xbox360w.c │ │ ├── SDL_hidapi_xboxone.c │ │ ├── SDL_hidapijoystick.c │ │ ├── SDL_hidapijoystick_c.h │ │ └── steam │ │ │ ├── controller_constants.h │ │ │ └── controller_structs.h │ ├── iphoneos │ │ ├── SDL_mfijoystick.m │ │ └── SDL_mfijoystick_c.h │ ├── linux │ │ ├── SDL_sysjoystick.c │ │ └── SDL_sysjoystick_c.h │ ├── os2 │ │ └── SDL_os2joystick.c │ ├── psp │ │ └── SDL_sysjoystick.c │ ├── sort_controllers.py │ ├── steam │ │ ├── SDL_steamcontroller.c │ │ └── SDL_steamcontroller.h │ ├── usb_ids.h │ ├── virtual │ │ ├── SDL_virtualjoystick.c │ │ └── SDL_virtualjoystick_c.h │ └── windows │ │ ├── SDL_dinputjoystick.c │ │ ├── SDL_dinputjoystick_c.h │ │ ├── SDL_mmjoystick.c │ │ ├── SDL_rawinputjoystick.c │ │ ├── SDL_rawinputjoystick_c.h │ │ ├── SDL_windows_gaming_input.c │ │ ├── SDL_windowsjoystick.c │ │ ├── SDL_windowsjoystick_c.h │ │ ├── SDL_xinputjoystick.c │ │ └── SDL_xinputjoystick_c.h ├── libm │ ├── e_atan2.c │ ├── e_exp.c │ ├── e_fmod.c │ ├── e_log.c │ ├── e_log10.c │ ├── e_pow.c │ ├── e_rem_pio2.c │ ├── e_sqrt.c │ ├── k_cos.c │ ├── k_rem_pio2.c │ ├── k_sin.c │ ├── k_tan.c │ ├── math_libm.h │ ├── math_private.h │ ├── s_atan.c │ ├── s_copysign.c │ ├── s_cos.c │ ├── s_fabs.c │ ├── s_floor.c │ ├── s_scalbn.c │ ├── s_sin.c │ └── s_tan.c ├── loadso │ ├── dlopen │ │ └── SDL_sysloadso.c │ ├── dummy │ │ └── SDL_sysloadso.c │ ├── os2 │ │ └── SDL_sysloadso.c │ └── windows │ │ └── SDL_sysloadso.c ├── locale │ ├── SDL_locale.c │ ├── SDL_syslocale.h │ ├── android │ │ └── SDL_syslocale.c │ ├── dummy │ │ └── SDL_syslocale.c │ ├── emscripten │ │ └── SDL_syslocale.c │ ├── haiku │ │ └── SDL_syslocale.cc │ ├── macosx │ │ └── SDL_syslocale.m │ ├── unix │ │ └── SDL_syslocale.c │ ├── windows │ │ └── SDL_syslocale.c │ └── winrt │ │ └── SDL_syslocale.c ├── main │ ├── android │ │ └── SDL_android_main.c │ ├── dummy │ │ └── SDL_dummy_main.c │ ├── haiku │ │ ├── SDL_BApp.h │ │ ├── SDL_BeApp.cc │ │ └── SDL_BeApp.h │ ├── nacl │ │ └── SDL_nacl_main.c │ ├── psp │ │ └── SDL_psp_main.c │ ├── uikit │ │ └── SDL_uikit_main.c │ ├── windows │ │ ├── SDL_windows_main.c │ │ └── version.rc │ └── winrt │ │ ├── SDL2-WinRTResource_BlankCursor.cur │ │ ├── SDL2-WinRTResources.rc │ │ └── SDL_winrt_main_NonXAML.cpp ├── misc │ ├── SDL_sysurl.h │ ├── SDL_url.c │ ├── android │ │ └── SDL_sysurl.c │ ├── dummy │ │ └── SDL_sysurl.c │ ├── haiku │ │ └── SDL_sysurl.cc │ ├── ios │ │ └── SDL_sysurl.m │ ├── macosx │ │ └── SDL_sysurl.m │ ├── riscos │ │ └── SDL_sysurl.c │ ├── unix │ │ └── SDL_sysurl.c │ ├── windows │ │ └── SDL_sysurl.c │ └── winrt │ │ └── SDL_sysurl.cpp ├── power │ ├── SDL_power.c │ ├── SDL_syspower.h │ ├── android │ │ └── SDL_syspower.c │ ├── emscripten │ │ └── SDL_syspower.c │ ├── haiku │ │ └── SDL_syspower.c │ ├── linux │ │ └── SDL_syspower.c │ ├── macosx │ │ └── SDL_syspower.c │ ├── psp │ │ └── SDL_syspower.c │ ├── uikit │ │ ├── SDL_syspower.h │ │ └── SDL_syspower.m │ ├── windows │ │ └── SDL_syspower.c │ └── winrt │ │ └── SDL_syspower.cpp ├── render │ ├── SDL_d3dmath.c │ ├── SDL_d3dmath.h │ ├── SDL_render.c │ ├── SDL_sysrender.h │ ├── SDL_yuv_sw.c │ ├── SDL_yuv_sw_c.h │ ├── direct3d │ │ ├── SDL_render_d3d.c │ │ ├── SDL_shaders_d3d.c │ │ └── SDL_shaders_d3d.h │ ├── direct3d11 │ │ ├── SDL_render_d3d11.c │ │ ├── SDL_render_winrt.cpp │ │ ├── SDL_render_winrt.h │ │ ├── SDL_shaders_d3d11.c │ │ └── SDL_shaders_d3d11.h │ ├── metal │ │ ├── SDL_render_metal.m │ │ ├── SDL_shaders_metal.metal │ │ ├── SDL_shaders_metal_ios.h │ │ ├── SDL_shaders_metal_iphonesimulator.h │ │ ├── SDL_shaders_metal_osx.h │ │ ├── SDL_shaders_metal_tvos.h │ │ ├── SDL_shaders_metal_tvsimulator.h │ │ └── build-metal-shaders.sh │ ├── opengl │ │ ├── SDL_glfuncs.h │ │ ├── SDL_render_gl.c │ │ ├── SDL_shaders_gl.c │ │ └── SDL_shaders_gl.h │ ├── opengles │ │ ├── SDL_glesfuncs.h │ │ └── SDL_render_gles.c │ ├── opengles2 │ │ ├── SDL_gles2funcs.h │ │ ├── SDL_render_gles2.c │ │ ├── SDL_shaders_gles2.c │ │ └── SDL_shaders_gles2.h │ ├── psp │ │ └── SDL_render_psp.c │ └── software │ │ ├── SDL_blendfillrect.c │ │ ├── SDL_blendfillrect.h │ │ ├── SDL_blendline.c │ │ ├── SDL_blendline.h │ │ ├── SDL_blendpoint.c │ │ ├── SDL_blendpoint.h │ │ ├── SDL_draw.h │ │ ├── SDL_drawline.c │ │ ├── SDL_drawline.h │ │ ├── SDL_drawpoint.c │ │ ├── SDL_drawpoint.h │ │ ├── SDL_render_sw.c │ │ ├── SDL_render_sw_c.h │ │ ├── SDL_rotate.c │ │ └── SDL_rotate.h ├── sensor │ ├── SDL_sensor.c │ ├── SDL_sensor_c.h │ ├── SDL_syssensor.h │ ├── android │ │ ├── SDL_androidsensor.c │ │ └── SDL_androidsensor.h │ ├── coremotion │ │ ├── SDL_coremotionsensor.h │ │ └── SDL_coremotionsensor.m │ ├── dummy │ │ ├── SDL_dummysensor.c │ │ └── SDL_dummysensor.h │ └── windows │ │ ├── SDL_windowssensor.c │ │ └── SDL_windowssensor.h ├── stdlib │ ├── SDL_crc32.c │ ├── SDL_getenv.c │ ├── SDL_iconv.c │ ├── SDL_malloc.c │ ├── SDL_qsort.c │ ├── SDL_stdlib.c │ ├── SDL_string.c │ └── SDL_strtokr.c ├── test │ ├── SDL_test_assert.c │ ├── SDL_test_common.c │ ├── SDL_test_compare.c │ ├── SDL_test_crc32.c │ ├── SDL_test_font.c │ ├── SDL_test_fuzzer.c │ ├── SDL_test_harness.c │ ├── SDL_test_imageBlit.c │ ├── SDL_test_imageBlitBlend.c │ ├── SDL_test_imageFace.c │ ├── SDL_test_imagePrimitives.c │ ├── SDL_test_imagePrimitivesBlend.c │ ├── SDL_test_log.c │ ├── SDL_test_md5.c │ ├── SDL_test_memory.c │ └── SDL_test_random.c ├── thread │ ├── SDL_systhread.h │ ├── SDL_thread.c │ ├── SDL_thread_c.h │ ├── generic │ │ ├── SDL_syscond.c │ │ ├── SDL_syscond_c.h │ │ ├── SDL_sysmutex.c │ │ ├── SDL_sysmutex_c.h │ │ ├── SDL_syssem.c │ │ ├── SDL_systhread.c │ │ ├── SDL_systhread_c.h │ │ └── SDL_systls.c │ ├── os2 │ │ ├── SDL_sysmutex.c │ │ ├── SDL_syssem.c │ │ ├── SDL_systhread.c │ │ ├── SDL_systhread_c.h │ │ ├── SDL_systls.c │ │ └── SDL_systls_c.h │ ├── psp │ │ ├── SDL_syscond.c │ │ ├── SDL_sysmutex.c │ │ ├── SDL_sysmutex_c.h │ │ ├── SDL_syssem.c │ │ ├── SDL_systhread.c │ │ └── SDL_systhread_c.h │ ├── pthread │ │ ├── SDL_syscond.c │ │ ├── SDL_sysmutex.c │ │ ├── SDL_sysmutex_c.h │ │ ├── SDL_syssem.c │ │ ├── SDL_systhread.c │ │ ├── SDL_systhread_c.h │ │ └── SDL_systls.c │ ├── stdcpp │ │ ├── SDL_syscond.cpp │ │ ├── SDL_sysmutex.cpp │ │ ├── SDL_sysmutex_c.h │ │ ├── SDL_systhread.cpp │ │ └── SDL_systhread_c.h │ └── windows │ │ ├── SDL_syscond_srw.c │ │ ├── SDL_sysmutex.c │ │ ├── SDL_sysmutex_c.h │ │ ├── SDL_syssem.c │ │ ├── SDL_systhread.c │ │ ├── SDL_systhread_c.h │ │ └── SDL_systls.c ├── timer │ ├── SDL_timer.c │ ├── SDL_timer_c.h │ ├── dummy │ │ └── SDL_systimer.c │ ├── haiku │ │ └── SDL_systimer.c │ ├── os2 │ │ └── SDL_systimer.c │ ├── psp │ │ └── SDL_systimer.c │ ├── unix │ │ └── SDL_systimer.c │ └── windows │ │ └── SDL_systimer.c └── video │ ├── SDL_RLEaccel.c │ ├── SDL_RLEaccel_c.h │ ├── SDL_blit.c │ ├── SDL_blit.h │ ├── SDL_blit_0.c │ ├── SDL_blit_1.c │ ├── SDL_blit_A.c │ ├── SDL_blit_N.c │ ├── SDL_blit_auto.c │ ├── SDL_blit_auto.h │ ├── SDL_blit_copy.c │ ├── SDL_blit_copy.h │ ├── SDL_blit_slow.c │ ├── SDL_blit_slow.h │ ├── SDL_bmp.c │ ├── SDL_clipboard.c │ ├── SDL_egl.c │ ├── SDL_egl_c.h │ ├── SDL_fillrect.c │ ├── SDL_pixels.c │ ├── SDL_pixels_c.h │ ├── SDL_rect.c │ ├── SDL_rect_c.h │ ├── SDL_shape.c │ ├── SDL_shape_internals.h │ ├── SDL_stretch.c │ ├── SDL_surface.c │ ├── SDL_sysvideo.h │ ├── SDL_video.c │ ├── SDL_vulkan_internal.h │ ├── SDL_vulkan_utils.c │ ├── SDL_yuv.c │ ├── SDL_yuv_c.h │ ├── android │ ├── SDL_androidclipboard.c │ ├── SDL_androidclipboard.h │ ├── SDL_androidevents.c │ ├── SDL_androidevents.h │ ├── SDL_androidgl.c │ ├── SDL_androidgl.h │ ├── SDL_androidkeyboard.c │ ├── SDL_androidkeyboard.h │ ├── SDL_androidmessagebox.c │ ├── SDL_androidmessagebox.h │ ├── SDL_androidmouse.c │ ├── SDL_androidmouse.h │ ├── SDL_androidtouch.c │ ├── SDL_androidtouch.h │ ├── SDL_androidvideo.c │ ├── SDL_androidvideo.h │ ├── SDL_androidvulkan.c │ ├── SDL_androidvulkan.h │ ├── SDL_androidwindow.c │ └── SDL_androidwindow.h │ ├── arm │ ├── pixman-arm-asm.h │ ├── pixman-arm-neon-asm.S │ ├── pixman-arm-neon-asm.h │ ├── pixman-arm-simd-asm.S │ └── pixman-arm-simd-asm.h │ ├── cocoa │ ├── SDL_cocoaclipboard.h │ ├── SDL_cocoaclipboard.m │ ├── SDL_cocoaevents.h │ ├── SDL_cocoaevents.m │ ├── SDL_cocoakeyboard.h │ ├── SDL_cocoakeyboard.m │ ├── SDL_cocoamessagebox.h │ ├── SDL_cocoamessagebox.m │ ├── SDL_cocoametalview.h │ ├── SDL_cocoametalview.m │ ├── SDL_cocoamodes.h │ ├── SDL_cocoamodes.m │ ├── SDL_cocoamouse.h │ ├── SDL_cocoamouse.m │ ├── SDL_cocoamousetap.h │ ├── SDL_cocoamousetap.m │ ├── SDL_cocoaopengl.h │ ├── SDL_cocoaopengl.m │ ├── SDL_cocoaopengles.h │ ├── SDL_cocoaopengles.m │ ├── SDL_cocoashape.h │ ├── SDL_cocoashape.m │ ├── SDL_cocoavideo.h │ ├── SDL_cocoavideo.m │ ├── SDL_cocoavulkan.h │ ├── SDL_cocoavulkan.m │ ├── SDL_cocoawindow.h │ └── SDL_cocoawindow.m │ ├── directfb │ ├── SDL_DirectFB_WM.c │ ├── SDL_DirectFB_WM.h │ ├── SDL_DirectFB_dyn.c │ ├── SDL_DirectFB_dyn.h │ ├── SDL_DirectFB_events.c │ ├── SDL_DirectFB_events.h │ ├── SDL_DirectFB_modes.c │ ├── SDL_DirectFB_modes.h │ ├── SDL_DirectFB_mouse.c │ ├── SDL_DirectFB_mouse.h │ ├── SDL_DirectFB_opengl.c │ ├── SDL_DirectFB_opengl.h │ ├── SDL_DirectFB_render.c │ ├── SDL_DirectFB_render.h │ ├── SDL_DirectFB_shape.c │ ├── SDL_DirectFB_shape.h │ ├── SDL_DirectFB_video.c │ ├── SDL_DirectFB_video.h │ ├── SDL_DirectFB_vulkan.c │ ├── SDL_DirectFB_vulkan.h │ ├── SDL_DirectFB_window.c │ └── SDL_DirectFB_window.h │ ├── dummy │ ├── SDL_nullevents.c │ ├── SDL_nullevents_c.h │ ├── SDL_nullframebuffer.c │ ├── SDL_nullframebuffer_c.h │ ├── SDL_nullvideo.c │ └── SDL_nullvideo.h │ ├── emscripten │ ├── SDL_emscriptenevents.c │ ├── SDL_emscriptenevents.h │ ├── SDL_emscriptenframebuffer.c │ ├── SDL_emscriptenframebuffer.h │ ├── SDL_emscriptenmouse.c │ ├── SDL_emscriptenmouse.h │ ├── SDL_emscriptenopengles.c │ ├── SDL_emscriptenopengles.h │ ├── SDL_emscriptenvideo.c │ └── SDL_emscriptenvideo.h │ ├── haiku │ ├── SDL_BWin.h │ ├── SDL_bclipboard.cc │ ├── SDL_bclipboard.h │ ├── SDL_bevents.cc │ ├── SDL_bevents.h │ ├── SDL_bframebuffer.cc │ ├── SDL_bframebuffer.h │ ├── SDL_bkeyboard.cc │ ├── SDL_bkeyboard.h │ ├── SDL_bmessagebox.cc │ ├── SDL_bmessagebox.h │ ├── SDL_bmodes.cc │ ├── SDL_bmodes.h │ ├── SDL_bopengl.cc │ ├── SDL_bopengl.h │ ├── SDL_bvideo.cc │ ├── SDL_bvideo.h │ ├── SDL_bwindow.cc │ └── SDL_bwindow.h │ ├── khronos │ ├── EGL │ │ ├── egl.h │ │ ├── eglext.h │ │ └── eglplatform.h │ ├── GLES2 │ │ ├── gl2.h │ │ ├── gl2ext.h │ │ └── gl2platform.h │ ├── KHR │ │ └── khrplatform.h │ └── vulkan │ │ ├── vk_icd.h │ │ ├── vk_layer.h │ │ ├── vk_platform.h │ │ ├── vk_sdk_platform.h │ │ ├── vulkan.h │ │ ├── vulkan.hpp │ │ ├── vulkan_android.h │ │ ├── vulkan_beta.h │ │ ├── vulkan_core.h │ │ ├── vulkan_directfb.h │ │ ├── vulkan_fuchsia.h │ │ ├── vulkan_ggp.h │ │ ├── vulkan_ios.h │ │ ├── vulkan_macos.h │ │ ├── vulkan_metal.h │ │ ├── vulkan_vi.h │ │ ├── vulkan_wayland.h │ │ ├── vulkan_win32.h │ │ ├── vulkan_xcb.h │ │ ├── vulkan_xlib.h │ │ └── vulkan_xlib_xrandr.h │ ├── kmsdrm │ ├── SDL_kmsdrmdyn.c │ ├── SDL_kmsdrmdyn.h │ ├── SDL_kmsdrmevents.c │ ├── SDL_kmsdrmevents.h │ ├── SDL_kmsdrmmouse.c │ ├── SDL_kmsdrmmouse.h │ ├── SDL_kmsdrmopengles.c │ ├── SDL_kmsdrmopengles.h │ ├── SDL_kmsdrmsym.h │ ├── SDL_kmsdrmvideo.c │ ├── SDL_kmsdrmvideo.h │ ├── SDL_kmsdrmvulkan.c │ └── SDL_kmsdrmvulkan.h │ ├── nacl │ ├── SDL_naclevents.c │ ├── SDL_naclevents_c.h │ ├── SDL_naclglue.c │ ├── SDL_naclopengles.c │ ├── SDL_naclopengles.h │ ├── SDL_naclvideo.c │ ├── SDL_naclvideo.h │ ├── SDL_naclwindow.c │ └── SDL_naclwindow.h │ ├── offscreen │ ├── SDL_offscreenevents.c │ ├── SDL_offscreenevents_c.h │ ├── SDL_offscreenframebuffer.c │ ├── SDL_offscreenframebuffer_c.h │ ├── SDL_offscreenopengl.c │ ├── SDL_offscreenopengl.h │ ├── SDL_offscreenvideo.c │ ├── SDL_offscreenvideo.h │ ├── SDL_offscreenwindow.c │ └── SDL_offscreenwindow.h │ ├── os2 │ ├── SDL_gradd.h │ ├── SDL_os2dive.c │ ├── SDL_os2messagebox.c │ ├── SDL_os2messagebox.h │ ├── SDL_os2mouse.c │ ├── SDL_os2mouse.h │ ├── SDL_os2output.h │ ├── SDL_os2util.c │ ├── SDL_os2util.h │ ├── SDL_os2video.c │ ├── SDL_os2video.h │ └── SDL_os2vman.c │ ├── pandora │ ├── SDL_pandora.c │ ├── SDL_pandora.h │ ├── SDL_pandora_events.c │ └── SDL_pandora_events.h │ ├── psp │ ├── SDL_pspevents.c │ ├── SDL_pspevents_c.h │ ├── SDL_pspgl.c │ ├── SDL_pspgl_c.h │ ├── SDL_pspmouse.c │ ├── SDL_pspmouse_c.h │ ├── SDL_pspvideo.c │ └── SDL_pspvideo.h │ ├── qnx │ ├── gl.c │ ├── keyboard.c │ ├── sdl_qnx.h │ └── video.c │ ├── raspberry │ ├── SDL_rpievents.c │ ├── SDL_rpievents_c.h │ ├── SDL_rpimouse.c │ ├── SDL_rpimouse.h │ ├── SDL_rpiopengles.c │ ├── SDL_rpiopengles.h │ ├── SDL_rpivideo.c │ └── SDL_rpivideo.h │ ├── sdlgenblit.pl │ ├── uikit │ ├── SDL_uikitappdelegate.h │ ├── SDL_uikitappdelegate.m │ ├── SDL_uikitclipboard.h │ ├── SDL_uikitclipboard.m │ ├── SDL_uikitevents.h │ ├── SDL_uikitevents.m │ ├── SDL_uikitmessagebox.h │ ├── SDL_uikitmessagebox.m │ ├── SDL_uikitmetalview.h │ ├── SDL_uikitmetalview.m │ ├── SDL_uikitmodes.h │ ├── SDL_uikitmodes.m │ ├── SDL_uikitopengles.h │ ├── SDL_uikitopengles.m │ ├── SDL_uikitopenglview.h │ ├── SDL_uikitopenglview.m │ ├── SDL_uikitvideo.h │ ├── SDL_uikitvideo.m │ ├── SDL_uikitview.h │ ├── SDL_uikitview.m │ ├── SDL_uikitviewcontroller.h │ ├── SDL_uikitviewcontroller.m │ ├── SDL_uikitvulkan.h │ ├── SDL_uikitvulkan.m │ ├── SDL_uikitwindow.h │ ├── SDL_uikitwindow.m │ └── keyinfotable.h │ ├── vivante │ ├── SDL_vivanteopengles.c │ ├── SDL_vivanteopengles.h │ ├── SDL_vivanteplatform.c │ ├── SDL_vivanteplatform.h │ ├── SDL_vivantevideo.c │ ├── SDL_vivantevideo.h │ ├── SDL_vivantevulkan.c │ └── SDL_vivantevulkan.h │ ├── wayland │ ├── SDL_waylandclipboard.c │ ├── SDL_waylandclipboard.h │ ├── SDL_waylanddatamanager.c │ ├── SDL_waylanddatamanager.h │ ├── SDL_waylanddyn.c │ ├── SDL_waylanddyn.h │ ├── SDL_waylandevents.c │ ├── SDL_waylandevents_c.h │ ├── SDL_waylandmouse.c │ ├── SDL_waylandmouse.h │ ├── SDL_waylandopengles.c │ ├── SDL_waylandopengles.h │ ├── SDL_waylandsym.h │ ├── SDL_waylandtouch.c │ ├── SDL_waylandtouch.h │ ├── SDL_waylandvideo.c │ ├── SDL_waylandvideo.h │ ├── SDL_waylandvulkan.c │ ├── SDL_waylandvulkan.h │ ├── SDL_waylandwindow.c │ └── SDL_waylandwindow.h │ ├── windows │ ├── SDL_msctf.h │ ├── SDL_vkeys.h │ ├── SDL_windowsclipboard.c │ ├── SDL_windowsclipboard.h │ ├── SDL_windowsevents.c │ ├── SDL_windowsevents.h │ ├── SDL_windowsframebuffer.c │ ├── SDL_windowsframebuffer.h │ ├── SDL_windowskeyboard.c │ ├── SDL_windowskeyboard.h │ ├── SDL_windowsmessagebox.c │ ├── SDL_windowsmessagebox.h │ ├── SDL_windowsmodes.c │ ├── SDL_windowsmodes.h │ ├── SDL_windowsmouse.c │ ├── SDL_windowsmouse.h │ ├── SDL_windowsopengl.c │ ├── SDL_windowsopengl.h │ ├── SDL_windowsopengles.c │ ├── SDL_windowsopengles.h │ ├── SDL_windowsshape.c │ ├── SDL_windowsshape.h │ ├── SDL_windowstaskdialog.h │ ├── SDL_windowsvideo.c │ ├── SDL_windowsvideo.h │ ├── SDL_windowsvulkan.c │ ├── SDL_windowsvulkan.h │ ├── SDL_windowswindow.c │ ├── SDL_windowswindow.h │ └── wmmsg.h │ ├── winrt │ ├── SDL_winrtevents.cpp │ ├── SDL_winrtevents_c.h │ ├── SDL_winrtgamebar.cpp │ ├── SDL_winrtgamebar_cpp.h │ ├── SDL_winrtkeyboard.cpp │ ├── SDL_winrtmessagebox.cpp │ ├── SDL_winrtmessagebox.h │ ├── SDL_winrtmouse.cpp │ ├── SDL_winrtmouse_c.h │ ├── SDL_winrtopengles.cpp │ ├── SDL_winrtopengles.h │ ├── SDL_winrtpointerinput.cpp │ ├── SDL_winrtvideo.cpp │ └── SDL_winrtvideo_cpp.h │ ├── x11 │ ├── SDL_x11clipboard.c │ ├── SDL_x11clipboard.h │ ├── SDL_x11dyn.c │ ├── SDL_x11dyn.h │ ├── SDL_x11events.c │ ├── SDL_x11events.h │ ├── SDL_x11framebuffer.c │ ├── SDL_x11framebuffer.h │ ├── SDL_x11keyboard.c │ ├── SDL_x11keyboard.h │ ├── SDL_x11messagebox.c │ ├── SDL_x11messagebox.h │ ├── SDL_x11modes.c │ ├── SDL_x11modes.h │ ├── SDL_x11mouse.c │ ├── SDL_x11mouse.h │ ├── SDL_x11opengl.c │ ├── SDL_x11opengl.h │ ├── SDL_x11opengles.c │ ├── SDL_x11opengles.h │ ├── SDL_x11shape.c │ ├── SDL_x11shape.h │ ├── SDL_x11sym.h │ ├── SDL_x11touch.c │ ├── SDL_x11touch.h │ ├── SDL_x11video.c │ ├── SDL_x11video.h │ ├── SDL_x11vulkan.c │ ├── SDL_x11vulkan.h │ ├── SDL_x11window.c │ ├── SDL_x11window.h │ ├── SDL_x11xinput2.c │ ├── SDL_x11xinput2.h │ ├── edid-parse.c │ ├── edid.h │ ├── imKStoUCS.c │ └── imKStoUCS.h │ └── yuv2rgb │ ├── LICENSE │ ├── README.md │ ├── yuv_rgb.c │ ├── yuv_rgb.h │ ├── yuv_rgb_sse_func.h │ └── yuv_rgb_std_func.h ├── test ├── CMakeLists.txt ├── COPYING ├── Makefile.in ├── Makefile.os2 ├── README ├── acinclude.m4 ├── autogen.sh ├── axis.bmp ├── button.bmp ├── checkkeys.c ├── configure ├── configure.ac ├── controllermap.bmp ├── controllermap.c ├── controllermap_back.bmp ├── emscripten │ └── joystick-pre.js ├── gcc-fat.sh ├── icon.bmp ├── loopwave.c ├── loopwavequeue.c ├── moose.dat ├── nacl │ ├── Makefile │ ├── background.js │ ├── common.js │ ├── index.html │ └── manifest.json ├── picture.xbm ├── relative_mode.markdown ├── sample.bmp ├── sample.wav ├── shapes │ ├── p01_shape24.bmp │ ├── p01_shape32alpha.bmp │ ├── p01_shape8.bmp │ ├── p02_shape24.bmp │ ├── p02_shape32alpha.bmp │ ├── p02_shape8.bmp │ ├── p03_shape24.bmp │ ├── p03_shape8.bmp │ ├── p04_shape1.bmp │ ├── p04_shape24.bmp │ ├── p04_shape32alpha.bmp │ ├── p04_shape8.bmp │ ├── p05_shape8.bmp │ ├── p06_shape1alpha.bmp │ ├── p06_shape24.bmp │ ├── p06_shape32alpha.bmp │ ├── p06_shape8.bmp │ ├── p07_shape24.bmp │ ├── p07_shape32alpha.bmp │ ├── p07_shape8.bmp │ ├── p08_shape24.bmp │ ├── p08_shape32alpha.bmp │ ├── p08_shape8.bmp │ ├── p09_shape24.bmp │ ├── p09_shape32alpha.bmp │ ├── p09_shape8.bmp │ ├── p10_shape1.bmp │ ├── p10_shape24.bmp │ ├── p10_shape32alpha.bmp │ ├── p10_shape8.bmp │ ├── p11_shape24.bmp │ ├── p11_shape32alpha.bmp │ ├── p11_shape8.bmp │ ├── p12_shape24.bmp │ ├── p12_shape8.bmp │ ├── p13_shape24.bmp │ ├── p13_shape32alpha.bmp │ ├── p13_shape8.bmp │ ├── p14_shape24.bmp │ ├── p14_shape8.bmp │ ├── p15_shape24.bmp │ ├── p15_shape32alpha.bmp │ ├── p15_shape8.bmp │ ├── p16_shape1.bmp │ ├── p16_shape24.bmp │ ├── p16_shape8.bmp │ ├── trollface_24.bmp │ └── trollface_32alpha.bmp ├── testatomic.c ├── testaudiocapture.c ├── testaudiohotplug.c ├── testaudioinfo.c ├── testautomation.c ├── testautomation_audio.c ├── testautomation_clipboard.c ├── testautomation_events.c ├── testautomation_hints.c ├── testautomation_keyboard.c ├── testautomation_main.c ├── testautomation_mouse.c ├── testautomation_pixels.c ├── testautomation_platform.c ├── testautomation_rect.c ├── testautomation_render.c ├── testautomation_rwops.c ├── testautomation_sdltest.c ├── testautomation_stdlib.c ├── testautomation_suites.h ├── testautomation_surface.c ├── testautomation_syswm.c ├── testautomation_timer.c ├── testautomation_video.c ├── testbounds.c ├── testcustomcursor.c ├── testdisplayinfo.c ├── testdraw2.c ├── testdrawchessboard.c ├── testdropfile.c ├── testerror.c ├── testevdev.c ├── testfile.c ├── testfilesystem.c ├── testgamecontroller.c ├── testgesture.c ├── testgl2.c ├── testgles.c ├── testgles2.c ├── testgles2_sdf.c ├── testgles2_sdf_img_normal.bmp ├── testgles2_sdf_img_sdf.bmp ├── testhaptic.c ├── testhittesting.c ├── testhotplug.c ├── testiconv.c ├── testime.c ├── testintersections.c ├── testjoystick.c ├── testkeys.c ├── testloadso.c ├── testlocale.c ├── testlock.c ├── testmessage.c ├── testmultiaudio.c ├── testnative.c ├── testnative.h ├── testnativecocoa.m ├── testnativeos2.c ├── testnativew32.c ├── testnativex11.c ├── testoffscreen.c ├── testoverlay2.c ├── testplatform.c ├── testpower.c ├── testqsort.c ├── testrelative.c ├── testrendercopyex.c ├── testrendertarget.c ├── testresample.c ├── testrumble.c ├── testscale.c ├── testsem.c ├── testsensor.c ├── testshader.c ├── testshape.c ├── testsprite2.c ├── testspriteminimal.c ├── teststreaming.c ├── testthread.c ├── testtimer.c ├── testurl.c ├── testver.c ├── testviewport.c ├── testvulkan.c ├── testwm2.c ├── testyuv.bmp ├── testyuv.c ├── testyuv_cvt.c ├── testyuv_cvt.h ├── torturethread.c └── utf8.txt ├── visualtest ├── COPYING.txt ├── Makefile.in ├── README.txt ├── acinclude.m4 ├── autogen.sh ├── compile ├── config.h ├── config.h.in ├── configs │ ├── testsprite2_blendmodes │ │ ├── testsprite2_blendmodes.actions │ │ ├── testsprite2_blendmodes.config │ │ └── testsprite2_blendmodes.parameters │ ├── testsprite2_crashtest │ │ ├── testsprite2_crashtest.actions │ │ ├── testsprite2_crashtest.config │ │ └── testsprite2_crashtest.parameters │ ├── testsprite2_fullscreen │ │ ├── testsprite2_fullscreen.actions │ │ ├── testsprite2_fullscreen.config │ │ └── testsprite2_fullscreen.parameters │ └── testsprite2_geometry │ │ ├── testsprite2_geometry.actions │ │ ├── testsprite2_geometry.config │ │ └── testsprite2_geometry.parameters ├── configure ├── configure.in ├── depcomp ├── docs │ └── Doxyfile ├── include │ ├── SDL_visualtest_action_configparser.h │ ├── SDL_visualtest_exhaustive_variator.h │ ├── SDL_visualtest_harness_argparser.h │ ├── SDL_visualtest_mischelper.h │ ├── SDL_visualtest_parsehelper.h │ ├── SDL_visualtest_process.h │ ├── SDL_visualtest_random_variator.h │ ├── SDL_visualtest_rwhelper.h │ ├── SDL_visualtest_screenshot.h │ ├── SDL_visualtest_sut_configparser.h │ ├── SDL_visualtest_variator_common.h │ └── SDL_visualtest_variators.h ├── install-sh ├── launch_harness.cmd ├── launch_harness.sh ├── missing ├── src │ ├── action_configparser.c │ ├── harness_argparser.c │ ├── linux │ │ └── linux_process.c │ ├── mischelper.c │ ├── parsehelper.c │ ├── rwhelper.c │ ├── screenshot.c │ ├── sut_configparser.c │ ├── testharness.c │ ├── variator_common.c │ ├── variator_exhaustive.c │ ├── variator_random.c │ ├── variators.c │ └── windows │ │ ├── windows_process.c │ │ └── windows_screenshot.c ├── stamp-h1 ├── testsprite2_sample.actions ├── testsprite2_sample.config ├── testsprite2_sample.parameters └── unittest │ ├── testquit.actions │ ├── testquit.c │ ├── testquit.config │ └── testquit.parameters └── wayland-protocols ├── idle-inhibit-unstable-v1.xml ├── keyboard-shortcuts-inhibit-unstable-v1.xml ├── org-kde-kwin-server-decoration-manager.xml ├── pointer-constraints-unstable-v1.xml ├── relative-pointer-unstable-v1.xml ├── wayland.xml ├── xdg-decoration-unstable-v1.xml ├── xdg-shell-unstable-v6.xml └── xdg-shell.xml /BUGS.txt: -------------------------------------------------------------------------------- 1 | 2 | Bugs are now managed in the SDL bug tracker, here: 3 | 4 | https://bugzilla.libsdl.org/ 5 | 6 | You may report bugs there, and search to see if a given issue has already 7 | been reported, discussed, and maybe even fixed. 8 | 9 | 10 | You may also find help at the SDL forums/mailing list: 11 | 12 | https://discourse.libsdl.org/ 13 | 14 | Bug reports are welcome here, but we really appreciate if you use Bugzilla, as 15 | bugs discussed on the mailing list may be forgotten or missed. 16 | 17 | -------------------------------------------------------------------------------- /COPYING.txt: -------------------------------------------------------------------------------- 1 | 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | 21 | -------------------------------------------------------------------------------- /INSTALL.txt: -------------------------------------------------------------------------------- 1 | 2 | To compile and install SDL: 3 | 4 | 1. Windows with Visual Studio: 5 | * Read VisualC.html 6 | 7 | Windows with gcc, either native or cross-compiling: 8 | * Read the FAQ at https://wiki.libsdl.org/moin.fcg/FAQWindows 9 | * Run './configure; make; make install' 10 | 11 | Mac OS X with Xcode: 12 | * Read docs/README-macosx.md 13 | 14 | Mac OS X from the command line: 15 | * Run './configure; make; make install' 16 | 17 | Linux and other UNIX systems: 18 | * Run './configure; make; make install' 19 | 20 | Android: 21 | * Read docs/README-android.md 22 | 23 | iOS: 24 | * Read docs/README-ios.md 25 | 26 | Using Cmake: 27 | * Read docs/README-cmake.md 28 | 29 | 2. Look at the example programs in ./test, and check out the online 30 | documentation at https://wiki.libsdl.org/ 31 | 32 | 3. Join the SDL developer mailing list by sending E-mail to 33 | sdl-request@libsdl.org 34 | and put "subscribe" in the subject of the message. 35 | 36 | Or alternatively you can use the web interface: 37 | https://www.libsdl.org/mailing-list.php 38 | 39 | That's it! 40 | Sam Lantinga 41 | -------------------------------------------------------------------------------- /Makefile.minimal: -------------------------------------------------------------------------------- 1 | # Makefile to build the SDL library 2 | 3 | INCLUDE = -I./include 4 | CFLAGS = -g -O2 $(INCLUDE) 5 | AR = ar 6 | RANLIB = ranlib 7 | 8 | TARGET = libSDL.a 9 | SOURCES = \ 10 | src/*.c \ 11 | src/audio/*.c \ 12 | src/audio/dummy/*.c \ 13 | src/cpuinfo/*.c \ 14 | src/events/*.c \ 15 | src/file/*.c \ 16 | src/haptic/*.c \ 17 | src/haptic/dummy/*.c \ 18 | src/joystick/*.c \ 19 | src/joystick/dummy/*.c \ 20 | src/loadso/dummy/*.c \ 21 | src/power/*.c \ 22 | src/filesystem/dummy/*.c \ 23 | src/render/*.c \ 24 | src/render/software/*.c \ 25 | src/sensor/*.c \ 26 | src/sensor/dummy/*.c \ 27 | src/stdlib/*.c \ 28 | src/thread/*.c \ 29 | src/thread/generic/*.c \ 30 | src/timer/*.c \ 31 | src/timer/dummy/*.c \ 32 | src/video/*.c \ 33 | src/video/dummy/*.c \ 34 | 35 | OBJECTS = $(shell echo $(SOURCES) | sed -e 's,\.c,\.o,g') 36 | 37 | all: $(TARGET) 38 | 39 | $(TARGET): $(OBJECTS) 40 | $(AR) crv $@ $^ 41 | $(RANLIB) $@ 42 | 43 | clean: 44 | rm -f $(TARGET) $(OBJECTS) 45 | -------------------------------------------------------------------------------- /README-SDL.txt: -------------------------------------------------------------------------------- 1 | 2 | Please distribute this file with the SDL runtime environment: 3 | 4 | The Simple DirectMedia Layer (SDL for short) is a cross-platform library 5 | designed to make it easy to write multi-media software, such as games 6 | and emulators. 7 | 8 | The Simple DirectMedia Layer library source code is available from: 9 | https://www.libsdl.org/ 10 | 11 | This library is distributed under the terms of the zlib license: 12 | http://www.zlib.net/zlib_license.html 13 | 14 | -------------------------------------------------------------------------------- /README.txt: -------------------------------------------------------------------------------- 1 | 2 | Simple DirectMedia Layer 3 | 4 | (SDL) 5 | 6 | Version 2.0 7 | 8 | --- 9 | https://www.libsdl.org/ 10 | 11 | Simple DirectMedia Layer is a cross-platform development library designed 12 | to provide low level access to audio, keyboard, mouse, joystick, and graphics 13 | hardware via OpenGL and Direct3D. It is used by video playback software, 14 | emulators, and popular games including Valve's award winning catalog 15 | and many Humble Bundle games. 16 | 17 | More extensive documentation is available in the docs directory, starting 18 | with README.md 19 | 20 | Enjoy! 21 | Sam Lantinga (slouken@libsdl.org) 22 | -------------------------------------------------------------------------------- /SDL2Config.cmake: -------------------------------------------------------------------------------- 1 | include("${CMAKE_CURRENT_LIST_DIR}/SDL2Targets.cmake") 2 | -------------------------------------------------------------------------------- /TODO.txt: -------------------------------------------------------------------------------- 1 | Future work roadmap: 2 | * http://wiki.libsdl.org/moin.cgi/Roadmap 3 | 4 | * Check 1.2 revisions: 5 | 3554 - Need to resolve semantics for locking keys on different platforms 6 | 4874 - Do we want screen rotation? At what level? 7 | 4974 - Windows file code needs to convert UTF-8 to Unicode, but we don't need to tap dance for Windows 95/98 8 | 4865 - See if this is still needed (mouse coordinate clamping) 9 | 4866 - See if this is still needed (blocking window repositioning) 10 | 11 | -------------------------------------------------------------------------------- /VisualC-WinRT/SDL2-WinRT.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | SDL2-WinRT 5 | 2.0.4-Unofficial 6 | Sam Lantinga 7 | David Ludwig 8 | http://libsdl.org/license.php 9 | http://libsdl.org 10 | false 11 | Unofficial pre-release of LibSDL2, built for WinRT platforms 12 | Copyright 2015 13 | SDL2 SDL LibSDL OpenGL C C++ nativepackage 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /VisualC-WinRT/SDL2main-WinRT-NonXAML.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | SDL2main-WinRT-NonXAML 5 | 2.0.4-Unofficial 6 | Sam Lantinga 7 | David Ludwig 8 | http://libsdl.org/license.php 9 | http://libsdl.org 10 | false 11 | WinMain() function for SDL2 + WinRT + CoreWindow (non-XAML) apps 12 | Copyright 2015 13 | SDL2 SDL LibSDL OpenGL C C++ nativepackage 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /VisualC-WinRT/SDL2main-WinRT-NonXAML.targets: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | true 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /VisualC-WinRT/tests/loopwave/Assets/Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/VisualC-WinRT/tests/loopwave/Assets/Logo.png -------------------------------------------------------------------------------- /VisualC-WinRT/tests/loopwave/Assets/SmallLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/VisualC-WinRT/tests/loopwave/Assets/SmallLogo.png -------------------------------------------------------------------------------- /VisualC-WinRT/tests/loopwave/Assets/SplashScreen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/VisualC-WinRT/tests/loopwave/Assets/SplashScreen.png -------------------------------------------------------------------------------- /VisualC-WinRT/tests/loopwave/Assets/StoreLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/VisualC-WinRT/tests/loopwave/Assets/StoreLogo.png -------------------------------------------------------------------------------- /VisualC-WinRT/tests/loopwave/loopwave_VS2012_TemporaryKey.pfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/VisualC-WinRT/tests/loopwave/loopwave_VS2012_TemporaryKey.pfx -------------------------------------------------------------------------------- /VisualC-WinRT/tests/testthread/Assets/Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/VisualC-WinRT/tests/testthread/Assets/Logo.png -------------------------------------------------------------------------------- /VisualC-WinRT/tests/testthread/Assets/SmallLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/VisualC-WinRT/tests/testthread/Assets/SmallLogo.png -------------------------------------------------------------------------------- /VisualC-WinRT/tests/testthread/Assets/SplashScreen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/VisualC-WinRT/tests/testthread/Assets/SplashScreen.png -------------------------------------------------------------------------------- /VisualC-WinRT/tests/testthread/Assets/StoreLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/VisualC-WinRT/tests/testthread/Assets/StoreLogo.png -------------------------------------------------------------------------------- /VisualC-WinRT/tests/testthread/testthread_VS2012_TemporaryKey.pfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/VisualC-WinRT/tests/testthread/testthread_VS2012_TemporaryKey.pfx -------------------------------------------------------------------------------- /VisualC/clean.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | find . -type f \( -name '*.user' -o -name '*.sdf' -o -name '*.ncb' -o -name '*.suo' \) -print -delete 3 | find . -type f \( -name '*.bmp' -o -name '*.wav' -o -name '*.dat' \) -print -delete 4 | find . -depth -type d \( -name Win32 -o -name x64 \) -exec rm -rv {} \; 5 | -------------------------------------------------------------------------------- /Xcode-iOS/Demos/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/Xcode-iOS/Demos/Default.png -------------------------------------------------------------------------------- /Xcode-iOS/Demos/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/Xcode-iOS/Demos/Icon.png -------------------------------------------------------------------------------- /Xcode-iOS/Demos/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIconFile 12 | 13 | CFBundleIdentifier 14 | $(PRODUCT_BUNDLE_IDENTIFIER) 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | ${PRODUCT_NAME} 19 | CFBundlePackageType 20 | APPL 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | NSMainNibFile 26 | 27 | UILaunchStoryboardName 28 | iOS Launch Screen 29 | UISupportedInterfaceOrientations 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /Xcode-iOS/Demos/data/bitmapfont/kromasky_16x16.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/Xcode-iOS/Demos/data/bitmapfont/kromasky_16x16.bmp -------------------------------------------------------------------------------- /Xcode-iOS/Demos/data/drums/ds_brush_snare.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/Xcode-iOS/Demos/data/drums/ds_brush_snare.wav -------------------------------------------------------------------------------- /Xcode-iOS/Demos/data/drums/ds_china.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/Xcode-iOS/Demos/data/drums/ds_china.wav -------------------------------------------------------------------------------- /Xcode-iOS/Demos/data/drums/ds_kick_big_amb.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/Xcode-iOS/Demos/data/drums/ds_kick_big_amb.wav -------------------------------------------------------------------------------- /Xcode-iOS/Demos/data/drums/ds_loose_skin_mute.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/Xcode-iOS/Demos/data/drums/ds_loose_skin_mute.wav -------------------------------------------------------------------------------- /Xcode-iOS/Demos/data/icon.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/Xcode-iOS/Demos/data/icon.bmp -------------------------------------------------------------------------------- /Xcode-iOS/Demos/data/ship.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/Xcode-iOS/Demos/data/ship.bmp -------------------------------------------------------------------------------- /Xcode-iOS/Demos/data/space.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/Xcode-iOS/Demos/data/space.bmp -------------------------------------------------------------------------------- /Xcode-iOS/Demos/data/stroke.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/Xcode-iOS/Demos/data/stroke.bmp -------------------------------------------------------------------------------- /Xcode-iOS/Demos/src/common.c: -------------------------------------------------------------------------------- 1 | /* 2 | * common.c 3 | * written by Holmes Futrell 4 | * use however you want 5 | */ 6 | 7 | #include "common.h" 8 | #include "SDL.h" 9 | #include 10 | 11 | /* 12 | Produces a random int x, min <= x <= max 13 | following a uniform distribution 14 | */ 15 | int 16 | randomInt(int min, int max) 17 | { 18 | return min + rand() % (max - min + 1); 19 | } 20 | 21 | /* 22 | Produces a random float x, min <= x <= max 23 | following a uniform distribution 24 | */ 25 | float 26 | randomFloat(float min, float max) 27 | { 28 | return rand() / (float) RAND_MAX *(max - min) + min; 29 | } 30 | 31 | void 32 | fatalError(const char *string) 33 | { 34 | printf("%s: %s\n", string, SDL_GetError()); 35 | SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, string, SDL_GetError(), NULL); 36 | exit(1); 37 | } 38 | 39 | static Uint64 prevTime = 0; 40 | 41 | double 42 | updateDeltaTime(void) 43 | { 44 | Uint64 curTime; 45 | double deltaTime; 46 | 47 | if (prevTime == 0) { 48 | prevTime = SDL_GetPerformanceCounter(); 49 | } 50 | 51 | curTime = SDL_GetPerformanceCounter(); 52 | deltaTime = (double) (curTime - prevTime) / (double) SDL_GetPerformanceFrequency(); 53 | prevTime = curTime; 54 | 55 | return deltaTime; 56 | } 57 | -------------------------------------------------------------------------------- /Xcode-iOS/Demos/src/common.h: -------------------------------------------------------------------------------- 1 | /* 2 | * common.h 3 | * written by Holmes Futrell 4 | * use however you want 5 | */ 6 | 7 | extern int randomInt(int min, int max); 8 | extern float randomFloat(float min, float max); 9 | extern void fatalError(const char *string); 10 | extern double updateDeltaTime(void); 11 | -------------------------------------------------------------------------------- /Xcode-iOS/Template/SDL iOS Application/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/Xcode-iOS/Template/SDL iOS Application/Default-568h@2x.png -------------------------------------------------------------------------------- /Xcode-iOS/Template/SDL iOS Application/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/Xcode-iOS/Template/SDL iOS Application/Default.png -------------------------------------------------------------------------------- /Xcode-iOS/Template/SDL iOS Application/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/Xcode-iOS/Template/SDL iOS Application/Icon.png -------------------------------------------------------------------------------- /Xcode-iOS/Template/SDL iOS Application/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIconFile 12 | Icon 13 | CFBundleIdentifier 14 | com.yourcompany.${PRODUCT_NAME:identifier} 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | ${PRODUCT_NAME} 19 | CFBundlePackageType 20 | APPL 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /Xcode-iOS/Template/SDL iOS Application/___PROJECTNAME___.xcodeproj/TemplateIcon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/Xcode-iOS/Template/SDL iOS Application/___PROJECTNAME___.xcodeproj/TemplateIcon.icns -------------------------------------------------------------------------------- /Xcode-iOS/Template/SDL iOS Application/___PROJECTNAME___.xcodeproj/TemplateInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Description 6 | This project builds an SDL based project for iPhone OS using C or Objective-C. It includes everything you need to get up and running with SDL on iPhone. 7 | CFBundleIconFile 8 | Icon.png 9 | 10 | 11 | -------------------------------------------------------------------------------- /Xcode-iOS/Test/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIconFile 12 | 13 | CFBundleIdentifier 14 | com.yourcompany.${PRODUCT_NAME} 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | ${PRODUCT_NAME} 19 | CFBundlePackageType 20 | APPL 21 | CFBundleShortVersionString 22 | 1.0 23 | CFBundleSignature 24 | ???? 25 | CFBundleVersion 26 | 1.0 27 | UIApplicationSupportsIndirectInputEvents 28 | 29 | NSBluetoothAlwaysUsageDescription 30 | Steam Link would like to use Bluetooth controllers for input. 31 | NSBluetoothPeripheralUsageDescription 32 | Steam Link would like to use Bluetooth controllers for input. 33 | 34 | 35 | -------------------------------------------------------------------------------- /Xcode-iOS/Test/README: -------------------------------------------------------------------------------- 1 | TestiPhoneOS.xcodeproj contains targets to compile many of the SDL test programs for iPhone OS. Most of these test programs work fine, with the following exceptions: 2 | 3 | testthread: 4 | SIGTERM kills the process immediately without executing the 'kill' function. The posix standard says this shouldn't happen. Apple seems intent on having iPhone apps exit promptly when the user requests it, so maybe that's why(?) 5 | 6 | testlock: 7 | Locks appear to work, but there doesn't appear to be a simple way to send the process SIGINT. 8 | 9 | testsprite2: 10 | SDL_CreateTextureFromSurface requests an ARGB pixel format, but iPhone's SDL video driver only supports ABGR. 11 | 12 | -------------------------------------------------------------------------------- /Xcode/SDL/Info-Framework.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleGetInfoString 10 | http://www.libsdl.org 11 | CFBundleIconFile 12 | 13 | CFBundleIdentifier 14 | $(PRODUCT_BUNDLE_IDENTIFIER) 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | Simple DirectMedia Layer 19 | CFBundlePackageType 20 | FMWK 21 | CFBundleShortVersionString 22 | 2.0.15 23 | CFBundleSignature 24 | SDLX 25 | CFBundleVersion 26 | 2.0.15 27 | 28 | 29 | -------------------------------------------------------------------------------- /Xcode/SDL/hidapi/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | $(CURRENT_PROJECT_VERSION) 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | 22 | 23 | -------------------------------------------------------------------------------- /Xcode/SDL/pkg-support/SDL.info: -------------------------------------------------------------------------------- 1 | Title SDL 2.0.0 2 | Version 1 3 | Description SDL Library for Mac OS X (http://www.libsdl.org) 4 | DefaultLocation /Library/Frameworks 5 | Diskname (null) 6 | DeleteWarning 7 | NeedsAuthorization NO 8 | DisableStop NO 9 | UseUserMask NO 10 | Application NO 11 | Relocatable YES 12 | Required NO 13 | InstallOnly NO 14 | RequiresReboot NO 15 | InstallFat NO 16 | -------------------------------------------------------------------------------- /Xcode/SDL/pkg-support/resources/License.txt: -------------------------------------------------------------------------------- 1 | 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | -------------------------------------------------------------------------------- /Xcode/SDL/pkg-support/resources/ReadMe.txt: -------------------------------------------------------------------------------- 1 | The Simple DirectMedia Layer (SDL for short) is a cross-platform 2 | library designed to make it easy to write multi-media software, 3 | such as games and emulators. 4 | 5 | The Simple DirectMedia Layer library source code is available from: 6 | http://www.libsdl.org/ 7 | 8 | This library is distributed under the terms of the zlib license: 9 | http://zlib.net/zlib_license.html 10 | 11 | 12 | This packages contains the SDL framework for OS X. 13 | Conforming with Apple guidelines, this framework 14 | contains both the SDL runtime component and development header files. 15 | 16 | 17 | To Install: 18 | Copy the SDL2.framework to /Library/Frameworks 19 | 20 | You may alternatively install it in /Library/Frameworks 21 | if your access privileges are not high enough. 22 | 23 | 24 | Additional References: 25 | 26 | - Screencast tutorials for getting started with OpenSceneGraph/Mac OS X are 27 | available at: 28 | http://www.openscenegraph.org/projects/osg/wiki/Support/Tutorials/MacOSXTips 29 | Though these are OpenSceneGraph centric, the same exact concepts apply to 30 | SDL, thus the videos are recommended for everybody getting started with 31 | developing on Mac OS X. (You can skim over the PlugIns stuff since SDL 32 | doesn't have any PlugIns to worry about.) 33 | -------------------------------------------------------------------------------- /Xcode/SDL/pkg-support/resources/SDL_DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/Xcode/SDL/pkg-support/resources/SDL_DS_Store -------------------------------------------------------------------------------- /Xcode/SDL/pkg-support/sdl_logo.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/Xcode/SDL/pkg-support/sdl_logo.pdf -------------------------------------------------------------------------------- /Xcode/SDLTest/TestDropFile-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleDocumentTypes 8 | 9 | 10 | CFBundleTypeRole 11 | Viewer 12 | LSHandlerRank 13 | Alternate 14 | LSItemContentTypes 15 | 16 | public.data 17 | 18 | 19 | 20 | CFBundleExecutable 21 | ${EXECUTABLE_NAME} 22 | CFBundleIdentifier 23 | org.libsdl.test-dropfile 24 | CFBundleInfoDictionaryVersion 25 | 6.0 26 | CFBundlePackageType 27 | APPL 28 | CFBundleShortVersionString 29 | 1.0 30 | CFBundleVersion 31 | 1.0 32 | LSMinimumSystemVersion 33 | 10.6 34 | 35 | 36 | -------------------------------------------------------------------------------- /acinclude/ac_check_define.m4: -------------------------------------------------------------------------------- 1 | AC_DEFUN([AC_CHECK_DEFINE],[AC_REQUIRE([AC_PROG_CPP])dnl 2 | AC_CACHE_CHECK(for $1 in $2, ac_cv_define_$1, 3 | AC_EGREP_CPP([YES_IS_DEFINED], [ 4 | #include <$2> 5 | #ifdef $1 6 | YES_IS_DEFINED 7 | #endif 8 | ], ac_cv_define_$1=yes, ac_cv_define_$1=no) 9 | ) 10 | if test "$ac_cv_define_$1" = "yes" ; then 11 | AC_DEFINE([HAVE_$1],[],[Added by AC_CHECK_DEFINE]) 12 | fi 13 | ])dnl 14 | 15 | -------------------------------------------------------------------------------- /acinclude/ltversion.m4: -------------------------------------------------------------------------------- 1 | # ltversion.m4 -- version numbers -*- Autoconf -*- 2 | # 3 | # Copyright (C) 2004 Free Software Foundation, Inc. 4 | # Written by Scott James Remnant, 2004 5 | # 6 | # This file is free software; the Free Software Foundation gives 7 | # unlimited permission to copy and/or distribute it, with or without 8 | # modifications, as long as this notice is preserved. 9 | 10 | # @configure_input@ 11 | 12 | # serial 3337 ltversion.m4 13 | # This file is part of GNU Libtool 14 | 15 | m4_define([LT_PACKAGE_VERSION], [2.4.2]) 16 | m4_define([LT_PACKAGE_REVISION], [1.3337]) 17 | 18 | AC_DEFUN([LTVERSION_VERSION], 19 | [macro_version='2.4.2' 20 | macro_revision='1.3337' 21 | _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 22 | _LT_DECL(, macro_revision, 0) 23 | ]) 24 | -------------------------------------------------------------------------------- /android-project-ant/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | ../android-project/app/src/main/AndroidManifest.xml -------------------------------------------------------------------------------- /android-project-ant/ant.properties: -------------------------------------------------------------------------------- 1 | # This file is used to override default values used by the Ant build system. 2 | # 3 | # This file must be checked into Version Control Systems, as it is 4 | # integral to the build system of your project. 5 | 6 | # This file is only used by the Ant script. 7 | 8 | # You can use this to override default values such as 9 | # 'source.dir' for the location of your java source folder and 10 | # 'out.dir' for the location of your output folder. 11 | 12 | # You can also use it define how the release builds are signed by declaring 13 | # the following properties: 14 | # 'key.store' for the location of your keystore and 15 | # 'key.alias' for the name of the key to use. 16 | # The password will be asked during the build when you use the 'release' target. 17 | 18 | -------------------------------------------------------------------------------- /android-project-ant/build.properties: -------------------------------------------------------------------------------- 1 | # This file is used to override default values used by the Ant build system. 2 | # 3 | # This file must be checked in Version Control Systems, as it is 4 | # integral to the build system of your project. 5 | 6 | # This file is only used by the Ant script. 7 | 8 | # You can use this to override default values such as 9 | # 'source.dir' for the location of your java source folder and 10 | # 'out.dir' for the location of your output folder. 11 | 12 | # You can also use it define how the release builds are signed by declaring 13 | # the following properties: 14 | # 'key.store' for the location of your keystore and 15 | # 'key.alias' for the name of the key to use. 16 | # The password will be asked during the build when you use the 'release' target. 17 | 18 | -------------------------------------------------------------------------------- /android-project-ant/default.properties: -------------------------------------------------------------------------------- 1 | # This file is automatically generated by Android Tools. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file must be checked in Version Control Systems. 5 | # 6 | # To customize properties used by the Ant build system use, 7 | # "build.properties", and override values to adapt the script to your 8 | # project structure. 9 | 10 | # Project target. 11 | target=android-16 12 | -------------------------------------------------------------------------------- /android-project-ant/jni/Android.mk: -------------------------------------------------------------------------------- 1 | include $(call all-subdir-makefiles) 2 | -------------------------------------------------------------------------------- /android-project-ant/jni/Application.mk: -------------------------------------------------------------------------------- 1 | 2 | # Uncomment this if you're using STL in your project 3 | # See CPLUSPLUS-SUPPORT.html in the NDK documentation for more information 4 | # APP_STL := stlport_static 5 | 6 | APP_ABI := armeabi armeabi-v7a x86 7 | 8 | # Min SDK level 9 | APP_PLATFORM=android-10 10 | 11 | -------------------------------------------------------------------------------- /android-project-ant/jni/src/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | include $(CLEAR_VARS) 4 | 5 | LOCAL_MODULE := main 6 | 7 | SDL_PATH := ../SDL 8 | 9 | LOCAL_C_INCLUDES := $(LOCAL_PATH)/$(SDL_PATH)/include 10 | 11 | # Add your application source files here... 12 | LOCAL_SRC_FILES := YourSourceHere.c 13 | 14 | LOCAL_SHARED_LIBRARIES := SDL2 15 | 16 | LOCAL_LDLIBS := -lGLESv1_CM -lGLESv2 -llog 17 | 18 | include $(BUILD_SHARED_LIBRARY) 19 | -------------------------------------------------------------------------------- /android-project-ant/jni/src/Android_static.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | include $(CLEAR_VARS) 4 | 5 | LOCAL_MODULE := main 6 | 7 | LOCAL_SRC_FILES := YourSourceHere.c 8 | 9 | LOCAL_STATIC_LIBRARIES := SDL2_static 10 | 11 | include $(BUILD_SHARED_LIBRARY) 12 | $(call import-module,SDL)LOCAL_PATH := $(call my-dir) 13 | -------------------------------------------------------------------------------- /android-project-ant/proguard-project.txt: -------------------------------------------------------------------------------- 1 | # To enable ProGuard in your project, edit project.properties 2 | # to define the proguard.config property as described in that file. 3 | # 4 | # Add project specific ProGuard rules here. 5 | # By default, the flags in this file are appended to flags specified 6 | # in ${sdk.dir}/tools/proguard/proguard-android.txt 7 | # You can edit the include path and order by changing the ProGuard 8 | # include property in project.properties. 9 | # 10 | # For more details, see 11 | # http://developer.android.com/guide/developing/tools/proguard.html 12 | 13 | # Add any project specific keep options here: 14 | 15 | # If your project uses WebView with JS, uncomment the following 16 | # and specify the fully qualified class name to the JavaScript interface 17 | # class: 18 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 19 | # public *; 20 | #} 21 | -------------------------------------------------------------------------------- /android-project-ant/project.properties: -------------------------------------------------------------------------------- 1 | # This file is automatically generated by Android Tools. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file must be checked in Version Control Systems. 5 | # 6 | # To customize properties used by the Ant build system edit 7 | # "ant.properties", and override values to adapt the script to your 8 | # project structure. 9 | # 10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): 11 | #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt 12 | 13 | # Project target. 14 | target=android-16 15 | -------------------------------------------------------------------------------- /android-project-ant/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/android-project-ant/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android-project-ant/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/android-project-ant/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android-project-ant/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/android-project-ant/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android-project-ant/res/drawable-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/android-project-ant/res/drawable-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android-project-ant/res/layout/main.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /android-project-ant/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | SDL App 4 | 5 | -------------------------------------------------------------------------------- /android-project-ant/src: -------------------------------------------------------------------------------- 1 | ../android-project/app/src/main/java -------------------------------------------------------------------------------- /android-project/app/jni/Android.mk: -------------------------------------------------------------------------------- 1 | include $(call all-subdir-makefiles) 2 | -------------------------------------------------------------------------------- /android-project/app/jni/Application.mk: -------------------------------------------------------------------------------- 1 | 2 | # Uncomment this if you're using STL in your project 3 | # You can find more information here: 4 | # https://developer.android.com/ndk/guides/cpp-support 5 | # APP_STL := c++_shared 6 | 7 | APP_ABI := armeabi-v7a arm64-v8a x86 x86_64 8 | 9 | # Min runtime API level 10 | APP_PLATFORM=android-16 11 | -------------------------------------------------------------------------------- /android-project/app/jni/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.6) 2 | 3 | project(GAME) 4 | 5 | # armeabi-v7a requires cpufeatures library 6 | # include(AndroidNdkModules) 7 | # android_ndk_import_module_cpufeatures() 8 | 9 | 10 | # SDL sources are in a subfolder named "SDL" 11 | add_subdirectory(SDL) 12 | 13 | # Compilation of companion libraries 14 | #add_subdirectory(SDL_image) 15 | #add_subdirectory(SDL_mixer) 16 | #add_subdirectory(SDL_ttf) 17 | 18 | # Your game and its CMakeLists.txt are in a subfolder named "src" 19 | add_subdirectory(src) 20 | 21 | -------------------------------------------------------------------------------- /android-project/app/jni/src/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | include $(CLEAR_VARS) 4 | 5 | LOCAL_MODULE := main 6 | 7 | SDL_PATH := ../SDL 8 | 9 | LOCAL_C_INCLUDES := $(LOCAL_PATH)/$(SDL_PATH)/include 10 | 11 | # Add your application source files here... 12 | LOCAL_SRC_FILES := YourSourceHere.c 13 | 14 | LOCAL_SHARED_LIBRARIES := SDL2 15 | 16 | LOCAL_LDLIBS := -lGLESv1_CM -lGLESv2 -llog 17 | 18 | include $(BUILD_SHARED_LIBRARY) 19 | -------------------------------------------------------------------------------- /android-project/app/jni/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.6) 2 | 3 | project(MY_APP) 4 | 5 | find_library(SDL2 SDL2) 6 | 7 | add_library(main SHARED) 8 | 9 | target_sources(main PRIVATE YourSourceHere.c) 10 | 11 | target_link_libraries(main SDL2) 12 | 13 | 14 | -------------------------------------------------------------------------------- /android-project/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in [sdk]/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /android-project/app/src/main/java/org/libsdl/app/HIDDevice.java: -------------------------------------------------------------------------------- 1 | package org.libsdl.app; 2 | 3 | import android.hardware.usb.UsbDevice; 4 | 5 | interface HIDDevice 6 | { 7 | public int getId(); 8 | public int getVendorId(); 9 | public int getProductId(); 10 | public String getSerialNumber(); 11 | public int getVersion(); 12 | public String getManufacturerName(); 13 | public String getProductName(); 14 | public UsbDevice getDevice(); 15 | public boolean open(); 16 | public int sendFeatureReport(byte[] report); 17 | public int sendOutputReport(byte[] report); 18 | public boolean getFeatureReport(byte[] report); 19 | public void setFrozen(boolean frozen); 20 | public void close(); 21 | public void shutdown(); 22 | } 23 | -------------------------------------------------------------------------------- /android-project/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/android-project/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android-project/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/android-project/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android-project/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/android-project/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android-project/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/android-project/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android-project/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/android-project/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android-project/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | -------------------------------------------------------------------------------- /android-project/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Game 3 | 4 | -------------------------------------------------------------------------------- /android-project/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android-project/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | repositories { 5 | jcenter() 6 | google() 7 | } 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:3.2.0' 10 | 11 | // NOTE: Do not place your application dependencies here; they belong 12 | // in the individual module build.gradle files 13 | } 14 | } 15 | 16 | allprojects { 17 | repositories { 18 | jcenter() 19 | google() 20 | } 21 | } 22 | 23 | task clean(type: Delete) { 24 | delete rootProject.buildDir 25 | } 26 | -------------------------------------------------------------------------------- /android-project/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | org.gradle.jvmargs=-Xmx1536m 13 | 14 | # When configured, Gradle will run in incubating parallel mode. 15 | # This option should only be used with decoupled projects. More details, visit 16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 17 | # org.gradle.parallel=true 18 | -------------------------------------------------------------------------------- /android-project/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/android-project/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /android-project/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Mon Oct 23 13:51:26 PDT 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip 7 | -------------------------------------------------------------------------------- /android-project/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /autogen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | echo "Generating build information using autoconf" 4 | echo "This may take a while ..." 5 | 6 | srcdir=`dirname $0` 7 | test -z "$srcdir" && srcdir=. 8 | cd "$srcdir" 9 | 10 | # Regenerate configuration files 11 | cat acinclude/* >aclocal.m4 12 | found=false 13 | for autoconf in autoconf autoconf259 autoconf-2.59 14 | do if which $autoconf >/dev/null 2>&1; then $autoconf && found=true; break; fi 15 | done 16 | if test x$found = xfalse; then 17 | echo "Couldn't find autoconf, aborting" 18 | exit 1 19 | fi 20 | (cd test; sh autogen.sh) 21 | 22 | # Run configure for this platform 23 | echo "Now you are ready to run ./configure" 24 | -------------------------------------------------------------------------------- /build-scripts/os2-buildbot.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # This is the script buildbot.libsdl.org uses to cross-compile SDL2 from 4 | # x86 Linux to OS/2, using OpenWatcom. 5 | 6 | # The final zipfile can be unpacked on any machine that supports OpenWatcom 7 | # (Windows, Linux, OS/2, etc). Point the compiler at the include directory 8 | # and link against the SDL2.lib file. Ship the SDL2.dll with your app. 9 | 10 | if [ -z "$WATCOM" ]; then 11 | echo "This script expects \$WATCOM to be set to the OpenWatcom install dir." 1>&2 12 | echo "This is often something like '/usr/local/share/watcom'" 1>&2 13 | exit 1 14 | fi 15 | 16 | export PATH="$WATCOM/binl:$PATH" 17 | 18 | ZIPFILE="$1" 19 | if [ -z $1 ]; then 20 | ZIPFILE=sdl-os2.zip 21 | fi 22 | ZIPDIR=buildbot/SDL 23 | 24 | set -e 25 | set -x 26 | 27 | cd `dirname "$0"` 28 | cd .. 29 | 30 | rm -f $ZIPFILE 31 | wmake -f Makefile.os2 32 | rm -rf $ZIPDIR 33 | mkdir -p $ZIPDIR 34 | chmod a+r SDL2.lib SDL2.dll 35 | mv SDL2.lib SDL2.dll $ZIPDIR/ 36 | cp -R include $ZIPDIR/ 37 | zip -9r "buildbot/$ZIPFILE" $ZIPDIR 38 | 39 | wmake -f Makefile.os2 distclean 40 | 41 | set +x 42 | echo "All done. Final installable is in $ZIPFILE ..."; 43 | -------------------------------------------------------------------------------- /build-scripts/showrev.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Print the current source revision, if available 4 | 5 | SDL_ROOT=$(dirname $0)/.. 6 | cd $SDL_ROOT 7 | 8 | if [ -x "$(command -v hg)" ]; then 9 | rev="$(hg parents --template 'hg-{rev}:{node|short}' 2>/dev/null)" 10 | if [ $? = 0 ]; then 11 | echo $rev 12 | exit 0 13 | fi 14 | fi 15 | 16 | if [ -x "$(command -v p4)" ]; then 17 | rev="$(p4 changes -m1 ./...\#have 2>/dev/null| awk '{print $2}')" 18 | if [ $? = 0 ]; then 19 | echo $rev 20 | exit 0 21 | fi 22 | fi 23 | 24 | echo "hg-0:baadf00d" 25 | exit 1 26 | -------------------------------------------------------------------------------- /build-scripts/strip_fPIC.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # libtool assumes that the compiler can handle the -fPIC flag 4 | # This isn't always true (for example, nasm can't handle it) 5 | command="" 6 | while [ $# -gt 0 ]; do 7 | case "$1" in 8 | -?PIC) 9 | # Ignore -fPIC and -DPIC options 10 | ;; 11 | -fno-common) 12 | # Ignore -fPIC and -DPIC options 13 | ;; 14 | *) 15 | command="$command $1" 16 | ;; 17 | esac 18 | shift 19 | done 20 | echo $command 21 | exec $command 22 | -------------------------------------------------------------------------------- /build-scripts/update-copyright.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | find . -type f -exec grep -Il "Copyright" {} \; \ 4 | | grep -v \.hg \ 5 | | while read file; \ 6 | do \ 7 | LC_ALL=C sed -b -i "s/\(.*Copyright.*\)[0-9]\{4\}\( *Sam Lantinga\)/\1`date +%Y`\2/" "$file"; \ 8 | done 9 | -------------------------------------------------------------------------------- /build-scripts/updaterev.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Generate a header file with the current source revision 4 | 5 | outdir=`pwd` 6 | cd `dirname $0` 7 | srcdir=.. 8 | header=$outdir/include/SDL_revision.h 9 | 10 | rev=`sh showrev.sh 2>/dev/null` 11 | if [ "$rev" != "" -a "$rev" != "hg-0:baadf00d" ]; then 12 | revnum=`echo $rev | sed 's,hg-\([0-9]*\).*,\1,'` 13 | echo "#define SDL_REVISION \"$rev\"" >"$header.new" 14 | echo "#define SDL_REVISION_NUMBER $revnum" >>"$header.new" 15 | if diff $header $header.new >/dev/null 2>&1; then 16 | rm "$header.new" 17 | else 18 | mv "$header.new" "$header" 19 | fi 20 | fi 21 | -------------------------------------------------------------------------------- /build-scripts/windows-buildbot-zipper.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | rem just a helper batch file for collecting up files and zipping them. 3 | rem usage: windows-buildbot-zipper.bat 4 | rem must be run from root of SDL source tree. 5 | 6 | IF EXIST %2\%1\Release GOTO okaydir 7 | echo Please run from root of source tree after doing a Release build. 8 | GOTO done 9 | 10 | :okaydir 11 | erase /q /f /s zipper 12 | IF EXIST zipper GOTO zippermade 13 | mkdir zipper 14 | :zippermade 15 | mkdir zipper\SDL 16 | mkdir zipper\SDL\include 17 | mkdir zipper\SDL\lib 18 | copy include\*.h include\ 19 | copy %2\%1\Release\SDL2.dll zipper\SDL\lib\ 20 | copy %2\%1\Release\SDL2.lib zipper\SDL\lib\ 21 | copy %2\%1\Release\SDL2main.lib zipper\SDL\lib\ 22 | cd zipper 23 | zip -9r ..\%3 SDL 24 | cd .. 25 | erase /q /f /s zipper 26 | 27 | :done 28 | 29 | -------------------------------------------------------------------------------- /build-scripts/winrtbuild.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | REM 3 | REM winrtbuild.bat: a batch file to help launch the winrtbuild.ps1 4 | REM Powershell script, either from Windows Explorer, or through Buildbot. 5 | REM 6 | SET ThisScriptsDirectory=%~dp0 7 | SET PowerShellScriptPath=%ThisScriptsDirectory%winrtbuild.ps1 8 | PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& '%PowerShellScriptPath%'"; -------------------------------------------------------------------------------- /cmake_uninstall.cmake.in: -------------------------------------------------------------------------------- 1 | if (NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt") 2 | message(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_BINARY_DIR@/install_manifest.txt\"") 3 | endif(NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt") 4 | 5 | file(READ "@CMAKE_BINARY_DIR@/install_manifest.txt" files) 6 | string(REGEX REPLACE "\n" ";" files "${files}") 7 | foreach (file ${files}) 8 | message(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"") 9 | execute_process( 10 | COMMAND @CMAKE_COMMAND@ -E remove "$ENV{DESTDIR}${file}" 11 | OUTPUT_VARIABLE rm_out 12 | RESULT_VARIABLE rm_retval 13 | ) 14 | if(NOT ${rm_retval} EQUAL 0) 15 | message(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"") 16 | endif (NOT ${rm_retval} EQUAL 0) 17 | endforeach(file) 18 | 19 | -------------------------------------------------------------------------------- /debian/compat: -------------------------------------------------------------------------------- 1 | 9 2 | -------------------------------------------------------------------------------- /debian/docs: -------------------------------------------------------------------------------- 1 | BUGS.txt 2 | CREDITS.txt 3 | README.txt 4 | README-SDL.txt 5 | -------------------------------------------------------------------------------- /debian/libsdl2-dev.install: -------------------------------------------------------------------------------- 1 | usr/bin/sdl2-config 2 | usr/include/SDL2 3 | usr/lib/*/*.a 4 | usr/lib/*/*.la 5 | usr/lib/*/*.so 6 | usr/lib/*/pkgconfig/sdl2.pc 7 | usr/lib/*/cmake/SDL2/sdl2-config.cmake 8 | usr/lib/*/cmake/SDL2/sdl2-config-version.cmake 9 | usr/share/aclocal/sdl2.m4 10 | -------------------------------------------------------------------------------- /debian/libsdl2-dev.manpages: -------------------------------------------------------------------------------- 1 | debian/sdl2-config.1 2 | -------------------------------------------------------------------------------- /debian/libsdl2.install: -------------------------------------------------------------------------------- 1 | usr/lib/*/libSDL2-2.0.so.0* 2 | -------------------------------------------------------------------------------- /debian/source/format: -------------------------------------------------------------------------------- 1 | 3.0 (native) 2 | -------------------------------------------------------------------------------- /debian/watch: -------------------------------------------------------------------------------- 1 | version=3 2 | http://www.libsdl.org/release/SDL-([\d.]+)\.tar\.gz 3 | -------------------------------------------------------------------------------- /docs/README-emscripten.md: -------------------------------------------------------------------------------- 1 | Emscripten 2 | ================================================================================ 3 | 4 | Build: 5 | 6 | $ mkdir build 7 | $ cd build 8 | $ emconfigure ../configure --host=asmjs-unknown-emscripten --disable-assembly --disable-threads --disable-cpuinfo CFLAGS="-O2" 9 | $ emmake make 10 | 11 | Or with cmake: 12 | 13 | $ mkdir build 14 | $ cd build 15 | $ emcmake cmake .. 16 | $ emmake make 17 | 18 | To build one of the tests: 19 | 20 | $ cd test/ 21 | $ emcc -O2 --js-opts 0 -g4 testdraw2.c -I../include ../build/.libs/libSDL2.a ../build/libSDL2_test.a -o a.html 22 | 23 | Uses GLES2 renderer or software 24 | 25 | Some other SDL2 libraries can be easily built (assuming SDL2 is installed somewhere): 26 | 27 | SDL_mixer (http://www.libsdl.org/projects/SDL_mixer/): 28 | 29 | $ EMCONFIGURE_JS=1 emconfigure ../configure 30 | build as usual... 31 | 32 | SDL_gfx (http://cms.ferzkopp.net/index.php/software/13-sdl-gfx): 33 | 34 | $ EMCONFIGURE_JS=1 emconfigure ../configure --disable-mmx 35 | build as usual... 36 | -------------------------------------------------------------------------------- /docs/README-hg.md: -------------------------------------------------------------------------------- 1 | Mercurial 2 | ========= 3 | 4 | The latest development version of SDL is available via Mercurial. 5 | Mercurial allows you to get up-to-the-minute fixes and enhancements; 6 | as a developer works on a source tree, you can use "hg" to mirror that 7 | source tree instead of waiting for an official release. Please look 8 | at the Mercurial website ( https://www.mercurial-scm.org/ ) for more 9 | information on using hg, where you can also download software for 10 | Mac OS X, Windows, and Unix systems. 11 | 12 | hg clone http://hg.libsdl.org/SDL 13 | 14 | If you are building SDL via configure, you will need to run autogen.sh 15 | before running configure. 16 | 17 | There is a web interface to the subversion repository at: 18 | http://hg.libsdl.org/SDL/ 19 | 20 | There is an RSS feed available at that URL, for those that want to 21 | track commits in real time. 22 | 23 | -------------------------------------------------------------------------------- /docs/README-pandora.md: -------------------------------------------------------------------------------- 1 | Pandora 2 | ===================================================================== 3 | 4 | ( http://openpandora.org/ ) 5 | - A pandora specific video driver was written to allow SDL 2.0 with OpenGL ES 6 | support to work on the pandora under the framebuffer. This driver do not have 7 | input support for now, so if you use it you will have to add your own control code. 8 | The video driver name is "pandora" so if you have problem running it from 9 | the framebuffer, try to set the following variable before starting your application : 10 | "export SDL_VIDEODRIVER=pandora" 11 | 12 | - OpenGL ES support was added to the x11 driver, so it's working like the normal 13 | x11 driver one with OpenGLX support, with SDL input event's etc.. 14 | 15 | 16 | David Carré (Cpasjuste) 17 | cpasjuste@gmail.com 18 | -------------------------------------------------------------------------------- /docs/README-platforms.md: -------------------------------------------------------------------------------- 1 | Platforms 2 | ========= 3 | 4 | We maintain the list of supported platforms on our wiki now, and how to 5 | build and install SDL for those platforms: 6 | 7 | https://wiki.libsdl.org/Installation 8 | 9 | -------------------------------------------------------------------------------- /docs/README-psp.md: -------------------------------------------------------------------------------- 1 | PSP 2 | ====== 3 | SDL port for the Sony PSP contributed by 4 | Captian Lex 5 | 6 | Credit to 7 | Marcus R.Brown,Jim Paris,Matthew H for the original SDL 1.2 for PSP 8 | Geecko for his PSP GU lib "Glib2d" 9 | 10 | Building 11 | -------- 12 | To build for the PSP, make sure psp-config is in the path and run: 13 | make -f Makefile.psp 14 | 15 | 16 | 17 | To Do 18 | ------ 19 | PSP Screen Keyboard 20 | -------------------------------------------------------------------------------- /docs/README-wince.md: -------------------------------------------------------------------------------- 1 | WinCE 2 | ===== 3 | 4 | Windows CE is no longer supported by SDL. 5 | 6 | We have left the CE support in SDL 1.2 for those that must have it, and we 7 | have support for Windows Phone 8 and WinRT in SDL2, as of SDL 2.0.3. 8 | 9 | --ryan. 10 | 11 | -------------------------------------------------------------------------------- /include/SDL_copying.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | -------------------------------------------------------------------------------- /include/SDL_name.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | #ifndef SDLname_h_ 23 | #define SDLname_h_ 24 | 25 | #if defined(__STDC__) || defined(__cplusplus) 26 | #define NeedFunctionPrototypes 1 27 | #endif 28 | 29 | #define SDL_NAME(X) SDL_##X 30 | 31 | #endif /* SDLname_h_ */ 32 | 33 | /* vi: set ts=4 sw=4 expandtab: */ 34 | -------------------------------------------------------------------------------- /include/SDL_opengles2_gl2platform.h: -------------------------------------------------------------------------------- 1 | #ifndef __gl2platform_h_ 2 | #define __gl2platform_h_ 3 | 4 | /* $Revision: 10602 $ on $Date:: 2010-03-04 22:35:34 -0800 #$ */ 5 | 6 | /* 7 | * This document is licensed under the SGI Free Software B License Version 8 | * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ . 9 | */ 10 | 11 | /* Platform-specific types and definitions for OpenGL ES 2.X gl2.h 12 | * 13 | * Adopters may modify khrplatform.h and this file to suit their platform. 14 | * You are encouraged to submit all modifications to the Khronos group so that 15 | * they can be included in future versions of this file. Please submit changes 16 | * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla) 17 | * by filing a bug against product "OpenGL-ES" component "Registry". 18 | */ 19 | 20 | /*#include */ 21 | 22 | #ifndef GL_APICALL 23 | #define GL_APICALL KHRONOS_APICALL 24 | #endif 25 | 26 | #ifndef GL_APIENTRY 27 | #define GL_APIENTRY KHRONOS_APIENTRY 28 | #endif 29 | 30 | #endif /* __gl2platform_h_ */ 31 | -------------------------------------------------------------------------------- /include/SDL_revision.h: -------------------------------------------------------------------------------- 1 | #define SDL_REVISION "hg-0:aaaaaaaaaaah" 2 | #define SDL_REVISION_NUMBER 0 3 | -------------------------------------------------------------------------------- /include/SDL_types.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_types.h 24 | * 25 | * \deprecated 26 | */ 27 | 28 | /* DEPRECATED */ 29 | #include "SDL_stdinc.h" 30 | -------------------------------------------------------------------------------- /sdl2-config-version.cmake.in: -------------------------------------------------------------------------------- 1 | set(PACKAGE_VERSION "@SDL_VERSION@") 2 | 3 | if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION) 4 | set(PACKAGE_VERSION_COMPATIBLE FALSE) 5 | else() 6 | set(PACKAGE_VERSION_COMPATIBLE TRUE) 7 | if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION) 8 | set(PACKAGE_VERSION_EXACT TRUE) 9 | endif() 10 | endif() 11 | 12 | -------------------------------------------------------------------------------- /sdl2.pc.in: -------------------------------------------------------------------------------- 1 | # sdl pkg-config source file 2 | 3 | prefix=@prefix@ 4 | exec_prefix=@exec_prefix@ 5 | libdir=@libdir@ 6 | includedir=@includedir@ 7 | 8 | Name: sdl2 9 | Description: Simple DirectMedia Layer is a cross-platform multimedia library designed to provide low level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, and 2D video framebuffer. 10 | Version: @SDL_VERSION@ 11 | Requires: 12 | Conflicts: 13 | Libs: -L${libdir} @SDL_RLD_FLAGS@ @SDL_LIBS@ @PKG_CONFIG_LIBS_PRIV@ @SDL_STATIC_LIBS@ 14 | Cflags: -I${includedir}/SDL2 @SDL_CFLAGS@ 15 | -------------------------------------------------------------------------------- /src/SDL_assert_c.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | #ifndef SDL_assert_c_h_ 23 | #define SDL_assert_c_h_ 24 | 25 | extern void SDL_AssertionsQuit(void); 26 | 27 | #endif /* SDL_assert_c_h_ */ 28 | 29 | /* vi: set ts=4 sw=4 expandtab: */ 30 | -------------------------------------------------------------------------------- /src/audio/sun/SDL_sunaudio.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/src/audio/sun/SDL_sunaudio.c -------------------------------------------------------------------------------- /src/core/openbsd/SDL_wscons.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | 23 | void SDL_WSCONS_Init(); 24 | void SDL_WSCONS_Quit(); 25 | 26 | void SDL_WSCONS_PumpEvents(); 27 | 28 | -------------------------------------------------------------------------------- /src/core/os2/geniconv/iconv.h: -------------------------------------------------------------------------------- 1 | #ifndef ICONV_H_ /* minimal iconv.h header based on public knowledge */ 2 | #define ICONV_H_ 3 | 4 | #include /* size_t */ 5 | #include 6 | 7 | typedef void *iconv_t; 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | extern iconv_t iconv_open(const char *, const char *); 14 | extern size_t iconv(iconv_t, char **, size_t *, char **, size_t *); 15 | extern int iconv_close(iconv_t); 16 | 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | 21 | #endif /* ICONV_H_ */ 22 | -------------------------------------------------------------------------------- /src/core/os2/geniconv/makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Universal iconv implementation for OS/2. 3 | # 4 | # OpenWatcom makefile to build a library that uses kiconv.dll / iconv2.dll / 5 | # iconv.dll or OS/2 Uni*() API. 6 | # 7 | # Andrey Vasilkin, 2016. 8 | # 9 | 10 | LIBFILE = geniconv.lib 11 | 12 | all: $(LIBFILE) test.exe .symbolic 13 | 14 | CFLAGS = -I$(%WATCOM)/h/os2 -I$(%WATCOM)/h -I. -bt=os2 -q -d0 -w2 15 | 16 | SRCS = geniconv.c os2cp.c os2iconv.c 17 | SRCS+= sys2utf8.c 18 | 19 | OBJS = $(SRCS:.c=.obj) 20 | 21 | LIBS = libuls.lib libconv.lib $(LIBFILE) 22 | 23 | test.exe: $(LIBFILE) test.obj 24 | wlink op quiet system os2v2 file test.obj lib {$(LIBS)} name $* 25 | 26 | $(LIBFILE): $(OBJS) 27 | @if exist $@ rm $@ 28 | @for %f in ($(OBJS)) do wlib -q -b $* +%f 29 | 30 | .c.obj: 31 | wcc386 $(CFLAGS) -fo=$^@ $< 32 | 33 | clean: .SYMBOLIC 34 | @if exist *.obj rm *.obj 35 | @if exist *.err rm *.err 36 | @if exist $(LIBFILE) rm $(LIBFILE) 37 | @if exist test.exe rm test.exe 38 | -------------------------------------------------------------------------------- /src/core/os2/geniconv/os2cp.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | #ifndef OS2CP_H 23 | #define OS2CP_H 1 24 | 25 | #define SYSTEM_CP 0 26 | 27 | char *os2cpToName(unsigned long cp); 28 | unsigned long os2cpFromName(char *cp); 29 | 30 | #endif /* OS2CP_H */ 31 | 32 | /* vi: set ts=4 sw=4 expandtab: */ 33 | -------------------------------------------------------------------------------- /src/core/os2/geniconv/test.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/src/core/os2/geniconv/test.c -------------------------------------------------------------------------------- /src/core/unix/SDL_poll.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | #include "../../SDL_internal.h" 23 | 24 | #ifndef SDL_poll_h_ 25 | #define SDL_poll_h_ 26 | 27 | #include "SDL_stdinc.h" 28 | 29 | 30 | extern int SDL_IOReady(int fd, SDL_bool forWrite, int timeoutMS); 31 | 32 | #endif /* SDL_poll_h_ */ 33 | 34 | /* vi: set ts=4 sw=4 expandtab: */ 35 | -------------------------------------------------------------------------------- /src/events/SDL_clipboardevents_c.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | #include "../SDL_internal.h" 22 | 23 | #ifndef SDL_clipboardevents_c_h_ 24 | #define SDL_clipboardevents_c_h_ 25 | 26 | extern int SDL_SendClipboardUpdate(void); 27 | 28 | #endif /* SDL_clipboardevents_c_h_ */ 29 | 30 | /* vi: set ts=4 sw=4 expandtab: */ 31 | -------------------------------------------------------------------------------- /src/events/SDL_displayevents_c.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | #include "../SDL_internal.h" 22 | 23 | #ifndef SDL_displayevents_c_h_ 24 | #define SDL_displayevents_c_h_ 25 | 26 | extern int SDL_SendDisplayEvent(SDL_VideoDisplay *display, Uint8 displayevent, int data1); 27 | 28 | #endif /* SDL_displayevents_c_h_ */ 29 | 30 | /* vi: set ts=4 sw=4 expandtab: */ 31 | -------------------------------------------------------------------------------- /src/events/default_cursor.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/src/events/default_cursor.h -------------------------------------------------------------------------------- /src/file/cocoa/SDL_rwopsbundlesupport.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | #ifdef __APPLE__ 23 | 24 | #include 25 | 26 | #ifndef SDL_rwopsbundlesupport_h 27 | #define SDL_rwopsbundlesupport_h 28 | FILE* SDL_OpenFPFromBundleOrFallback(const char *file, const char *mode); 29 | #endif 30 | #endif 31 | -------------------------------------------------------------------------------- /src/haptic/SDL_haptic_c.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | #ifndef SDL_haptic_c_h_ 23 | #define SDL_haptic_c_h_ 24 | 25 | extern int SDL_HapticInit(void); 26 | extern void SDL_HapticQuit(void); 27 | 28 | #endif /* SDL_haptic_c_h_ */ 29 | 30 | /* vi: set ts=4 sw=4 expandtab: */ 31 | -------------------------------------------------------------------------------- /src/haptic/android/SDL_syshaptic_c.h: -------------------------------------------------------------------------------- 1 | #include "SDL_config.h" 2 | 3 | #ifdef SDL_HAPTIC_ANDROID 4 | 5 | 6 | extern int Android_AddHaptic(int device_id, const char *name); 7 | extern int Android_RemoveHaptic(int device_id); 8 | 9 | 10 | #endif /* SDL_HAPTIC_ANDROID */ 11 | 12 | /* vi: set ts=4 sw=4 expandtab: */ 13 | -------------------------------------------------------------------------------- /src/haptic/darwin/SDL_syshaptic_c.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | extern int MacHaptic_MaybeAddDevice( io_object_t device ); 23 | extern int MacHaptic_MaybeRemoveDevice( io_object_t device ); 24 | 25 | /* vi: set ts=4 sw=4 expandtab: */ 26 | 27 | -------------------------------------------------------------------------------- /src/hidapi/AUTHORS.txt: -------------------------------------------------------------------------------- 1 | 2 | HIDAPI Authors: 3 | 4 | Alan Ott : 5 | Original Author and Maintainer 6 | Linux, Windows, and Mac implementations 7 | 8 | Ludovic Rousseau : 9 | Formatting for Doxygen documentation 10 | Bug fixes 11 | Correctness fixes 12 | 13 | 14 | For a comprehensive list of contributions, see the commit list at github: 15 | https://github.com/libusb/hidapi/commits/master 16 | 17 | -------------------------------------------------------------------------------- /src/hidapi/HACKING.txt: -------------------------------------------------------------------------------- 1 | This file is mostly for the maintainer. 2 | 3 | 1. Build hidapi.dll 4 | 2. Build hidtest.exe in DEBUG and RELEASE 5 | 3. Commit all 6 | 7 | 4. Run the Following 8 | export VERSION=0.1.0 9 | export TAG_NAME=hidapi-$VERSION 10 | git tag $TAG_NAME 11 | git archive --format zip --prefix $TAG_NAME/ $TAG_NAME >../$TAG_NAME.zip 12 | 5. Test the zip file. 13 | 6. Run the following: 14 | git push origin $TAG_NAME 15 | 16 | -------------------------------------------------------------------------------- /src/hidapi/LICENSE-orig.txt: -------------------------------------------------------------------------------- 1 | HIDAPI - Multi-Platform library for 2 | communication with HID devices. 3 | 4 | Copyright 2009, Alan Ott, Signal 11 Software. 5 | All Rights Reserved. 6 | 7 | This software may be used by anyone for any reason so 8 | long as the copyright notice in the source files 9 | remains intact. 10 | -------------------------------------------------------------------------------- /src/hidapi/LICENSE.txt: -------------------------------------------------------------------------------- 1 | HIDAPI can be used under one of three licenses. 2 | 3 | 1. The GNU General Public License, version 3.0, in LICENSE-gpl3.txt 4 | 2. A BSD-Style License, in LICENSE-bsd.txt. 5 | 3. The more liberal original HIDAPI license. LICENSE-orig.txt 6 | 7 | The license chosen is at the discretion of the user of HIDAPI. For example: 8 | 1. An author of GPL software would likely use HIDAPI under the terms of the 9 | GPL. 10 | 11 | 2. An author of commercial closed-source software would likely use HIDAPI 12 | under the terms of the BSD-style license or the original HIDAPI license. 13 | 14 | -------------------------------------------------------------------------------- /src/hidapi/android/jni/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH:= $(call my-dir) 2 | 3 | HIDAPI_ROOT_REL:= ../.. 4 | HIDAPI_ROOT_ABS:= $(LOCAL_PATH)/../.. 5 | 6 | include $(CLEAR_VARS) 7 | 8 | LOCAL_CPPFLAGS += -std=c++11 9 | 10 | LOCAL_SRC_FILES := \ 11 | $(HIDAPI_ROOT_REL)/android/hid.cpp 12 | 13 | LOCAL_MODULE := libhidapi 14 | LOCAL_LDLIBS := -llog 15 | 16 | include $(BUILD_SHARED_LIBRARY) 17 | -------------------------------------------------------------------------------- /src/hidapi/android/jni/Application.mk: -------------------------------------------------------------------------------- 1 | APP_STL := gnustl_static 2 | APP_ABI := armeabi-v7a 3 | -------------------------------------------------------------------------------- /src/hidapi/android/project.properties: -------------------------------------------------------------------------------- 1 | # This file is automatically generated by Android Tools. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file must be checked in Version Control Systems. 5 | # 6 | # To customize properties used by the Ant build system edit 7 | # "ant.properties", and override values to adapt the script to your 8 | # project structure. 9 | # 10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): 11 | #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt 12 | 13 | # Project target. 14 | target=android-21 15 | -------------------------------------------------------------------------------- /src/hidapi/bootstrap: -------------------------------------------------------------------------------- 1 | #!/bin/sh -x 2 | autoreconf --install --verbose --force 3 | -------------------------------------------------------------------------------- /src/hidapi/hidtest/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS = -I$(top_srcdir)/hidapi/ 2 | 3 | ## Linux 4 | if OS_LINUX 5 | noinst_PROGRAMS = hidtest-libusb hidtest-hidraw 6 | 7 | hidtest_hidraw_SOURCES = hidtest.cpp 8 | hidtest_hidraw_LDADD = $(top_builddir)/linux/libhidapi-hidraw.la 9 | 10 | hidtest_libusb_SOURCES = hidtest.cpp 11 | hidtest_libusb_LDADD = $(top_builddir)/libusb/libhidapi-libusb.la 12 | else 13 | 14 | # Other OS's 15 | noinst_PROGRAMS = hidtest 16 | 17 | hidtest_SOURCES = hidtest.cpp 18 | hidtest_LDADD = $(top_builddir)/$(backend)/libhidapi.la 19 | 20 | endif 21 | -------------------------------------------------------------------------------- /src/hidapi/ios/Makefile-manual: -------------------------------------------------------------------------------- 1 | ########################################### 2 | # Simple Makefile for HIDAPI test program 3 | # 4 | # Alan Ott 5 | # Signal 11 Software 6 | # 2010-07-03 7 | ########################################### 8 | 9 | all: hidtest 10 | 11 | CC=gcc 12 | CXX=g++ 13 | COBJS=hid.o 14 | CPPOBJS=../hidtest/hidtest.o 15 | OBJS=$(COBJS) $(CPPOBJS) 16 | CFLAGS+=-I../hidapi -Wall -g -c 17 | LIBS=-framework CoreBluetooth -framework CoreFoundation 18 | 19 | 20 | hidtest: $(OBJS) 21 | g++ -Wall -g $^ $(LIBS) -o hidtest 22 | 23 | $(COBJS): %.o: %.c 24 | $(CC) $(CFLAGS) $< -o $@ 25 | 26 | $(CPPOBJS): %.o: %.cpp 27 | $(CXX) $(CFLAGS) $< -o $@ 28 | 29 | clean: 30 | rm -f *.o hidtest $(CPPOBJS) 31 | 32 | .PHONY: clean 33 | -------------------------------------------------------------------------------- /src/hidapi/ios/Makefile.am: -------------------------------------------------------------------------------- 1 | lib_LTLIBRARIES = libhidapi.la 2 | libhidapi_la_SOURCES = hid.m 3 | libhidapi_la_LDFLAGS = $(LTLDFLAGS) 4 | AM_CPPFLAGS = -I$(top_srcdir)/hidapi/ 5 | 6 | hdrdir = $(includedir)/hidapi 7 | hdr_HEADERS = $(top_srcdir)/hidapi/hidapi.h 8 | 9 | EXTRA_DIST = Makefile-manual 10 | -------------------------------------------------------------------------------- /src/hidapi/libusb/Makefile-manual: -------------------------------------------------------------------------------- 1 | 2 | 3 | OS=$(shell uname) 4 | 5 | ifeq ($(OS), Linux) 6 | FILE=Makefile.linux 7 | endif 8 | 9 | ifeq ($(OS), FreeBSD) 10 | FILE=Makefile.freebsd 11 | endif 12 | 13 | ifeq ($(FILE), ) 14 | all: 15 | $(error Your platform ${OS} is not supported by hidapi/libusb at this time.) 16 | endif 17 | 18 | include $(FILE) 19 | -------------------------------------------------------------------------------- /src/hidapi/libusb/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS = -I$(top_srcdir)/hidapi $(CFLAGS_LIBUSB) 2 | 3 | if OS_LINUX 4 | lib_LTLIBRARIES = libhidapi-libusb.la 5 | libhidapi_libusb_la_SOURCES = hid.c 6 | libhidapi_libusb_la_LDFLAGS = $(LTLDFLAGS) $(PTHREAD_CFLAGS) 7 | libhidapi_libusb_la_LIBADD = $(LIBS_LIBUSB) 8 | endif 9 | 10 | if OS_FREEBSD 11 | lib_LTLIBRARIES = libhidapi.la 12 | libhidapi_la_SOURCES = hid.c 13 | libhidapi_la_LDFLAGS = $(LTLDFLAGS) 14 | libhidapi_la_LIBADD = $(LIBS_LIBUSB) 15 | endif 16 | 17 | if OS_KFREEBSD 18 | lib_LTLIBRARIES = libhidapi.la 19 | libhidapi_la_SOURCES = hid.c 20 | libhidapi_la_LDFLAGS = $(LTLDFLAGS) 21 | libhidapi_la_LIBADD = $(LIBS_LIBUSB) 22 | endif 23 | 24 | hdrdir = $(includedir)/hidapi 25 | hdr_HEADERS = $(top_srcdir)/hidapi/hidapi.h 26 | 27 | EXTRA_DIST = Makefile-manual 28 | -------------------------------------------------------------------------------- /src/hidapi/libusb/Makefile.freebsd: -------------------------------------------------------------------------------- 1 | ########################################### 2 | # Simple Makefile for HIDAPI test program 3 | # 4 | # Alan Ott 5 | # Signal 11 Software 6 | # 2010-06-01 7 | ########################################### 8 | 9 | all: hidtest libs 10 | 11 | libs: libhidapi.so 12 | 13 | CC ?= cc 14 | CFLAGS ?= -Wall -g -fPIC 15 | 16 | CXX ?= c++ 17 | CXXFLAGS ?= -Wall -g 18 | 19 | COBJS = hid.o 20 | CPPOBJS = ../hidtest/hidtest.o 21 | OBJS = $(COBJS) $(CPPOBJS) 22 | INCLUDES = -I../hidapi -I/usr/local/include 23 | LDFLAGS = -L/usr/local/lib 24 | LIBS = -lusb -liconv -pthread 25 | 26 | 27 | # Console Test Program 28 | hidtest: $(OBJS) 29 | $(CXX) $(CXXFLAGS) $(LDFLAGS) $^ -o $@ $(LIBS) 30 | 31 | # Shared Libs 32 | libhidapi.so: $(COBJS) 33 | $(CC) $(LDFLAGS) -shared -Wl,-soname,$@.0 $^ -o $@ $(LIBS) 34 | 35 | # Objects 36 | $(COBJS): %.o: %.c 37 | $(CC) $(CFLAGS) -c $(INCLUDES) $< -o $@ 38 | 39 | $(CPPOBJS): %.o: %.cpp 40 | $(CXX) $(CXXFLAGS) -c $(INCLUDES) $< -o $@ 41 | 42 | 43 | clean: 44 | rm -f $(OBJS) hidtest libhidapi.so ../hidtest/hidtest.o 45 | 46 | .PHONY: clean libs 47 | -------------------------------------------------------------------------------- /src/hidapi/libusb/Makefile.linux: -------------------------------------------------------------------------------- 1 | ########################################### 2 | # Simple Makefile for HIDAPI test program 3 | # 4 | # Alan Ott 5 | # Signal 11 Software 6 | # 2010-06-01 7 | ########################################### 8 | 9 | all: hidtest-libusb libs 10 | 11 | libs: libhidapi-libusb.so 12 | 13 | CC ?= gcc 14 | CFLAGS ?= -Wall -g -fpic 15 | 16 | CXX ?= g++ 17 | CXXFLAGS ?= -Wall -g -fpic 18 | 19 | LDFLAGS ?= -Wall -g 20 | 21 | COBJS_LIBUSB = hid.o 22 | COBJS = $(COBJS_LIBUSB) 23 | CPPOBJS = ../hidtest/hidtest.o 24 | OBJS = $(COBJS) $(CPPOBJS) 25 | LIBS_USB = `pkg-config libusb-1.0 --libs` -lrt -lpthread 26 | LIBS = $(LIBS_USB) 27 | INCLUDES ?= -I../hidapi `pkg-config libusb-1.0 --cflags` 28 | 29 | 30 | # Console Test Program 31 | hidtest-libusb: $(COBJS_LIBUSB) $(CPPOBJS) 32 | $(CXX) $(LDFLAGS) $^ $(LIBS_USB) -o $@ 33 | 34 | # Shared Libs 35 | libhidapi-libusb.so: $(COBJS_LIBUSB) 36 | $(CC) $(LDFLAGS) $(LIBS_USB) -shared -fpic -Wl,-soname,$@.0 $^ -o $@ 37 | 38 | # Objects 39 | $(COBJS): %.o: %.c 40 | $(CC) $(CFLAGS) -c $(INCLUDES) $< -o $@ 41 | 42 | $(CPPOBJS): %.o: %.cpp 43 | $(CXX) $(CXXFLAGS) -c $(INCLUDES) $< -o $@ 44 | 45 | 46 | clean: 47 | rm -f $(OBJS) hidtest-libusb libhidapi-libusb.so ../hidtest/hidtest.o 48 | 49 | .PHONY: clean libs 50 | -------------------------------------------------------------------------------- /src/hidapi/libusb/hidusb.cpp: -------------------------------------------------------------------------------- 1 | 2 | #define NAMESPACE HIDUSB 3 | #include "hid.c" 4 | -------------------------------------------------------------------------------- /src/hidapi/linux/Makefile-manual: -------------------------------------------------------------------------------- 1 | ########################################### 2 | # Simple Makefile for HIDAPI test program 3 | # 4 | # Alan Ott 5 | # Signal 11 Software 6 | # 2010-06-01 7 | ########################################### 8 | 9 | all: hidtest-hidraw libs 10 | 11 | libs: libhidapi-hidraw.so 12 | 13 | CC ?= gcc 14 | CFLAGS ?= -Wall -g -fpic 15 | 16 | CXX ?= g++ 17 | CXXFLAGS ?= -Wall -g -fpic 18 | 19 | LDFLAGS ?= -Wall -g 20 | 21 | 22 | COBJS = hid.o 23 | CPPOBJS = ../hidtest/hidtest.o 24 | OBJS = $(COBJS) $(CPPOBJS) 25 | LIBS_UDEV = `pkg-config libudev --libs` -lrt 26 | LIBS = $(LIBS_UDEV) 27 | INCLUDES ?= -I../hidapi `pkg-config libusb-1.0 --cflags` 28 | 29 | 30 | # Console Test Program 31 | hidtest-hidraw: $(COBJS) $(CPPOBJS) 32 | $(CXX) $(LDFLAGS) $^ $(LIBS_UDEV) -o $@ 33 | 34 | # Shared Libs 35 | libhidapi-hidraw.so: $(COBJS) 36 | $(CC) $(LDFLAGS) $(LIBS_UDEV) -shared -fpic -Wl,-soname,$@.0 $^ -o $@ 37 | 38 | # Objects 39 | $(COBJS): %.o: %.c 40 | $(CC) $(CFLAGS) -c $(INCLUDES) $< -o $@ 41 | 42 | $(CPPOBJS): %.o: %.cpp 43 | $(CXX) $(CXXFLAGS) -c $(INCLUDES) $< -o $@ 44 | 45 | 46 | clean: 47 | rm -f $(OBJS) hidtest-hidraw libhidapi-hidraw.so ../hidtest/hidtest.o 48 | 49 | .PHONY: clean libs 50 | -------------------------------------------------------------------------------- /src/hidapi/linux/Makefile.am: -------------------------------------------------------------------------------- 1 | lib_LTLIBRARIES = libhidapi-hidraw.la 2 | libhidapi_hidraw_la_SOURCES = hid.c 3 | libhidapi_hidraw_la_LDFLAGS = $(LTLDFLAGS) 4 | AM_CPPFLAGS = -I$(top_srcdir)/hidapi/ $(CFLAGS_HIDRAW) 5 | libhidapi_hidraw_la_LIBADD = $(LIBS_HIDRAW) 6 | 7 | hdrdir = $(includedir)/hidapi 8 | hdr_HEADERS = $(top_srcdir)/hidapi/hidapi.h 9 | 10 | EXTRA_DIST = Makefile-manual 11 | -------------------------------------------------------------------------------- /src/hidapi/linux/hidraw.cpp: -------------------------------------------------------------------------------- 1 | 2 | #define NAMESPACE HIDRAW 3 | #include "hid.c" 4 | -------------------------------------------------------------------------------- /src/hidapi/mac/Makefile-manual: -------------------------------------------------------------------------------- 1 | ########################################### 2 | # Simple Makefile for HIDAPI test program 3 | # 4 | # Alan Ott 5 | # Signal 11 Software 6 | # 2010-07-03 7 | ########################################### 8 | 9 | all: hidtest 10 | 11 | CC=gcc 12 | CXX=g++ 13 | COBJS=hid.o 14 | CPPOBJS=../hidtest/hidtest.o 15 | OBJS=$(COBJS) $(CPPOBJS) 16 | CFLAGS+=-I../hidapi -Wall -g -c 17 | LIBS=-framework IOKit -framework CoreFoundation 18 | 19 | 20 | hidtest: $(OBJS) 21 | g++ -Wall -g $^ $(LIBS) -o hidtest 22 | 23 | $(COBJS): %.o: %.c 24 | $(CC) $(CFLAGS) $< -o $@ 25 | 26 | $(CPPOBJS): %.o: %.cpp 27 | $(CXX) $(CFLAGS) $< -o $@ 28 | 29 | clean: 30 | rm -f *.o hidtest $(CPPOBJS) 31 | 32 | .PHONY: clean 33 | -------------------------------------------------------------------------------- /src/hidapi/mac/Makefile.am: -------------------------------------------------------------------------------- 1 | lib_LTLIBRARIES = libhidapi.la 2 | libhidapi_la_SOURCES = hid.c 3 | libhidapi_la_LDFLAGS = $(LTLDFLAGS) 4 | AM_CPPFLAGS = -I$(top_srcdir)/hidapi/ 5 | 6 | hdrdir = $(includedir)/hidapi 7 | hdr_HEADERS = $(top_srcdir)/hidapi/hidapi.h 8 | 9 | EXTRA_DIST = Makefile-manual 10 | -------------------------------------------------------------------------------- /src/hidapi/pc/hidapi-hidraw.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: hidapi-hidraw 7 | Description: C Library for USB/Bluetooth HID device access from Linux, Mac OS X, FreeBSD, and Windows. This is the hidraw implementation. 8 | Version: @VERSION@ 9 | Libs: -L${libdir} -lhidapi-hidraw 10 | Cflags: -I${includedir}/hidapi 11 | -------------------------------------------------------------------------------- /src/hidapi/pc/hidapi-libusb.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: hidapi-libusb 7 | Description: C Library for USB HID device access from Linux, Mac OS X, FreeBSD, and Windows. This is the libusb implementation. 8 | Version: @VERSION@ 9 | Libs: -L${libdir} -lhidapi-libusb 10 | Cflags: -I${includedir}/hidapi 11 | -------------------------------------------------------------------------------- /src/hidapi/pc/hidapi.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: hidapi 7 | Description: C Library for USB/Bluetooth HID device access from Linux, Mac OS X, FreeBSD, and Windows. 8 | Version: @VERSION@ 9 | Libs: -L${libdir} -lhidapi 10 | Cflags: -I${includedir}/hidapi 11 | -------------------------------------------------------------------------------- /src/hidapi/testgui/Makefile-manual: -------------------------------------------------------------------------------- 1 | 2 | 3 | OS=$(shell uname) 4 | 5 | ifeq ($(OS), Darwin) 6 | FILE=Makefile.mac 7 | endif 8 | 9 | ifneq (,$(findstring MINGW,$(OS))) 10 | FILE=Makefile.mingw 11 | endif 12 | 13 | ifeq ($(OS), Linux) 14 | FILE=Makefile.linux 15 | endif 16 | 17 | ifeq ($(OS), FreeBSD) 18 | FILE=Makefile.freebsd 19 | endif 20 | 21 | ifeq ($(FILE), ) 22 | all: 23 | $(error Your platform ${OS} is not supported at this time.) 24 | endif 25 | 26 | include $(FILE) 27 | -------------------------------------------------------------------------------- /src/hidapi/testgui/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | AM_CPPFLAGS = -I$(top_srcdir)/hidapi/ $(CFLAGS_TESTGUI) 3 | 4 | if OS_LINUX 5 | ## Linux 6 | bin_PROGRAMS = hidapi-hidraw-testgui hidapi-libusb-testgui 7 | 8 | hidapi_hidraw_testgui_SOURCES = test.cpp 9 | hidapi_hidraw_testgui_LDADD = $(top_builddir)/linux/libhidapi-hidraw.la $(LIBS_TESTGUI) 10 | 11 | hidapi_libusb_testgui_SOURCES = test.cpp 12 | hidapi_libusb_testgui_LDADD = $(top_builddir)/libusb/libhidapi-libusb.la $(LIBS_TESTGUI) 13 | else 14 | ## Other OS's 15 | bin_PROGRAMS = hidapi-testgui 16 | 17 | hidapi_testgui_SOURCES = test.cpp 18 | hidapi_testgui_LDADD = $(top_builddir)/$(backend)/libhidapi.la $(LIBS_TESTGUI) 19 | endif 20 | 21 | if OS_DARWIN 22 | hidapi_testgui_SOURCES = test.cpp mac_support_cocoa.m mac_support.h 23 | # Rules for copying the binary and its dependencies into the app bundle. 24 | TestGUI.app/Contents/MacOS/hidapi-testgui$(EXEEXT): hidapi-testgui$(EXEEXT) 25 | $(srcdir)/copy_to_bundle.sh 26 | 27 | all: all-am TestGUI.app/Contents/MacOS/hidapi-testgui$(EXEEXT) 28 | 29 | endif 30 | 31 | EXTRA_DIST = \ 32 | copy_to_bundle.sh \ 33 | Makefile-manual \ 34 | Makefile.freebsd \ 35 | Makefile.linux \ 36 | Makefile.mac \ 37 | Makefile.mingw \ 38 | TestGUI.app.in \ 39 | testgui.sln \ 40 | testgui.vcproj 41 | 42 | distclean-local: 43 | rm -rf TestGUI.app 44 | -------------------------------------------------------------------------------- /src/hidapi/testgui/Makefile.freebsd: -------------------------------------------------------------------------------- 1 | ########################################### 2 | # Simple Makefile for HIDAPI test program 3 | # 4 | # Alan Ott 5 | # Signal 11 Software 6 | # 2010-06-01 7 | ########################################### 8 | 9 | all: testgui 10 | 11 | CC=cc 12 | CXX=c++ 13 | COBJS=../libusb/hid.o 14 | CPPOBJS=test.o 15 | OBJS=$(COBJS) $(CPPOBJS) 16 | CFLAGS=-I../hidapi -I/usr/local/include `fox-config --cflags` -Wall -g -c 17 | LDFLAGS= -L/usr/local/lib 18 | LIBS= -lusb -liconv `fox-config --libs` -pthread 19 | 20 | 21 | testgui: $(OBJS) 22 | $(CXX) -Wall -g $^ $(LDFLAGS) -o $@ $(LIBS) 23 | 24 | $(COBJS): %.o: %.c 25 | $(CC) $(CFLAGS) $< -o $@ 26 | 27 | $(CPPOBJS): %.o: %.cpp 28 | $(CXX) $(CFLAGS) $< -o $@ 29 | 30 | clean: 31 | rm *.o testgui 32 | 33 | .PHONY: clean 34 | -------------------------------------------------------------------------------- /src/hidapi/testgui/Makefile.linux: -------------------------------------------------------------------------------- 1 | ########################################### 2 | # Simple Makefile for HIDAPI test program 3 | # 4 | # Alan Ott 5 | # Signal 11 Software 6 | # 2010-06-01 7 | ########################################### 8 | 9 | all: testgui 10 | 11 | CC=gcc 12 | CXX=g++ 13 | COBJS=../libusb/hid.o 14 | CPPOBJS=test.o 15 | OBJS=$(COBJS) $(CPPOBJS) 16 | CFLAGS=-I../hidapi -Wall -g -c `fox-config --cflags` `pkg-config libusb-1.0 --cflags` 17 | LIBS=-ludev -lrt -lpthread `fox-config --libs` `pkg-config libusb-1.0 --libs` 18 | 19 | 20 | testgui: $(OBJS) 21 | g++ -Wall -g $^ $(LIBS) -o testgui 22 | 23 | $(COBJS): %.o: %.c 24 | $(CC) $(CFLAGS) $< -o $@ 25 | 26 | $(CPPOBJS): %.o: %.cpp 27 | $(CXX) $(CFLAGS) $< -o $@ 28 | 29 | clean: 30 | rm *.o testgui 31 | 32 | .PHONY: clean 33 | -------------------------------------------------------------------------------- /src/hidapi/testgui/Makefile.mac: -------------------------------------------------------------------------------- 1 | ########################################### 2 | # Simple Makefile for HIDAPI test program 3 | # 4 | # Alan Ott 5 | # Signal 11 Software 6 | # 2010-07-03 7 | ########################################### 8 | 9 | all: hidapi-testgui 10 | 11 | CC=gcc 12 | CXX=g++ 13 | COBJS=../mac/hid.o 14 | CPPOBJS=test.o 15 | OBJCOBJS=mac_support_cocoa.o 16 | OBJS=$(COBJS) $(CPPOBJS) $(OBJCOBJS) 17 | CFLAGS=-I../hidapi -Wall -g -c `fox-config --cflags` 18 | LDFLAGS=-L/usr/X11R6/lib 19 | LIBS=`fox-config --libs` -framework IOKit -framework CoreFoundation -framework Cocoa 20 | 21 | 22 | hidapi-testgui: $(OBJS) TestGUI.app 23 | g++ -Wall -g $(OBJS) $(LIBS) $(LDFLAGS) -o hidapi-testgui 24 | ./copy_to_bundle.sh 25 | #cp TestGUI.app/Contents/MacOS/hidapi-testgui TestGUI.app/Contents/MacOS/tg 26 | #cp start.sh TestGUI.app/Contents/MacOS/hidapi-testgui 27 | 28 | $(COBJS): %.o: %.c 29 | $(CC) $(CFLAGS) $< -o $@ 30 | 31 | $(CPPOBJS): %.o: %.cpp 32 | $(CXX) $(CFLAGS) $< -o $@ 33 | 34 | $(OBJCOBJS): %.o: %.m 35 | $(CXX) $(CFLAGS) -x objective-c++ $< -o $@ 36 | 37 | TestGUI.app: TestGUI.app.in 38 | rm -Rf TestGUI.app 39 | mkdir -p TestGUI.app 40 | cp -R TestGUI.app.in/ TestGUI.app 41 | 42 | clean: 43 | rm -f $(OBJS) hidapi-testgui 44 | rm -Rf TestGUI.app 45 | 46 | .PHONY: clean 47 | -------------------------------------------------------------------------------- /src/hidapi/testgui/Makefile.mingw: -------------------------------------------------------------------------------- 1 | ########################################### 2 | # Simple Makefile for HIDAPI test program 3 | # 4 | # Alan Ott 5 | # Signal 11 Software 6 | # 2010-06-01 7 | ########################################### 8 | 9 | all: hidapi-testgui 10 | 11 | CC=gcc 12 | CXX=g++ 13 | COBJS=../windows/hid.o 14 | CPPOBJS=test.o 15 | OBJS=$(COBJS) $(CPPOBJS) 16 | CFLAGS=-I../hidapi -I../../hidapi-externals/fox/include -g -c 17 | LIBS= -mwindows -lsetupapi -L../../hidapi-externals/fox/lib -Wl,-Bstatic -lFOX-1.6 -Wl,-Bdynamic -lgdi32 -Wl,--enable-auto-import -static-libgcc -static-libstdc++ -lkernel32 18 | 19 | 20 | hidapi-testgui: $(OBJS) 21 | g++ -g $^ $(LIBS) -o hidapi-testgui 22 | 23 | $(COBJS): %.o: %.c 24 | $(CC) $(CFLAGS) $< -o $@ 25 | 26 | $(CPPOBJS): %.o: %.cpp 27 | $(CXX) $(CFLAGS) $< -o $@ 28 | 29 | clean: 30 | rm -f *.o hidapi-testgui.exe 31 | 32 | .PHONY: clean 33 | -------------------------------------------------------------------------------- /src/hidapi/testgui/TestGUI.app.in/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleDisplayName 8 | 9 | CFBundleExecutable 10 | hidapi-testgui 11 | CFBundleIconFile 12 | Signal11.icns 13 | CFBundleIdentifier 14 | us.signal11.hidtestgui 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | testgui 19 | CFBundlePackageType 20 | APPL 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | CSResourcesFileMapped 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/hidapi/testgui/TestGUI.app.in/Contents/PkgInfo: -------------------------------------------------------------------------------- 1 | APPL???? -------------------------------------------------------------------------------- /src/hidapi/testgui/TestGUI.app.in/Contents/Resources/English.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/src/hidapi/testgui/TestGUI.app.in/Contents/Resources/English.lproj/InfoPlist.strings -------------------------------------------------------------------------------- /src/hidapi/testgui/TestGUI.app.in/Contents/Resources/Signal11.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/src/hidapi/testgui/TestGUI.app.in/Contents/Resources/Signal11.icns -------------------------------------------------------------------------------- /src/hidapi/testgui/mac_support.h: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Mac support for HID Test GUI 3 | 4 | Alan Ott 5 | Signal 11 Software 6 | 7 | *******************************/ 8 | 9 | #ifndef MAC_SUPPORT_H__ 10 | #define MAC_SUPPORT_H__ 11 | 12 | extern "C" { 13 | void init_apple_message_system(); 14 | void check_apple_events(); 15 | } 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /src/hidapi/testgui/start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | xterm -e /Users/alan/work/hidapi/testgui/TestGUI.app/Contents/MacOS/tg 3 | -------------------------------------------------------------------------------- /src/hidapi/testgui/testgui.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 10.00 3 | # Visual C++ Express 2008 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testgui", "testgui.vcproj", "{08769AC3-785A-4DDC-BFC7-1775414B7AB7}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|Win32 = Debug|Win32 9 | Release|Win32 = Release|Win32 10 | EndGlobalSection 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 12 | {08769AC3-785A-4DDC-BFC7-1775414B7AB7}.Debug|Win32.ActiveCfg = Debug|Win32 13 | {08769AC3-785A-4DDC-BFC7-1775414B7AB7}.Debug|Win32.Build.0 = Debug|Win32 14 | {08769AC3-785A-4DDC-BFC7-1775414B7AB7}.Release|Win32.ActiveCfg = Release|Win32 15 | {08769AC3-785A-4DDC-BFC7-1775414B7AB7}.Release|Win32.Build.0 = Release|Win32 16 | EndGlobalSection 17 | GlobalSection(SolutionProperties) = preSolution 18 | HideSolutionNode = FALSE 19 | EndGlobalSection 20 | EndGlobal 21 | -------------------------------------------------------------------------------- /src/hidapi/windows/Makefile-manual: -------------------------------------------------------------------------------- 1 | 2 | 3 | OS=$(shell uname) 4 | 5 | ifneq (,$(findstring MINGW,$(OS))) 6 | FILE=Makefile.mingw 7 | endif 8 | 9 | ifeq ($(FILE), ) 10 | all: 11 | $(error Your platform ${OS} is not supported at this time.) 12 | endif 13 | 14 | include $(FILE) 15 | -------------------------------------------------------------------------------- /src/hidapi/windows/Makefile.am: -------------------------------------------------------------------------------- 1 | lib_LTLIBRARIES = libhidapi.la 2 | libhidapi_la_SOURCES = hid.c 3 | libhidapi_la_LDFLAGS = $(LTLDFLAGS) 4 | AM_CPPFLAGS = -I$(top_srcdir)/hidapi/ 5 | libhidapi_la_LIBADD = $(LIBS) 6 | 7 | hdrdir = $(includedir)/hidapi 8 | hdr_HEADERS = $(top_srcdir)/hidapi/hidapi.h 9 | 10 | EXTRA_DIST = \ 11 | ddk_build \ 12 | hidapi.vcproj \ 13 | hidtest.vcproj \ 14 | Makefile-manual \ 15 | Makefile.mingw \ 16 | hidapi.sln 17 | -------------------------------------------------------------------------------- /src/hidapi/windows/Makefile.mingw: -------------------------------------------------------------------------------- 1 | ########################################### 2 | # Simple Makefile for HIDAPI test program 3 | # 4 | # Alan Ott 5 | # Signal 11 Software 6 | # 2010-06-01 7 | ########################################### 8 | 9 | all: hidtest libhidapi.dll 10 | 11 | CC=gcc 12 | CXX=g++ 13 | COBJS=hid.o 14 | CPPOBJS=../hidtest/hidtest.o 15 | OBJS=$(COBJS) $(CPPOBJS) 16 | CFLAGS=-I../hidapi -g -c 17 | LIBS= -lsetupapi 18 | DLL_LDFLAGS = -mwindows -lsetupapi 19 | 20 | hidtest: $(OBJS) 21 | g++ -g $^ $(LIBS) -o hidtest 22 | 23 | libhidapi.dll: $(OBJS) 24 | $(CC) -g $^ $(DLL_LDFLAGS) -o libhidapi.dll 25 | 26 | $(COBJS): %.o: %.c 27 | $(CC) $(CFLAGS) $< -o $@ 28 | 29 | $(CPPOBJS): %.o: %.cpp 30 | $(CXX) $(CFLAGS) $< -o $@ 31 | 32 | clean: 33 | rm *.o ../hidtest/*.o hidtest.exe 34 | 35 | .PHONY: clean 36 | -------------------------------------------------------------------------------- /src/hidapi/windows/ddk_build/hidapi.def: -------------------------------------------------------------------------------- 1 | LIBRARY hidapi 2 | EXPORTS 3 | hid_open @1 4 | hid_write @2 5 | hid_read @3 6 | hid_close @4 7 | hid_get_product_string @5 8 | hid_get_manufacturer_string @6 9 | hid_get_serial_number_string @7 10 | hid_get_indexed_string @8 11 | hid_error @9 12 | hid_set_nonblocking @10 13 | hid_enumerate @11 14 | hid_open_path @12 15 | hid_send_feature_report @13 16 | hid_get_feature_report @14 17 | -------------------------------------------------------------------------------- /src/hidapi/windows/ddk_build/sources: -------------------------------------------------------------------------------- 1 | TARGETNAME=hidapi 2 | TARGETTYPE=DYNLINK 3 | UMTYPE=console 4 | UMENTRY=main 5 | 6 | MSC_WARNING_LEVEL=/W3 /WX 7 | 8 | TARGETLIBS=$(SDK_LIB_PATH)\hid.lib \ 9 | $(SDK_LIB_PATH)\setupapi.lib \ 10 | $(SDK_LIB_PATH)\kernel32.lib \ 11 | $(SDK_LIB_PATH)\comdlg32.lib 12 | 13 | USE_MSVCRT=1 14 | 15 | INCLUDES= ..\..\hidapi 16 | SOURCES= ..\hid.c \ 17 | 18 | 19 | TARGET_DESTINATION=retail 20 | 21 | MUI=0 22 | MUI_COMMENT="HID Interface DLL" 23 | 24 | -------------------------------------------------------------------------------- /src/joystick/check_8bitdo.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Check to make sure 8BitDo controller configurations are correct 4 | 5 | echo "Expected output:" 6 | cat <<__EOF__ 7 | "050000003512000020ab000000780f00,8BitDo SNES30 Gamepad,a:b20,b:b21,back:b30,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b26,rightshoulder:b27,start:b31,x:b23,y:b24,hint:SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1,", 8 | "050000003512000020ab000000780f00,8BitDo SNES30 Gamepad,a:b21,b:b20,back:b30,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b26,rightshoulder:b27,start:b31,x:b24,y:b23,hint:!SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1,", 9 | 10 | __EOF__ 11 | 12 | echo "Actual output:" 13 | fgrep 8BitDo SDL_gamecontrollerdb.h | fgrep -v hint 14 | egrep "hint:SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1" SDL_gamecontrollerdb.h | fgrep -i 8bit | fgrep -v x:b2,y:b3 | fgrep -v x:b3,y:b4 15 | egrep "hint:.SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1" SDL_gamecontrollerdb.h | fgrep -i 8bit | fgrep -v x:b3,y:b2 | fgrep -v x:b4,y:b3 16 | -------------------------------------------------------------------------------- /src/libm/s_copysign.c: -------------------------------------------------------------------------------- 1 | /* 2 | * ==================================================== 3 | * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. 4 | * 5 | * Developed at SunPro, a Sun Microsystems, Inc. business. 6 | * Permission to use, copy, modify, and distribute this 7 | * software is freely granted, provided that this notice 8 | * is preserved. 9 | * ==================================================== 10 | */ 11 | 12 | /* 13 | * copysign(double x, double y) 14 | * copysign(x,y) returns a value with the magnitude of x and 15 | * with the sign bit of y. 16 | */ 17 | 18 | #include "math_libm.h" 19 | #include "math_private.h" 20 | 21 | double copysign(double x, double y) 22 | { 23 | u_int32_t hx,hy; 24 | GET_HIGH_WORD(hx,x); 25 | GET_HIGH_WORD(hy,y); 26 | SET_HIGH_WORD(x,(hx&0x7fffffff)|(hy&0x80000000)); 27 | return x; 28 | } 29 | libm_hidden_def(copysign) 30 | -------------------------------------------------------------------------------- /src/libm/s_fabs.c: -------------------------------------------------------------------------------- 1 | /* 2 | * ==================================================== 3 | * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. 4 | * 5 | * Developed at SunPro, a Sun Microsystems, Inc. business. 6 | * Permission to use, copy, modify, and distribute this 7 | * software is freely granted, provided that this notice 8 | * is preserved. 9 | * ==================================================== 10 | */ 11 | 12 | /* 13 | * fabs(x) returns the absolute value of x. 14 | */ 15 | 16 | /*#include */ 17 | /* Prevent math.h from defining a colliding inline */ 18 | #undef __USE_EXTERN_INLINES 19 | #include "math_libm.h" 20 | #include "math_private.h" 21 | 22 | double fabs(double x) 23 | { 24 | u_int32_t high; 25 | GET_HIGH_WORD(high,x); 26 | SET_HIGH_WORD(x,high&0x7fffffff); 27 | return x; 28 | } 29 | libm_hidden_def(fabs) 30 | -------------------------------------------------------------------------------- /src/locale/android/SDL_syslocale.c: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | #include "../../SDL_internal.h" 23 | #include "../SDL_syslocale.h" 24 | #include "../../core/android/SDL_android.h" 25 | 26 | void 27 | SDL_SYS_GetPreferredLocales(char *buf, size_t buflen) 28 | { 29 | Android_JNI_GetLocale(buf, buflen); 30 | } 31 | 32 | /* vi: set ts=4 sw=4 expandtab: */ 33 | 34 | -------------------------------------------------------------------------------- /src/locale/dummy/SDL_syslocale.c: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | #include "../../SDL_internal.h" 23 | #include "../SDL_syslocale.h" 24 | 25 | void 26 | SDL_SYS_GetPreferredLocales(char *buf, size_t buflen) 27 | { 28 | /* dummy implementation. Caller already zero'd out buffer. */ 29 | SDL_Unsupported(); 30 | } 31 | 32 | /* vi: set ts=4 sw=4 expandtab: */ 33 | 34 | -------------------------------------------------------------------------------- /src/main/android/SDL_android_main.c: -------------------------------------------------------------------------------- 1 | /* 2 | SDL_android_main.c, placed in the public domain by Sam Lantinga 3/13/14 3 | 4 | As of SDL 2.0.6 this file is no longer necessary. 5 | */ 6 | 7 | /* vi: set ts=4 sw=4 expandtab: */ 8 | -------------------------------------------------------------------------------- /src/main/dummy/SDL_dummy_main.c: -------------------------------------------------------------------------------- 1 | /* 2 | SDL_dummy_main.c, placed in the public domain by Sam Lantinga 3/13/14 3 | */ 4 | #include "../../SDL_internal.h" 5 | 6 | /* Include the SDL main definition header */ 7 | #include "SDL_main.h" 8 | 9 | #ifdef main 10 | #undef main 11 | int 12 | main(int argc, char *argv[]) 13 | { 14 | return (SDL_main(argc, argv)); 15 | } 16 | #else 17 | /* Nothing to do on this platform */ 18 | int 19 | SDL_main_stub_symbol(void); 20 | 21 | int 22 | SDL_main_stub_symbol(void) 23 | { 24 | return 0; 25 | } 26 | #endif 27 | 28 | /* vi: set ts=4 sw=4 expandtab: */ 29 | -------------------------------------------------------------------------------- /src/main/uikit/SDL_uikit_main.c: -------------------------------------------------------------------------------- 1 | /* 2 | SDL_uikit_main.c, placed in the public domain by Sam Lantinga 3/18/2019 3 | */ 4 | #include "../../SDL_internal.h" 5 | 6 | /* Include the SDL main definition header */ 7 | #include "SDL_main.h" 8 | 9 | #ifdef main 10 | #undef main 11 | #endif 12 | 13 | int 14 | main(int argc, char *argv[]) 15 | { 16 | return SDL_UIKitRunApp(argc, argv, SDL_main); 17 | } 18 | 19 | /* vi: set ts=4 sw=4 expandtab: */ 20 | -------------------------------------------------------------------------------- /src/main/windows/version.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/src/main/windows/version.rc -------------------------------------------------------------------------------- /src/main/winrt/SDL2-WinRTResource_BlankCursor.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/src/main/winrt/SDL2-WinRTResource_BlankCursor.cur -------------------------------------------------------------------------------- /src/main/winrt/SDL2-WinRTResources.rc: -------------------------------------------------------------------------------- 1 | #include "winres.h" 2 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US 3 | 5000 CURSOR "SDL2-WinRTResource_BlankCursor.cur" 4 | -------------------------------------------------------------------------------- /src/misc/SDL_sysurl.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | #include "../SDL_internal.h" 23 | #include "SDL_misc.h" 24 | #include "SDL_error.h" 25 | 26 | #ifdef __cplusplus 27 | extern "C" { 28 | #endif 29 | 30 | extern int SDL_SYS_OpenURL(const char *url); 31 | 32 | #ifdef __cplusplus 33 | } 34 | #endif 35 | 36 | /* vi: set ts=4 sw=4 expandtab: */ 37 | -------------------------------------------------------------------------------- /src/misc/SDL_url.c: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | #include "SDL_sysurl.h" 23 | 24 | extern int SDL_SYS_OpenURL(const char *url); 25 | 26 | int 27 | SDL_OpenURL(const char *url) 28 | { 29 | if (!url) { 30 | return SDL_InvalidParamError("url"); 31 | } 32 | return SDL_SYS_OpenURL(url); 33 | } 34 | 35 | /* vi: set ts=4 sw=4 expandtab: */ 36 | -------------------------------------------------------------------------------- /src/misc/android/SDL_sysurl.c: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | #include "../SDL_sysurl.h" 23 | #include "../../core/android/SDL_android.h" 24 | 25 | int 26 | SDL_SYS_OpenURL(const char *url) 27 | { 28 | return Android_JNI_OpenURL(url); 29 | } 30 | 31 | /* vi: set ts=4 sw=4 expandtab: */ 32 | 33 | -------------------------------------------------------------------------------- /src/misc/dummy/SDL_sysurl.c: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | #include "../SDL_sysurl.h" 23 | 24 | int 25 | SDL_SYS_OpenURL(const char *url) 26 | { 27 | return SDL_Unsupported(); 28 | } 29 | 30 | /* vi: set ts=4 sw=4 expandtab: */ 31 | 32 | -------------------------------------------------------------------------------- /src/render/metal/build-metal-shaders.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -x 4 | set -e 5 | cd `dirname "$0"` 6 | 7 | generate_shaders() 8 | { 9 | fileplatform=$1 10 | compileplatform=$2 11 | sdkplatform=$3 12 | minversion=$4 13 | xcrun -sdk $sdkplatform metal -c -std=$compileplatform-metal1.1 -m$sdkplatform-version-min=$minversion -Wall -O3 -o ./sdl.air ./SDL_shaders_metal.metal || exit $? 14 | xcrun -sdk $sdkplatform metal-ar rc sdl.metalar sdl.air || exit $? 15 | xcrun -sdk $sdkplatform metallib -o sdl.metallib sdl.metalar || exit $? 16 | xxd -i sdl.metallib | perl -w -p -e 's/\Aunsigned /const unsigned /;' >./SDL_shaders_metal_$fileplatform.h 17 | rm -f sdl.air sdl.metalar sdl.metallib 18 | } 19 | 20 | generate_shaders osx osx macosx 10.11 21 | generate_shaders ios ios iphoneos 8.0 22 | generate_shaders iphonesimulator ios iphonesimulator 8.0 23 | generate_shaders tvos ios appletvos 9.0 24 | generate_shaders tvsimulator ios appletvsimulator 9.0 25 | -------------------------------------------------------------------------------- /src/render/software/SDL_render_sw_c.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | #ifndef SDL_render_sw_c_h_ 23 | #define SDL_render_sw_c_h_ 24 | 25 | extern SDL_Renderer * SW_CreateRendererForSurface(SDL_Surface * surface); 26 | 27 | #endif /* SDL_render_sw_c_h_ */ 28 | 29 | /* vi: set ts=4 sw=4 expandtab: */ 30 | -------------------------------------------------------------------------------- /src/sensor/android/SDL_androidsensor.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | #include "SDL_config.h" 22 | 23 | /* The private structure used to keep track of a sensor */ 24 | struct sensor_hwdata 25 | { 26 | ASensorRef asensor; 27 | ASensorEventQueue *eventqueue; 28 | }; 29 | 30 | 31 | /* vi: set ts=4 sw=4 expandtab: */ 32 | -------------------------------------------------------------------------------- /src/sensor/coremotion/SDL_coremotionsensor.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | #include "SDL_config.h" 22 | 23 | /* The private structure used to keep track of a sensor */ 24 | struct sensor_hwdata 25 | { 26 | float data[3]; 27 | }; 28 | 29 | 30 | /* vi: set ts=4 sw=4 expandtab: */ 31 | -------------------------------------------------------------------------------- /src/sensor/dummy/SDL_dummysensor.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | #include "SDL_config.h" 22 | 23 | /* vi: set ts=4 sw=4 expandtab: */ 24 | -------------------------------------------------------------------------------- /src/sensor/windows/SDL_windowssensor.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | #include "SDL_config.h" 22 | 23 | /* vi: set ts=4 sw=4 expandtab: */ 24 | -------------------------------------------------------------------------------- /src/test/SDL_test_font.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/src/test/SDL_test_font.c -------------------------------------------------------------------------------- /src/thread/generic/SDL_sysmutex_c.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | #include "../../SDL_internal.h" 22 | /* vi: set ts=4 sw=4 expandtab: */ 23 | -------------------------------------------------------------------------------- /src/thread/generic/SDL_systhread_c.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | #include "../../SDL_internal.h" 22 | 23 | /* Stub until we implement threads on this platform */ 24 | typedef int SYS_ThreadHandle; 25 | 26 | /* vi: set ts=4 sw=4 expandtab: */ 27 | -------------------------------------------------------------------------------- /src/thread/os2/SDL_systhread_c.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | #include "../../SDL_internal.h" 22 | 23 | typedef int SYS_ThreadHandle; 24 | 25 | /* vi: set ts=4 sw=4 expandtab: */ 26 | -------------------------------------------------------------------------------- /src/thread/psp/SDL_sysmutex_c.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | #include "../../SDL_internal.h" 22 | /* vi: set ts=4 sw=4 expandtab: */ 23 | -------------------------------------------------------------------------------- /src/thread/psp/SDL_systhread_c.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | #include 23 | 24 | typedef SceUID SYS_ThreadHandle; 25 | -------------------------------------------------------------------------------- /src/thread/pthread/SDL_sysmutex_c.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | #include "../../SDL_internal.h" 22 | 23 | #ifndef SDL_mutex_c_h_ 24 | #define SDL_mutex_c_h_ 25 | 26 | struct SDL_mutex 27 | { 28 | pthread_mutex_t id; 29 | }; 30 | 31 | #endif /* SDL_mutex_c_h_ */ 32 | /* vi: set ts=4 sw=4 expandtab: */ 33 | -------------------------------------------------------------------------------- /src/thread/pthread/SDL_systhread_c.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | #include "../../SDL_internal.h" 22 | 23 | #include 24 | 25 | typedef pthread_t SYS_ThreadHandle; 26 | 27 | /* vi: set ts=4 sw=4 expandtab: */ 28 | -------------------------------------------------------------------------------- /src/thread/stdcpp/SDL_sysmutex_c.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | #include "SDL_config.h" 22 | 23 | #include 24 | 25 | struct SDL_mutex 26 | { 27 | std::recursive_mutex cpp_mutex; 28 | }; 29 | 30 | /* vi: set ts=4 sw=4 expandtab: */ 31 | -------------------------------------------------------------------------------- /src/thread/stdcpp/SDL_systhread_c.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | #include "SDL_config.h" 22 | 23 | /* For a thread handle, use a void pointer to a std::thread */ 24 | typedef void * SYS_ThreadHandle; 25 | 26 | /* vi: set ts=4 sw=4 expandtab: */ 27 | -------------------------------------------------------------------------------- /src/thread/windows/SDL_systhread_c.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | #include "../../SDL_internal.h" 22 | 23 | #ifndef SDL_systhread_c_h_ 24 | #define SDL_systhread_c_h_ 25 | 26 | #include "../../core/windows/SDL_windows.h" 27 | 28 | typedef HANDLE SYS_ThreadHandle; 29 | 30 | #endif /* SDL_systhread_c_h_ */ 31 | 32 | /* vi: set ts=4 sw=4 expandtab: */ 33 | -------------------------------------------------------------------------------- /src/video/SDL_blit_copy.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | #ifndef SDL_blit_copy_h_ 23 | #define SDL_blit_copy_h_ 24 | 25 | void SDL_BlitCopy(SDL_BlitInfo * info); 26 | 27 | #endif /* SDL_blit_copy_h_ */ 28 | 29 | /* vi: set ts=4 sw=4 expandtab: */ 30 | -------------------------------------------------------------------------------- /src/video/SDL_blit_slow.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | #ifndef SDL_blit_slow_h_ 23 | #define SDL_blit_slow_h_ 24 | 25 | #include "../SDL_internal.h" 26 | 27 | extern void SDL_Blit_Slow(SDL_BlitInfo * info); 28 | 29 | #endif /* SDL_blit_slow_h_ */ 30 | 31 | /* vi: set ts=4 sw=4 expandtab: */ 32 | -------------------------------------------------------------------------------- /src/video/SDL_rect_c.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | #ifndef SDL_rect_c_h_ 23 | #define SDL_rect_c_h_ 24 | 25 | #include "../SDL_internal.h" 26 | 27 | extern SDL_bool SDL_GetSpanEnclosingRect(int width, int height, int numrects, const SDL_Rect * rects, SDL_Rect *span); 28 | 29 | #endif /* SDL_rect_c_h_ */ 30 | 31 | /* vi: set ts=4 sw=4 expandtab: */ 32 | -------------------------------------------------------------------------------- /src/video/android/SDL_androidevents.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | #include "../../SDL_internal.h" 22 | 23 | #include "SDL_androidvideo.h" 24 | 25 | extern void Android_PumpEvents_Blocking(_THIS); 26 | extern void Android_PumpEvents_NonBlocking(_THIS); 27 | 28 | /* vi: set ts=4 sw=4 expandtab: */ 29 | -------------------------------------------------------------------------------- /src/video/android/SDL_androidmessagebox.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | #include "../../SDL_internal.h" 22 | 23 | #if SDL_VIDEO_DRIVER_ANDROID 24 | 25 | extern int Android_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid); 26 | 27 | #endif /* SDL_VIDEO_DRIVER_ANDROID */ 28 | 29 | /* vi: set ts=4 sw=4 expandtab: */ 30 | -------------------------------------------------------------------------------- /src/video/cocoa/SDL_cocoamessagebox.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | #include "../../SDL_internal.h" 22 | 23 | #if SDL_VIDEO_DRIVER_COCOA 24 | 25 | extern int Cocoa_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid); 26 | 27 | #endif /* SDL_VIDEO_DRIVER_COCOA */ 28 | 29 | /* vi: set ts=4 sw=4 expandtab: */ 30 | -------------------------------------------------------------------------------- /src/video/directfb/SDL_DirectFB_render.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | 23 | /* SDL surface based renderer implementation */ 24 | 25 | /* vi: set ts=4 sw=4 expandtab: */ 26 | -------------------------------------------------------------------------------- /src/video/dummy/SDL_nullevents_c.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | #ifndef SDL_nullevents_c_h_ 23 | #define SDL_nullevents_c_h_ 24 | 25 | #include "../../SDL_internal.h" 26 | 27 | #include "SDL_nullvideo.h" 28 | 29 | extern void DUMMY_PumpEvents(_THIS); 30 | 31 | #endif /* SDL_nullevents_c_h_ */ 32 | 33 | /* vi: set ts=4 sw=4 expandtab: */ 34 | -------------------------------------------------------------------------------- /src/video/dummy/SDL_nullvideo.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | #include "../../SDL_internal.h" 22 | 23 | #ifndef SDL_nullvideo_h_ 24 | #define SDL_nullvideo_h_ 25 | 26 | #include "../SDL_sysvideo.h" 27 | 28 | #endif /* SDL_nullvideo_h_ */ 29 | 30 | /* vi: set ts=4 sw=4 expandtab: */ 31 | -------------------------------------------------------------------------------- /src/video/khronos/GLES2/gl2platform.h: -------------------------------------------------------------------------------- 1 | #ifndef __gl2platform_h_ 2 | #define __gl2platform_h_ 3 | 4 | /* 5 | ** Copyright (c) 2017 The Khronos Group Inc. 6 | ** 7 | ** Licensed under the Apache License, Version 2.0 (the "License"); 8 | ** you may not use this file except in compliance with the License. 9 | ** You may obtain a copy of the License at 10 | ** 11 | ** http://www.apache.org/licenses/LICENSE-2.0 12 | ** 13 | ** Unless required by applicable law or agreed to in writing, software 14 | ** distributed under the License is distributed on an "AS IS" BASIS, 15 | ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | ** See the License for the specific language governing permissions and 17 | ** limitations under the License. 18 | */ 19 | 20 | /* Platform-specific types and definitions for OpenGL ES 2.X gl2.h 21 | * 22 | * Adopters may modify khrplatform.h and this file to suit their platform. 23 | * Please contribute modifications back to Khronos as pull requests on the 24 | * public github repository: 25 | * https://github.com/KhronosGroup/OpenGL-Registry 26 | */ 27 | 28 | #include 29 | 30 | #ifndef GL_APICALL 31 | #define GL_APICALL KHRONOS_APICALL 32 | #endif 33 | 34 | #ifndef GL_APIENTRY 35 | #define GL_APIENTRY KHRONOS_APIENTRY 36 | #endif 37 | 38 | #endif /* __gl2platform_h_ */ 39 | -------------------------------------------------------------------------------- /src/video/kmsdrm/SDL_kmsdrmevents.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | #include "../../SDL_internal.h" 23 | 24 | #ifndef SDL_kmsdrmevents_h_ 25 | #define SDL_kmsdrmevents_h_ 26 | 27 | extern void KMSDRM_PumpEvents(_THIS); 28 | extern void KMSDRM_EventInit(_THIS); 29 | extern void KMSDRM_EventQuit(_THIS); 30 | 31 | #endif /* SDL_kmsdrmevents_h_ */ 32 | -------------------------------------------------------------------------------- /src/video/nacl/SDL_naclevents_c.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | #include "../../SDL_internal.h" 22 | 23 | #ifndef SDL_naclevents_c_h_ 24 | #define SDL_naclevents_c_h_ 25 | 26 | #include "SDL_naclvideo.h" 27 | 28 | extern void NACL_PumpEvents(_THIS); 29 | 30 | #endif /* SDL_naclevents_c_h_ */ 31 | -------------------------------------------------------------------------------- /src/video/nacl/SDL_naclglue.c: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | #include "../../SDL_internal.h" 22 | 23 | #if SDL_VIDEO_DRIVER_NACL 24 | #endif /* SDL_VIDEO_DRIVER_NACL */ 25 | -------------------------------------------------------------------------------- /src/video/offscreen/SDL_offscreenevents_c.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | #include "../../SDL_internal.h" 23 | 24 | #include "SDL_offscreenvideo.h" 25 | 26 | extern void OFFSCREEN_PumpEvents(_THIS); 27 | 28 | /* vi: set ts=4 sw=4 expandtab: */ 29 | -------------------------------------------------------------------------------- /src/video/offscreen/SDL_offscreenvideo.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | #include "../../SDL_internal.h" 23 | 24 | #ifndef _SDL_offscreenvideo_h 25 | #define _SDL_offscreenvideo_h 26 | 27 | #include "../SDL_sysvideo.h" 28 | #include "../SDL_egl_c.h" 29 | 30 | #endif /* _SDL_offscreenvideo_h */ 31 | 32 | /* vi: set ts=4 sw=4 expandtab: */ 33 | -------------------------------------------------------------------------------- /src/video/os2/SDL_os2messagebox.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | #include "../../SDL_internal.h" 22 | 23 | #if SDL_VIDEO_DRIVER_OS2 24 | 25 | extern int OS2_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid); 26 | 27 | #endif /* SDL_VIDEO_DRIVER_OS2 */ 28 | 29 | /* vi: set ts=4 sw=4 expandtab: */ 30 | -------------------------------------------------------------------------------- /src/video/pandora/SDL_pandora_events.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | #include "../../SDL_internal.h" 22 | 23 | extern void PND_PumpEvents(_THIS); 24 | 25 | /* vi: set ts=4 sw=4 expandtab: */ 26 | -------------------------------------------------------------------------------- /src/video/psp/SDL_pspevents_c.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | #include "SDL_pspvideo.h" 23 | 24 | /* Variables and functions exported by SDL_sysevents.c to other parts 25 | of the native video subsystem (SDL_sysvideo.c) 26 | */ 27 | extern void PSP_InitOSKeymap(_THIS); 28 | extern void PSP_PumpEvents(_THIS); 29 | 30 | /* end of SDL_pspevents_c.h ... */ 31 | 32 | -------------------------------------------------------------------------------- /src/video/psp/SDL_pspmouse_c.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | #include "SDL_pspvideo.h" 23 | 24 | /* Functions to be exported */ 25 | -------------------------------------------------------------------------------- /src/video/raspberry/SDL_rpievents_c.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | #ifndef SDL_rpievents_c_h_ 23 | #define SDL_rpievents_c_h_ 24 | 25 | #include "SDL_rpivideo.h" 26 | 27 | void RPI_PumpEvents(_THIS); 28 | void RPI_EventInit(_THIS); 29 | void RPI_EventQuit(_THIS); 30 | 31 | #endif /* SDL_rpievents_c_h_ */ 32 | -------------------------------------------------------------------------------- /src/video/wayland/SDL_waylandmouse.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | #include "../../SDL_internal.h" 23 | #include "SDL_mouse.h" 24 | #include "SDL_waylandvideo.h" 25 | 26 | #if SDL_VIDEO_DRIVER_WAYLAND 27 | 28 | extern void Wayland_InitMouse(void); 29 | extern void Wayland_FiniMouse(void); 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /src/video/windows/SDL_windowsmessagebox.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | #include "../../SDL_internal.h" 22 | 23 | #if SDL_VIDEO_DRIVER_WINDOWS 24 | 25 | extern int WIN_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid); 26 | 27 | #endif /* SDL_VIDEO_DRIVER_WINDOWS */ 28 | 29 | /* vi: set ts=4 sw=4 expandtab: */ 30 | -------------------------------------------------------------------------------- /src/video/winrt/SDL_winrtmessagebox.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | #include "../../SDL_internal.h" 22 | 23 | #if SDL_VIDEO_DRIVER_WINRT 24 | 25 | extern int WINRT_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid); 26 | 27 | #endif /* SDL_VIDEO_DRIVER_WINRT */ 28 | 29 | /* vi: set ts=4 sw=4 expandtab: */ 30 | -------------------------------------------------------------------------------- /src/video/x11/SDL_x11events.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | #include "../../SDL_internal.h" 22 | 23 | #ifndef SDL_x11events_h_ 24 | #define SDL_x11events_h_ 25 | 26 | extern void X11_PumpEvents(_THIS); 27 | extern void X11_SuspendScreenSaver(_THIS); 28 | 29 | #endif /* SDL_x11events_h_ */ 30 | 31 | /* vi: set ts=4 sw=4 expandtab: */ 32 | -------------------------------------------------------------------------------- /src/video/x11/SDL_x11mouse.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | #include "../../SDL_internal.h" 22 | 23 | #ifndef SDL_x11mouse_h_ 24 | #define SDL_x11mouse_h_ 25 | 26 | extern void X11_InitMouse(_THIS); 27 | extern void X11_QuitMouse(_THIS); 28 | 29 | #endif /* SDL_x11mouse_h_ */ 30 | 31 | /* vi: set ts=4 sw=4 expandtab: */ 32 | -------------------------------------------------------------------------------- /src/video/x11/SDL_x11touch.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2021 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | #include "../../SDL_internal.h" 22 | 23 | #ifndef SDL_x11touch_h_ 24 | #define SDL_x11touch_h_ 25 | 26 | extern void X11_InitTouch(_THIS); 27 | extern void X11_QuitTouch(_THIS); 28 | extern void X11_ResetTouch(_THIS); 29 | 30 | #endif /* SDL_x11touch_h_ */ 31 | 32 | /* vi: set ts=4 sw=4 expandtab: */ 33 | -------------------------------------------------------------------------------- /test/COPYING: -------------------------------------------------------------------------------- 1 | 2 | The test programs in this directory tree are for demonstrating and 3 | testing the functionality of the SDL library, and are placed in the 4 | public domain. 5 | 6 | October 28, 1997 7 | -- 8 | Sam Lantinga (slouken@libsdl.org) 9 | -------------------------------------------------------------------------------- /test/autogen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Regenerate configuration files 4 | cp acinclude.m4 aclocal.m4 5 | found=false 6 | for autoconf in autoconf autoconf259 autoconf-2.59 7 | do if which $autoconf >/dev/null 2>&1; then $autoconf && found=true; break; fi 8 | done 9 | if test x$found = xfalse; then 10 | echo "Couldn't find autoconf, aborting" 11 | exit 1 12 | fi 13 | -------------------------------------------------------------------------------- /test/axis.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/test/axis.bmp -------------------------------------------------------------------------------- /test/button.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/test/button.bmp -------------------------------------------------------------------------------- /test/controllermap.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/test/controllermap.bmp -------------------------------------------------------------------------------- /test/controllermap_back.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/test/controllermap_back.bmp -------------------------------------------------------------------------------- /test/emscripten/joystick-pre.js: -------------------------------------------------------------------------------- 1 | Module['arguments'] = ['0']; 2 | //Gamepads don't appear until a button is pressed and the joystick/gamepad tests expect one to be connected 3 | Module['preRun'].push(function() 4 | { 5 | Module['print']("Waiting for gamepad..."); 6 | Module['addRunDependency']("gamepad"); 7 | window.addEventListener('gamepadconnected', function() 8 | { 9 | //OK, got one 10 | Module['removeRunDependency']("gamepad"); 11 | }, false); 12 | 13 | //chrome 14 | if(!!navigator.webkitGetGamepads) 15 | { 16 | var timeout = function() 17 | { 18 | if(navigator.webkitGetGamepads()[0] !== undefined) 19 | Module['removeRunDependency']("gamepad"); 20 | else 21 | setTimeout(timeout, 100); 22 | } 23 | setTimeout(timeout, 100); 24 | } 25 | }); 26 | -------------------------------------------------------------------------------- /test/icon.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/test/icon.bmp -------------------------------------------------------------------------------- /test/nacl/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | 11 | SDL NACL Test 12 | 13 | 14 | 15 |

SDL NACL Test

16 |

Status: NO-STATUS

17 | 19 |
20 | 21 | 22 | -------------------------------------------------------------------------------- /test/nacl/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "SDL testgles2", 3 | "version": "33.0.1750.117", 4 | "minimum_chrome_version": "33.0.1750.117", 5 | "manifest_version": 2, 6 | "description": "testgles2", 7 | "offline_enabled": true, 8 | "icons": { 9 | "128": "icon128.png" 10 | }, 11 | "app": { 12 | "background": { 13 | "scripts": ["background.js"] 14 | } 15 | }, 16 | "key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCMN716Qyu0l2EHNFqIJVqVysFcTR6urqhaGGqW4UK7slBaURz9+Sb1b4Ot5P1uQNE5c+CTU5Vu61wpqmSqMMxqHLWdPPMh8uRlyctsb2cxWwG6XoGSvpX29NsQVUFXd4v2tkJm3G9t+V0X8TYskrvWQmnyOW8OEIDvrBhUEfFxWQIDAQAB", 17 | "oauth2": { 18 | "client_id": "903965034255.apps.googleusercontent.com", 19 | "scopes": ["https://www.googleapis.com/auth/drive"] 20 | }, 21 | "permissions": [] 22 | } 23 | -------------------------------------------------------------------------------- /test/picture.xbm: -------------------------------------------------------------------------------- 1 | #define picture_width 32 2 | #define picture_height 32 3 | static char picture_bits[] = { 4 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x80, 0x01, 0x18, 5 | 0x64, 0x6f, 0xf6, 0x26, 0x0a, 0x00, 0x00, 0x50, 0xf2, 0xff, 0xff, 0x4f, 6 | 0x14, 0x04, 0x00, 0x28, 0x14, 0x0e, 0x00, 0x28, 0x10, 0x32, 0x00, 0x08, 7 | 0x94, 0x03, 0x00, 0x08, 0xf4, 0x04, 0x00, 0x08, 0xb0, 0x08, 0x00, 0x08, 8 | 0x34, 0x01, 0x00, 0x28, 0x34, 0x01, 0x00, 0x28, 0x12, 0x00, 0x40, 0x48, 9 | 0x12, 0x20, 0xa6, 0x48, 0x14, 0x50, 0x11, 0x29, 0x14, 0x50, 0x48, 0x2a, 10 | 0x10, 0x27, 0xac, 0x0e, 0xd4, 0x71, 0xe8, 0x0a, 0x74, 0x20, 0xa8, 0x0a, 11 | 0x14, 0x20, 0x00, 0x08, 0x10, 0x50, 0x00, 0x08, 0x14, 0x00, 0x00, 0x28, 12 | 0x14, 0x00, 0x00, 0x28, 0xf2, 0xff, 0xff, 0x4f, 0x0a, 0x00, 0x00, 0x50, 13 | 0x64, 0x6f, 0xf6, 0x26, 0x18, 0x80, 0x01, 0x18, 0x00, 0x00, 0x00, 0x00, 14 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; 15 | -------------------------------------------------------------------------------- /test/sample.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/test/sample.bmp -------------------------------------------------------------------------------- /test/sample.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/test/sample.wav -------------------------------------------------------------------------------- /test/shapes/p01_shape24.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/test/shapes/p01_shape24.bmp -------------------------------------------------------------------------------- /test/shapes/p01_shape32alpha.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/test/shapes/p01_shape32alpha.bmp -------------------------------------------------------------------------------- /test/shapes/p01_shape8.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/test/shapes/p01_shape8.bmp -------------------------------------------------------------------------------- /test/shapes/p02_shape24.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/test/shapes/p02_shape24.bmp -------------------------------------------------------------------------------- /test/shapes/p02_shape32alpha.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/test/shapes/p02_shape32alpha.bmp -------------------------------------------------------------------------------- /test/shapes/p02_shape8.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/test/shapes/p02_shape8.bmp -------------------------------------------------------------------------------- /test/shapes/p03_shape24.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/test/shapes/p03_shape24.bmp -------------------------------------------------------------------------------- /test/shapes/p03_shape8.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/test/shapes/p03_shape8.bmp -------------------------------------------------------------------------------- /test/shapes/p04_shape1.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/test/shapes/p04_shape1.bmp -------------------------------------------------------------------------------- /test/shapes/p04_shape24.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/test/shapes/p04_shape24.bmp -------------------------------------------------------------------------------- /test/shapes/p04_shape32alpha.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/test/shapes/p04_shape32alpha.bmp -------------------------------------------------------------------------------- /test/shapes/p04_shape8.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/test/shapes/p04_shape8.bmp -------------------------------------------------------------------------------- /test/shapes/p05_shape8.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/test/shapes/p05_shape8.bmp -------------------------------------------------------------------------------- /test/shapes/p06_shape1alpha.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/test/shapes/p06_shape1alpha.bmp -------------------------------------------------------------------------------- /test/shapes/p06_shape24.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/test/shapes/p06_shape24.bmp -------------------------------------------------------------------------------- /test/shapes/p06_shape32alpha.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/test/shapes/p06_shape32alpha.bmp -------------------------------------------------------------------------------- /test/shapes/p06_shape8.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/test/shapes/p06_shape8.bmp -------------------------------------------------------------------------------- /test/shapes/p07_shape24.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/test/shapes/p07_shape24.bmp -------------------------------------------------------------------------------- /test/shapes/p07_shape32alpha.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/test/shapes/p07_shape32alpha.bmp -------------------------------------------------------------------------------- /test/shapes/p07_shape8.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/test/shapes/p07_shape8.bmp -------------------------------------------------------------------------------- /test/shapes/p08_shape24.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/test/shapes/p08_shape24.bmp -------------------------------------------------------------------------------- /test/shapes/p08_shape32alpha.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/test/shapes/p08_shape32alpha.bmp -------------------------------------------------------------------------------- /test/shapes/p08_shape8.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/test/shapes/p08_shape8.bmp -------------------------------------------------------------------------------- /test/shapes/p09_shape24.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/test/shapes/p09_shape24.bmp -------------------------------------------------------------------------------- /test/shapes/p09_shape32alpha.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/test/shapes/p09_shape32alpha.bmp -------------------------------------------------------------------------------- /test/shapes/p09_shape8.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/test/shapes/p09_shape8.bmp -------------------------------------------------------------------------------- /test/shapes/p10_shape1.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/test/shapes/p10_shape1.bmp -------------------------------------------------------------------------------- /test/shapes/p10_shape24.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/test/shapes/p10_shape24.bmp -------------------------------------------------------------------------------- /test/shapes/p10_shape32alpha.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/test/shapes/p10_shape32alpha.bmp -------------------------------------------------------------------------------- /test/shapes/p10_shape8.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/test/shapes/p10_shape8.bmp -------------------------------------------------------------------------------- /test/shapes/p11_shape24.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/test/shapes/p11_shape24.bmp -------------------------------------------------------------------------------- /test/shapes/p11_shape32alpha.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/test/shapes/p11_shape32alpha.bmp -------------------------------------------------------------------------------- /test/shapes/p11_shape8.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/test/shapes/p11_shape8.bmp -------------------------------------------------------------------------------- /test/shapes/p12_shape24.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/test/shapes/p12_shape24.bmp -------------------------------------------------------------------------------- /test/shapes/p12_shape8.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/test/shapes/p12_shape8.bmp -------------------------------------------------------------------------------- /test/shapes/p13_shape24.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/test/shapes/p13_shape24.bmp -------------------------------------------------------------------------------- /test/shapes/p13_shape32alpha.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/test/shapes/p13_shape32alpha.bmp -------------------------------------------------------------------------------- /test/shapes/p13_shape8.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/test/shapes/p13_shape8.bmp -------------------------------------------------------------------------------- /test/shapes/p14_shape24.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/test/shapes/p14_shape24.bmp -------------------------------------------------------------------------------- /test/shapes/p14_shape8.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/test/shapes/p14_shape8.bmp -------------------------------------------------------------------------------- /test/shapes/p15_shape24.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/test/shapes/p15_shape24.bmp -------------------------------------------------------------------------------- /test/shapes/p15_shape32alpha.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/test/shapes/p15_shape32alpha.bmp -------------------------------------------------------------------------------- /test/shapes/p15_shape8.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/test/shapes/p15_shape8.bmp -------------------------------------------------------------------------------- /test/shapes/p16_shape1.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/test/shapes/p16_shape1.bmp -------------------------------------------------------------------------------- /test/shapes/p16_shape24.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/test/shapes/p16_shape24.bmp -------------------------------------------------------------------------------- /test/shapes/p16_shape8.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/test/shapes/p16_shape8.bmp -------------------------------------------------------------------------------- /test/shapes/trollface_24.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/test/shapes/trollface_24.bmp -------------------------------------------------------------------------------- /test/shapes/trollface_32alpha.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/test/shapes/trollface_32alpha.bmp -------------------------------------------------------------------------------- /test/testbounds.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1997-2021 Sam Lantinga 3 | 4 | This software is provided 'as-is', without any express or implied 5 | warranty. In no event will the authors be held liable for any damages 6 | arising from the use of this software. 7 | 8 | Permission is granted to anyone to use this software for any purpose, 9 | including commercial applications, and to alter it and redistribute it 10 | freely. 11 | */ 12 | 13 | #include "SDL.h" 14 | 15 | int main(int argc, char **argv) 16 | { 17 | int total, i; 18 | 19 | if (SDL_Init(SDL_INIT_VIDEO) < 0) { 20 | SDL_Log("SDL_Init(SDL_INIT_VIDEO) failed: %s", SDL_GetError()); 21 | return 1; 22 | } 23 | 24 | total = SDL_GetNumVideoDisplays(); 25 | for (i = 0; i < total; i++) { 26 | SDL_Rect bounds = { -1,-1,-1,-1 }, usable = { -1,-1,-1,-1 }; 27 | SDL_GetDisplayBounds(i, &bounds); 28 | SDL_GetDisplayUsableBounds(i, &usable); 29 | SDL_Log("Display #%d ('%s'): bounds={(%d,%d),%dx%d}, usable={(%d,%d),%dx%d}", 30 | i, SDL_GetDisplayName(i), 31 | bounds.x, bounds.y, bounds.w, bounds.h, 32 | usable.x, usable.y, usable.w, usable.h); 33 | } 34 | 35 | SDL_Quit(); 36 | return 0; 37 | } 38 | 39 | /* vi: set ts=4 sw=4 expandtab: */ 40 | 41 | -------------------------------------------------------------------------------- /test/testgles2_sdf_img_normal.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/test/testgles2_sdf_img_normal.bmp -------------------------------------------------------------------------------- /test/testgles2_sdf_img_sdf.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/test/testgles2_sdf_img_sdf.bmp -------------------------------------------------------------------------------- /test/testkeys.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1997-2021 Sam Lantinga 3 | 4 | This software is provided 'as-is', without any express or implied 5 | warranty. In no event will the authors be held liable for any damages 6 | arising from the use of this software. 7 | 8 | Permission is granted to anyone to use this software for any purpose, 9 | including commercial applications, and to alter it and redistribute it 10 | freely. 11 | */ 12 | 13 | /* Print out all the scancodes we have, just to verify them */ 14 | 15 | #include 16 | #include 17 | #include 18 | #include 19 | 20 | #include "SDL.h" 21 | 22 | int 23 | main(int argc, char *argv[]) 24 | { 25 | SDL_Scancode scancode; 26 | 27 | /* Enable standard application logging */ 28 | SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); 29 | 30 | if (SDL_Init(SDL_INIT_VIDEO) < 0) { 31 | SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't initialize SDL: %s\n", SDL_GetError()); 32 | exit(1); 33 | } 34 | for (scancode = 0; scancode < SDL_NUM_SCANCODES; ++scancode) { 35 | SDL_Log("Scancode #%d, \"%s\"\n", scancode, 36 | SDL_GetScancodeName(scancode)); 37 | } 38 | SDL_Quit(); 39 | return (0); 40 | } 41 | -------------------------------------------------------------------------------- /test/testurl.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1997-2021 Sam Lantinga 3 | 4 | This software is provided 'as-is', without any express or implied 5 | warranty. In no event will the authors be held liable for any damages 6 | arising from the use of this software. 7 | 8 | Permission is granted to anyone to use this software for any purpose, 9 | including commercial applications, and to alter it and redistribute it 10 | freely. 11 | */ 12 | #include "SDL.h" 13 | 14 | int main(int argc, char **argv) 15 | { 16 | int i; 17 | if (SDL_Init(SDL_INIT_VIDEO) == -1) { 18 | SDL_Log("SDL_Init failed: %s\n", SDL_GetError()); 19 | return 1; 20 | } 21 | 22 | for (i = 1; i < argc; i++) { 23 | const char *url = argv[i]; 24 | SDL_Log("Opening '%s' ...", url); 25 | if (SDL_OpenURL(url) == 0) { 26 | SDL_Log(" success!"); 27 | } else { 28 | SDL_Log(" failed! %s", SDL_GetError()); 29 | } 30 | } 31 | 32 | SDL_Quit(); 33 | return 0; 34 | } 35 | 36 | /* vi: set ts=4 sw=4 expandtab: */ 37 | -------------------------------------------------------------------------------- /test/testyuv.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/test/testyuv.bmp -------------------------------------------------------------------------------- /test/testyuv_cvt.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1997-2021 Sam Lantinga 3 | 4 | This software is provided 'as-is', without any express or implied 5 | warranty. In no event will the authors be held liable for any damages 6 | arising from the use of this software. 7 | 8 | Permission is granted to anyone to use this software for any purpose, 9 | including commercial applications, and to alter it and redistribute it 10 | freely. 11 | */ 12 | 13 | /* These functions are designed for testing correctness, not for speed */ 14 | 15 | extern SDL_bool ConvertRGBtoYUV(Uint32 format, Uint8 *src, int pitch, Uint8 *out, int w, int h, SDL_YUV_CONVERSION_MODE mode, int monochrome, int luminance); 16 | extern int CalculateYUVPitch(Uint32 format, int width); 17 | -------------------------------------------------------------------------------- /test/utf8.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Daft-Freak/SDL-emscripten/15d3924ab55ad9a732df341ad3791da272b55924/test/utf8.txt -------------------------------------------------------------------------------- /visualtest/COPYING.txt: -------------------------------------------------------------------------------- 1 | Visual and Interactive Test Automation for SDL 2.0 2 | Copyright (C) 2013 Apoorv Upreti 3 | 4 | This software is provided 'as-is', without any express or implied 5 | warranty. In no event will the authors be held liable for any damages 6 | arising from the use of this software. 7 | 8 | Permission is granted to anyone to use this software for any purpose, 9 | including commercial applications, and to alter it and redistribute it 10 | freely, subject to the following restrictions: 11 | 12 | 1. The origin of this software must not be misrepresented; you must not 13 | claim that you wrote the original software. If you use this software 14 | in a product, an acknowledgment in the product documentation would be 15 | appreciated but is not required. 16 | 2. Altered source versions must be plainly marked as such, and must not be 17 | misrepresented as being the original software. 18 | 3. This notice may not be removed or altered from any source distribution. 19 | -------------------------------------------------------------------------------- /visualtest/Makefile.in: -------------------------------------------------------------------------------- 1 | # Makefile to build the SDL tests 2 | srcdir = @srcdir@ 3 | CC = @CC@ 4 | EXE = @EXE@ 5 | CFLAGS = @CFLAGS@ -I../include -I./include 6 | LIBS = @LIBS@ 7 | TARGETS = \ 8 | testharness$(EXE) \ 9 | testquit$(EXE) 10 | all: Makefile $(TARGETS) 11 | Makefile: $(srcdir)/Makefile.in 12 | $(SHELL) config.status $@ 13 | testharness$(EXE): $(srcdir)/src/action_configparser.c \ 14 | $(srcdir)/src/harness_argparser.c \ 15 | $(srcdir)/src/rwhelper.c \ 16 | $(srcdir)/src/testharness.c \ 17 | $(srcdir)/src/variator_exhaustive.c \ 18 | $(srcdir)/src/variators.c \ 19 | $(srcdir)/src/screenshot.c \ 20 | $(srcdir)/src/harness_argparser.c \ 21 | $(srcdir)/src/sut_configparser.c \ 22 | $(srcdir)/src/variator_common.c \ 23 | $(srcdir)/src/variator_random.c \ 24 | $(srcdir)/src/parsehelper.c \ 25 | $(srcdir)/src/mischelper.c \ 26 | $(srcdir)/src/linux/linux_process.c \ 27 | $(srcdir)/src/windows/windows_process.c \ 28 | $(srcdir)/src/windows/windows_screenshot.c 29 | $(CC) -o $@ $^ $(CFLAGS) $(LIBS) 30 | testquit$(EXE): $(srcdir)/unittest/testquit.c 31 | $(CC) -o $@ $^ $(CFLAGS) $(LIBS) 32 | clean: 33 | rm -f $(TARGETS) 34 | distclean: clean 35 | rm -f Makefile 36 | rm -f config.status config.cache config.log 37 | rm -rf $(srcdir)/autom4te* 38 | -------------------------------------------------------------------------------- /visualtest/autogen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Regenerate configuration files 4 | cp acinclude.m4 aclocal.m4 5 | found=false 6 | for autoconf in autoconf autoconf259 autoconf-2.59 7 | do if which $autoconf >/dev/null 2>&1; then $autoconf && found=true; break; fi 8 | done 9 | if test x$found = xfalse; then 10 | echo "Couldn't find autoconf, aborting" 11 | exit 1 12 | fi 13 | -------------------------------------------------------------------------------- /visualtest/compile: -------------------------------------------------------------------------------- 1 | /usr/share/automake-1.11/compile -------------------------------------------------------------------------------- /visualtest/config.h: -------------------------------------------------------------------------------- 1 | /* config.h. Generated from config.h.in by configure. */ 2 | /* config.h.in. Generated from configure.in by autoheader. */ 3 | 4 | /* Define to the address where bug reports for this package should be sent. */ 5 | #define PACKAGE_BUGREPORT "apoorvupreti@gmail.com" 6 | 7 | /* Define to the full name of this package. */ 8 | #define PACKAGE_NAME "sdlvisualtest" 9 | 10 | /* Define to the full name and version of this package. */ 11 | #define PACKAGE_STRING "sdlvisualtest 0.01" 12 | 13 | /* Define to the one symbol short name of this package. */ 14 | #define PACKAGE_TARNAME "sdlvisualtest" 15 | 16 | /* Define to the home page for this package. */ 17 | #define PACKAGE_URL "" 18 | 19 | /* Define to the version of this package. */ 20 | #define PACKAGE_VERSION "0.01" 21 | 22 | /* Define to empty if `const' does not conform to ANSI C. */ 23 | /* #undef const */ 24 | -------------------------------------------------------------------------------- /visualtest/config.h.in: -------------------------------------------------------------------------------- 1 | /* config.h.in. Generated from configure.in by autoheader. */ 2 | 3 | /* Define to the address where bug reports for this package should be sent. */ 4 | #undef PACKAGE_BUGREPORT 5 | 6 | /* Define to the full name of this package. */ 7 | #undef PACKAGE_NAME 8 | 9 | /* Define to the full name and version of this package. */ 10 | #undef PACKAGE_STRING 11 | 12 | /* Define to the one symbol short name of this package. */ 13 | #undef PACKAGE_TARNAME 14 | 15 | /* Define to the home page for this package. */ 16 | #undef PACKAGE_URL 17 | 18 | /* Define to the version of this package. */ 19 | #undef PACKAGE_VERSION 20 | 21 | /* Define to empty if `const' does not conform to ANSI C. */ 22 | #undef const 23 | -------------------------------------------------------------------------------- /visualtest/configs/testsprite2_blendmodes/testsprite2_blendmodes.actions: -------------------------------------------------------------------------------- 1 | 00:00:03 SCREENSHOT 2 | 00:00:06 VERIFY 3 | 00:00:09 QUIT -------------------------------------------------------------------------------- /visualtest/configs/testsprite2_blendmodes/testsprite2_blendmodes.config: -------------------------------------------------------------------------------- 1 | parameter-config=testsprite2_blendmodes.parameters 2 | variator=exhaustive 3 | sutapp=testsprite2 4 | timeout=00:00:15 5 | action-config=testsprite2_blendmodes.actions -------------------------------------------------------------------------------- /visualtest/configs/testsprite2_blendmodes/testsprite2_blendmodes.parameters: -------------------------------------------------------------------------------- 1 | # parameter name, type, value range, required, categories 2 | --blend, enum, [none blend add mod], false, [] 3 | --cyclecolor, boolean, [], false, [] 4 | --cyclealpha, boolean, [], false, [] 5 | --iterations, integer, [1000 1000], true, [] -------------------------------------------------------------------------------- /visualtest/configs/testsprite2_crashtest/testsprite2_crashtest.actions: -------------------------------------------------------------------------------- 1 | 00:00:02 QUIT -------------------------------------------------------------------------------- /visualtest/configs/testsprite2_crashtest/testsprite2_crashtest.config: -------------------------------------------------------------------------------- 1 | parameter-config=testsprite2_crashtest.parameters 2 | variator=exhaustive 3 | sutapp=testsprite2 4 | timeout=00:00:10 5 | action-config=testsprite2_crashtest.actions -------------------------------------------------------------------------------- /visualtest/configs/testsprite2_crashtest/testsprite2_crashtest.parameters: -------------------------------------------------------------------------------- 1 | # parameter name, type, value range, required, categories 2 | --display, integer, [1 5], false, [] 3 | --fullscreen, boolean, [], false, [] 4 | --fullscreen-desktop, boolean, [], false, [] 5 | --title, enum, [vartest bartest footest], false, [] 6 | --icon, enum, [icon.bmp], false, [] 7 | --center, boolean, [], false, [] 8 | --position, enum, [300,300], false, [] 9 | --geometry, enum, [500x500], false, [] 10 | --min-geometry, enum, [100x100 200x200], false, [] 11 | --max-geometry, enum, [600x600 700x700], false, [] 12 | --logical, enum, [500x500 550x450], false, [] 13 | --scale, integer, [1 5], false, [] 14 | --depth, integer, [1 5], false, [] 15 | --refresh, integer, [1 5], false, [] 16 | --vsync, boolean, [], false, [] 17 | --noframe, boolean, [], false, [] 18 | --resize, boolean, [], false, [] 19 | --minimize, boolean, [], false, [] 20 | --maximize, boolean, [], false, [] 21 | --grab, boolean, [], false, [mouse] 22 | --blend, enum, [none blend add mod], false, [] 23 | --cyclecolor, boolean, [], false, [] 24 | --cyclealpha, boolean, [], false, [] -------------------------------------------------------------------------------- /visualtest/configs/testsprite2_fullscreen/testsprite2_fullscreen.actions: -------------------------------------------------------------------------------- 1 | 00:00:03 SCREENSHOT 2 | 00:00:06 VERIFY 3 | 00:00:09 QUIT -------------------------------------------------------------------------------- /visualtest/configs/testsprite2_fullscreen/testsprite2_fullscreen.config: -------------------------------------------------------------------------------- 1 | parameter-config=testsprite2_fullscreen.parameters 2 | variator=exhaustive 3 | sutapp=testsprite2 4 | timeout=00:00:15 5 | action-config=testsprite2_fullscreen.actions -------------------------------------------------------------------------------- /visualtest/configs/testsprite2_fullscreen/testsprite2_fullscreen.parameters: -------------------------------------------------------------------------------- 1 | # parameter name, type, value range, required, categories 2 | --blend, enum, [none blend add mod], false, [] 3 | --fullscreen, boolean, [], false, [] 4 | --fullscreen-desktop, boolean, [], false, [] 5 | --iterations, integer, [1000 1000], true, [] -------------------------------------------------------------------------------- /visualtest/configs/testsprite2_geometry/testsprite2_geometry.actions: -------------------------------------------------------------------------------- 1 | 00:00:03 SCREENSHOT 2 | 00:00:06 VERIFY 3 | 00:00:09 QUIT -------------------------------------------------------------------------------- /visualtest/configs/testsprite2_geometry/testsprite2_geometry.config: -------------------------------------------------------------------------------- 1 | parameter-config=testsprite2_geometry.parameters 2 | variator=exhaustive 3 | sutapp=testsprite2 4 | timeout=00:00:15 5 | action-config=testsprite2_geometry.actions -------------------------------------------------------------------------------- /visualtest/configs/testsprite2_geometry/testsprite2_geometry.parameters: -------------------------------------------------------------------------------- 1 | # parameter name, type, value range, required, categories 2 | --geometry, enum, [500x500 600x600], false, [] 3 | --logical, enum, [300x500 550x450], false, [] 4 | --scale, integer, [1 5], false, [] 5 | --iterations, integer, [1000 1000], true, [] -------------------------------------------------------------------------------- /visualtest/depcomp: -------------------------------------------------------------------------------- 1 | /usr/share/automake-1.11/depcomp -------------------------------------------------------------------------------- /visualtest/include/SDL_visualtest_mischelper.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file mischelper.c 3 | * 4 | * Header with miscellaneous helper functions. 5 | */ 6 | 7 | #ifndef SDL_visualtest_mischelper_h_ 8 | #define SDL_visualtest_mischelper_h_ 9 | 10 | /* Set up for C function definitions, even when using C++ */ 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | /** 16 | * Stores a 32 digit hexadecimal string representing the MD5 hash of the 17 | * string \c str in \c hash. 18 | */ 19 | void SDLVisualTest_HashString(char* str, char hash[33]); 20 | 21 | /* Ends C function definitions when using C++ */ 22 | #ifdef __cplusplus 23 | } 24 | #endif 25 | 26 | #endif /* SDL_visualtest_mischelper_h_ */ 27 | 28 | /* vi: set ts=4 sw=4 expandtab: */ 29 | -------------------------------------------------------------------------------- /visualtest/install-sh: -------------------------------------------------------------------------------- 1 | /usr/share/automake-1.11/install-sh -------------------------------------------------------------------------------- /visualtest/launch_harness.cmd: -------------------------------------------------------------------------------- 1 | start /wait testharness.exe --config testsprite2_crashtest.config > testrun.log 2>&1 2 | if %ERRORLEVEL% NEQ 0 echo TEST RUN FAILED (see testrun.log) -------------------------------------------------------------------------------- /visualtest/launch_harness.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ./testharness.exe --config testsprite2_crashtest.config > testrun.log 2>&1 3 | if [ "$?" != "0" ]; then 4 | echo TEST RUN FAILED (see testrun.log) 5 | # report error code to CI 6 | fi -------------------------------------------------------------------------------- /visualtest/missing: -------------------------------------------------------------------------------- 1 | /usr/share/automake-1.11/missing -------------------------------------------------------------------------------- /visualtest/src/mischelper.c: -------------------------------------------------------------------------------- 1 | /** 2 | * \file mischelper.c 3 | * 4 | * Source file with miscellaneous helper functions. 5 | */ 6 | 7 | #include 8 | 9 | void 10 | SDLVisualTest_HashString(char* str, char hash[33]) 11 | { 12 | SDLTest_Md5Context md5c; 13 | int i; 14 | 15 | if(!str) 16 | { 17 | SDLTest_LogError("str argument cannot be NULL"); 18 | return; 19 | } 20 | 21 | SDLTest_Md5Init(&md5c); 22 | SDLTest_Md5Update(&md5c, (unsigned char*)str, SDL_strlen(str)); 23 | SDLTest_Md5Final(&md5c); 24 | 25 | /* convert the md5 hash to an array of hexadecimal digits */ 26 | for(i = 0; i < 16; i++) 27 | SDL_snprintf(hash + 2 * i, 33 - 2 * i, "%02x", (int)md5c.digest[i]); 28 | } -------------------------------------------------------------------------------- /visualtest/stamp-h1: -------------------------------------------------------------------------------- 1 | timestamp for config.h 2 | -------------------------------------------------------------------------------- /visualtest/testsprite2_sample.actions: -------------------------------------------------------------------------------- 1 | 00:00:02 SCREENSHOT # Take a screenshot of each window owned by the SUT process 2 | 00:00:05 VERIFY # Verify each screenshot taken with verification images 3 | 00:00:10 QUIT # Gracefully quit the SUT process -------------------------------------------------------------------------------- /visualtest/testsprite2_sample.config: -------------------------------------------------------------------------------- 1 | parameter-config=testsprite2_sample.parameters 2 | num-variations=10 3 | variator=random 4 | sutapp=testsprite2 5 | timeout=00:00:20 6 | action-config=testsprite2_sample.actions -------------------------------------------------------------------------------- /visualtest/unittest/testquit.actions: -------------------------------------------------------------------------------- 1 | 00:00:05 QUIT -------------------------------------------------------------------------------- /visualtest/unittest/testquit.config: -------------------------------------------------------------------------------- 1 | sutconfig=testquit.parameters 2 | action-config=testquit.actions 3 | variator=exhaustive 4 | sutapp=testquit 5 | timeout=00:00:10 -------------------------------------------------------------------------------- /visualtest/unittest/testquit.parameters: -------------------------------------------------------------------------------- 1 | --exit-code, integer, [-1 1], false, [] # The exit code returned by the executable 2 | --crash, boolean, [], false, [] # Crashes the SUT executable 3 | --hang, boolean, [], false, [] # Runs the SUT in the infinite loop and ignores all events --------------------------------------------------------------------------------