Movies - fix bug where rerecord count value was getting added as a comment on load

This commit is contained in:
andres.delikat 2011-09-24 16:09:40 +00:00
parent 6a23ed18e1
commit edb40f4087
2 changed files with 10 additions and 9 deletions

View File

@ -1005,9 +1005,9 @@ namespace BizHawk.MultiClient
if ((game["NeedSuperSysCard"]) && game["SuperSysCard"] == false) if ((game["NeedSuperSysCard"]) && game["SuperSysCard"] == false)
MessageBox.Show("This game requires a version 3.0 System card and won't run with the system card you've selected. Try selecting a 3.0 System Card in Config->Paths->PC Engine."); MessageBox.Show("This game requires a version 3.0 System card and won't run with the system card you've selected. Try selecting a 3.0 System Card in Config->Paths->PC Engine.");
if (Global.Config.PceSpriteLimit) game.AddOption("ForceSpriteLimit"); if (Global.Config.PceSpriteLimit) game.AddOption("ForceSpriteLimit");
if (Global.Config.PceEqualizeVolume) game.AddOption("EqualizeVolumes"); if (Global.Config.PceEqualizeVolume) game.AddOption("EqualizeVolumes");
if (Global.Config.PceArcadeCardRewindHack) game.AddOption("ArcadeRewindHack"); if (Global.Config.PceArcadeCardRewindHack) game.AddOption("ArcadeRewindHack");
nextEmulator = new PCEngine(game, disc, rom.RomData); nextEmulator = new PCEngine(game, disc, rom.RomData);
break; break;
@ -1025,17 +1025,17 @@ namespace BizHawk.MultiClient
if (Global.Config.SmsEnableFM) game.AddOption("UseFM"); if (Global.Config.SmsEnableFM) game.AddOption("UseFM");
if (Global.Config.SmsAllowOverlock) game.AddOption("AllowOverclock"); if (Global.Config.SmsAllowOverlock) game.AddOption("AllowOverclock");
if (Global.Config.SmsForceStereoSeparation) game.AddOption("ForceStereo"); if (Global.Config.SmsForceStereoSeparation) game.AddOption("ForceStereo");
if (Global.Config.SmsSpriteLimit) game.AddOption("SpriteLimit"); if (Global.Config.SmsSpriteLimit) game.AddOption("SpriteLimit");
nextEmulator = new SMS(game, rom.RomData); nextEmulator = new SMS(game, rom.RomData);
break; break;
case "GG": case "GG":
if (Global.Config.SmsAllowOverlock) game.AddOption("AllowOverclock"); if (Global.Config.SmsAllowOverlock) game.AddOption("AllowOverclock");
if (Global.Config.SmsSpriteLimit) game.AddOption("SpriteLimit"); if (Global.Config.SmsSpriteLimit) game.AddOption("SpriteLimit");
nextEmulator = new SMS(game, rom.RomData); nextEmulator = new SMS(game, rom.RomData);
break; break;
case "PCE": case "PCE":
case "SGX": case "SGX":
if (Global.Config.PceSpriteLimit) game.AddOption("ForceSpriteLimit"); if (Global.Config.PceSpriteLimit) game.AddOption("ForceSpriteLimit");
nextEmulator = new PCEngine(game, rom.RomData); nextEmulator = new PCEngine(game, rom.RomData);
break; break;
case "GEN": case "GEN":

View File

@ -208,6 +208,7 @@ namespace BizHawk.MultiClient
using (StreamReader sr = file.OpenText()) using (StreamReader sr = file.OpenText())
{ {
string str = ""; string str = "";
string rerecordStr = "";
while ((str = sr.ReadLine()) != null) while ((str = sr.ReadLine()) != null)
{ {
@ -219,10 +220,10 @@ namespace BizHawk.MultiClient
if (str.Contains(MovieHeader.RERECORDS)) if (str.Contains(MovieHeader.RERECORDS))
{ {
str = ParseHeader(str, MovieHeader.RERECORDS); rerecordStr = ParseHeader(str, MovieHeader.RERECORDS);
try try
{ {
Rerecords = int.Parse(str); Rerecords = int.Parse(rerecordStr);
} }
catch catch
{ {