void RefreshLibretroCore(bool bootstrap) { txtLibretroCore.Text = ""; btnLibretroLaunchNoGame.Enabled = false; btnLibretroLaunchGame.Enabled = false; var core = Global.Config.LibretroCore; if (string.IsNullOrEmpty(core)) { return; } txtLibretroCore.Text = core; CurrentDescription = null; //scan the current libretro core to see if it can be launched with NoGame,and other stuff try { //a stub corecomm. to reinforce that this won't touch the frontend at all! //LibRetroEmulator should be able to survive having this stub corecomm var coreComm = new BizHawk.Emulation.Common.CoreComm(null, null); using (var retro = new LibRetroEmulator(coreComm, core)) { btnLibretroLaunchGame.Enabled = true; if (retro.Description.SupportsNoGame) { btnLibretroLaunchNoGame.Enabled = true; } //print descriptive information var descr = retro.Description; CurrentDescription = descr; Console.WriteLine("core name: {0} version {1}", descr.LibraryName, descr.LibraryVersion); Console.WriteLine("extensions: ", descr.ValidExtensions); Console.WriteLine("NeedsRomAsPath: {0}", descr.NeedsRomAsPath); Console.WriteLine("AcceptsArchives: {0}", descr.NeedsArchives); Console.WriteLine("SupportsNoGame: {0}", descr.SupportsNoGame); foreach (var v in descr.Variables.Values) { Console.WriteLine(v); } } } catch { if (!bootstrap) { MessageBox.Show("Couldn't load the selected Libretro core for analysis. It won't be available."); } } }
void RefreshLibretroCore(bool bootstrap) { txtLibretroCore.Text = ""; btnLibretroLaunchNoGame.Enabled = false; btnLibretroLaunchGame.Enabled = false; var core = Global.Config.LibretroCore; if (string.IsNullOrEmpty(core)) return; txtLibretroCore.Text = core; CurrentDescription = null; //scan the current libretro core to see if it can be launched with NoGame,and other stuff try { //a stub corecomm. to reinforce that this won't touch the frontend at all! //LibRetroEmulator should be able to survive having this stub corecomm var coreComm = new BizHawk.Emulation.Common.CoreComm(null, null); using (var retro = new LibRetroEmulator(coreComm, core)) { btnLibretroLaunchGame.Enabled = true; if (retro.Description.SupportsNoGame) btnLibretroLaunchNoGame.Enabled = true; //print descriptive information var descr = retro.Description; CurrentDescription = descr; Console.WriteLine("core name: {0} version {1}", descr.LibraryName, descr.LibraryVersion); Console.WriteLine("extensions: ", descr.ValidExtensions); Console.WriteLine("NeedsRomAsPath: {0}", descr.NeedsRomAsPath); Console.WriteLine("AcceptsArchives: {0}", descr.NeedsArchives); Console.WriteLine("SupportsNoGame: {0}", descr.SupportsNoGame); foreach (var v in descr.Variables.Values) Console.WriteLine(v); } } catch { if (!bootstrap) MessageBox.Show("Couldn't load the selected Libretro core for analysis. It won't be available."); } }