diff --git a/photoboite.py b/photoboite.py index 5d7fb9d..b03a8a2 100755 --- a/photoboite.py +++ b/photoboite.py @@ -59,6 +59,7 @@ class CaptureButton(Button): screen.blit(ren, topleft) def run(self): + print(self.photoboite.clock.get_fps()) pygame.event.set_blocked((pygame.MOUSEBUTTONDOWN, pygame.MOUSEBUTTONUP)) self.capture_mode = True @@ -148,6 +149,8 @@ class Photoboite: self.font = pygame.font.Font(pygame.font.match_font('calibri'), 180) + self.clock = pygame.time.Clock() + def screen(self): if os.getenv('DISPLAY'): @@ -174,6 +177,8 @@ class Photoboite: return pygame.display.set_mode() def draw(self): + self.clock.tick(60) + self.screen.fill(self.background) self.camera.draw_on(self.screen)