address #1631 for gambatte

This commit is contained in:
feos 2019-11-20 21:25:55 +03:00
parent 4e389ab1ec
commit d15dc56e15
3 changed files with 20 additions and 7 deletions

View File

@ -166,11 +166,16 @@ namespace BizHawk.Client.Common
protected virtual void Write(string fn, bool backup = false)
{
if (Global.Emulator is BizHawk.Emulation.Cores.Nintendo.SubNESHawk.SubNESHawk)
if (Global.Emulator is Emulation.Cores.Nintendo.SubNESHawk.SubNESHawk)
{
var _subnes = (BizHawk.Emulation.Cores.Nintendo.SubNESHawk.SubNESHawk)Global.Emulator;
var _subnes = (Emulation.Cores.Nintendo.SubNESHawk.SubNESHawk)Global.Emulator;
Header["VBlankCount"] = _subnes.VBL_CNT.ToString();
}
else if (Global.Emulator is Emulation.Cores.Nintendo.Gameboy.Gameboy)
{
var _gameboy = (Emulation.Cores.Nintendo.Gameboy.Gameboy)Global.Emulator;
Header["CycleCount"] = _gameboy.CycleCount.ToString();
}
var file = new FileInfo(fn);
if (!file.Directory.Exists)

View File

@ -335,6 +335,11 @@ namespace BizHawk.Client.Common.MovieConversionExtensions
movie.HeaderEntries.Add("IsCGBMode", "1");
}
if (Global.Emulator is Gameboy)
{
movie.HeaderEntries.Add("CycleCount", "0");
}
if (Global.Emulator is SMS && ((SMS) Global.Emulator).IsSG1000)
{
movie.HeaderEntries.Add("IsSGMode", "1");

View File

@ -268,13 +268,16 @@ namespace BizHawk.Client.EmuHawk
{
_autosaveTimer.Stop();
if (Emulator is BizHawk.Emulation.Cores.Nintendo.SubNESHawk.SubNESHawk
&& Emulator.Frame != CurrentTasMovie.InputLogLength - 1)
if (Emulator.Frame != CurrentTasMovie.InputLogLength - 1)
{
var result = MessageBox.Show("This core requires emulation to be on the last frame when writing the movie, otherwise movie length may appear incorrect.\nSeek there?", "Export movie", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
if (result == DialogResult.OK)
if (Emulator is Emulation.Cores.Nintendo.SubNESHawk.SubNESHawk
|| Emulator is Emulation.Cores.Nintendo.Gameboy.Gameboy)
{
GoToFrame(CurrentTasMovie.InputLogLength - 1);
var result = MessageBox.Show("This core requires emulation to be on the last frame when writing the movie, otherwise movie length may appear incorrect.\nSeek there?", "Export movie", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
if (result == DialogResult.OK)
{
GoToFrame(CurrentTasMovie.InputLogLength - 1);
}
}
}