Skip to content

Commit 1b78cba

Browse files
committed
docs: logical_size might be (0, 0)
When Renderer.logical_size hasn't been changed before, it will contain (0, 0) and not the size of the window as one might expect. This bit me, and I only by chance found a remark pointing that out in the SDL2 docs. This adds a similar remark to the pygame-ce docs.
1 parent 7896a55 commit 1b78cba

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

docs/reST/ref/sdl2_video.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,10 @@
378378
| :sl:`Get or set the logical Renderer size (a device independent resolution for rendering)`
379379
| :sg:`logical_size -> (int width, int height)`
380380
381+
Note: When the rendering target is the main window, and ``logical_size``
382+
has not been set before, it will contain ``(0, 0)`` and not the size of
383+
the window.
384+
381385
.. attribute:: scale
382386

383387
| :sl:`Get the drawing scale for the current rendering target`

0 commit comments

Comments
 (0)