mirror of
https://github.com/20kdc/OC-KittenOS.git
synced 2024-11-23 10:58:06 +11:00
(Probably) fix sys-init self-destructing if no monitors around
This commit is contained in:
parent
3502cdedc2
commit
27bd71f9e4
@ -26,7 +26,7 @@ return {
|
|||||||
},
|
},
|
||||||
["neo-init"] = {
|
["neo-init"] = {
|
||||||
desc = "KittenOS NEO / sys-init (startup)",
|
desc = "KittenOS NEO / sys-init (startup)",
|
||||||
v = 6,
|
v = 7,
|
||||||
deps = {
|
deps = {
|
||||||
"neo",
|
"neo",
|
||||||
"neo-icecap",
|
"neo-icecap",
|
||||||
|
@ -65,6 +65,17 @@ local function basicDraw(bg)
|
|||||||
return gpu
|
return gpu
|
||||||
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
|
||||||
|
|
||||||
-- Attempts to get an NSS monitor with a priority list of screens
|
-- Attempts to get an NSS monitor with a priority list of screens
|
||||||
local function retrieveNssMonitor(...)
|
local function retrieveNssMonitor(...)
|
||||||
local spc = {...}
|
local spc = {...}
|
||||||
@ -133,17 +144,6 @@ local function retrieveNssMonitor(...)
|
|||||||
end
|
end
|
||||||
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)
|
local function sleep(t)
|
||||||
neo.scheduleTimer(os.uptime() + t)
|
neo.scheduleTimer(os.uptime() + t)
|
||||||
while true do
|
while true do
|
||||||
|
Loading…
Reference in New Issue
Block a user