1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-22 01:59:53 +08:00

use GameHost's GetStorage instead of local storage

This will now get the IPC Path again as the default path if one is present, else it will fall back to osu! lazer's base path.
This commit is contained in:
Shivam
2020-05-31 16:50:13 +02:00
Unverified
parent 0027f44bd0
commit ce360a960f
@@ -31,10 +31,14 @@ namespace osu.Game.Tournament.Screens
[Resolved(canBeNull: true)]
private TournamentSceneManager sceneManager { get; set; }
[Resolved]
private GameHost host { get; set; }
[BackgroundDependencyLoader(true)]
private void load(Storage storage, OsuColour colours)
{
var initialPath = new DirectoryInfo(storage.GetFullPath(string.Empty)).Parent?.FullName;
var fileBasedIpc = ipc as FileBasedIPC;
var initialPath = new DirectoryInfo(host.GetStorage(fileBasedIpc?.GetStableInfo().StablePath.Value).GetFullPath(string.Empty) ?? storage.GetFullPath(string.Empty)).Parent?.FullName;
AddRangeInternal(new Drawable[]
{