Pierre Wendling
43c22e5d1e
Test: Refactor math suite duplicate code.
...
Many tests were using the same underlying routine, as such three helper
functions were added:
- A wrapper to test double -> double functions.
- A wrapper to test (double, double) -> double functions,
- A wrapper for range tests on double -> double functions.
2022-06-15 12:05:30 -07:00
Pierre Wendling
3d720ba381
Test: Refactor math suites edge cases.
...
Split infinity and zero checks in their own functions.
The result of NAN tests is now logged.
The SDL_TestCaseReference structure were renamed to be more explicit.
2022-06-15 12:05:30 -07:00
Pierre Wendling
a530fc9199
Test: Add Copysign tests to math suite.
2022-06-15 12:05:30 -07:00
Pierre Wendling
48a406db4d
Test: Add Fabs tests to math suite.
2022-06-15 12:05:30 -07:00
Pierre Wendling
2130dff0fc
Test: Add Round tests to math suite.
2022-06-15 12:05:30 -07:00
Pierre Wendling
324b96153f
Test: Add Trunc tests to math suite.
2022-06-15 12:05:30 -07:00
Pierre Wendling
b09266a4ef
Test: Add Ceil tests to math suite.
2022-06-15 12:05:30 -07:00
Pierre Wendling
9eb09d2392
Test: Refactored and formatted math test suite.
2022-06-15 12:05:30 -07:00
Pierre Wendling
0f630e9177
Test: fix indentation in Makefile.in.
2022-06-15 12:05:30 -07:00
Pierre Wendling
4e3a26e271
Test: Add math test suite to autotools.
2022-06-15 12:05:30 -07:00
Pierre Wendling
e64acb619a
Test: Fix for-loop for OS/2 in math suite.
2022-06-15 12:05:30 -07:00
Pierre Wendling
a3a852e912
Test: Unrolled the array of cases in math suite.
...
On OS/2, `INFINITY` is a `const double` which cannot be used to
instantiate an array.
2022-06-15 12:05:30 -07:00
Pierre Wendling
c23216bf46
Test: Removed static from local variables (Math).
...
Static would break compilation on OS/2.
2022-06-15 12:05:30 -07:00
Pierre Wendling
6208ed8604
Test: Add math suite to Visual Studio solution.
2022-06-15 12:05:30 -07:00
Pierre Wendling
6646edf692
Test: Fix Windows build for math suite.
2022-06-15 12:05:30 -07:00
Pierre Wendling
d9ff6380ae
Test: Add math test suite to Watcom Makefile.
2022-06-15 12:05:30 -07:00
Pierre Wendling
7389eba943
Test: Fix C89 declaration and math include.
2022-06-15 12:05:30 -07:00
Pierre Wendling
b3faebb8a8
Test: Add Floor tests to math.
2022-06-15 12:05:30 -07:00
Pierre Wendling
b72b5d0f99
Test: Add math automation test suite.
2022-06-15 12:05:30 -07:00
Anonymous Maarten
86f50ae7d7
ci: Test cmake build script on Android
...
android
2022-06-15 11:11:49 -07:00
Anonymous Maarten
18206446bf
cmake: collect SDL_LIBS as list + export PKG_DIRECTFB_LDFLAGS
2022-06-15 11:11:49 -07:00
Anonymous Maarten
b5f1fe5004
cmake: Allow integers for SDL_ASSERTIONS + fix -DSDL_ASSERTIONS=0
2022-06-15 11:11:49 -07:00
Anonymous Maarten
97711e99fe
cmake: no need to explicitly add a depency (target_link_libraries does this implicitly)
2022-06-15 11:11:49 -07:00
Anonymous Maarten
ad21c70408
cmake: fix CMP0072 warning by prefering GLVND
2022-06-15 11:11:49 -07:00
Yao Wei Tjong 姚伟忠
c90e1ec3ef
Remove redundant sizeof "size_t" check
...
The result variables: HAVE_${VARIABLE}, ${VARIABLE}, ${VARIABLE}_CODE,
etc. do not seem to be referenced anywhere in the CMake build script.
2022-06-15 13:50:34 -04:00
Cameron Cawley
12f9bcd2f4
Build tests for all CMake platforms on CI
2022-06-15 10:14:25 -07:00
takase1121
f8ae3ef1eb
wayland: use libdecor resize edge enums for libdecor
2022-06-15 10:21:18 -04:00
Ozkan Sezer
163f669745
minor tidy-up to configury.
2022-06-15 17:00:02 +03:00
Ozkan Sezer
960b86dcb5
update SDL_render_d3d12.c after DPI scaling/highdpi support patch.
...
See https://github.com/libsdl-org/SDL/pull/5778#issuecomment-1153006938
2022-06-14 21:03:31 -07:00
Anonymous Maarten
6d1dfc8322
cmake: make sure SDL2::SDL2 is always available
2022-06-14 20:15:34 -07:00
Anonymous Maarten
69df26a0d4
ci: test clang+MinGW on CI
2022-06-14 20:15:34 -07:00
Anonymous Maarten
32df5aeb3d
Check result of FindLibraryAndSONAME before use
2022-06-15 05:33:40 +03:00
Anonymous Maarten
8a2c6b604c
cmake: don't link to libibus (not needed, I think)
2022-06-15 05:33:40 +03:00
Anonymous Maarten
c950018fe0
cmake: don't link to libdbus (see note in SDL_dbus.c)
2022-06-15 05:33:40 +03:00
Anonymous Maarten
fb7c03ebb5
cmake: install LICENSE.txt
2022-06-15 05:33:40 +03:00
Anonymous Maarten
afc350eeff
cmake: do 's#set(SOURCE_FILES #list(APPEND SOURCE_FILES #g'
2022-06-15 05:33:40 +03:00
Ryan C. Gordon
ded6c22efb
render: Corrected wrong SDL_memcpy() sizes for viewport, cliprect.
...
Fixes #5786 .
2022-06-14 14:10:14 -04:00
Frank Praznik
e427e80bfe
wayland: Use the output descriptions from xdg-output when available
...
Some compositors will provide 'nicer' / 'human readable' output descriptions via the xdg-output protocol. Use these description strings, when available, instead of the model name provided by wl-output. On compositors such as GNOME where this is provided, the display names provided to applications by SDL will now match those in the desktop display settings panel. On compositors where this data isn't provided, the old behavior of using the model string provided by wl-output will remain unchanged.
Additionally, per the protocol spec, output data provided by xdg-output should supersede wl-output data, so this is the recommended behavior in general.
2022-06-14 11:02:20 -04:00
Ozkan Sezer
714502d373
minor windows warning fixes.
2022-06-13 22:15:56 +03:00
Simon McVittie
e974985998
test: Add test coverage for surface size overflows
...
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-06-13 11:53:53 -07:00
Simon McVittie
507ce36d80
video: Note unused SDL_surface creation parameters for removal in SDL 3
...
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-06-13 11:53:53 -07:00
Simon McVittie
535fdc3adc
video: Detect and reject nonsense SDL_surface dimensions
...
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-06-13 11:53:53 -07:00
Simon McVittie
8c9f7104e3
video: Harden calculation of SDL_surface pitch and size against overflow
...
If the width is sufficiently ludicrous, then the calculated pitch or
the image size could conceivably be a signed integer overflow, which
is undefined behaviour. Calculate in the unsigned size_t domain, with
overflow checks.
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-06-13 11:53:53 -07:00
Anonymous Maarten
6606ab8b56
Introduce EXTRA_TEST_LIBS variable for test-only libraries
2022-06-13 10:05:30 -07:00
Anonymous Maarten
e99a7144ff
Use list(APPEND EXTRA_LIBS) everywhere
2022-06-13 10:05:30 -07:00
Anonymous Maarten
851eecdf40
Don't add extra build linker flags to SDL2_static
...
These leak to users, when SDL2 is vendored.
2022-06-13 10:05:30 -07:00
Simon McVittie
63b3b9a558
Fix some typos in diagnostic messages
...
Detected by Debian's packaging QA tool, Lintian.
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-06-13 08:33:27 -07:00
Sam Lantinga
c95edd9450
Fixed spacing
2022-06-13 06:36:48 -07:00
SDL Wiki Bot
33f8a4ddca
Sync wiki -> header
2022-06-13 13:29:04 +00:00
Sam Lantinga
6258f2ef3f
Fixed spacing
2022-06-13 06:27:14 -07:00