Evan Hemsley
afdf325fb4
GPU: Add swapchain dimension out params ( #11003 )
2024-09-30 10:23:19 -07:00
Ryan C. Gordon
1787d6ca5c
main: SDL_AppQuit() now reports the result value.
...
Fixes #10994 .
2024-09-29 23:24:04 -04:00
Anonymous Maarten
7241dd9ec3
Add more SDL_Process tests
2024-09-30 03:03:33 +02:00
Ryan C. Gordon
7d21a49c9c
filesystem: SDL_EnumerateDirectoryCallback uses an enum now, not an int.
...
Fixes #10955 .
2024-09-28 01:33:40 -04:00
Ryan C. Gordon
e944f0fb9d
testfilesystem: Added test of creating parent dirs.
2024-09-27 18:54:18 -04:00
Petar Popovic
48c3ee2120
testcolorspace.c: Fix unreachable code warning
2024-09-27 15:22:24 -07:00
Evan Hemsley
be401dd1e3
GPU: More robust error reporting ( #10958 )
...
---------
Co-authored-by: Ethan Lee <flibitijibibo@gmail.com>
Co-authored-by: Caleb Cornett <caleb.cornett@outlook.com>
2024-09-27 00:30:18 -07:00
Sam Lantinga
345d9bfe19
A zero source rect is valid for blitting
...
A zero sized source rect draws pixels sourced from a 0x0 region on the source surface.
Fixes https://github.com/libsdl-org/SDL/issues/8580
2024-09-25 22:36:55 -07:00
Simon McVittie
80da805688
build: Fix testprocess invocation during "as-installed" tests
...
During build-time testing, we can use `$<TARGET_FILE:childprocess>` to
pass the just-built childprocess executable to it as an argument, but
during "as-installed" testing we need to use the installed path of
the childprocess executable instead.
Signed-off-by: Simon McVittie <smcv@debian.org>
2024-09-25 14:48:26 -07:00
Ryan C. Gordon
54459def69
render: Remove the logical presentation render target.
...
Now we render directly to the window, scaling as appropriate. This fixes some
concerns the render target introduced, like the quality of the final scaled
output, how to step outside of the logical size temporarily to draw some
things sharply at the native resolution, and loss of sub-pixel precision.
Fixes #8736 .
2024-09-25 16:26:36 -04:00
Petar Popovic
e5d3a1b6f5
Remove casts from typed pointer to void * for printf %p in test projects
2024-09-24 14:40:32 +03:00
Ryan C. Gordon
1828bde49f
examples/renderer/01-clear: Use the color-cycle code from testvulkan.c
...
(and testgpu_simple_clear.c, of course!)
2024-09-22 16:10:57 -04:00
Ozkan Sezer
254b36361e
Add SDL_PRILL? format specifiers specifically for long long type.
2024-09-21 23:03:50 +03:00
Ozkan Sezer
88a01fbc96
testautomation_stdlib.c: fix -Wformat warnings from mingw with %lld/%llu
...
i.e.: unknown conversion type character 'l' in format
See https://github.com/libsdl-org/SDL/pull/10789#issuecomment-2354011906
2024-09-19 20:37:11 +03:00
Frank Praznik
fd0ce75e2e
tests: Fix tests when run with the --high-pixel-density flag
...
Scales pointer coordinates where needed to fix the following tests when run with the --high-pixel-density flag:
- testaudio
- testaudiostreamdynamicresample
- testhittesting
- testintersections
- testmanymouse
- testoverlay
- testwm
2024-09-19 12:54:13 -04:00
Sam Lantinga
6771a6020d
testcamera: don't enable verbose logging
...
Fixes https://github.com/libsdl-org/SDL/issues/10541
2024-09-18 22:26:38 -07:00
Sam Lantinga
1834c83d5a
testplatform: make sure bool is 1 byte
2024-09-18 10:01:15 -07:00
Sam Lantinga
a90ad3b0e2
Removed SDL_bool in favor of plain bool
...
We require stdbool.h in the build environment, so we might as well use the plain bool type.
If your environment doesn't have stdbool.h, this simple replacement will suffice:
typedef signed char bool;
2024-09-18 08:32:30 -07:00
Sam Lantinga
bd04459cde
Fix typos (thanks @qndel!)
...
Fix typos in comments and in one case in a returned error ("insuffient -> insufficient" fb273eb
)
codespell src/ *.cpp *.h *.hpp --ignore-words-list unknwn,thid,algebric,statics,pixelX,pEvents,caf,ptd,parms,pEvent,parm,TextureRS,TE,HDA,LOD,datas,UE,xwindows,IIF
cd src; git checkout \
events/imKStoUCS.* \
hidapi \
joystick/controller_type.c \
joystick/controller_type.h \
joystick/hidapi/steam/controller_constants.h \
joystick/hidapi/steam/controller_structs.h \
libm \
stdlib/SDL_malloc.c \
stdlib/SDL_qsort.c \
stdlib/SDL_strtokr.c \
video/khronos \
video/x11/edid.h \
video/x11/edid-parse.c \
video/x11/xsettings-client.* \
video/yuv2rgb
2024-09-18 08:18:26 -07:00
Frank Praznik
e4f987f299
tests: Fix testdropfile on high-DPI displays
...
Convert the window pointer coordinates to buffer coordinates for rendering, so that the cross-hairs align with the cursor on scaled desktops.
2024-09-18 11:00:19 -04:00
Ozkan Sezer
8caf25f7b3
testautomation_stdlib.c (stdlib_strtox): fix warning from gcc-4.9:
...
test/testautomation_stdlib.c: In function 'stdlib_strtox':
test/testautomation_stdlib.c:1339:9: warning: this decimal constant is unsigned only in ISO C90
STRTOX_TEST_CASE(SDL_strtoul, unsigned long, "%lu", "4294967295", 10, 4294967295, 10);
^
test/testautomation_stdlib.c:1340:9: warning: this decimal constant is unsigned only in ISO C90
STRTOX_TEST_CASE(SDL_strtoul, unsigned long, "%lu", "4294967296", 10, 4294967295, 10);
^
2024-09-18 01:03:10 +03:00
Sam Lantinga
8d223b3037
Renamed atomic functions to match SDL 3.0 naming convention
...
This will also allow us to cleanly add atomic operations for other types in the future.
2024-09-17 08:53:27 -07:00
Sam Lantinga
f3e419596b
Removed SDL_INIT_TIMER
...
This is no longer necessary before calling SDL_AddTimer()
2024-09-17 08:53:27 -07:00
Sam Lantinga
231ea07617
Added SDL_LogTrace()
2024-09-17 02:04:54 -07:00
Sam Lantinga
dc639956ba
Improve logging performance and make log priorities thread-safe
...
Fixes https://github.com/libsdl-org/SDL/issues/9679
2024-09-16 13:09:17 -07:00
Caleb Cornett
9416917353
GPU: Rework MSAA ( #10859 )
2024-09-16 12:19:09 -05:00
Sam Lantinga
0548050fc5
Verify that the subsystems were successfully initialized
2024-09-15 12:04:10 -07:00
Carl Åstholm
1f3fd65c4c
cpuinfo: Rename SDL_GetCPUCount to SDL_GetNumLogicalCPUCores
...
This was the only API that broke the "GetNumThings" convention
used elsewhere, so renaming it helps with consistency.
Adding "logical cores" to the name also makes it a bit
more immediately obvious what the count actually represents.
2024-09-14 19:33:30 -07:00
Ryan C. Gordon
93bf534268
testgpu_simple_clear: Fixed AppInit return values.
2024-09-14 19:19:27 -04:00
Sam Lantinga
e97f636590
SDL_PROP_PROCESS_CREATE_ENVIRONMENT_POINTER is an SDL_Environment pointer
2024-09-14 12:27:22 -07:00
Sam Lantinga
e673479449
Removed SDL_WriteProcess()
...
This had the unfortunate side-effect of blocking if you tried to write too much. Instead you can use SDL_GetProcessInput() and handle SDL_IO_STATUS_NOT_READY as needed.
Fixes https://github.com/libsdl-org/SDL/issues/10834
2024-09-14 11:15:50 -07:00
ritalat
f6f49de134
Add convenience functions to get process IOStreams
2024-09-14 10:33:29 -07:00
Sam Lantinga
aa7357a14d
SDL_CreateEnvironment() fills the environment with a non-zero parameter
2024-09-14 10:29:02 -07:00
Semphris
3cf54675bb
Windows process: escape backslashes before quotes
2024-09-13 22:15:56 -07:00
Sam Lantinga
90e01040c5
Added thread-safe environment functions
...
Also marked the existing functions as unsafe, as they can cause crashes if used in multi-threaded applications.
As a bonus, since the new functions are hashtable based, hint environment lookups are much faster.
2024-09-13 22:14:54 -07:00
Semphris
9eea8234e6
Add SDL_Process subsystem
2024-09-13 15:19:32 -07:00
Carl Åstholm
84361bcf0a
stdlib: Remove test cases with impl-defined results
2024-09-13 12:30:58 -07:00
Carl Åstholm
eb199176e6
stdlib: Conditionally undef some SDL_strtox tests
...
Some test cases have implementation-defined results,
so we should only test these when we know SDL's own
implementations of the functions are used.
2024-09-13 12:30:58 -07:00
Carl Åstholm
59ec034412
stdlib: Use macros to define SDL_strtox tests
2024-09-13 12:30:58 -07:00
Carl Åstholm
a78f612d4b
stdlib: Add some tests for SDL_strtod
2024-09-13 12:30:58 -07:00
Carl Åstholm
61bc856b04
stdlib: Use new parser for scanf %p specifier
2024-09-13 12:30:58 -07:00
Carl Åstholm
e109aa09aa
stdlib: Rewrite SDL_strto(ll?|ul) impl
2024-09-13 12:30:58 -07:00
Carl Åstholm
e326540a45
stdlib: Add failing tests for SDL_strto(ll?|ul)
2024-09-13 12:30:58 -07:00
Carl Åstholm
5331f36789
stdlib: Add failing tests for SDL_strtoull
2024-09-13 12:30:58 -07:00
Carl Åstholm
5d30980df4
stdlib: Add failing tests for SDL_wcstol
...
These help illustrate some key differences between a specs-compliant
libc wcstol and SDL's own implementation.
2024-09-13 12:30:58 -07:00
Ethan Lee
96e147b2b9
gpu: Rework driver name queries, add GetGPUShaderFormats
2024-09-13 12:29:40 -04:00
Caleb Cornett
a45a2caf49
GPU: Rename VertexBinding to VertexBufferDescription ( #10811 )
2024-09-12 18:02:39 -05:00
Petar Popovic
fd2a266549
Adding void to empty function prototype parenthesis
2024-09-11 19:44:52 -07:00
Sam Lantinga
3f7f6f624b
testcolorspace: don't tonemap from HDR to SDR when reading pixels
...
Our source content is in the SDR range, so we don't need to tonemap when reading it back.
2024-09-11 14:23:58 -07:00
Sam Lantinga
4e43da684c
Added texture colorspace testing
2024-09-11 14:23:58 -07:00