Commit Graph

18 Commits

Author SHA1 Message Date
Amir e7a47e783b Fix warning for Android NDK compiler: "function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]"
https://stackoverflow.com/questions/42125/warning-error-function-declaration-isnt-a-prototype
In C int foo() and int foo(void) are different functions. int foo() accepts an arbitrary number of arguments, while int foo(void) accepts 0 arguments. In C++ they mean the same thing.

(cherry picked from commit ccade50587)
2024-07-17 14:48:06 -07:00
Sam Lantinga 0fc3574464 Updated copyright for 2024 2024-01-01 13:19:49 -08:00
Anonymous Maarten d81d986858
cmake: fix uses of undefined macro identifiers (-Wundef) 2023-11-17 03:06:26 +00:00
Sylvain Becker a14b948b6c
[SDL2] pointer boolean (#8523) 2023-11-10 06:30:56 -08: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
capehill 6ed29f47c9 testgles2_sdf: Call correct function to get shader info log
(cherry picked from commit b8c88cc584)
2023-03-26 22:00:41 -07:00
Sam Lantinga 0479df53ca Updated copyright for 2023 2023-01-09 09:48:21 -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 5750bcb174)
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 6a2200823c to reduce conflicts merging between SDL2 and SDL3)
2022-11-28 12:33:03 -08:00
Sylvain 71f2864b3a
Fix usage of sizeof() in test/testgles*.c files 2022-11-17 14:55:49 +01:00
Simon McVittie 76a7b629bf test: Add some common code to load test resources
As well as reducing duplication, this lets the tests load their resources
from the SDL_GetBasePath() on platforms that support it, which is useful
if the tests are compiled along with the rest of SDL and installed below
/usr as manual tests, similar to GNOME's installed-tests convention.

Thanks to Ozkan Sezer for the OS/2 build glue.

Co-authored-by: Ozkan Sezer <sezeroz@gmail.com>
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-05-04 18:17:55 -07:00
Sam Lantinga 120c76c84b Updated copyright for 2022 2022-01-03 09:40:21 -08:00
Sylvain f1582f549b Fix comment 2021-11-22 08:38:46 -08:00
Sylvain d31251b014 use SDL's functions version inplace of libc version 2021-11-22 08:38:46 -08:00
Sylvain Becker 4fbb9f31ab Fix declarations after statement 2021-01-24 00:51:24 -05:00
Sylvain Becker 0e7d435f13 Add basic testgles2_sdf program to demonstrate sign distance field with opengles2 2021-01-24 00:51:24 -05:00