sdlGetAssertionHandler function

Pointer<NativeFunction<SdlAssertionHandler>> sdlGetAssertionHandler(
  1. Pointer<Pointer<NativeType>> puserdata
)

Get the current assertion handler.

This returns the function pointer that is called when an assertion is triggered. This is either the value last passed to SDL_SetAssertionHandler(), or if no application-specified function is set, is equivalent to calling SDL_GetDefaultAssertionHandler().

The parameter puserdata is a pointer to a void*, which will store the "userdata" pointer that was passed to SDL_SetAssertionHandler(). This value will always be NULL for the default handler. If you don't care about this data, it is safe to pass a NULL pointer to this function to ignore it.

\param puserdata pointer which is filled with the "userdata" pointer that was passed to SDL_SetAssertionHandler(). \returns the SDL_AssertionHandler that is called when an assert triggers.

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

\since This function is available since SDL 3.1.3.

\sa SDL_SetAssertionHandler

extern SDL_DECLSPEC SDL_AssertionHandler SDLCALL SDL_GetAssertionHandler(void **puserdata)

Implementation

Pointer<NativeFunction<SdlAssertionHandler>> sdlGetAssertionHandler(
    Pointer<Pointer<NativeType>> puserdata) {
  final sdlGetAssertionHandlerLookupFunction = libSdl3.lookupFunction<
      Pointer<NativeFunction<SdlAssertionHandler>> Function(
          Pointer<Pointer<NativeType>> puserdata),
      Pointer<NativeFunction<SdlAssertionHandler>> Function(
          Pointer<Pointer<NativeType>> puserdata)>('SDL_GetAssertionHandler');
  return sdlGetAssertionHandlerLookupFunction(puserdata);
}