Fix major crash issue where NROM savestate data was erroneous if a non ROM game was loaded prior.

This commit is contained in:
adelikat 2009-03-14 15:37:13 +00:00
parent 5b7e825d1b
commit 6a6b297a45
2 changed files with 4 additions and 0 deletions

View File

@ -1,4 +1,5 @@
---version 2.0.4 yet to be released---
14-mar-2009 - adelikat - Fix major crash issue where NROM game savestates were writing erroneous information if a non NROM game was loaded prior
13-mar-2009 - adelikat - Closing game / Opening new game resets the frame counter
13-mar-2009 - adelikat - Win32 - Debugger - Scanlines and PPU Pixels are displayed even in vblank (lines 240-261)
12-mar-2009 - shinydoofy - sdl - fixed compilation error and reactivated the mouse pointer in the SDL window

View File

@ -743,6 +743,9 @@ void ResetExState(void (*PreSave)(void), void (*PostSave)(void))
if(SFMDATA[x].desc)
free(SFMDATA[x].desc);
}
// adelikat, 3/14/09: had to add this to clear out the size parameter. NROM(mapper 0) games were having savestate crashes if loaded after a non NROM game because the size variable was carrying over and causing savestates to save too much data
SFMDATA[0].s = 0;
SPreSave = PreSave;
SPostSave = PostSave;
SFEXINDEX=0;