remove firmware manager dependency from RomLoader, and a few other cleanups

This commit is contained in:
adelikat 2020-07-11 20:10:23 -05:00
parent 467f0aff2b
commit c712bde84e
3 changed files with 4 additions and 7 deletions

View File

@ -9,7 +9,6 @@ using BizHawk.Common.StringExtensions;
using BizHawk.Emulation.Common;
using BizHawk.Emulation.Cores;
using BizHawk.Emulation.Cores.Libretro;
using BizHawk.Emulation.Cores.Calculators;
using BizHawk.Emulation.Cores.Computers.AppleII;
using BizHawk.Emulation.Cores.Computers.Commodore64;
using BizHawk.Emulation.Cores.Consoles.Sega.gpgx;
@ -52,12 +51,10 @@ namespace BizHawk.Client.Common
public string Extension { get; set; }
}
private readonly Config _config;
private readonly FirmwareManager _firmwareManager;
public RomLoader(Config config, FirmwareManager firmwareManager)
public RomLoader(Config config)
{
_config = config;
_firmwareManager = firmwareManager;
}
public enum LoadErrorType
@ -717,7 +714,7 @@ namespace BizHawk.Client.Common
nextEmulator = new AppleII(
nextComm,
xmlGame.Assets.Select(a => a.Value),
(AppleII.Settings) GetCoreSettings<AppleII, AppleII.Settings>()
GetCoreSettings<AppleII, AppleII.Settings>()
);
return true;
case "C64":

View File

@ -3504,7 +3504,7 @@ namespace BizHawk.Client.EmuHawk
return false;
}
var loader = new RomLoader(Config, GlobalWin.FirmwareManager)
var loader = new RomLoader(Config)
{
ChooseArchive = LoadArchiveChooser,
ChoosePlatform = ChoosePlatformForRom,

View File

@ -69,7 +69,7 @@ namespace BizHawk.Client.EmuHawk
_files = new List<string>(files);
_numFrames = numFrames;
_ldr = new RomLoader(GlobalWin.Config, GlobalWin.FirmwareManager);
_ldr = new RomLoader(GlobalWin.Config);
_ldr.OnLoadError += OnLoadError;
_ldr.ChooseArchive = ChooseArchive;
_comm = comm;