fix gpu + update openos
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
-- called from /init.lua
|
||||
local raw_loadfile = ...
|
||||
|
||||
_G._OSVERSION = "OpenOS 1.8.8"
|
||||
_G._OSVERSION = "OpenOS 1.8.9"
|
||||
|
||||
-- luacheck: globals component computer unicode _OSVERSION
|
||||
local component = component
|
||||
@@ -73,7 +73,12 @@ local function dofile(file)
|
||||
status("> " .. file)
|
||||
local program, reason = raw_loadfile(file)
|
||||
if program then
|
||||
return program()
|
||||
local result = table.pack(pcall(program))
|
||||
if result[1] then
|
||||
return table.unpack(result, 2, result.n)
|
||||
else
|
||||
error(result[2])
|
||||
end
|
||||
else
|
||||
error(reason)
|
||||
end
|
||||
@@ -139,12 +144,6 @@ end
|
||||
|
||||
status("Initializing system...")
|
||||
|
||||
require("event").listen("component_added", debugprint)
|
||||
require("event").listen("component_available", debugprint)
|
||||
require("event").listen("term_available", debugprint)
|
||||
|
||||
computer.pushSignal("init") -- so libs know components are initialized.
|
||||
require("event").pull(1, "init") -- Allow init processing.
|
||||
|
||||
require("tty").bind(component.gpu)
|
||||
_G.runlevel = 1
|
||||
|
||||
@@ -1,14 +1,8 @@
|
||||
debugprint("loading cursor")
|
||||
local unicode = require("unicode")
|
||||
debugprint("loaded unicode")
|
||||
local kb = require("keyboard")
|
||||
debugprint("loaded keyboard")
|
||||
local tty = require("tty")
|
||||
debugprint("loaded tty")
|
||||
local text = require("text")
|
||||
debugprint("loaded text")
|
||||
local computer = require("computer")
|
||||
debugprint("loaded computer")
|
||||
local keys = kb.keys
|
||||
|
||||
local core_cursor = {}
|
||||
|
||||
@@ -143,7 +143,7 @@ function event.pullFiltered(...)
|
||||
local deadline = computer.uptime() + (seconds or math.huge)
|
||||
repeat
|
||||
local waitTime = deadline - computer.uptime()
|
||||
if waitTime <= 0 then
|
||||
if waitTime < 0 then
|
||||
break
|
||||
end
|
||||
local signal = table.pack(computer.pullSignal(waitTime))
|
||||
|
||||
@@ -221,7 +221,7 @@ function tty.keyboard()
|
||||
-- changes to this design should avoid this on every key hit
|
||||
|
||||
-- this is expensive (slow!)
|
||||
window.keyboard = assert(component.invoke(screen, "getKeyboards"))[1] or system_keyboard
|
||||
window.keyboard = component.invoke(screen, "getKeyboards")[1] or system_keyboard
|
||||
end
|
||||
|
||||
return window.keyboard
|
||||
|
||||
Reference in New Issue
Block a user