public void StartGameDirect(string path, bool debugging) { if (path == null) { return; } if (debugging == true) { _host.AttachDebugger(); } this.StartInstance(false, debugging); // If the path contains 'iso', we assume it's an iso and load it via the UMD driver Games.GameInformation game = null; if (path.Contains("iso") == true) { if (File.Exists(path) == false) { Log.WriteLine(Verbosity.Critical, Feature.General, "Unable to direct start UMD {0} - path not found", path); return; } _host.CurrentInstance.Umd.Load(path, false); game = Games.GameLoader.FindGame(_host.CurrentInstance.Umd); if (game == null) { Log.WriteLine(Verbosity.Critical, Feature.General, "Unable to find game in UMD ISO {0}", path); return; } Log.WriteLine(Verbosity.Critical, Feature.General, "Direct starting UMD '{0}' from {1}", game.Parameters.Title, path); } else { // We need to get the folder on the memory stick device of this path IMediaFolder folder = _host.CurrentInstance.MemoryStick.Root.FindFolder(path); if (folder == null) { Log.WriteLine(Verbosity.Critical, Feature.General, "Unable to find path {0}", path); return; } game = Games.GameLoader.GetEbootGameInformation(folder); if (game == null) { Log.WriteLine(Verbosity.Critical, Feature.General, "Unable to find eboot at path {0}", path); return; } Log.WriteLine(Verbosity.Critical, Feature.General, "Direct starting eboot '{0}' from {1}", game.Parameters.Title, path); } Debug.Assert(game != null); if (game == null) { return; } (_host.CurrentInstance as Instance).SwitchToGame(game); }
public void SwitchToGame(Games.GameInformation game) { Log.WriteLine(Verbosity.Critical, Feature.General, "Instance: switching to game " + game.Parameters.Title); #if XMB _xmb.Disable(); #else #endif _bios.Game = game; LoadResults results = _bios.Load(); }
public LoadResults SwitchToGame(Games.GameInformation game) { Debug.WriteLine("Instance: switching to game " + game.Parameters.Title); _bios.Game = game; return(_bios.Load()); }