├── .clang-format ├── .editorconfig ├── .github ├── PULL_REQUEST_TEMPLATE.md ├── cmake │ └── CMakeLists.txt └── workflows │ ├── android.yml │ ├── cpactions.yml │ ├── emscripten.yml │ ├── ios.yml │ ├── main.yml │ ├── msvc.yml │ ├── n3ds.yml │ ├── ps2.yaml │ ├── psp.yaml │ ├── riscos.yml │ ├── vita.yaml │ └── watcom.yml ├── .gitignore ├── .wikiheaders-options ├── Android.mk ├── BUGS.txt ├── CMakeLists.txt ├── CREDITS.txt ├── INSTALL.txt ├── LICENSE.txt ├── Makefile.in ├── Makefile.minimal ├── Makefile.os2 ├── Makefile.pandora ├── Makefile.w32 ├── README-SDL.txt ├── README.md ├── SDL2.spec.in ├── SDL2Config.cmake.in ├── TODO.txt ├── VisualC-GDK ├── SDL.sln ├── SDL │ ├── SDL.vcxproj │ └── SDL.vcxproj.filters ├── SDLmain │ └── SDLmain.vcxproj ├── SDLtest │ └── SDLtest.vcxproj ├── clean.sh ├── logos │ ├── Logo100x100.png │ ├── Logo150x150.png │ ├── Logo44x44.png │ ├── Logo480x480.png │ └── SplashScreenImage.png └── tests │ ├── testgamecontroller │ ├── PackageLayout.xml │ ├── testgamecontroller.vcxproj │ ├── testgamecontroller.vcxproj.filters │ ├── wingdk │ │ └── MicrosoftGame.config │ ├── xboxone │ │ └── MicrosoftGame.config │ └── xboxseries │ │ └── MicrosoftGame.config │ ├── testgdk │ ├── PackageLayout.xml │ ├── src │ │ └── testgdk.cpp │ ├── testgdk.vcxproj │ ├── testgdk.vcxproj.filters │ ├── wingdk │ │ └── MicrosoftGame.config │ ├── xboxone │ │ └── MicrosoftGame.config │ └── xboxseries │ │ └── MicrosoftGame.config │ └── testsprite2 │ ├── PackageLayout.xml │ ├── testsprite2.vcxproj │ ├── testsprite2.vcxproj.filters │ ├── wingdk │ └── MicrosoftGame.config │ ├── xboxone │ └── MicrosoftGame.config │ └── xboxseries │ └── MicrosoftGame.config ├── VisualC-WinRT ├── SDL-UWP.sln ├── SDL-UWP.vcxproj └── SDL-UWP.vcxproj.filters ├── VisualC ├── SDL.sln ├── SDL │ ├── SDL.vcxproj │ └── SDL.vcxproj.filters ├── SDLmain │ └── SDLmain.vcxproj ├── SDLtest │ └── SDLtest.vcxproj ├── clean.sh ├── pkg-support │ └── cmake │ │ ├── sdl2-config-version.cmake │ │ └── sdl2-config.cmake ├── 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 │ ├── testsurround │ │ └── testsurround.vcxproj │ ├── testvulkan │ │ └── testvulkan.vcxproj │ ├── testwm2 │ │ └── testwm2.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 │ ├── README │ ├── config.xcconfig │ ├── 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 ├── Xcode ├── SDL │ ├── Info-Framework.plist │ ├── SDL.xcodeproj │ │ ├── project.pbxproj │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ ├── Framework-iOS.xcscheme │ │ │ └── xcFramework-iOS.xcscheme │ ├── SDL2 │ │ └── Info.plist │ └── pkg-support │ │ ├── SDL.info │ │ ├── resources │ │ ├── CMake │ │ │ ├── sdl2-config-version.cmake │ │ │ └── sdl2-config.cmake │ │ ├── License.txt │ │ ├── ReadMe.txt │ │ └── SDL_DS_Store │ │ └── sdl_logo.pdf ├── SDLTest │ ├── SDLTest.xcodeproj │ │ └── project.pbxproj │ ├── TestDropFile-Info.plist │ └── config.xcconfig └── XcodeDocSet │ └── Doxyfile ├── acinclude ├── ac_check_define.m4 ├── alsa.m4 ├── ax_check_compiler_flags.m4 ├── ax_compute_relative_paths.m4 ├── ax_gcc_archflag.m4 ├── ax_gcc_x86_cpuid.m4 ├── ax_normalize_path.m4 ├── ax_recursive_eval.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 │ │ │ └── SDLSurface.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 ├── android-prefab.sh ├── androidbuild.sh ├── androidbuildlibs.sh ├── checker-buildbot.sh ├── clang++-fat.sh ├── clang-fat.sh ├── clang-format-src.sh ├── codechecker-buildbot.sh ├── config.guess ├── config.sub ├── emscripten-buildbot.sh ├── fnsince.pl ├── gen_audio_channel_conversion.c ├── gen_audio_resampler_filter.c ├── git-pre-push-hook.pl ├── install-sh ├── ltmain.sh ├── mkinstalldirs ├── nacl-buildbot.sh ├── naclbuild.sh ├── raspberrypi-buildbot.sh ├── showrev.sh ├── strip_fPIC.sh ├── test-versioning.sh ├── update-copyright.sh ├── update-version.sh ├── updaterev.sh ├── wikiheaders.pl └── windows-buildbot-zipper.bat ├── cmake ├── CheckCPUArchitecture.cmake ├── macros.cmake ├── sdlchecks.cmake ├── sdlfind.cmake ├── sdlplatform.cmake └── test │ ├── CMakeLists.txt │ ├── jni │ └── Android.mk │ ├── main_cli.c │ ├── main_gui.c │ ├── main_lib.c │ ├── test_pkgconfig.sh │ └── test_sdlconfig.sh ├── cmake_uninstall.cmake.in ├── configure ├── configure.ac ├── docs ├── CONTRIBUTING.md ├── README-android.md ├── README-cmake.md ├── README-directfb.md ├── README-dynapi.md ├── README-emscripten.md ├── README-gdk.md ├── README-gesture.md ├── README-git.md ├── README-hg.md ├── README-ios.md ├── README-kmsbsd.md ├── README-linux.md ├── README-macos.md ├── README-n3ds.md ├── README-nacl.md ├── README-ngage.md ├── README-os2.md ├── README-pandora.md ├── README-platforms.md ├── README-porting.md ├── README-ps2.md ├── README-psp.md ├── README-raspberrypi.md ├── README-riscos.md ├── README-touch.md ├── README-versions.md ├── README-visualc.md ├── README-vita.md ├── README-wince.md ├── README-windows.md ├── README-winrt.md ├── README.md ├── doxyfile └── release_checklist.md ├── 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_emscripten.h ├── SDL_config_iphoneos.h ├── SDL_config_macosx.h ├── SDL_config_minimal.h ├── SDL_config_ngage.h ├── SDL_config_os2.h ├── SDL_config_pandora.h ├── SDL_config_windows.h ├── SDL_config_wingdk.h ├── SDL_config_winrt.h ├── SDL_config_xbox.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_guid.h ├── SDL_haptic.h ├── SDL_hidapi.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_revision.h.cmake ├── 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 ├── mingw └── pkg-support │ └── cmake │ ├── sdl2-config-version.cmake │ └── sdl2-config.cmake ├── 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_guid.c ├── SDL_hints.c ├── SDL_hints_c.h ├── SDL_internal.h ├── SDL_list.c ├── SDL_list.h ├── SDL_log.c ├── SDL_log_c.h ├── SDL_utils.c ├── SDL_utils_c.h ├── atomic │ ├── SDL_atomic.c │ └── SDL_spinlock.c ├── audio │ ├── SDL_audio.c │ ├── SDL_audio_c.h │ ├── SDL_audio_channel_converters.h │ ├── SDL_audio_resampler_filter.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 │ ├── aaudio │ │ ├── SDL_aaudio.c │ │ ├── SDL_aaudio.h │ │ └── SDL_aaudiofuncs.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 │ ├── n3ds │ │ ├── SDL_n3dsaudio.c │ │ └── SDL_n3dsaudio.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 │ ├── pipewire │ │ ├── SDL_pipewire.c │ │ └── SDL_pipewire.h │ ├── ps2 │ │ ├── SDL_ps2audio.c │ │ └── SDL_ps2audio.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 │ ├── vita │ │ ├── SDL_vitaaudio.c │ │ └── SDL_vitaaudio.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 │ ├── freebsd │ │ ├── SDL_evdev_kbd_default_keyaccmap.h │ │ └── SDL_evdev_kbd_freebsd.c │ ├── gdk │ │ ├── SDL_gdk.cpp │ │ └── SDL_gdk.h │ ├── 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_sandbox.c │ │ ├── SDL_sandbox.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 │ │ └── iconv2.lbc │ ├── unix │ │ ├── SDL_poll.c │ │ └── SDL_poll.h │ ├── windows │ │ ├── SDL_directx.h │ │ ├── SDL_hid.c │ │ ├── SDL_hid.h │ │ ├── SDL_immdevice.c │ │ ├── SDL_immdevice.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 │ ├── SDL2.exports │ ├── 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_keysym_to_scancode.c │ ├── SDL_keysym_to_scancode_c.h │ ├── SDL_mouse.c │ ├── SDL_mouse_c.h │ ├── SDL_quit.c │ ├── SDL_scancode_tables.c │ ├── SDL_scancode_tables_c.h │ ├── SDL_touch.c │ ├── SDL_touch_c.h │ ├── SDL_windowevents.c │ ├── SDL_windowevents_c.h │ ├── blank_cursor.h │ ├── default_cursor.h │ ├── imKStoUCS.c │ ├── imKStoUCS.h │ ├── scancodes_ascii.h │ ├── scancodes_darwin.h │ ├── scancodes_linux.h │ ├── scancodes_windows.h │ └── scancodes_xfree86.h ├── file │ ├── SDL_rwops.c │ ├── cocoa │ │ ├── SDL_rwopsbundlesupport.h │ │ └── SDL_rwopsbundlesupport.m │ └── n3ds │ │ ├── SDL_rwopsromfs.c │ │ └── SDL_rwopsromfs.h ├── filesystem │ ├── android │ │ └── SDL_sysfilesystem.c │ ├── cocoa │ │ └── SDL_sysfilesystem.m │ ├── dummy │ │ └── SDL_sysfilesystem.c │ ├── emscripten │ │ └── SDL_sysfilesystem.c │ ├── haiku │ │ └── SDL_sysfilesystem.cc │ ├── n3ds │ │ └── SDL_sysfilesystem.c │ ├── nacl │ │ └── SDL_sysfilesystem.c │ ├── os2 │ │ └── SDL_sysfilesystem.c │ ├── ps2 │ │ └── SDL_sysfilesystem.c │ ├── psp │ │ └── SDL_sysfilesystem.c │ ├── riscos │ │ └── SDL_sysfilesystem.c │ ├── unix │ │ └── SDL_sysfilesystem.c │ ├── vita │ │ └── 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_c.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_list.h │ ├── controller_type.c │ ├── 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_combined.c │ │ ├── SDL_hidapi_gamecube.c │ │ ├── SDL_hidapi_luna.c │ │ ├── SDL_hidapi_nintendo.h │ │ ├── SDL_hidapi_ps3.c │ │ ├── SDL_hidapi_ps4.c │ │ ├── SDL_hidapi_ps5.c │ │ ├── SDL_hidapi_rumble.c │ │ ├── SDL_hidapi_rumble.h │ │ ├── SDL_hidapi_shield.c │ │ ├── SDL_hidapi_stadia.c │ │ ├── SDL_hidapi_steam.c │ │ ├── SDL_hidapi_switch.c │ │ ├── SDL_hidapi_wii.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 │ ├── n3ds │ │ └── SDL_sysjoystick.c │ ├── os2 │ │ └── SDL_os2joystick.c │ ├── ps2 │ │ └── SDL_sysjoystick.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 │ ├── vita │ │ └── SDL_sysjoystick.c │ └── windows │ │ ├── SDL_dinputjoystick.c │ │ ├── SDL_dinputjoystick_c.h │ │ ├── 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 │ ├── n3ds │ │ └── SDL_syslocale.c │ ├── unix │ │ └── SDL_syslocale.c │ ├── vita │ │ └── SDL_syslocale.c │ ├── windows │ │ └── SDL_syslocale.c │ └── winrt │ │ └── SDL_syslocale.c ├── main │ ├── android │ │ └── SDL_android_main.c │ ├── dummy │ │ └── SDL_dummy_main.c │ ├── gdk │ │ └── SDL_gdk_main.c │ ├── haiku │ │ ├── SDL_BApp.h │ │ ├── SDL_BeApp.cc │ │ └── SDL_BeApp.h │ ├── n3ds │ │ └── SDL_n3ds_main.c │ ├── nacl │ │ └── SDL_nacl_main.c │ ├── ngage │ │ └── SDL_ngage_main.cpp │ ├── ps2 │ │ └── SDL_ps2_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 │ ├── emscripten │ │ └── SDL_sysurl.c │ ├── haiku │ │ └── SDL_sysurl.cc │ ├── ios │ │ └── SDL_sysurl.m │ ├── macosx │ │ └── SDL_sysurl.m │ ├── riscos │ │ └── SDL_sysurl.c │ ├── unix │ │ └── SDL_sysurl.c │ ├── vita │ │ └── 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 │ ├── n3ds │ │ └── SDL_syspower.c │ ├── psp │ │ └── SDL_syspower.c │ ├── uikit │ │ ├── SDL_syspower.h │ │ └── SDL_syspower.m │ ├── vita │ │ └── SDL_syspower.c │ ├── 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 │ ├── direct3d12 │ │ ├── SDL_render_d3d12.c │ │ ├── SDL_render_d3d12_xbox.cpp │ │ ├── SDL_render_d3d12_xbox.h │ │ ├── SDL_shaders_d3d12.c │ │ ├── SDL_shaders_d3d12.h │ │ ├── SDL_shaders_d3d12_xboxone.cpp │ │ └── SDL_shaders_d3d12_xboxseries.cpp │ ├── 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 │ ├── ps2 │ │ └── SDL_render_ps2.c │ ├── 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 │ │ ├── SDL_triangle.c │ │ └── SDL_triangle.h │ └── vitagxm │ │ ├── SDL_render_vita_gxm.c │ │ ├── SDL_render_vita_gxm_memory.c │ │ ├── SDL_render_vita_gxm_memory.h │ │ ├── SDL_render_vita_gxm_shaders.h │ │ ├── SDL_render_vita_gxm_tools.c │ │ ├── SDL_render_vita_gxm_tools.h │ │ ├── SDL_render_vita_gxm_types.h │ │ └── shader_src │ │ ├── clear_f.cg │ │ ├── clear_v.cg │ │ ├── color_f.cg │ │ ├── color_v.cg │ │ ├── texture_f.cg │ │ └── texture_v.cg ├── 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 │ ├── n3ds │ │ └── SDL_n3dssensor.c │ ├── vita │ │ ├── SDL_vitasensor.c │ │ └── SDL_vitasensor.h │ └── windows │ │ ├── SDL_windowssensor.c │ │ └── SDL_windowssensor.h ├── stdlib │ ├── SDL_crc16.c │ ├── SDL_crc32.c │ ├── SDL_getenv.c │ ├── SDL_iconv.c │ ├── SDL_malloc.c │ ├── SDL_mslibc.c │ ├── SDL_qsort.c │ ├── SDL_stdlib.c │ ├── SDL_string.c │ ├── SDL_strtokr.c │ └── SDL_vacopy.h ├── 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 │ ├── n3ds │ │ ├── SDL_syscond.c │ │ ├── SDL_sysmutex.c │ │ ├── SDL_sysmutex_c.h │ │ ├── SDL_syssem.c │ │ ├── SDL_systhread.c │ │ └── SDL_systhread_c.h │ ├── ngage │ │ ├── SDL_sysmutex.cpp │ │ ├── SDL_syssem.cpp │ │ ├── SDL_systhread.cpp │ │ └── SDL_systhread_c.h │ ├── os2 │ │ ├── SDL_sysmutex.c │ │ ├── SDL_syssem.c │ │ ├── SDL_systhread.c │ │ ├── SDL_systhread_c.h │ │ ├── SDL_systls.c │ │ └── SDL_systls_c.h │ ├── ps2 │ │ ├── SDL_syssem.c │ │ ├── SDL_systhread.c │ │ └── SDL_systhread_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 │ ├── vita │ │ ├── SDL_syscond.c │ │ ├── SDL_sysmutex.c │ │ ├── SDL_sysmutex_c.h │ │ ├── SDL_syssem.c │ │ ├── SDL_systhread.c │ │ └── SDL_systhread_c.h │ └── windows │ │ ├── SDL_syscond_cv.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 │ ├── n3ds │ │ └── SDL_systimer.c │ ├── ngage │ │ └── SDL_systimer.cpp │ ├── os2 │ │ └── SDL_systimer.c │ ├── ps2 │ │ └── SDL_systimer.c │ ├── psp │ │ └── SDL_systimer.c │ ├── unix │ │ └── SDL_systimer.c │ ├── vita │ │ └── 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_rect_impl.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_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_BApp.h │ ├── 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_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_screen.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 │ ├── n3ds │ ├── SDL_n3dsevents.c │ ├── SDL_n3dsevents_c.h │ ├── SDL_n3dsframebuffer.c │ ├── SDL_n3dsframebuffer_c.h │ ├── SDL_n3dsswkb.c │ ├── SDL_n3dsswkb.h │ ├── SDL_n3dstouch.c │ ├── SDL_n3dstouch.h │ ├── SDL_n3dsvideo.c │ └── SDL_n3dsvideo.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 │ ├── ngage │ ├── SDL_ngageevents.cpp │ ├── SDL_ngageevents_c.h │ ├── SDL_ngageframebuffer.cpp │ ├── SDL_ngageframebuffer_c.h │ ├── SDL_ngagevideo.cpp │ ├── SDL_ngagevideo.h │ ├── SDL_ngagewindow.cpp │ └── SDL_ngagewindow.h │ ├── offscreen │ ├── SDL_offscreenevents.c │ ├── SDL_offscreenevents_c.h │ ├── SDL_offscreenframebuffer.c │ ├── SDL_offscreenframebuffer_c.h │ ├── SDL_offscreenopengles.c │ ├── SDL_offscreenopengles.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 │ ├── ps2 │ ├── SDL_ps2video.c │ └── SDL_ps2video.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 │ ├── riscos │ ├── SDL_riscosdefs.h │ ├── SDL_riscosevents.c │ ├── SDL_riscosevents_c.h │ ├── SDL_riscosframebuffer.c │ ├── SDL_riscosframebuffer_c.h │ ├── SDL_riscosmessagebox.c │ ├── SDL_riscosmessagebox.h │ ├── SDL_riscosmodes.c │ ├── SDL_riscosmodes.h │ ├── SDL_riscosmouse.c │ ├── SDL_riscosmouse.h │ ├── SDL_riscosvideo.c │ ├── SDL_riscosvideo.h │ ├── SDL_riscoswindow.c │ ├── SDL_riscoswindow.h │ └── scancodes_riscos.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 │ ├── vita │ ├── SDL_vitaframebuffer.c │ ├── SDL_vitaframebuffer.h │ ├── SDL_vitagl_pvr.c │ ├── SDL_vitagl_pvr_c.h │ ├── SDL_vitagles.c │ ├── SDL_vitagles_c.h │ ├── SDL_vitagles_pvr.c │ ├── SDL_vitagles_pvr_c.h │ ├── SDL_vitakeyboard.c │ ├── SDL_vitakeyboard.h │ ├── SDL_vitamessagebox.c │ ├── SDL_vitamessagebox.h │ ├── SDL_vitamouse.c │ ├── SDL_vitamouse_c.h │ ├── SDL_vitatouch.c │ ├── SDL_vitatouch.h │ ├── SDL_vitavideo.c │ └── SDL_vitavideo.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_waylandkeyboard.c │ ├── SDL_waylandkeyboard.h │ ├── SDL_waylandmessagebox.c │ ├── SDL_waylandmessagebox.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_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_x11xfixes.c │ ├── SDL_x11xfixes.h │ ├── SDL_x11xinput2.c │ ├── SDL_x11xinput2.h │ ├── edid-parse.c │ └── edid.h │ └── yuv2rgb │ ├── LICENSE │ ├── README.md │ ├── yuv_rgb.c │ ├── yuv_rgb.h │ ├── yuv_rgb_lsx_func.h │ ├── yuv_rgb_sse_func.h │ └── yuv_rgb_std_func.h ├── test ├── CMakeLists.txt ├── COPYING ├── Makefile.in ├── Makefile.os2 ├── Makefile.w32 ├── README ├── acinclude.m4 ├── autogen.sh ├── axis.bmp ├── button.bmp ├── checkkeys.c ├── checkkeysthreads.c ├── configure ├── configure.ac ├── controllermap.bmp ├── controllermap.c ├── controllermap_back.bmp ├── emscripten │ └── joystick-pre.js ├── icon.bmp ├── loopwave.c ├── loopwavequeue.c ├── moose.dat ├── n3ds │ └── logo48x48.png ├── 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 ├── template.test.in ├── testatomic.c ├── testaudiocapture.c ├── testaudiohotplug.c ├── testaudioinfo.c ├── testautomation.c ├── testautomation_audio.c ├── testautomation_clipboard.c ├── testautomation_events.c ├── testautomation_guid.c ├── testautomation_hints.c ├── testautomation_joystick.c ├── testautomation_keyboard.c ├── testautomation_main.c ├── testautomation_math.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 ├── testfilesystem_pre.c ├── testgamecontroller.c ├── testgeometry.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 ├── testmouse.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 ├── testsurround.c ├── testthread.c ├── testtimer.c ├── testurl.c ├── testutils.c ├── testutils.h ├── testver.c ├── testviewport.c ├── testvulkan.c ├── testwm2.c ├── testyuv.bmp ├── testyuv.c ├── testyuv_cvt.c ├── testyuv_cvt.h ├── torturethread.c ├── unifont-13.0.06-license.txt ├── unifont-13.0.06.hex ├── utf8.txt └── watcom.mif ├── visualtest ├── COPYING.txt ├── Makefile.in ├── README.txt ├── acinclude.m4 ├── autogen.sh ├── 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.ac ├── 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 ├── launch_harness.cmd ├── launch_harness.sh ├── 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 ├── testsprite2_sample.actions ├── testsprite2_sample.config ├── testsprite2_sample.parameters └── unittest │ ├── testquit.actions │ ├── testquit.c │ ├── testquit.config │ └── testquit.parameters └── wayland-protocols ├── fractional-scale-v1.xml ├── idle-inhibit-unstable-v1.xml ├── keyboard-shortcuts-inhibit-unstable-v1.xml ├── pointer-constraints-unstable-v1.xml ├── primary-selection-unstable-v1.xml ├── relative-pointer-unstable-v1.xml ├── tablet-unstable-v2.xml ├── text-input-unstable-v3.xml ├── viewporter.xml ├── wayland.xml ├── xdg-activation-v1.xml ├── xdg-decoration-unstable-v1.xml ├── xdg-output-unstable-v1.xml └── xdg-shell.xml /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | ## Description 4 | 5 | 6 | ## Existing Issue(s) 7 | 8 | -------------------------------------------------------------------------------- /.github/cmake/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.0...3.5) 2 | project(ci_utils C CXX) 3 | 4 | set(txt "CC=${CMAKE_C_COMPILER} 5 | CXX=${CMAKE_CXX_COMPILER} 6 | CFLAGS=${CMAKE_C_FLAGS} 7 | CXXFLAGS=${CMAKE_CXX_FLAGS} 8 | LDFLAGS=${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_C_STANDARD_LIBRARIES} 9 | ") 10 | 11 | message("${txt}") 12 | 13 | set(VAR_PATH "/tmp/env.txt" CACHE PATH "Where to write environment file") 14 | message(STATUS "Writing CC/CXX/CFLAGS/CXXFLAGS/LDFLAGS environment to ${VAR_PATH}") 15 | 16 | file(WRITE "${VAR_PATH}" "${txt}") 17 | -------------------------------------------------------------------------------- /.github/workflows/ios.yml: -------------------------------------------------------------------------------- 1 | name: Build (iOS/tvOS) 2 | 3 | on: [push, pull_request] 4 | 5 | jobs: 6 | Build: 7 | name: ${{ matrix.platform.name }} 8 | runs-on: macos-latest 9 | 10 | strategy: 11 | fail-fast: false 12 | matrix: 13 | platform: 14 | - { name: iOS, target: Static Library-iOS, sdk: iphoneos } 15 | - { name: tvOS, target: Static Library-tvOS, sdk: appletvos } 16 | 17 | steps: 18 | - uses: actions/checkout@v3 19 | - name: Build 20 | run: xcodebuild -project Xcode/SDL/SDL.xcodeproj -target '${{ matrix.platform.target }}' -configuration Release -sdk ${{ matrix.platform.sdk }} clean build -------------------------------------------------------------------------------- /.github/workflows/watcom.yml: -------------------------------------------------------------------------------- 1 | name: Build (OpenWatcom) 2 | 3 | on: [push, pull_request] 4 | 5 | jobs: 6 | os2: 7 | name: ${{ matrix.platform.name }} 8 | runs-on: windows-latest 9 | 10 | strategy: 11 | matrix: 12 | platform: 13 | - { name: Windows, makefile: Makefile.w32 } 14 | - { name: OS/2, makefile: Makefile.os2 } 15 | 16 | steps: 17 | - uses: actions/checkout@v3 18 | - uses: open-watcom/setup-watcom@v0 19 | - name: Build SDL2 20 | run: | 21 | wmake -f ${{ matrix.platform.makefile }} ENABLE_WERROR=1 22 | - name: Build tests 23 | run: | 24 | cd test && wmake -f ${{ matrix.platform.makefile }} ENABLE_WERROR=1 25 | cd .. 26 | - name: Run tests 27 | if: "matrix.platform.makefile == 'Makefile.w32'" 28 | run: | 29 | cd test && wmake -f ${{ matrix.platform.makefile }} check-quick 30 | cd .. 31 | - name: distclean 32 | run: | 33 | wmake -f ${{ matrix.platform.makefile }} distclean 34 | cd test && wmake -f ${{ matrix.platform.makefile }} distclean 35 | cd .. 36 | -------------------------------------------------------------------------------- /.wikiheaders-options: -------------------------------------------------------------------------------- 1 | projectfullname = SDL2 2 | projectshortname = SDL2 3 | incsubdir = include 4 | wikisubdir = SDL2 5 | readmesubdir = docs 6 | apiprefixregex = (SDL_|SDLK_|KMOD_|AUDIO_) 7 | mainincludefname = SDL.h 8 | versionfname = include/SDL_version.h 9 | versionmajorregex = \A\#define\s+SDL_MAJOR_VERSION\s+(\d+)\Z 10 | versionminorregex = \A\#define\s+SDL_MINOR_VERSION\s+(\d+)\Z 11 | versionpatchregex = \A\#define\s+SDL_PATCHLEVEL\s+(\d+)\Z 12 | selectheaderregex = \ASDL.*?\.h\Z 13 | projecturl = https://libsdl.org/ 14 | wikiurl = https://wiki.libsdl.org/SDL2 15 | bugreporturl = https://github.com/libsdl-org/sdlwiki/issues/new 16 | warn_about_missing = 0 17 | wikipreamble = (This is the legacy documentation for stable SDL2, the current stable version; [SDL3](https://wiki.libsdl.org/SDL3/) is the current development version.) 18 | -------------------------------------------------------------------------------- /BUGS.txt: -------------------------------------------------------------------------------- 1 | 2 | Bugs are now managed in the SDL issue tracker, here: 3 | 4 | https://github.com/libsdl-org/SDL/issues 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 the issue 15 | tracker, as bugs discussed on the mailing list may be forgotten or missed. 16 | 17 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (C) 1997-2023 Sam Lantinga 2 | 3 | This software is provided 'as-is', without any express or implied 4 | warranty. In no event will the authors be held liable for any damages 5 | arising from the use of this software. 6 | 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it 9 | freely, subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not 12 | claim that you wrote the original software. If you use this software 13 | in a product, an acknowledgment in the product documentation would be 14 | appreciated but is not required. 15 | 2. Altered source versions must be plainly marked as such, and must not be 16 | misrepresented as being the original software. 17 | 3. This notice may not be removed or altered from any source distribution. 18 | 19 | -------------------------------------------------------------------------------- /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.md: -------------------------------------------------------------------------------- 1 | 2 | # Simple DirectMedia Layer (SDL) Version 2.0 3 | 4 | https://www.libsdl.org/ 5 | 6 | Simple DirectMedia Layer is a cross-platform development library designed 7 | to provide low level access to audio, keyboard, mouse, joystick, and graphics 8 | hardware via OpenGL and Direct3D. It is used by video playback software, 9 | emulators, and popular games including Valve's award winning catalog 10 | and many Humble Bundle games. 11 | 12 | More extensive documentation is available in the docs directory, starting 13 | with README.md 14 | 15 | Enjoy! 16 | 17 | Sam Lantinga (slouken@libsdl.org) 18 | -------------------------------------------------------------------------------- /TODO.txt: -------------------------------------------------------------------------------- 1 | Future work roadmap: 2 | * http://wiki.libsdl.org/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-GDK/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 Gaming.Desktop.x64 \) -exec rm -rv {} \; 5 | find . -depth -type d \( -name Gaming.Xbox.Scarlett.x64 \) -exec rm -rv {} \; 6 | find . -depth -type d \( -name Gaming.Xbox.XboxOne.x64 \) -exec rm -rv {} \; 7 | -------------------------------------------------------------------------------- /VisualC-GDK/logos/Logo100x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/VisualC-GDK/logos/Logo100x100.png -------------------------------------------------------------------------------- /VisualC-GDK/logos/Logo150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/VisualC-GDK/logos/Logo150x150.png -------------------------------------------------------------------------------- /VisualC-GDK/logos/Logo44x44.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/VisualC-GDK/logos/Logo44x44.png -------------------------------------------------------------------------------- /VisualC-GDK/logos/Logo480x480.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/VisualC-GDK/logos/Logo480x480.png -------------------------------------------------------------------------------- /VisualC-GDK/logos/SplashScreenImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/VisualC-GDK/logos/SplashScreenImage.png -------------------------------------------------------------------------------- /VisualC-GDK/tests/testgamecontroller/PackageLayout.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /VisualC-GDK/tests/testgamecontroller/wingdk/MicrosoftGame.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | PleaseChangeMe 23 | FFFFFFFF 24 | 25 | 34 | -------------------------------------------------------------------------------- /VisualC-GDK/tests/testgamecontroller/xboxone/MicrosoftGame.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 13 | 14 | 15 | 16 | PleaseChangeMe 17 | FFFFFFFF 18 | 19 | 29 | -------------------------------------------------------------------------------- /VisualC-GDK/tests/testgamecontroller/xboxseries/MicrosoftGame.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 13 | 14 | 15 | 16 | PleaseChangeMe 17 | FFFFFFFF 18 | 19 | 29 | -------------------------------------------------------------------------------- /VisualC-GDK/tests/testgdk/PackageLayout.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /VisualC-GDK/tests/testgdk/wingdk/MicrosoftGame.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | PleaseChangeMe 23 | FFFFFFFF 24 | 25 | 34 | -------------------------------------------------------------------------------- /VisualC-GDK/tests/testgdk/xboxone/MicrosoftGame.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 13 | 14 | 15 | 16 | PleaseChangeMe 17 | FFFFFFFF 18 | 19 | 29 | -------------------------------------------------------------------------------- /VisualC-GDK/tests/testgdk/xboxseries/MicrosoftGame.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 13 | 14 | 15 | 16 | PleaseChangeMe 17 | FFFFFFFF 18 | 19 | 29 | -------------------------------------------------------------------------------- /VisualC-GDK/tests/testsprite2/PackageLayout.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /VisualC-GDK/tests/testsprite2/wingdk/MicrosoftGame.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | PleaseChangeMe 23 | FFFFFFFF 24 | 25 | 34 | -------------------------------------------------------------------------------- /VisualC-GDK/tests/testsprite2/xboxone/MicrosoftGame.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 13 | 14 | 15 | 16 | PleaseChangeMe 17 | FFFFFFFF 18 | 19 | 29 | -------------------------------------------------------------------------------- /VisualC-GDK/tests/testsprite2/xboxseries/MicrosoftGame.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 13 | 14 | 15 | 16 | PleaseChangeMe 17 | FFFFFFFF 18 | 19 | 29 | -------------------------------------------------------------------------------- /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/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/Xcode-iOS/Demos/Default.png -------------------------------------------------------------------------------- /Xcode-iOS/Demos/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/Xcode-iOS/Demos/Icon.png -------------------------------------------------------------------------------- /Xcode-iOS/Demos/config.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // config.xcconfig 3 | // SDL tests 4 | // 5 | 6 | // Configuration settings file format documentation can be found at: 7 | // https://help.apple.com/xcode/#/dev745c5c974 8 | 9 | // Include any optional config for this build 10 | #include? "build.xcconfig" 11 | 12 | CONFIG_FRAMEWORK_LDFLAGS[sdk=macos*] = $(inherited) -framework SDL2 -framework AudioToolbox -framework Carbon -framework Cocoa -framework CoreAudio -framework CoreHaptics -framework CoreVideo -framework ForceFeedback -framework GameController -framework IOKit -framework Metal 13 | CONFIG_FRAMEWORK_LDFLAGS[sdk=iphone*] = $(inherited) -framework AVFoundation -framework AudioToolbox -framework CoreGraphics -framework CoreHaptics -framework CoreMotion -framework Foundation -framework GameController -framework Metal -framework OpenGLES -framework QuartzCore -framework UIKit 14 | CONFIG_FRAMEWORK_LDFLAGS[sdk=appletv*] = $(inherited) -framework AVFoundation -framework AudioToolbox -framework CoreGraphics -framework CoreHaptics -framework Foundation -framework GameController -framework Metal -framework OpenGLES -framework QuartzCore -framework UIKit 15 | -------------------------------------------------------------------------------- /Xcode-iOS/Demos/data/bitmapfont/kromasky_16x16.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/Xcode-iOS/Demos/data/bitmapfont/kromasky_16x16.bmp -------------------------------------------------------------------------------- /Xcode-iOS/Demos/data/drums/ds_brush_snare.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/Xcode-iOS/Demos/data/drums/ds_brush_snare.wav -------------------------------------------------------------------------------- /Xcode-iOS/Demos/data/drums/ds_china.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/Xcode-iOS/Demos/data/drums/ds_china.wav -------------------------------------------------------------------------------- /Xcode-iOS/Demos/data/drums/ds_kick_big_amb.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/Xcode-iOS/Demos/data/drums/ds_kick_big_amb.wav -------------------------------------------------------------------------------- /Xcode-iOS/Demos/data/drums/ds_loose_skin_mute.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/Xcode-iOS/Demos/data/drums/ds_loose_skin_mute.wav -------------------------------------------------------------------------------- /Xcode-iOS/Demos/data/icon.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/Xcode-iOS/Demos/data/icon.bmp -------------------------------------------------------------------------------- /Xcode-iOS/Demos/data/ship.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/Xcode-iOS/Demos/data/ship.bmp -------------------------------------------------------------------------------- /Xcode-iOS/Demos/data/space.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/Xcode-iOS/Demos/data/space.bmp -------------------------------------------------------------------------------- /Xcode-iOS/Demos/data/stroke.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/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/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.28.5 23 | CFBundleSignature 24 | SDLX 25 | CFBundleVersion 26 | 2.28.5 27 | 28 | 29 | -------------------------------------------------------------------------------- /Xcode/SDL/SDL2/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 | 1.0 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | 22 | 23 | -------------------------------------------------------------------------------- /Xcode/SDL/pkg-support/SDL.info: -------------------------------------------------------------------------------- 1 | Title SDL 2.28.5 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-2023 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/SDL_DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/Xcode/SDL/pkg-support/resources/SDL_DS_Store -------------------------------------------------------------------------------- /Xcode/SDL/pkg-support/sdl_logo.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/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.7 34 | 35 | 36 | -------------------------------------------------------------------------------- /Xcode/SDLTest/config.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // config.xcconfig 3 | // SDL tests 4 | // 5 | 6 | // Configuration settings file format documentation can be found at: 7 | // https://help.apple.com/xcode/#/dev745c5c974 8 | 9 | // Include any optional config for this build 10 | #include? "build.xcconfig" 11 | 12 | CONFIG_FRAMEWORK_LDFLAGS[sdk=macos*] = $(inherited) -framework SDL2 -framework AudioToolbox -framework Carbon -framework Cocoa -framework CoreAudio -framework CoreHaptics -framework CoreVideo -framework ForceFeedback -framework GameController -framework IOKit -framework Metal 13 | CONFIG_FRAMEWORK_LDFLAGS[sdk=iphone*] = $(inherited) -framework SDL2 -framework AVFoundation -framework AudioToolbox -framework CoreGraphics -framework CoreHaptics -framework CoreMotion -framework Foundation -framework GameController -framework Metal -framework OpenGLES -framework QuartzCore -framework UIKit 14 | CONFIG_FRAMEWORK_LDFLAGS[sdk=appletv*] = $(inherited) -framework SDL2 -framework AVFoundation -framework AudioToolbox -framework CoreGraphics -framework CoreHaptics -framework Foundation -framework GameController -framework Metal -framework OpenGLES -framework QuartzCore -framework UIKit 15 | -------------------------------------------------------------------------------- /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, 2011-2015 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 4179 ltversion.m4 13 | # This file is part of GNU Libtool 14 | 15 | m4_define([LT_PACKAGE_VERSION], [2.4.6]) 16 | m4_define([LT_PACKAGE_REVISION], [2.4.6]) 17 | 18 | AC_DEFUN([LTVERSION_VERSION], 19 | [macro_version='2.4.6' 20 | macro_revision='2.4.6' 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/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/android-project-ant/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android-project-ant/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/android-project-ant/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android-project-ant/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/android-project-ant/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android-project-ant/res/drawable-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/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 -lOpenSLES -llog -landroid 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/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/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/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/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/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/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/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/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/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/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 | mavenCentral() 6 | google() 7 | } 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:8.1.1' 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 | mavenCentral() 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/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/android-project/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /android-project/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Thu Nov 11 18:20:34 PST 2021 2 | distributionBase=GRADLE_USER_HOME 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip 4 | distributionPath=wrapper/dists 5 | zipStorePath=wrapper/dists 6 | zipStoreBase=GRADLE_USER_HOME 7 | -------------------------------------------------------------------------------- /android-project/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /autogen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | echo "Generating build information using autoconf" 6 | echo "This may take a while ..." 7 | 8 | srcdir=`dirname $0` 9 | test -z "$srcdir" && srcdir=. 10 | cd "$srcdir" 11 | 12 | # Regenerate configuration files 13 | cat acinclude/* >aclocal.m4 14 | 15 | "${AUTOCONF:-autoconf}" 16 | rm aclocal.m4 17 | rm -rf autom4te.cache 18 | 19 | (cd test; sh autogen.sh) 20 | 21 | echo "Now you are ready to run ./configure" 22 | -------------------------------------------------------------------------------- /build-scripts/clang-format-src.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd "$(dirname $0)/../src" 4 | 5 | echo "Running clang-format in $(pwd)" 6 | 7 | find . -regex '.*\.[chm]p*' -exec clang-format -i {} \; 8 | 9 | # Revert third-party code 10 | git checkout \ 11 | events/imKStoUCS.* \ 12 | hidapi \ 13 | joystick/controller_type.c \ 14 | joystick/controller_type.h \ 15 | joystick/hidapi/steam/controller_constants.h \ 16 | joystick/hidapi/steam/controller_structs.h \ 17 | libm \ 18 | stdlib/SDL_malloc.c \ 19 | stdlib/SDL_qsort.c \ 20 | stdlib/SDL_strtokr.c \ 21 | video/arm \ 22 | video/khronos \ 23 | video/x11/edid-parse.c \ 24 | video/yuv2rgb 25 | clang-format -i hidapi/SDL_hidapi.c 26 | 27 | # Revert generated code 28 | git checkout dynapi/SDL_dynapi_overrides.h 29 | git checkout dynapi/SDL_dynapi_procs.h 30 | git checkout render/metal/SDL_shaders_metal_*.h 31 | 32 | echo "clang-format complete!" 33 | -------------------------------------------------------------------------------- /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 \.git \ 5 | | while read file; do \ 6 | LC_ALL=C sed -b -i "s/\(.*Copyright.*\)[0-9]\{4\}\( *Sam Lantinga\)/\1`date +%Y`\2/" "$file"; \ 7 | done 8 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /cmake/sdlfind.cmake: -------------------------------------------------------------------------------- 1 | 2 | macro(sdlFindALSA) 3 | find_package(ALSA MODULE) 4 | if(ALSA_FOUND AND (NOT TARGET ALSA::ALSA) ) 5 | add_Library(ALSA::ALSA UNKNOWN IMPORTED) 6 | set_property(TARGET ALSA::ALSA PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${ALSA_INCLUDE_DIRS}) 7 | set_property(TARGET ALSA::ALSA APPEND PROPERTY IMPORTED_LOCATION ${ALSA_LIBRARY}) 8 | endif() 9 | endmacro() 10 | -------------------------------------------------------------------------------- /cmake/test/jni/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | include $(CLEAR_VARS) 4 | 5 | LOCAL_MODULE := main_gui_androidmk 6 | LOCAL_SRC_FILES := ../main_gui.c 7 | LOCAL_SHARED_LIBRARIES += SDL2 8 | include $(BUILD_SHARED_LIBRARY) 9 | 10 | $(call import-module,SDL2main) 11 | $(call import-module,SDL2) 12 | -------------------------------------------------------------------------------- /cmake/test/main_cli.c: -------------------------------------------------------------------------------- 1 | #define SDL_MAIN_HANDLED 2 | #include "SDL.h" 3 | #include 4 | 5 | int main(int argc, char *argv[]) { 6 | SDL_SetMainReady(); 7 | if (SDL_Init(0) < 0) { 8 | fprintf(stderr, "could not initialize sdl2: %s\n", SDL_GetError()); 9 | return 1; 10 | } 11 | SDL_Delay(100); 12 | SDL_Quit(); 13 | return 0; 14 | } 15 | -------------------------------------------------------------------------------- /cmake/test/main_gui.c: -------------------------------------------------------------------------------- 1 | #include "SDL.h" 2 | #include 3 | 4 | int main(int argc, char *argv[]) { 5 | SDL_Window *window = NULL; 6 | SDL_Surface *screenSurface = NULL; 7 | if (SDL_Init(SDL_INIT_VIDEO) < 0) { 8 | fprintf(stderr, "could not initialize sdl2: %s\n", SDL_GetError()); 9 | return 1; 10 | } 11 | window = SDL_CreateWindow( 12 | "hello_sdl2", 13 | SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 14 | 640, 480, 15 | SDL_WINDOW_SHOWN 16 | ); 17 | if (window == NULL) { 18 | fprintf(stderr, "could not create window: %s\n", SDL_GetError()); 19 | return 1; 20 | } 21 | screenSurface = SDL_GetWindowSurface(window); 22 | SDL_FillRect(screenSurface, NULL, SDL_MapRGB(screenSurface->format, 0xff, 0xff, 0xff)); 23 | SDL_UpdateWindowSurface(window); 24 | SDL_Delay(100); 25 | SDL_DestroyWindow(window); 26 | SDL_Quit(); 27 | return 0; 28 | } 29 | -------------------------------------------------------------------------------- /cmake/test/main_lib.c: -------------------------------------------------------------------------------- 1 | #include "SDL.h" 2 | #include 3 | 4 | #include EXPORT_HEADER 5 | 6 | #if defined(_WIN32) 7 | #include 8 | BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { 9 | return TRUE; 10 | } 11 | #endif 12 | 13 | int MYLIBRARY_EXPORT mylibrary_init(void); 14 | void MYLIBRARY_EXPORT mylibrary_quit(void); 15 | int MYLIBRARY_EXPORT mylibrary_work(void); 16 | 17 | int mylibrary_init(void) { 18 | SDL_SetMainReady(); 19 | if (SDL_Init(0) < 0) { 20 | fprintf(stderr, "could not initialize sdl2: %s\n", SDL_GetError()); 21 | return 1; 22 | } 23 | return 0; 24 | } 25 | 26 | void mylibrary_quit(void) { 27 | SDL_Quit(); 28 | } 29 | 30 | int mylibrary_work(void) { 31 | SDL_Delay(100); 32 | return 0; 33 | } 34 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /docs/README-git.md: -------------------------------------------------------------------------------- 1 | git 2 | ========= 3 | 4 | The latest development version of SDL is available via git. 5 | Git allows you to get up-to-the-minute fixes and enhancements; 6 | as a developer works on a source tree, you can use "git" to mirror that 7 | source tree instead of waiting for an official release. Please look 8 | at the Git website ( https://git-scm.com/ ) for more 9 | information on using git, where you can also download software for 10 | macOS, Windows, and Unix systems. 11 | 12 | git clone https://github.com/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 Git repository at: 18 | http://github.com/libsdl-org/SDL/ 19 | 20 | -------------------------------------------------------------------------------- /docs/README-hg.md: -------------------------------------------------------------------------------- 1 | We are no longer hosted in Mercurial. Please see README-git.md for details. 2 | 3 | Thanks! 4 | 5 | -------------------------------------------------------------------------------- /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 | SDL2 port for the Sony PSP contributed by: 4 | - Captian Lex 5 | - Francisco Javier Trujillo Mata 6 | - Wouter Wijsman 7 | 8 | 9 | Credit to 10 | Marcus R.Brown,Jim Paris,Matthew H for the original SDL 1.2 for PSP 11 | Geecko for his PSP GU lib "Glib2d" 12 | 13 | ## Building 14 | To build SDL2 library for the PSP, make sure you have the latest PSPDev status and run: 15 | ```bash 16 | cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=$PSPDEV/psp/share/pspdev.cmake 17 | cmake --build build 18 | cmake --install build 19 | ``` 20 | 21 | 22 | ## Getting PSP Dev 23 | [Installing PSP Dev](https://github.com/pspdev/pspdev) 24 | 25 | ## Running on PPSSPP Emulator 26 | [PPSSPP](https://github.com/hrydgard/ppsspp) 27 | 28 | [Build Instructions](https://github.com/hrydgard/ppsspp/wiki/Build-instructions) 29 | 30 | 31 | ## Compiling a HelloWorld 32 | [PSP Hello World](https://psp-dev.org/doku.php?id=tutorial:hello_world) 33 | 34 | ## To Do 35 | - PSP Screen Keyboard 36 | - Dialogs 37 | -------------------------------------------------------------------------------- /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-2023 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-2023 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 | /* 5 | ** Copyright 2017-2020 The Khronos Group Inc. 6 | ** SPDX-License-Identifier: Apache-2.0 7 | */ 8 | 9 | /* Platform-specific types and definitions for OpenGL ES 2.X gl2.h 10 | * 11 | * Adopters may modify khrplatform.h and this file to suit their platform. 12 | * Please contribute modifications back to Khronos as pull requests on the 13 | * public github repository: 14 | * https://github.com/KhronosGroup/OpenGL-Registry 15 | */ 16 | 17 | /*#include */ 18 | 19 | #ifndef GL_APICALL 20 | #define GL_APICALL KHRONOS_APICALL 21 | #endif 22 | 23 | #ifndef GL_APIENTRY 24 | #define GL_APIENTRY KHRONOS_APIENTRY 25 | #endif 26 | 27 | #endif /* __gl2platform_h_ */ 28 | -------------------------------------------------------------------------------- /include/SDL_revision.h: -------------------------------------------------------------------------------- 1 | #ifdef SDL_VENDOR_INFO 2 | #define SDL_REVISION SDL_VENDOR_INFO 3 | #else 4 | #define SDL_REVISION "" 5 | #endif 6 | #define SDL_REVISION_NUMBER 0 7 | -------------------------------------------------------------------------------- /include/SDL_revision.h.cmake: -------------------------------------------------------------------------------- 1 | #cmakedefine SDL_VENDOR_INFO "@SDL_VENDOR_INFO@" 2 | #define SDL_REVISION_NUMBER 0 3 | 4 | #ifdef SDL_VENDOR_INFO 5 | #define SDL_REVISION "@SDL_REVISION@ (" SDL_VENDOR_INFO ")" 6 | #else 7 | #define SDL_REVISION "@SDL_REVISION@" 8 | #endif 9 | -------------------------------------------------------------------------------- /include/SDL_types.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2023 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 | -------------------------------------------------------------------------------- /mingw/pkg-support/cmake/sdl2-config-version.cmake: -------------------------------------------------------------------------------- 1 | # SDL2 CMake version configuration file: 2 | # This file is meant to be placed in a cmake subfolder of SDL2-devel-2.x.y-mingw 3 | 4 | if(CMAKE_SIZEOF_VOID_P EQUAL 4) 5 | set(sdl2_config_path "${CMAKE_CURRENT_LIST_DIR}/../i686-w64-mingw32/lib/cmake/SDL2/sdl2-config-version.cmake") 6 | elseif(CMAKE_SIZEOF_VOID_P EQUAL 8) 7 | set(sdl2_config_path "${CMAKE_CURRENT_LIST_DIR}/../x86_64-w64-mingw32/lib/cmake/SDL2/sdl2-config-version.cmake") 8 | else() 9 | set(PACKAGE_VERSION_UNSUITABLE TRUE) 10 | return() 11 | endif() 12 | 13 | if(NOT EXISTS "${sdl2_config_path}") 14 | message(WARNING "${sdl2_config_path} does not exist: MinGW development package is corrupted") 15 | set(PACKAGE_VERSION_UNSUITABLE TRUE) 16 | return() 17 | endif() 18 | 19 | include("${sdl2_config_path}") 20 | -------------------------------------------------------------------------------- /mingw/pkg-support/cmake/sdl2-config.cmake: -------------------------------------------------------------------------------- 1 | # SDL2 CMake configuration file: 2 | # This file is meant to be placed in a cmake subfolder of SDL2-devel-2.x.y-mingw 3 | 4 | if(CMAKE_SIZEOF_VOID_P EQUAL 4) 5 | set(sdl2_config_path "${CMAKE_CURRENT_LIST_DIR}/../i686-w64-mingw32/lib/cmake/SDL2/sdl2-config.cmake") 6 | elseif(CMAKE_SIZEOF_VOID_P EQUAL 8) 7 | set(sdl2_config_path "${CMAKE_CURRENT_LIST_DIR}/../x86_64-w64-mingw32/lib/cmake/SDL2/sdl2-config.cmake") 8 | else() 9 | set(SDL2_FOUND FALSE) 10 | return() 11 | endif() 12 | 13 | if(NOT EXISTS "${sdl2_config_path}") 14 | message(WARNING "${sdl2_config_path} does not exist: MinGW development package is corrupted") 15 | set(SDL2_FOUND FALSE) 16 | return() 17 | endif() 18 | 19 | include("${sdl2_config_path}") 20 | -------------------------------------------------------------------------------- /sdl2-config-version.cmake.in: -------------------------------------------------------------------------------- 1 | # sdl2 cmake project-config-version input for ./configure scripts 2 | 3 | set(PACKAGE_VERSION "@SDL_VERSION@") 4 | 5 | if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION) 6 | set(PACKAGE_VERSION_COMPATIBLE FALSE) 7 | else() 8 | set(PACKAGE_VERSION_COMPATIBLE TRUE) 9 | if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION) 10 | set(PACKAGE_VERSION_EXACT TRUE) 11 | endif() 12 | endif() 13 | -------------------------------------------------------------------------------- /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.private: @PKGCONFIG_DEPENDS@ 12 | Conflicts: 13 | Libs: -L${libdir} @SDL_RLD_FLAGS@ @SDL_LIBS@ @PKGCONFIG_LIBS_PRIV@ @SDL_STATIC_LIBS@ 14 | Cflags: -I${includedir} -I${includedir}/SDL2 @SDL_CFLAGS@ 15 | -------------------------------------------------------------------------------- /src/SDL_assert_c.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2023 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/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/src/audio/sun/SDL_sunaudio.c -------------------------------------------------------------------------------- /src/core/gdk/SDL_gdk.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2023 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 | /* This is called from WIN_PumpEvents on GDK */ 24 | extern void GDK_DispatchTaskQueue(void); 25 | -------------------------------------------------------------------------------- /src/core/openbsd/SDL_wscons.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2023 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 | void SDL_WSCONS_Init(); 23 | void SDL_WSCONS_Quit(); 24 | 25 | void SDL_WSCONS_PumpEvents(); 26 | -------------------------------------------------------------------------------- /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 -DGENICONV_STANDALONE=1 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-2023 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/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/src/core/os2/geniconv/test.c -------------------------------------------------------------------------------- /src/core/os2/iconv2.lbc: -------------------------------------------------------------------------------- 1 | # OpenWatcom exports file for libiconv 2 | ++'libiconv'.'ICONV2'..'_libiconv' 3 | ++'libiconv_close'.'ICONV2'..'_libiconv_close' 4 | ++'libiconv_open'.'ICONV2'..'_libiconv_open' 5 | -------------------------------------------------------------------------------- /src/events/SDL_clipboardevents_c.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2023 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/default_cursor.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/src/events/default_cursor.h -------------------------------------------------------------------------------- /src/file/cocoa/SDL_rwopsbundlesupport.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2023 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/file/n3ds/SDL_rwopsromfs.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2023 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_rwopsromfs_h_ 24 | #define SDL_rwopsromfs_h_ 25 | 26 | FILE *N3DS_FileOpen(const char *file, const char *mode); 27 | 28 | #endif /* SDL_rwopsromfs_h_ */ 29 | 30 | /* vi: set sts=4 ts=4 sw=4 expandtab: */ 31 | -------------------------------------------------------------------------------- /src/haptic/SDL_haptic_c.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2023 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/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.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/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/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/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/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:-grep -F} 8BitDo SDL_gamecontrollerdb.h | ${FGREP:-grep -F} -v hint 14 | ${EGREP:-grep -E} "hint:SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1" SDL_gamecontrollerdb.h | ${FGREP:-grep -F} -i 8bit | ${FGREP:-grep -F} -v x:b2,y:b3 | ${FGREP:-grep -F} -v x:b3,y:b4 15 | ${EGREP:-grep -E} "hint:.SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1" SDL_gamecontrollerdb.h | ${FGREP:-grep -F} -i 8bit | ${FGREP:-grep -F} -v x:b3,y:b2 | ${FGREP:-grep -F} -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/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 main(int argc, char *argv[]) 12 | { 13 | return SDL_main(argc, argv); 14 | } 15 | #else 16 | /* Nothing to do on this platform */ 17 | int SDL_main_stub_symbol(void) 18 | { 19 | return 0; 20 | } 21 | #endif 22 | 23 | /* vi: set ts=4 sw=4 expandtab: */ 24 | -------------------------------------------------------------------------------- /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 | 5 | /* Include the SDL main definition header */ 6 | #include "SDL_main.h" 7 | 8 | #if defined(__IPHONEOS__) || defined(__TVOS__) 9 | 10 | #ifndef SDL_MAIN_HANDLED 11 | #ifdef main 12 | #undef main 13 | #endif 14 | 15 | int main(int argc, char *argv[]) 16 | { 17 | return SDL_UIKitRunApp(argc, argv, SDL_main); 18 | } 19 | #endif /* !SDL_MAIN_HANDLED */ 20 | 21 | #endif /* __IPHONEOS__ || __TVOS__ */ 22 | 23 | /* vi: set ts=4 sw=4 expandtab: */ 24 | -------------------------------------------------------------------------------- /src/main/windows/version.rc: -------------------------------------------------------------------------------- 1 | // This file is public domain. Do what you like with it. 2 | #include "winresrc.h" 3 | 4 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US 5 | 6 | ///////////////////////////////////////////////////////////////////////////// 7 | // 8 | // Version 9 | // 10 | 11 | VS_VERSION_INFO VERSIONINFO 12 | FILEVERSION 2,28,5,0 13 | PRODUCTVERSION 2,28,5,0 14 | FILEFLAGSMASK 0x3fL 15 | FILEFLAGS 0x0L 16 | FILEOS 0x40004L 17 | FILETYPE 0x2L 18 | FILESUBTYPE 0x0L 19 | BEGIN 20 | BLOCK "StringFileInfo" 21 | BEGIN 22 | BLOCK "040904b0" 23 | BEGIN 24 | VALUE "CompanyName", "\0" 25 | VALUE "FileDescription", "SDL\0" 26 | VALUE "FileVersion", "2, 28, 5, 0\0" 27 | VALUE "InternalName", "SDL\0" 28 | VALUE "LegalCopyright", "Copyright (C) 2023 Sam Lantinga\0" 29 | VALUE "OriginalFilename", "SDL2.dll\0" 30 | VALUE "ProductName", "Simple DirectMedia Layer\0" 31 | VALUE "ProductVersion", "2, 28, 5, 0\0" 32 | END 33 | END 34 | BLOCK "VarFileInfo" 35 | BEGIN 36 | VALUE "Translation", 0x409, 1200 37 | END 38 | END 39 | -------------------------------------------------------------------------------- /src/main/winrt/SDL2-WinRTResource_BlankCursor.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/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_url.c: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2023 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 SDL_OpenURL(const char *url) 25 | { 26 | if (url == NULL) { 27 | return SDL_InvalidParamError("url"); 28 | } 29 | return SDL_SYS_OpenURL(url); 30 | } 31 | 32 | /* vi: set ts=4 sw=4 expandtab: */ 33 | -------------------------------------------------------------------------------- /src/misc/android/SDL_sysurl.c: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2023 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 SDL_SYS_OpenURL(const char *url) 26 | { 27 | return Android_JNI_OpenURL(url); 28 | } 29 | 30 | /* vi: set ts=4 sw=4 expandtab: */ 31 | -------------------------------------------------------------------------------- /src/misc/dummy/SDL_sysurl.c: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2023 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 SDL_SYS_OpenURL(const char *url) 25 | { 26 | return SDL_Unsupported(); 27 | } 28 | 29 | /* vi: set ts=4 sw=4 expandtab: */ 30 | -------------------------------------------------------------------------------- /src/render/direct3d12/SDL_render_d3d12_xbox.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2023 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 | #error "This is a placeholder Xbox file, as the real one is under NDA. See README-gdk.md for more info." 23 | -------------------------------------------------------------------------------- /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-2023 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/render/vitagxm/shader_src/clear_f.cg: -------------------------------------------------------------------------------- 1 | float4 main( uniform float4 uClearColor) : COLOR 2 | { 3 | return uClearColor; 4 | } 5 | -------------------------------------------------------------------------------- /src/render/vitagxm/shader_src/clear_v.cg: -------------------------------------------------------------------------------- 1 | float4 main(float2 aPosition) : POSITION 2 | { 3 | return float4(aPosition, 1.f, 1.f); 4 | } 5 | -------------------------------------------------------------------------------- /src/render/vitagxm/shader_src/color_f.cg: -------------------------------------------------------------------------------- 1 | float4 main(float4 vColor : COLOR) 2 | { 3 | return vColor; 4 | } 5 | -------------------------------------------------------------------------------- /src/render/vitagxm/shader_src/color_v.cg: -------------------------------------------------------------------------------- 1 | void main( 2 | float2 aPosition, 3 | float4 aColor, 4 | uniform float4x4 wvp, 5 | out float4 vPosition : POSITION, 6 | out float4 vColor : COLOR, 7 | out float pSize : PSIZE 8 | ) 9 | { 10 | vPosition = mul(float4(aPosition, 1.f, 0.5f), wvp); 11 | vColor = aColor; 12 | pSize = 1.f; 13 | } 14 | -------------------------------------------------------------------------------- /src/render/vitagxm/shader_src/texture_f.cg: -------------------------------------------------------------------------------- 1 | float4 main(float2 vTexcoord : TEXCOORD0, float4 vColor : COLOR, uniform sampler2D tex) 2 | { 3 | return tex2D(tex, vTexcoord) * vColor; 4 | } 5 | -------------------------------------------------------------------------------- /src/render/vitagxm/shader_src/texture_v.cg: -------------------------------------------------------------------------------- 1 | void main( 2 | float2 aPosition, 3 | float2 aTexcoord, 4 | float4 aColor, 5 | uniform float4x4 wvp, 6 | out float4 vPosition : POSITION, 7 | out float4 vColor : COLOR, 8 | out float2 vTexcoord : TEXCOORD0 9 | ) 10 | { 11 | vPosition = mul(float4(aPosition, 1.f, 0.5f), wvp); 12 | vTexcoord = aTexcoord; 13 | vColor = aColor; 14 | } 15 | -------------------------------------------------------------------------------- /src/sensor/android/SDL_androidsensor.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2023 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 | /* vi: set ts=4 sw=4 expandtab: */ 31 | -------------------------------------------------------------------------------- /src/sensor/coremotion/SDL_coremotionsensor.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2023 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 | /* vi: set ts=4 sw=4 expandtab: */ 30 | -------------------------------------------------------------------------------- /src/sensor/dummy/SDL_dummysensor.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2023 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/vita/SDL_vitasensor.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2023 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 | Uint32 counter; 27 | unsigned int last_timestamp; 28 | Uint64 timestamp_us; 29 | }; 30 | 31 | /* vi: set ts=4 sw=4 expandtab: */ 32 | -------------------------------------------------------------------------------- /src/sensor/windows/SDL_windowssensor.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2023 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/thread/generic/SDL_sysmutex_c.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2023 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-2023 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/n3ds/SDL_systhread_c.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2023 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 <3ds.h> 27 | 28 | typedef Thread SYS_ThreadHandle; 29 | 30 | #endif /* SDL_systhread_c_h_ */ 31 | 32 | /* vi: set sts=4 ts=4 sw=4 expandtab: */ 33 | -------------------------------------------------------------------------------- /src/thread/ngage/SDL_systhread_c.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2023 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/os2/SDL_systhread_c.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2023 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/ps2/SDL_systhread_c.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2023 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 int32_t SYS_ThreadHandle; 25 | -------------------------------------------------------------------------------- /src/thread/psp/SDL_sysmutex_c.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2023 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-2023 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-2023 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-2023 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-2023 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-2023 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/vita/SDL_sysmutex_c.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2023 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 | /* vi: set ts=4 sw=4 expandtab: */ 24 | -------------------------------------------------------------------------------- /src/thread/vita/SDL_systhread_c.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2023 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 | 26 | /* vi: set ts=4 sw=4 expandtab: */ 27 | -------------------------------------------------------------------------------- /src/video/SDL_blit_copy.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2023 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-2023 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/android/SDL_androidevents.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2023 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/cocoa/SDL_cocoamessagebox.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2023 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-2023 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_nullvideo.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2023 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 2017-2020 The Khronos Group Inc. 6 | ** SPDX-License-Identifier: Apache-2.0 7 | */ 8 | 9 | /* Platform-specific types and definitions for OpenGL ES 2.X gl2.h 10 | * 11 | * Adopters may modify khrplatform.h and this file to suit their platform. 12 | * Please contribute modifications back to Khronos as pull requests on the 13 | * public github repository: 14 | * https://github.com/KhronosGroup/OpenGL-Registry 15 | */ 16 | 17 | #include 18 | 19 | #ifndef GL_APICALL 20 | #define GL_APICALL KHRONOS_APICALL 21 | #endif 22 | 23 | #ifndef GL_APIENTRY 24 | #define GL_APIENTRY KHRONOS_APIENTRY 25 | #endif 26 | 27 | #endif /* __gl2platform_h_ */ 28 | -------------------------------------------------------------------------------- /src/video/n3ds/SDL_n3dsevents_c.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2023 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_n3dsevents_c_h_ 23 | #define SDL_n3dsevents_c_h_ 24 | 25 | #include "../../SDL_internal.h" 26 | 27 | extern void N3DS_PumpEvents(_THIS); 28 | 29 | #endif /* SDL_n3dsevents_c_h_ */ 30 | 31 | /* vi: set sts=4 ts=4 sw=4 expandtab: */ 32 | -------------------------------------------------------------------------------- /src/video/n3ds/SDL_n3dstouch.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2023 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_n3dstouch_h_ 23 | #define SDL_n3dstouch_h_ 24 | 25 | void N3DS_InitTouch(void); 26 | void N3DS_QuitTouch(void); 27 | void N3DS_PollTouch(void); 28 | 29 | #endif /* SDL_n3dstouch_h_ */ 30 | 31 | /* vi: set sts=4 ts=4 sw=4 expandtab: */ 32 | -------------------------------------------------------------------------------- /src/video/nacl/SDL_naclevents_c.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2023 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-2023 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/ngage/SDL_ngageevents_c.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2023 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_ngagevideo.h" 25 | 26 | extern void NGAGE_PumpEvents(_THIS); 27 | 28 | /* vi: set ts=4 sw=4 expandtab: */ 29 | -------------------------------------------------------------------------------- /src/video/offscreen/SDL_offscreenevents_c.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2023 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 OFFSCREEN_PumpEvents(_THIS); 24 | 25 | /* vi: set ts=4 sw=4 expandtab: */ 26 | -------------------------------------------------------------------------------- /src/video/offscreen/SDL_offscreenvideo.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2023 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_offscreenvideo_h 24 | #define _SDL_offscreenvideo_h 25 | 26 | #include "../SDL_sysvideo.h" 27 | 28 | #endif /* _SDL_offscreenvideo_h */ 29 | 30 | /* vi: set ts=4 sw=4 expandtab: */ 31 | -------------------------------------------------------------------------------- /src/video/os2/SDL_os2messagebox.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2023 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-2023 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-2023 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 | extern void PSP_InitOSKeymap(_THIS); 25 | extern void PSP_PumpEvents(_THIS); 26 | 27 | /* end of SDL_pspevents_c.h ... */ 28 | -------------------------------------------------------------------------------- /src/video/psp/SDL_pspmouse_c.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2023 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-2023 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/riscos/SDL_riscosmouse.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2023 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_riscosmouse_h_ 24 | #define SDL_riscosmouse_h_ 25 | 26 | extern int RISCOS_InitMouse(_THIS); 27 | 28 | #endif /* SDL_riscosmouse_h_ */ 29 | 30 | /* vi: set ts=4 sw=4 expandtab: */ 31 | -------------------------------------------------------------------------------- /src/video/winrt/SDL_winrtmessagebox.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2023 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 | -------------------------------------------------------------------------------- /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/Makefile.os2: -------------------------------------------------------------------------------- 1 | # Open Watcom makefile to build SDL2 tests for OS/2 2 | # wmake -f Makefile.os2 3 | # 4 | # To error out upon warnings: wmake -f Makefile.os2 ENABLE_WERROR=1 5 | 6 | SYSTEM = os2v2 7 | 8 | INCPATH = -I"$(%WATCOM)/h/os2" -I"$(%WATCOM)/h" 9 | 10 | CFLAGS = -bt=os2 -d0 -q -bm -5s -fp5 -fpi87 -sg -oteanbmier -ei 11 | CFLAGS+= -wx -wcd=303 12 | CFLAGS+= -DHAVE_SIGNAL_H 13 | !ifeq ENABLE_WERROR 1 14 | CFLAGS+= -we 15 | !endif 16 | 17 | TNSRCS = testnative.c testnativeos2.c 18 | 19 | !include watcom.mif 20 | -------------------------------------------------------------------------------- /test/Makefile.w32: -------------------------------------------------------------------------------- 1 | # Open Watcom makefile to build SDL2 tests for Win32 2 | # wmake -f Makefile.w32 3 | # 4 | # To error out upon warnings: wmake -f Makefile.w32 ENABLE_WERROR=1 5 | 6 | SYSTEM = nt 7 | 8 | INCPATH = -I"$(%WATCOM)/h/nt" -I"$(%WATCOM)/h" -I"../src/video/khronos" 9 | 10 | CFLAGS = -bt=nt -d0 -q -bm -5s -fp5 -fpi87 -sg -oteanbmier -ei 11 | CFLAGS+= -wx -wcd=303 12 | !ifeq ENABLE_WERROR 1 13 | CFLAGS+= -we 14 | !endif 15 | CFLAGS+= -DSDL_MAIN_HANDLED 16 | CFLAGS+= -DHAVE_OPENGL -DHAVE_SIGNAL_H 17 | GLLIBS = opengl32.lib 18 | 19 | TNSRCS = testnative.c testnativew32.c 20 | 21 | !include watcom.mif 22 | -------------------------------------------------------------------------------- /test/autogen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | cp acinclude.m4 aclocal.m4 6 | 7 | "${AUTOCONF:-autoconf}" 8 | rm aclocal.m4 9 | rm -rf autom4te.cache 10 | -------------------------------------------------------------------------------- /test/axis.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/test/axis.bmp -------------------------------------------------------------------------------- /test/button.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/test/button.bmp -------------------------------------------------------------------------------- /test/controllermap.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/test/controllermap.bmp -------------------------------------------------------------------------------- /test/controllermap_back.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/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/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/test/icon.bmp -------------------------------------------------------------------------------- /test/n3ds/logo48x48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/test/n3ds/logo48x48.png -------------------------------------------------------------------------------- /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/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/test/sample.bmp -------------------------------------------------------------------------------- /test/sample.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/test/sample.wav -------------------------------------------------------------------------------- /test/shapes/p01_shape24.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/test/shapes/p01_shape24.bmp -------------------------------------------------------------------------------- /test/shapes/p01_shape32alpha.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/test/shapes/p01_shape32alpha.bmp -------------------------------------------------------------------------------- /test/shapes/p01_shape8.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/test/shapes/p01_shape8.bmp -------------------------------------------------------------------------------- /test/shapes/p02_shape24.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/test/shapes/p02_shape24.bmp -------------------------------------------------------------------------------- /test/shapes/p02_shape32alpha.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/test/shapes/p02_shape32alpha.bmp -------------------------------------------------------------------------------- /test/shapes/p02_shape8.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/test/shapes/p02_shape8.bmp -------------------------------------------------------------------------------- /test/shapes/p03_shape24.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/test/shapes/p03_shape24.bmp -------------------------------------------------------------------------------- /test/shapes/p03_shape8.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/test/shapes/p03_shape8.bmp -------------------------------------------------------------------------------- /test/shapes/p04_shape1.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/test/shapes/p04_shape1.bmp -------------------------------------------------------------------------------- /test/shapes/p04_shape24.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/test/shapes/p04_shape24.bmp -------------------------------------------------------------------------------- /test/shapes/p04_shape32alpha.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/test/shapes/p04_shape32alpha.bmp -------------------------------------------------------------------------------- /test/shapes/p04_shape8.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/test/shapes/p04_shape8.bmp -------------------------------------------------------------------------------- /test/shapes/p05_shape8.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/test/shapes/p05_shape8.bmp -------------------------------------------------------------------------------- /test/shapes/p06_shape1alpha.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/test/shapes/p06_shape1alpha.bmp -------------------------------------------------------------------------------- /test/shapes/p06_shape24.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/test/shapes/p06_shape24.bmp -------------------------------------------------------------------------------- /test/shapes/p06_shape32alpha.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/test/shapes/p06_shape32alpha.bmp -------------------------------------------------------------------------------- /test/shapes/p06_shape8.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/test/shapes/p06_shape8.bmp -------------------------------------------------------------------------------- /test/shapes/p07_shape24.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/test/shapes/p07_shape24.bmp -------------------------------------------------------------------------------- /test/shapes/p07_shape32alpha.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/test/shapes/p07_shape32alpha.bmp -------------------------------------------------------------------------------- /test/shapes/p07_shape8.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/test/shapes/p07_shape8.bmp -------------------------------------------------------------------------------- /test/shapes/p08_shape24.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/test/shapes/p08_shape24.bmp -------------------------------------------------------------------------------- /test/shapes/p08_shape32alpha.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/test/shapes/p08_shape32alpha.bmp -------------------------------------------------------------------------------- /test/shapes/p08_shape8.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/test/shapes/p08_shape8.bmp -------------------------------------------------------------------------------- /test/shapes/p09_shape24.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/test/shapes/p09_shape24.bmp -------------------------------------------------------------------------------- /test/shapes/p09_shape32alpha.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/test/shapes/p09_shape32alpha.bmp -------------------------------------------------------------------------------- /test/shapes/p09_shape8.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/test/shapes/p09_shape8.bmp -------------------------------------------------------------------------------- /test/shapes/p10_shape1.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/test/shapes/p10_shape1.bmp -------------------------------------------------------------------------------- /test/shapes/p10_shape24.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/test/shapes/p10_shape24.bmp -------------------------------------------------------------------------------- /test/shapes/p10_shape32alpha.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/test/shapes/p10_shape32alpha.bmp -------------------------------------------------------------------------------- /test/shapes/p10_shape8.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/test/shapes/p10_shape8.bmp -------------------------------------------------------------------------------- /test/shapes/p11_shape24.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/test/shapes/p11_shape24.bmp -------------------------------------------------------------------------------- /test/shapes/p11_shape32alpha.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/test/shapes/p11_shape32alpha.bmp -------------------------------------------------------------------------------- /test/shapes/p11_shape8.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/test/shapes/p11_shape8.bmp -------------------------------------------------------------------------------- /test/shapes/p12_shape24.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/test/shapes/p12_shape24.bmp -------------------------------------------------------------------------------- /test/shapes/p12_shape8.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/test/shapes/p12_shape8.bmp -------------------------------------------------------------------------------- /test/shapes/p13_shape24.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/test/shapes/p13_shape24.bmp -------------------------------------------------------------------------------- /test/shapes/p13_shape32alpha.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/test/shapes/p13_shape32alpha.bmp -------------------------------------------------------------------------------- /test/shapes/p13_shape8.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/test/shapes/p13_shape8.bmp -------------------------------------------------------------------------------- /test/shapes/p14_shape24.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/test/shapes/p14_shape24.bmp -------------------------------------------------------------------------------- /test/shapes/p14_shape8.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/test/shapes/p14_shape8.bmp -------------------------------------------------------------------------------- /test/shapes/p15_shape24.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/test/shapes/p15_shape24.bmp -------------------------------------------------------------------------------- /test/shapes/p15_shape32alpha.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/test/shapes/p15_shape32alpha.bmp -------------------------------------------------------------------------------- /test/shapes/p15_shape8.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/test/shapes/p15_shape8.bmp -------------------------------------------------------------------------------- /test/shapes/p16_shape1.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/test/shapes/p16_shape1.bmp -------------------------------------------------------------------------------- /test/shapes/p16_shape24.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/test/shapes/p16_shape24.bmp -------------------------------------------------------------------------------- /test/shapes/p16_shape8.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/test/shapes/p16_shape8.bmp -------------------------------------------------------------------------------- /test/shapes/trollface_24.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/test/shapes/trollface_24.bmp -------------------------------------------------------------------------------- /test/shapes/trollface_32alpha.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/test/shapes/trollface_32alpha.bmp -------------------------------------------------------------------------------- /test/template.test.in: -------------------------------------------------------------------------------- 1 | [Test] 2 | Type=session 3 | Exec=@installedtestsdir@/@exe@ 4 | -------------------------------------------------------------------------------- /test/testfilesystem_pre.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1997-2023 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 | /* Call SDL_GetPrefPath to warm the SHGetFolderPathW cache */ 13 | 14 | /** 15 | * We noticed frequent ci timeouts running testfilesystem on 32-bit Windows. 16 | * Internally, this functions calls Shell32.SHGetFolderPathW. 17 | */ 18 | 19 | #include "SDL.h" 20 | 21 | int main(int argc, char *argv[]) 22 | { 23 | Uint64 start; 24 | (void)argc; 25 | (void)argv; 26 | SDL_Init(0); 27 | start = SDL_GetTicks(); 28 | SDL_GetPrefPath("libsdl", "test_filesystem"); 29 | SDL_Log("SDL_GetPrefPath took %" SDL_PRIu64 "ms", SDL_GetTicks() - start); 30 | SDL_Quit(); 31 | return 0; 32 | } 33 | -------------------------------------------------------------------------------- /test/testgles2_sdf_img_normal.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/test/testgles2_sdf_img_normal.bmp -------------------------------------------------------------------------------- /test/testgles2_sdf_img_sdf.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/test/testgles2_sdf_img_sdf.bmp -------------------------------------------------------------------------------- /test/testkeys.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1997-2023 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 main(int argc, char *argv[]) 23 | { 24 | SDL_Scancode scancode; 25 | 26 | /* Enable standard application logging */ 27 | SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); 28 | 29 | if (SDL_Init(SDL_INIT_VIDEO) < 0) { 30 | SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't initialize SDL: %s\n", SDL_GetError()); 31 | exit(1); 32 | } 33 | for (scancode = 0; scancode < SDL_NUM_SCANCODES; ++scancode) { 34 | SDL_Log("Scancode #%d, \"%s\"\n", scancode, 35 | SDL_GetScancodeName(scancode)); 36 | } 37 | SDL_Quit(); 38 | return 0; 39 | } 40 | -------------------------------------------------------------------------------- /test/testurl.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1997-2023 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 | static void tryOpenURL(const char *url) 15 | { 16 | SDL_Log("Opening '%s' ...", url); 17 | if (SDL_OpenURL(url) == 0) { 18 | SDL_Log(" success!"); 19 | } else { 20 | SDL_Log(" failed! %s", SDL_GetError()); 21 | } 22 | } 23 | 24 | int main(int argc, char **argv) 25 | { 26 | int i; 27 | if (SDL_Init(SDL_INIT_VIDEO) == -1) { 28 | SDL_Log("SDL_Init failed: %s\n", SDL_GetError()); 29 | return 1; 30 | } 31 | 32 | if (argc > 1) { 33 | for (i = 1; i < argc; i++) { 34 | tryOpenURL(argv[i]); 35 | } 36 | } else { 37 | tryOpenURL("https://libsdl.org/"); 38 | } 39 | 40 | SDL_Quit(); 41 | return 0; 42 | } 43 | 44 | /* vi: set ts=4 sw=4 expandtab: */ 45 | -------------------------------------------------------------------------------- /test/testutils.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1997-2023 Sam Lantinga 3 | Copyright 2022 Collabora Ltd. 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. 12 | */ 13 | 14 | #ifndef TESTUTILS_H 15 | #define TESTUTILS_H 16 | 17 | #include "SDL.h" 18 | 19 | SDL_Texture *LoadTexture(SDL_Renderer *renderer, const char *file, SDL_bool transparent, 20 | int *width_out, int *height_out); 21 | char *GetNearbyFilename(const char *file); 22 | char *GetResourceFilename(const char *user_specified, const char *def); 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /test/testyuv.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/test/testyuv.bmp -------------------------------------------------------------------------------- /test/testyuv_cvt.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1997-2023 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/aerisarn/SDL-uwp-gl/b8454648ff1ca435baeb25b497814cfddd854321/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/autogen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cp acinclude.m4 aclocal.m4 4 | 5 | if test "$AUTOCONF"x = x; then 6 | AUTOCONF=autoconf 7 | fi 8 | 9 | $AUTOCONF || exit 1 10 | rm aclocal.m4 11 | rm -rf autom4te.cache 12 | -------------------------------------------------------------------------------- /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/configure.ac: -------------------------------------------------------------------------------- 1 | dnl Process this file with autoconf to produce a configure script. 2 | AC_INIT 3 | AC_CONFIG_SRCDIR([unittest/testquit.c]) 4 | 5 | dnl Detect the canonical build and host environments 6 | AC_CONFIG_AUX_DIR([../build-scripts]) 7 | AC_CANONICAL_HOST 8 | 9 | dnl Check for tools 10 | AC_PROG_CC 11 | 12 | dnl Figure out which math or extra library to use 13 | case "$host" in 14 | *-*-cygwin* | *-*-mingw*) 15 | EXE=".exe" 16 | EXTRALIB="-lshlwapi" 17 | ;; 18 | *) 19 | EXE="" 20 | EXTRALIB="" 21 | ;; 22 | esac 23 | AC_SUBST(EXE) 24 | 25 | dnl Check for SDL 26 | SDL_VERSION=2.0.0 27 | AM_PATH_SDL2($SDL_VERSION, 28 | :, 29 | AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!]) 30 | ) 31 | CFLAGS="$CFLAGS $SDL_CFLAGS" 32 | LIBS="$LIBS -lSDL2_test $SDL_LIBS $EXTRALIB" 33 | 34 | PKG_CHECK_MODULES(LIBUNWIND, libunwind, have_libunwind=yes, have_libunwind=no) 35 | if test x$have_libunwind = xyes ; then 36 | LIBS="$LIBS $LIBUNWIND_LIBS" 37 | fi 38 | 39 | dnl Finally create all the generated files 40 | AC_CONFIG_FILES([Makefile]) 41 | AC_OUTPUT 42 | -------------------------------------------------------------------------------- /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/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/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 | } 29 | -------------------------------------------------------------------------------- /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 --------------------------------------------------------------------------------