public BatchRunner(MainForm mainForm, IEnumerable <string> files, int numFrames) { _files = new List <string>(files); _numFrames = numFrames; _ldr = new RomLoader(); _ldr.OnLoadError += OnLoadError; _ldr.ChooseArchive = ChooseArchive; _comm = mainForm.CreateCoreComm(); }
public BatchRunner(MainForm mainForm, IEnumerable <string> files, int numFrames) { _files = new List <string>(files); _numFrames = numFrames; _ldr = new RomLoader(); _ldr.OnLoadError += OnLoadError; _ldr.ChooseArchive = ChooseArchive; var cfp = new CoreFileProvider(CommMessage, Global.FirmwareManager, Global.Config.PathEntries, Global.Config.FirmwareUserSpecifications); _comm = mainForm.CreateCoreComm(); }
private void RefreshLibretroCore(bool bootstrap) { txtLibretroCore.Text = ""; btnLibretroLaunchNoGame.Enabled = false; btnLibretroLaunchGame.Enabled = false; var core = _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 { var coreComm = _mainForm.CreateCoreComm(); using var retro = new LibretroCore(coreComm, Global.Game, core); btnLibretroLaunchGame.Enabled = true; if (retro.Description.SupportsNoGame) { btnLibretroLaunchNoGame.Enabled = true; } //print descriptive information var descr = retro.Description; _currentDescription = descr; Console.WriteLine($"core name: {descr.LibraryName} version {descr.LibraryVersion}"); Console.WriteLine($"extensions: {descr.ValidExtensions}"); Console.WriteLine($"{nameof(descr.NeedsRomAsPath)}: {descr.NeedsRomAsPath}"); Console.WriteLine($"{nameof(descr.NeedsArchives)}: {descr.NeedsArchives}"); Console.WriteLine($"{nameof(descr.SupportsNoGame)}: {descr.SupportsNoGame}"); foreach (var v in descr.Variables.Values) { Console.WriteLine(v); } } catch (Exception ex) { if (!bootstrap) { MessageBox.Show($"Couldn't load the selected Libretro core for analysis. It won't be available.\n\nError:\n\n{ex}"); } } }