SDL_MUSTLOCK(3)
π SDL_MUSTLOCK β NAME π
okay bestie, so SDL_MUSTLOCK is a macro, and it evaluates to true if the surface needs to be locked before access. that's literally the whole vibe. if it's giving true, lock that surface first, no cap. πβ¨
πΈ SYNOPSIS πΈ
first, you gotta pull in the header:
#include <SDL3/SDL_surface.h>
and here's the macro itself, exactly as it is, don't come for me:
#define SDL_MUSTLOCK(S) (((S)->flags & SDL_SURFACE_LOCK_NEEDED) == SDL_SURFACE_LOCK_NEEDED)
she's a one-liner and she ate. π
π¦ AVAILABILITY π¦
this macro has been around since SDL 3.2.0. so if you're on something older... girl, upgrade. π
kay so that's the whole page, mwah π«Ά this iconic little entry comes to you from Simple Directmedia Layer, version SDL 3.4.18 β go forth and lock your surfaces responsibly, bestie ππ
π¦ where this page comes from
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms