sdlGetSurfaceBlendMode function surface

bool sdlGetSurfaceBlendMode(
  1. Pointer<SdlSurface> surface,
  2. Pointer<Uint32> blendMode
)

Get the blend mode used for blit operations.

\param surface the SDL_Surface structure to query. \param blendMode a pointer filled in with the current SDL_BlendMode. \returns true on success or false on failure; call SDL_GetError() for more information.

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

\since This function is available since SDL 3.2.0.

\sa SDL_SetSurfaceBlendMode

extern SDL_DECLSPEC bool SDLCALL SDL_GetSurfaceBlendMode(SDL_Surface *surface, SDL_BlendMode *blendMode)

Implementation

bool sdlGetSurfaceBlendMode(
  Pointer<SdlSurface> surface,
  Pointer<Uint32> blendMode,
) {
  final sdlGetSurfaceBlendModeLookupFunction = _libSdl
      .lookupFunction<
        Uint8 Function(Pointer<SdlSurface> surface, Pointer<Uint32> blendMode),
        int Function(Pointer<SdlSurface> surface, Pointer<Uint32> blendMode)
      >('SDL_GetSurfaceBlendMode');
  return sdlGetSurfaceBlendModeLookupFunction(surface, blendMode) == 1;
}