Skip to content
Snippets Groups Projects

BIG flow3r

Merged rahix requested to merge rahix/big-flow3r into main
2 unresolved threads
2 files
+ 8
5
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 6
5
@@ -25,6 +25,7 @@ background = pygame.image.load(bgpath)
OLED_SIZE = int(os.environ["SIM_OLED_SIZE"])
OLED_ASPECT = float(os.environ["SIM_OLED_ASPECT"])
OLED_SCALE = float(os.environ["SIM_OLED_SCALE"])
class Input:
@@ -415,11 +416,11 @@ class Simulation:
center_x = screen_w // 2
center_y = screen_h // 2
if FULL_SCREEN:
off_x = center_x - (screen_h * OLED_ASPECT // 2)
off_y = center_y - (screen_h // 2)
new = pygame.transform.scale(
self._oled_surface, (screen_h * OLED_ASPECT, screen_h)
)
size_x = screen_h * OLED_ASPECT * OLED_SCALE
size_y = screen_h * OLED_SCALE
off_x = center_x - (size_x // 2)
off_y = center_y - (size_y // 2)
new = pygame.transform.scale(self._oled_surface, (size_x, size_y))
full.blit(new, (off_x, off_y))
else:
off_x = center_x - (OLED_SIZE // 2)
Loading