Commit Graph

14 Commits (2eef7ca475decd2b864214cdbfe72b143b16d459)

Author SHA1 Message Date
Sam Lantinga 0fc3574464 Updated copyright for 2024
Sylvain Becker a14b948b6c
[SDL2] pointer boolean ()
Sam Lantinga 0d76380042 Code style: changed "sizeof foo" to "sizeof(foo)" (thanks @sezero!)
(cherry picked from commit c6443d86c9)
Sam Lantinga 0479df53ca Updated copyright for 2023
Pierre Wendling d0bbfdbfb8 Clang-Tidy fixes ()
(cherry picked from commit 3c501b963d)
Sam Lantinga b8d85c6939 Update for SDL3 coding style ()
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:




(cherry picked from commit 5750bcb174)
Sylvain Becker fb0ce375f0 Cleanup add brace ()
* 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)
Pierre Wendling 6784d84c9d N3DS: Fix `-Wformat` warnings in tests.
All warnings were about invalid specifiers. Since U/Sint32 is a long,
using `%d` emits a -Wformat warning.
Sam Lantinga 120c76c84b Updated copyright for 2022
Sam Lantinga 9130f7c377 Updated copyright for 2021
Sam Lantinga a8780c6a28 Updated copyright date for 2020
Sam Lantinga 5e13087b0f Updated copyright for 2019
Sam Lantinga e3cc5b2c6b Updated copyright for 2018
Sam Lantinga a6a4e27ae8 Updated SDL's YUV support, many thanks to Adrien Descamps
New functions get and set the YUV colorspace conversion mode:
	SDL_SetYUVConversionMode()
	SDL_GetYUVConversionMode()
	SDL_GetYUVConversionModeForResolution()

SDL_ConvertPixels() converts between all supported RGB and YUV formats, with SSE acceleration for converting from planar YUV formats (YV12, NV12, etc) to common RGB/RGBA formats.

Added a new test program, testyuv, to verify correctness and speed of YUV conversion functionality.