MCPcopy Create free account
hub / github.com/TASEmulators/fceux / ResetExState

Function ResetExState

src/state.cpp:855–869  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

853}
854
855void ResetExState(void (*PreSave)(void), void (*PostSave)(void))
856{
857 int x;
858 for(x=0;x<SFEXINDEX;x++)
859 {
860 if(SFMDATA[x].desc)
861 FCEU_free( (void*)SFMDATA[x].desc);
862 }
863 // 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
864 SFMDATA[0].s = 0;
865
866 SPreSave = PreSave;
867 SPostSave = PostSave;
868 SFEXINDEX=0;
869}
870
871void AddExState(void *v, uint32 s, int type, const char *desc)
872{

Callers 4

FCEU_CloseGameFunction · 0.85
FDSLoadFunction · 0.85
UNIFLoadFunction · 0.85
iNESLoadFunction · 0.85

Calls 1

FCEU_freeFunction · 0.85

Tested by

no test coverage detected