|
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.
|
|
64c40b90
|
2021-06-04T14:34:21
|
|
Updated copyright date
|
|
37b093ea
|
2021-06-05T00:05:56
|
|
test/checkkeysthreads: build fixes, and add to os2 makefile.
|
|
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.
|
|
646ddfb7
|
2021-05-15T00:22:50
|
|
minor watcom build fixes.
|
|
babd79b8
|
2021-04-14T23:20:40
|
|
bump minimum required autoconf version and revise autogen.sh
|
|
197cfcaf
|
2021-04-14T21:10:40
|
|
ran configure.ac through autoupdate-2.69
generated configure script is practically the same except for whitespace
changes.
|
|
da667554
|
2021-04-01T12:20:04
|
|
Fixed up legacy MoinMoin URLs at wiki.libsdl.org
Fixes #4064.
|
|
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.
|
|
570768f6
|
2021-03-26T22:52:30
|
|
test: fix shadowing variables
|
|
b972258d
|
2021-03-26T22:49:28
|
|
test: remove unused variables and typedefs
|
|
3f257045
|
2021-03-26T23:46:31
|
|
test: portable 64bit address format specifier
|
|
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).
|
|
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.
|
|
e5821bf2
|
2021-03-18T00:10:00
|
|
regenerated configure.
|
|
e6b87005
|
2021-03-17T20:10:31
|
|
Fix tests configuration and building when only GLVND full OpenGL implementation is present.
|
|
9d46bd25
|
2021-03-11T17:00:10
|
|
revert commit 81cdb1bb0de (unifont license issue.)
|
|
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
|
|
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
|
|
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
|
|
a29fe292
|
2021-02-18T20:10:50
|
|
configury: replace host checks against *-*-mingw32* with *-*-mingw*
|
|
9323cd51
|
2021-02-16T18:14:13
|
|
Check for ARM SIMD in testplatform
|
|
82a96afa
|
2021-02-13T09:49:31
|
|
Update wiki.libsdl.org urls to libsdl-org/SDL/wiki (#4069)
|
|
4ff51d29
|
2021-02-12T14:15:29
|
|
Deprecate SDL_GetRevisionNumber and update things for git instead of hg.
Fixes #4063
|
|
31e8a462
|
2021-02-10T20:54:15
|
|
* Fixed closing the test window.
|
|
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.
|
|
d0c5097c
|
2021-01-23T03:41:02
|
|
minor autotools build system updates.
|
|
4fbb9f31
|
2021-01-19T11:01:00
|
|
Fix declarations after statement
|
|
0e7d435f
|
2021-01-19T10:40:42
|
|
Add basic testgles2_sdf program to demonstrate sign distance field with opengles2
|
|
c94283d4
|
2021-01-13T11:01:54
|
|
testgamecontroller: log which controller the event came from
|
|
9130f7c3
|
2021-01-02T10:25:38
|
|
Updated copyright for 2021
|
|
88eaf356
|
2020-12-30T15:53:20
|
|
minor update to test/acinclude.m4 (pkg.m4)
|
|
5ed3d21f
|
2020-12-24T00:55:30
|
|
testsem.c: fix -Wmissing-braces warnings.
|
|
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.
|
|
6267b951
|
2020-12-23T13:36:02
|
|
Semaphore test: Add overhead tests.
|
|
95a6d4e8
|
2020-12-23T13:35:35
|
|
Semaphore test: Put test into separate function.
|
|
090fffac
|
2020-12-24T00:29:40
|
|
test/Makefile.os2: add warning switches to CFLAGS.
|
|
239c8f1f
|
2020-12-24T00:28:50
|
|
testvulkan.c: fix -Wmissing-braces warnings. also fix whitespace.
|
|
20ca1192
|
2020-12-24T00:26:32
|
|
testgesture.c: comment out unused drawLine()
|
|
b064028c
|
2020-12-24T00:25:40
|
|
testatomic.c: fix warnings due to SDL_AtomicDecRef() use
|
|
390b2cf0
|
2020-12-22T20:53:27
|
|
Enable PS5 enhanced functionality for testgamecontroller
|
|
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
|
|
b4b674da
|
2020-12-22T22:10:50
|
|
CMakeLists.txt: sync DYLIB_CURRENT_VERSION to Xcode project
|
|
350f1b0d
|
2020-12-22T10:36:15
|
|
Updated SDL to version 2.0.15 for development
|
|
9f655fe5
|
2020-12-22T17:03:20
|
|
regenerated configure
|
|
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.
|
|
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.
|
|
537f824f
|
2020-12-21T20:40:10
|
|
test/Makefile.os2: wlib must run case-sensitively.
|
|
67e9132d
|
2020-12-20T12:22:28
|
|
Fixed circular dependency problem when building in the test directory
|
|
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...)
|
|
716ac535
|
2020-12-15T01:20:00
|
|
test/acinclude.m4: rename SDL_CONFIG to SDL2_CONFIG, regenerate configure
|
|
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.
|
|
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.
|
|
3c68051e
|
2020-12-04T15:47:28
|
|
Allow background input when testing game controllers
|
|
04f0fd13
|
2020-11-27T18:57:42
|
|
Remember to close the game controller when we're done with it
|
|
012471e9
|
2020-11-27T18:57:38
|
|
Open and test all connected controllers
|
|
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.
|
|
e16afa79
|
2020-11-24T16:38:49
|
|
Automatically switch to testing a new controller when it's plugged in
|
|
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.
|
|
04b45b55
|
2020-11-23T14:28:30
|
|
Allow testing a specific controller
|
|
ff4bc138
|
2020-11-23T14:28:16
|
|
Fixed mapping controllers after adding the touchpad button
|
|
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
|
|
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
|
|
d140d887
|
2020-11-16T17:36:47
|
|
Added SDL_JoystickGetSerial() and SDL_GameControllerGetSerial()
|
|
fe4da420
|
2020-11-16T10:39:44
|
|
Improve LED color calculation, don't set LED unless left thumbstick is moved
|
|
9f51fad3
|
2020-11-13T18:01:29
|
|
Added support for the touchpad on PS4 and PS5 controllers
|
|
e749c126
|
2020-11-12T07:53:01
|
|
Fixed overflow in trigger rumble calculation
|
|
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>
|
|
1e2caac5
|
2020-11-11T18:57:37
|
|
Added SDL_JoystickRumbleTriggers() and SDL_GameControllerRumbleTriggers()
|
|
c3a32605
|
2020-11-09T04:55:15
|
|
testvulkan: Patched to compile with SDL's internal Vulkan headers.
|
|
009b62f1
|
2020-11-07T02:22:15
|
|
Be explicit about mapping the new game controller paddle buttons
|
|
5a92edee
|
2020-11-06T15:54:18
|
|
Don't try to map the accelerometer as a game controller
|
|
59a644fb
|
2020-11-06T14:44:26
|
|
iOS should use the same size window for the controller tests as other platforms
Otherwise the position of the button and axis elements won't be correct
|
|
3a3aaac2
|
2020-11-06T11:30:52
|
|
Added 4 auxiliary buttons to the game controller API
Xbox Elite controllers use AUX1-AUX4 to represent the paddle buttons when using the HIDAPI driver
PS4 and PS5 controllers use AUX1 to represent the touchpad button
Nintendo Switch Pro controllers use AUX1 to represent the capture button
|
|
e555d453
|
2020-11-05T11:07:54
|
|
Added SDL_JoystickHasLED
Currently, this is only supported by the PS4 HIDAPI driver.
|
|
d2723875
|
2020-10-14T23:01:06
|
|
os2: integrate the port into main tree.
|
|
1d9cf23e
|
2020-10-14T23:01:05
|
|
os2: updated copyright dates for 2020. header guard fixes.
|
|
4551c633
|
2020-10-14T23:01:02
|
|
os2: make testnative working -- imported from bitwiseworks' fork:
https://github.com/bitwiseworks/SDL2-os2/commit/e2abc76b24c795051d0092cbd425544e73a0713e
|
|
74cfb81d
|
2020-10-14T23:01:00
|
|
os2: add port files for SDL2-2.0.4 from Andrey Vasilkin
only geniconv/iconv.h (was from LGPL libiconv) is replaced with a generic
minimal iconv.h based on public knowledge.
|
|
10eb5108
|
2020-10-11T20:00:20
|
|
test/Makefile.os2: add testlocale.exe to build.
|
|
b7b2995f
|
2020-10-05T15:27:32
|
|
url: Added to Visual Studio project files.
|
|
77c9d73b
|
2020-10-05T11:30:33
|
|
Removed SDL_AndroidOpenURL, added SDL_OpenURL.
Still needs to be wired into Xcode and Visual Studio projects.
|
|
0e98040d
|
2020-06-28T16:23:05
|
|
joystick: Linux joysticks now recover better from dropped events.
Fixes Bugzilla #4830.
|
|
50fd0dd1
|
2020-06-26T21:35:54
|
|
test: testspriteminimal wasn't calling SDL_Quit() on exit.
|
|
fa23e3d0
|
2020-05-04T02:27:29
|
|
locale: Implemented SDL_GetPreferredLocales().
This was something I proposed a long time ago, Sylvain Becker did
additional work on it, then back to me.
Fixes Bugzilla #2131.
|
|
aba27928
|
2020-04-18T21:41:37
|
|
Added a Windows Gaming Input joystick driver
This driver supports the Razer Atrox Arcade Stick
Some of the quirks of this driver, inherent in Windows Gaming Input:
* There will never appear to be controllers connected at startup. You must support hot-plugging in order to see these controllers.
* You can't read the state of the guide button
* You can't get controller events in the background
|
|
ef147d2e
|
2020-04-13T08:13:50
|
|
Enable virtual joystick API by default
|
|
3d942ccc
|
2020-04-08T09:02:02
|
|
Removed debug code
|
|
09f55263
|
2020-04-08T09:00:10
|
|
Fixed memory leak and removed debug code from Windows sensor implementation
|
|
89fe32dd
|
2020-04-05T08:46:59
|
|
Fixed bug 5072 - Test resources missing when building with SDL_TEST and CMake
DominikD
There are several tests that need resources in the output directory to work:
* `testiconv` depends on `utf8.txt`
* `testoverlay2` and `teststreaming` depend on `moose.dat`
This patch adds these two files to the `RESOURCE_FILES` variable.
One could also copy `shapes\*.bmp` over to the output directory for `testshape` to use but this patch doesn't do that for three reasons:
* executable takes path as an argument and doesn't need these files side by side
* these are ~45MB and copying them over would cause build directory to swell
* there are already files in the output directory that can be used with this test (`sample.bmp` and `button.bmp`)
|
|
377f2d35
|
2020-04-01T13:43:53
|
|
configure: Remove wayland-protocols check from configure and CMake scripts.
We ship these with SDL now, don't need the system versions installed.
|
|
c760c02c
|
2020-03-25T01:34:15
|
|
Fix some format specifier warnings
The warnings were produced by GCC 9.2.x for x86_64-linux-gnu or
i386-pc-msdosdjgpp targets.
Most of the fixes involve changing the type of a variable rather than
the format specifier. For many of the affected test conuter variables,
a basic int seems sufficient.
Some format specifier warnings still remain for cases where changing
type or casting seemed inappropriate. Those warnings will probably
require some new format specifier macros (e.g. SDL_PRIu32).
|
|
2be75c6a
|
2020-03-13T19:08:45
|
|
Fixed bug 5028 - Virtual Joysticks (new joystick backend)
David Ludwig
I have created a new driver for SDL's Joystick and Game-Controller subsystem: a Virtual driver. This driver allows one to create a software-based joystick, which to SDL applications will look and react like a real joystick, but whose state can be set programmatically. A primary use case for this is to help enable developers to add touch-screen joysticks to their apps.
The driver comes with a set of new, public APIs, with functions to attach and detach joysticks, set virtual-joystick state, and to determine if a joystick is a virtual-one.
Use of virtual joysticks goes as such:
1. Attach one or more virtual joysticks by calling SDL_JoystickAttachVirtual. If successful, this returns the virtual-device's joystick-index.
2. Open the virtual joysticks (using indicies returned by SDL_JoystickAttachVirtual).
3. Call any of the SDL_JoystickSetVirtual* functions when joystick-state changes. Please note that virtual-joystick state will only get applied on the next call to SDL_JoystickUpdate, or when pumping or polling for SDL events (via SDL_PumpEvents or SDL_PollEvent).
Here is a listing of the new, public APIs, at present and subject to change:
------------------------------------------------------------
/**
* Attaches a new virtual joystick.
* Returns the joystick's device index, or -1 if an error occurred.
*/
extern DECLSPEC int SDLCALL SDL_JoystickAttachVirtual(SDL_JoystickType type, int naxes, int nballs, int nbuttons, int nhats);
/**
* Detaches a virtual joystick
* Returns 0 on success, or -1 if an error occurred.
*/
extern DECLSPEC int SDLCALL SDL_JoystickDetachVirtual(int device_index);
/**
* Indicates whether or not a virtual-joystick is at a given device index.
*/
extern DECLSPEC SDL_bool SDLCALL SDL_JoystickIsVirtual(int device_index);
/**
* Set values on an opened, virtual-joystick's controls.
* Returns 0 on success, -1 on error.
*/
extern DECLSPEC int SDLCALL SDL_JoystickSetVirtualAxis(SDL_Joystick * joystick, int axis, Sint16 value);
extern DECLSPEC int SDLCALL SDL_JoystickSetVirtualBall(SDL_Joystick * joystick, int ball, Sint16 xrel, Sint16 yrel);
extern DECLSPEC int SDLCALL SDL_JoystickSetVirtualButton(SDL_Joystick * joystick, int button, Uint8 value);
extern DECLSPEC int SDLCALL SDL_JoystickSetVirtualHat(SDL_Joystick * joystick, int hat, Uint8 value);
------------------------------------------------------------
Miscellaneous notes on the initial patch, which are also subject to change:
1. no test code is present in SDL, yet. This should, perhaps, change. Initial development was done with an ImGui-based app, which potentially is too thick for use in SDL-official. If tests are to be added, what kind of tests? Automated? Graphical?
2. virtual game controllers can be created by calling SDL_JoystickAttachVirtual with a joystick-type of SDL_JOYSTICK_TYPE_GAME_CONTROLLER, with naxes (num axes) set to SDL_CONTROLLER_AXIS_MAX, and with nbuttons (num buttons) set to SDL_CONTROLLER_BUTTON_MAX. When updating their state, values of type SDL_GameControllerAxis or SDL_GameControllerButton can be casted to an int and used for the control-index (in calls to SDL_JoystickSetVirtual* functions).
3. virtual joysticks' guids are mostly all-zeros with the exception of the last two bytes, the first of which is a 'v', to indicate that the guid is a virtual one, and the second of which is a SDL_JoystickType that has been converted into a Uint8.
4. virtual joysticks are ONLY turned into virtual game-controllers if and when their joystick-type is set to SDL_JOYSTICK_TYPE_GAMECONTROLLER. This is controlled by having SDL's default list of game-controllers have a single entry for a virtual game controller (of guid, "00000000000000000000000000007601", which is subject to the guid-encoding described above).
5. regarding having to call SDL_JoystickUpdate, either directly or indirectly via SDL_PumpEvents or SDL_PollEvents, before new virtual-joystick state becomes active (as specified via SDL_JoystickSetVirtual* function-calls), this was done to match behavior found in SDL's other joystick drivers, almost all of which will only update SDL-state during SDL_JoystickUpdate.
6. the initial patch is based off of SDL 2.0.12
7. the virtual joystick subsystem is disabled by default. It should be possible to enable it by building with SDL_JOYSTICK_VIRTUAL=1
Questions, comments, suggestions, or bug reports very welcome!
|
|
de2001ee
|
2020-03-13T13:05:40
|
|
Fixed binding the D-PAD on the 8BitDo M30 controller
|
|
611403dd
|
2020-03-08T21:02:40
|
|
Clarified that the clip rectangle is defined relative to the viewport, and added a clip test to testviewport.c
|
|
25061816
|
2020-03-02T10:58:08
|
|
Fixed compile warning
|
|
033aa51d
|
2020-02-13T22:58:04
|
|
testfilesystem: Don't exit the application if SDL_GetBasePath isn't supported
|
|
8f1a916a
|
2020-02-13T20:50:47
|
|
Add basic support for compiling on RISC OS
|
|
80cf4f07
|
2020-02-08T19:34:51
|
|
test: Improved detection of OpenGL support
|
|
dd0ebfdf
|
2020-02-07T11:45:32
|
|
Use the triggers to test rumble for more fine grained vibration feedback
|