aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
authorDavid Walter Seikel2014-05-17 18:05:00 +1000
committerDavid Walter Seikel2014-05-17 18:05:00 +1000
commit1a7ddf67e7efc14a1667b784da6c51ab5834e5e1 (patch)
treec63151427bdec8d0df7d77d3df5f4466b44275a8 /src
parentUse the new server connector stuff in love. (diff)
downloadSledjHamr-1a7ddf67e7efc14a1667b784da6c51ab5834e5e1.zip
SledjHamr-1a7ddf67e7efc14a1667b784da6c51ab5834e5e1.tar.gz
SledjHamr-1a7ddf67e7efc14a1667b784da6c51ab5834e5e1.tar.bz2
SledjHamr-1a7ddf67e7efc14a1667b784da6c51ab5834e5e1.tar.xz
Get rid of the last of the artificial delays.
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