Commit graph

608 commits

Author SHA1 Message Date
Ozkan Sezer 7cc3248044 minor os/2 stuff merged from the bitwiseworks' fork 2023-07-28 23:55:50 +03:00
Ozkan Sezer 3e341021c3 fixed typo in prev. patch. 2023-07-28 07:35:14 +03:00
Ozkan Sezer 1ecf77d630 test/testnativecocoa.m: fixed deprecation warnings. 2023-07-28 07:21:14 +03:00
Sam Lantinga ba0c270c7a Removed invalid assert in testatomic
(cherry picked from commit 8adab0b88ab1c0aa69242fffc48afdba085b1dc4)
2023-07-22 18:40:31 -07:00
Sam Lantinga a4ad293d4a Relicensed testutils to match other test code
Permission granted in 76a7b629bf (commitcomment-121408342)

(cherry picked from commit 6c2472d459602eb3c3ee109d6e8f255336109673)
2023-07-16 04:37:15 -07:00
Sam Lantinga 3054c0dc50 Fixed %p formatting when there is following text
(cherry picked from commit f4bd17deeeca6957d92979cf07fa436c249a9eda)
2023-07-06 08:37:27 -07:00
Sam Lantinga 1ab452fc57 Fixed printf formatting for "%p" and added a unit test to check it
(cherry picked from commit c63aa9545eb800390176fd2fd86036da81f91100)
2023-07-05 22:17:15 -07:00
Sam Lantinga a6ba8a1585 Removed spurious casts
(cherry picked from commit f73419e122ab0c2c7920b9de0921f5d6a464115d)
2023-07-03 16:11:02 -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 128ca7016018178c0c3231db7db2005dbf234068)
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 11c70406c322b5686f35349acc9659c4d8d5a8f7)
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 e1b8a032391f4b24453d5bcbe725a35b3894ea5d)
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 b8c88cc58423b7e654b18fdaf1aab5a343114586)
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 20e17559e545c5d3cfe86c1c4772365e70090779)
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 c6443d86c92e962683a1efe5f123a144988875b5)
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 71f3bf90edce26083056215124e65881f6c6ad26)
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 3c501b963dd8f0605a6ce7978882df39ba76f9cd)
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 5750bcb174300011b91d1de20edb288fcca70f8c)
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 6a2200823c66e53bd3cda4a25f0206b834392652 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: 485a7b4d6f (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
Simon McVittie 2dc788cb9f build: Expand version info in SDL_REVISION and SDL_GetRevision()
Instead of using a URL and git sha1, this uses `git describe` to
describe the version relative to the nearest previous git tag, which
gives a better indication of whether this is a release, a prerelease,
a slightly patched prerelease, or a long way after the last release
during active development.

This serves two purposes: it makes those APIs more informative, and it
also puts this information into the binary in a form that is easy to
screen-scrape using strings(1). For instance, if the bundled version of
SDL in a game has this, we can see at a glance what version it is.

It's also shorter than using the web address of the origin git
repository and the full git commit sha1.

Also write the computed version into a file ./VERSION in `make dist`
tarballs, so that when we build from a tarball on a system that doesn't
have git available, we still get the version details.

For the Perforce code path in showrev.sh, output the version number
followed by the Perforce revision, in a format reminiscent of
`git describe` (with p instead of g to indicate Perforce).

For the code path with no VCS available at all, put a suffix on the
version number to indicate that this is just a guess (we can't know
whether this SDL version is actually a git snapshot or has been
patched locally or similar).

Resolves: https://github.com/libsdl-org/SDL/issues/6418
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-10-22 09:27:10 -07:00