sdlStorageReady function

bool sdlStorageReady(
  1. Pointer<SdlStorage> storage
)

Checks if the storage container is ready to use.

This function should be called in regular intervals until it returns true - however, it is not recommended to spinwait on this call, as the backend may depend on a synchronous message loop.

\param storage a storage container to query. \returns true if the container is ready, false otherwise.

\since This function is available since SDL 3.1.3.

extern SDL_DECLSPEC bool SDLCALL SDL_StorageReady(SDL_Storage *storage)

Implementation

bool sdlStorageReady(Pointer<SdlStorage> storage) {
  final sdlStorageReadyLookupFunction = libSdl3.lookupFunction<
      Uint8 Function(Pointer<SdlStorage> storage),
      int Function(Pointer<SdlStorage> storage)>('SDL_StorageReady');
  return sdlStorageReadyLookupFunction(storage) == 1;
}