From: dyamy-lee Date: Wed, 18 Nov 2020 04:46:19 +0000 (+0900) Subject: fota_gui_common : set rotate_angle by environment configuration. Before running fota_... X-Git-Tag: submit/tizen/20201202.104648~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F86%2F247986%2F3;p=profile%2Fcommon%2Fapps%2Fnative%2Ffirmware-update-system-ui.git fota_gui_common : set rotate_angle by environment configuration. Before running fota_gui, set ROTATE_STATE as a specific angle(4 types : 0,90,270,360). It can run with that angle. Change-Id: Ieee066a720ae2ccace9067ccde39f3d44e9969f5 --- diff --git a/fota_gui_common/CMakeLists.txt b/fota_gui_common/CMakeLists.txt index f4af0a0..1f56fd3 100644 --- a/fota_gui_common/CMakeLists.txt +++ b/fota_gui_common/CMakeLists.txt @@ -59,7 +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") +ADD_DEFINITIONS("-DROTATE=0") 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 e094c29..5a86a57 100644 --- a/fota_gui_common/fota_gr_direct_ro_common.c +++ b/fota_gui_common/fota_gr_direct_ro_common.c @@ -60,7 +60,7 @@ const int x_offset_main_bg_text_pos = 518; const int y_offset_main_bg_text_pos = 300; const int x_offset_prog_bar_img_pos = 240; const int y_offset_prog_bar_img_pos = 355; -int rotate_angle = 0; +int rotate_angle = -1; int rollback_rotate_angle = 0; int img_buf_width = 0; int img_buf_height = 0; @@ -625,7 +625,16 @@ void fota_gr_direct_clear_screen(u32 color) void _get_rotate(void) { - rotate_angle = ROTATE; + char *rotate_state = getenv("ROTATE_STATE"); + if(!rotate_state) + { + rotate_angle = ROTATE; + } + else + { + rotate_angle = atoi(rotate_state); + } + LOG("Print Rotate Angle value = %d\n", rotate_angle); rollback_rotate_angle = 360 - rotate_angle;