main, layout: Minor clean-ups and added some further logging
[src/agl-compositor.git] / src / main.c
index de2188f..613d6ee 100644 (file)
@@ -101,6 +101,9 @@ ivi_output_configure_app_id(struct ivi_output *ivi_output)
                                                 "agl-shell-app-id",
                                                 &ivi_output->app_id,
                                                 NULL);
+
+               weston_log("Will place app_id %s on output %s\n",
+                               ivi_output->app_id, ivi_output->name);
        }
 }
 
@@ -564,6 +567,9 @@ drm_backend_remoted_output_configure(struct weston_output *output,
        char *host = NULL;
        char *pipeline = NULL;
        int port, ret;
+       int32_t scale = 1;
+       uint32_t transform = WL_OUTPUT_TRANSFORM_NORMAL;
+       char *trans;
 
        ret = api->set_mode(output, modeline);
        if (ret < 0) {
@@ -573,9 +579,15 @@ drm_backend_remoted_output_configure(struct weston_output *output,
                return -1;
        }
 
-       /* FIXME: retrieve the scale and the transform from config file */
-       weston_output_set_scale(output, 1);
-       weston_output_set_transform(output, WL_OUTPUT_TRANSFORM_NORMAL);
+       weston_config_section_get_int(section, "scale", &scale, 1);
+       weston_output_set_scale(output, scale);
+
+       weston_config_section_get_string(section, "transform", &trans, "normal");
+       if (parse_transform(trans, &transform) < 0) {
+               weston_log("Invalid transform \"%s\" for output %s\n",
+                          trans, output->name);
+       }
+       weston_output_set_transform(output, transform);
 
        weston_config_section_get_string(section, "gbm-format",
                                         &gbm_format, NULL);
@@ -722,6 +734,7 @@ load_remoting(struct ivi_compositor *ivi, struct weston_config *config)
                                                   &ivi_output->output_destroy);
 
                wl_list_insert(&ivi->outputs, &ivi_output->link);
+               ivi_output_configure_app_id(ivi_output);
        }
 
        return 0;