Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add function to get disp->rendering_in_progress state. #6446

Open
spbgzh opened this issue Jun 29, 2024 · 1 comment
Open

Add function to get disp->rendering_in_progress state. #6446

spbgzh opened this issue Jun 29, 2024 · 1 comment

Comments

@spbgzh
Copy link

spbgzh commented Jun 29, 2024

LVGL version

v9.1

What happened?

To avoid Asserted at expression: !disp->rendering_in_progress (Invalidate area is not allowed during rendering.), I need to check rendering_in_progress state, but it in lv_display_private.h, if I want to access it without "lvgl/src/display/lv_display_private.h", it will show error: invalid use of incomplete.
so in this case I suggest to set a globle function to get rendering_in_progress state

How to reproduce?

#include "lvgl/src/display/lv_display_private.h"
static uint8_t perform_screen_transition(lv_screen_to_t *transition)
{
if (disp->rendering_in_progress)
{
return 0;
}
if (transition == NULL || transition->next == NULL)
return 0;
if (transition->next->screen == NULL && transition->next->init != NULL)
transition->next->init();
if (transition->next->screen != NULL)
{
lv_screen_load_anim(transition->next->screen, transition->anim, transition->speed, transition->delay, false);
node = *(transition->next);
return 1;
}
return 0;
}

@spbgzh
Copy link
Author

spbgzh commented Jun 30, 2024

I made a PR #6448

@spbgzh spbgzh changed the title Add function for get disp->rendering_in_progress state. Add function to get disp->rendering_in_progress state. Jun 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant