mirror of
https://github.com/ppy/osu
synced 2024-12-17 20:35:21 +00:00
Update IPC usages
Of note, I've disabled IPC on visual test runners as we generally don't use IPC in these cases. Having it set means that the game will not open while visual tests are open, which has been a complaint from devs in the past.
This commit is contained in:
parent
2be989b9f5
commit
82e7643df5
@ -13,7 +13,7 @@ namespace osu.Game.Rulesets.EmptyFreeform.Tests
|
||||
[STAThread]
|
||||
public static int Main(string[] args)
|
||||
{
|
||||
using (DesktopGameHost host = Host.GetSuitableDesktopHost(@"osu", new HostOptions { BindIPC = true }))
|
||||
using (DesktopGameHost host = Host.GetSuitableDesktopHost(@"osu"))
|
||||
{
|
||||
host.Run(new OsuTestBrowser());
|
||||
return 0;
|
||||
|
@ -13,7 +13,7 @@ namespace osu.Game.Rulesets.Pippidon.Tests
|
||||
[STAThread]
|
||||
public static int Main(string[] args)
|
||||
{
|
||||
using (DesktopGameHost host = Host.GetSuitableDesktopHost(@"osu", new HostOptions { BindIPC = true }))
|
||||
using (DesktopGameHost host = Host.GetSuitableDesktopHost(@"osu"))
|
||||
{
|
||||
host.Run(new OsuTestBrowser());
|
||||
return 0;
|
||||
|
@ -13,7 +13,7 @@ namespace osu.Game.Rulesets.EmptyScrolling.Tests
|
||||
[STAThread]
|
||||
public static int Main(string[] args)
|
||||
{
|
||||
using (DesktopGameHost host = Host.GetSuitableDesktopHost(@"osu", new HostOptions { BindIPC = true }))
|
||||
using (DesktopGameHost host = Host.GetSuitableDesktopHost(@"osu"))
|
||||
{
|
||||
host.Run(new OsuTestBrowser());
|
||||
return 0;
|
||||
|
@ -13,7 +13,7 @@ namespace osu.Game.Rulesets.Pippidon.Tests
|
||||
[STAThread]
|
||||
public static int Main(string[] args)
|
||||
{
|
||||
using (DesktopGameHost host = Host.GetSuitableDesktopHost(@"osu", new HostOptions { BindIPC = true }))
|
||||
using (DesktopGameHost host = Host.GetSuitableDesktopHost(@"osu"))
|
||||
{
|
||||
host.Run(new OsuTestBrowser());
|
||||
return 0;
|
||||
|
@ -102,7 +102,7 @@ namespace osu.Desktop
|
||||
}
|
||||
}
|
||||
|
||||
using (DesktopGameHost host = Host.GetSuitableDesktopHost(gameName, new HostOptions { BindIPC = !tournamentClient }))
|
||||
using (DesktopGameHost host = Host.GetSuitableDesktopHost(gameName, new HostOptions { IPCPort = !tournamentClient ? OsuGame.IPC_PORT : null }))
|
||||
{
|
||||
if (!host.IsPrimaryInstance)
|
||||
{
|
||||
|
@ -63,7 +63,7 @@ namespace osu.Game.Tests.Visual.Navigation
|
||||
});
|
||||
AddStep("create IPC sender channels", () =>
|
||||
{
|
||||
ipcSenderHost = new HeadlessGameHost(gameHost.Name, new HostOptions { BindIPC = true });
|
||||
ipcSenderHost = new HeadlessGameHost(gameHost.Name, new HostOptions { IPCPort = OsuGame.IPC_PORT });
|
||||
osuSchemeLinkIPCSender = new OsuSchemeLinkIPCChannel(ipcSenderHost);
|
||||
archiveImportIPCSender = new ArchiveImportIPCChannel(ipcSenderHost);
|
||||
});
|
||||
|
@ -12,7 +12,7 @@ namespace osu.Game.Tournament.Tests
|
||||
[STAThread]
|
||||
public static int Main(string[] args)
|
||||
{
|
||||
using (DesktopGameHost host = Host.GetSuitableDesktopHost(@"osu-development", new HostOptions { BindIPC = true }))
|
||||
using (DesktopGameHost host = Host.GetSuitableDesktopHost(@"osu-development"))
|
||||
{
|
||||
host.Run(new TournamentTestBrowser());
|
||||
return 0;
|
||||
|
@ -80,6 +80,8 @@ namespace osu.Game
|
||||
[Cached(typeof(OsuGame))]
|
||||
public partial class OsuGame : OsuGameBase, IKeyBindingHandler<GlobalAction>, ILocalUserPlayInfo, IPerformFromScreenRunner, IOverlayManager, ILinkHandler
|
||||
{
|
||||
public const int IPC_PORT = 44823;
|
||||
|
||||
/// <summary>
|
||||
/// The amount of global offset to apply when a left/right anchored overlay is displayed (ie. settings or notifications).
|
||||
/// </summary>
|
||||
|
@ -27,7 +27,7 @@ namespace osu.Game.Tests
|
||||
[CallerMemberName] string callingMethodName = @"")
|
||||
: base($"{callingMethodName}-{Guid.NewGuid()}", new HostOptions
|
||||
{
|
||||
BindIPC = bindIPC,
|
||||
IPCPort = bindIPC ? OsuGame.IPC_PORT : null,
|
||||
}, bypassCleanup: bypassCleanupOnDispose, realtime: realtime)
|
||||
{
|
||||
this.bypassCleanupOnSetup = bypassCleanupOnSetup;
|
||||
|
@ -12,7 +12,7 @@ namespace osu.Game.Tests
|
||||
[STAThread]
|
||||
public static int Main(string[] args)
|
||||
{
|
||||
using (DesktopGameHost host = Host.GetSuitableDesktopHost(@"osu-development", new HostOptions { BindIPC = true, }))
|
||||
using (DesktopGameHost host = Host.GetSuitableDesktopHost(@"osu-development"))
|
||||
{
|
||||
host.Run(new OsuTestBrowser());
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user