mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 10:33:30 +08:00
Bind legacy IPC on startup
This commit is contained in:
parent
5711c428ca
commit
f506cb35bc
@ -61,27 +61,6 @@ namespace osu.Desktop
|
||||
|
||||
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<LegacyIpcDifficultyCalculationResponse>(new LegacyIpcDifficultyCalculationRequest
|
||||
{
|
||||
BeatmapFile = "/home/smgi/Downloads/osu_files/129891.osu",
|
||||
}).Result.StarRating);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@ -113,6 +92,14 @@ namespace osu.Desktop
|
||||
}
|
||||
}
|
||||
|
||||
if (host.IsPrimaryInstance)
|
||||
{
|
||||
var legacyIpc = new LegacyTcpIpcProvider();
|
||||
legacyIpc.MessageReceived += onLegacyIpcMessageReceived;
|
||||
legacyIpc.Bind();
|
||||
legacyIpc.StartAsync();
|
||||
}
|
||||
|
||||
if (tournamentClient)
|
||||
host.Run(new TournamentGame());
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user