Update sPhone.lua

This commit is contained in:
Ale2610 2015-09-03 21:52:37 +02:00
parent 7cbc018b2f
commit a28d5feff3

View file

@ -34,11 +34,6 @@ local function crash(err)
shell.run("/rom/programs/shell") shell.run("/rom/programs/shell")
end end
if not pocket or not term.isColor() then
crash("Computer not supported: use an Advanced Pocket Computer or an Advanced Wireless Pocket Computer")
end
local function kernel() local function kernel()
_G.sPhone = { _G.sPhone = {
version = "Alpha 2", version = "Alpha 2",
@ -557,10 +552,21 @@ local function kernel()
end end
term.setBackgroundColor(colors.black)
term.clear()
term.setCursorPos(1,1)
term.setTextColor(colors.white)
if sPhone then if sPhone then
printError("sPhone already started") printError("sPhone already started")
return return
end end
if not pocket or not term.isColor() then
printError("Computer not supported: use an Advanced Pocket Computer or an Advanced Wireless Pocket Computer")
return
end
os.oldPullEvent = os.pullEvent os.oldPullEvent = os.pullEvent
os.pullEvent = os.pullEventRaw os.pullEvent = os.pullEventRaw