From 41b89aec196a74022f9733216fa62c340eae0911 Mon Sep 17 00:00:00 2001
From: Frank Praznik <[EMAIL REDACTED]>
Date: Fri, 22 Jul 2022 12:23:44 -0400
Subject: [PATCH] video: Improve the SDL_WINDOW_ALLOW_HIGHDPI flag
documentation
Extend the SDL_WINDOW_ALLOW_HIGHDPI flag documentation to stress the importance of querying the window drawable size after every window event to avoid rendering issues in a mixed-DPI environment.
---
include/SDL_video.h | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/include/SDL_video.h b/include/SDL_video.h
index 856560af3dc..0b139a057e8 100644
--- a/include/SDL_video.h
+++ b/include/SDL_video.h
@@ -697,7 +697,10 @@ extern DECLSPEC Uint32 SDLCALL SDL_GetWindowPixelFormat(SDL_Window * window);
* in pixels may differ from its size in screen coordinates on platforms with
* high-DPI support (e.g. iOS and macOS). Use SDL_GetWindowSize() to query the
* client area's size in screen coordinates, and SDL_GL_GetDrawableSize() or
- * SDL_GetRendererOutputSize() to query the drawable size in pixels.
+ * SDL_GetRendererOutputSize() to query the drawable size in pixels. Note that
+ * when this flag is set, the drawable size can vary after the window is
+ * created and should be queried after major window events such as when the
+ * window is resized or moved between displays.
*
* If the window is set fullscreen, the width and height parameters `w` and
* `h` will not be used. However, invalid size parameters (e.g. too large) may