SDL_WriteS64BE(3)

✨ hey bestie, welcome to SDL_WriteS64BE(3) ✨

okay so this is from the SDL3 FUNCTIONS corner of the manual, and it's all about SDL_WriteS64BE. she writes 64 bits in native format into an SDL_IOStream, but the data lands as big-endian. iconic behavior, no cap. πŸ’…


🌸 NAME 🌸

SDL_WriteS64BE β€” use this function to write 64 bits in native format to an SDL_IOStream as big-endian data. πŸ¦‹


πŸŽ€ SYNOPSIS πŸŽ€

#include <SDL3/SDL_iostream.h>

bool SDL_WriteS64BE(SDL_IOStream *dst, Sint64 value);

πŸ’œ DESCRIPTION πŸ’œ

so like, SDL byteswaps the data only if necessary, which means your application always specifies native format, and the data that actually gets written will be in big-endian format. periodt. ✨


⭐ FUNCTION PARAMETERS ⭐

  • dst β€” the stream to which data will be written. the destination bestie 🫢
  • value β€” the data to be written, in native format. the 64-bit payload, native style πŸ’–

πŸ”₯ RETURN VALUE πŸ”₯

returns true on successful write or false on failure; call SDL_GetError() for more information. so if it's giving failure, go ask SDL_GetError() what's up. 😭


πŸ’€ THREAD SAFETY πŸ’€

do not use the same SDL_IOStream from two threads at once. that's the rule, bestie β€” no double-dipping the stream. πŸ’€

🌈 AVAILABILITY 🌈

this function is available since SDL 3.2.0. she's been around, and she's thriving. πŸ‘‘


okay that's the whole page, bestie πŸ’– brought to you by Simple Directmedia Layer, version SDL 3.4.18, on the SDL_WriteS64BE(3) manual. no date in this footer, just pure iconic energy. slay πŸ’…βœ¨

πŸ“¦ where this page comes from