mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Update in line with framework storage changes
This commit is contained in:
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user