sdlSetFloatProperty function
Set a floating point property in a group of properties.
\param props the properties to modify. \param name the name of the property to modify. \param value the new value of the property. \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.
\sa SDL_GetFloatProperty
extern SDL_DECLSPEC bool SDLCALL SDL_SetFloatProperty(SDL_PropertiesID props, const char *name, float value)
Implementation
bool sdlSetFloatProperty(int props, String? name, double value) {
final sdlSetFloatPropertyLookupFunction = libSdl3.lookupFunction<
Uint8 Function(Uint32 props, Pointer<Utf8> name, Float value),
int Function(
int props, Pointer<Utf8> name, double value)>('SDL_SetFloatProperty');
final namePointer = name != null ? name.toNativeUtf8() : nullptr;
final result =
sdlSetFloatPropertyLookupFunction(props, namePointer, value) == 1;
calloc.free(namePointer);
return result;
}