test


Log

Author Commit Date CI Message
Sam Lantinga eb3bf80f 2021-09-21T18:15:09 Fixed compiler warnings using Visual Studio 2019
Ozkan Sezer e55b8507 2021-09-20T23:50:02 minor tidy-up in os2 makefile for tests.
Ozkan Sezer e967f002 2021-09-10T00:01:20 testmouse.c: remove unused local var.
Cameron Cawley 83020658 2021-09-09T21:33:35 Add testmouse
Ozkan Sezer 2c6f52d1 2021-09-06T15:24:50 regenerate test/configure really with ac2.69
Simon McVittie 2e3a415b 2021-09-06T13:09:09 test: Use a static pattern rule to copy data to $(builddir) The version with an implicit pattern rule tended to fail if test/ was built in an "out-of-tree" build directory not below test/, for example: cd SDL mkdir _build-test ( cd _build-test; ../test/configure ) make -C _build-test as a result of the pattern rule first checking for axis.bmp, then for ../test/axis.bmp, then ../test/../test/axis.bmp, and so on until the maximum path length was reached. Note that this requires GNU make. The FreeBSD ports file for SDL seems to use GNU make (gmake) already, so presumably SDL's build system is already relying on GNU make extensions. Signed-off-by: Simon McVittie <smcv@debian.org>
Ozkan Sezer 9837a327 2021-09-06T14:55:40 regenerated test/configure
Simon McVittie 91ce6019 2021-09-06T10:40:23 test: Fix path used in AC_CONFIG_AUX_DIR AC_CONFIG_AUX_DIRS is an undocumented, internal version of AC_CONFIG_AUX_DIR that takes a whitespace-separated list, instead of a single path to add to the list. It also does not automatically treat the given path as being relative to the $srcdir, unlike the documented AC_CONFIG_AUX_DIR. Newer versions of autoconf treat the argument to AC_CONFIG_AUX_DIRS as being literal (they do not expand the shell variable), causing autoreconf to fail if $srcdir is explicitly specified. The argument to AC_CONFIG_AUX_DIR is checked relative to $srcdir anyway, so there is no need to specify $srcdir a second time. Resolves: https://github.com/libsdl-org/SDL/issues/4719 Signed-off-by: Simon McVittie <smcv@debian.org>
Ryan C. Gordon 79c7a171 2021-08-24T12:41:41 testvulkan: reformatted to more-closely match SDL coding conventions.
Lionel Landwerlin b073d275 2021-08-17T16:52:49 test/vulkan: fix/workaround validation errors
Ryan C. Gordon abba1811 2021-08-23T20:18:57 testvulkan: support multiple windows. Fixes #4363.
Ozkan Sezer f5c0cdea 2021-08-19T01:28:10 testgeometry.c: fix build in c89 mode
Sylvain bc2173ba 2021-04-06T21:49:23 Add testgeometry to draw a non uniform triangle --use-texture: an option to load icon.bmp as a texture handle mouse motion: rotate the triangle
Sylvain 53bcb3e0 2021-04-06T21:38:24 Add an option to 'testsprite2' to render slicing into triangles. [--use-rendergeometry mode1|mode2] mode1: Draw sprite2 as triangles that can be recombined as rect by software renderer mode2: Draw sprite2 as triangles that can *not* be recombined as rect by software renderer Use an 'indices' array
David Gow fbc36490 2021-08-14T22:29:05 Use the new SDL_clamp() macro where sensible There were a few places throughout the SDL code where values were clamped using SDL_min() and SDL_max(). Now that we have an SDL_clamp() macro, use this instead.
David Gow 105f1206 2021-08-13T21:25:35 checkkeys: Create a renderer for window display on Wayland On Wayland -- or at least on some Wayland implementations -- windows aren't shown until something has been rendered into them. For the 'checkkeys' test program, this means that keyboard input isn't registered, making the program rather useless. By creating a renderer and presenting once, the window is properly displayed, and the test behaves as it does under X11 (including XWayland). The exact same thing was done with testmessge in 1cd97e2695 (PR #4252)
Sam Lantinga cb1e20b0 2021-08-10T17:50:17 Added KMOD_SCROLL to track the scroll lock state Fixes https://github.com/libsdl-org/SDL/issues/4566
David Gow 773e1ba1 2021-08-08T11:00:07 testvulkan: Clamp the drawable size to the allowed range SDL_Vulkan_GetDrawableSize() doesn't always return a size which is within the Vulkan swapchain's allowed image extent range. (This happens on X11 a lot when resizing, which is bug #3287) Clamp the value we get back from SDL_Vulkan_GetDrawableSize() to this range. Given the range usually is just a single value, this is almost always equivalent to just using the min or max image extent, but this seems logically most correct.
Cameron Cawley 520bc713 2021-08-05T14:33:54 Fix typo in CMake target name
Sam Lantinga 9fdb0645 2021-08-04T11:33:28 Added support for the Joy-Con Charging Grip when SDL_HINT_JOYSTICK_HIDAPI_JOY_CONS is enabled
Sam Lantinga 3d747078 2021-08-03T01:25:54 Run the renderer so Steam can find the main window
Sam Lantinga 8726f500 2021-08-03T01:10:48 Allow quitting controllermap if there are no controllers attached
Sam Lantinga 65ff00ec 2021-07-29T14:18:54 Query the rate for the correct sensor (thanks @meyraud705)
Sam Lantinga a186a503 2021-07-29T06:43:39 Added SDL_GameControllerGetSensorDataRate() to get the sensor update rate for a controller.
Sam Lantinga ce8261dd 2021-07-29T06:36:20 Only pump events once per frame and process all currently pending events If you continually poll for events it's possible that new events can come in while you're still processing the last one, delaying rendering. This is more likely with high update rate sensors.
Sam Lantinga 51c61d7c 2021-07-27T14:57:18 Run the entire Cocoa messagebox function on the main thread. This fixes bug https://github.com/libsdl-org/SDL/issues/4420
Sam Lantinga 7df6a9ea 2021-07-27T10:44:04 Add a test case for bug https://github.com/libsdl-org/SDL/issues/4469
Sam Lantinga 94b7a876 2021-07-24T09:10:18 Added SDL_GameControllerType enumerations for the Amazon Luna and Google Stadia controllers Fixes bug https://github.com/libsdl-org/SDL/issues/4019
Vladislav Dmitrievich Turbanov f9bf1aeb 2021-07-09T00:51:16 Latest Unifont with OFL is now bundled. (#4268) * * Latest Unifont with OFL is now bundled. * * Added a Unifont license file. Co-authored-by: Vladislav Dmitrievich Turbanov <vladislav@turbanov.ru>
Sam Lantinga d135c076 2021-07-08T13:22:41 Added SDL_GameControllerSendEffect() and SDL_JoystickSendEffect() to allow applications to send custom effects to the PS4 and PS5 controllers See testgamecontroller.c for an example of a custom PS5 trigger effect
Eric Wasylishen c33e3c15 2021-06-07T18:24:57 testwm2: draw various debug logging into the window itself Renderer output size, window position/size, display bounds, etc. Uses new SDLTest_CommonDrawWindowInfo function in test_common.
Sam Lantinga 64c40b90 2021-06-04T14:34:21 Updated copyright date
Ozkan Sezer 37b093ea 2021-06-05T00:05:56 test/checkkeysthreads: build fixes, and add to os2 makefile.
Francesco Abbate 0dd7024d 2021-03-12T21:58:20 Modifies WaitEvent and WaitEventTimeout to actually wait instead of polling When possible use native os functions to make a blocking call waiting for an incoming event. Previous behavior was to continuously poll the event queue with a small delay between each poll. The blocking call uses a new optional video driver event, WaitEventTimeout, if available. It is called only if an window already shown is available. If present the window is designated using the variable wakeup_window to receive a wakeup event if needed. The WaitEventTimeout function accept a timeout parameter. If positive the call will wait for an event or return if the timeout expired without any event. If the timeout is zero it will implement a polling behavior. If the timeout is negative the function will block indefinetely waiting for an event. To let the main thread sees events sent form a different thread a "wake-up" signal is sent to the main thread if the main thread is in a blocking state. The wake-up event is sent to the designated wakeup_window if present. The wake-up event is sent only if the PushEvent call is coming from a different thread. Before sending the wake-up event the ID of the thread making the blocking call is saved using the variable blocking_thread_id and it is compared to the current thread's id to decide if the wake-up event should be sent. Two new optional video device methods are introduced: WaitEventTimeout SendWakeupEvent in addition the mutex wakeup_lock which is defined and initialized but only for the drivers supporting the methods above. If the methods are not present the system behaves as previously performing a periodic polling of the events queue. The blocking call is disabled if a joystick or sensor is detected and falls back to previous behavior.
Ozkan Sezer 646ddfb7 2021-05-15T00:22:50 minor watcom build fixes.
Ozkan Sezer babd79b8 2021-04-14T23:20:40 bump minimum required autoconf version and revise autogen.sh
Ozkan Sezer 197cfcaf 2021-04-14T21:10:40 ran configure.ac through autoupdate-2.69 generated configure script is practically the same except for whitespace changes.
Ryan C. Gordon da667554 2021-04-01T12:20:04 Fixed up legacy MoinMoin URLs at wiki.libsdl.org Fixes #4064.
Ryan C. Gordon 2542977b 2021-04-01T12:15:28 Revert "Update wiki.libsdl.org urls to libsdl-org/SDL/wiki (#4069)" This reverts commit 82a96afa70212da94de758df859e94cccdb2c805. We ended up not moving to GitHub's wiki after all and built https://github.com/icculus/ghwikipp to fill the gap...since the wiki is back at https://wiki.libsdl.org/, put back the original URLs.
Christian Rauch 570768f6 2021-03-26T22:52:30 test: fix shadowing variables
Christian Rauch b972258d 2021-03-26T22:49:28 test: remove unused variables and typedefs
Christian Rauch 3f257045 2021-03-26T23:46:31 test: portable 64bit address format specifier
David Gow 1cd97e26 2021-03-29T18:12:33 testmessage: Create a renderer for window display on Wayland On Wayland -- or at least on some Wayland implementations -- windows aren't shown until something has been rendered into them. For the 'testmessage' test program, this means that the final messagebox (a modal one) is blocking an "invisible window", which can then be difficult to close. By creating a renderer and presenting once, the window is properly displayed, and the test behaves as it does under X11 (including XWayland).
Sam Lantinga 8b87b438 2021-03-26T13:01:06 Don't try to map the touchpad button, since we don't have any art for that at the moment.
Ozkan Sezer e5821bf2 2021-03-18T00:10:00 regenerated configure.
Vanfanel e6b87005 2021-03-17T20:10:31 Fix tests configuration and building when only GLVND full OpenGL implementation is present.
Ozkan Sezer 9d46bd25 2021-03-11T17:00:10 revert commit 81cdb1bb0de (unifont license issue.)
Ozkan Sezer 81cdb1bb 2021-03-04T18:32:32 test: add unifont-9.0.02.hex as a resource (so it works out-of-the-box) from a patchset by Vladislav Dmitrievich Turbanov: https://github.com/libsdl-org/SDL/pull/4062
Ozkan Sezer a52d0db5 2021-03-04T18:28:10 test/CMakeLists.txt: add OpenGL module checks and adjust dependencies. from a patchset by Vladislav Dmitrievich Turbanov: https://github.com/libsdl-org/SDL/pull/4062
Ozkan Sezer e7abf968 2021-03-04T18:28:04 test/CMakeLists.txt: bump cmake minimum required to 3.0 for consistency from a patchset by Vladislav Dmitrievich Turbanov: https://github.com/libsdl-org/SDL/pull/4062
Ozkan Sezer a29fe292 2021-02-18T20:10:50 configury: replace host checks against *-*-mingw32* with *-*-mingw*
Cameron Cawley 9323cd51 2021-02-16T18:14:13 Check for ARM SIMD in testplatform
Erik Yuzwa 82a96afa 2021-02-13T09:49:31 Update wiki.libsdl.org urls to libsdl-org/SDL/wiki (#4069)
Ryan C. Gordon 4ff51d29 2021-02-12T14:15:29 Deprecate SDL_GetRevisionNumber and update things for git instead of hg. Fixes #4063
Vladislav Dmitrievich Turbanov 31e8a462 2021-02-10T20:54:15 * Fixed closing the test window.
Cameron Gutman 6b057c67 2021-01-26T19:16:17 Expose separate keyboard and mouse grab support This adds SDL_SetWindowKeyboardGrab(), SDL_GetWindowKeyboardGrab(), SDL_SetWindowMouseGrab(), SDL_GetWindowMouseGrab(), and new SDL_WINDOW_KEYBOARD_GRABBED flag. It also updates the test harness to exercise this functionality and makes a minor fix to X11 that I missed in https://hg.libsdl.org/SDL/rev/02a2d609369b To fit in with this new support, SDL_WINDOW_INPUT_CAPTURE has been renamed to SDL_WINDOW_MOUSE_CAPTURE with the old name remaining as an alias for backwards compatibility with older code.
Ozkan Sezer d0c5097c 2021-01-23T03:41:02 minor autotools build system updates.
Sylvain Becker 4fbb9f31 2021-01-19T11:01:00 Fix declarations after statement
Sylvain Becker 0e7d435f 2021-01-19T10:40:42 Add basic testgles2_sdf program to demonstrate sign distance field with opengles2
Sam Lantinga c94283d4 2021-01-13T11:01:54 testgamecontroller: log which controller the event came from
Sam Lantinga 9130f7c3 2021-01-02T10:25:38 Updated copyright for 2021
Ozkan Sezer 88eaf356 2020-12-30T15:53:20 minor update to test/acinclude.m4 (pkg.m4)
Ozkan Sezer 5ed3d21f 2020-12-24T00:55:30 testsem.c: fix -Wmissing-braces warnings.
Joel Linn 2b040ceb 2020-12-23T13:36:23 Atomic test: Fix use after free SDL_SemPost() was called by the FIFO threads after the semaphore was freed because the main thread actually synchronized on the `writerRunning`/`readersRunning` count and not the semaphores itself.
Joel Linn 6267b951 2020-12-23T13:36:02 Semaphore test: Add overhead tests.
Joel Linn 95a6d4e8 2020-12-23T13:35:35 Semaphore test: Put test into separate function.
Ozkan Sezer 090fffac 2020-12-24T00:29:40 test/Makefile.os2: add warning switches to CFLAGS.
Ozkan Sezer 239c8f1f 2020-12-24T00:28:50 testvulkan.c: fix -Wmissing-braces warnings. also fix whitespace.
Ozkan Sezer 20ca1192 2020-12-24T00:26:32 testgesture.c: comment out unused drawLine()
Ozkan Sezer b064028c 2020-12-24T00:25:40 testatomic.c: fix warnings due to SDL_AtomicDecRef() use
Sam Lantinga 390b2cf0 2020-12-22T20:53:27 Enable PS5 enhanced functionality for testgamecontroller
Sam Lantinga 058a0ab4 2020-12-22T14:38:32 Set the pad lights on the PS5 controller corresponding to the player index Also allow setting the player index from testgamecontroller using the number keys
Ozkan Sezer b4b674da 2020-12-22T22:10:50 CMakeLists.txt: sync DYLIB_CURRENT_VERSION to Xcode project
Sam Lantinga 350f1b0d 2020-12-22T10:36:15 Updated SDL to version 2.0.15 for development
Ozkan Sezer 9f655fe5 2020-12-22T17:03:20 regenerated configure
Ozkan Sezer 86191351 2020-12-22T17:00:28 acinclude & sdl2.m4 updates: - acinclude/alsa.m4, esd.m4: Ran through autoupdate to replace several AC_TRY_[COMPILE|LINK|RUN] with corresponding AC_???_IFELSE , so that autoconf-2.70 doesn't warn. - sdl2.m4: Ditto. - test/acinclude.m4 (sdl2): Ditto.
Ozkan Sezer f117db51 2020-12-22T17:00:11 sdl2.m4 updates: - remove HP/UX 9 (%@#!) support - change fopen() mode from "a" to "w" in test code. - bump its serial num to 2. - test/acinclude.m4: same sdl2.m4 updates.
Ozkan Sezer 537f824f 2020-12-21T20:40:10 test/Makefile.os2: wlib must run case-sensitively.
Sam Lantinga 67e9132d 2020-12-20T12:22:28 Fixed circular dependency problem when building in the test directory
Ozkan Sezer 5c654d0d 2020-12-18T17:00:00 tests: regenerate configure using autoconf patched for AC_PATH_X11 Specifically this patch which does not invoke _AC_PATH_X_XMKMF and _AC_PATH_X_DIRECT internal autoconf routines when cross-compiling: http://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=33c3a47c04ab70a4dd54963fe433a171bc03747f Without this, CFLAGS would brokenly have system include paths like -I/usr/include/X11 when cross-compiling e.g. for windows. (And it also resulted in annoying imake crashes for my setup...)
Ozkan Sezer 716ac535 2020-12-15T01:20:00 test/acinclude.m4: rename SDL_CONFIG to SDL2_CONFIG, regenerate configure
Ozkan Sezer 44d4a61d 2020-12-14T08:11:40 minor cleanups to configure.ac to reduce autoconf-2.70 warnings a bit. configure output is practically unchanged. there are still lots of AC_TRY_COMPILE/AC_TRY_LINK replacements needed to really eliminate the warnings, but that's for another time.
Ozkan Sezer f1cab8ae 2020-12-10T11:20:56 fix bug #5253: handle NULL title or message fields in SDL_MessageBoxData - SDL_video.c (SDL_ShowMessageBox): replace messageboxdata, set title or message field to "" if either of them is NULL. - SDL_video.c (SDL_ShowSimpleMessageBox): set title or message to "" if either of them is NULL for EMSCRIPTEN builds. - SDL_bmessagebox.cc: add empty string check along with NULL check for title and message fields. - SDL_windowsmessagebox.c (AddDialogString): remove NULL string check - SDL_windowsmessagebox.c (AddDialogControl): add empty string check along with the NULL check. - SDL_x11messagebox.c: revert commit 677c4cd68069 - SDL_os2messagebox.c: revert commit 2c2a489d76e7 - test/testmessage.c: Add NULL title and NULL message tests.
Sam Lantinga 3c68051e 2020-12-04T15:47:28 Allow background input when testing game controllers
Sam Lantinga 04f0fd13 2020-11-27T18:57:42 Remember to close the game controller when we're done with it
Sam Lantinga 012471e9 2020-11-27T18:57:38 Open and test all connected controllers
Sam Lantinga 24cc0012 2020-11-25T16:05:15 Some controllers don't always reset their triggers to zero when they are released (e.g. Xbox One S in Bluetooth mode), so only trigger rumble if the trigger is pulled halfway or more.
Sam Lantinga e16afa79 2020-11-24T16:38:49 Automatically switch to testing a new controller when it's plugged in
Sam Lantinga 34bea84a 2020-11-23T23:03:55 Fixed bug 5335 - Patch: enable joystick/haptic/evdev support by default on FreeBSD Alex S Ah, that's not quite enough. You need to: 1. rename src/joystick/bsd/SDL_sysjoystick.c to something; 2. regenerate configure.
Sam Lantinga 04b45b55 2020-11-23T14:28:30 Allow testing a specific controller
Sam Lantinga ff4bc138 2020-11-23T14:28:16 Fixed mapping controllers after adding the touchpad button
Sam Lantinga 75721b19 2020-11-21T18:01:23 Allow testing effects on PS4 controllers Note, this will switch the controller into advanced report mode which breaks DirectInput on Windows
Sam Lantinga fcb21aa8 2020-11-17T10:30:20 Added API for sensors on game controllers Added support for the PS4 controller gyro and accelerometer on iOS and HIDAPI drivers Also fixed an issue with the accelerometer on iOS having inverted axes
Sam Lantinga d140d887 2020-11-16T17:36:47 Added SDL_JoystickGetSerial() and SDL_GameControllerGetSerial()
Sam Lantinga fe4da420 2020-11-16T10:39:44 Improve LED color calculation, don't set LED unless left thumbstick is moved
Sam Lantinga 9f51fad3 2020-11-13T18:01:29 Added support for the touchpad on PS4 and PS5 controllers
Sam Lantinga e749c126 2020-11-12T07:53:01 Fixed overflow in trigger rumble calculation
Simon McVittie 65847539 2020-11-11T19:15:43 test: Add a unit test for input device classification heuristics This uses pre-recorded evdev capabilities, so that we can check for regressions without the devices having to be physically present. Signed-off-by: Simon McVittie <smcv@collabora.com>
Sam Lantinga 1e2caac5 2020-11-11T18:57:37 Added SDL_JoystickRumbleTriggers() and SDL_GameControllerRumbleTriggers()
Ryan C. Gordon c3a32605 2020-11-09T04:55:15 testvulkan: Patched to compile with SDL's internal Vulkan headers.