From 30c3c2a0660786408b5e3496ccf1e8b5030f8810 Mon Sep 17 00:00:00 2001 From: Adolfo Reyna Date: Fri, 30 Jan 2026 22:11:12 -0500 Subject: [PATCH] full refresh between game changes --- basic1.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/basic1.cpp b/basic1.cpp index 871da05..2a4e956 100644 --- a/basic1.cpp +++ b/basic1.cpp @@ -448,6 +448,12 @@ int main() printf("Game requested exit - returning to launcher\n"); launcher.reset(); needs_refresh = true; + // Force full clear for clean transition + display->clear(false); + if (display->get_type() == DISPLAY_TYPE_EPAPER) { + LowLevelDisplayEPaper* epaper = static_cast(display); + epaper->full_refresh(); + } } // Check if player wants to exit (hold for 2+ seconds or special gesture) @@ -464,6 +470,12 @@ int main() printf("Long press detected - returning to launcher\n"); launcher.reset(); needs_refresh = true; + // Force full clear for clean transition + display->clear(false); + if (display->get_type() == DISPLAY_TYPE_EPAPER) { + LowLevelDisplayEPaper* epaper = static_cast(display); + epaper->full_refresh(); + } } game_start_time = 0; } @@ -473,6 +485,12 @@ int main() if (game_selected) { printf("Game launched successfully\n"); game_start_time = 0; + // Force full clear for clean transition to game + display->clear(false); + if (display->get_type() == DISPLAY_TYPE_EPAPER) { + LowLevelDisplayEPaper* epaper = static_cast(display); + epaper->full_refresh(); + } } needs_refresh = true; }