mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-28 07:03:00 +08:00
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.
This commit is contained in:
parent
e72589c6d4
commit
1c67d07dc3
@ -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");
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user