fix a nondeterminism bug created by MasterRomInfoParams and roms being loaded in various orders without clearing out the params

This commit is contained in:
zeromus 2012-10-27 20:50:28 +00:00
parent 13e88c076d
commit 8ef2e53f86
2 changed files with 3 additions and 1 deletions

View File

@ -426,6 +426,9 @@ FCEUGI *FCEUI_LoadGameVirtual(const char *name, int OverwriteVidMode)
ResetGameLoaded();
//reset parameters so theyre cleared just in case a format's loader doesnt know to do the clearing
MasterRomInfoParams = TMasterRomInfoParams();
if (!AutosaveStatus)
AutosaveStatus = (int*)FCEU_dmalloc(sizeof(int)*AutosaveQty);
for (AutosaveIndex=0; AutosaveIndex<AutosaveQty; ++AutosaveIndex)

View File

@ -389,7 +389,6 @@ static void CheckHInfo(void)
CheckBad(partialmd5);
MasterRomInfo = NULL;
MasterRomInfoParams = TMasterRomInfoParams();
for(int i=0;i<ARRAY_SIZE(sMasterRomInfo);i++)
{
const TMasterRomInfo& info = sMasterRomInfo[i];