sdlOpenStorage function
- Pointer<
SdlStorageInterface> iface, - Pointer<
NativeType> userdata
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.
\param iface the interface that implements this storage, initialized using SDL_INIT_INTERFACE(). \param 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.
\since This function is available since SDL 3.1.3.
\sa SDL_CloseStorage \sa SDL_GetStorageFileSize \sa SDL_GetStorageSpaceRemaining \sa SDL_INIT_INTERFACE \sa SDL_ReadStorageFile \sa SDL_StorageReady \sa SDL_WriteStorageFile
extern SDL_DECLSPEC SDL_Storage * SDLCALL SDL_OpenStorage(const SDL_StorageInterface *iface, void *userdata)
Implementation
Pointer<SdlStorage> sdlOpenStorage(
Pointer<SdlStorageInterface> iface, Pointer<NativeType> userdata) {
final sdlOpenStorageLookupFunction = libSdl3.lookupFunction<
Pointer<SdlStorage> Function(
Pointer<SdlStorageInterface> iface, Pointer<NativeType> userdata),
Pointer<SdlStorage> Function(Pointer<SdlStorageInterface> iface,
Pointer<NativeType> userdata)>('SDL_OpenStorage');
return sdlOpenStorageLookupFunction(iface, userdata);
}