Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Clarified SDL_GetWindowSurface() documentation

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...
commit fb6fdb907f3b087c306b4078073419530a25a8c1 1 parent 2090722
@slouken slouken authored
Showing with 5 additions and 2 deletions.
  1. +5 −2 include/SDL_video.h
7 include/SDL_video.h
@@ -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.
Please sign in to comment.
Something went wrong with that request. Please try again.