Sam Lantinga
1e5cbbc1d0
checkkeys: clarify that SDL_HINT_WINDOWS_RAW_KEYBOARD isn't needed
2025-11-19 08:54:43 -08:00
Anonymous Maarten
8f21fe4994
testmouse: avoid use-after-free
...
Bug was introduced in 17a891daa8
2025-11-18 08:35:56 +01:00
Anonymous Maarten
8920736df0
cmake: add testrwlock to CTest test suite
2025-11-17 20:00:02 +01:00
Anonymous Maarten
17a891daa8
test: plug leaks of testmouse and testrwlock
2025-11-17 20:00:02 +01:00
Anonymous Maarten
3ba9bdfc01
test: use SDL_test to parse arguments of tests
2025-11-17 20:00:02 +01:00
Ozkan Sezer
a882afafe5
fixed several -Wzero-as-null-pointer-constant warnings from gcc-15
2025-11-17 17:55:10 +03:00
Sam Lantinga
770b38b4f1
Loosened epsilon for color matching
...
Fixed https://github.com/libsdl-org/SDL/issues/14473
2025-11-15 16:51:19 -08:00
Sam Lantinga
ed6d41f55b
testcontroller: demonstrate multiple sensors on the virtual controller
2025-11-14 08:18:04 -08:00
Sam Lantinga
cc3b5766fa
testsprite: changed return type of LoadSprite() to bool
2025-11-14 08:05:49 -08:00
Maia
a01d6f109d
Add SDL_LoadSurface and SDL_LoadSurface_IO ( #14374 )
2025-11-13 14:50:37 -08:00
Sam Lantinga
fffaf122df
Added temporary workaround for failing Emscripten test
2025-11-10 18:30:02 -08:00
Sam Lantinga
eccd5c03c3
testautomation: added tests to cover linear <-> sRGB colorspace conversion
2025-11-10 18:30:02 -08:00
Anonymous Maarten
2bc886d0bd
testqsort: add custom macro to allow comparing with qsort
2025-11-09 11:24:03 +00:00
Anonymous Maarten
2be18f340f
testqsort: use SDLTest_TestSuite
2025-11-09 11:24:03 +00:00
Sam Lantinga
a2ed1a4197
Fixed blitting bitmaps with a non-zero x offset
...
Also added basic testautomation coverage of bitmap blits
Fixes https://github.com/libsdl-org/sdl2-compat/issues/546
2025-11-06 22:47:50 -08:00
Sam Lantinga
09f00e397c
testsymbols: include SDL_main.h
2025-10-31 10:34:42 -07:00
Sam Lantinga
b3612f6462
testautomation: fixed RLE operation test on big endian systems
...
Fixes https://github.com/libsdl-org/SDL/issues/14348
2025-10-29 16:26:31 +00:00
Sam Lantinga
84fac6ca44
testautomation: verify that RLE operation output is correct
2025-10-29 09:07:56 -07:00
Sam Lantinga
1fa6475c90
Added support for saving indexed PNG images
...
Fixes https://github.com/libsdl-org/SDL/issues/14303
2025-10-23 12:40:41 -07:00
Vicki Pfau
4037c258a1
testcontroller: Fix crash when unplugging a controller while calibrating gyro
2025-10-22 20:10:21 -07:00
Sam Lantinga
e18d63a4e2
Added SDL_RotateSurface()
...
Fixes https://github.com/libsdl-org/SDL/issues/14269
2025-10-22 17:55:02 -07:00
Sam Lantinga
0e351efbbc
testcustomcursor: set the hotspot to the middle of the cross
2025-10-20 09:48:03 -07:00
Eddy Jansson
aaee09d6ed
Don't do NULL-checks before SDL_free()
...
Replaces the pattern
if (ptr) {
SDL_free(ptr);
}
with
SDL_free(ptr);
2025-10-20 00:13:09 -07:00
Frank Praznik
dcb8a6521c
Add animated cursor support
...
Adds support for animated cursors on Cocoa, Wayland, Win32, and X11.
testcursor can take a semicolon separated list of filenames and load an animated cursor from them.
2025-10-15 14:41:15 -04:00
Sam Lantinga
d819106c65
Try matching gamepad mappings with CRC first
...
Fixes https://github.com/libsdl-org/SDL/issues/13874
2025-10-14 10:30:03 -07:00
Sam Lantinga
57cd131b7a
testpalette: use SDL_SCALEMODE_NEAREST for single pixel copies
2025-10-13 14:25:09 -07:00
Sam Lantinga
a58ae3a94f
Added WASAPI support for SDL_HINT_AUDIO_DEVICE_STREAM_ROLE
...
Also added SDL_HINT_AUDIO_DEVICE_RAW_STREAM
Fixes https://github.com/libsdl-org/SDL/issues/14091
2025-10-13 14:20:19 -07:00
Ryan C. Gordon
72a3e4084a
testsymbols: Use the existing symbol list in SDL_dynapi_procs.h
2025-10-13 10:58:03 -04:00
Anonymous Maarten
281ac6c3bb
Add elf-dlopen-note test
2025-10-12 15:46:35 -07:00
Sylvain Becker
71bf56c9e4
Add SDL Pinch events ( #9445 )
2025-10-12 14:44:23 -07:00
Ryan C. Gordon
f7d5bb3c7a
cpuinfo: Added SDL_GetSystemPageSize.
...
Fixes #14201 .
2025-10-10 21:16:10 -04:00
Sam Lantinga
9d3dd8f001
testclipboard: make the window resizable
...
This is handy to see multiple image formats on the clipboard
2025-10-10 17:42:27 -07:00
Sam Lantinga
5441d33c0e
testime: toggle text input with a mouse click
2025-10-10 10:14:07 -07:00
Sam Lantinga
17989940f2
Fixed SDL_BlitSurfaceTiledWithScale() with very small scale (thanks @bleeqer!)
2025-10-10 08:59:27 -07:00
Sam Lantinga
d92079f2b7
testsprite: only use transparent alpha on transparent windows
...
Fixes https://github.com/libsdl-org/SDL/issues/14105
2025-10-09 14:32:08 -07:00
Sam Lantinga
23e3cbec20
Only call clipboard callbacks with mime types they expect
...
Also clarified that returning NULL from a callback sends zero length data to the receiver, which should be able to handle that.
Fixes https://github.com/libsdl-org/SDL/issues/9586
2025-10-09 12:20:19 -07:00
Sam Lantinga
0e7d5620c2
testclipboard: added support for UCS-2 and UCS-4 text
...
Chrome uses UCS-2 text for text/x-moz-url content
2025-10-09 12:20:19 -07:00
Sam Lantinga
ec0e84fc0a
testclipboard: support both BMP and PNG clipboard images
2025-10-09 12:20:19 -07:00
Sam Lantinga
8830b466d0
Improve handling of surfaces with NULL pixels
...
Fixes https://github.com/libsdl-org/SDL/issues/14059
2025-10-08 12:40:29 -07:00
Sam Lantinga
244ae39b30
Optimized the 16-bit -> 32-bit SSE pixel conversion
...
Test code:
---
int main( int argc, char *argv[] )
{
SDL_Surface *orig = SDL_LoadPNG("testyuv.png");
SDL_Surface *surf16 = SDL_ConvertSurface(orig, SDL_PIXELFORMAT_RGB565);
SDL_Surface *surf32 = SDL_ConvertSurface(surf16, SDL_PIXELFORMAT_ARGB8888);
Uint64 then = SDL_GetTicks();
for (int i = 0; i < 100000; ++i) {
SDL_BlitSurface(surf16, NULL, surf32, NULL);
}
Uint64 now = SDL_GetTicks();
SDL_Log("Blit took %d ms\n", (int)(now - then));
return 0;
}
---
Results on my system:
BlitNtoN: Blit took 34522 ms
Blit_RGB565_32 (3 LUT): Blit took 9316 ms
Blit_RGB565_32 (1 LUT): Blit took 5268 ms
Blit_RGB565_32_SSE41: Blit took 1619 ms
2025-10-07 16:31:14 -07:00
Sam Lantinga
dbd5dd8c75
Ensure 16-bit -> 32-bit conversion is consistent between blitters
...
The SSE, LUT, and other blitters should have the same results for 16-bit -> 32-bit conversion
2025-10-07 16:31:14 -07:00
Cameron Cawley
2c79ecfb8a
Use texture palettes with testoverlay
2025-10-07 11:12:31 -07:00
Cameron Cawley
0f62b7c3b4
Remove teststreaming
2025-10-07 11:12:31 -07:00
Sam Lantinga
9f9be1425d
Fixed permissions
2025-10-06 17:24:56 -07:00
Sam Lantinga
bb0d6221c1
Use PNG files for tests and examples
...
These are much smaller than the previous BMP files
Fixes https://github.com/libsdl-org/SDL/issues/14159
2025-10-06 16:45:53 -07:00
Sam Lantinga
73334b6bb4
Added support for loading and saving PNG images using stb_image
2025-10-06 16:45:53 -07:00
nmlgc
8df057fafc
iostream: Properly support the "x" mode for SDL_IOFromFile()
...
The "x" mode for `fopen()` (open file only if it doesn't exist) used to
be a glibc-exclusive extension, but was later standardized in C11, and
is now also implemented as part of every other widely-used libc:
* musl: https://git.musl-libc.org/cgit/musl/tree/src/stdio/__fmodeflags.c?id=0ccaf0572e9cccda2cced0f7ee659af4c1c6679a
* Android Bionic / OpenBSD: 731631f300/libc/upstream-openbsd/lib/libc/stdio/flags.c (86)
* Apple / FreeBSD: 63976b830a/stdio/FreeBSD/flags.c (L91-L92)
As a result, "x" has already been working on all our automatically
tested platforms that implement `SDL_IOFromFile()` via `fopen()`. So
all we'd be missing for proper support is a Windows implementation
using `CREATE_NEW`, and the documentation that this mode exists and is
intended to work.
2025-10-06 13:23:42 -07:00
Sam Lantinga
134b47730b
Added support for linear and pixel art scaling for palettized textures
2025-10-04 15:12:08 -07:00
eafton
c2429e85ec
X11TK: Add Arabic/Hebrew/Farsi support by increasing font size slightly and using FriBidi. ( #14134 )
2025-10-03 19:08:24 -07:00
Sam Lantinga
49d51a0d3c
Removed TEXTURETYPE_PALETTE_PIXELART
...
This doesn't make any sense since the pixel art algorithm uses a box filter to get an average pixel value which isn't possible with indexed textures.
2025-10-03 18:54:07 -07:00