store vblank and cycle count in tasproj files too. Will do this in a less gross way soon

This commit is contained in:
adelikat 2020-06-01 12:26:37 -05:00
parent d088f89ca2
commit 297a0c06a0
1 changed files with 13 additions and 0 deletions

View File

@ -12,6 +12,19 @@ namespace BizHawk.Client.Common
protected override void Write(string fn, bool isBackup = false)
{
if (Emulator is Emulation.Cores.Nintendo.SubNESHawk.SubNESHawk subNes)
{
Header[HeaderKeys.VBlankCount] = subNes.VblankCount.ToString();
}
else if (Emulator is Emulation.Cores.Nintendo.Gameboy.Gameboy gameboy)
{
Header[HeaderKeys.CycleCount] = gameboy.CycleCount.ToString();
}
else if (Emulator is Emulation.Cores.Nintendo.SubGBHawk.SubGBHawk subGb)
{
Header[HeaderKeys.CycleCount] = subGb.CycleCount.ToString();
}
var file = new FileInfo(fn);
if (file.Directory != null && !file.Directory.Exists)
{