Use GetAsync on all textures

This commit is contained in:
smoogipoo
2018-08-27 17:26:44 +09:00
parent 21d5322899
commit 1b279d383f
28 changed files with 92 additions and 67 deletions

View File

@ -4,6 +4,7 @@
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Threading.Tasks;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.OpenGL.Buffers;
@ -79,10 +80,10 @@ namespace osu.Game.Rulesets.Osu.UI.Cursor
public override bool ReceiveMouseInputAt(Vector2 screenSpacePos) => true;
[BackgroundDependencyLoader]
private void load(ShaderManager shaders, TextureStore textures)
private async Task load(ShaderManager shaders, TextureStore textures)
{
shader = shaders?.Load(@"CursorTrail", FragmentShaderDescriptor.TEXTURE);
texture = textures.Get(@"Cursor/cursortrail");
texture = await textures.GetAsync(@"Cursor/cursortrail");
Scale = new Vector2(1 / texture.ScaleAdjust);
}