Undocumented commands in SDL

In the manual I see eg SDL_acos, but there are many other, undescribed, SDL_TRUE, SDL_CALL … Is there a list somewhere? How do they differ from standard C commands?

Most of the SDL_ stdlib functions will just call your OS’ libc functions under the hood. But when that function is unavailable on your system, it provides an implementation.

For example, Windows doesn’t have the asprintf function (a GNU extension). But the SDL_asprintf function is still available, providing the same interface.

Similarly, C89 didn’t have a boolean type, so SDL has SDL_bool that can be SDL_TRUE or SDL_FALSE.

In short, it’s just a portable way to call libc functions. So the standard documentation applies to these functions. (Except maybe floating point rounding in math functions)

But this is not in the documentation …

https://wiki.libsdl.org/SDL_bool ← SDL_TRUE is documented here

Also see https://wiki.libsdl.org/ToDo:

The following functions are found in the header files, but not (yet) on the wiki. Some pages just need to be categorized, others don’t exist yet and need to be made, and some might not belong on the wiki anyway --((for example, none of the internal SDL_cstdlib functions have been listed here))–.

SDL_stdinc.h

These functions maybe do not need to be documented here

  • SDL_abs
  • SDL_acos
  • SDL_asin

Note that it says “internal SDL_cstdlib functions” so maybe they are mainly intended for internal use within the SDL library.

There, in turn, many of the functions mentioned are documented … I can see that there is a MessageBox … and it’s just producing a mini GUI, maybe unnecessarily …

Do you know how to make a message box appear on Windows and macOS and Linux w/Wayland and Linux w/X11, etc? No? That’s why SDL has the messagebox functions. So that if your app can’t create a window, or even get SDL to initialize, you can at least pop up a message box letting the user know instead of your app just silently closing.

IDK what your whole deal is.

Well, without it, he would not have realized that it does not work …:wink:

Does it work on Android too? Are other GUI objects created?