logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

SDL_OpenIO - Create a custom SDL_IOStream.

Availability

       This function is available since SDL 3.2.0.

Description

       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.

       This function makes a copy of iface and the caller does not need to keep it around after this call.

Function Parameters

iface  the interface that implements this SDL_IOStream, initialized using SDL_INIT_INTERFACE().

       userdata
              the pointer that will be passed to the interface functions.

Name

       SDL_OpenIO - Create a custom SDL_IOStream.

Return Value

       Returns  a  pointer  to  the allocated memory on success or NULL on failure; call SDL_GetError() for more
       information.

See Also

SDL_CloseIO(3), SDL_INIT_INTERFACE(3), SDL_IOFromConstMem(3), SDL_IOFromFile(3), SDL_IOFromMem(3)

Simple Directmedia Layer                           SDL 3.2.20                                      SDL_OpenIO(3)

Synopsis

#include<SDL3/SDL_iostream.h>SDL_IOStream*SDL_OpenIO(constSDL_IOStreamInterface*iface,void*userdata);

Thread Safety

       It is safe to call this function from any thread.

See Also