public Cartridge InitAndStartCartridge(string filename)
{
// Boot Time: inits the cartridge and process position.
Cartridge cart = new Cartridge(filename);
try
{
using (IsolatedStorageFileStream fs = IsolatedStorageFile.GetUserStoreForApplication().OpenFile(cart.Filename, System.IO.FileMode.Open, System.IO.FileAccess.Read))
{
Init(fs, cart);
}
// Adds info about the cartridge to the crash reporter.
Geowigo.Utils.DebugUtils.AddBugSenseCrashExtraData(cart);
ApplySensorData();
// Run Time: the game starts.
Start();
// TEMP DEBUG
ApplySensorData();
}
catch (Exception)
{
lock (_SyncRoot)
{
_IsInCrash = true;
}
throw;
}
return cart;
}