SDL_MAIN_AVAILABLE(3)

πŸ“¦
version 3.4.18 Β· 5 versions
, in fedora 43, fedora 44

πŸ’– SDL_MAIN_AVAILABLE(3) πŸ’–

okay so bestie, welcome to the SDL3 FUNCTIONS manual page for SDL_MAIN_AVAILABLE. This macro is lowkey a little secret handshake between SDL and your platform's main, and we're gonna spill all the tea. ✨


✨ NAME ✨

  • SDL_MAIN_AVAILABLE β€” defined if the target platform offers a special mainline through SDL.

🌸 SYNOPSIS 🌸

#include <SDL3/SDL_main.h>

#define SDL_MAIN_AVAILABLE

πŸ’… DESCRIPTION πŸ’…

So here's the vibe: this macro won't be defined otherwise. If it is defined, SDL's headers will redefine main to SDL_main. Not me, not you β€” the headers. πŸ’€

It's defined by SDL_main.h, which is not automatically included by SDL.h. Like, you have to go get it yourself. No cap.

Even if it's available, an app can define SDL_MAIN_HANDLED and provide their own main, if they know what they're doing. Main character energy, honestly.

This macro is used internally by SDL, and apps probably shouldn't rely on it. So like, look but don't touch, bestie. πŸ™ˆ

πŸ¦‹ AVAILABILITY πŸ¦‹

This macro is available since SDL 3.2.0. Slay.


And that's the whole page, bestie. Brought to you by Simple Directmedia Layer, version SDL 3.4.18, and it's the SDL_MAIN_AVAILABLE(3) manual page. No date on the footer, she's timeless. πŸ’–πŸŽ€

πŸ“¦ where this page comes from