SDL_WriteS64LE(3)

πŸ’Ύ SDL_WriteS64LE(3) β€” SDL3 FUNCTIONS πŸ’Ύ

okay bestie, welcome to the SDL3 FUNCTIONS corner of the man pages, where we write tiny numbers into streams and feel very powerful about it 🫢


✨ NAME ✨

SDL_WriteS64LE β€” use this function to write 64 bits in native format to an SDL_IOStream as little-endian data.

🌸 SYNOPSIS 🌸

#include <SDL3/SDL_iostream.h>

bool SDL_WriteS64LE(SDL_IOStream *dst, Sint64 value);

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea, bestie: SDL byteswaps the data only if necessary, which is a whole vibe. that means you, the application, always specify native format, and the data that actually gets written will be in little-endian format. you don't gotta think about endianness, she handles it. no cap. ✨

πŸŽ€ FUNCTION PARAMETERS πŸŽ€

  • dst β€” the stream to which data will be written. it's giving "destination", it's giving "where the bytes go" πŸ’…
  • value β€” the data to be written, in native format. yes, native. don't come at it with your little-endian self, she already knows what to do 😭

⭐ RETURN VALUE ⭐

Returns true on successful write or false on failure; call SDL_GetError() for more information. so like… if you get false, don't just sit there, go ask SDL_GetError() what's wrong, she'll tell you fr fr πŸ™ˆ

πŸ”₯ THREAD SAFETY πŸ”₯

Do not use the same SDL_IOStream from two threads at once. periodt. that's not a suggestion, that's the rule, and violating it is giving chaos energy of the worst kind πŸ’€

🌈 AVAILABILITY 🌈

This function is available since SDL 3.2.0. so if you're on something older… bestie. upgrade. πŸ‘‘


and that's the whole page, mwah πŸ’œ this little gem comes to you from Simple Directmedia Layer, SDL 3.4.18, and yes she's iconic, she's the moment, she's the SDL_WriteS64LE(3) you know and love πŸŽ€βœ¨

πŸ“¦ where this page comes from