From 2d31ba4ff83d624270363cbb498f2bfae7419765 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Sat, 17 May 2014 07:54:51 +1000 Subject: Fake LSL listen() event. --- src/love/love.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src') diff --git a/src/love/love.c b/src/love/love.c index a1ad1f6..b8b4645 100644 --- a/src/love/love.c +++ b/src/love/love.c @@ -529,6 +529,18 @@ static Eina_Bool _dataClient(void *data, int type, Ecore_Con_Event_Client_Data * sendForth(ourGlobals->serverLuaSL, me->SID, "events.touch_start(1)"); } } + else if (0 == strncmp(command, "events.listen(", 14)) + { + Eina_Iterator *scripts; + script *me; + + // TODO - For now, just send it to everyone. + scripts = eina_hash_iterator_data_new(ourGlobals->scripts); + while(eina_iterator_next(scripts, (void **) &me)) + { + sendForth(ourGlobals->serverLuaSL, me->SID, command); + } + } else PW("Unknown command from client - %s", command); } -- cgit v1.1