diff options
Diffstat (limited to '')
-rw-r--r-- | LuaSL/src/LSL.lua | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/LuaSL/src/LSL.lua b/LuaSL/src/LSL.lua index 975f219..59f706d 100644 --- a/LuaSL/src/LSL.lua +++ b/LuaSL/src/LSL.lua | |||
@@ -336,9 +336,8 @@ function LSL.stateChange(x) | |||
336 | end; | 336 | end; |
337 | 337 | ||
338 | function LSL.mainLoop(SID, x) | 338 | function LSL.mainLoop(SID, x) |
339 | -- TODO - disabled the stuff that waits until I implement the stuff that makes it stop waiting. lol | ||
340 | local sid = SID .. ".events" | 339 | local sid = SID .. ".events" |
341 | local status, errorMsg = "disabled" -- = luaproc.newchannel(sid) | 340 | local status, errorMsg = luaproc.newchannel(sid) |
342 | local result | 341 | local result |
343 | 342 | ||
344 | if not status then | 343 | if not status then |
@@ -350,9 +349,11 @@ function LSL.mainLoop(SID, x) | |||
350 | 349 | ||
351 | -- TODO - Need a FIFO stack of incoming events. Which will be in the C main thread, coz that's listening on the socket for us. | 350 | -- TODO - Need a FIFO stack of incoming events. Which will be in the C main thread, coz that's listening on the socket for us. |
352 | 351 | ||
353 | -- while true do | 352 | while true do |
354 | local message = luaproc.receive(sid) | 353 | local message = luaproc.receive(sid) |
355 | if message then | 354 | if "quit()" == message then |
355 | return | ||
356 | elseif message then | ||
356 | result, errorMsg = loadstring(message) | 357 | result, errorMsg = loadstring(message) |
357 | if nil == result then | 358 | if nil == result then |
358 | print("Not a valid event: " .. message .. " ERROR MESSAGE: " .. errorMsg) | 359 | print("Not a valid event: " .. message .. " ERROR MESSAGE: " .. errorMsg) |
@@ -368,7 +369,7 @@ function LSL.mainLoop(SID, x) | |||
368 | end | 369 | end |
369 | end | 370 | end |
370 | end | 371 | end |
371 | -- end | 372 | end |
372 | end | 373 | end |
373 | 374 | ||
374 | -- Typecasting stuff. | 375 | -- Typecasting stuff. |