框架跟进,修复bgm音量为0时切换几次bgm会报错

This commit is contained in:
MrZ_26
2022-09-11 22:49:26 +08:00
parent 9690a345a3
commit 03515b4490
2 changed files with 2 additions and 3 deletions

View File

@@ -59,7 +59,6 @@ FONT.setFallback('norm')
SCR.setSize(1280,720)--Initialize Screen size
BGM.setMaxSources(5)
BGM.setChange(function(name)MES.new('music',text.nowPlaying..name,5)end)
VOC.setDiversion(.62)
WIDGET.setOnChange(function()
@@ -354,7 +353,7 @@ SFX.init((function()--[Warning] Not loading files here, just get the list of sou
end
return L
end)())
BGM.load((function()
BGM.init((function()
local L={}
for _,v in next,fs.getDirectoryItems('media/music')do
if isSafeFile('media/music/'..v,"Dangerous file : %SAVE%/media/music/"..v)then