mirror of
https://github.com/ppy/osu
synced 2024-12-18 04:46:09 +00:00
Merge branch 'master' into fix-notifications-too-early
This commit is contained in:
commit
2fee90dbd8
@ -55,11 +55,11 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
} while (line != null && line.Length == 0);
|
} while (line != null && line.Length == 0);
|
||||||
|
|
||||||
if (line == null)
|
if (line == null)
|
||||||
throw new IOException(@"Unknown file format");
|
throw new IOException(@"Unknown file format (null)");
|
||||||
|
|
||||||
var decoder = typedDecoders.Select(d => line.StartsWith(d.Key) ? d.Value : null).FirstOrDefault();
|
var decoder = typedDecoders.Select(d => line.StartsWith(d.Key, StringComparison.InvariantCulture) ? d.Value : null).FirstOrDefault();
|
||||||
if (decoder == null)
|
if (decoder == null)
|
||||||
throw new IOException(@"Unknown file format");
|
throw new IOException($@"Unknown file format ({line})");
|
||||||
|
|
||||||
return (Decoder<T>)decoder.Invoke(line);
|
return (Decoder<T>)decoder.Invoke(line);
|
||||||
}
|
}
|
||||||
|
@ -85,12 +85,10 @@ namespace osu.Game.Skinning
|
|||||||
private void load(OsuConfigManager config)
|
private void load(OsuConfigManager config)
|
||||||
{
|
{
|
||||||
beatmapSkins = config.GetBindable<bool>(OsuSetting.BeatmapSkins);
|
beatmapSkins = config.GetBindable<bool>(OsuSetting.BeatmapSkins);
|
||||||
beatmapSkins.ValueChanged += val => onSourceChanged();
|
beatmapSkins.BindValueChanged(_ => onSourceChanged());
|
||||||
beatmapSkins.TriggerChange();
|
|
||||||
|
|
||||||
beatmapHitsounds = config.GetBindable<bool>(OsuSetting.BeatmapHitsounds);
|
beatmapHitsounds = config.GetBindable<bool>(OsuSetting.BeatmapHitsounds);
|
||||||
beatmapHitsounds.ValueChanged += val => onSourceChanged();
|
beatmapHitsounds.BindValueChanged(_ => onSourceChanged(), true);
|
||||||
beatmapHitsounds.TriggerChange();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void LoadComplete()
|
protected override void LoadComplete()
|
||||||
|
@ -52,5 +52,13 @@ namespace osu.Game.Skinning
|
|||||||
protected virtual void SkinChanged(ISkinSource skin, bool allowFallback)
|
protected virtual void SkinChanged(ISkinSource skin, bool allowFallback)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void Dispose(bool isDisposing)
|
||||||
|
{
|
||||||
|
base.Dispose(isDisposing);
|
||||||
|
|
||||||
|
if (skin != null)
|
||||||
|
skin.SourceChanged -= onChange;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user