efl-config: Fix calculation scale for wearable-circle (MPR-1371). There is a need... 51/220051/5 tizen_5.5_tv accepted/tizen/5.5/unified/20200102.014034 submit/tizen_5.5/20191231.060334
authorSeungwan Woo <s-w.woo@samsung.com>
Thu, 12 Dec 2019 13:43:13 +0000 (19:13 +0530)
committerSangHyeon Jade Lee <sh10233.lee@samsung.com>
Tue, 24 Dec 2019 10:33:46 +0000 (19:33 +0900)
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 <kunal.sinha@samsung.com>
src/efl_config.c

index 1e854f8..50fd3ca 100644 (file)
@@ -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"))
      {