/ crashes when folder labels are not set on songselect & / low res jackets & + dynamic jackets
This commit is contained in:
parent
73bfe6b41e
commit
3986d0d126
|
@ -189,7 +189,9 @@ end;
|
|||
|
||||
function getJacketImage(song)
|
||||
if not jacketCache[song.id] or jacketCache[song.id]==defaultJacketImage then
|
||||
jacketCache[song.id] = gfx.LoadImageJob(song.difficulties[1].jacketPath, defaultJacketImage, 165, 165);
|
||||
jacketCache[song.id] = gfx.LoadImageJob(song.difficulties[
|
||||
math.min(selectedDifficulty, #song.difficulties)
|
||||
].jacketPath, defaultJacketImage, 500, 500);
|
||||
end
|
||||
|
||||
return jacketCache[song.id];
|
||||
|
@ -453,10 +455,10 @@ function drawFilterInfo(deltatime)
|
|||
gfx.TextAlign(gfx.TEXT_ALIGN_CENTER + gfx.TEXT_ALIGN_MIDDLE)
|
||||
|
||||
gfx.BeginPath()
|
||||
gfx.Text(folderLabel, 167, 131);
|
||||
gfx.Text(folderLabel or '', 167, 131);
|
||||
|
||||
gfx.BeginPath()
|
||||
gfx.Text(subFolderLabel, 195, 166);
|
||||
gfx.Text(subFolderLabel or '', 195, 166);
|
||||
end
|
||||
|
||||
function drawSearch()
|
||||
|
@ -643,6 +645,8 @@ end;
|
|||
|
||||
set_diff = function(newDiff)
|
||||
if newDiff ~= selectedDifficulty then
|
||||
jacketCache = {}; -- Clear the jacket cache for the new diff jackets
|
||||
|
||||
game.PlaySample('song_wheel/diff_change.wav');
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue