1
0
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:
Gabor Kiss-Vamosi 2023-11-13 17:48:43 +01:00
parent ac5acb9ddd
commit 6d7340ef46
2 changed files with 4 additions and 1 deletions

View File

@ -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;

View File

@ -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]);