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 3395311 commit 84cdd93
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions examples/[template][pc][vscode]/platform/Virtual_TFT_Port.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,16 +233,7 @@ void VT_sdl_refresh_task(void)
static void *s_pLastFB = NULL;

VT_Fill_Multiple_Colors(0, 0, VT_WIDTH - 1, VT_HEIGHT - 1, (color_typedef *)pFrameBuffer);
#endif

SDL_UpdateTexture(texture, NULL, tft_fb, VT_WIDTH * sizeof(uint32_t));
SDL_RenderClear(renderer);

/*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;
Expand All @@ -251,6 +242,14 @@ void VT_sdl_refresh_task(void)
#else
sdl_refr_cpl = true;
#endif


SDL_UpdateTexture(texture, NULL, tft_fb, VT_WIDTH * sizeof(uint32_t));
SDL_RenderClear(renderer);

/*Update the renderer with the texture containing the rendered image*/
SDL_RenderCopy(renderer, texture, NULL, NULL);
SDL_RenderPresent(renderer);
}

SDL_Event event;
Expand Down

0 comments on commit 84cdd93

Please sign in to comment.