summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordyamy-lee <dyamy.lee@samsung.com>2020-11-02 15:51:36 +0900
committerdyamy-lee <dyamy.lee@samsung.com>2020-11-23 17:23:17 +0900
commitaa3580cfe8aa254665e9b1e53119dc489041b031 (patch)
tree2e6a1669e792f384601d5931f7cbcfc58d3c1868
parentba9b0f8cce2f362e3072dc1b419f4e3ee83da4fc (diff)
downloadfirmware-update-system-ui-aa3580cfe8aa254665e9b1e53119dc489041b031.tar.gz
firmware-update-system-ui-aa3580cfe8aa254665e9b1e53119dc489041b031.tar.bz2
firmware-update-system-ui-aa3580cfe8aa254665e9b1e53119dc489041b031.zip
fota_gui_common : get rotate_angle from build option of cmake
Change-Id: I879e8931b002fbbf7419583e4c9187feb36e50fb
-rw-r--r--fota_gui_common/CMakeLists.txt1
-rw-r--r--fota_gui_common/fota_gr_direct_ro_common.c12
2 files changed, 13 insertions, 0 deletions
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);