Clarified SDL_GetWindowSurface() documentation
authorSam Lantinga <slouken@libsdl.org>
Fri, 22 Apr 2011 09:06:29 -0700
changeset 5546 cd2167525827
parent 5545 978cc06ed5ad
child 5547 4ccecd0901e2
child 5659 37e7b3b4b5e3
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.
include/SDL_video.h
--- a/include/SDL_video.h	Thu Apr 21 09:50:29 2011 -0700
+++ b/include/SDL_video.h	Fri Apr 22 09:06:29 2011 -0700
@@ -551,9 +551,12 @@
                                                     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.
  *