@@ -189,13 +189,6 @@ static void __on_scene_bubble_charging_frame_complete(arm_2d_scene_t *ptScene)
189189
190190 arm_2dp_filter_iir_blur_depose (& this .tBlurOP );
191191
192- #if 0
193- /* switch to next scene after 30s */
194- if (arm_2d_helper_is_time_out (30000 , & this .lTimestamp [0 ])) {
195- arm_2d_scene_player_switch_to_next_scene (ptScene -> ptPlayer );
196- }
197- #endif
198-
199192}
200193
201194static void __before_scene_bubble_charging_switching_out (arm_2d_scene_t * ptScene )
@@ -266,26 +259,34 @@ IMPL_PFB_ON_DRAW(__pfb_draw_scene_bubble_charging_handler)
266259 (__arm_2d_color_t ) {GLCD_COLOR_WHITE },
267260 255 );
268261
269- }
262+
263+ ARM_2D_OP_WAIT_ASYNC ();
270264
271- arm_2d_size_t tStringSize = arm_lcd_get_string_line_box ("000" , & ARM_2D_FONT_ALARM_CLOCK_32_A4 );
265+ arm_2d_size_t tStringSize =
266+ arm_lcd_printf_to_buffer ( (const arm_2d_font_t * )& ARM_2D_FONT_ALARM_CLOCK_32_A4 ,
267+ "%02d" ,
268+ (this .iSoC / 10 ));
272269
273- arm_2d_align_centre_open (__charging_canvas , tStringSize ) {
270+ arm_2d_align_centre_open (__centre_region , tStringSize ) {
274271
275- arm_lcd_text_set_target_framebuffer (( arm_2d_tile_t * ) ptTile );
276- arm_lcd_text_set_draw_region ( & __centre_region );
277- arm_lcd_text_set_font (( const arm_2d_font_t * ) & ARM_2D_FONT_ALARM_CLOCK_32_A4 );
278- arm_lcd_text_set_colour (GLCD_COLOR_WHITE , GLCD_COLOR_BLACK );
272+ __arm_2d_hint_optimize_for_pfb__ ( __centre_region ) {
273+ arm_lcd_text_set_target_framebuffer (( arm_2d_tile_t * ) ptTile );
274+ arm_lcd_text_set_draw_region ( & __centre_region );
275+ arm_lcd_text_set_colour (GLCD_COLOR_WHITE , GLCD_COLOR_BLACK );
279276
280- arm_lcd_printf ("%02d" , (this .iSoC / 10 ));
277+ arm_lcd_printf_buffer (0 );
278+ }
281279
282- arm_lcd_text_set_font (NULL );
283-
284- __centre_region .tLocation .iX += tStringSize .iWidth + 6 ;
285- __centre_region .tLocation .iY += tStringSize .iHeight - 8 ;
286- arm_lcd_text_set_draw_region (& __centre_region );
287- arm_lcd_text_set_colour (__RGB (0 , 128 , 0 ), GLCD_COLOR_BLACK );
288- arm_lcd_printf ("%%" );
280+ __centre_region .tLocation .iX += tStringSize .iWidth + 6 ;
281+ __centre_region .tLocation .iY += tStringSize .iHeight - 8 ;
282+
283+ __arm_2d_hint_optimize_for_pfb__ (__centre_region ) {
284+ arm_lcd_text_set_font (NULL );
285+ arm_lcd_text_set_draw_region (& __centre_region );
286+ arm_lcd_text_set_colour (__RGB (0 , 128 , 0 ), GLCD_COLOR_BLACK );
287+ arm_lcd_printf ("%%" );
288+ }
289+ }
289290 }
290291 #endif
291292
0 commit comments