summaryrefslogtreecommitdiff
path: root/src/drivers/St7789.cpp
diff options
context:
space:
mode:
authorRiku Isokoski <riksu9000@gmail.com>2021-08-01 08:47:26 (GMT)
committerRiku Isokoski <riksu9000@gmail.com>2021-08-01 08:47:26 (GMT)
commit5bdef365f2b8f8e0ba06d04216749205a5bba50d (patch)
treeb0260cd863c37ca1cee57fd813647706e2d07f77 /src/drivers/St7789.cpp
parent9e8dd9a1e63523f4e3ed322978e5b5e079c50375 (diff)
parent514481ef7f9c71ad816b31d979c6ab39ce9380dd (diff)
Merge branch 'develop' into HEAD
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);