Skip to content

Commit fa8de1a

Browse files
committed
window is always a square
1 parent e1f2d88 commit fa8de1a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

photo_2.png

-3.44 KB
Loading

utils.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
screenInfo = pygame.display.Info()
66

7-
game_w = screenInfo.current_w
8-
game_h = screenInfo.current_h
7+
game_w = min(screenInfo.current_w, screenInfo.current_h)
8+
game_h = game_w
99
screen = pygame.display.set_mode([game_w, game_h])
1010
font = pygame.font.SysFont("comicsansms",20)
1111

0 commit comments

Comments
 (0)