make multihawk compile, not sure what happened here, maybe a bad merge?

This commit is contained in:
adelikat 2016-11-13 11:01:27 -06:00
parent be93e78dd5
commit 20fb060c65
1 changed files with 28 additions and 27 deletions

View File

@ -65,45 +65,46 @@ namespace BizHawk.Client.MultiHawk
// we could background thread this later instead if we wanted to be real clever // we could background thread this later instead if we wanted to be real clever
NES.BootGodDB.GetDatabaseBytes = () => NES.BootGodDB.GetDatabaseBytes = () =>
{ {
string xmlPath = Path.Combine( PathManager.GetExeDirectoryAbsolute(), "gamedb", "NesCarts.xml" ); string xmlPath = Path.Combine(PathManager.GetExeDirectoryAbsolute(), "gamedb", "NesCarts.xml");
string x7zPath = Path.Combine( PathManager.GetExeDirectoryAbsolute(), "gamedb", "NesCarts.7z" ); string x7zPath = Path.Combine(PathManager.GetExeDirectoryAbsolute(), "gamedb", "NesCarts.7z");
bool loadXml = File.Exists( xmlPath ); bool loadXml = File.Exists(xmlPath);
using ( var NesCartFile = new HawkFile( loadXml ? xmlPath : x7zPath ) ) using (var NesCartFile = new HawkFile(loadXml ? xmlPath : x7zPath))
{ {
if ( !loadXml ) { NesCartFile.BindFirst(); } if (!loadXml) { NesCartFile.BindFirst(); }
return NesCartFile return NesCartFile
.GetStream() .GetStream()
.ReadAllBytes(); .ReadAllBytes();
}; };
Database.LoadDatabase(Path.Combine(PathManager.GetExeDirectoryAbsolute(), "gamedb", "gamedb.txt")); Database.LoadDatabase(Path.Combine(PathManager.GetExeDirectoryAbsolute(), "gamedb", "gamedb.txt"));
Input.Initialize(this.Handle); Input.Initialize(this.Handle);
InitControls(); InitControls();
// TODO // TODO
//CoreFileProvider.SyncCoreCommInputSignals(); //CoreFileProvider.SyncCoreCommInputSignals();
Global.ActiveController = new Controller(NullEmulator.NullController); Global.ActiveController = new Controller(NullEmulator.NullController);
Global.AutoFireController = Global.AutofireNullControls; Global.AutoFireController = Global.AutofireNullControls;
Global.AutofireStickyXORAdapter.SetOnOffPatternFromConfig(); Global.AutofireStickyXORAdapter.SetOnOffPatternFromConfig();
Closing += (o, e) => Closing += (o, e) =>
{
Global.MovieSession.Movie.Stop();
foreach (var ew in EmulatorWindows.ToList())
{ {
ew.ShutDown(); Global.MovieSession.Movie.Stop();
foreach (var ew in EmulatorWindows.ToList())
{
ew.ShutDown();
}
SaveConfig();
};
if (Global.Config.MainWndx != -1 && Global.Config.MainWndy != -1 && Global.Config.SaveWindowPosition)
{
Location = new Point(Global.Config.MainWndx, Global.Config.MainWndy);
} }
SaveConfig();
}; };
if (Global.Config.MainWndx != -1 && Global.Config.MainWndy != -1 && Global.Config.SaveWindowPosition)
{
Location = new Point(Global.Config.MainWndx, Global.Config.MainWndy);
}
} }
private static bool StateErrorAskUser(string title, string message) private static bool StateErrorAskUser(string title, string message)