SDL_SendAndroidMessage(3)

πŸ’– SDL_SendAndroidMessage(3) πŸ’–

okay bestie, welcome to the SDL3 FUNCTIONS corner of the man pages, we're talking about SDL_SendAndroidMessage(3) today and honestly? it's giving "tiny function, big vibes" ✨


🌸 NAME 🌸

SDL_SendAndroidMessage β€” slide a lil user command over to SDLActivity, no cap πŸ“¨


πŸŽ€ SYNOPSIS πŸŽ€

#include <SDL3/SDL_system.h>

bool SDL_SendAndroidMessage(Uint32 command, int param);

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea, bestie πŸ«– β€” you override this:

boolean onUnhandledMessage(Message msg)

and that's literally how you handle the message. that's it. that's the whole vibe. πŸ’…


✨ FUNCTION PARAMETERS ✨

  • command β€” the user command, and it must be greater than or equal to 0x8000. like, that's the floor, don't go under it 🚫
  • param β€” the user parameter. that's your lil extra lil payload, do whatever with it 🌈

πŸ‘‘ RETURN VALUE πŸ‘‘

returns true on success, false on failure 😭 β€” and if it fails, go call SDL_GetError() for the full story, she'll tell you everything πŸ’œ


🧚 THREAD SAFETY 🧚

it is safe to call this function from any thread πŸŽ‰ like genuinely, go feral, any thread you want, it's fine, iconic behavior honestly

⭐ AVAILABILITY ⭐

this one's been around since SDL 3.2.0 β€” so if you're on anything older... bestie. update. 😭


that's the whole page, you ate that, no crumbs left πŸ“

signing off with the deets you need: this is from Simple Directmedia Layer, rocking SDL 3.4.18 energy, and the page itself is dated SDL_SendAndroidMessage(3) β€” same name, same date, we're consistent and we're slaying πŸ’…βœ¨πŸ«Ά

πŸ“¦ where this page comes from