it did break, lets try again
This commit is contained in:
@ -88,17 +88,13 @@ end
|
|||||||
---------------------------------------------
|
---------------------------------------------
|
||||||
|
|
||||||
function events.pullEvent(filter)
|
function events.pullEvent(filter)
|
||||||
while true do
|
|
||||||
local eventData = { os.pullEvent(filter) }
|
local eventData = { os.pullEvent(filter) }
|
||||||
local eventType = eventData[1]
|
local eventType = eventData[1]
|
||||||
|
|
||||||
local result = events.dispatch(eventType, table.unpack(eventData))
|
local result = events.dispatch(eventType, table.unpack(eventData))
|
||||||
|
|
||||||
-- If a handler processed the event and returned something, return it
|
-- Return the result (even if nil), the event type, and the full event data
|
||||||
if result ~= nil then
|
|
||||||
return result, eventType, eventData
|
return result, eventType, eventData
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function events.waitForAny(...)
|
function events.waitForAny(...)
|
||||||
|
|||||||
Reference in New Issue
Block a user