mirror of
https://github.com/ppy/osu.git
synced 2024-11-06 12:17:46 +08:00
Recreate beatmap video on each consumption
Should not be shared over multiple usages
This commit is contained in:
parent
1b8d5decfa
commit
65aa7b2016
@ -44,7 +44,6 @@ namespace osu.Game.Beatmaps
|
|||||||
|
|
||||||
track = new RecyclableLazy<Track>(() => GetTrack() ?? GetVirtualTrack());
|
track = new RecyclableLazy<Track>(() => GetTrack() ?? GetVirtualTrack());
|
||||||
background = new RecyclableLazy<Texture>(GetBackground, BackgroundStillValid);
|
background = new RecyclableLazy<Texture>(GetBackground, BackgroundStillValid);
|
||||||
video = new RecyclableLazy<VideoSprite>(GetVideo);
|
|
||||||
waveform = new RecyclableLazy<Waveform>(GetWaveform);
|
waveform = new RecyclableLazy<Waveform>(GetWaveform);
|
||||||
storyboard = new RecyclableLazy<Storyboard>(GetStoryboard);
|
storyboard = new RecyclableLazy<Storyboard>(GetStoryboard);
|
||||||
skin = new RecyclableLazy<ISkin>(GetSkin);
|
skin = new RecyclableLazy<ISkin>(GetSkin);
|
||||||
@ -188,11 +187,9 @@ namespace osu.Game.Beatmaps
|
|||||||
protected abstract Texture GetBackground();
|
protected abstract Texture GetBackground();
|
||||||
private readonly RecyclableLazy<Texture> background;
|
private readonly RecyclableLazy<Texture> background;
|
||||||
|
|
||||||
public bool VideoLoaded => video.IsResultAvailable;
|
public VideoSprite Video => GetVideo();
|
||||||
public VideoSprite Video => video.Value;
|
|
||||||
|
|
||||||
protected abstract VideoSprite GetVideo();
|
protected abstract VideoSprite GetVideo();
|
||||||
private readonly RecyclableLazy<VideoSprite> video;
|
|
||||||
|
|
||||||
public bool TrackLoaded => track.IsResultAvailable;
|
public bool TrackLoaded => track.IsResultAvailable;
|
||||||
public Track Track => track.Value;
|
public Track Track => track.Value;
|
||||||
|
Loading…
Reference in New Issue
Block a user