1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 20:47:28 +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
parent 0027f44bd0
commit ce360a960f

View File

@ -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[]
{