From 47124e6491e9fac3aa2b245fb0ce7048eaf4f7cc Mon Sep 17 00:00:00 2001 From: Sung-jae Park Date: Tue, 25 Nov 2014 13:23:26 +0900 Subject: [PATCH] Check the bundle key for hw-acceleration [model] Redwood,Kiran,B3(Wearable) [binary_type] AP [customer] Docomo/Orange/ATT/Open [issue#] N/A [problem] [cause] [solution] [team] HomeTF [request] [horizontal_expansion] Change-Id: Ib87e40f2369c1ac79232a459281346c9f0ec06e0 --- src/main.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/src/main.c b/src/main.c index 03277c7..e7c0490 100644 --- a/src/main.c +++ b/src/main.c @@ -400,7 +400,6 @@ static bool app_create(void *argv) int ret; elm_app_base_scale_set(WVGA_DEFAULT_SCALE); -// elm_config_preferred_engine_set("opengl_x11"); dynamicbox_conf_init(); if (!dynamicbox_conf_is_loaded()) { @@ -585,6 +584,7 @@ static void app_control(app_control_h service, void *data) int ret; char *name; char *secured; + char *hw_acceleration = NULL; static int initialized = 0; if (initialized) { @@ -592,19 +592,25 @@ static void app_control(app_control_h service, void *data) return; } - ret = app_control_get_extra_data(service, "name", &name); + ret = app_control_get_extra_data(service, DYNAMICBOX_CONF_BUNDLE_SLAVE_NAME, &name); if (ret != APP_CONTROL_ERROR_NONE) { ErrPrint("Name is not valid\n"); return; } - ret = app_control_get_extra_data(service, "secured", &secured); + ret = app_control_get_extra_data(service, DYNAMICBOX_CONF_BUNDLE_SLAVE_SECURED, &secured); if (ret != APP_CONTROL_ERROR_NONE) { free(name); ErrPrint("Secured is not valid\n"); return; } + ret = app_control_get_extra_data(service, DYNAMICBOX_CONF_BUNDLE_SLAVE_HW_ACCELERATION, &hw_acceleration); + if (ret != APP_CONTROL_ERROR_NONE) { + DbgPrint("Unable to get option for hw-acceleration\n"); + /* Go ahead */ + } + if (!strcasecmp(secured, "true")) { /* Don't use the update timer */ dbox_turn_secured_on(); @@ -612,9 +618,17 @@ static void app_control(app_control_h service, void *data) DbgPrint("Name assigned: %s\n", name); DbgPrint("Secured: %s\n", secured); + DbgPrint("hw-acceleration: %s\n", hw_acceleration); ret = client_init(name); + + if (hw_acceleration && !strcasecmp(hw_acceleration, "use-gl")) { + DbgPrint("Turn on: opengl_x11\n"); + elm_config_preferred_engine_set("opengl_x11"); + } + free(name); free(secured); + free(hw_acceleration); initialized = 1; return; -- 2.7.4