'how can i mantain a specific proportion while resizing a window?

I made a game on python with a fullscreen button, how can I allow window resize when not fullscreen without changing the width/height proportions? Also how can I set the proportions to avoid problems if someone put fullscreen in a monitor with proportions different from 16/9?



Solution 1:[1]

You can't. The screen resolution depends on the hardware. Not every hardware supports every resolution. You have to write an application that can handle different display resolutions. e.g.: Scale Everything On Pygame Display Surface.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Rabbid76