sdlFlipSurface function surface

bool sdlFlipSurface(
  1. Pointer<SdlSurface> surface,
  2. int flip
)

Flip a surface vertically or horizontally.

\param surface the surface to flip. \param flip the direction to flip. \returns true on success or false on failure; call SDL_GetError() for more information.

\threadsafety This function can be called on different threads with different surfaces.

\since This function is available since SDL 3.2.0.

extern SDL_DECLSPEC bool SDLCALL SDL_FlipSurface(SDL_Surface *surface, SDL_FlipMode flip)

Implementation

bool sdlFlipSurface(Pointer<SdlSurface> surface, int flip) {
  final sdlFlipSurfaceLookupFunction = _libSdl
      .lookupFunction<
        Uint8 Function(Pointer<SdlSurface> surface, Int32 flip),
        int Function(Pointer<SdlSurface> surface, int flip)
      >('SDL_FlipSurface');
  return sdlFlipSurfaceLookupFunction(surface, flip) == 1;
}