SDL_SetNumberProperty(3)

✨ SDL_SetNumberProperty ✨

okay bestie, we're in the SDL3 function family and this one is literally the moment you drop a whole integer into a property group πŸ’– (SDL_SetNumberProperty, if we're being formal, which we are not)


🌸 NAME 🌸

SDL_SetNumberProperty β€” set an integer property in a group of properties. that's it, that's the whole job, and she does it flawlessly πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

#include <SDL3/SDL_properties.h>

bool SDL_SetNumberProperty(SDL_PropertiesID props, const char *name, Sint64 value);

look at her. short. clean. iconic. no notes. 🫢


πŸ¦‹ FUNCTION PARAMETERS πŸ¦‹

  • props β€” the properties you're modifying, like the lil property group you're walking into and redecorating ✨
  • name β€” the name of the property you want to modify. yes, the name, bestie, gotta know which one πŸ’–
  • value β€” the new value of the property. the fresh number. the glow-up. it's a Sint64, so she can hold a lot πŸ‘‘

πŸ’œ RETURN VALUE πŸ’œ

returns true on success or false on failure 😭 and if it's a failure you should call SDL_GetError() for more information β€” she will tell you what went wrong, fr fr.


πŸ”₯ THREAD SAFETY πŸ”₯

it is safe to call this function from any thread. no cap. any thread. go wild, she's built for it 🌈


⭐ AVAILABILITY ⭐

this function is available since SDL 3.2.0. so if you're on anything older, bestie... no she's not there yet πŸ™ˆ


πŸ‘‘ SEE ALSO πŸ‘‘

  • SDL_GetNumberProperty(3) β€” the other half of the duo, the reader to her writer, the getter to her setter πŸ’«

Simple Directmedia Layer made this one, and this gorgeous page is rockin' SDL 3.4.18 πŸ’– so shoutout to the SDL girlies, stay slaying, mwah πŸ˜˜πŸ’…


πŸ“¦ where this page comes from