Merge pull request #14826 from peppy/move-startup-concurrency-check

Move startup concurrency check to higher level
This commit is contained in:
Dan Balasescu
2021-09-29 18:28:15 +09:00
committed by GitHub
2 changed files with 3 additions and 6 deletions

View File

@ -74,8 +74,11 @@ namespace osu.Desktop
// we want to allow multiple instances to be started when in debug. // we want to allow multiple instances to be started when in debug.
if (!DebugUtils.IsDebugBuild) if (!DebugUtils.IsDebugBuild)
{
Logger.Log(@"osu! does not support multiple running instances.", LoggingTarget.Runtime, LogLevel.Error);
return 0; return 0;
} }
}
if (tournamentClient) if (tournamentClient)
host.Run(new TournamentGame()); host.Run(new TournamentGame());

View File

@ -210,12 +210,6 @@ namespace osu.Game
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load() private void load()
{ {
if (!Host.IsPrimaryInstance && !DebugUtils.IsDebugBuild)
{
Logger.Log(@"osu! does not support multiple running instances.", LoggingTarget.Runtime, LogLevel.Error);
Environment.Exit(0);
}
if (args?.Length > 0) if (args?.Length > 0)
{ {
var paths = args.Where(a => !a.StartsWith('-')).ToArray(); var paths = args.Where(a => !a.StartsWith('-')).ToArray();