From: dyamy-lee Date: Mon, 2 Nov 2020 06:51:36 +0000 (+0900) Subject: fota_gui_common : get rotate_angle from build option of cmake X-Git-Tag: submit/tizen/20201202.104648~14 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=aa3580cfe8aa254665e9b1e53119dc489041b031;p=profile%2Fcommon%2Fapps%2Fnative%2Ffirmware-update-system-ui.git fota_gui_common : get rotate_angle from build option of cmake Change-Id: I879e8931b002fbbf7419583e4c9187feb36e50fb --- diff --git a/fota_gui_common/CMakeLists.txt b/fota_gui_common/CMakeLists.txt index 7587c0b..f4af0a0 100644 --- a/fota_gui_common/CMakeLists.txt +++ b/fota_gui_common/CMakeLists.txt @@ -59,6 +59,7 @@ ADD_EXECUTABLE(${FOTA_GUI_COMMON} ${GUI_SRCS_COMMON}) TARGET_LINK_LIBRARIES(${FOTA_GUI_COMMON} ${gui_pkgs_LDFLAGS} ${LIBS} -lpthread) ADD_DEFINITIONS("-DRESDIR=\"${RESDIR}\"") +ADD_DEFINITIONS("-DROTATE=270") INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/res/common/images DESTINATION ${RESDIR_COMMON}) INSTALL(TARGETS ${FOTA_GUI_COMMON} DESTINATION ${BINDIR}) diff --git a/fota_gui_common/fota_gr_direct_ro_common.c b/fota_gui_common/fota_gr_direct_ro_common.c index b96a5df..b9c5729 100644 --- a/fota_gui_common/fota_gr_direct_ro_common.c +++ b/fota_gui_common/fota_gr_direct_ro_common.c @@ -37,6 +37,10 @@ #define MAX_PATH 256 #define MAX_FILE_PATH 512 +#if !defined(ROTATE) +#define ROTATE 0 +#endif + #if !defined(RESDIR) #define RESDIR "/usr/share/res" #endif @@ -617,6 +621,13 @@ void fota_gr_direct_clear_screen(u32 color) _gr_direct_update_screen(); } +void _get_rotate(void) +{ + rotate_angle = ROTATE; + LOG("Print Rotate Angle value = %d\n", rotate_angle); + rollback_rotate_angle = 360 - rotate_angle; +} + /*----------------------------------------------------------------------------- fota_gr_direct_init ----------------------------------------------------------------------------*/ @@ -626,6 +637,7 @@ int fota_gr_direct_init(void) if (fb_open(&s_fbi) < 0) LOG("fb_open failed \n"); + _get_rotate(); __init_screen(&s_fbi); tdm_if_lcd_on(&s_disp);