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:
TheWahlolly
2025-07-01 19:48:06 +03:00
parent b7a7f01c3f
commit 8a83edc0ae
3 changed files with 5 additions and 3 deletions
+3 -1
View File
@@ -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