From 742f2a2fad968b95278e4a13a840014d3fd9a3ac Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" <[EMAIL REDACTED]>
Date: Sun, 5 Jan 2025 16:40:56 -0500
Subject: [PATCH] SDL_render.h: Improve SDL_ConvertEventToRenderCoordinates
documentation.
Fixes #9424.
---
include/SDL3/SDL_render.h | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/include/SDL3/SDL_render.h b/include/SDL3/SDL_render.h
index f356b480ac37d..d367237f84e75 100644
--- a/include/SDL3/SDL_render.h
+++ b/include/SDL3/SDL_render.h
@@ -1498,10 +1498,18 @@ extern SDL_DECLSPEC bool SDLCALL SDL_RenderCoordinatesToWindow(SDL_Renderer *ren
* - The scale (SDL_SetRenderScale)
* - The viewport (SDL_SetRenderViewport)
*
+ * Various event types are converted with this function: mouse, touch, pen,
+ * etc.
+ *
* Touch coordinates are converted from normalized coordinates in the window
* to non-normalized rendering coordinates.
*
- * Once converted, the coordinates may be outside the rendering area.
+ * Relative mouse coordinates (xrel and yrel event fields) are _also_
+ * converted. Applications that do not want these fields converted should
+ * use SDL_RenderCoordinatesFromWindow() on the specific event fields instead
+ * of converting the entire event structure.
+ *
+ * Once converted, coordinates may be outside the rendering area.
*
* \param renderer the rendering context.
* \param event the event to modify.