sdlLogMessage function

void sdlLogMessage(
  1. int category,
  2. int priority,
  3. String? fmt,
  4. Pointer<NativeType> arg3,
)

Log a message with the specified category and priority.

\param category the category of the message \param priority the priority 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_LogCritical \sa SDL_LogDebug \sa SDL_LogError \sa SDL_LogInfo \sa SDL_LogMessageV \sa SDL_LogVerbose \sa SDL_LogWarn

extern DECLSPEC void SDLCALL SDL_LogMessage(int category, SDL_LogPriority priority, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(3)

Implementation

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