Skip to content

Commit

Permalink
命令行启动小程序时会跳过几乎所有加载流程
Browse files Browse the repository at this point in the history
  • Loading branch information
MrZ626 committed Nov 25, 2024
1 parent 4b64f1a commit 95ab754
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 3 additions & 1 deletion main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,9 @@ if PROGRESS.get('main')>=3 and ShellOption.launchApplet then
if appletSceneSet[ShellOption.launchApplet] then
ZENITHA.setFirstScene(ShellOption.launchApplet)
else
MSG('error',"Applet scene '"..ShellOption.launchApplet.."' doesn't exist")
ZENITHA.setFirstScene('_quit')
LOG('error',"Applet scene '"..ShellOption.launchApplet.."' doesn't exist")
return
end
end

Expand Down
6 changes: 5 additions & 1 deletion shell.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ function write(text)
stdout:flush()
end
local function sleep(time)
if time<=0 then return end
if love._os=='Linux' then
os.execute('sleep '..time)
else
Expand Down Expand Up @@ -112,8 +113,11 @@ function commands.shell(startArg)
)
elseif args[1]=='start' then
local t1,t2,t3=.03,.06,.12
if TABLE.find(args,"app") then
option.launchApplet=args[TABLE.find(args,"app")+1]
break
end
if TABLE.find(args,"overclock") then t1,t2,t3=.01,.03,.05 end
if TABLE.find(args,"app") then option.launchApplet=args[TABLE.find(args,"app")+1] end
math.randomseed(os.time())
local function OK(n) return AE.U[n].."\r[ "..AE._G"OK"..AE.NL[n] end

Expand Down

0 comments on commit 95ab754

Please sign in to comment.