mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Allow defining custom storage name for debug builds of osu!lazer
This commit is contained in:
@ -23,7 +23,16 @@ namespace osu.Desktop
|
|||||||
// Back up the cwd before DesktopGameHost changes it
|
// Back up the cwd before DesktopGameHost changes it
|
||||||
var cwd = Environment.CurrentDirectory;
|
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;
|
host.ExceptionThrown += handleException;
|
||||||
|
|
||||||
@ -48,16 +57,10 @@ namespace osu.Desktop
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (args.FirstOrDefault() ?? string.Empty)
|
if (args.Contains("--tournament"))
|
||||||
{
|
|
||||||
default:
|
|
||||||
host.Run(new OsuGameDesktop(args));
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "--tournament":
|
|
||||||
host.Run(new TournamentGame());
|
host.Run(new TournamentGame());
|
||||||
break;
|
else
|
||||||
}
|
host.Run(new OsuGameDesktop(args));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user