From 5be753663cb2a4e3d092c0454cd1b81e1ee8b5bf Mon Sep 17 00:00:00 2001 From: Flutterish Date: Wed, 10 Aug 2022 21:00:14 +0200 Subject: [PATCH] bump osu verrsion --- osu.Game.Rulesets.RurusettoAddon/API/RurusettoAPI.cs | 6 +++++- .../osu.Game.Rulesets.RurusettoAddon.csproj | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/osu.Game.Rulesets.RurusettoAddon/API/RurusettoAPI.cs b/osu.Game.Rulesets.RurusettoAddon/API/RurusettoAPI.cs index 415f6b4..d95f683 100644 --- a/osu.Game.Rulesets.RurusettoAddon/API/RurusettoAPI.cs +++ b/osu.Game.Rulesets.RurusettoAddon/API/RurusettoAPI.cs @@ -1,4 +1,5 @@ using Newtonsoft.Json; +using osu.Framework.Graphics.Rendering; using osu.Framework.Graphics.Textures; using osu.Framework.Logging; using SixLabors.ImageSharp.PixelFormats; @@ -13,6 +14,9 @@ public class RurusettoAPI : Component { public readonly Bindable Address = new( DefaultAPIAddress ); public Uri GetEndpoint ( string endpoint ) => new( new Uri( Address.Value ), endpoint ); + [Resolved] + private IRenderer renderer { get; set; } = null!; + public RurusettoAPI () { Address.ValueChanged += _ => FlushAllCaches(); } @@ -214,7 +218,7 @@ public void RequestImage ( string uri, Action? success = null, Action( imageStream ); - var texture = new Texture( image.Width, image.Height ); + var texture = renderer.CreateTexture( image.Width, image.Height ); texture.SetData( new TextureUpload( image ) ); texture.AssetName = uri; diff --git a/osu.Game.Rulesets.RurusettoAddon/osu.Game.Rulesets.RurusettoAddon.csproj b/osu.Game.Rulesets.RurusettoAddon/osu.Game.Rulesets.RurusettoAddon.csproj index 5ec0ed7..50e85d1 100644 --- a/osu.Game.Rulesets.RurusettoAddon/osu.Game.Rulesets.RurusettoAddon.csproj +++ b/osu.Game.Rulesets.RurusettoAddon/osu.Game.Rulesets.RurusettoAddon.csproj @@ -18,6 +18,6 @@ - + \ No newline at end of file