From 597d9974b170668880037cc08e0b6613cf30146c Mon Sep 17 00:00:00 2001 From: Guillaume Dott Date: Thu, 28 Sep 2017 23:20:27 +0200 Subject: [PATCH] Use screen resolution to init display --- photoboite.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/photoboite.py b/photoboite.py index 83ee2f1..83218c3 100755 --- a/photoboite.py +++ b/photoboite.py @@ -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