Fixed bug #4213 - update documentation to reflect SDL2 behavior of SDL_RenderGetLogicalSize

This commit is contained in:
Sylvain 2022-05-12 09:36:49 +02:00
parent e4bb3c8649
commit 6b9884d40a
No known key found for this signature in database
GPG Key ID: 5F87E02E5BC0939E
1 changed files with 5 additions and 3 deletions

View File

@ -825,9 +825,11 @@ extern DECLSPEC int SDLCALL SDL_RenderSetLogicalSize(SDL_Renderer * renderer, in
/** /**
* Get device independent resolution for rendering. * Get device independent resolution for rendering.
* *
* This may return 0 for `w` and `h` if the SDL_Renderer has never had its * 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() and never had a render * logical size set by SDL_RenderSetLogicalSize(). Otherwise it returns the logical width and height.
* target set. *
* 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 renderer a rendering context
* \param w an int to be filled with the width * \param w an int to be filled with the width