From d0611ae014164f689984f7a5099b46c0d452e100 Mon Sep 17 00:00:00 2001 From: Brad Barnett <127794626+bdbarnett@users.noreply.github.com> Date: Wed, 23 Sep 2026 16:09:36 -0500 Subject: [PATCH] dino, pixel_sim_demos: present the LED grid again 15f166ad dropped display_drv.show() from examples on the grounds that appdev.App presents every display with needs_refresh. A PixelDisplay has no needs_refresh, and under pixel_sim it isn't the App's display at all, so nothing ever called SimPixelFramebuffer.display() and both cards painted a black canvas in both galleries. Fixes #135 --- lib/examples/dino.py | 2 ++ lib/examples/pixel_sim_demos.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/lib/examples/dino.py b/lib/examples/dino.py index 8ec9cec8..fc97720d 100644 --- a/lib/examples/dino.py +++ b/lib/examples/dino.py @@ -489,6 +489,8 @@ def draw(self): self._draw_number(self.high_score, WIDTH - 24, score_color) display_drv.blit_rect(self.canvas.buffer, 0, 0, WIDTH, HEIGHT) + # A PixelDisplay has no needs_refresh, so appdev.App never presents it. + display_drv.show() def tick(self, _timer=None): app.poll() diff --git a/lib/examples/pixel_sim_demos.py b/lib/examples/pixel_sim_demos.py index 1d2781fb..89ae26df 100644 --- a/lib/examples/pixel_sim_demos.py +++ b/lib/examples/pixel_sim_demos.py @@ -94,6 +94,8 @@ def _randint(a, b): def _present(dest): display_drv.blit_rect(dest.buffer, 0, 0, GRID_W, GRID_H) + # A PixelDisplay has no needs_refresh, so appdev.App never presents it. + display_drv.show() # --- scroll -----------------------------------------------------------------