From 1f6f8b45520177168b76911af8bd64a483d14a40 Mon Sep 17 00:00:00 2001 From: Skyball2000 Date: Tue, 28 Mar 2023 17:34:58 +0200 Subject: [PATCH] Minor optimization --- project/main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/project/main.py b/project/main.py index d6348cd..99ed5d4 100644 --- a/project/main.py +++ b/project/main.py @@ -118,8 +118,11 @@ elif what_to_run == 'level': screen_transform = PositionScale((0, 0), (1.5, 1.5)) pygame.init() + # optimize performance screen = pygame.display.set_mode((12 * ConstantsParser.CONFIG.level_size[0] * screen_transform.scale[0], - 12 * ConstantsParser.CONFIG.level_size[1] * screen_transform.scale[1])) + 12 * ConstantsParser.CONFIG.level_size[1] * screen_transform.scale[1]), + flags=pygame.HWSURFACE | pygame.DOUBLEBUF, + vsync=1) pygame.display.set_caption("PM GAME") clock = pygame.time.Clock()