aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/love/love.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/src/love/love.c b/src/love/love.c
index c33fe2c..257d957 100644
--- a/src/love/love.c
+++ b/src/love/love.c
@@ -154,26 +154,19 @@ static void dirList_compile(const char *name, const char *path, void *data)
154 } 154 }
155} 155}
156 156
157static Eina_Bool _timer_cb(void *data) 157static Eina_Bool _addLuaSL(void *data, int type, Ecore_Con_Event_Server_Add *ev)
158{ 158{
159// gameGlobals *ourGlobals = data; 159 gameGlobals *ourGlobals = data;
160 char buf[PATH_MAX]; 160 char buf[PATH_MAX];
161 161
162 ourGlobals->serverLuaSL = ev->server;
163
164 // Compile and run scripts.
162 gettimeofday(&startTime, NULL); 165 gettimeofday(&startTime, NULL);
163 snprintf(buf, sizeof(buf), "%s/Test sim/objects", PACKAGE_DATA_DIR); 166 snprintf(buf, sizeof(buf), "%s/Test sim/objects", PACKAGE_DATA_DIR);
164 eina_file_dir_list(buf, EINA_TRUE, dirList_compile, data); 167 eina_file_dir_list(buf, EINA_TRUE, dirList_compile, data);
165 168
166 return ECORE_CALLBACK_CANCEL; 169 return ECORE_CALLBACK_RENEW;
167}
168
169static Eina_Bool _addLuaSL(void *data, int type, Ecore_Con_Event_Server_Add *ev)
170{
171 gameGlobals *ourGlobals = data;
172
173 ourGlobals->serverLuaSL = ev->server;
174 // Wait a while before compiling and running scripts.
175 ecore_timer_add(3.0, _timer_cb, ourGlobals);
176 return ECORE_CALLBACK_RENEW;
177} 170}
178 171
179 172