Commit Graph

96 Commits

Author SHA1 Message Date
Ryan C. Gordon
846526767d test: Makefile should copy .dat files for testoverlay2. 2018-09-02 00:35:11 -04:00
Sam Lantinga
6a6db94f54 First pass on the new SDL sensor API 2018-08-21 12:11:34 -07:00
Sam Lantinga
d20102e9e1 Fixed building YUV test programs (thanks Ozkan!) 2017-11-17 10:54:46 -08:00
Sam Lantinga
44087f9b2f Updated SDL's YUV support, many thanks to Adrien Descamps
New functions get and set the YUV colorspace conversion mode:
	SDL_SetYUVConversionMode()
	SDL_GetYUVConversionMode()
	SDL_GetYUVConversionModeForResolution()

SDL_ConvertPixels() converts between all supported RGB and YUV formats, with SSE acceleration for converting from planar YUV formats (YV12, NV12, etc) to common RGB/RGBA formats.

Added a new test program, testyuv, to verify correctness and speed of YUV conversion functionality.
2017-11-12 22:51:12 -08:00
Ryan C. Gordon
10d552ae31 vulkan: Initial Vulkan support!
This work was done by Jacob Lifshay and Mark Callow; I'm just merging it
into revision control.
2017-08-27 22:15:57 -04:00
Ryan C. Gordon
8fad524409 test: Makefile.in should copy bitmap and wave files to build directory.
I've lost count of the times I've forgotten to do this manually and wondered
why loopwave can't open sample.wav.  :)
2017-05-29 18:24:06 -04:00
Sam Lantinga
d66f238377 Backed out changeset 90e5cb81c483 - testaudiocapture.c already does what we want 2017-03-16 16:45:12 -07:00
Sam Lantinga
71dad8a81e Added an audio recording test program 2017-03-15 11:39:54 -07:00
Ryan C. Gordon
5b2b9fb1f8 audio: Initial bits to enable audio capture support. 2016-08-01 00:18:56 -04:00
Brandon Schaefer
9db1333999 Tests: Would be wise to compile this 2016-07-13 09:41:43 -07:00
Ryan C. Gordon
3373009f25 A simple test program for SDL_qsort(). 2016-03-10 01:50:43 -05:00
Ryan C. Gordon
34581fedd1 Added SDL_GetDisplayUsableBounds(). 2016-01-04 23:52:40 -05:00
Ryan C. Gordon
13cafe01a0 Added test/testdisplayinfo.c 2015-07-14 21:28:26 -04:00
Ryan C. Gordon
8dc3028044 Initial work on audio device hotplug support.
This fills in the core pieces and fully implements it for Mac OS X.

