summaryrefslogtreecommitdiff
path: root/src/lib/emotion/emotion_modules.c
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@gmail.com>2013-01-12 05:19:46 +0000
committerGustavo Sverzut Barbieri <barbieri@gmail.com>2013-01-12 05:19:46 +0000
commit8e9303e1a422bcf12eb8a406cd3f808b8a9695f0 (patch)
tree9307bdd04991bb7ba3e28604547a33a349376af8 /src/lib/emotion/emotion_modules.c
parentd8db6705ad3b8fc6688b186e0934ec91b6890bd8 (diff)
efl/emotion: postpone finding modules as well.
SVN revision: 82680
Diffstat (limited to 'src/lib/emotion/emotion_modules.c')
-rw-r--r--src/lib/emotion/emotion_modules.c29
1 files changed, 9 insertions, 20 deletions
diff --git a/src/lib/emotion/emotion_modules.c b/src/lib/emotion/emotion_modules.c
index dffc6fd33b..f971c0152a 100644
--- a/src/lib/emotion/emotion_modules.c
+++ b/src/lib/emotion/emotion_modules.c
@@ -50,11 +50,14 @@ _emotion_engine_registry_entry_cmp(const void *pa, const void *pb)
50} 50}
51 51
52static void 52static void
53_emotion_modules_find(void) 53_emotion_modules_load(void)
54{ 54{
55 char buf[PATH_MAX]; 55 char buf[PATH_MAX];
56 char *path; 56 char *path;
57 57
58 if (_emotion_modules_loaded) return;
59 _emotion_modules_loaded = EINA_TRUE;
60
58 if (getenv("EFL_RUN_IN_TREE")) 61 if (getenv("EFL_RUN_IN_TREE"))
59 { 62 {
60 struct stat st; 63 struct stat st;
@@ -81,7 +84,7 @@ _emotion_modules_find(void)
81 EINA_FALSE, NULL, NULL); 84 EINA_FALSE, NULL, NULL);
82 } 85 }
83 86
84 return; 87 goto load;
85 } 88 }
86 } 89 }
87 90
@@ -102,14 +105,8 @@ _emotion_modules_find(void)
102 105
103 snprintf(buf, sizeof(buf), "%s/emotion/modules", eina_prefix_lib_get(_emotion_pfx)); 106 snprintf(buf, sizeof(buf), "%s/emotion/modules", eina_prefix_lib_get(_emotion_pfx));
104 _emotion_modules = eina_module_arch_list_get(_emotion_modules, buf, MODULE_ARCH); 107 _emotion_modules = eina_module_arch_list_get(_emotion_modules, buf, MODULE_ARCH);
105}
106
107static void
108_emotion_modules_load(void)
109{
110 if (_emotion_modules_loaded) return;
111 _emotion_modules_loaded = EINA_TRUE;
112 108
109 load:
113 if (_emotion_modules) 110 if (_emotion_modules)
114 eina_module_list_load(_emotion_modules); 111 eina_module_list_load(_emotion_modules);
115 112
@@ -120,24 +117,16 @@ _emotion_modules_load(void)
120Eina_Bool 117Eina_Bool
121emotion_modules_init(void) 118emotion_modules_init(void)
122{ 119{
123 int static_modules = 0;
124
125 _emotion_modules_find();
126
127 /* Init static module */
128#ifdef EMOTION_STATIC_BUILD_XINE 120#ifdef EMOTION_STATIC_BUILD_XINE
129 static_modules += xine_module_init(); 121 xine_module_init();
130#endif 122#endif
131#ifdef EMOTION_STATIC_BUILD_GSTREAMER 123#ifdef EMOTION_STATIC_BUILD_GSTREAMER
132 static_modules += gstreamer_module_init(); 124 gstreamer_module_init();
133#endif 125#endif
134#ifdef EMOTION_STATIC_BUILD_GENERIC 126#ifdef EMOTION_STATIC_BUILD_GENERIC
135 static_modules += generic_module_init(); 127 generic_module_init();
136#endif 128#endif
137 129
138 if ((!_emotion_modules) && (!static_modules))
139 WRN("No emotion modules found!");
140
141 return EINA_TRUE; 130 return EINA_TRUE;
142} 131}
143 132