Skip to content

Commit

Permalink
scr_load_anim_start: load screen from matching display
Browse files Browse the repository at this point in the history
If the animation starts and a different display has been set as the default in the meantime, the screen set as "previous" was loaded from the wrong display.

Fix: lv_screen_active() replaced with lv_display_get_screen_active()
  • Loading branch information
TheOfficialMrBlah committed May 6, 2024
1 parent d2abf23 commit 4e050b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/display/lv_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -1031,7 +1031,7 @@ static void scr_load_anim_start(lv_anim_t * a)
{
lv_display_t * d = lv_obj_get_display(a->var);

d->prev_scr = lv_screen_active();
d->prev_scr = lv_display_get_screen_active(d);
d->act_scr = a->var;

lv_obj_send_event(d->act_scr, LV_EVENT_SCREEN_LOAD_START, NULL);
Expand Down

0 comments on commit 4e050b8

Please sign in to comment.