From 6b9884d40a1ba3f615864e347065da33da1f4d97 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Thu, 12 May 2022 09:36:49 +0200 Subject: [PATCH] Fixed bug #4213 - update documentation to reflect SDL2 behavior of SDL_RenderGetLogicalSize --- include/SDL_render.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/include/SDL_render.h b/include/SDL_render.h index d859e3fd6..ffa525500 100644 --- a/include/SDL_render.h +++ b/include/SDL_render.h @@ -825,9 +825,11 @@ extern DECLSPEC int SDLCALL SDL_RenderSetLogicalSize(SDL_Renderer * renderer, in /** * Get device independent resolution for rendering. * - * This may return 0 for `w` and `h` if the SDL_Renderer has never had its - * logical size set by SDL_RenderSetLogicalSize() and never had a render - * target set. + * When using the main rendering target (eg no target texture is set): this may return 0 for `w` and `h` if the SDL_Renderer has never had its + * logical size set by SDL_RenderSetLogicalSize(). Otherwise it returns the logical width and height. + * + * When using a target texture: + * Never return 0 for `w` and `h` at first. Then it returns the logical width and height that are set. * * \param renderer a rendering context * \param w an int to be filled with the width