From 24fde4029b139b03300a2e5ac4f3859815c82970 Mon Sep 17 00:00:00 2001 From: lixianjing Date: Thu, 8 Aug 2024 08:31:05 +0800 Subject: [PATCH] fix for stm32 --- demos/assets-mini.c | 58 ++++++++++++++++---------------- src/main_loop/main_loop_simple.c | 4 +-- 2 files changed, 30 insertions(+), 32 deletions(-) diff --git a/demos/assets-mini.c b/demos/assets-mini.c index 86e31e7d6..fdf9c8a8a 100755 --- a/demos/assets-mini.c +++ b/demos/assets-mini.c @@ -32,36 +32,36 @@ ret_t assets_init(void) { assets_manager_t* am = assets_manager(); - assets_manager_add(am, font_default_18); - assets_manager_add(am, image_checked); - assets_manager_add(am, image_earth); - assets_manager_add(am, image_left_off); - assets_manager_add(am, image_left_on); - assets_manager_add(am, image_middle_off); - assets_manager_add(am, image_middle_on); - assets_manager_add(am, image_muted); - assets_manager_add(am, image_question); - assets_manager_add(am, image_radio_checked); - assets_manager_add(am, image_radio_unchecked); - assets_manager_add(am, image_red_btn_n); - assets_manager_add(am, image_red_btn_o); - assets_manager_add(am, image_red_btn_p); - assets_manager_add(am, image_right_off); - assets_manager_add(am, image_right_on); - assets_manager_add(am, image_unchecked); - assets_manager_add(am, image_unmuted); - assets_manager_add(am, style_default); - assets_manager_add(am, ui_basic); - assets_manager_add(am, ui_system_bar); - assets_manager_add(am, image_rgb); - assets_manager_add(am, image_rgba); - assets_manager_add(am, image_message); - assets_manager_add(am, image_close_p); - assets_manager_add(am, image_close_n); - assets_manager_add(am, image_close_o); - assets_manager_add(am, image_question); + assets_manager_add(am, font_default_18_default); + assets_manager_add(am, image_checked_default); + assets_manager_add(am, image_earth_default); + assets_manager_add(am, image_left_off_default); + assets_manager_add(am, image_left_on_default); + assets_manager_add(am, image_middle_off_default); + assets_manager_add(am, image_middle_on_default); + assets_manager_add(am, image_muted_default); + assets_manager_add(am, image_question_default); + assets_manager_add(am, image_radio_checked_default); + assets_manager_add(am, image_radio_unchecked_default); + assets_manager_add(am, image_red_btn_n_default); + assets_manager_add(am, image_red_btn_o_default); + assets_manager_add(am, image_red_btn_p_default); + assets_manager_add(am, image_right_off_default); + assets_manager_add(am, image_right_on_default); + assets_manager_add(am, image_unchecked_default); + assets_manager_add(am, image_unmuted_default); + assets_manager_add(am, style_default_default); + assets_manager_add(am, ui_basic_default); + assets_manager_add(am, ui_system_bar_default); + assets_manager_add(am, image_rgb_default); + assets_manager_add(am, image_rgba_default); - assets_manager_add(am, style_system_bar); + assets_manager_add(am, image_close_p_default); + assets_manager_add(am, image_close_n_default); + assets_manager_add(am, image_close_o_default); + assets_manager_add(am, image_question_default); + + assets_manager_add(am, style_system_bar_default); tk_init_assets(); return RET_OK; diff --git a/src/main_loop/main_loop_simple.c b/src/main_loop/main_loop_simple.c index e5f3cc5c2..795488e61 100644 --- a/src/main_loop/main_loop_simple.c +++ b/src/main_loop/main_loop_simple.c @@ -116,8 +116,6 @@ ret_t main_loop_post_pointer_event(main_loop_t* l, bool_t pressed, xy_t x, xy_t return main_loop_queue_event(l, &r); } } - - return RET_OK; } ret_t main_loop_post_key_event(main_loop_t* l, bool_t pressed, uint8_t key) { @@ -296,7 +294,7 @@ main_loop_simple_t* main_loop_simple_init(int w, int h, main_loop_queue_event_t loop->base.run = main_loop_simple_run; loop->base.step = main_loop_simple_step; - loop->base.destroy = (main_loop_destroy_t*)main_loop_simple_reset; + loop->base.destroy = (main_loop_destroy_t)main_loop_simple_reset; if (recv_event != NULL && queue_event != NULL) { loop->base.recv_event = recv_event;