0

I am working on a 2020 M1 Macbook Air running macOS BigSur Version 11.2.3 with Python 3.9, PyGame 2.0.0 installed.

The display has a resolution of 2560x1600. PyGame also seems to know this, because print(pygame.display.list_modes()) lists (2560, 1600), (2048, 1280), .... But when I set the window size with screen = pygame.display.set_mode((2560, 1600)) the contents in the window is pixelated, so I am guessing something is wrong with the dpi. Also, the Window is way too large and does not fit the screen, approximately the size has doubled. In Fullscreen the correct resolution does work.

This also happens on an external screen: At 1920x1080 the window exactly fits my 4K screen.

I experienced a similar problem on Windows, but this could be fixed with ctypes.windll.user32.SetProcessDPIAware(). Maybe this problem has a similar origin?

I did not find any information on the issue, so I could imagine it only happens only on M1/ Apple Silicon machines.

Anyways thanks for any help!

  • I’ve experienced similar problems on MacOS with pygame, in older versions of MacOS too. I was unable to find a good solution so I automatically halved the resolution when I detected it was running on Mac. I suspect the problem is DPI awareness on retina displays, which most macs now have. This may be a mixed blessing, because a pygame game running at 2560 by 1400 would be slow. – Starbuck5 Apr 02 '21 at 19:56
  • I guess that will work, but it just feels wrong using even less than full HD on a good screen. Also, I have no idea why Pygame is that slow, on my PC (which is not too great) I get decent frames even in 4K. Thanks anyway! – Lamabanana Apr 03 '21 at 10:41

0 Answers0