full refresh between game changes
This commit is contained in:
18
basic1.cpp
18
basic1.cpp
@@ -448,6 +448,12 @@ int main()
|
|||||||
printf("Game requested exit - returning to launcher\n");
|
printf("Game requested exit - returning to launcher\n");
|
||||||
launcher.reset();
|
launcher.reset();
|
||||||
needs_refresh = true;
|
needs_refresh = true;
|
||||||
|
// Force full clear for clean transition
|
||||||
|
display->clear(false);
|
||||||
|
if (display->get_type() == DISPLAY_TYPE_EPAPER) {
|
||||||
|
LowLevelDisplayEPaper* epaper = static_cast<LowLevelDisplayEPaper*>(display);
|
||||||
|
epaper->full_refresh();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if player wants to exit (hold for 2+ seconds or special gesture)
|
// 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");
|
printf("Long press detected - returning to launcher\n");
|
||||||
launcher.reset();
|
launcher.reset();
|
||||||
needs_refresh = true;
|
needs_refresh = true;
|
||||||
|
// Force full clear for clean transition
|
||||||
|
display->clear(false);
|
||||||
|
if (display->get_type() == DISPLAY_TYPE_EPAPER) {
|
||||||
|
LowLevelDisplayEPaper* epaper = static_cast<LowLevelDisplayEPaper*>(display);
|
||||||
|
epaper->full_refresh();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
game_start_time = 0;
|
game_start_time = 0;
|
||||||
}
|
}
|
||||||
@@ -473,6 +485,12 @@ int main()
|
|||||||
if (game_selected) {
|
if (game_selected) {
|
||||||
printf("Game launched successfully\n");
|
printf("Game launched successfully\n");
|
||||||
game_start_time = 0;
|
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<LowLevelDisplayEPaper*>(display);
|
||||||
|
epaper->full_refresh();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
needs_refresh = true;
|
needs_refresh = true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user