Most other platforms, at the moment, will report a disconnected device if
it fails to write audio, but don't notice if the system's device list changed
at all.
2015-03-16 02:11:39 -04:00
Philipp Wiesemann
313c38e43f Removed missing test program from Makefile. 2014-12-25 22:47:04 +01:00
Ryan C. Gordon
a9626cb76e Initial merge of Emscripten port!
With this commit, you can compile SDL2 with Emscripten
( http://emscripten.org/ ), and make your SDL-based C/C++ program
into a web app.

This port was due to the efforts of several people, including: Charlie Birks,
Sathyanarayanan Gunasekaran, Jukka Jylänki, Alon Zakai, Edward Rudd,
Bruce Mitchener, and Martin Gerhardy. (Thanks, everyone!)
2014-12-18 00:19:52 -05:00
Ryan C. Gordon
01187b701d Added audio device buffer queueing API. 2014-07-22 21:41:49 -04:00
Shawn Walker
f0b0159135 2620 solaris port missing atomics if not using gcc 2014-07-05 16:11:23 -07:00
Ryan C. Gordon
7af1c6e050 Changed drag area API to a hit-testing API.
There were several good arguments for this: it's how Windows works with
 WM_NCHITTEST, SDL doesn't need to manage a list of rects, it allows more
 control over the regions (how do you use rects to cleanly surround a circular
 button?), the callback can be more optimized than a iterating a list of
 rects, and you don't have to send an updated list of rects whenever the
 window resizes or layout changes.
2014-05-28 01:22:47 -04:00
Ryan C. Gordon
6146fd1f61 First shot at SDL_SetWindowDragAreas().
Only Cocoa implemented right now.
2014-05-27 01:27:42 -04:00
Andreas Schiffler
353b516a34 Add input validation to SDL_getenv/SDL_setenv; update Stdlib testsuite; add Hints testsuite 2014-03-19 21:39:55 -07:00
Edward Rudd
92a8ee88f0 add simple test showing off hotplugging of joysticks w/ haptic. 2014-02-03 22:52:18 -05:00
Gabriel Jacobo
74cba7bdbe Wayland support
Based on the original port to Wayland by: Joel Teichroeb, Benjamin Franzke, Scott Moreau, et al.

Additional changes in this commit, done by me:

* Wayland uses the common EGL framework
* EGL can now create a desktop OpenGL context
* testgl2 loads GL functions dynamically, no need to link to libGL anymore
* Assorted fixes to the Wayland backend

Tested on the Weston Compositor (v1.0.5) that ships with Ubuntu 13.10,
running Weston under X. Tests ran: testrendercopyex (all backends), testgl2, testgles2,testintersections
2013-12-14 20:18:43 -03:00
Gabriel Jacobo
a0af4271a0 Adds controllermap utility to test suite. 2013-12-02 19:35:04 -03:00
Gabriel Jacobo
fbda2dcacf Adds testgles2
Source code copied from: https://github.com/fantasydr/sdl-2.0-gles (thanks!)

Minor fixes, configure script changes done by me.
2013-11-19 10:56:38 -03:00
Sam Lantinga
1a3156f0c9 Added viewport test, contributed by Andreas Schiffler and improved by me and Ryan Gordon.
If it works correctly you should see a square moving from the upper left to the lower right, with a little yellow box at the top of the moving square.

You can pass --target as a command line option to have it use a render target instead of rendering directly to the screen.  The output should be identical in this case.
2013-11-15 22:05:26 -08:00
Edward Rudd
23058a432a added simple Drag & drop test 2013-10-12 11:21:40 -04:00
Gabriel Jacobo
d62885425b Fixes testgles and testgl 2013-10-09 11:30:01 -03:00
Ryan C. Gordon
8fe1cf47f2 Added SDL_GetBasePath() and SDL_GetPrefPath() in new filesystem module. 2013-08-20 19:57:11 -04:00
Sam Lantinga
aab0048d87 Added example of using the software renderer and window surface API, contributed by Nitin Jain. 2013-07-27 03:48:23 -07:00
Sam Lantinga
04f86925d1 Fixed bug 1973 - test/Makefile.in fails on Mac OS X with X11 enabled...
Ryan C. Gordon

If you have the X11 SDK installed on Mac OS X, you'll build with X11 support, but the Makefile doesn't build anything but the Cocoa testnative code for Mac OS X, which is fine, but then testnative fails to link because testnative.h enables the X11 support based on the SDL config header.

Building the testnativex11.c code on Mac OS X doesn't work because you need to explicitly link with "-L/usr/X11/lib -lX11" if this code is enabled, but you can't link with that by default because the X11 SDK might be missing.

So this needs a little configure magic to do the right thing (or forcibly disabling X11 support on Mac OS X in testnative.h).
2013-07-21 12:47:47 -07:00
Sam Lantinga
1354508566 We already link SDL2_test by default now. 2013-06-05 21:14:26 -07:00
Sam Lantinga
e576d9c370 Fixed testnative on Mac OS X, which no longer ships X11 by default. 2013-06-02 01:08:14 -07:00
Sam Lantinga
9ab99a4157 Added the beginning of automated tests for the standard C library routines.
Implemented more SDL_snprintf format specifiers.
2013-05-24 03:23:21 -07:00
Andreas Schiffler
13ea116dc5 Add pixels test suite; add a test to pixel suite; minor updates to test code to make VisualStudio happy 2013-05-01 22:14:29 -07:00
Jørgen P. Tjernø
e8a48ee6c0 Don't clobber refcounting in SDL_Init.
- Fixes bug 1712 by not overwriting SDL_SubsystemRefCount in SDL_Init.
       - Removes the SDL_initialized variable, and makes SDL_SubsystemRefCount
         the canonical source of truth for whether or not a subsystem has been
         initialized.
       - Refactors SDL_InitSubSystem and SDL_QuitSubSystem to use helper
         functions to manage refcount.
       - Adds automated tests for SDL_Init/Quit*.
       - Adds SDL_bits.h which contains SDL_MostSignificantBitIndex.
2013-02-12 11:47:31 -08:00
Andreas Schiffler
5bda818e44 Add SDL_test test suite; add fuzzer test cases; fix fuzzer bug; fix compiler warnings 2013-02-08 07:14:50 -08:00
Andreas Schiffler
ef298de2c7 Added timer test suite 2013-01-14 08:14:53 -08:00
Andreas Schiffler
d58a914fe2 Add new test suite (mouse) with a few new tests 2013-01-06 18:19:30 -08:00
Andreas Schiffler
9da98d7dbf Add new test suites (events, keyboard, syswm, video) with a few new tests each 2013-01-06 15:17:59 -08:00
Sam Lantinga
ffbbd3a64a Switched the test code over to use the common functions in the test library. 2012-12-31 10:26:38 -08:00
Andreas Schiffler
e00532130b Add surface test suite; minor improvements to render suite; refactor image saving into test lib compare function; fix for Haiku build 2012-12-26 22:26:44 -08:00
Andreas Schiffler
669e4e9a21 Added audio test suite; minor code cleanups in test lib 2012-12-24 14:43:57 -08:00
Andreas Schiffler
d338caf7b0 Reorder test lib use to fix build for some compilers 2012-12-22 20:13:25 -08:00
Sam Lantinga
9b0d19d010 Added the automation test to the autoconf build system 2012-12-22 17:24:42 -08:00
Sam Lantinga
23950f0183 Added hotplug joystick support and simplified game controller API, courtesy of Alfred Reynolds 2012-11-26 16:37:54 -08:00
Sam Lantinga
5af7f9c836 tree 46b4d59cbfb1
parent adac5aad395d
author Edward Rudd <urkle@outoforder.cc> 1351362890 14400
committer Edward Rudd <urkle@outoforder.cc> 1351362890 14400
revision 6611
branch default

add test to show off the new MessageBox API
2012-10-30 10:11:25 -07:00
Sam Lantinga
0fa9c6eac2 Fixed building testjoystick 2012-10-23 17:10:09 -07:00
Sam Lantinga
1f9c1c3528 Updated testjoystick for SDL 2.0 API - patch from simon 2012-10-14 00:24:07 -07:00
Ryan C. Gordon
784d15354b Added testaudioinfo to the build. 2012-09-01 00:25:17 -07:00