mirror of
https://github.com/ppy/osu.git
synced 2024-12-13 08:32:57 +08:00
Allow defining custom storage name for debug builds of osu!lazer
This commit is contained in:
parent
59dd3452fe
commit
37393a8432
@ -23,7 +23,16 @@ namespace osu.Desktop
|
||||
// Back up the cwd before DesktopGameHost changes it
|
||||
var cwd = Environment.CurrentDirectory;
|
||||
|
||||
using (DesktopGameHost host = Host.GetSuitableHost(@"osu", true))
|
||||
string gameName = @"osu";
|
||||
|
||||
if (DebugUtils.IsDebugBuild)
|
||||
{
|
||||
var customNameArg = args.SingleOrDefault(s => s.StartsWith(@"--name=", StringComparison.Ordinal));
|
||||
if (customNameArg != null)
|
||||
gameName = customNameArg.Replace(@"--name=", string.Empty);
|
||||
}
|
||||
|
||||
using (DesktopGameHost host = Host.GetSuitableHost(gameName, true))
|
||||
{
|
||||
host.ExceptionThrown += handleException;
|
||||
|
||||
@ -48,16 +57,10 @@ namespace osu.Desktop
|
||||
return 0;
|
||||
}
|
||||
|
||||
switch (args.FirstOrDefault() ?? string.Empty)
|
||||
{
|
||||
default:
|
||||
host.Run(new OsuGameDesktop(args));
|
||||
break;
|
||||
|
||||
case "--tournament":
|
||||
host.Run(new TournamentGame());
|
||||
break;
|
||||
}
|
||||
if (args.Contains("--tournament"))
|
||||
host.Run(new TournamentGame());
|
||||
else
|
||||
host.Run(new OsuGameDesktop(args));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user