1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 10:03:05 +08:00

Follow changes to osu-framework

This commit is contained in:
Drew DeVault 2016-10-11 09:47:50 -04:00 committed by Dean Herbert
parent 94f2898f52
commit 3a163de0f7

View File

@ -26,7 +26,7 @@ namespace osu.Game
{ {
public class OsuGame : OsuGameBase public class OsuGame : OsuGameBase
{ {
private class ImportBeatmapIPC private class ImportBeatmap
{ {
public string Path; public string Path;
} }
@ -36,7 +36,7 @@ namespace osu.Game
public MainMenu MainMenu => intro?.ChildGameMode as MainMenu; public MainMenu MainMenu => intro?.ChildGameMode as MainMenu;
private Intro intro; private Intro intro;
private string[] args; private string[] args;
private IPCHost<ImportBeatmapIPC> BeatmapIPC; private IPCChannel<ImportBeatmap> BeatmapIPC;
public Bindable<PlayMode> PlayMode; public Bindable<PlayMode> PlayMode;
@ -54,16 +54,13 @@ namespace osu.Game
public override void Load(BaseGame game) public override void Load(BaseGame game)
{ {
<<<<<<< HEAD BeatmapIPC = new IPCChannel<ImportBeatmap>(Host);
base.Load(game);
=======
BeatmapIPC = new IPCHost<ImportBeatmapIPC>(Host);
if (!Host.IsPrimaryInstance) if (!Host.IsPrimaryInstance)
{ {
if (args.Length == 1 && File.Exists(args[0])) if (args.Length == 1 && File.Exists(args[0]))
{ {
BeatmapIPC.SendMessage(new ImportBeatmapIPC { Path = args[0] }).Wait(); BeatmapIPC.SendMessage(new ImportBeatmap { Path = args[0] }).Wait();
Console.WriteLine(@"Sent file to running instance"); Console.WriteLine(@"Sent file to running instance");
} }
else else
@ -72,9 +69,8 @@ namespace osu.Game
} }
BeatmapIPC.MessageReceived += (message) => Console.WriteLine($@"Got beatmap: {message.Path}"); BeatmapIPC.MessageReceived += (message) => Console.WriteLine($@"Got beatmap: {message.Path}");
base.Load(); base.Load(game);
>>>>>>> Implement beatmap sending/receiving over IPC
//attach our bindables to the audio subsystem. //attach our bindables to the audio subsystem.
Audio.Volume.Weld(Config.GetBindable<double>(OsuConfig.VolumeGlobal)); Audio.Volume.Weld(Config.GetBindable<double>(OsuConfig.VolumeGlobal));