remove alternates - add ccemux peripherals upon system startup

This commit is contained in:
kepler155c@gmail.com
2020-06-15 19:55:56 -06:00
parent 27c7d2dd18
commit cd0e6af55f
9 changed files with 57 additions and 32 deletions

View File

@@ -1,5 +1,6 @@
local Config = require('opus.config')
local UI = require('opus.ui')
local Util = require('opus.util')
local ccemux = _G.ccemux
@@ -62,7 +63,23 @@ function tab:updatePeripherals(config)
self.grid:update()
end
function tab.bootCheck()
local startupFile = 'packages/ccemux/bin/emustartup.lua'
local c = Util.readTable('.startup.boot')
if c then
for _,v in pairs(c.preload) do
if v == startupFile then
return
end
end
end
table.insert(c.preload, startupFile)
Util.writeTable('.startup.boot', c)
end
function tab:enable()
self:bootCheck()
local config = Config.load('ccemux')
local choices = { }