mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-28 07:03:00 +08:00
fix(sdl): remove the display when the window is closed
This commit is contained in:
parent
ac5acb9ddd
commit
6d7340ef46
@ -226,7 +226,7 @@ static void sdl_event_handler(lv_timer_t * t)
|
||||
lv_refr_now(disp);
|
||||
break;
|
||||
case SDL_WINDOWEVENT_CLOSE:
|
||||
clean_up(disp);
|
||||
lv_display_remove(disp);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -167,6 +167,9 @@ void lv_display_remove(lv_display_t * disp)
|
||||
lv_obj_delete(disp->bottom_layer);
|
||||
disp->bottom_layer = NULL;
|
||||
}
|
||||
|
||||
disp->act_scr = NULL;
|
||||
|
||||
while(disp->screen_cnt != 0) {
|
||||
/*Delete the screenst*/
|
||||
lv_obj_delete(disp->screens[0]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user