lordmauve/pgzero

Support high dpi (retina) displays

Open

#34 aperta il 9 ago 2015

Vedi su GitHub
 (1 commento) (0 reazioni) (0 assegnatari)Python (185 fork)batch import
good first issuemajor

Metriche repository

Star
 (472 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

Originally reported by: Daniel Pope (Bitbucket: lordmauve, GitHub: lordmauve)


On high resolution displays, Pygame games designed for low dpi displays come out incredibly tiny. We should detect such displays and apply suitable scaling.

Pygame_sdl2 has some support for high dpi displays though it looks like this just returns a larger surface corresponding to the physical display. We would need to honour the WIDTH and HEIGHT attributes in the game and upscale before painting the screen.

This may be slow, so we could look at doing the upscaling in hardware (eg. with Pixel Buffer Objects or Buffer Object Streaming).


Guida contributor