Skip to content

Commit

Permalink
Update Virtual_TFT_Port.c
Browse files Browse the repository at this point in the history
  • Loading branch information
GorgonMeducer committed Dec 28, 2024
1 parent cdebea7 commit 8771581
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions examples/[template][pc][vscode]/platform/Virtual_TFT_Port.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ void VT_sdl_refresh_task(void)

#if __DISP0_CFG_ENABLE_3FB_HELPER_SERVICE__
void * pFrameBuffer = disp_adapter0_3fb_get_flush_pointer();
static void *s_pLastFB = NULL;

VT_Fill_Multiple_Colors(0, 0, VT_WIDTH - 1, VT_HEIGHT - 1, (color_typedef *)pFrameBuffer);
#endif
Expand All @@ -240,7 +241,16 @@ void VT_sdl_refresh_task(void)
/*Update the renderer with the texture containing the rendered image*/
SDL_RenderCopy(renderer, texture, NULL, NULL);
SDL_RenderPresent(renderer);

#if __DISP0_CFG_ENABLE_3FB_HELPER_SERVICE__
/* ensure the new content has been displayed*/
if (pFrameBuffer != s_pLastFB) {
sdl_refr_cpl = true;
}
s_pLastFB = pFrameBuffer;
#else
sdl_refr_cpl = true;
#endif
}

SDL_Event event;
Expand Down

0 comments on commit 8771581

Please sign in to comment.