diff options
author | Jean-François Milants <jf@codingfield.com> | 2021-06-12 10:58:28 +0200 |
---|---|---|
committer | Jean-François Milants <jf@codingfield.com> | 2021-06-12 10:58:28 +0200 |
commit | 6d524ebea2c97e309633d5e01c3a1e37c182f27d (patch) | |
tree | 3f9c7f96f0fab64f581035c72480596a4cc4db43 /src/displayapp/LittleVgl.cpp | |
parent | b1925ff28638dd4b8400c4d0c49d796d8990b1af (diff) |
Move most of the code from the constructor of the objects statically initialized in main() into Start()/Init() functions to avoid Static Initialization Order Fiasco (https://en.cppreference.com/w/cpp/language/siof). See https://github.com/JF002/InfiniTime/pull/415#issuecomment-859004238.
Diffstat (limited to 'src/displayapp/LittleVgl.cpp')
-rw-r--r-- | src/displayapp/LittleVgl.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/displayapp/LittleVgl.cpp b/src/displayapp/LittleVgl.cpp index 36df51b4..c069afa2 100644 --- a/src/displayapp/LittleVgl.cpp +++ b/src/displayapp/LittleVgl.cpp @@ -23,6 +23,10 @@ bool touchpad_read(lv_indev_drv_t* indev_drv, lv_indev_data_t* data) { LittleVgl::LittleVgl(Pinetime::Drivers::St7789& lcd, Pinetime::Drivers::Cst816S& touchPanel) : lcd {lcd}, touchPanel {touchPanel}, previousClick {0, 0} { + +} + +void LittleVgl::Init() { lv_init(); InitTheme(); InitDisplay(); |