summaryrefslogtreecommitdiff
path: root/src/drivers/St7789.cpp
diff options
context:
space:
mode:
authorJF <jf@codingfield.com>2021-07-23 09:59:08 (GMT)
committerGitea <gitea@fake.local>2021-07-23 09:59:08 (GMT)
commitdb6a701644116932f11c54ee0f619464de9faeb7 (patch)
treef2fb7999d6db212e416557ed12831d8ab38cc3c0 /src/drivers/St7789.cpp
parentd96395c81021778af35b8b4bf965bfe8663eb081 (diff)
parentd6cccc2dcd95a7d332ee657d1357ae060389f6e6 (diff)
Merge branch 'develop' of JF/PineTime into master
Diffstat (limited to 'src/drivers/St7789.cpp')
-rw-r--r--src/drivers/St7789.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/drivers/St7789.cpp b/src/drivers/St7789.cpp
index 39218e7..0f1dc02 100644
--- a/src/drivers/St7789.cpp
+++ b/src/drivers/St7789.cpp
@@ -140,8 +140,9 @@ void St7789::Uninit() {
}
void St7789::DrawPixel(uint16_t x, uint16_t y, uint32_t color) {
- if ((x < 0) || (x >= Width) || (y < 0) || (y >= Height))
+ if (x >= Width || y >= Height) {
return;
+ }
SetAddrWindow(x, y, x + 1, y + 1);