Commit Graph

40 Commits

Author SHA1 Message Date
Sam Lantinga
a90ad3b0e2 Removed SDL_bool in favor of plain bool
We require stdbool.h in the build environment, so we might as well use the plain bool type.

If your environment doesn't have stdbool.h, this simple replacement will suffice:
typedef signed char bool;
2024-09-18 08:32:30 -07:00
Maia
35ebaf4a45 Fix multiple definitions of SDL_assert* when SDL_WIKI_DOCUMENTATION_SECTION is defined 2024-08-31 20:08:36 -07:00
SDL Wiki Bot
1f34f35b25 Sync SDL3 wiki -> header 2024-08-19 00:55:27 +00:00
Ryan C. Gordon
9c5bd98a0f
assert: Added SDL_HINT_ASSERT.
Same environment variable, but now accessible as a formal SDL hint.

Reference PR #10171.
2024-08-18 20:53:55 -04:00
Sam Lantinga
637e9700dd Standardize placement of '*' in function declarations
Implemented using these sed commands on the headers:
sed -E -i'' '/SDLCALL|;/ s,([a-z])\* ,\1 *,g' *
sed -E -i'' 's,(\(.*[^\*])\* ([a-z])(.*\)),\1*\2\3,g' *
sed -E -i'' 's,\*const,* const,g' *
sed -E -i'' 's,\*SDLCALL,* SDLCALL,g' *
sed -E -i'' 's,void\(,void (,g' *
git checkout *gl*
2024-07-19 12:22:03 -07:00
Ryan C. Gordon
51902d4ac5
Updated headers with latest wikiheaders tweaks. 2024-06-14 02:09:55 -04:00
Ryan C. Gordon
8e782602de
wikiheaders: Fixes and cleanups to fix SDL_ReportAssertion's wiki page. 2024-06-11 11:29:44 -04:00
Carlo Bramini
b1f3682216 SDL_assert: add support for aarch64-w64-mingw32
GCC 15 development branch provides an experimental support for Windows on ARM64, which will be officially released next year, according to latest news.
I tried to compile SDL2 with this new compiler but I got a tiny problem into SDL_assert.h because it couldn't find the right platform.
However, it has been easy to fix and I included it into this PR.
More details can be also found here:
https://learn.microsoft.com/en-us/cpp/intrinsics/debugbreak?view=msvc-170

