Use screen resolution to init display

master
Guillaume Dott 2017-09-28 23:20:27 +02:00
parent 1bff74aeaa
commit 597d9974b1
1 changed files with 2 additions and 1 deletions

View File

@ -124,7 +124,8 @@ class Photoboite:
def screen(self):
if os.getenv('DISPLAY'):
pygame.display.init()
return pygame.display.set_mode((1280, 768))
display = pygame.display.Info()
return pygame.display.set_mode((min(1280,display.current_w), min(720,display.current_h)))
else:
drivers = ['directfb', 'fbcon', 'svgalib']
found = False