sdlClearProperty function

bool sdlClearProperty(
  1. int props,
  2. String? name
)

Clear a property from a group of properties.

\param props the properties to modify. \param name the name of the property to clear. \returns true on success or false on failure; call SDL_GetError() for more information.

\threadsafety It is safe to call this function from any thread.

\since This function is available since SDL 3.1.3.

extern SDL_DECLSPEC bool SDLCALL SDL_ClearProperty(SDL_PropertiesID props, const char *name)

Implementation

bool sdlClearProperty(int props, String? name) {
  final sdlClearPropertyLookupFunction = libSdl3.lookupFunction<
      Uint8 Function(Uint32 props, Pointer<Utf8> name),
      int Function(int props, Pointer<Utf8> name)>('SDL_ClearProperty');
  final namePointer = name != null ? name.toNativeUtf8() : nullptr;
  final result = sdlClearPropertyLookupFunction(props, namePointer) == 1;
  calloc.free(namePointer);
  return result;
}