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.

\since This function is available since SDL 2.0.2.

\sa SDL_SetAssertionHandler

extern DECLSPEC SDL_AssertionHandler SDLCALL SDL_GetAssertionHandler(void **puserdata)

Implementation

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