sdlOpenTitleStorage function storage
Opens up a read-only container for the application's filesystem.
By default, SDL_OpenTitleStorage uses the generic storage implementation. When the path override is not provided, the generic implementation will use the output of SDL_GetBasePath as the base path.
\param override a path to override the backend's default title root. \param props a property list that may contain backend-specific information. \returns a title storage container on success or NULL on failure; call SDL_GetError() for more information.
\since This function is available since SDL 3.2.0.
\sa SDL_CloseStorage \sa SDL_GetStorageFileSize \sa SDL_OpenUserStorage \sa SDL_ReadStorageFile
extern SDL_DECLSPEC SDL_Storage * SDLCALL SDL_OpenTitleStorage(const char *override, SDL_PropertiesID props)
Implementation
Pointer<SdlStorage> sdlOpenTitleStorage(String? override, int props) {
final sdlOpenTitleStorageLookupFunction = _libSdl
.lookupFunction<
Pointer<SdlStorage> Function(Pointer<Utf8> override, Uint32 props),
Pointer<SdlStorage> Function(Pointer<Utf8> override, int props)
>('SDL_OpenTitleStorage');
final overridePointer = override != null ? override.toNativeUtf8() : nullptr;
final result = sdlOpenTitleStorageLookupFunction(overridePointer, props);
calloc.free(overridePointer);
return result;
}