diff options
author | David Walter Seikel | 2014-05-17 18:05:00 +1000 |
---|---|---|
committer | David Walter Seikel | 2014-05-17 18:05:00 +1000 |
commit | 1a7ddf67e7efc14a1667b784da6c51ab5834e5e1 (patch) | |
tree | c63151427bdec8d0df7d77d3df5f4466b44275a8 /src/love | |
parent | Use the new server connector stuff in love. (diff) | |
download | SledjHamr-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/love')
-rw-r--r-- | src/love/love.c | 19 |
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 | ||
157 | static Eina_Bool _timer_cb(void *data) | 157 | static 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 | |||
169 | static 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 | ||