mirror of https://github.com/ppy/osu
Change to `int`-only debug client ID
This commit is contained in:
parent
37393a8432
commit
ebd555129f
|
@ -24,12 +24,23 @@ public static int Main(string[] args)
|
|||
var cwd = Environment.CurrentDirectory;
|
||||
|
||||
string gameName = @"osu";
|
||||
bool tournamentClient = false;
|
||||
|
||||
if (DebugUtils.IsDebugBuild)
|
||||
foreach (var arg in args.Select(s => s.Split('=')))
|
||||
{
|
||||
var customNameArg = args.SingleOrDefault(s => s.StartsWith(@"--name=", StringComparison.Ordinal));
|
||||
if (customNameArg != null)
|
||||
gameName = customNameArg.Replace(@"--name=", string.Empty);
|
||||
switch (arg[0])
|
||||
{
|
||||
case "--tournament":
|
||||
tournamentClient = true;
|
||||
break;
|
||||
|
||||
case "--debug-client-id":
|
||||
if (!DebugUtils.IsDebugBuild)
|
||||
break;
|
||||
|
||||
gameName = $"{gameName}-{int.Parse(arg[1])}";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
using (DesktopGameHost host = Host.GetSuitableHost(gameName, true))
|
||||
|
@ -57,7 +68,7 @@ public static int Main(string[] args)
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (args.Contains("--tournament"))
|
||||
if (tournamentClient)
|
||||
host.Run(new TournamentGame());
|
||||
else
|
||||
host.Run(new OsuGameDesktop(args));
|
||||
|
|
Loading…
Reference in New Issue