Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Clarified SDL_GetWindowSurface() documentation
Browse files Browse the repository at this point in the history
Matthew Orlando to Sam

Someone asked in IRC whether they should free the surface from SDL_GetWindowSurface. The doc comment is a bit vague so i checked the code and revised the comment.
  • Loading branch information
slouken committed Apr 22, 2011
1 parent 6d5cfdf commit 22e5aa5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions include/SDL_video.h
Expand Up @@ -551,9 +551,12 @@ extern DECLSPEC int SDLCALL SDL_SetWindowFullscreen(SDL_Window * window,
SDL_bool fullscreen);

/**
* \brief Get an SDL surface associated with the window.
* \brief Get the SDL surface associated with the window.
*
* \return A surface in the optimal format for the window, or NULL on error.
* \return The window's framebuffer surface, or NULL on error.
*
* A new surface will be created with the optimal format for the window,
* if necessary. This surface will be freed when the window is destroyed.
*
* \note You may not combine this with 3D or the rendering API on this window.
*
Expand Down

0 comments on commit 22e5aa5

Please sign in to comment.