From cd15cfc864513228112d7209d526a97f7bbf9bd3 Mon Sep 17 00:00:00 2001 From: Damnae Date: Sun, 10 Sep 2017 22:02:55 +0200 Subject: [PATCH] Use case insensitive paths to find storyboard textures. --- osu.Game/Storyboards/Drawables/StoryboardAnimation.cs | 5 +++-- osu.Game/Storyboards/Drawables/StoryboardSprite.cs | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/osu.Game/Storyboards/Drawables/StoryboardAnimation.cs b/osu.Game/Storyboards/Drawables/StoryboardAnimation.cs index 2051b9c4af..a28287fd40 100644 --- a/osu.Game/Storyboards/Drawables/StoryboardAnimation.cs +++ b/osu.Game/Storyboards/Drawables/StoryboardAnimation.cs @@ -69,11 +69,12 @@ namespace osu.Game.Storyboards.Drawables [BackgroundDependencyLoader] private void load(OsuGameBase game, TextureStore textureStore) { + var basePath = Definition.Path.ToLowerInvariant(); for (var frame = 0; frame < Definition.FrameCount; frame++) { - var framePath = Definition.Path.Replace(".", frame + "."); + var framePath = basePath.Replace(".", frame + "."); - var path = game.Beatmap.Value.BeatmapSetInfo.Files.FirstOrDefault(f => f.Filename == framePath)?.FileInfo.StoragePath; + var path = game.Beatmap.Value.BeatmapSetInfo.Files.FirstOrDefault(f => f.Filename.ToLowerInvariant() == framePath)?.FileInfo.StoragePath; if (path == null) continue; diff --git a/osu.Game/Storyboards/Drawables/StoryboardSprite.cs b/osu.Game/Storyboards/Drawables/StoryboardSprite.cs index ca055fe6d4..3b1a431a4a 100644 --- a/osu.Game/Storyboards/Drawables/StoryboardSprite.cs +++ b/osu.Game/Storyboards/Drawables/StoryboardSprite.cs @@ -68,8 +68,8 @@ namespace osu.Game.Storyboards.Drawables [BackgroundDependencyLoader] private void load(OsuGameBase game, TextureStore textureStore) { - var spritePath = Definition.Path; - var path = game.Beatmap.Value.BeatmapSetInfo.Files.FirstOrDefault(f => f.Filename == spritePath)?.FileInfo.StoragePath; + var spritePath = Definition.Path.ToLowerInvariant(); + var path = game.Beatmap.Value.BeatmapSetInfo.Files.FirstOrDefault(f => f.Filename.ToLowerInvariant() == spritePath)?.FileInfo.StoragePath; if (path == null) return;