mirror of https://github.com/ppy/osu
Fix beatmap covers not being unloaded in most overlays
Eventually we'll probably want something smarter than this, but for the time being this helps stop runaway memory usage.
This commit is contained in:
parent
445f5c330b
commit
c3757a4660
|
@ -67,19 +67,18 @@ private void updateCover()
|
|||
|
||||
if (beatmapSet != null)
|
||||
{
|
||||
BeatmapSetCover cover;
|
||||
|
||||
Add(displayedCover = new DelayedLoadWrapper(
|
||||
cover = new BeatmapSetCover(beatmapSet, coverType)
|
||||
Add(displayedCover = new DelayedLoadUnloadWrapper(() =>
|
||||
{
|
||||
var cover = new BeatmapSetCover(beatmapSet, coverType)
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
FillMode = FillMode.Fill,
|
||||
})
|
||||
);
|
||||
|
||||
};
|
||||
cover.OnLoadComplete += d => d.FadeInFromZero(400, Easing.Out);
|
||||
return cover;
|
||||
}));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue