Skip to main content

SDL_OpenStorage

Function SDL_OpenStorage 

Source
pub unsafe extern "C" fn SDL_OpenStorage(
    iface: *const SDL_StorageInterface,
    userdata: *mut c_void,
) -> *mut SDL_Storage
Expand description

Opens up a container using a client-provided storage interface.

Applications do not need to use this function unless they are providing their own SDL_Storage implementation. If you just need an SDL_Storage, you should use the built-in implementations in SDL, like SDL_OpenTitleStorage() or SDL_OpenUserStorage().

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

Parameter: iface the interface that implements this storage, initialized using SDL_INIT_INTERFACE(). Parameter: userdata the pointer that will be passed to the interface functions. Returns: a storage container on success or NULL on failure; call SDL_GetError() for more information.

Available Since: This function is available since SDL 3.2.0.

See Also: SDL_CloseStorage See Also: SDL_GetStorageFileSize See Also: SDL_GetStorageSpaceRemaining See Also: SDL_INIT_INTERFACE See Also: SDL_ReadStorageFile See Also: SDL_StorageReady See Also: SDL_WriteStorageFile