sdlLogCritical function

void sdlLogCritical(
  1. int category,
  2. String? fmt,
  3. Pointer<NativeType> arg2
)

Log a message with SDL_LOG_PRIORITY_CRITICAL.

\param category the category of the message \param fmt a printf() style message format string \param ... additional parameters matching % tokens in the fmt string, if any

\since This function is available since SDL 2.0.0.

\sa SDL_Log \sa SDL_LogDebug \sa SDL_LogError \sa SDL_LogInfo \sa SDL_LogMessage \sa SDL_LogMessageV \sa SDL_LogVerbose \sa SDL_LogWarn

extern DECLSPEC void SDLCALL SDL_LogCritical(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2)

Implementation

void sdlLogCritical(int category, String? fmt, Pointer<NativeType> arg2) {
  final sdlLogCriticalLookupFunction = libSdl2.lookupFunction<
      Void Function(
          Int32 category, Pointer<Utf8> fmt, Pointer<NativeType> arg2),
      void Function(int category, Pointer<Utf8> fmt,
          Pointer<NativeType> arg2)>('SDL_LogCritical');
  final fmtPointer = fmt != null ? fmt.toNativeUtf8() : nullptr;
  final result = sdlLogCriticalLookupFunction(category, fmtPointer, arg2);
  calloc.free(fmtPointer);
  return result;
}