(Probably) fix sys-init self-destructing if no monitors around

This commit is contained in:
20kdc 2018-11-09 23:19:27 +00:00
parent 3502cdedc2
commit 27bd71f9e4
2 changed files with 12 additions and 12 deletions

View File

@ -26,7 +26,7 @@ return {
},
["neo-init"] = {
desc = "KittenOS NEO / sys-init (startup)",
v = 6,
v = 7,
deps = {
"neo",
"neo-icecap",

View File

@ -65,6 +65,17 @@ local function basicDraw(bg)
return gpu
end
local function consoleEventHandler(ev)
if ev[1] == "h._kosneo_syslog" then
local text = ""
for i = 3, #ev do
if i ~= 3 then text = text .. " " end
text = text .. tostring(ev[i])
end
table.insert(console, text)
end
end
-- Attempts to get an NSS monitor with a priority list of screens
local function retrieveNssMonitor(...)
local spc = {...}
@ -133,17 +144,6 @@ local function retrieveNssMonitor(...)
end
end
local function consoleEventHandler(ev)
if ev[1] == "h._kosneo_syslog" then
local text = ""
for i = 3, #ev do
if i ~= 3 then text = text .. " " end
text = text .. tostring(ev[i])
end
table.insert(console, text)
end
end
local function sleep(t)
neo.scheduleTimer(os.uptime() + t)
while true do