SDL_ReadS64BE(3)
π SDL_ReadS64BE(3) π
okay so bestie, welcome to the SDL3 FUNCTIONS section of the manual, and today's main character is SDL_ReadS64BE π«Ά
β¨ NAME β¨
SDL_ReadS64BE β use this function to read 64 bits of big-endian data from an SDL_IOStream and return it in native format. slay π
πΈ SYNOPSIS πΈ
#include <SDL3/SDL_iostream.h>
bool SDL_ReadS64BE(SDL_IOStream *src, Sint64 *value);
π¦ DESCRIPTION π¦
so here's the tea π β SDL byteswaps the data only if necessary, so the data you get back will be in the native byte order. no wasted work, no drama, just vibes β¨
This function will return false when the data stream is completely read, and SDL_GetIOStatus() will return SDL_IO_STATUS_EOF. And if false gets returned but the stream is not at EOF?? then SDL_GetIOStatus() will return a different error value, and SDL_GetError() will hand you a human-readable message. iconic error handling fr fr π
π FUNCTION PARAMETERS π
srcβ the stream from which to read data. the source of truth, the origin story, the plug πvalueβ a pointer filled in with the data read. it gets the goods π₯
π RETURN VALUE π
Returns true on successful read or false on failure. call SDL_GetError() for more information β she will tell you what went wrong, no cap π
π THREAD SAFETY π
Do not use the same SDL_IOStream from two threads at once. that's not a suggestion bestie, that's the law π¨
π AVAILABILITY π
This function is available since SDL 3.2.0. she's been here, she's been ready π
and that's the whole page, periodt β¨ go read some big-endian 64-bit integers and thrive π§
Simple Directmedia Layer β SDL 3.4.18 β SDL_ReadS64BE(3) π« thanks for coming to my ted talk, mwah π«Άπ
π¦ 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