sdlOpenTitleStorage function

Pointer<SdlStorage> sdlOpenTitleStorage(
  1. String? override,
  2. int props
)

Opens up a read-only container for the application's filesystem.

\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.1.3.

\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 = libSdl3.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;
}