SDL_SurfaceHasRLE(3)

✨ SDL_SurfaceHasRLE(3) ✨

okay bestie, quick vibe check: this is a page from the SDL3 FUNCTIONS fam, and it's about asking a surface one very specific little question. no cap, it's short, it's sweet, it slays. πŸ’…


🌸 NAME 🌸

SDL_SurfaceHasRLE β€” the "are you RLE enabled, or are you not" detector. Returns whether the surface is RLE enabled. periodt. πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <SDL3/SDL_surface.h>

bool SDL_SurfaceHasRLE(SDL_Surface *surface);

πŸ’œ DESCRIPTION πŸ’œ

It just tells you if the surface has RLE turned on. that's the whole plot. πŸŽ€

And here's the part that lowkey saves you: it is safe to pass a NULL surface here β€” it will just return false. no crash, no drama, no main character meltdown. iconic behavior honestly. 😭✨


🌈 FUNCTION PARAMETERS 🌈

  • surface β€” the SDL_Surface structure to query. like, the surface you're asking about. that one. πŸ‘‘

⭐ RETURN VALUE ⭐

Returns true if the surface is RLE enabled, false otherwise. simple as that, fr fr. 🫢


🧚 THREAD SAFETY 🧚

It is safe to call this function from any thread. yes bestie, any thread, go wild, it's giving very chill. 🌸


πŸ”₯ AVAILABILITY πŸ”₯

This function is available since SDL 3.2.0. so if you're on something older, it's not ghosting you, it just doesn't exist yet. πŸ’€


πŸ‘‘ SEE ALSO πŸ‘‘


and that's the whole page, bestie! short queen behavior. now go check your surfaces. πŸ’–

this was brought to you by Simple Directmedia Layer, living in SDL 3.4.18, and this very page is SDL_SurfaceHasRLE(3). stay slay, stay RLE-aware. πŸŒŸπŸ’…πŸ¦‹

πŸ“¦ where this page comes from