mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-24 14:49:53 -06:00
properly report savestate-load failure
This commit is contained in:
@ -807,10 +807,7 @@ bool DoSavestate(Savestate* file)
|
||||
u32 console;
|
||||
file->Var32(&console);
|
||||
if (console != ConsoleType)
|
||||
{
|
||||
file->Error = true;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
file->VarArray(MainRAM, MainRAMMaxSize);
|
||||
|
@ -304,9 +304,17 @@ bool LoadState(std::string filename)
|
||||
failed = true;
|
||||
}
|
||||
|
||||
NDS::DoSavestate(state);
|
||||
bool res = NDS::DoSavestate(state);
|
||||
delete state;
|
||||
|
||||
if (!res)
|
||||
{
|
||||
failed = true;
|
||||
state = new Savestate("timewarp.mln", false);
|
||||
NDS::DoSavestate(state);
|
||||
delete state;
|
||||
}
|
||||
|
||||
if (failed) return false;
|
||||
|
||||
if (Config::SavestateRelocSRAM && NDSSave)
|
||||
|
Reference in New Issue
Block a user