1. remove error handle for setlocale
authorJaeho Lee <jaeho81.lee@samsung.com>
Fri, 7 Dec 2012 02:19:29 +0000 (11:19 +0900)
committerJaeho Lee <jaeho81.lee@samsung.com>
Fri, 7 Dec 2012 02:19:29 +0000 (11:19 +0900)
2. support hw acceleration

Signed-off-by: Jaeho Lee <jaeho81.lee@samsung.com>
packaging/app-core.spec
src/appcore-efl.c
src/appcore-i18n.c

index dd1c7d7..ddb606c 100644 (file)
@@ -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
index ce6b387..a66ade5 100755 (executable)
@@ -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);
index de03620..7998cf2 100755 (executable)
@@ -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;