From: dyamy-lee Date: Wed, 2 Dec 2020 04:49:43 +0000 (+0900) Subject: fix the problem which is not shared information when it changed static X-Git-Tag: submit/tizen/20201202.104648~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=92af6b43bd05246199f9873449ee207045213144;p=profile%2Fcommon%2Fapps%2Fnative%2Ffirmware-update-system-ui.git fix the problem which is not shared information when it changed static Change-Id: I4c743ab7e936602660af135aac898d003b605dee --- diff --git a/rw-update-ani-wearable/rw-update-ani_new.c b/rw-update-ani-wearable/rw-update-ani_new.c index 94e6e4d..b955742 100644 --- a/rw-update-ani-wearable/rw-update-ani_new.c +++ b/rw-update-ani-wearable/rw-update-ani_new.c @@ -51,7 +51,7 @@ #define CHG_ENV_BATT_STATUS "/sys/class/power_supply/battery/status" static FbInfo fbi; -static common_disp s_disp; +static common_disp *s_disp; static pthread_t keyevent_thread; @@ -327,8 +327,9 @@ static int wait_ani_main_solis(void) _DEBUG_EXCEPTION("read_degree failed, ret = [%d]", ret); #endif /* open display interface */ - if (fb_open(&fbi) < 0) { - _DEBUG_EXCEPTION("fb_open failed"); + s_disp = fb_open(&fbi); + if(!s_disp){ + _DEBUG_EXCEPTION("fb_open failed!"); goto main_err_exit; } @@ -339,7 +340,7 @@ static int wait_ani_main_solis(void) _DEBUG_LOG("charging-animation main function called."); - chg_common_lcd_on(&s_disp); + chg_common_lcd_on(s_disp); ret = pthread_create(&keyevent_thread, NULL, event_monitor_process, (void*)&event_cnt); if (ret < 0) { diff --git a/rw-update-ani-wearable/rw-update_new_fb.h b/rw-update-ani-wearable/rw-update_new_fb.h index 0b69381..b541eaa 100644 --- a/rw-update-ani-wearable/rw-update_new_fb.h +++ b/rw-update-ani-wearable/rw-update_new_fb.h @@ -18,6 +18,8 @@ #ifndef __CHG_FB_H__ #define __CHG_FB_H__ +#include "rw-update_new_common_display.h" + typedef enum _CHG_SLEEP_TYPE { CHG_SLEEP_TYPE_NORMAL, CHG_SLEEP_TYPE_EFFECT, @@ -35,7 +37,7 @@ typedef struct _FbInfo { int full_flag; } FbInfo; -extern int fb_open(FbInfo *fbi); +extern common_disp* fb_open(FbInfo *fbi); extern void fb_close(FbInfo *fbi); extern int fb_display(FbInfo *fbi); extern void fb_clear_screen(FbInfo *fbi, unsigned int color); diff --git a/rw-update-ani-wearable/rw-update_new_fb_cairo.c b/rw-update-ani-wearable/rw-update_new_fb_cairo.c index c4a5ec6..ed24012 100644 --- a/rw-update-ani-wearable/rw-update_new_fb_cairo.c +++ b/rw-update-ani-wearable/rw-update_new_fb_cairo.c @@ -27,14 +27,13 @@ #ifdef CAIRO_LIB #include "rw-update_new_cairo.h" #endif -#include "rw-update_new_common_display.h" static common_disp s_disp; /*----------------------------------------------------------------------------- fb_open() ----------------------------------------------------------------------------*/ -int fb_open(FbInfo *fbi) +common_disp* fb_open(FbInfo *fbi) { _FUNC_ENTER; @@ -43,7 +42,7 @@ int fb_open(FbInfo *fbi) if (chg_common_display_init(&s_disp)) { _DEBUG_EXCEPTION("chg_common_display_init fail!!"); _FUNC_EXIT; - return -1; + return NULL; } fbi->buf[FRONT_BUFFER] = s_disp.buffer[FRONT_BUFFER]; @@ -54,7 +53,7 @@ int fb_open(FbInfo *fbi) fbi->sz = s_disp.buffer_size; _FUNC_EXIT; - return 0; + return &s_disp; } /*----------------------------------------------------------------------------- diff --git a/rw-update-ani-wearable/rw-update_new_tdm_display.c b/rw-update-ani-wearable/rw-update_new_tdm_display.c index 183ba12..53cca02 100644 --- a/rw-update-ani-wearable/rw-update_new_tdm_display.c +++ b/rw-update-ani-wearable/rw-update_new_tdm_display.c @@ -443,6 +443,7 @@ void chg_common_lcd_on(common_disp *st_disp) /* SET DPMS ON */ _DEBUG_LOG("DPMS ON!\n"); tdm_output_set_dpms(st_disp->output, TDM_OUTPUT_DPMS_ON); + _DEBUG_LOG("mode:wh[%d %d] \n", st_disp->width, st_disp->height); _FUNC_EXIT; return;