Use case insensitive paths to find storyboard textures.

This commit is contained in:
Damnae 2017-09-10 22:02:55 +02:00
parent 9eaa1cb5cd
commit cd15cfc864
2 changed files with 5 additions and 4 deletions

View File

@ -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;

View File

@ -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;