Commit graph

1681 commits

Author SHA1 Message Date
Anonymous Maarten
46bafda7ab testshader: add -sLEGACY_GL_EMULATION for emscripten 2024-08-20 16:04:58 +00:00
Anonymous Maarten
6052136ced tests/emscripten: add link-time dependency on the resources 2024-08-20 16:04:58 +00:00
Anonymous Maarten
2eaf73d9e0 Errors on non-threaded platforms are limited to 128 bytes 2024-08-20 16:04:58 +00:00
Anonymous Maarten
c66a09ce26 Make main_testSetError test more verbose 2024-08-20 16:04:58 +00:00
Anonymous Maarten
c054435f37 Add verbose logging to TestVirtualJoystick 2024-08-20 16:04:58 +00:00
Anonymous Maarten
50f50df8b1 tests: add --no-threads argument to disable threads
This is useful for Emscripten that can be built without threads support
2024-08-20 16:04:58 +00:00
Anonymous Maarten
3fccb77da6 test: map URL to other directories
This allows to 'mount' the SDL source directory on http://localhost:8080/SDL.
This is useful for debugging emscripten applications in the browser.

Build SDL with "-gsource-map -ffile-prefix-map=/path/to/SDL:/SDL" to
configure the URL where the source code must be available.
2024-08-20 16:04:58 +00:00
Sam Lantinga
438a214420 Changed main callback return values to an enumeration
Fixes https://github.com/libsdl-org/SDL/issues/10515
2024-08-16 11:16:05 -07:00
Anonymous Maarten
4ac5d4506b testcamera: always render current texture 2024-08-15 09:20:34 -04:00
Anonymous Maarten
f95027e3d7 sdlprocdump: skip parsed arguments 2024-08-15 12:17:52 +02:00
Qiu Qiang
d60e6e2558
testcamera: Add logging for camera FPS (#10525)
Add frequency logging in SDL_AppIterate.
Log camera specs upon approval.
2024-08-14 08:39:18 -07:00
Anonymous Maarten
01c42f1399 testautomation: test palettization using SDL_ConvertSurfaceAndColorspace 2024-08-13 10:56:09 +02:00
Anonymous Maarten
dc67a51782 sdlprocdump: fix clang -Wincompatible-pointer-types warning 2024-08-11 21:23:57 +02:00
Anonymous Maarten
35b61f70da sdlprocdump: add option to print debug stream 2024-08-11 21:00:08 +02:00
Ryan C. Gordon
b4ca15b654 pen: Added Cocoa backend. 2024-08-09 22:09:23 -04:00
Ryan C. Gordon
a9d70dbacb pen: Rework public API.
This changes the API in various ways, and updates the backends for this.

Overall, this is a massive simplification of the API, as most future backends
can't support the previously-offered API.

This also removes the testautomation pen code (not only did these interfaces
change completely, it also did something no other test did: mock the internal
API), and replaces testpen.c with a different implementation (the existing
code was fine, it was just easier to start from scratch than update it).
2024-08-09 22:09:23 -04:00
Sam Lantinga
4cc3410dce Added SDL_GetAudioFormatName()
Fixes https://github.com/libsdl-org/SDL/issues/10489
2024-08-08 15:05:37 -07:00
Sam Lantinga
66ddabde86 Added an automated test to check creation of minimized and maximized windows 2024-08-07 12:17:52 -07:00
Sylvain
20a6193eaa Run test suites and test cases in non-linear order (see libsdl-org#9303) 2024-08-07 10:25:30 +02:00
Anonymous Maarten
27bb5bcef6 sdlprocdump: fix stacktrace 2024-08-07 06:51:35 +02:00
Anonymous Maarten
0fa2049fef
Document iconv functions + add testautomation (#10131)
* stdinc: document SDL_iconv* functions
* iconv: add automation tests
* iconv: don't potentially crash on invalid inputs
2024-08-06 10:12:25 -07:00
Ivan Mogilko
75d89f8e12 Fix potential access violation in testautomation_clipboard.c 2024-08-06 09:34:04 -07:00
Sam Lantinga
627cb8acd0 SDL_EventFilter functions now return SDL_bool 2024-08-06 07:59:45 -07:00
Sam Lantinga
57f9c6f7bb Renamed SDL_Get/SetRelativeMouseMode to SDL_Get/SetWindowRelativeMouseMode()
Fixes https://github.com/libsdl-org/SDL/issues/10041
2024-08-06 07:59:45 -07:00
Sam Lantinga
a1998d106d Putting the simple back into Simple DirectMedia Layer 2024-08-05 21:20:26 -07:00
Sam Lantinga
a13c993e40 Removed keymaps from the API
This is unnecessary complication for applications. We can always add it again later if we find that it's really useful.
2024-08-05 19:46:45 -07:00
Sam Lantinga
c298a3749b Expose the keymap separately from the event keycode
This adds functions to query the keymap:
* SDL_GetCurrentKeymap()
* SDL_GetKeymapKeycode()
* SDL_GetKeymapScancode()
* SDL_ReleaseKeymap()

and these are distinct from the function to query the event keycode associated with a scancode, which might be affected by SDL_HINT_KEYCODE_OPTIONS.

Also added an SDL_bool parameter to SDL_GetKeyName() and SDL_GetKeyFromName() to enable upper case handling of the name.
2024-08-05 17:02:25 -07:00
Sam Lantinga
d68d32e12c Revert "Removing a timer that isn't running is a success."
This reverts commit 795499a529.

This breaks compatibility with SDL2 and there isn't a compelling reason to make this change.
2024-08-05 10:39:33 -07:00
Sam Lantinga
f59d66f4b1 Implemented left-justification in SDL_PrintString()
Fixes https://github.com/libsdl-org/SDL/issues/10310
2024-08-04 20:04:58 -07:00
Sam Lantinga
795499a529 Removing a timer that isn't running is a success. 2024-08-04 20:00:13 -07:00
Sam Lantinga
ef6521aee7 testnative: print events with --info event 2024-08-04 09:07:19 -07:00
Sam Lantinga
490f7af92b Removed test that triggers an asan overflow warning
Fixes https://github.com/libsdl-org/SDL/issues/8884
2024-08-03 18:20:26 -07:00
Sam Lantinga
f7c8d66ccb Use the convenience function SDL_GetWindowFromEvent() 2024-08-02 20:36:35 -07:00
Anonymous Maarten
f57c597c60 Added SDL_GetWindowFromEvent 2024-08-03 02:37:11 +00:00
Sam Lantinga
50492e1d03 Change the text input defaults to match the natural input experience 2024-08-02 14:49:37 -07:00
Sam Lantinga
81f8e6aba6 Added SDL_StartTextInputWithProperties()
This allows you to customize the text input so you can have numeric text entry, hidden passwords, etc.

Fixes https://github.com/libsdl-org/SDL/issues/7101
Fixes https://github.com/libsdl-org/SDL/issues/7965
Fixes https://github.com/libsdl-org/SDL/issues/9439
2024-08-02 14:49:37 -07:00
Sam Lantinga
5d51e3b4ab testime: added support for multiple windows 2024-08-02 14:49:37 -07:00
Sam Lantinga
31ed3665ad Added support for high-DPI cursors and icons
Fixes https://github.com/libsdl-org/SDL/issues/9838
2024-08-01 13:48:28 -07:00
Sam Lantinga
a5f18048b2 Extend the 9-grid functions to handle a non-uniform grid layout (thanks @zaun!)
Fixes https://github.com/libsdl-org/SDL/issues/10389
2024-07-31 22:36:39 -07:00
Anonymous Maarten
a1c6f99877 android: add script in Android archive to create a SDK
Also,
- Move mingw's pkg-support into build-scripts
- Add type annotations to python scripts for mypy
- ci: use v4 tag of actions/cache
- cmake: use PYTHON3_EXECUTABLE for running xxd.py
  (Python3::Interpreter is not always recognized.)
2024-08-01 05:07:08 +02:00
Sam Lantinga
091960441b Don't check SDL_RENDER_DRIVER in automated tests
This might be set in the environment for testing purposes
2024-07-31 19:10:13 -07:00
Anonymous Maarten
b68ac011e0 ctest: fail if there are outstanding allocations 2024-07-30 20:56:19 +00:00
Sam Lantinga
dfe6efcd2d Fixed memory leak in testthread 2024-07-28 08:05:31 -07:00
Sam Lantinga
728bf363cb Make sure we call SDL_Quit() before SDLTest_CommonDestroyState()
Otherwise we'll report leaks that will be cleaned up in SDL_Quit()
2024-07-28 08:05:31 -07:00
Sam Lantinga
1d5f9c7b92 testaudio: fixed memory leak in SetTitleBar() 2024-07-27 09:16:29 -07:00
Sam Lantinga
473feab2a4 Added SDL_unsetenv() 2024-07-27 09:10:08 -07:00
Sam Lantinga
b854e1fe0b Fixed some issues found with static analysis 2024-07-27 09:07:42 -07:00
Sam Lantinga
623a90c47d testutils: use SDL_asprintf() to simplify path composition 2024-07-27 08:41:06 -07:00
Anonymous Maarten
3bfc103e76 tests: start memory tracking first + clean up cached text textures 2024-07-27 13:44:04 +02:00
Anonymous Maarten
6f1136c6ce testgles2: fix leaks 2024-07-27 13:06:54 +02:00