Create a custom SDL_IOStream.
Defined in <SDL3/SDL_iostream.h>
iface | The function pointers that implement this SDL_IOStream. |
userdata | The app-controlled pointer that is passed to iface's functions when called. |
Returns a pointer to the allocated memory on success, or NULL on failure; call SDL_GetError() for more information.
Applications do not need to use this function unless they are providing their own SDL_IOStream implementation. If you just need an SDL_IOStream to read/write a common data source, you should use the built-in implementations in SDL, like SDL_IOFromFile() or SDL_IOFromMem(), etc.
You must free the returned pointer with SDL_CloseIO().
This function makes a copy of iface
and the caller does not need to keep this data around after this call.
This function is available since SDL 3.0.0.