SDL_UnlockSurface(3)

πŸ’… SDL_UnlockSurface β€” from the SDL3 FUNCTIONS girlies ✨

okay bestie, welcome to the SDL3 FUNCTIONS corner of the manual, where we talk about SDL_UnlockSurface 🫢


🌸 NAME 🌸

SDL_UnlockSurface β€” release a surface after you've been directly accessing the pixels. like, put it back, babe πŸ’–


✨ SYNOPSIS ✨

#include <SDL3/SDL_surface.h>

void SDL_UnlockSurface(SDL_Surface *surface);

no return value, no drama, just vibes 🌈


πŸŽ€ FUNCTION PARAMETERS πŸŽ€

  • surface β€” the SDL_Surface structure you want unlocked. that's the one. the main character πŸ‘‘

πŸ”’ THREAD SAFETY πŸ”’

not thread safe, bestie. NOT. 😭

and before you come for me: the "locking" this function is talking about is not thread-safe locking at all. it's about making the pixels available for direct access. two completely different things, iykyk. do not conflate them, fr fr πŸ’€


πŸ¦‹ AVAILABILITY πŸ¦‹

this one's been serving since SDL 3.2.0 ✨


πŸ“ SEE ALSO πŸ“


and that's the whole page, no cap 🧚 the source of all this wisdom is Simple Directmedia Layer, running SDL 3.4.18 β€” mwah, slay, periodt πŸ’…πŸŽ€

πŸ“¦ where this page comes from