Ensure graphics is in a known state when drawing

master
Felipe Manga 2024-01-18 19:09:53 +00:00
parent 3bfe4448fb
commit 417b434cf1
2 changed files with 4 additions and 0 deletions

View File

@ -721,6 +721,8 @@ function init() {
} }
function tick(widgets) { function tick(widgets) {
g.reset();
if (lcdBuffer && !widgets) { if (lcdBuffer && !widgets) {
BLACK().drawRect(-1, -1, 0, 177); // dirty all the rows BLACK().drawRect(-1, -1, 0, 177); // dirty all the rows
gfx.tick(bgColor); gfx.tick(bgColor);

View File

@ -656,6 +656,8 @@ function drawNode(index) {
} }
function tick(widgets) { function tick(widgets) {
g.reset();
if (lcdBuffer && !widgets) { if (lcdBuffer && !widgets) {
BLACK().drawRect(-1, -1, 0, 177); // dirty all the rows BLACK().drawRect(-1, -1, 0, 177); // dirty all the rows
gfx.clear(bgColor); gfx.clear(bgColor);