Skip to content

Commit 7e25def

Browse files
committed
Let the OS know the window is responsive
As seen at: https://www.pygame.org/docs/ref/event.html#pygame.event.pump
1 parent aa4efc5 commit 7e25def

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

examples/mlx90640_camtest.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,8 @@ def gradient(x, width, cmap, spread=1):
143143
img_surface = pygame.image.fromstring(img.tobytes(), img.size, img.mode)
144144
pygame.transform.scale(img_surface.convert(), screen.get_size(), screen)
145145
pygame.display.update()
146+
if args.windowed:
147+
pygame.event.pump()
146148
print(
147149
"Completed 2 frames in %0.2f s (%d FPS)"
148150
% (time.monotonic() - stamp, 1.0 / (time.monotonic() - stamp))

0 commit comments

Comments
 (0)