From 8a83edc0aee62179dbc6c39ba243d1e061bdd563 Mon Sep 17 00:00:00 2001 From: TheWahlolly Date: Tue, 1 Jul 2025 19:48:06 +0300 Subject: [PATCH] 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. --- argentum.cfg | 2 +- halyde/core/boot.lua | 2 +- halyde/lib/event.lua | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/argentum.cfg b/argentum.cfg index a0bfff6..110a22d 100644 --- a/argentum.cfg +++ b/argentum.cfg @@ -1,7 +1,7 @@ local agcfg = { ["halyde"] = { ["maindir"] = "", - ["version"] = "1.12.3", + ["version"] = "1.12.4", ["description"] = "A universal, customizable and feature-packed operating system for OpenComputers.", ["directories"] = { "halyde/apps", diff --git a/halyde/core/boot.lua b/halyde/core/boot.lua index 7f7d4b6..2e3fa59 100644 --- a/halyde/core/boot.lua +++ b/halyde/core/boot.lua @@ -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 diff --git a/halyde/lib/event.lua b/halyde/lib/event.lua index 9c11d23..71cb77b 100644 --- a/halyde/lib/event.lua +++ b/halyde/lib/event.lua @@ -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