mirror of
https://github.com/ppy/osu.git
synced 2024-09-21 22:07:25 +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}";
|
gameName = $"{base_game_name}-{clientID}";
|
||||||
break;
|
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)
|
if (tournamentClient)
|
||||||
host.Run(new TournamentGame());
|
host.Run(new TournamentGame());
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user