|
7f7ea909
|
2023-05-31T04:50:02
|
|
testautomation_guid.c: fix integer warning in 32 bit builds.
|
|
73083255
|
2023-05-26T13:57:49
|
|
Added support for printing wide strings using "%ls" syntax
(cherry picked from commit 128ca7016018178c0c3231db7db2005dbf234068)
|
|
feeec908
|
2023-05-19T17:00:24
|
|
test/testgles2_sdf.c: type fixes from commit e26e893daf, style clean-up.
|
|
d361acdd
|
2023-05-19T15:24:52
|
|
testgles2_sdf: build with CMake + fix build errors/warnings
|
|
92a487f2
|
2023-05-19T14:10:02
|
|
style fixes for SDL_PROC macros.
|
|
d2a27877
|
2023-03-28T19:24:33
|
|
Fix remaining -Wimplicit-fallthrough warnings
|
|
ec3e333f
|
2023-03-18T20:34:56
|
|
testautomation_audio: fix -Wimplicit-fallthrough warning
(cherry picked from commit 11c70406c322b5686f35349acc9659c4d8d5a8f7)
|
|
03c239de
|
2023-03-18T20:32:14
|
|
testsurround: fix channel names
Used table in include/SDL3/SDL_audio.h as reference.
(cherry picked from commit e1b8a032391f4b24453d5bcbe725a35b3894ea5d)
|
|
977781d3
|
2023-03-21T22:03:42
|
|
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]
|
|
6ed29f47
|
2023-03-26T22:13:09
|
|
testgles2_sdf: Call correct function to get shader info log
(cherry picked from commit b8c88cc58423b7e654b18fdaf1aab5a343114586)
|
|
2dddaa7d
|
2023-03-25T10:24:38
|
|
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
|
|
ef347776
|
2023-03-09T17:34:51
|
|
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)
|
|
5e353099
|
2023-03-10T08:32:24
|
|
fix bad merge of sizeof style patch
|
|
0d763800
|
2023-03-09T15:10:00
|
|
Code style: changed "sizeof foo" to "sizeof(foo)" (thanks @sezero!)
(cherry picked from commit c6443d86c92e962683a1efe5f123a144988875b5)
|
|
bc879833
|
2023-03-08T18:56:50
|
|
tests: added -DHAVE_SIGNAL_H to CFLAGS in watcom makefiles
|
|
17515f4a
|
2023-02-04T15:51:37
|
|
Backport simplify flags PR #7220
|
|
0479df53
|
2023-01-09T09:48:21
|
|
Updated copyright for 2023
|
|
b8d5fa4a
|
2023-01-03T12:47:40
|
|
Improved handling of binding buttons and axes
(cherry picked from commit 71f3bf90edce26083056215124e65881f6c6ad26)
|
|
8e72be31
|
2022-12-15T14:26:18
|
|
testime.c: fix wrong {} in switch
|
|
e580e087
|
2022-12-06T17:53:01
|
|
N3DS: Backport semaphore fixes from #6776.
|
|
bcccbbd8
|
2022-12-05T00:35:32
|
|
tests: avoid redefinition warnings for MSVC _CRT_???_NO_DEPRECATE macros
|
|
d0bbfdbf
|
2022-12-01T16:07:03
|
|
Clang-Tidy fixes (#6725)
(cherry picked from commit 3c501b963dd8f0605a6ce7978882df39ba76f9cd)
|
|
b8d85c69
|
2022-11-30T12:51:59
|
|
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)
|
|
fb0ce375
|
2022-11-27T17:38:43
|
|
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)
|
|
3e70553c
|
2022-11-18T11:06:49
|
|
Unneed test before calling SDL_FreeSurface
|
|
71f2864b
|
2022-11-17T14:55:49
|
|
Fix usage of sizeof() in test/testgles*.c files
|
|
ddad901c
|
2022-11-17T10:43:45
|
|
Remove unneeded semicolon
|
|
b7358e47
|
2022-11-17T09:18:49
|
|
Don't compare pointer against '0', but NULL
|
|
4192d1a1
|
2022-11-16T21:56:19
|
|
Fix compilation. It needs to be casted to 'int' type
|
|
ce5da5d5
|
2022-11-16T21:47:43
|
|
Don't compare pointer against '0', but NULL
|
|
a22fcf77
|
2022-11-01T13:40:19
|
|
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
|
|
d8884b84
|
2022-11-01T13:10:46
|
|
emscripten: fix warnings in tests
|
|
a71e558d
|
2022-11-01T13:09:52
|
|
cmake: testshader needs -sLEGACY_GL_EMULATION on Emscripten
|
|
cfa76973
|
2022-11-01T11:33:39
|
|
cmake: FindOpenGL.cmake shipped by emscripten does not have OpenGL::GL
|
|
76e3cf38
|
2022-11-01T11:04:45
|
|
cmake: use custom add_sdl_test_executable macro to add test
|
|
55534e27
|
2022-11-01T15:39:13
|
|
cmake: add time out to tests to avoid ci timeouts
|
|
d080e3bf
|
2022-11-14T17:56:48
|
|
Silence `-Wmaybe-uninitialized` warnings in tests.
|
|
0dfc829a
|
2022-11-10T19:16:53
|
|
Added simple BLE Steam Controller support on all platforms
This is still disabled by default via the hint SDL_HINT_JOYSTICK_HIDAPI_STEAM
|
|
db01016d
|
2022-11-07T21:15:30
|
|
revert replace AM_PATH_SDL2 usage with corresponding PKG_CHECK_MODULES.
Reference issue: https://github.com/libsdl-org/SDL/issues/6494 .
|
|
64c93f78
|
2022-11-06T23:51:04
|
|
replace AM_PATH_SDL2 usage with corresponding PKG_CHECK_MODULES.
|
|
da478d1f
|
2022-10-25T10:30:56
|
|
Fixed build
|
|
2dc788cb
|
2022-10-20T19:54:24
|
|
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>
|
|
f4e3af15
|
2022-10-17T07:23:40
|
|
Simplify OSS test by removing OpenBSD specific location of the soundcard.h header
OpenBSD has long since stopped using OSS. Remove checking for OpenBSD specific header.
|
|
7d230af5
|
2022-10-12T12:41:30
|
|
testevdev: Explain why the test data is encoded the way it is
Signed-off-by: Simon McVittie <smcv@collabora.com>
|
|
81dee319
|
2022-10-12T12:36:41
|
|
testevdev: Add a static assertion for supported sizeof(long)
If this assertion fails on some platform (unlikely), we will need a
third implementation for SwapLongLE().
Signed-off-by: Simon McVittie <smcv@collabora.com>
|
|
fb32effd
|
2022-10-09T12:13:23
|
|
testevdev: Fix detection of word size
The check for whether to use a 32- or 64-bit swap for an array of long
values always took the 64-bit path, because <limits.h> wasn't included
and therefore ULONG_MAX wasn't defined. Turn this into a runtime check,
which a reasonable compiler will optimize into a constant.
This fixes testevdev failures on 32-bit big-endian platforms such as hppa
and older powerpc. Little-endian and/or 64-bit platforms are unaffected.
[smcv: Added commit message]
Bug-Debian: https://bugs.debian.org/1021310
Co-authored-by: Simon McVittie <smcv@collabora.com>
|
|
c1317175
|
2022-10-10T22:02:17
|
|
PSP: Fix `Wformat` warnings.
|
|
6784d84c
|
2022-10-10T01:31:14
|
|
N3DS: Fix `-Wformat` warnings in tests.
All warnings were about invalid specifiers. Since U/Sint32 is a long,
using `%d` emits a -Wformat warning.
|
|
65527537
|
2021-03-30T04:32:39
|
|
N3DS port (squashed)
A dedicated renderer using Citro3D would likely allow for better
much better graphical performances.
|
|
ec1137df
|
2022-10-09T15:19:47
|
|
cmake: Apply CETCOMPAT fix from ef988fe1 to tests
|
|
d0220395
|
2022-10-09T12:01:02
|
|
testhaptic: fix watcom "&array may not produce intended result" warning
|
|
b8a4b8d1
|
2022-10-06T02:51:50
|
|
testautomation_mouse: fix format '%i' expecting 'int' instead of 'Uint32'
Emitted by Nintendo 3DS's gcc
|
|
7ae5d8d4
|
2022-10-06T01:15:49
|
|
testmessage: fix conversion from `intptr_t` to `Uint32`
Emitted by MSVC
|
|
02b200ef
|
2022-10-06T01:14:28
|
|
testoffscreen: fix '<': signed/unsigned mismatch
Emitted by MSVC
|
|
7a7980fa
|
2022-10-06T01:12:42
|
|
testnative: fix conversion from `time_t` to `unsigned int`
Emitted by MSVC
|
|
87706895
|
2022-10-06T01:12:18
|
|
testmouse: add explicit int-cast to avoid warning about converting `float` to `int`
Emitted by MSVC
|
|
3c251ec4
|
2022-10-06T01:10:22
|
|
testintersections: fix conversion from `time_t` to `unsigned int`
Emitted by MSVC
|
|
b771d9be
|
2022-10-06T01:09:32
|
|
tests: avoid MSVC preaching about unsafe functions
|
|
ebae142a
|
2022-10-06T01:05:59
|
|
testhaptic: fix conversion from `size_t` to `int`
Emitted by MSVC
|
|
18c776e1
|
2022-10-06T01:02:17
|
|
testspriteminimal: fix conversion from `time_t` to `unsigned int`
Emitted by MSVC
|
|
f3389f13
|
2022-10-06T01:00:58
|
|
testgeometry: fix conversion from 'double' to 'float', possible loss of data
emitted by MSVC
|
|
45da1339
|
2022-10-06T00:39:47
|
|
cmake: don't error on apple when using deprecated declarations
|
|
274ec025
|
2022-10-06T00:31:00
|
|
testautomation: avoid format related warnings by using a few pragma's
ci: enable -Werror to a few platforms
|
|
d04fa0ef
|
2022-10-06T00:30:11
|
|
controllermap: use enum to avoid '-Wmaybe-uninitialized'
Emitted by MinGW:
In function 'WatchJoystick',
inlined from 'SDL_main' at D:/a/SDL/SDL/test/controllermap.c:802:9:
D:/a/SDL/SDL/test/controllermap.c:437:9: warning: 'marker' may be used uninitialized [-Wmaybe-uninitialized]
437 | SDL_SetTextureAlphaMod(marker, alpha);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
D:/a/SDL/SDL/test/controllermap.c: In function 'SDL_main':
D:/a/SDL/SDL/test/controllermap.c:355:71: note: 'marker' was declared here
355 | SDL_Texture *background_front, *background_back, *button, *axis, *marker;
|
|
a905db9d
|
2022-10-05T23:59:01
|
|
testcustomcursor: fix Wswitch warning by casting the arg to an int
|
|
bb527678
|
2022-10-05T23:56:27
|
|
testgamecontroller: fix -Wshadow warning by renaming global axis+button textures
|
|
57c88655
|
2022-10-05T23:55:59
|
|
automation_main.c: fix -Wformat-zero-length warning due to SDL_SetError("")
|
|
be5f55c4
|
2022-10-07T00:17:25
|
|
watcom: add ENABLE_WERROR option to makefiles
|
|
335c6724
|
2022-10-06T19:17:18
|
|
autotools: add --enable-werror option
|
|
64ea6cef
|
2022-10-02T17:17:31
|
|
SDL_ResetHint() no longer clears the callbacks associated with a hint
Also added SDL_ResetHints() to reset all callbacks, and clarified that SDL_ClearHints() is just used for cleanup at shutdown.
Fixes https://github.com/libsdl-org/SDL/issues/6313
|
|
19ecb64e
|
2022-10-02T10:18:57
|
|
Fixed build
|
|
a00565b8
|
2022-10-02T09:08:39
|
|
Fixed displaying more than 18 buttons
|
|
0d6c4ff6
|
2022-09-29T11:36:07
|
|
testaudioinfo: Initialize deviceName unconditionally
|
|
1ea1a90e
|
2022-09-29T10:41:40
|
|
testaudioinfo: Also test SDL_GetAudioDeviceSpec
|
|
40893821
|
2022-09-29T10:33:07
|
|
coreaudio: Add support for SDL_GetDefaultAudioInfo (#6277)
Co-authored-by: Ethan Lee <flibitijibibo@gmail.com>
Co-authored-by: Ozkan Sezer <sezeroz@gmail.com>
|
|
d843d61c
|
2022-09-28T09:09:21
|
|
Moved test/versioning.sh to build-scripts/test-versioning.sh
Reference Issue #6171.
|
|
2c518747
|
2022-09-27T09:56:02
|
|
Added microsecond timestamp to sensor values for PS4 and PS5 controllers using the HIDAPI driver
|
|
3a6b7c9c
|
2022-09-24T16:55:10
|
|
testiconv: Print the total number of errors at the end
|
|
7312b93d
|
2022-09-22T22:50:28
|
|
Fixed crash if a game controller is disconnected while the connect message is in flight
|
|
c70ffc2a
|
2022-09-19T15:34:17
|
|
Added size_t format specifier test coverage for SDL_snprintf and SDL_sscanf
|
|
c8332948
|
2022-09-18T17:33:04
|
|
tests, watcom: silence lots of W202 warnings from new vulkan headers.
|
|
dd51787e
|
2022-09-08T15:53:25
|
|
Fix SDL_PIXELFORMAT_INDEX1LSB test case
|
|
ac5b9bc4
|
2022-09-14T18:28:35
|
|
Add support for X11 primary selection (#6132)
X11 has a so-called primary selection, which you can use by marking text and middle-clicking elsewhere to copy the marked text.
There are 3 new API functions in `SDL_clipboard.h`, which work exactly like their clipboard equivalents.
## Test Instructions
* Run the tests (just a copy of the clipboard tests): `$ ./test/testautomation --filter Clipboard`
* Build and run this small application:
<details>
```C
#include <SDL.h>
#include <unistd.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
void print_error(const char *where)
{
const char *errstr = SDL_GetError();
if (errstr == NULL || errstr[0] == '\0')
return;
fprintf(stderr, "SDL Error after '%s': %s\n", where, errstr);
SDL_ClearError();
}
int main()
{
char text_buf[256];
srand(time(NULL));
SDL_Init(SDL_INIT_VIDEO);
print_error("SDL_INIT()");
SDL_Window *window = SDL_CreateWindow("Primary Selection Test", SDL_WINDOWPOS_UNDEFINED,
SDL_WINDOWPOS_UNDEFINED, 400, 400, SDL_WINDOW_SHOWN);
print_error("SDL_CreateWindow()");
SDL_Renderer *renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED);
print_error("SDL_CreateRenderer()");
bool quit = false;
unsigned int do_render = 0;
while (!quit) {
SDL_Event event;
while (SDL_PollEvent(&event)) {
print_error("SDL_PollEvent()");
switch (event.type) {
case SDL_QUIT: {
quit = true;
break;
} case SDL_KEYDOWN: {
switch (event.key.keysym.sym) {
case SDLK_ESCAPE:
case SDLK_q:
quit = true;
break;
case SDLK_c:
snprintf(text_buf, sizeof(text_buf), "foo%d", rand());
SDL_SetClipboardText(text_buf);
print_error("SDL_SetClipboardText()");
printf("clipboard: set_to=\"%s\"\n", text_buf);
break;
case SDLK_v: {
printf("clipboard: has=%d, ", SDL_HasClipboardText());
print_error("SDL_HasClipboardText()");
char *text = SDL_GetClipboardText();
print_error("SDL_GetClipboardText()");
printf("text=\"%s\"\n", text);
SDL_free(text);
break;
} case SDLK_d:
snprintf(text_buf, sizeof(text_buf), "bar%d", rand());
SDL_SetPrimarySelectionText(text_buf);
print_error("SDL_SetPrimarySelectionText()");
printf("primselec: set_to=\"%s\"\n", text_buf);
break;
case SDLK_f: {
printf("primselec: has=%d, ", SDL_HasPrimarySelectionText());
print_error("SDL_HasPrimarySelectionText()");
char *text = SDL_GetPrimarySelectionText();
print_error("SDL_GetPrimarySelectionText()");
printf("text=\"%s\"\n", text);
SDL_free(text);
break;
} default:
break;
}
break;
} default: {
break;
}}
}
// create less noise with WAYLAND_DEBUG=1
if (do_render == 0) {
SDL_RenderPresent(renderer);
print_error("SDL_RenderPresent()");
}
do_render += 1;
usleep(12000);
}
SDL_DestroyRenderer(renderer);
SDL_DestroyWindow(window);
SDL_Quit();
print_error("quit");
return 0;
}
```
</details>
* Use c,v,d,f to get and set the clipboard and primary selection.
* Mark text and middle-click also in other applications.
* For wayland under x:
* `$ mutter --wayland --no-x11 --nested`
* `$ XDG_SESSION_TYPE=wayland SDL_VIDEODRIVER=wayland ./<path_to_test_appl_binary>`
|
|
a7fde3f8
|
2022-09-07T01:58:42
|
|
Allow mapping a controller other than the first one
|
|
4018f35e
|
2022-09-07T00:00:27
|
|
Added left and right sensors for Nintendo Joy-Con and Wii controllers
|
|
911524da
|
2022-09-06T03:15:02
|
|
fix DYLIB version inconsistencies and test failures after #6188.
|
|
acf397b4
|
2022-09-05T11:21:13
|
|
Actually, DYLIB_COMPATIBILITY_VERSION shouldn't be updated for a stable point release
@smcv
|
|
cf040f88
|
2022-09-05T16:27:25
|
|
testmouse: Allow drawing rectangles as well as lines
|
|
a9325817
|
2022-09-05T16:37:34
|
|
testplatform: Add LSX and LASX checks
|
|
4e98ba61
|
2022-09-05T08:28:06
|
|
Set DYLIB_COMPATIBILITY_VERSION to DYLIB_CURRENT_VERSION to match autotools
Autotools sets both versions to the same value, so Xcode and CMake need to match for the libraries to be compatible between the different builds.
See these for details:
https://github.com/libsdl-org/sdl12-compat/pull/207
https://github.com/libsdl-org/SDL/issues/2934
https://stackoverflow.com/questions/67055770/usage-of-current-version-and-compatibility-version-on-macos
|
|
cbc0d9fa
|
2022-09-03T21:22:26
|
|
test/versioning.sh also tests configure
|
|
6bcf2c15
|
2022-09-02T15:06:49
|
|
Fixed spinning at a very high framerate
|
|
3cbfd75d
|
2022-08-27T18:55:55
|
|
Re-added the CRC to the joystick guid
This is now used as a crc field in the mapping rather than directly in mapping guids, for better mapping compatibility between versions of SDL.
Added SDL_GetJoystickGUIDInfo() to get device information encoded in a joystick GUID, so that mapping programs can clear the CRC from the GUID when generating mappings.
sort_controllers.py has been updated to extract the CRC from mappings created by older mapping programs and convert it into the new crc field. It will also take the CRC into account when checking for duplicate mappings.
Also regenerated the GUIDs for the PS2/PSP/Vita controller mappings, fixing https://github.com/libsdl-org/SDL/issues/6151
|
|
2ceea460
|
2022-08-21T14:15:06
|
|
cmake: Enable CET compatibility for x86/x64 targets using VS 16.7+
|
|
99e9156f
|
2022-08-16T19:50:59
|
|
testgles2: Fix typo in help text
|
|
222f1a26
|
2022-08-15T22:51:15
|
|
testgles2: Add --threaded option to use a render thread per window
This is helpful for reproducing bugs like #6056
|
|
aaec244c
|
2022-08-10T09:04:17
|
|
Don't run the stdio automated tests if libc isn't available
|
|
d4192850
|
2022-08-10T07:59:12
|
|
Added SDL_ResetHint() to reset a hint to the default value
Resolves question of how to clear an override hint raised by @pionere in https://github.com/libsdl-org/SDL/pull/5309
|
|
73d8d026
|
2022-08-09T22:36:59
|
|
Test: Fix Exp base case for Win32.
Add epsilon to the check.
|
|
3a9295e1
|
2022-08-09T16:02:16
|
|
build-scripts: Removed winrtbuild.*, no longer used.
WinRT/UWP is still supported, but you have to use the VS2019
project files, now.
Fixes #5639.
|