From ad38ef4dfd6765d8bf2509164d89bd2eca1f58b9 Mon Sep 17 00:00:00 2001 From: Jaeho Lee Date: Fri, 7 Dec 2012 11:19:29 +0900 Subject: [PATCH] 1. remove error handle for setlocale 2. support hw acceleration Signed-off-by: Jaeho Lee --- packaging/app-core.spec | 2 +- src/appcore-efl.c | 14 +++++++++++--- src/appcore-i18n.c | 16 +++++++++++++--- 3 files changed, 25 insertions(+), 7 deletions(-) diff --git a/packaging/app-core.spec b/packaging/app-core.spec index dd1c7d7..ddb606c 100644 --- a/packaging/app-core.spec +++ b/packaging/app-core.spec @@ -2,7 +2,7 @@ Name: app-core Summary: Application basic Version: 1.2 -Release: 37 +Release: 38 Group: TO_BE/FILLED_IN License: Apache License, Version 2.0 Source0: app-core-%{version}.tar.gz diff --git a/src/appcore-efl.c b/src/appcore-efl.c index ce6b387..a66ade5 100755 --- a/src/appcore-efl.c +++ b/src/appcore-efl.c @@ -448,6 +448,7 @@ static void __add_climsg_cb(struct ui_priv *ui) static int __before_loop(struct ui_priv *ui, int *argc, char ***argv) { int r; + char *hwacc = NULL; if (argc == NULL || argv == NULL) { _ERR("argc/argv is NULL"); @@ -458,11 +459,18 @@ static int __before_loop(struct ui_priv *ui, int *argc, char ***argv) g_type_init(); elm_init(*argc, *argv); - if(getenv("opengl_x11")) { + hwacc = getenv("HWACC"); + + if(hwacc == NULL) { + _DBG("elm_config_preferred_engine_set is not called"); + } else if(strcmp(hwacc, "USE") == 0) { elm_config_preferred_engine_set("opengl_x11"); - _DBG("elm_config_preferred_engine_set"); + _DBG("elm_config_preferred_engine_set : opengl_x11"); + } else if(strcmp(hwacc, "NOT_USE") == 0) { + elm_config_preferred_engine_set("software_x11"); + _DBG("elm_config_preferred_engine_set : software_x11"); } else { - _DBG("opengl_x11 is not set"); + _DBG("elm_config_preferred_engine_set is not called"); } r = appcore_init(ui->name, &efl_ops, *argc, *argv); diff --git a/src/appcore-i18n.c b/src/appcore-i18n.c index de03620..7998cf2 100755 --- a/src/appcore-i18n.c +++ b/src/appcore-i18n.c @@ -85,17 +85,27 @@ static int __set_i18n(const char *domain, const char *dir) r = setlocale(LC_ALL, vconf_get_str(VCONFKEY_LANGSET)); _DBG("*****appcore setlocale=%s\n", r); } - _retvm_if(r == NULL, -1, "appcore: setlocale() error"); + if (r == NULL) { + _ERR("appcore: setlocale() error"); + } + //_retvm_if(r == NULL, -1, "appcore: setlocale() error"); r = bindtextdomain(domain, dir); - _retvm_if(r == NULL, -1, "appcore: bindtextdomain() error"); + if (r == NULL) { + _ERR("appcore: bindtextdomain() error"); + } + //_retvm_if(r == NULL, -1, "appcore: bindtextdomain() error"); r = textdomain(domain); - _retvm_if(r == NULL, -1, "appcore: textdomain() error"); + if (r == NULL) { + _ERR("appcore: textdomain() error"); + } + //_retvm_if(r == NULL, -1, "appcore: textdomain() error"); return 0; } + EXPORT_API int appcore_set_i18n(const char *domainname, const char *dirname) { int r; -- 2.7.4