From f506cb35bc4781b404b0f039f5978a11514d80f8 Mon Sep 17 00:00:00 2001 From: Dan Balasescu Date: Sun, 28 Nov 2021 21:15:29 +0900 Subject: [PATCH] Bind legacy IPC on startup --- osu.Desktop/Program.cs | 29 ++++++++--------------------- 1 file changed, 8 insertions(+), 21 deletions(-) diff --git a/osu.Desktop/Program.cs b/osu.Desktop/Program.cs index cb9204f518..7762aa9010 100644 --- a/osu.Desktop/Program.cs +++ b/osu.Desktop/Program.cs @@ -61,27 +61,6 @@ public static void Main(string[] args) gameName = $"{base_game_name}-{clientID}"; break; - - case "--legacy-ipc-server": - using (legacyIpcProvider = new LegacyTcpIpcProvider()) - { - legacyIpcProvider.MessageReceived += onLegacyIpcMessageReceived; - legacyIpcProvider.Bind(); - legacyIpcProvider.StartAsync().Wait(); - } - - return; - - case "--legacy-ipc-client": - using (legacyIpcProvider = new LegacyTcpIpcProvider()) - { - Console.WriteLine(legacyIpcProvider.SendMessageWithResponseAsync(new LegacyIpcDifficultyCalculationRequest - { - BeatmapFile = "/home/smgi/Downloads/osu_files/129891.osu", - }).Result.StarRating); - } - - return; } } @@ -113,6 +92,14 @@ public static void Main(string[] args) } } + if (host.IsPrimaryInstance) + { + var legacyIpc = new LegacyTcpIpcProvider(); + legacyIpc.MessageReceived += onLegacyIpcMessageReceived; + legacyIpc.Bind(); + legacyIpc.StartAsync(); + } + if (tournamentClient) host.Run(new TournamentGame()); else