Add temp hotfix for broken swsh saves

This commit is contained in:
Kurt 2019-11-15 21:33:23 -08:00
parent 848737b2a0
commit f0dfaa2e50

View File

@ -717,7 +717,19 @@ private static void StoreLegalSaveGameData(SaveFile sav)
private bool OpenSAV(SaveFile sav, string path)
{
if (sav == null || sav.Version == GameVersion.Invalid)
{ WinFormsUtil.Error(MsgFileLoadSaveLoadFail, path); return true; }
{
if (sav is SAV8SWSH z)
{
var shift = z.Game + (GameVersion.SW - GameVersion.SN);
if (shift == (int) GameVersion.SW || shift == (int) GameVersion.SH)
z.Game = shift;
}
else
{
WinFormsUtil.Error(MsgFileLoadSaveLoadFail, path);
return true;
}
}
sav.SetFileInfo(path);
if (!SanityCheckSAV(ref sav))