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
+1 -1
View File
@@ -1,7 +1,7 @@
local loadfile = ...
local filesystem = loadfile("/halyde/lib/filesystem.lua")(loadfile)
_G._OSVERSION = "Halyde 1.12.3"
_G._OSVERSION = "Halyde 1.12.4"
_G._OSLOGO = ""
local handle, tmpdata = filesystem.open("/halyde/config/oslogo.ans", "r"), nil
repeat
+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