互芯平臺播放動畫完畢後多播一幀的問題修改

修改次void mmi_pwron_entry_animation_screen(void)下的一項值的大小

/* not set in NVRAM, use defulat 20 sec limit */
if(force_stop_time == 0xffff)
{
force_stop_time = 5*1000;//20000;//改到動畫長度就可以了
}
還看到以下代碼
static void mmi_pwron_froce_terminate_display(void)
{
   /*----------------------------------------------------------------*/
   /* Code Body                                                      */
   /*----------------------------------------------------------------*/


MMI_TRACE((MMI_TRACE_G7_MISC, MMI_POWER_ON_ANIMATION_TIMEOUT));
mmi_trace(1," mmi_pwron_froce_terminate_display");
/* if never successfully play once, force stop */
if(!g_pwron_is_successful_play)
{
g_pwron_is_terminate_diplay = TRUE;
g_pwron_is_successful_play = TRUE;


/* mimic gif last frame callback */
CallBackPowerOnAnimationComplete(GDI_GIF_LAST_FRAME);//播放失敗就放最後一幀


/* start another timer to try */
coolsand_UI_start_timer(200, mmi_pwron_froce_terminate_display);
}
}

論壇朋友介紹了一個不用改這裏面數值的方法,如下

嘗試如下修改:
RedrawCategory166Screen函數:
...
        /* source from id */
        if (cat166_is_gif_anim)
        {
            /* animation, use GDI's auto play animation */
            gdi_image_set_animation_last_frame_callback(cat166_animation_complete_callback);
            TRACE_SYS_FUNCTION();
            result = gdi_image_draw_animation_once(cat166_image_offset_x, cat166_image_offset_y, (U8*) GetImage(cat166_animation_id), NULL); //gdi_image_draw_animation
...

BV4的工程還需要在mmi_pwron_show_image_callback函數增加(bv5的工程可以不增加):
        else
        {
                /* play finish successfully */
                g_pwron_is_successful_play = TRUE;

                /* call before access NVRAM */
                CallBackPowerOnAnimationComplete(GDI_SUCCEED);

                g_pwr_context[0].PowerOnAnimationComplete = 1;        }


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章