Commit Graph

13 Commits

Author SHA1 Message Date
Anonymous Maarten
3ff56fda1a testautomation: only require accelerated renderer with non-dummy video driver
Backported from SDL3 commit 85e3099b.

Co-authored-by: Simon McVittie <smcv@collabora.com>
Resolves: https://github.com/libsdl-org/SDL/issues/8799
2024-01-08 11:01:06 -08:00
Sylvain Becker
a14b948b6c
[SDL2] pointer boolean (#8523) 2023-11-10 06:30:56 -08:00
Anonymous Maarten
fcae9cd210 cmake: build with -Wdocumentation 2023-08-09 02:53:48 +02: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
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
Sylvain
7f1feee02a
Fixed bug #2426 - SDL_RenderReadPixels result is unspecified and fails testautomation
Call SDL_RenderPresent after calling SDL_RenderReadPixels.
From "include/SDL_render.h":
"If you're using this on the main rendering target, it should be called after rendering and before SDL_RenderPresent()."
2022-03-21 10:20:04 +01:00
Ryan C. Gordon
da66755450
Fixed up legacy MoinMoin URLs at wiki.libsdl.org
Fixes #4064.
2021-04-01 12:20:33 -04:00
Ryan C. Gordon
2542977b0a
Revert "Update wiki.libsdl.org urls to libsdl-org/SDL/wiki (#4069)"
This reverts commit 82a96afa70.

We ended up not moving to GitHub's wiki after all and built
https://github.com/icculus/ghwikipp to fill the gap...since the wiki is
back at https://wiki.libsdl.org/, put back the original URLs.
2021-04-01 12:15:28 -04:00
Erik Yuzwa
82a96afa70
Update wiki.libsdl.org urls to libsdl-org/SDL/wiki (#4069) 2021-02-13 11:49:31 -05:00
Philipp Wiesemann
0e45984fa0 Fixed crash if initialization of EGL failed but was tried again later.
The internal function SDL_EGL_LoadLibrary() did not delete and remove a mostly
uninitialized data structure if loading the library first failed. A later try to
use EGL then skipped initialization and assumed it was previously successful
because the data structure now already existed. This led to at least one crash
in the internal function SDL_EGL_ChooseConfig() because a NULL pointer was
dereferenced to make a call to eglBindAPI().
2015-06-21 17:33:46 +02:00