SDL: video: Document that renderer lifetimes are tied to their associated windows

From 5abcfad3524b2e99df4be92e045e1bd69501b9f7 Mon Sep 17 00:00:00 2001
From: Frank Praznik <[EMAIL REDACTED]>
Date: Wed, 27 Mar 2024 12:45:51 -0400
Subject: [PATCH] video: Document that renderer lifetimes are tied to their
 associated windows

---
 include/SDL3/SDL_render.h | 4 ++++
 include/SDL3/SDL_video.h  | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/include/SDL3/SDL_render.h b/include/SDL3/SDL_render.h
index 5f5bfca45c60a..edd80a1c8e0c4 100644
--- a/include/SDL3/SDL_render.h
+++ b/include/SDL3/SDL_render.h
@@ -2020,6 +2020,10 @@ extern DECLSPEC void SDLCALL SDL_DestroyTexture(SDL_Texture *texture);
  * If `renderer` is NULL, this function will return immediately after setting
  * the SDL error message to "Invalid renderer". See SDL_GetError().
  *
+ * Note that destroying a window implicitly destroys the associated renderer,
+ * so this should not be called if the window associated with the renderer has
+ * already been destroyed.
+ *
  * \param renderer the rendering context
  *
  * \since This function is available since SDL 3.0.0.
diff --git a/include/SDL3/SDL_video.h b/include/SDL3/SDL_video.h
index 28262276b66ee..fb28975d2fd8b 100644
--- a/include/SDL3/SDL_video.h
+++ b/include/SDL3/SDL_video.h
@@ -2110,7 +2110,7 @@ extern DECLSPEC int SDLCALL SDL_SetWindowShape(SDL_Window *window, SDL_Surface *
 extern DECLSPEC int SDLCALL SDL_FlashWindow(SDL_Window *window, SDL_FlashOperation operation);
 
 /**
- * Destroy a window.
+ * Destroy a window. If the window has an associated SDL_Renderer, it will be implicitly destroyed as well.
  *
  * If `window` is NULL, this function will return immediately after setting
  * the SDL error message to "Invalid window". See SDL_GetError().