mem alloc for cheats

This commit is contained in:
dborth 2008-09-27 19:52:11 +00:00
parent d8b1c813e5
commit 4fe0babc74

View File

@ -26,7 +26,7 @@ extern SCheatData Cheat;
* Custom version of S9xLoadCheatFile() * Custom version of S9xLoadCheatFile()
***************************************************************************/ ***************************************************************************/
bool8 NGCLoadCheatFile (int length) bool NGCLoadCheatFile (int length)
{ {
Cheat.num_cheats = 0; Cheat.num_cheats = 0;
@ -50,7 +50,7 @@ bool8 NGCLoadCheatFile (int length)
} }
} }
return (TRUE); return true;
} }
/**************************************************************************** /****************************************************************************
@ -73,6 +73,8 @@ SetupCheats()
if(method == METHOD_AUTO) if(method == METHOD_AUTO)
method = autoSaveMethod(); method = autoSaveMethod();
AllocSaveBuffer();
if(method == METHOD_SD || method == METHOD_USB) if(method == METHOD_SD || method == METHOD_USB)
{ {
if(ChangeFATInterface(method, NOTSILENT)) if(ChangeFATInterface(method, NOTSILENT))
@ -97,4 +99,6 @@ SetupCheats()
S9xDisableCheat(i); S9xDisableCheat(i);
} }
} }
FreeSaveBuffer ();
} }