test


Log

Author Commit Date CI Message
Sam Lantinga 658975f3 2017-08-11T11:32:00 Fixed bug 3639 - SDL_GetPrefPath returns a path with two consecutive slashes on Unix if org is omitted Fabian Greffrath we use SDL_GetPrefPath() in Chocolate Doom to get a reasonable directory to save and restore config files and savegames: https://github.com/chocolate-doom/chocolate-doom/blob/sdl2-branch/src/m_config.c#L2162 However, since there is no "organization" behind Chocolate Doom and there is really only one "product" called Chocolate Doom, we pass an empty string for the org parameter and the package string for app. This leads to two consecutive slashes in the path returned by SDL_GetPrefPath() like this: /home/user/.local/share//chocolate-doom/ While this is harmless, it sure looks bad. I believe that it should be possible to either pass a NULL pointer for the org parameter or at least have the function detect an empty string as a means to express "there is no origanization, just a single product". The generation of the path string to be returned by the function will have to get adapted accordingly.
Sam Lantinga 222bacd8 2017-08-11T10:32:47 Fixed bug 3682 - Toggle text input in checkkeys when the mouse is clicked Eric Wasylishen Small change to checkkeys so you can toggle text input mode with a mouse click. This is needed for testing how dead keys react to toggling mouse input, i.e. these bugs:
Philipp Wiesemann 707ee5be 2017-07-09T23:00:35 Fixed typo in log message in testime program.
Philipp Wiesemann 705efc35 2017-06-24T23:45:19 Fixed handling only one event per frame in testshape program.
Philipp Wiesemann cb591ee6 2017-06-08T22:40:35 Fixed ignoring first event in testshape program. Found by Cppcheck.
Philipp Wiesemann 850185f4 2017-06-02T22:15:23 Fixed crash if creating textures failed in testshape program.
Ryan C. Gordon 5dc35013 2017-05-29T18:24:06 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. :)
Philipp Wiesemann 088f57a6 2017-05-20T23:30:47 Removed unnecessary call to free() in testoverlay2 program.
Philipp Wiesemann fa3944ba 2017-05-20T23:30:32 Removed unused signal includes and handler in test programs.
Philipp Wiesemann 89499a08 2017-04-29T22:50:23 Removed unused field in loopwavequeue program. Found by Cppcheck.
Philipp Wiesemann 266816b4 2017-03-26T21:00:19 Removed newlines from error messages.
Philipp Wiesemann 34a2a46f 2017-03-19T22:16:37 Removed unused constant in testgesture program.
Sam Lantinga 60ba8552 2017-03-16T16:45:12 Backed out changeset e3fcdad257fc - testaudiocapture.c already does what we want
Sam Lantinga 570e286f 2017-03-15T11:39:54 Added an audio recording test program
Sam Lantinga 6bdc0e72 2017-03-09T15:12:19 Fixed tabs to spaces
Sam Lantinga aae48129 2017-03-09T14:50:23 Added support to loopwave for hotplugging audio devices
Philipp Wiesemann 20c846eb 2017-03-04T23:05:47 Fixed warning about implicit conversion in controllermap program.
Brandon Schaefer 94a69443 2017-03-01T15:05:54 mistake: Revert the files that I did not mean to commit
Brandon Schaefer 7bbb13ea 2017-03-01T14:50:59 * Some refactoring and bug fixes. Thanks Micha? Kuchta!
Philipp Wiesemann dfa8fb31 2017-02-19T21:05:42 Fixed warnings if compiling loopwave programs with C++.
Sam Lantinga 6717a3d3 2017-01-31T12:23:29 Added support for the HOTAS Warthog throttle
Sam Lantinga a156b0d9 2017-01-31T10:20:09 Added the HOTAS Warthog as a flight stick
Philipp Wiesemann 5e78bc64 2017-01-21T22:00:40 Fixed copyright symbol in testgles2 program.
Sam Lantinga a395a907 2017-01-20T16:40:11 Fixed mapping the PG-9021 which, on Linux, emits a button partway through the trigger press along with axis motion all along the pull
Philipp Wiesemann 2b481015 2017-01-14T21:34:45 Fixed warnings about missing initializers in testoverlay2 program.
Sam Lantinga a52d48c5 2017-01-10T08:54:33 Fixed bugs 2570, 3145, improved OpenGL ES context support on Windows and X11 Mark Callow The attached patch does the following for the X11 and Windows platforms, the only ones where SDL attempts to use context_create_es_profile: - Adds SDL_HINT_OPENGL_ES_DRIVER by which the application can say to use the OpenGL ES driver & EGL rather than the Open GL driver. (For bug #2570) - Adds code to {WIN,X11}_GL_InitExtensions to determine the maximum OpenGL ES version supported by the OpenGL driver (for bug #3145) - Modifies the test that determines whether to use the OpenGL driver or the real OpenGL ES driver to take into account the hint, the requested and supported ES version and whether ES 1.X is being requested. (For bug #2570 & bug #3145) - Enables the testgles2 test for __WINDOWS__ and __LINUX__ and adds the test to the VisualC projects. With the fix in place I have run testdraw2, testgl and testgles2 without any issues and have run my own apps that use OpenGL, OpenGL ES 3 and OpenGL ES 1.1.
Ryan C. Gordon 97f19cc3 2017-01-09T15:56:11 testresample: write correct length to the .wav header.
Ryan C. Gordon 38854e03 2017-01-08T16:18:49 audio: Improvements in channel conversion code.
Ryan C. Gordon 70c8bd24 2017-01-07T22:24:45 Fixed a bunch of compiler warnings in the test code.
Sam Lantinga 4938c505 2017-01-04T10:28:07 Added SDL_JoystickGetAxisInitialState() to get a joystick axis' initial value. This is useful for controller mapping programs to determine an axis' zero state
Sam Lantinga 1ddff75c 2017-01-04T05:09:02 Some controllers have trouble getting out to 20000
Sam Lantinga 082132a7 2017-01-03T23:39:28 Fixed binding the D-pad on some Super NES style controllers Fixed a case where partial trigger pull could be bound to another button There is a fundamental problem not resolved by this commit: Some controllers have axes (triggers, pedals, etc.) that don't start at zero, but we're guaranteed that if we get a value that it's correct. For these controllers, the current code works, where we take the first value we get and use that as the zero point and generate axis motion starting from that point on. Other controllers have digital axes (D-pad) that assume a zero starting point, and the first value we get is the min or max axis value when the D-pad is moved. For these controllers, the current code thinks that the zero point is the axis value after the D-pad motion and this doesn't work. My hypothesis is that the first class of devices is more common and that we should solve for that, and add an exception to SDL_JoystickAxesCenteredAtZero() as needed for the second class of devices.
Sam Lantinga 45b774e3 2017-01-01T18:33:28 Updated copyright for 2017
Philipp Wiesemann e61daa72 2016-12-30T19:57:50 Fixed warning and missing animation delay in testoverlay2 program.
Philipp Wiesemann c2b90f2d 2016-12-28T20:11:29 Fixed compiling of testgamecontroller program with C++.
Philipp Wiesemann de79828b 2016-12-28T20:11:12 Fixed warning about unused variable in controllermap program.
Sam Lantinga 21cb42d7 2016-12-27T09:51:58 Make sure we go all the way back (within the XBox controller dead zone) to prevent accidentally binding axes inverted
Sam Lantinga 6d7da088 2016-12-27T01:39:07 Split controller axes into positive and negative sides so each can be bound independently. Using this a D-Pad can be mapped to a thumbstick and vice versa. Also added support for inverted axes, improving trigger binding support
Philipp Wiesemann b515b34d 2016-12-16T22:58:32 Fixed hotplug with more than one device in testjoystick program.
Philipp Wiesemann 0a3f9d0c 2016-12-16T22:58:16 Fixed warning about unused variable in controllermap program.
Sam Lantinga 0c5e7a10 2016-12-15T14:27:22 Fixed handling joysticks that send multiple events for a single control, e.g. both a button and axis event for a trigger. Tested with the 8Bitdo NES30 Pro on Linux
Sam Lantinga 70aa2a57 2016-12-09T04:17:10 Only print out the controller mappings if we're not going to test a controller
Sam Lantinga 68d7be39 2016-12-06T00:40:09 Fixed bug 3508 - variably modified ?SDL_dummy_size? at file scope in test/testatomic.c Ciro Santilli GCC 6, Ubuntu 16.10, cd test; ./configure; make /bin/sh config.status Makefile config.status: creating Makefile gcc -o loopwave loopwave.c -g -O2 -D_REENTRANT -I/usr/include/SDL2 -DHAVE_OPENGLES2 -DHAVE_OPENGL -DHAVE_SDL_TTF -g -lSDL2_test -lSDL2 gcc -o testatomic testatomic.c -g -O2 -D_REENTRANT -I/usr/include/SDL2 -DHAVE_OPENGLES2 -DHAVE_OPENGL -DHAVE_SDL_TTF -g -lSDL2_test -lSDL2 In file included from /usr/include/SDL2/SDL_main.h:25:0, from /usr/include/SDL2/SDL.h:32, from testatomic.c:14: /usr/include/SDL2/SDL_stdinc.h:261:20: error: variably modified ?SDL_dummy_size? at file scope typedef int SDL_dummy_ ## name[(x) * 2 - 1] ^ testatomic.c:106:1: note: in expansion of macro ?SDL_COMPILE_TIME_ASSERT? SDL_COMPILE_TIME_ASSERT(size, CountTo>0); /* check for rollover */ ^~~~~~~~~~~~~~~~~~~~~~~ Makefile:114: recipe for target 'testatomic' failed make: *** [testatomic] Error 1 If I remove the line SDL_COMPILE_TIME_ASSERT(size, CountTo>0); /* check for rollover */ it works, lazy to figure out the best way to do this.
Sam Lantinga dd5d85a4 2016-11-29T06:36:57 Added an API to iterate over game controller mappings
Ryan C. Gordon 35430a73 2016-11-17T01:15:16 cpuinfo: first attempt at SDL_HasNEON() implementation.
Sam Lantinga c406f649 2016-11-10T18:53:50 Added USB VID/PID information to the SDL test programs
Sam Lantinga 0396af65 2016-11-06T14:13:28 Shifting a value by more than its bits isn't defined and has varying behavior depending on compiler and platform
Sam Lantinga 40b571c9 2016-11-06T10:01:08 Fixed bug 3468 - _allshr in SDL_stdlib.c is not working properly Mark Pizzolato On Windows with Visual Studio, when building SDL as a static library using the x86 (32bit) mode, several intrinsic operations are implemented in code in SDL_stdlib.c. One of these, _allshr() is not properly implemented and fails for some input. As a result, some operations on 64bit data elements (long long) don't always work. I classified this bug as a blocker since things absolutely don't work when the affected code is invoked. The affected code is only invoked when SDL is compiled in x86 mode on Visual Studio when building a SDL as a static library. This build environment isn't common, and hence the bug hasn't been noticed previously. I reopened #2537 and mentioned this problem and provided a fix. That fix is provided again here along with test code which could be added to some of the SDL test code. This test code verifies that the x86 intrinsic routines produce the same results as the native x64 instructions which these routines emulate under the Microsoft compiler. The point of the tests is to make sure that Visual Studio x86 code produces the same results as Visual Studio x64 code. Some of the arguments (or boundary conditions) may produce different results on other compiler environments, so the tests really shouldn't be run on all compilers. The test driver only actually exercised code when the compiler defines _MSC_VER, so the driver can generically be invoked without issue.
Sam Lantinga 52988309 2016-11-05T01:48:14 Fixed bug 3480 - minor update to NACL common.js Sylvain All latest official NACL examples have a slightly different 'common.js' file. It seems it has been updated in the meantime to fix a bug.
Philipp Wiesemann 98d188f5 2016-10-30T21:01:46 Added call to SDL_HasAVX2() in platform test program.
Philipp Wiesemann 826508b6 2016-10-15T20:01:30 Removed unused constants in controllermap program.
Sam Lantinga c490b54e 2016-10-13T04:01:25 Fixed black screen on Steam Link
Sam Lantinga cb7b823c 2016-10-13T02:09:37 Fixed black screen on Steam Link
Philipp Wiesemann ed80cfd9 2016-10-12T23:36:49 Removed empty statements in tests.
Philipp Wiesemann 367a6a3d 2016-10-09T20:31:32 Fixed compiling of three test programs with C++.
Sam Lantinga 56c88c45 2016-10-04T04:08:02 Modified the custom cursor test to be able to load BMP files as cursors
Sam Lantinga f032f811 2016-10-01T12:43:14 Fixed bug 3318 - testime.c enhancement with GNU Unifont support Simon Hug I'm proposing some changes to the IME test program test/testime.c. The patch includes support for the GNU Unifont hex file, making the SDL_ttf dependency optional. There were also one or two bugs that prevented the text and underline from showing up poperly.
Sam Lantinga 3ac201cf 2016-10-01T12:33:26 Fixed bug 3319 - Getting the POSIX out of testqsort.c Simon Hug There's a call to the POSIX function random in test/testqsort.c. Naturally, Windows doesn't do that. The attached patch changes the call to the SDLtest framework random functions and adds some seed control. Looking at SDLTest_RandomInitTime, I just want to say that 'srand((unsigned int)time(NULL)); a=rand(); srand(clock()); b=rand();' is an absolutely terrible way to initialize a seed on Windows because of its terrible LCG.
Sam Lantinga 2cbe9e2b 2016-10-01T12:29:55 Fixed bug 3322 - Missing error checking in testaudioinfo and testaudiohotplug Simon Hug The two tests test/testaudioinfo.c and test/testaudiohotplug.c are missing error checking when they call SDL_GetAudioDeviceName. This function can return NULL which the tests pass straight to SDL_Log.
Philipp Wiesemann 929b965c 2016-09-21T23:06:38 Fixed compiling of three test programs with C++.
Philipp Wiesemann 48490a52 2016-08-30T21:16:04 Fixed log message in audio capture test program.
Ryan C. Gordon b6daf1f6 2016-08-12T22:50:48 testaudiocapture: ask for way more output samples. Fixes Emscripten builds on Chrome for Android.
Ryan C. Gordon 3139e5d1 2016-08-09T16:57:49 testaudiocapture: open capture device to same spec as output device. ...since our resampler is still terrible (sorry!).
Ryan C. Gordon a15b9740 2016-08-06T02:48:00 testaudiocapture: use capture device buffer queueing, for better test coverage.
Ryan C. Gordon 7bfe494c 2016-08-06T02:45:51 testaudiocapture: don't use fullscreen for the window.
Ryan C. Gordon 3ed9b0f5 2016-08-03T00:31:08 testaudiocapture: made test app interactive. (hold down mouse/finger to record, then it plays back what it heard. Repeat.)
Ryan C. Gordon f758483a 2016-08-02T19:17:51 testaudiocapture: Make a simple green/red window when recording/playing.
Ryan C. Gordon b35b9f95 2016-08-02T13:38:56 testaudiocapture: Let specific devices be opened.
Ryan C. Gordon ee099750 2016-08-01T00:18:56 audio: Initial bits to enable audio capture support.
Brandon Schaefer 578edca4 2016-07-13T09:41:43 Tests: Would be wise to compile this
Brandon Schaefer bebb6dee 2016-07-13T07:39:01 Tests: Somehow tabs leaked in...
Brandon Schaefer f2413850 2016-07-13T07:34:06 Tests: Add a manual test for a custom cursor (Taken from the API docs)
Brandon Schaefer d8866e84 2016-07-13T07:07:46 Tests: Mir needs the window to swap at lease 1 frame for the cursor to show. So render in testwm2
Philipp Wiesemann b5246571 2016-06-28T21:15:16 Fixed three source comments in tests.
Philipp Wiesemann b5aa5b04 2016-06-28T21:14:11 Added a simple test case for SDL_sscanf() to tests. It fails on platforms where SDL's custom implementation is used. Relates to Bugzilla #3341.
Philipp Wiesemann 73b63e5b 2016-05-10T21:13:58 Fixed crash in shape test program if memory allocation failed.
Philipp Wiesemann 31e23d57 2016-05-10T21:12:48 Fixed error return values in filesystem test program.
Philipp Wiesemann 6a9a8b68 2016-05-05T22:05:21 Fixed memory leak in game controller test program.
Philipp Wiesemann b53007b0 2016-04-14T21:10:08 Added missing error return in test program.
Philipp Wiesemann 9011eb1c 2016-03-28T21:02:30 Removed not needed SDL_WINDOW_SHOWN from chessboard test program.
Philipp Wiesemann b82f48ba 2016-03-10T21:00:27 Fixed compiling IME test program with HAVE_SDL_TTF on C89 compilers.
Philipp Wiesemann 43594e3f 2016-03-10T21:00:13 Removed unnecessary include statement in test program.
Ryan C. Gordon deb2acbc 2016-03-10T01:50:43 A simple test program for SDL_qsort().
Philipp Wiesemann 21d32975 2016-03-03T20:11:43 Fixed compile warnings about unused variables in IME test program.
Philipp Wiesemann e8b43685 2016-03-02T20:24:43 Replaced strlen() with SDL_strlen() in IME test program.
Ryan C. Gordon 416d0466 2016-01-07T14:02:37 Mac: Implemented SDL_GetDisplayDPI (thanks, Kirill!). Fixes Bugzilla #3223.
Ryan C. Gordon f9b73793 2016-01-05T02:26:45 Added SDL_DROPTEXT event, for dragging and dropping string data. This patch is based on work in Unreal Engine 4's fork of SDL, compliments of Epic Games.
Ryan C. Gordon 8e855f2f 2016-01-05T01:42:00 Added SDL_DROPBEGIN and SDL_DROPCOMPLETE events, plus window IDs for drops. This allows an app to know when a set of drops are coming in a grouping of some sort (for example, a user selected multiple files and dropped them all on the window with a single drag), and when that set is complete. This also adds a window ID to the drop events, so the app can determine to which window a given drop was delivered. For application-level drops (for example, you launched an app by dropping a file on its icon), the window ID will be zero.
Ryan C. Gordon c3114975 2016-01-04T23:52:40 Added SDL_GetDisplayUsableBounds().
Ryan C. Gordon fa8c83c1 2016-01-03T06:50:50 Remove almost all instances of "volatile" keyword. As Tiffany pointed out in Bugzilla, volatile is not useful for thread safety: https://software.intel.com/en-us/blogs/2007/11/30/volatile-almost-useless-for-multi-threaded-programming/ Some of these volatiles didn't need to be, some were otherwise protected by spinlocks or mutexes, and some got moved over to SDL_atomic_t data, etc. Fixes Bugzilla #3220.
Sam Lantinga 42065e78 2016-01-02T10:10:34 Updated copyright to 2016
Philipp Wiesemann 1446faf0 2015-12-25T13:41:23 Fixed a comment in two test programs.
Sam Lantinga cbe19d53 2015-12-24T06:11:05 Fixed whitespace in testspriteminimal.c
Sam Lantinga 7b680a2a 2015-12-18T18:49:23 Fixed mapping third party XBox controllers that have the trigger axis all the way in until they are pulled and get updated values.
Philipp Wiesemann 11c13916 2015-12-07T21:43:16 Fixed outdated information in README for test programs. Two programs were removed some time ago and one was renamed.
Philipp Wiesemann 96229eed 2015-12-06T17:50:51 Changed comment in test program to avoid confusion. There is a library called SDL_sound which is not used here.
Philipp Wiesemann 4abb7329 2015-12-04T22:12:36 Fixed comment in filesystem test program.
Philipp Wiesemann 74de09ad 2015-12-01T22:24:04 Fixed compile error in timer test program if PRIu64 not available.
Philipp Wiesemann 1e2a4439 2015-12-01T22:22:58 Fixed compile warning in IME test program.
Philipp Wiesemann b2445f7b 2015-12-01T22:21:29 Fixed filesystem test program to compile with older versions of C.