v1.12.4 - Added a small buffer time to the event library so events like keystrokes won't get skipped when there is a little bit of lag.
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
local computer = import("computer")
|
||||
local event = {}
|
||||
|
||||
local bufferTime = 0.05 -- A little bit of buffer time so event's won't be skipped by accident.
|
||||
|
||||
--local ocelot = component.proxy(component.list("ocelot")())
|
||||
function event.pull(...)
|
||||
local args = {...}
|
||||
@@ -27,7 +29,7 @@ function event.pull(...)
|
||||
end
|
||||
end
|
||||
else
|
||||
if evmgr.eventQueue[i][1] >= startTime then
|
||||
if evmgr.eventQueue[i][1] >= startTime - bufferTime then
|
||||
foundevent = true
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user