Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

document get_desktop_sizes #2506

Merged
merged 2 commits into from Oct 16, 2021
Merged

Conversation

robertpfeiffer
Copy link
Contributor

This function has been in PyGame 2.0.0, and does what people want list_modes to do, so it's high time we document it on pygame.org

soft-deprecate pygame.display.list_modes in the docs, as many use cases of that
function are better served by get_desktop_sizes.
@zoldalma999
Copy link
Contributor

There is a part in the display docs that look like this:

Pygame can only have a single display active at any time. Creating a new one with pygame.display.set_mode() will close the previous display. If precise control is needed over the pixel format or display resolutions, use the functions pygame.display.mode_ok(), pygame.display.list_modes(), and pygame.display.Info() to query information about the display.

It should probably be changed to mention get_desktop_sizes.

Apart from these it looks good to me!

@robertpfeiffer
Copy link
Contributor Author

robertpfeiffer commented Mar 5, 2021

Thanks for the feedback. Today, precise control over pixel format and display resolution is almost never the right idea, because we do not use CRTs any more. As for having a single display active at a time, that is also not true any more if you use pygame._sdl2.

I'll try to find a diplomatic way to phrase this, but the easiest way to explain all this would be mentioning that SDL1.2 was made in the age of CRTs, before flat screens, and before GPUs in every PC. With SDL2, you can just assume that every platform supports at least 32bit RGBA.

@ankith26 ankith26 added this to the 2.0.2 milestone Aug 14, 2021
Copy link
Member

@illume illume left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 🎉 thanks!

@illume illume added display pygame.display docs labels Aug 21, 2021
@ankith26 ankith26 modified the milestones: 2.0.2, 2.0.3 Oct 11, 2021
@illume illume merged commit 55d094d into pygame:main Oct 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
display pygame.display docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants