Set the Neshawk vs quicknes flag before loading a movie, using the setting in the movie

This commit is contained in:
adelikat 2014-04-22 01:16:11 +00:00
parent 0456639816
commit f155375d3e
1 changed files with 15 additions and 3 deletions

View File

@ -3,6 +3,8 @@ using System.IO;
using System.Windows.Forms;
using BizHawk.Client.Common;
using BizHawk.Emulation.Common;
using BizHawk.Emulation.Cores.Consoles.Nintendo.QuickNES;
using BizHawk.Emulation.Cores.Nintendo.GBA;
using BizHawk.Emulation.Cores.Sega.Genesis;
using BizHawk.Emulation.Cores.Sega.Saturn;
@ -50,9 +52,19 @@ namespace BizHawk.Client.EmuHawk
}
else if (!record && Global.Emulator.SystemId == "NES")
{
var s = new Emulation.Cores.Nintendo.NES.NES.NESSyncSettings();
s.BoardProperties = new System.Collections.Generic.Dictionary<string, string>(Global.MovieSession.Movie.Header.BoardProperties);
this._syncSettingsHack = s;
var quicknesName = ((CoreAttributes)Attribute.GetCustomAttribute(typeof(QuickNES), typeof(CoreAttributes))).CoreName;
if (Global.MovieSession.Movie.Header[HeaderKeys.CORE] == quicknesName)
{
Global.Config.NES_InQuickNES = true;
var qs = new QuickNES.QuickNESSettings();
this._syncSettingsHack = qs;
}
else //Else assume Neshawk
{
var s = new Emulation.Cores.Nintendo.NES.NES.NESSyncSettings();
s.BoardProperties = new System.Collections.Generic.Dictionary<string, string>(Global.MovieSession.Movie.Header.BoardProperties);
this._syncSettingsHack = s;
}
}
else if (!record && Global.Emulator is Emulation.Cores.Consoles.Sega.gpgx.GPGX)
{