Explicitly discard required-but-unused `IStatable` service prop

This commit is contained in:
YoshiRulz 2022-07-28 05:51:38 +10:00
parent 787b413913
commit ccc11be896
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
1 changed files with 2 additions and 1 deletions

View File

@ -62,7 +62,6 @@ namespace BizHawk.Client.EmuHawk
[RequiredService]
private IEmulator Emulator { get; set; }
// Unused, due to the use of MainForm to loadstate, but this needs to be kept here in order to establish an IStatable dependency
[RequiredService]
private IStatable StatableCore { get; set; }
@ -273,6 +272,8 @@ namespace BizHawk.Client.EmuHawk
public override void Restart()
{
_ = StatableCore!; // otherwise unused due to loadstating via MainForm; however this service is very much required so the property needs to be present
if (_currentDomain == null
|| MemoryDomains.Contains(_currentDomain))
{