mirror of
https://github.com/ppy/osu.git
synced 2025-02-20 08:53:20 +08:00
Allow import of skins which don't have ini files
This commit is contained in:
parent
7272ba2f1b
commit
b71c123214
@ -26,10 +26,13 @@ namespace osu.Game.Skinning
|
||||
samples = audioManager.GetSampleManager(storage);
|
||||
textures = new TextureStore(new RawTextureLoaderStore(storage));
|
||||
|
||||
var decoder = new LegacySkinDecoder();
|
||||
Stream stream = storage.GetStream("skin.ini");
|
||||
|
||||
using (StreamReader reader = new StreamReader(storage.GetStream("skin.ini")))
|
||||
Configuration = decoder.Decode(reader);
|
||||
if (stream != null)
|
||||
using (StreamReader reader = new StreamReader(stream))
|
||||
Configuration = new LegacySkinDecoder().Decode(reader);
|
||||
else
|
||||
Configuration = new SkinConfiguration();
|
||||
}
|
||||
|
||||
public override Drawable GetDrawableComponent(string componentName)
|
||||
|
Loading…
Reference in New Issue
Block a user