Merge pull request #2 from chinseng85/master

Fix app error due to App/Game icon0.png is missing
This commit is contained in:
Furkan Mudanyali 2020-03-25 16:28:05 +03:00 committed by GitHub
commit 55402a0adf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -147,19 +147,20 @@ for i, file in pairs(tbl) do
else
local titleid = string.sub(file.name,1,-5)
file.region = getRegion(titleid)
if System.doesFileExist("ux0:/data/TrackPlug/Assets/" .. titleid .. "/icon0.png") then
file.icon = Graphics.loadImage("ux0:/data/TrackPlug/Assets/" .. titleid .. "/icon0.png")
elseif System.doesFileExist("ur0:/appmeta/" .. titleid .. "/icon0.png") then
file.icon = Graphics.loadImage("ur0:/appmeta/" .. titleid .. "/icon0.png")
else
System.createDirectory("ux0:/data/TrackPlug/Assets/" .. titleid .. "")
copyIcon(titleid)
else
file.icon = unk
end
if System.doesFileExist("ur0:/appmeta/" .. titleid .. "/icon0.png") then
file.icon = Graphics.loadImage("ur0:/appmeta/" .. titleid .. "/icon0.png")
copyIcon(titleid)
else
file.icon = unk
end
end
if System.doesFileExist("ux0:/data/TrackPlug/Assets/" .. titleid .. "/title.txt") then
if System.doesFileExist("ux0:/data/TrackPlug/Assets/" .. titleid .. "/title.txt") then
file.title = recoverTitle(titleid)
elseif System.doesFileExist("ux0:/app/" .. titleid .. "/sce_sys/param.sfo") then
file.title = extractTitle("ux0:/app/" .. titleid .. "/sce_sys/param.sfo", titleid)
@ -387,4 +388,4 @@ while true do
Graphics.termBlend()
Screen.flip()
Screen.waitVblankStart()
end
end