Move setting of _lv_initialized and correct formatting
Set _lv_initialized at the end of lv_init.
Correct formatting of "if" statement to be consistent with the rest of the library.
@@ -64,8 +64,9 @@ static bool _lv_initialized = false;
*/
void lv_init(void)
{
- if (_lv_initialized) return;
- _lv_initialized = true;
+ /* Do nothing if already initialized */
+ if (_lv_initialized)
+ return;
LV_GC_ROOT(_lv_def_scr) = NULL;
LV_GC_ROOT(_lv_act_scr) = NULL;
@@ -116,7 +117,7 @@ void lv_init(void)
lv_indev_init();
#endif
-
+ _lv_initialized = true;
LV_LOG_INFO("lv_init ready");
}
