1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-12 05:27:40 +08:00

Merge pull request #1780 from peppy/fix-regression

As it turns out, native directory separators are not supported
This commit is contained in:
Dan Balasescu 2017-12-28 01:59:44 +09:00 committed by GitHub
commit 08e15d63c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,7 +2,6 @@
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
using System.IO;
using osu.Framework.Audio.Sample;
namespace osu.Game.Audio
@ -20,11 +19,11 @@ namespace osu.Game.Audio
SampleChannel channel = null;
if (resourceNamespace != null)
channel = manager.Get(Path.Combine("Gameplay", resourceNamespace, $"{Bank}-{Name}"));
channel = manager.Get($"Gameplay/{resourceNamespace}/{Bank}-{Name}");
// try without namespace as a fallback.
if (channel == null)
channel = manager.Get(Path.Combine("Gameplay", $"{Bank}-{Name}"));
channel = manager.Get($"Gameplay/{Bank}-{Name}");
if (channel != null)
channel.Volume.Value = Volume / 100.0;