|
a85cf62c
|
2023-03-21T12:24:45
|
|
Fix sdltest_randomAsciiStringWithMaximumLength() where it requests a string a size 0
seen with: ./testautomation --seed MILAFAP2AKVP3V4G --filter sdltest_randomAsciiStringWithMaximumLength
|
|
fd495bb5
|
2023-09-29T14:23:36
|
|
SDLTest_CompareSurfaces: Decode pixels correctly on big-endian platforms
Previously, if acting on a surface with less than 32 bits per pixel,
this code was placing the pixel value from the surface in the first
few bytes of the Uint32 to be decoded, and unrelated data from a
subsequent pixel in the remaining bytes.
Because SDL_GetRGBA takes the bits to be decoded from the
least-significant bits of the given value, ignoring the higher-order
bits if any, this happened to be correct on little-endian platforms,
where the first few bytes store the least-significant bits of an
integer.
However, it was incorrect on big-endian, where the first few bytes are
the most-significant bits of an integer.
The previous implementation also assumed that unaligned access to a
32-bit quantity is possible, which is not the case on all CPUs (but
happens to be true on x86).
These issues were not discovered until now because
SDLTest_CompareSurfaces() is only used in testautomation, which until
recently was not being run routinely at build-time, because it contained
other assumptions that can fail in an autobuilder or CI environment.
Resolves: https://github.com/libsdl-org/SDL/issues/8315
Signed-off-by: Simon McVittie <smcv@collabora.com>
(cherry picked from commit d95d2d7051e23271db7cec43134582834fb3ac8b)
(cherry picked from commit 6b5eadb10f02b51b400e710e2c95e9f0c2cb579c)
|
|
3f1fd5ab
|
2023-05-23T10:59:03
|
|
Updated source to match SDL function prototype style
|
|
0d763800
|
2023-03-09T15:10:00
|
|
Code style: changed "sizeof foo" to "sizeof(foo)" (thanks @sezero!)
(cherry picked from commit c6443d86c92e962683a1efe5f123a144988875b5)
|
|
8f7427c1
|
2023-03-08T19:19:15
|
|
tests: Always set valid dimensions for the fullscreen mode
|
|
17515f4a
|
2023-02-04T15:51:37
|
|
Backport simplify flags PR #7220
|
|
5d1e6b28
|
2023-01-16T10:28:16
|
|
SDL_test_harness: fix memory leak when generated seed
|
|
0479df53
|
2023-01-09T09:48:21
|
|
Updated copyright for 2023
|
|
f5777683
|
2022-12-09T10:22:18
|
|
Fixed build
|
|
569fa3f5
|
2022-12-09T10:13:18
|
|
Added test event logging for SDL_WINDOWEVENT_ICCPROF_CHANGED and SDL_WINDOWEVENT_DISPLAY_CHANGED
|
|
be3b1cff
|
2022-12-08T17:03:29
|
|
Added logging for SDL_DISPLAYEVENT_MOVED
|
|
0a91a793
|
2022-12-02T21:11:33
|
|
Fix Conditional jump or move depends on uninitialised value(s)
eg ./testsprite2 --trackmem
|
|
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)
|
|
101306ed
|
2022-09-19T14:37:10
|
|
Do case insensitive matching on test cases
|
|
2dd76598
|
2022-08-09T09:29:30
|
|
test: Fixed wrong arguments to SDL_SetWindowFullscreen.
|
|
2241bd66
|
2022-07-29T20:37:38
|
|
Added a command line option `--info event_motion` to show mouse and finger motion events
|
|
20f51b1f
|
2022-07-22T10:58:29
|
|
Fixed crash if debug text wasn't drawn during a session
|
|
f317d619
|
2022-07-01T13:59:14
|
|
Xbox GDKX support (#5869)
* Xbox GDK support (14 squashed commits)
* Added basic keyboard testing
* Update readme
* Code review fixes
* Fixed issue where controller add/removal wasn't working (since the device notification events don't work on Xbox, have to use the joystick thread to poll XInput)
|
|
89624485
|
2022-07-01T13:32:56
|
|
Updated the test bitmap font to cover the Latin-1 character set
Based on Marcel Sondaar's font8_8.asm, in the public domain
|
|
e9d5060c
|
2022-07-01T12:56:47
|
|
checkkeys will now render text that is input
Also added test functions for multi-line debug text display
Currently this only supports ASCII, as the font doesn't have the correct Latin-1 characters
|
|
53e30705
|
2022-06-18T06:52:16
|
|
List the available tests if the filter didn't match
|
|
0a93ac12
|
2022-05-08T18:06:47
|
|
Work around the lack of clock() on PS Vita
|
|
6b4bd5a7
|
2022-06-05T09:34:12
|
|
test_harness: Report if zero tests to run.
Fixes static analysis complain about a potential malloc(0) call.
|
|
0cca71a8
|
2022-05-18T22:12:05
|
|
Use SDLCALL for callbacks in public APIs
|
|
0e198a87
|
2022-04-05T15:03:18
|
|
Added a define VERBOSE_MOTION_EVENTS to show mouse and finger motion events
|
|
120c76c8
|
2022-01-03T09:40:00
|
|
Updated copyright for 2022
|
|
ced442cd
|
2021-12-17T07:33:10
|
|
SDL_test_common.c: (unsigned char) cast to SDL_isdigit() parameter.
|
|
a887b8e2
|
2021-12-03T20:03:10
|
|
SDL_test_common.c: replaced all printf() calls with SDL_Log()
Otherwise, if one builds libSDL2_test using a new mingw but builds
the test programs using an older mingw, a link failure happens:
/opt/local/x86_64-w64-mingw32/lib/libSDL2_test.a(SDL_test_common.o): In function `printf':
/opt/local/x86_64-w64-mingw32/include/stdio.h:372: undefined reference to `__imp___acrt_iob_func'
collect2: ld returned 1 exit status
|
|
4f683f01
|
2021-11-26T17:26:42
|
|
Fixed potentially truncated entry in stack trace
|
|
a3c05d2f
|
2021-11-23T19:43:01
|
|
Added debug output for display connect/disconnect events
|
|
fae70349
|
2021-11-23T10:33:12
|
|
Fix warnings: static, include, un-initialized vairables
|
|
990fb668
|
2021-11-20T01:02:02
|
|
tests: several -Wwrite-strings fixes.
|
|
c7aa04d0
|
2021-11-14T02:31:20
|
|
SDL_test_harness.c: avoid -Wwrite-strings
|
|
c2dd50a9
|
2021-11-12T08:28:02
|
|
Fixed whitespace
|
|
d5032582
|
2021-11-10T09:45:56
|
|
Use consistent language between SDLTest_AssertPass() and SDLTest_AssertCheck()
|
|
0d987936
|
2021-11-09T22:03:42
|
|
testwm2: Fix video modes menu hit detection when highdpi or logical size used (#4936)
* SDLTest_CommonDrawWindowInfo: log SDL_RenderGetScale, SDL_RenderGetLogicalSize
* testwm2: fix video modes menu hit detection in High DPI cases
- also when logical size is specified, e.g.
`--logical 640x480 --resizable --allow-highdpi`
* add function to determine logical coordinates of renderer point when given window point
* change since to the targeted milestone
* fix typo
* rename for consistency
* Change logical coordinate type to float, since we can render with floating point precision.
* add function to convert logical to window coordinates
* testwm2: use new SDL_RenderWindowToLogical
* SDL_render.c: alternate SDL_RenderWindowToLogical/SDL_RenderLogicalToWindow
Co-authored-by: John Blat <johnblat64@protonmail.com>
Co-authored-by: John Blat <47202511+johnblat64@users.noreply.github.com>
|
|
4b42c05b
|
2021-11-08T13:52:48
|
|
video: Add SDL_SetWindowMouseRect.
This API and implementation comes from the Unreal Engine branch of SDL, which
originally called this "SDL_ConfineCursor".
Some minor cleanup and changes for consistency with the rest of SDL_video, but
there are two major changes:
1. The coordinate system has been changed so that `rect` is _window_ relative
and not _screen_ relative, making it easier to implement without having
global access to the display.
2. The UE version unset all rects when passing `NULL` as a parameter for
`window`, this has been removed as it was an unused feature anyhow.
Currently this is only implemented for X, but can be supported on Wayland and
Windows at minimum too.
|
|
2008f2a8
|
2021-11-07T01:41:34
|
|
SDL_test_font.c: fix type of SDLTest_CharTextureCacheList
|
|
a0e055a7
|
2021-11-07T02:48:29
|
|
testwm2: add mode menu, click on a mode to call SDL_SetWindowDisplayMode
|
|
70f7ebe6
|
2021-11-07T01:46:04
|
|
SDL_test_font.c: add ability to draw on different SDL_Renderers
fixes `testwm2 --windows 2`
|
|
c57bcb47
|
2021-10-23T14:46:03
|
|
test: Fix building with libunwind under autotools
There are two issues which are stopping the SDL tests from building on
my machine:
- libunwind is not being linked
- Even if it is, it is missing several symbols.
The first is fixed by having the test programs link against libunwind if
available. Technically, SDL2_test should be linking against it, as it's
used in SDL_test_memory.c, but as SDL2_test is a static library, it
can't itself import libunwind. We just assume that if it's present on
the system, we should link it directly to the test programs. This should
strictly be an improvement, as the only case where this'd fail is if
SDL2 was compiled when libunwind was present, but the tests are being
compiled without it, and that'd fail anyway.
The second is fixed by #define-ing UNW_LOCAL_ONLY before including
libunwind.h: this is required to make libunwind link to predicatable
symbols, in what can only be described as a bit of a farce. There are a
few more details in the libunwind man page, but the gist of it is that
it disables support for "remote unwinding": unwinding stack frames in a
different process (and possibly from a different architecture?):
http://www.nongnu.org/libunwind/man/libunwind(3).html
Note that I haven't tried this with CMake: I suspect that it'll work,
though, as the CMakeLists.txt seems to have SDL2 link against libunwind if
it's present. This adds an ugly extra dependency to SDL2, but does mean
that issue 1 isn't present. The UNW_LOCAL_ONLY change shouldn't be
build-system-specific.
|
|
b5e5c1ef
|
2021-08-13T17:53:39
|
|
Added Ctrl-T to toggle topmost mode in test programs
|
|
f1633127
|
2021-07-24T13:41:55
|
|
Added a window flash operation to be explicit about window flash behavior
|
|
e1c3a250
|
2021-07-24T12:11:27
|
|
Changed SDL_FlashWindow() so it doesn't take a flash count, and added the hint SDL_HINT_WINDOW_FLASH_COUNT to control behavior on Windows
|
|
c33e3c15
|
2021-06-07T18:24:57
|
|
testwm2: draw various debug logging into the window itself
Renderer output size, window position/size, display bounds, etc.
Uses new SDLTest_CommonDrawWindowInfo function in test_common.
|
|
9727655b
|
2021-04-26T14:22:19
|
|
SDL_test_common: add other window flags: --shown, --hidden, --input-focus, --mouse-focus
|
|
d62ebec2
|
2021-04-26T14:10:39
|
|
SDL_test_common: replace 'resize' by 'resizable'
|
|
09231c42
|
2021-02-15T11:51:00
|
|
Fix flags check in test code
|
|
f443a6fc
|
2021-02-11T02:05:02
|
|
Fix format string warnings for width-based integers
The DJGPP compiler emits many warnings for conflicts between print
format specifiers and argument types. To fix the warnings, I added
`SDL_PRIx32` macros for use with `Sint32` and `Uint32` types. The macros
alias those found in <inttypes.h> or fallback to a reasonable default.
As an alternative, print arguments could be cast to plain old integers.
I opted slightly for the current solution as it felt more technically correct,
despite making the format strings more verbose.
|
|
ef2f13e1
|
2021-02-01T22:30:31
|
|
Added test command line options to force different window types
|
|
6b057c67
|
2021-01-26T19:16:17
|
|
Expose separate keyboard and mouse grab support
This adds SDL_SetWindowKeyboardGrab(), SDL_GetWindowKeyboardGrab(),
SDL_SetWindowMouseGrab(), SDL_GetWindowMouseGrab(), and new
SDL_WINDOW_KEYBOARD_GRABBED flag. It also updates the test harness to exercise
this functionality and makes a minor fix to X11 that I missed in
https://hg.libsdl.org/SDL/rev/02a2d609369b
To fit in with this new support, SDL_WINDOW_INPUT_CAPTURE has been renamed to
SDL_WINDOW_MOUSE_CAPTURE with the old name remaining as an alias for backwards
compatibility with older code.
|
|
9130f7c3
|
2021-01-02T10:25:38
|
|
Updated copyright for 2021
|
|
16389654
|
2020-06-14T12:05:56
|
|
fix watcom build of SDL_test_common.c
|
|
c760c02c
|
2020-03-25T01:34:15
|
|
Fix some format specifier warnings
The warnings were produced by GCC 9.2.x for x86_64-linux-gnu or
i386-pc-msdosdjgpp targets.
Most of the fixes involve changing the type of a variable rather than
the format specifier. For many of the affected test conuter variables,
a basic int seems sufficient.
Some format specifier warnings still remain for cases where changing
type or casting seemed inappropriate. Those warnings will probably
require some new format specifier macros (e.g. SDL_PRIu32).
|
|
afb70f26
|
2020-02-12T13:09:38
|
|
test: Reimplemented SDLTest_CommonUsage() to restore binary compatibility.
Fixes Bugzilla #4975.
|
|
66579dbd
|
2020-01-30T13:47:48
|
|
test: Common framework now accepts --usable-bounds command line argument.
|
|
80e7e2eb
|
2020-01-30T13:47:19
|
|
test: change path in a comment from '\\' to '/' char. Nothing serious here.
|
|
a8780c6a
|
2020-01-16T20:49:25
|
|
Updated copyright date for 2020
|
|
20ddf45e
|
2019-11-02T22:58:52
|
|
Added SDL_PIXELFORMAT_BGR444
|
|
d4a67e25
|
2019-10-30T16:06:51
|
|
Readability: change some pointer parameter to be pointer to const
|
|
b458d7a2
|
2019-10-30T15:13:55
|
|
Readability: remove redundant cast to the same type
|
|
e9c1e126
|
2019-10-15T12:02:19
|
|
test: Fixed wrong verbose flag check (thanks, watcom.hecht!).
Fixes Bugzilla #4826.
|
|
aa0a6518
|
2019-10-15T08:54:25
|
|
test: Fixed compiler warning on Visual Studio.
|
|
791df27a
|
2019-09-09T13:50:46
|
|
Fixed compiler warning on Android
|
|
4953e050
|
2019-07-31T05:11:40
|
|
use SDL_zeroa at more places where the argument is an array.
|
|
b5d3b6fc
|
2019-05-28T17:39:13
|
|
test: unify all the command line usage logging.
|
|
00e5eeb4
|
2019-05-19T01:45:15
|
|
test: added SDLTest_CommonDefaultArgs()
This is for test apps that don't need custom command line arguments; it lets
us reduce the boilerplate code a tiny bit.
|
|
5e13087b
|
2019-01-04T22:01:14
|
|
Updated copyright for 2019
|
|
252dc85e
|
2018-12-06T09:22:00
|
|
Fix warnings detected on Android build
|
|
b815ad56
|
2018-11-12T16:42:49
|
|
Fixed bug 4366 - Compile throws a warning on RPI (Raspbian Stretch)
midwan
When trying to compile on a Raspberry Pi 3, running Raspbian Stretch (fully updated), a warning appears:
/home/pi/projects/SDL/src/test/SDL_test_memory.c: In function ?SDL_TrackAllocation?:
/home/pi/projects/SDL/src/test/SDL_test_memory.c:112:109: warning: format ?%llx? expects argument of type ?long long unsigned int?, but argument 5 has type ?unw_word_t {aka unsigned int}? [-Wformat=]
snprintf(entry->stack_names[stack_index], sizeof(entry->stack_names[stack_index]), "%s+0x%llx", sym, offset);
|
|
f225af0c
|
2018-08-22T21:48:28
|
|
Added SDL_GetDisplayOrientation() to get the display orientation, and added a new event SDL_DISPLAYEVENT to notify the application when the orientation changes.
Documented the values returned by the accelerometer and gyroscope sensors
|
|
e061a92d
|
2018-08-02T16:03:47
|
|
Some drag'and'drop improvements.
First: disable d'n'd events by default; most apps don't need these at all, and
if an app doesn't explicitly handle these, each drop on the window will cause
a memory leak if the events are enabled. This follows the guidelines we have
for SDL_TEXTINPUT events already.
Second: when events are enabled or disabled, signal the video layer, as it
might be able to inform the OS, causing UI changes or optimizations (for
example, dropping a file icon on a Cocoa app that isn't accepting drops will
cause macOS to show a rejection animation instead of the drop operation just
vanishing into the ether, X11 might show a different cursor when dragging
onto an accepting window, etc).
Third: fill in the drop event details in the test library and enable the
events in testwm.c for making sure this all works as expected.
|
|
08de74ec
|
2018-06-13T14:45:02
|
|
use the 'aborts' pragma of Watcom for SDL_NORETURN functions
SDL_ExitProcess(), SDL_AbortAssertion() and SDLTest_BailOut().
(Commit 303c1e0fb0cf for bug #4100 removed SDL_NORETURN from
SDL_ExitProcess() and SDL_AbortAssertion() in order to avoid
warnings from windows builds, but that's temporary I guess..)
|
|
3ea093cc
|
2018-02-25T10:15:00
|
|
SDL_test_fuzzer.c: fix strict aliasing warnings by using a union.
|
|
e3cc5b2c
|
2018-01-03T10:03:25
|
|
Updated copyright for 2018
|
|
1c43705b
|
2017-12-09T13:05:56
|
|
Fixed compiler warning
|
|
cf923648
|
2017-10-13T09:50:04
|
|
Fixed bug 3879 - add missing SDLCALL to SDLTest_TrackedMalloc & co.
Ozkan Sezer
The attached trivial patch adds missing SDLCALL to SDLTest_TrackedMalloc & co.
|
|
22b6df51
|
2017-10-12T14:46:28
|
|
Use the lower-case hex output to match other stack trace printouts
|
|
70791956
|
2017-10-12T14:44:54
|
|
Fixed compiler warning
|
|
5fc20176
|
2017-10-12T14:25:07
|
|
Fixed bug 3877 - missing SDLCALL in SDLTest_ExampleHitTestCallback
Ozkan Sezer
Following trivial patch adds missing SDLCALL to SDLTest_ExampleHitTestCallback()
|
|
41a60394
|
2017-10-12T14:20:17
|
|
Added missing file
|
|
9c580e14
|
2017-10-12T13:44:28
|
|
Added functions to query and set the SDL memory allocation functions:
SDL_GetMemoryFunctions()
SDL_SetMemoryFunctions()
SDL_GetNumAllocations()
|
|
f4f9e39f
|
2017-10-12T08:41:11
|
|
Fixed bug 3874 - Compiler warnings SDL_Surface.c and SDL_cocoakeyboard.m
|
|
0fea9164
|
2017-09-22T17:29:32
|
|
Added an example for SDL_SetWindowHitTest() when you create a borderless resizable window.
|
|
e8059221
|
2017-09-08T18:26:25
|
|
Fixed bug 3806 - Fixes for MSVC compiler warnings
Simon Hug
These are the remaining compiler warnings I see in the current tip cb049cae7c3c.
- SDL_test_log.c defines _CRT_SECURE_NO_WARNINGS without checking if it was already set.
- SDL_windowskeyboard.c converts integers to pointers without going over the (U)INT_PTR types. That bothers MSVC.
|
|
4657d9f3
|
2017-09-08T04:53:31
|
|
We don't need to pass the renderer into SDLTest_CleanupTextDrawing()
|
|
65c55fdd
|
2017-09-08T04:38:46
|
|
Fixed build
|
|
b0b3da77
|
2017-09-08T04:14:05
|
|
Added a function to clean up test text drawing
|
|
9ca62923
|
2017-08-29T23:14:39
|
|
Added some missing render capability flags
|
|
c3d428d4
|
2017-08-29T23:12:26
|
|
Fixed line breaks in verbose test logging output
|
|
94e0f3e9
|
2017-08-29T22:52:17
|
|
Added some debug messaging for previously unhandled events
|
|
ae667da6
|
2017-08-29T15:52:49
|
|
Fixed a bunch of compiler warnings.
|
|
ded5b3a4
|
2017-08-27T21:05:18
|
|
Fixed crash at shutdown if the window couldn't be created
|
|
25e3a1ec
|
2017-08-27T22:15:57
|
|
vulkan: Initial Vulkan support!
This work was done by Jacob Lifshay and Mark Callow; I'm just merging it
into revision control.
|
|
b2e2bcc2
|
2017-08-12T20:21:34
|
|
Added test debug logs for additional event types
|
|
3c852360
|
2017-08-11T10:42:26
|
|
Fixed bug 3646 - SDL_test_common.c: Add key bindings for testing SDL_SetWindowPosition
Eric Wasylishen
Alt-Up/Down/Left/Right switches between displays using SDL_WINDOWPOS_CENTERED_DISPLAY
Shift-Up/Down/Left/Right shifts the window by 100px
|
|
cff9e5a8
|
2017-05-18T16:29:10
|
|
test: info now reports usable display bounds and DPI (thanks, Eric!).
Fixes Bugzilla #3652.
|
|
33ff5bd1
|
2017-02-03T23:30:29
|
|
Fixed typo in log message.
|