Fix ROM name displayed if save doesn't exist.

Fixes #1184
This commit is contained in:
Frank-74 2016-11-22 19:22:29 +00:00 committed by GitHub
parent 25a5784623
commit c727365afe
1 changed files with 12 additions and 0 deletions

View File

@ -1674,6 +1674,7 @@ bool CN64System::LoadState()
return true; return true;
} }
} }
CPath NewFileName = FileName;
//Use old file Name //Use old file Name
if (g_Settings->LoadDword(Game_CurrentSaveState) != 0) if (g_Settings->LoadDword(Game_CurrentSaveState) != 0)
@ -1686,6 +1687,17 @@ bool CN64System::LoadState()
} }
bool Result = LoadState(FileName); bool Result = LoadState(FileName);
WriteTrace(TraceN64System, TraceDebug, "Done (res: %s)", Result ? "True" : "False"); WriteTrace(TraceN64System, TraceDebug, "Done (res: %s)", Result ? "True" : "False");
if (Result == false)
{
if (g_Settings->LoadDword(Setting_AutoZipInstantSave))
{
Result = LoadState(ZipFileName);
}
else
{
Result = LoadState(NewFileName);
}
}
return Result; return Result;
} }