SDL_IOStatus(3type)
π SDL_IOStatus π
okay bestie, welcome to the SDL_IOStatus page β it's a datatype situation from SDL3, filed under SDL3 DATATYPES, and honestly? it's giving "tiny enum, huge responsibility" π
β¨ NAME β¨
SDL_IOStatus β the SDL_IOStream status, which gets set by a read or write operation. that's it, that's the whole job π«Ά
β¨ SYNOPSIS β¨
#include <SDL3/SDL_iostream.h>
typedef enum SDL_IOStatus
{
SDL_IO_STATUS_READY, /**< Everything is ready (no errors and not EOF). */
SDL_IO_STATUS_ERROR, /**< Read or write I/O error */
SDL_IO_STATUS_EOF, /**< End of file */
SDL_IO_STATUS_NOT_READY, /**< Non blocking I/O, not ready */
SDL_IO_STATUS_READONLY, /**< Tried to write a read-only buffer */
SDL_IO_STATUS_WRITEONLY /**< Tried to read a write-only buffer */
} SDL_IOStatus;
so like, six little statuses, each one telling you exactly what went down on your stream. let's break them down one by one, no skipping, no skimming, we're doing the full tour π
SDL_IO_STATUS_READYβ everything is ready π no errors, and not EOF. the good timeline. the main character moment.SDL_IO_STATUS_ERRORβ a read or write I/O error happened π something went wrong in the plumbing.SDL_IO_STATUS_EOFβ End of file. you hit the end, bestie, there's nothing left to read πΈSDL_IO_STATUS_NOT_READYβ non blocking I/O, and it's just not ready yet π not an error, just a "come back later" vibe.SDL_IO_STATUS_READONLYβ somebody tried to write to a read-only buffer π respectfully: you cannot.SDL_IO_STATUS_WRITEONLYβ somebody tried to read from a write-only buffer π same energy, opposite direction.
β¨ AVAILABILITY β¨
this enum has been around since SDL 3.2.0 π so if you're on anything newer, you're golden. slay.
Simple Directmedia Layer made this, we're kicking it at version SDL 3.4.18, and yes this whole page is literally called SDL_IOStatus(3type) β thanks for coming to my TED talk, ily, go check your stream status π¦β¨π
π¦ 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