# HG changeset patch # User Ideenmodellierer # Date 1664133225 -7200 # Node ID 2c2b9c6eb08961ea059bf928c2d20ae0830bb819 # Parent d55817a11f4c5ae23c21ae253832711ecd0a677c Bugfix Empty menu: In previous version an empty menu was shown sporadically. After pressing back button the menu was shown correctly again. Potential root cause is the call of the Set Top/Bottom Frame function while updating the cursor position. To handle multible updated is previous toggle bugger has been changed into a ringbuffer allowing to send several update frames after each other. Beside this some old debug code has been removed. diff -r d55817a11f4c -r 2c2b9c6eb089 Discovery/Src/gfx_engine.c --- a/Discovery/Src/gfx_engine.c Sun Sep 25 21:09:18 2022 +0200 +++ b/Discovery/Src/gfx_engine.c Sun Sep 25 21:13:45 2022 +0200 @@ -36,6 +36,8 @@ /* Private types -------------------------------------------------------------*/ +#define RING_BUF_SIZE (5u) + typedef struct { uint32_t Xdelta; @@ -72,11 +74,13 @@ typedef struct { uint32_t pActualTopBuffer; - uint32_t pNextTopBuffer[2]; + uint32_t pNextTopBuffer[RING_BUF_SIZE]; GFX_layerSingle actualBottom; - GFX_layerSingle nextBottom[2]; - uint8_t boolNextTop; - uint8_t boolNextBottom; + GFX_layerSingle nextBottom[RING_BUF_SIZE]; + uint8_t NextTopWrite; + uint8_t NextBottomWrite; + uint8_t NextTopRead; + uint8_t NextBottomRead; } GFX_layerControl; typedef struct @@ -130,11 +134,6 @@ static SFrameList frame[MAXFRAMES]; -#define MAXFRAMECOUNTER (28) -static uint8_t frameCounter[MAXFRAMECOUNTER] = { 0 }; - -static _Bool lock_changeLTDC = 0; - static void GFX_clear_frame_immediately(uint32_t pDestination); static void GFX_draw_image_color(GFX_DrawCfgScreen *hgfx, SWindowGimpStyle window, const tImage *image); /* ITM Trace-----------------------------------------------------------------*/ @@ -332,11 +331,6 @@ frame[i].status = CLEAR; frame[i].caller = 0; } - - for(int i=1;i