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_WriteIO - Write to an SDL_IOStream data stream.

Availability

       This function is available since SDL 3.2.0.

Description

       This  function writes exactly size bytes from the area pointed at by ptr to the stream. If this fails for
       any reason, it'll return less than size to demonstrate how far  the  write  progressed.  On  success,  it
       returns size.

       On  error, this function still attempts to write as much as possible, so it might return a positive value
       less than the requested write size.

       The caller can use SDL_GetIOStatus() to determine if the problem is recoverable, such as  a  non-blocking
       write that can simply be retried later, or a fatal error.

Function Parameters

context
              a pointer to an SDL_IOStream structure.

       ptr    a pointer to a buffer containing data to write.

       size   the number of bytes to write.

Name

       SDL_WriteIO - Write to an SDL_IOStream data stream.

Return Value

       for more information.

See Also

SDL_IOprintf(3), SDL_ReadIO(3), SDL_SeekIO(3), SDL_FlushIO(3), SDL_GetIOStatus(3)

Simple Directmedia Layer                           SDL 3.2.20                                     SDL_WriteIO(3)

Synopsis

#include<SDL3/SDL_iostream.h>size_tSDL_WriteIO(SDL_IOStream*context,constvoid*ptr,size_tsize);

Thread Safety

       This function is not thread safe.

See Also