Commit graph

97 commits

Author SHA1 Message Date
Ryan C. Gordon
86819b840e test: configure/make shouldn't build GL/GLES1/GLES2 programs if unsupported.
--HG--
extra : rebase_source : d9c00eb8bec76420696cd6c107109ec47f205b85
2019-05-18 23:47:57 -04:00
Ryan C. Gordon
2a81de7287 test: Makefile should copy .dat files for testoverlay2. 2018-09-02 00:35:11 -04:00
Sam Lantinga
09c276f295 First pass on the new SDL sensor API 2018-08-21 12:11:34 -07:00
Sam Lantinga
72dec56391 Fixed building YUV test programs (thanks Ozkan!) 2017-11-17 10:54:46 -08:00
Sam Lantinga
145d2469ae 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
a566435db1 vulkan: Initial Vulkan support!
This work was done by Jacob Lifshay and Mark Callow; I'm just merging it
into revision control.

--HG--
extra : rebase_source : cb3bb332146125366b5242c0d7444f44638733d9
extra : amend_source : c72ebb6d3a92efc3fdd085ce3b6d4b1d7f573cc9
2017-08-27 22:15:57 -04:00
Ryan C. Gordon
f2be7cdc96 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
4fdfeb9f42 Backed out changeset 90e5cb81c483 - testaudiocapture.c already does what we want 2017-03-16 16:45:12 -07:00
Sam Lantinga
8b764c2a46 Added an audio recording test program 2017-03-15 11:39:54 -07:00
Ryan C. Gordon
d2873d0971 audio: Initial bits to enable audio capture support.
--HG--
extra : histedit_source : ae3938cddad98d32fdec1221ef1ed57ebb2d20e0
2016-08-01 00:18:56 -04:00
Brandon Schaefer
d1caaa42c9 Tests: Would be wise to compile this 2016-07-13 09:41:43 -07:00
Ryan C. Gordon
8fc20326aa A simple test program for SDL_qsort(). 2016-03-10 01:50:43 -05:00
Ryan C. Gordon
6a3cfbf68f Added SDL_GetDisplayUsableBounds().
--HG--
extra : histedit_source : 3c9c2d344e3e3ff20bd86035066b65810346ac3e
2016-01-04 23:52:40 -05:00
Ryan C. Gordon
aac01f81ad Added test/testdisplayinfo.c 2015-07-14 21:28:26 -04:00
Ryan C. Gordon
e98dd173b7 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.

--HG--
extra : rebase_source : f7e7efbbeecfe58338b0f325340c358c2bdfc402
2015-03-16 02:11:39 -04:00
Philipp Wiesemann
dbc52081d6 Removed missing test program from Makefile. 2014-12-25 22:47:04 +01:00
Ryan C. Gordon
de88474dda 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!)

--HG--
extra : rebase_source : 97af74c8a5121e926ebe89f123536b5dd6681695
2014-12-18 00:19:52 -05:00
Ryan C. Gordon
a261470598 Added audio device buffer queueing API.
--HG--
extra : rebase_source : a454256d88e413a4898b5005472625f755abfad4
2014-07-22 21:41:49 -04:00
Shawn Walker
f2c61cdaa5 2620 solaris port missing atomics if not using gcc 2014-07-05 16:11:23 -07:00
Ryan C. Gordon
9e98d09104 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.

--HG--
rename : test/testdragareas.c => test/testhittesting.c
2014-05-28 01:22:47 -04:00
Ryan C. Gordon
cce4ce44d4 First shot at SDL_SetWindowDragAreas().
Only Cocoa implemented right now.

--HG--
extra : amend_source : b178ad0ae25b933b284ed1bda89df750ddd27fb3
2014-05-27 01:27:42 -04:00
Andreas Schiffler
721340f510 Add input validation to SDL_getenv/SDL_setenv; update Stdlib testsuite; add Hints testsuite 2014-03-19 21:39:55 -07:00
Edward Rudd
1e7e71be86 add simple test showing off hotplugging of joysticks w/ haptic.
--HG--
extra : rebase_source : 89ded9c8f4d99dc64497d7ff82a7811cf40ace3c
2014-02-03 22:52:18 -05:00
Gabriel Jacobo
3308d271b5 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
9054b03edb Adds controllermap utility to test suite. 2013-12-02 19:35:04 -03:00
Gabriel Jacobo
67b0e2ce38 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
dd88bbb8d8 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
02263d4148 added simple Drag & drop test
--HG--
extra : rebase_source : e72b921485c5fc5ad1b7c7849802c020d49a06d3
2013-10-12 11:21:40 -04:00
Gabriel Jacobo
dca7c7b00d Fixes testgles and testgl 2013-10-09 11:30:01 -03:00
Ryan C. Gordon
2b9a2802b2 Added SDL_GetBasePath() and SDL_GetPrefPath() in new filesystem module.
--HG--
extra : rebase_source : c1fac232063443a2880e64f1abda85e0bdb2e710
2013-08-20 19:57:11 -04:00
Sam Lantinga
17482012af 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
fe2bb8805e 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
8731286cb4 We already link SDL2_test by default now. 2013-06-05 21:14:26 -07:00
Sam Lantinga
a54ea6ce9f Fixed testnative on Mac OS X, which no longer ships X11 by default. 2013-06-02 01:08:14 -07:00
Sam Lantinga
03210bff7e 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
985951f70e 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ø
f85aeb98c7 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
da76be8927 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
a971c6b291 Added timer test suite 2013-01-14 08:14:53 -08:00
Andreas Schiffler
5220df817b Add new test suite (mouse) with a few new tests 2013-01-06 18:19:30 -08:00
Andreas Schiffler
687ba034f6 Add new test suites (events, keyboard, syswm, video) with a few new tests each 2013-01-06 15:17:59 -08:00
Sam Lantinga
ac0f89315c Switched the test code over to use the common functions in the test library. 2012-12-31 10:26:38 -08:00
Andreas Schiffler
9ddb1f459d 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
d9a9083464 Added audio test suite; minor code cleanups in test lib 2012-12-24 14:43:57 -08:00
Andreas Schiffler
1b63b3fd52 Reorder test lib use to fix build for some compilers 2012-12-22 20:13:25 -08:00
Sam Lantinga
fff2381298 Added the automation test to the autoconf build system
--HG--
rename : test/tests/testclipboard.c => test/testautomation_clipboard.c
rename : test/tests/testplatform.c => test/testautomation_platform.c
rename : test/tests/testrect.c => test/testautomation_rect.c
rename : test/tests/testrender.c => test/testautomation_render.c
rename : test/tests/testrwops.c => test/testautomation_rwops.c
rename : test/tests/testsuites.h => test/testautomation_suites.h
2012-12-22 17:24:42 -08:00
Sam Lantinga
34b88dfaae Added hotplug joystick support and simplified game controller API, courtesy of Alfred Reynolds 2012-11-26 16:37:54 -08:00
Sam Lantinga
d44d7c1989 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
41cb1847ac Fixed building testjoystick 2012-10-23 17:10:09 -07:00
Sam Lantinga
612c9439a4 Updated testjoystick for SDL 2.0 API - patch from simon 2012-10-14 00:24:07 -07:00