Open Tsukulimer opened 4 days ago
SDL3 wiki says: call SDL_GetError() for more information.
#include <SDL3/SDL.h> #include <stdio.h> int main(int argc, char **argv) { SDL_Init(SDL_INIT_VIDEO); SDL_IOStream *io = SDL_IOFromFile("empty_file", "rb"); Uint8 c; if (SDL_ReadU8(io, &c) == false) printf("test: %s\n", SDL_GetError()); }
test:
Should empty output be interpreted as end of stream?
The documentation should mention using SDL_GetIOStatus to check whether EOF was reached or an error actually happened.
SDL_GetIOStatus
SDL3 wiki says: call SDL_GetError() for more information.
test:
Should empty output be interpreted as end of stream?