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
- 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