clear canvas before drawing

This commit is contained in:
2026-05-05 16:56:37 -04:00
parent 97ee9f5ccd
commit a6957139e7
+3
View File
@@ -373,6 +373,7 @@ def run():
last_fetch = now last_fetch = now
if games: if games:
canvas.Clear()
# clear bad preferred games out # clear bad preferred games out
if len(preferred_games) > 0: if len(preferred_games) > 0:
for preferred_game in preferred_games: for preferred_game in preferred_games:
@@ -406,6 +407,8 @@ def run():
single_preferred_game = [g for g in games if preferred_games[current_preferred_game] == g['id']] single_preferred_game = [g for g in games if preferred_games[current_preferred_game] == g['id']]
draw_single_game(canvas, single_preferred_game[0]) draw_single_game(canvas, single_preferred_game[0])
else: else:
canvas.Clear()
# no games available, just draw placeholder # no games available, just draw placeholder
graphics.DrawText(canvas, font, 10, 22, graphics.Color(*Colors.RED.value), "No games today") graphics.DrawText(canvas, font, 10, 22, graphics.Color(*Colors.RED.value), "No games today")