From cdf76ac2180dc3c4157f017313b9f1d4780866bb Mon Sep 17 00:00:00 2001 From: Seungwan Woo Date: Thu, 12 Dec 2019 19:13:13 +0530 Subject: [PATCH] efl-config: Fix calculation scale for wearable-circle (MPR-1371). There is a need to change the scale formula to match the wearable-circle. scale = floor((double)w * profile_factor / 360 * 10 + 0.5) / 10; * Requires discussion on using printf() instead of EINA_LOG_INFO for boot time logging. Change-Id: I9a77c21040fa351faf046d1060a7eb268807ea74 Signed-off-by: Kunal Sinha --- src/efl_config.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/efl_config.c b/src/efl_config.c index 1e854f8..50fd3ca 100644 --- a/src/efl_config.c +++ b/src/efl_config.c @@ -106,7 +106,14 @@ _scale_set(void) else if (prof == TIZEN_PROFILE_WEARABLE) { profile_factor = 0.4; - scale = floor((double)dpi * profile_factor / 90.0 * 10 + 0.5) / 10; + //TIZEN_ONLY(20190514): Fix calculation scale for wearable-circle. (MPR-1371) + //scale = floor((double)dpi * profile_factor / 90.0 * 10 + 0.5) / 10; + double wearable_circle_var = 3.25; + ecore_wl2_display_screen_size_get(wldp, &w, &h); + inch = floor(sqrt((w * w) + (h * h)) / dpi * 10 + 0.5) / 10; + scale = floor((double)w * profile_factor * wearable_circle_var / 360 * 10 + 0.5) / 10; + printf("[efl-config][%s] w: %d, h: %d, dpi: %d, inch: %f, profile_factor: %f\n", __FUNCTION__, w, h, dpi, inch, profile_factor); + // } else /* prof == TIZEN_PROFILE_TV */ { @@ -117,6 +124,9 @@ _scale_set(void) } saved_scale = elm_config_scale_get(); + //TIZEN_ONLY(20190514): log for scale + printf("[efl-config][%s] saved_scale: %f, scale: %f\n", __FUNCTION__, saved_scale, scale); + // if (scale != saved_scale && !getenv("ELM_SCALE")) { -- 2.7.4