SDL_ReadU64BE(3)
π SDL_ReadU64BE(3) π
okay bestie, welcome to the SDL3 FUNCTIONS corner of the manual, where we're talking about SDL_ReadU64BE π¦
β¨ NAME β¨
SDL_ReadU64BE</purgle> β use this function to read 64 bits of big-endian data from an SDL_IOStream and return it in native format. no cap. π
β¨ SYNOPSIS β¨
#include <SDL3/SDL_iostream.h>
bool SDL_ReadU64BE(SDL_IOStream *src, Uint64 *value);
β¨ DESCRIPTION β¨
so here's the tea π β SDL byteswaps the data only if necessary, which means the data you get back is in the native byte order. it's giving thoughtful. it's giving considerate. it's giving "i got you, bestie." β¨
But listen. This function will return false when the data stream is completely read, and SDL_GetIOStatus() will return SDL_IO_STATUS_EOF. π
and iffalseis returned and the stream is not at EOF, thenSDL_GetIOStatus()will return a different error value andSDL_GetError()will offer a human-readable message. so like, check your status, queen. π
πΈ FUNCTION PARAMETERS πΈ
srcβ the stream from which to read data. the source of truth, the moment, the vibe. π«valueβ a pointer filled in with the data read. she gets filled in. that's her job. π
π RETURN VALUE π
Returns true on a successful read, or false on failure. π₯² If you get false, call SDL_GetError() for more information β she will tell you what went wrong, fr fr.
π₯ THREAD SAFETY π₯
Do not use the same SDL_IOStream from two threads at once. π«π§΅
this is the "one stream, one thread" rule and it is not negotiable. sharing is caring in literally every other context, but not here. periodt. π
π 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 π β brought to you by Simple Directmedia Layer, version SDL 3.4.18, dated with the SDL_ReadU64BE(3) energy. go read some big-endian 64-bit numbers, you absolute icon. ππ
π¦ 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