aboutsummaryrefslogtreecommitdiffstats
path: root/src/displayapp/LittleVgl.h
diff options
context:
space:
mode:
authorRiku Isokoski <riksu9000@gmail.com>2022-04-20 12:21:35 +0300
committerJF <JF002@users.noreply.github.com>2022-05-08 13:21:27 +0200
commit81607487335c8e90197f64af119d6d4ed50af6b6 (patch)
treea2931875e8eeb830ceef584f4d6af992dfcc384f /src/displayapp/LittleVgl.h
parent6dac0a62f4dfdb4b8b480aa03a3eb4ac08feebaa (diff)
Force full screen refresh with a rounder function
When the screen switches, the full screen needs to be refreshed for the hardware scrolling to work. This was enforced with backgroundLabels, but is simpler to do with a rounder function.
Diffstat (limited to 'src/displayapp/LittleVgl.h')
-rw-r--r--src/displayapp/LittleVgl.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/displayapp/LittleVgl.h b/src/displayapp/LittleVgl.h
index 1f8a3d79..45826165 100644
--- a/src/displayapp/LittleVgl.h
+++ b/src/displayapp/LittleVgl.h
@@ -26,6 +26,14 @@ namespace Pinetime {
void SetFullRefresh(FullRefreshDirections direction);
void SetNewTouchPoint(uint16_t x, uint16_t y, bool contact);
+ bool GetFullRefresh() {
+ bool returnValue = fullRefresh;
+ if (fullRefresh) {
+ fullRefresh = false;
+ }
+ return returnValue;
+ }
+
private:
void InitDisplay();
void InitTouchpad();
@@ -39,9 +47,8 @@ namespace Pinetime {
lv_color_t buf2_2[LV_HOR_RES_MAX * 4];
lv_disp_drv_t disp_drv;
- lv_point_t previousClick;
- bool firstTouch = true;
+ bool fullRefresh = false;
static constexpr uint8_t nbWriteLines = 4;
static constexpr uint16_t totalNbLines = 320;
static constexpr uint16_t visibleNbLines = 240;