diff --git a/osu.Game.Rulesets.RurusettoAddon/API/APIRuleset.cs b/osu.Game.Rulesets.RurusettoAddon/API/APIRuleset.cs
index 021e4b6..d6e70f8 100644
--- a/osu.Game.Rulesets.RurusettoAddon/API/APIRuleset.cs
+++ b/osu.Game.Rulesets.RurusettoAddon/API/APIRuleset.cs
@@ -53,7 +53,7 @@ public void Merge ( APIRuleset other ) {
///
/// Creates the dark mode variant of the ruleset logo as a drawable with relative size axes
///
- public void RequestDarkLogo ( Action success, Action? failure = null ) {
+ public void RequestDarkLogo ( Action success, Action? failure = null, bool useLocalIcon = true ) {
static Drawable createDefault () {
return new SpriteIcon {
RelativeSizeAxes = Axes.Both,
@@ -62,7 +62,7 @@ static Drawable createDefault () {
};
}
- if ( LocalRulesetInfo != null ) {
+ if ( LocalRulesetInfo != null && useLocalIcon ) {
var icon = LocalRulesetInfo.CreateInstance()?.CreateIcon();
if ( icon is CompositeDrawable cd && cd.AutoSizeAxes != Axes.None ) {
diff --git a/osu.Game.Rulesets.RurusettoAddon/UI/RulesetLogo.cs b/osu.Game.Rulesets.RurusettoAddon/UI/RulesetLogo.cs
index 6c31158..b4ea6b2 100644
--- a/osu.Game.Rulesets.RurusettoAddon/UI/RulesetLogo.cs
+++ b/osu.Game.Rulesets.RurusettoAddon/UI/RulesetLogo.cs
@@ -1,4 +1,5 @@
using osu.Game.Overlays;
+using TagLib.IFD;
namespace osu.Game.Rulesets.RurusettoAddon.UI;
@@ -24,9 +25,27 @@ private void load ( OverlayColourProvider colours ) {
};
ruleset.RequestDarkLogo( logo => {
- AddInternal( logo );
- }, fallback => {
- AddInternal( fallback );
- } );
+ try {
+ AddInternal( logo );
+ }
+ catch {
+ RemoveInternal( logo );
+ ruleset.RequestDarkLogo( AddInternal, AddInternal, useLocalIcon: false );
+ }
+ }, fallback => AddInternal( fallback ) );
+ }
+
+ bool subtreeWorks = true;
+ public override bool UpdateSubTree () {
+ if ( !subtreeWorks )
+ return false;
+
+ try {
+ return base.UpdateSubTree();
+ }
+ catch {
+ subtreeWorks = false;
+ return false;
+ }
}
}
\ No newline at end of file
diff --git a/osu.Game.Rulesets.RurusettoAddon/osu.Game.Rulesets.RurusettoAddon.csproj b/osu.Game.Rulesets.RurusettoAddon/osu.Game.Rulesets.RurusettoAddon.csproj
index f647f19..5ec0ed7 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