table of contents
SDL_RWseek(3) | SDL3 FUNCTIONS | SDL_RWseek(3) |
NAME¶
SDL_RWseek - Seek within an SDL_RWops
data stream.
SYNOPSIS¶
#include "SDL3/SDL.h"
Sint64 SDL_RWseek(SDL_RWops *context, Sint64 offset, int whence);
DESCRIPTION¶
This function seeks to byte offset , relative to whence . whence may be any of the following values:
• SDL_RW_SEEK_SET : seek from the beginning of data
• SDL_RW_SEEK_CUR : seek relative to current read point
• SDL_RW_SEEK_END : seek relative to the end of data
If this stream can not seek, it will return -1.
SDL_RWseek () is actually a wrapper function that calls the
SDL_RWops seek method appropriately, to simplify application development.
FUNCTION PARAMETERS¶
RETURN VALUE¶
Returns the final offset in the data stream after the seek or a negative error code on failure; call SDL_GetError () for more information.
AVAILABILITY¶
This function is available since SDL 3.0.0.
SEE ALSO¶
SDL_RWclose(3), SDL_RWFromConstMem(3), SDL_RWFromFile(3), SDL_RWFromMem(3), SDL_RWread(3), SDL_RWtell(3), SDL_RWwrite(3)
SDL 3.0.0 | SDL |