diff --git a/.gitignore b/.gitignore index be21f9ff..c31d84de 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,6 @@ conf.json* # auto created when running on desktop: internal_filesystem/SDLPointer_2 + +# config files etc: +internal_filesystem/data diff --git a/internal_filesystem/apps/com.example.draw/assets/draw.py b/internal_filesystem/apps/com.example.draw/assets/draw.py index b926f13f..fc0be5c5 100644 --- a/internal_filesystem/apps/com.example.draw/assets/draw.py +++ b/internal_filesystem/apps/com.example.draw/assets/draw.py @@ -147,10 +147,8 @@ def touch_cb(event): for dy in range(-radius, radius): if dx * dx + dy * dy <= square: newx, newy = x + dx, y + dy - if 0 <= newx <= hor_res and 0 <= newy <= ver_res: + if 0 <= newx <= hor_res and 0 <= newy <= ver_res: # don't draw outside of canvas because that may crash canvas.set_px(x + dx, y + dy, DARKPINK, lv.OPA.COVER) - else: - print(f"Not drawing outside of canvas at {newx},{newy} because that crashes.") canvas = lv.canvas(appscreen)