(cherry picked from commit 2cb1a2d0a7f1c9cb3177c907758322899c3041d5)
2024-06-03 10:55:14 -07:00
Sam Lantinga
6f2621438a Renamed DECLSPEC to SDL_DECLSPEC 2024-05-17 17:09:09 -07:00
SDL Wiki Bot
10ab623d43 Sync SDL3 wiki -> header 2024-05-16 16:02:15 +00:00
Ryan C. Gordon
5e6d85b8f0
wikiheaders: bridge wiki Category docs to the headers!
Did an initial cleanup on the headers and wrote a few pieces of documentation,
but this needs more work to fill out the documentation.
2024-05-16 11:48:23 -04:00
SDL Wiki Bot
ab5b904890 Sync SDL3 wiki -> header 2024-05-03 03:27:33 +00:00
Ryan C. Gordon
0e0bb22f79
include: More documentation updates. 2024-05-02 23:25:45 -04:00
Ryan C. Gordon
ec97857a87
SDL_assert.h: Documentation improvements. 2024-04-24 15:17:31 -04:00
SDL Wiki Bot
5fbc038375 Sync SDL3 wiki -> header 2024-04-24 17:20:14 +00:00
SDL Wiki Bot
11de629dd2 Sync SDL3 wiki -> header 2024-04-14 05:50:22 +00:00
Ryan C. Gordon
291edc073c
include: Document SDL_TriggerBreakpoint. 2024-04-14 01:48:52 -04:00
SDL Wiki Bot
b2239cb7ba Sync SDL3 wiki -> header 2024-04-10 19:59:14 +00:00
Ryan C. Gordon
557f26e6f0
include: Fixed up some more documentation. 2024-04-10 15:58:28 -04:00
Ryan C. Gordon
e044318a8e
Sync SDL3 wiki -> headers 2024-04-09 00:50:03 -04:00
Ryan C. Gordon
ad090d2444
include: A ton of little documentation tweaks, fixes, and improvements.
This is just stuff I noticed while working on the wikiheaders updates. A
thorough pass over all the docs would not be terrible, and maybe a simple
script to check for consistency (does everything have a `\since` on it? etc)
might be nice, too.
2024-04-09 00:50:02 -04:00
Ryan C. Gordon
6906c50e8b
assert: SDL_AssertData::always_ignore should be an SDL_bool, not an int. 2024-04-09 00:50:01 -04:00
Anonymous Maarten
31d133db40
Define SDL_PLATFORM_* macros instead of underscored ones (#8875) 2024-01-24 01:40:51 +00:00
Sam Lantinga
5b3ee51c6c Updated copyright for 2024 2024-01-01 13:15:26 -08:00
Ryan C. Gordon
c53843a961
docs: Remove Doxygen \brief tags.
Doxygen and the wiki bridge don't need them; they'll both just use the first
line/sentence instead.

Fixes #8446.
2023-11-06 10:26:06 -05:00
David CARLIER
723bcd0a8b SDL_TriggerBreakppoint for riscv arch (both 32/64) version.
`ebreak` acts like int3 for x86, giving control of running process to debuggers.
2023-08-13 11:36:49 -04:00
Anonymous Maarten
b6ae281e97 Use #ifdef/#ifndef instead of #if defined/#if \!defined 2023-03-30 21:35:01 +00:00
Ozkan Sezer
bb59f46cbe Removed guard around the enabled assertions support code
Otherwise, SDL_assert_always() wouldn't work.

Fixes https://github.com/libsdl-org/SDL/issues/7433
2023-03-09 20:51:50 +03:00
Ryan C. Gordon
0598ecc150
Sync wiki -> headers. 2023-02-24 11:49:41 -05:00
Sam Lantinga
a758f87f6f Fixed compile error on Android when assert is defined as SDL_assert 2023-02-22 15:32:49 -08:00
Anonymous Maarten
549cedfa88 include: add \brief to includes 2023-02-19 10:01:33 -08:00
Sylvain
81c94a165c Add \since docs where missing and resets some to 3.0.0
- remove a \returns
2023-02-12 20:43:11 +01:00
Sylvain
43c08170af Add missing '\param' documentation 2023-02-12 09:42:13 +01:00
Vladyslav Serhiienko
47deebe23f Fixes for Android builds 2023-01-31 08:39:51 -08:00
Sam Lantinga
fde78d12f2 Updated copyright for 2023 2023-01-09 09:41:41 -08:00
Sylvain Becker
d7d3c22dbf
Remove more reserved identifiers (#6925) 2022-12-29 13:58:16 -08:00
Sam Lantinga
63724c113b Removed the vi format comments from the source
Vim users can use the [editorconfig plugin](https://github.com/editorconfig/editorconfig-vim) to automatically set tab spacing for the SDL coding style.

Fixes https://github.com/libsdl-org/SDL/issues/6903
2022-12-26 11:17:23 -08:00
Ryan C. Gordon
3197632347
include: Renamed begin_code.h and close_code.h to have SDL_ prefixes.
Fixes #6864.
2022-12-22 11:39:26 -05:00
Sylvain
a38ea6bad2
SDL_assert: remove old define for obsolete naming 2022-12-10 17:21:51 +01:00
Sam Lantinga
0a48abc860 Switch header convention from #include "SDL.h" to #include <SDL3/SDLh>
I ran this script in the include directory:
```sh
sed -i '' -e 's,#include "\(SDL.*\)",#include <SDL3/\1>,' *.h
```

I ran this script in the src directory:
```sh
for i in ../include/SDL3/SDL*.h
do hdr=$(basename $i)
   if [ x"$(echo $hdr | egrep 'SDL_main|SDL_name|SDL_test|SDL_syswm|SDL_opengl|SDL_egl|SDL_vulkan')" != x ]; then
        find . -type f -exec sed -i '' -e 's,#include "\('$hdr'\)",#include <SDL3/\1>,' {} \;
    else
        find . -type f -exec sed -i '' -e '/#include "'$hdr'"/d' {} \;
    fi
done
```

Fixes https://github.com/libsdl-org/SDL/issues/6575
2022-11-26 22:15:18 -08:00