Commit 53378814 authored by captnfab's avatar captnfab 🦃
Browse files

Partial redraw in fullscreen

parent c27c6115
......@@ -1958,7 +1958,16 @@ class PyGameUI:
if self.fullscreen>0:
big = pygame.transform.smoothscale(self.screen, (int(WIDTH*self.fs_ratio), int(HEIGHT*self.fs_ratio)))
self.screen2.blit(big, self.fs_off)
pygame.display.update()
if self.need_full_redraw:
pygame.display.update()
else:
new_rects = [pygame.Rect(
self.fs_off[0] + r.left*self.fs_ratio,
self.fs_off[1] + r.top*self.fs_ratio,
r.width*self.fs_ratio,
r.height*self.fs_ratio)
for r in update_rects]
pygame.display.update(new_rects)
elif self.need_full_redraw:
pygame.display.update()
self.need_full_redraw = False
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment