mirror of
https://github.com/ppy/osu
synced 2024-12-13 18:37:04 +00:00
Merge pull request #17464 from smoogipoo/fix-logo-thread-safety
Fix LogoVisualisation draw thread safety
This commit is contained in:
commit
1edf1d8f40
@ -176,7 +176,7 @@ namespace osu.Game.Screens.Menu
|
||||
|
||||
private static readonly Color4 transparent_white = Color4.White.Opacity(0.2f);
|
||||
|
||||
private float[] audioData;
|
||||
private readonly float[] audioData = new float[256];
|
||||
|
||||
private readonly QuadBatch<TexturedVertex2D> vertexBatch = new QuadBatch<TexturedVertex2D>(100, 10);
|
||||
|
||||
@ -192,7 +192,8 @@ namespace osu.Game.Screens.Menu
|
||||
shader = Source.shader;
|
||||
texture = Source.texture;
|
||||
size = Source.DrawSize.X;
|
||||
audioData = Source.frequencyAmplitudes;
|
||||
|
||||
Source.frequencyAmplitudes.AsSpan().CopyTo(audioData);
|
||||
}
|
||||
|
||||
public override void Draw(Action<TexturedVertex2D> vertexAction)
|
||||
|
Loading…
Reference in New Issue
Block a user