Explorar o código

SDL_render.h: Improve SDL_ConvertEventToRenderCoordinates documentation.

Fixes #9424.
Ryan C. Gordon hai 3 meses
pai
achega
742f2a2fad
Modificáronse 1 ficheiros con 9 adicións e 1 borrados
  1. 9 1
      include/SDL3/SDL_render.h

+ 9 - 1
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.