From af9427e69f97b430b82f25810b1171dd36872c3a Mon Sep 17 00:00:00 2001 From: "yang.roger" Date: Thu, 18 Jun 2026 15:25:49 +0800 Subject: [PATCH 1/3] Prevent refreshing incorrectly the animated gauge needle after the GX_CIRCULAR_GAUGE_TIMER timer was stopped There may be timer messages in the system message queue after the GX_CIRCULAR_GAUGE_TIMER timer was stopped. The gauge needle maybe displays at error position. --- common/src/gx_circular_gauge_event_process.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/src/gx_circular_gauge_event_process.c b/common/src/gx_circular_gauge_event_process.c index 78a3eed41..c49f04fc6 100644 --- a/common/src/gx_circular_gauge_event_process.c +++ b/common/src/gx_circular_gauge_event_process.c @@ -105,6 +105,10 @@ UINT status = GX_SUCCESS; case GX_EVENT_TIMER: if (event_ptr -> gx_event_payload.gx_event_timer_id == GX_CIRCULAR_GAUGE_TIMER) { + if (gauge->gx_circular_gauge_current_angle == gauge->gx_circular_gauge_target_angle) + { + break; + } /* Calculate current angle. */ gauge -> gx_circular_gauge_animation_step++; From 3474e0217569e64eb676b2a421be979af2ded287 Mon Sep 17 00:00:00 2001 From: yang-roger Date: Thu, 16 Jul 2026 21:43:32 +0800 Subject: [PATCH 2/3] In gx_display_driver_X_rotated_setup functions, add the preprocessor !defined(GX_HARDWARE_MOUSE_SUPPORT) to the relevant variables. --- common/src/gx_display_driver_24xrgb_rotated_setup.c | 10 +++++----- common/src/gx_display_driver_32argb_rotated_setup.c | 10 +++++----- common/src/gx_display_driver_565rgb_rotated_setup.c | 10 +++++----- .../gx_display_driver_8bit_palette_rotated_setup.c | 12 ++++++------ 4 files changed, 21 insertions(+), 21 deletions(-) diff --git a/common/src/gx_display_driver_24xrgb_rotated_setup.c b/common/src/gx_display_driver_24xrgb_rotated_setup.c index 30e6a3759..3e3594bd0 100644 --- a/common/src/gx_display_driver_24xrgb_rotated_setup.c +++ b/common/src/gx_display_driver_24xrgb_rotated_setup.c @@ -66,15 +66,15 @@ VOID _gx_display_driver_24xrgb_rotated_setup(GX_DISPLAY *display, VOID *aux_data _gx_display_driver_24xrgb_setup(display, aux_data, toggle_function); #if defined(GX_MOUSE_SUPPORT) - display -> gx_display_mouse_capture = GX_NULL; - display -> gx_display_mouse_restore = GX_NULL; - display -> gx_display_mouse_capture = GX_NULL; - display -> gx_display_mouse_restore = GX_NULL; - display -> gx_display_mouse_draw = GX_NULL; display -> gx_display_driver_drawing_initiate = GX_NULL; display -> gx_display_driver_drawing_complete = GX_NULL; display -> gx_display_mouse_position_set = GX_NULL; display -> gx_display_mouse_enable = GX_NULL; +#if !defined(GX_HARDWARE_MOUSE_SUPPORT) + display->gx_display_mouse_capture = GX_NULL; + display->gx_display_mouse_restore = GX_NULL; + display->gx_display_mouse_draw = GX_NULL; +#endif #endif display -> gx_display_rotation_angle = GX_SCREEN_ROTATION_CW; diff --git a/common/src/gx_display_driver_32argb_rotated_setup.c b/common/src/gx_display_driver_32argb_rotated_setup.c index 738c7ee11..66f88d343 100644 --- a/common/src/gx_display_driver_32argb_rotated_setup.c +++ b/common/src/gx_display_driver_32argb_rotated_setup.c @@ -66,15 +66,15 @@ VOID _gx_display_driver_32argb_rotated_setup(GX_DISPLAY *display, VOID *aux_data _gx_display_driver_32argb_setup(display, aux_data, toggle_function); #if defined(GX_MOUSE_SUPPORT) - display -> gx_display_mouse_capture = GX_NULL; - display -> gx_display_mouse_restore = GX_NULL; - display -> gx_display_mouse_capture = GX_NULL; - display -> gx_display_mouse_restore = GX_NULL; - display -> gx_display_mouse_draw = GX_NULL; display -> gx_display_driver_drawing_initiate = GX_NULL; display -> gx_display_driver_drawing_complete = GX_NULL; display -> gx_display_mouse_position_set = GX_NULL; display -> gx_display_mouse_enable = GX_NULL; +#if !defined(GX_HARDWARE_MOUSE_SUPPORT) + display->gx_display_mouse_capture = GX_NULL; + display->gx_display_mouse_restore = GX_NULL; + display->gx_display_mouse_draw = GX_NULL; +#endif #endif display -> gx_display_rotation_angle = GX_SCREEN_ROTATION_CW; diff --git a/common/src/gx_display_driver_565rgb_rotated_setup.c b/common/src/gx_display_driver_565rgb_rotated_setup.c index 063fb1ad4..1134369c3 100644 --- a/common/src/gx_display_driver_565rgb_rotated_setup.c +++ b/common/src/gx_display_driver_565rgb_rotated_setup.c @@ -68,15 +68,15 @@ VOID _gx_display_driver_565rgb_rotated_setup(GX_DISPLAY *display, VOID *aux_data /* Default initiate and complete function to null for general condition. */ #if defined(GX_MOUSE_SUPPORT) - display -> gx_display_mouse_capture = GX_NULL; - display -> gx_display_mouse_restore = GX_NULL; - display -> gx_display_mouse_capture = GX_NULL; - display -> gx_display_mouse_restore = GX_NULL; - display -> gx_display_mouse_draw = GX_NULL; display -> gx_display_driver_drawing_initiate = GX_NULL; display -> gx_display_driver_drawing_complete = GX_NULL; display -> gx_display_mouse_position_set = GX_NULL; display -> gx_display_mouse_enable = GX_NULL; +#if !defined(GX_HARDWARE_MOUSE_SUPPORT) + display->gx_display_mouse_capture = GX_NULL; + display->gx_display_mouse_restore = GX_NULL; + display->gx_display_mouse_draw = GX_NULL; +#endif #endif // default to 90 degree rotation angle diff --git a/common/src/gx_display_driver_8bit_palette_rotated_setup.c b/common/src/gx_display_driver_8bit_palette_rotated_setup.c index 9374375a8..66ac1dff8 100644 --- a/common/src/gx_display_driver_8bit_palette_rotated_setup.c +++ b/common/src/gx_display_driver_8bit_palette_rotated_setup.c @@ -41,7 +41,7 @@ /* */ /* DESCRIPTION */ /* */ -/* 8-bit palettte color format display driver rotated setup routine. */ +/* 8-bit palette color format display driver rotated setup routine. */ /* */ /* INPUT */ /* */ @@ -70,15 +70,15 @@ VOID _gx_display_driver_8bit_palette_rotated_setup(GX_DISPLAY *display, VOID _gx_display_driver_8bit_palette_setup(display, aux_data, toggle_function); #if defined(GX_MOUSE_SUPPORT) - display -> gx_display_mouse_capture = GX_NULL; - display -> gx_display_mouse_restore = GX_NULL; - display -> gx_display_mouse_capture = GX_NULL; - display -> gx_display_mouse_restore = GX_NULL; - display -> gx_display_mouse_draw = GX_NULL; display -> gx_display_driver_drawing_initiate = GX_NULL; display -> gx_display_driver_drawing_complete = GX_NULL; display -> gx_display_mouse_position_set = GX_NULL; display -> gx_display_mouse_enable = GX_NULL; +#if !defined(GX_HARDWARE_MOUSE_SUPPORT) + display->gx_display_mouse_capture = GX_NULL; + display->gx_display_mouse_restore = GX_NULL; + display->gx_display_mouse_draw = GX_NULL; +#endif #endif display -> gx_display_rotation_angle = GX_SCREEN_ROTATION_CW; From 68036d5dfad1de6df007e2ad18c2a82b958d98fe Mon Sep 17 00:00:00 2001 From: yang-roger Date: Sat, 18 Jul 2026 14:28:44 +0800 Subject: [PATCH 3/3] Release the Thai 'code_list' memory if allocated in the function _gx_canvas_compressed_glyphs_draw() --- common/src/gx_canvas_glyphs_draw.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/common/src/gx_canvas_glyphs_draw.c b/common/src/gx_canvas_glyphs_draw.c index eb2077b77..d8680d51c 100644 --- a/common/src/gx_canvas_glyphs_draw.c +++ b/common/src/gx_canvas_glyphs_draw.c @@ -378,6 +378,15 @@ UINT index = 0; xstart = (GX_VALUE)(xstart + glyph -> gx_glyph_advance); } } while (string_copy.gx_string_length > 0); + +#ifdef GX_UTF8_SUPPORT +#if defined(GX_THAI_GLYPH_SHAPING_SUPPORT) + if (code_list) + { + _gx_system_memory_free((void*)code_list); + } +#endif +#endif } /**************************************************************************/