Fix an app error due to game icon0.png is missing
If homebrew does not come with an icon, then BetterTrackPlug will skip copyIcon function, hence folder "Assets/titleId" will not be created. Next, while trying to create title.txt inside the "Assets/titleId" folder an error will occur due to "Assets/titleId" folder is not created in the first place.
This commit is contained in:
parent
eb2053232a
commit
668ac81c09
@ -147,16 +147,17 @@ for i, file in pairs(tbl) do
|
|||||||
else
|
else
|
||||||
local titleid = string.sub(file.name,1,-5)
|
local titleid = string.sub(file.name,1,-5)
|
||||||
file.region = getRegion(titleid)
|
file.region = getRegion(titleid)
|
||||||
|
|
||||||
if System.doesFileExist("ux0:/data/TrackPlug/Assets/" .. titleid .. "/icon0.png") then
|
if System.doesFileExist("ux0:/data/TrackPlug/Assets/" .. titleid .. "/icon0.png") then
|
||||||
file.icon = Graphics.loadImage("ux0:/data/TrackPlug/Assets/" .. titleid .. "/icon0.png")
|
file.icon = Graphics.loadImage("ux0:/data/TrackPlug/Assets/" .. titleid .. "/icon0.png")
|
||||||
elseif System.doesFileExist("ur0:/appmeta/" .. titleid .. "/icon0.png") then
|
else
|
||||||
file.icon = Graphics.loadImage("ur0:/appmeta/" .. titleid .. "/icon0.png")
|
|
||||||
System.createDirectory("ux0:/data/TrackPlug/Assets/" .. titleid .. "")
|
System.createDirectory("ux0:/data/TrackPlug/Assets/" .. titleid .. "")
|
||||||
|
if System.doesFileExist("ur0:/appmeta/" .. titleid .. "/icon0.png") then
|
||||||
|
file.icon = Graphics.loadImage("ur0:/appmeta/" .. titleid .. "/icon0.png")
|
||||||
copyIcon(titleid)
|
copyIcon(titleid)
|
||||||
else
|
else
|
||||||
file.icon = unk
|
file.icon = unk
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
if System.doesFileExist("ux0:/data/TrackPlug/Assets/" .. titleid .. "/title.txt") then
|
if System.doesFileExist("ux0:/data/TrackPlug/Assets/" .. titleid .. "/title.txt") then
|
||||||
|
Reference in New Issue
Block a user