Update in line with framework storage changes

This commit is contained in:
Dean Herbert
2020-05-06 18:27:10 +09:00
parent 5edabbdee2
commit 7781408643
5 changed files with 179 additions and 115 deletions

View File

@ -71,8 +71,6 @@ namespace osu.Game
protected MenuCursorContainer MenuCursorContainer;
protected StorageConfigManager StorageConfig;
private Container content;
protected override Container<Drawable> Content => content;
@ -304,17 +302,7 @@ namespace osu.Game
{
base.SetHost(host);
StorageConfig = new StorageConfigManager(host.Storage);
var customStoragePath = StorageConfig.Get<string>(Configuration.StorageConfig.FullPath);
if (!string.IsNullOrEmpty(customStoragePath))
{
Storage = new CustomStorage(customStoragePath, host);
Logger.Storage = Storage.GetStorageForDirectory("logs");
}
else
Storage = host.Storage;
Storage = new OsuStorage(host);
if (LocalConfig == null)
LocalConfig = new OsuConfigManager(Storage);
@ -366,17 +354,5 @@ namespace osu.Game
public override bool ChangeFocusOnClick => false;
}
}
/// <summary>
/// A storage pointing to an absolute location specified by the user to store game data files.
/// </summary>
private class CustomStorage : NativeStorage
{
public CustomStorage(string fullPath, GameHost host)
: base(string.Empty, host)
{
BasePath = fullPath;
}
}
}
}