sdlSetErrorV function error
Set the SDL error message for the current thread.
Calling this function will replace any previous error message that was set.
\param fmt a printf()-style message format string. \param ap a variable argument list. \returns false.
\threadsafety It is safe to call this function from any thread.
\since This function is available since SDL 3.2.0.
\sa SDL_ClearError \sa SDL_GetError \sa SDL_SetError
extern SDL_DECLSPEC bool SDLCALL SDL_SetErrorV(SDL_PRINTF_FORMAT_STRING const char *fmt, va_list ap) SDL_PRINTF_VARARG_FUNCV(1)
Implementation
bool sdlSetErrorV(String? fmt) {
final sdlSetErrorVLookupFunction = _libSdl
.lookupFunction<
Uint8 Function(Pointer<Utf8> fmt),
int Function(Pointer<Utf8> fmt)
>('SDL_SetErrorV');
final fmtPointer = fmt != null ? fmt.toNativeUtf8() : nullptr;
final result = sdlSetErrorVLookupFunction(fmtPointer) == 1;
calloc.free(fmtPointer);
return result;
}