sdlDestroyWindowSurface function

bool sdlDestroyWindowSurface(
  1. Pointer<SdlWindow> window
)

Destroy the surface associated with the window.

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

\threadsafety This function should only be called on the main thread.

\since This function is available since SDL 3.1.3.

\sa SDL_GetWindowSurface \sa SDL_WindowHasSurface

extern SDL_DECLSPEC bool SDLCALL SDL_DestroyWindowSurface(SDL_Window *window)

Implementation

bool sdlDestroyWindowSurface(Pointer<SdlWindow> window) {
  final sdlDestroyWindowSurfaceLookupFunction = libSdl3.lookupFunction<
      Uint8 Function(Pointer<SdlWindow> window),
      int Function(Pointer<SdlWindow> window)>('SDL_DestroyWindowSurface');
  return sdlDestroyWindowSurfaceLookupFunction(window) == 1;
}