mirror of
https://github.com/nucular/sfxrlua.git
synced 2024-12-24 18:44:20 +00:00
use non-deprecated function to check for sounds directory and assert that it was created/exists
This commit is contained in:
parent
4e859aec86
commit
fdbfe2d6d2
@ -649,9 +649,13 @@ function love.load()
|
||||
|
||||
love.graphics.setBackgroundColor(200, 200, 200)
|
||||
|
||||
if not love.filesystem.isDirectory("sounds") then
|
||||
local pathinfo = love.filesystem.getInfo("sounds")
|
||||
if pathinfo == nil then
|
||||
love.filesystem.createDirectory("sounds")
|
||||
pathinfo = love.filesystem.getInfo("sounds")
|
||||
end
|
||||
assert(pathinfo.type == 'directory', '"sounds" exists in ' ..
|
||||
love.filesystem.getRealDirectory('sounds') .. ' but is not a directory')
|
||||
|
||||
sound = sfxr.newSound()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user