Sam Lantinga
a5df48514e
Added support for "%[]" sscanf syntax
...
Fixes https://github.com/libsdl-org/SDL/issues/8423
(cherry picked from commit 39a961ba41 )
(cherry picked from commit 4194a902e8 )
2023-10-24 17:34:39 -07:00
Anonymous Maarten
c7ad8e5431
cmake: make sure SDL_GetPrefPath is run before testfilesystem
...
60 seconds timeout ought to be sufficient.
2023-09-10 15:34:29 +02:00
Sam Lantinga
2319b2635b
Fixed testautomation --filter pixels_allocFreePalette
...
Error messages are not part of the ABI, so we can't validate those.
Hand-picked from https://github.com/libsdl-org/sdl2-compat/commit/c9323f8face982983668fca216a2eef12dc8b1f7
2023-08-08 11:50:00 +03:00
Sam Lantinga
bda161d22b
Fixed testautomation --filter pixels_allocFreeFormat
...
Error messages are not part of the ABI, so we can't validate those.
Technically SDL_AllocFormat() on a FOURCC format in SDL2 should fail, but SDL3 supports it and we don't expect SDL2 applications to actually do this, so skip that test.
Hand-picked from https://github.com/libsdl-org/sdl2-compat/commit/5cf9438f8870bb1f517935febf9d07b4f910a308
2023-08-08 11:50:00 +03:00
Anonymous Maarten
dbfd47e77d
cmake: update cmake_minimum_required to avoid deprecated warning
2023-08-07 19:03:18 +02:00
Ozkan Sezer
38a5aed974
minor os/2 stuff merged from the bitwiseworks' fork
2023-07-28 23:56:20 +03:00
Ozkan Sezer
3845fd3c49
fixed typo in prev. patch.
2023-07-28 07:35:24 +03:00
Ozkan Sezer
0d62ce6070
test/testnativecocoa.m: fixed deprecation warnings.
2023-07-28 07:21:28 +03:00
Sam Lantinga
ac4f5dcadd
Relicensed testutils to match other test code
...
Permission granted in https://github.com/libsdl-org/SDL/commit/76a7b629bfc4869df7659c2f2e47d9253c73696f#commitcomment-121408342
(cherry picked from commit 6c2472d459 )
(cherry picked from commit a4ad293d4a )
2023-07-16 04:38:48 -07:00
Ozkan Sezer
7f7ea909bc
testautomation_guid.c: fix integer warning in 32 bit builds.
2023-05-31 04:50:02 +03:00
Sam Lantinga
7308325559
Added support for printing wide strings using "%ls" syntax
...
(cherry picked from commit 128ca70160 )
2023-05-26 14:59:30 -07:00
Ozkan Sezer
feeec90873
test/testgles2_sdf.c: type fixes from commit e26e893daf, style clean-up.
2023-05-19 17:00:24 +03:00
Anonymous Maarten
d361acdd4e
testgles2_sdf: build with CMake + fix build errors/warnings
2023-05-19 15:24:52 +02:00
Ozkan Sezer
92a487f2e4
style fixes for SDL_PROC macros.
2023-05-19 14:10:02 +03:00
Anonymous Maarten
d2a2787783
Fix remaining -Wimplicit-fallthrough warnings
2023-03-28 19:24:33 +02:00
Anonymous Maarten
ec3e333fb8
testautomation_audio: fix -Wimplicit-fallthrough warning
...
(cherry picked from commit 11c70406c3 )
2023-03-28 10:21:36 -07:00
Anonymous Maarten
03c239ded9
testsurround: fix channel names
...
Used table in include/SDL3/SDL_audio.h as reference.
(cherry picked from commit e1b8a03239 )
2023-03-28 10:21:35 -07:00
Anonymous Maarten
977781d3f4
testautomation_math: avoid equality tests with INFINITY
...
Fixes this warning:
warning: comparison with infinity always evaluates to false in fast floating point modes [-Wtautological-constant-compare]
2023-03-27 06:13:28 +00:00
capehill
6ed29f47c9
testgles2_sdf: Call correct function to get shader info log
...
(cherry picked from commit b8c88cc584 )
2023-03-26 22:00:41 -07:00
Sylvain
2dddaa7dc9
backport x11/sdl2 fixes
...
4b1378f
X11: fix size/position (test video_setWindowCenteredOnDisplay)
this fix x11 backend to correctly pass video_setWindowCenteredOnDisplay()
get border values early (eg status bar)
wait for size/position change to get valid values
d4d26e0
testautomation_video: if SDL_SetWindowSize/Position isn't honored, we should check there is an event
x11: send the events if various occasions
2023-03-25 10:27:17 +01:00
Qrox
ef347776c2
Uses integer arithmetics in SDL_ResampleAudio
...
- Avoids precision loss caused by large floating point numbers.
- Adds unit test to test the signal-to-noise ratio and maximum error of resampler.
- Code cleanup
(cherry-picked from commit 20e17559e5 )
2023-03-10 18:37:00 +03:00
Ozkan Sezer
5e35309913
fix bad merge of sizeof style patch
2023-03-10 08:32:24 +03:00
Sam Lantinga
0d76380042
Code style: changed "sizeof foo" to "sizeof(foo)" (thanks @sezero!)
...
(cherry picked from commit c6443d86c9 )
2023-03-09 15:23:59 -08:00
Ozkan Sezer
bc87983310
tests: added -DHAVE_SIGNAL_H to CFLAGS in watcom makefiles
2023-03-08 18:56:50 +03:00
Sylvain
17515f4aef
Backport simplify flags PR #7220
2023-02-09 17:19:46 -08:00
Sam Lantinga
0479df53ca
Updated copyright for 2023
2023-01-09 09:48:21 -08:00
Sam Lantinga
b8d5fa4aef
Improved handling of binding buttons and axes
...
(cherry picked from commit 71f3bf90ed )
2023-01-03 12:50:20 -08:00
Sylvain
8e72be3117
testime.c: fix wrong {} in switch
2022-12-15 14:39:05 +01:00
Pierre Wendling
e580e087ff
N3DS: Backport semaphore fixes from #6776 .
2022-12-11 17:09:28 -08:00
Ozkan Sezer
bcccbbd894
tests: avoid redefinition warnings for MSVC _CRT_???_NO_DEPRECATE macros
2022-12-05 00:35:32 +03:00
Pierre Wendling
d0bbfdbfb8
Clang-Tidy fixes ( #6725 )
...
(cherry picked from commit 3c501b963d )
2022-12-01 13:08:50 -08:00
Sam Lantinga
b8d85c6939
Update for SDL3 coding style ( #6717 )
...
I updated .clang-format and ran clang-format 14 over the src and test directories to standardize the code base.
In general I let clang-format have it's way, and added markup to prevent formatting of code that would break or be completely unreadable if formatted.
The script I ran for the src directory is added as build-scripts/clang-format-src.sh
This fixes:
#6592
#6593
#6594
(cherry picked from commit 5750bcb174 )
2022-11-30 12:57:41 -08:00
Sylvain Becker
fb0ce375f0
Cleanup add brace ( #6545 )
...
* Add braces after if conditions
* More add braces after if conditions
* Add braces after while() conditions
* Fix compilation because of macro being modified
* Add braces to for loop
* Add braces after if/goto
* Move comments up
* Remove extra () in the 'return ...;' statements
* More remove extra () in the 'return ...;' statements
* More remove extra () in the 'return ...;' statements after merge
* Fix inconsistent patterns are xxx == NULL vs !xxx
* More "{}" for "if() break;" and "if() continue;"
* More "{}" after if() short statement
* More "{}" after "if () return;" statement
* More fix inconsistent patterns are xxx == NULL vs !xxx
* Revert some modificaion on SDL_RLEaccel.c
* SDL_RLEaccel: no short statement
* Cleanup 'if' where the bracket is in a new line
* Cleanup 'while' where the bracket is in a new line
* Cleanup 'for' where the bracket is in a new line
* Cleanup 'else' where the bracket is in a new line
(cherry picked from commit 6a2200823c to reduce conflicts merging between SDL2 and SDL3)
2022-11-28 12:33:03 -08:00
Sylvain
3e70553c48
Unneed test before calling SDL_FreeSurface
2022-11-18 06:58:34 -08:00
Sylvain
71f2864b3a
Fix usage of sizeof() in test/testgles*.c files
2022-11-17 14:55:49 +01:00
Sylvain
ddad901c0d
Remove unneeded semicolon
2022-11-17 10:43:45 +01:00
Sylvain
b7358e47d5
Don't compare pointer against '0', but NULL
2022-11-17 09:18:49 +01:00
Sylvain
4192d1a1c7
Fix compilation. It needs to be casted to 'int' type
2022-11-16 21:56:19 +01:00
Sylvain
ce5da5d579
Don't compare pointer against '0', but NULL
2022-11-16 21:47:43 +01:00
Anonymous Maarten
55534e277e
cmake: add time out to tests to avoid ci timeouts
2022-11-16 15:42:08 +01:00
Anonymous Maarten
a22fcf77fd
cmake: older emscripten releases have a broken FindOpenGL.cmake
...
This is fixed since 3.1.10: https://github.com/emscripten-core/emscripten/commit/485a7b4d6f84d4bc3b594ff81d39b6b143c8d598#diff-034f4d123f23ec5493d0fbf28cba1c36e404a991f286c8d031a22799e4e8b0e5
2022-11-16 15:42:08 +01:00
Anonymous Maarten
d8884b845e
emscripten: fix warnings in tests
2022-11-16 15:42:08 +01:00
Anonymous Maarten
a71e558d85
cmake: testshader needs -sLEGACY_GL_EMULATION on Emscripten
2022-11-16 15:42:08 +01:00
Anonymous Maarten
cfa76973ff
cmake: FindOpenGL.cmake shipped by emscripten does not have OpenGL::GL
2022-11-16 15:42:08 +01:00
Anonymous Maarten
76e3cf3840
cmake: use custom add_sdl_test_executable macro to add test
2022-11-16 15:42:08 +01:00
Pierre Wendling
d080e3bf3a
Silence -Wmaybe-uninitialized warnings in tests.
2022-11-14 21:23:08 -08:00
Sam Lantinga
0dfc829a6b
Added simple BLE Steam Controller support on all platforms
...
This is still disabled by default via the hint SDL_HINT_JOYSTICK_HIDAPI_STEAM
2022-11-10 19:17:04 -08:00
Ozkan Sezer
db01016dd6
revert replace AM_PATH_SDL2 usage with corresponding PKG_CHECK_MODULES.
...
Reference issue: https://github.com/libsdl-org/SDL/issues/6494 .
2022-11-07 21:15:30 +03:00
Ozkan Sezer
64c93f7804
replace AM_PATH_SDL2 usage with corresponding PKG_CHECK_MODULES.
2022-11-06 23:51:04 +03:00
Sam Lantinga
da478d1f66
Fixed build
2022-10-25 10:30:56 -07:00