mirror of
https://github.com/dborth/snes9xgx.git
synced 2025-02-17 11:56:25 +01:00
tidy up memcard code, freeze/pref/sram code
This commit is contained in:
parent
31691ff94f
commit
5356cf636c
@ -31,7 +31,6 @@
|
|||||||
#include "srtc.h"
|
#include "srtc.h"
|
||||||
|
|
||||||
#include "snes9xGX.h"
|
#include "snes9xGX.h"
|
||||||
#include "images/saveicon.h"
|
|
||||||
#include "freeze.h"
|
#include "freeze.h"
|
||||||
#include "fileop.h"
|
#include "fileop.h"
|
||||||
#include "filebrowser.h"
|
#include "filebrowser.h"
|
||||||
@ -139,7 +138,8 @@ NGCFreezeGame (char * filepath, int method, bool silent)
|
|||||||
S9xPrepareSoundForSnapshotSave (FALSE);
|
S9xPrepareSoundForSnapshotSave (FALSE);
|
||||||
|
|
||||||
AllocSaveBuffer ();
|
AllocSaveBuffer ();
|
||||||
NGCFreezeMemBuffer (); // copy freeze mem into savebuffer
|
// copy freeze mem into savebuffer - bufoffset contains # bytes written
|
||||||
|
NGCFreezeMemBuffer ();
|
||||||
woffset = bufoffset;
|
woffset = bufoffset;
|
||||||
|
|
||||||
S9xPrepareSoundForSnapshotSave (TRUE);
|
S9xPrepareSoundForSnapshotSave (TRUE);
|
||||||
@ -147,22 +147,16 @@ NGCFreezeGame (char * filepath, int method, bool silent)
|
|||||||
|
|
||||||
if(method == METHOD_MC_SLOTA || method == METHOD_MC_SLOTB) // MC Slot A or B
|
if(method == METHOD_MC_SLOTA || method == METHOD_MC_SLOTB) // MC Slot A or B
|
||||||
{
|
{
|
||||||
// Copy in save icon
|
// set freezecomment
|
||||||
woffset = sizeof (saveicon);
|
|
||||||
memcpy (savebuffer, saveicon, woffset);
|
|
||||||
|
|
||||||
// And the freezecomment
|
|
||||||
char freezecomment[2][32];
|
char freezecomment[2][32];
|
||||||
memset(freezecomment, 0, 64);
|
memset(freezecomment, 0, 64);
|
||||||
|
|
||||||
sprintf (freezecomment[0], "%s Snapshot", APPNAME);
|
sprintf (freezecomment[0], "%s Snapshot", APPNAME);
|
||||||
sprintf (freezecomment[1], Memory.ROMName);
|
sprintf (freezecomment[1], Memory.ROMName);
|
||||||
memcpy (savebuffer + woffset, freezecomment, 64);
|
SetMCSaveComment(freezecomment);
|
||||||
woffset += 64;
|
|
||||||
|
|
||||||
// Zip and copy in the freeze
|
// Zip and copy in the freeze
|
||||||
uLongf DestBuffSize = (uLongf) SAVEBUFFERSIZE;
|
uLongf DestBuffSize = (uLongf) SAVEBUFFERSIZE;
|
||||||
int err= compress2((Bytef*)(savebuffer+woffset+8), (uLongf*)&DestBuffSize, (const Bytef*)savebuffer, (uLongf)bufoffset, Z_BEST_COMPRESSION);
|
int err= compress2((Bytef*)(savebuffer+8), (uLongf*)&DestBuffSize, (const Bytef*)savebuffer, (uLongf)bufoffset, Z_BEST_COMPRESSION);
|
||||||
|
|
||||||
if(err!=Z_OK)
|
if(err!=Z_OK)
|
||||||
{
|
{
|
||||||
@ -172,14 +166,11 @@ NGCFreezeGame (char * filepath, int method, bool silent)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int zippedsize = (int)DestBuffSize;
|
int zippedsize = (int)DestBuffSize;
|
||||||
memcpy (savebuffer + woffset, &zippedsize, 4);
|
|
||||||
woffset += 4;
|
|
||||||
|
|
||||||
int decompressedsize = (int)bufoffset;
|
int decompressedsize = (int)bufoffset;
|
||||||
memcpy (savebuffer + woffset, &decompressedsize, 4);
|
memcpy (savebuffer, &zippedsize, 4);
|
||||||
woffset += 4;
|
memcpy (savebuffer+4, &decompressedsize, 4);
|
||||||
|
|
||||||
woffset += zippedsize;
|
woffset = zippedsize + 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
offset = SaveFile(filepath, woffset, method, silent);
|
offset = SaveFile(filepath, woffset, method, silent);
|
||||||
@ -304,20 +295,13 @@ NGCUnfreezeGame (char * filepath, int method, bool silent)
|
|||||||
{
|
{
|
||||||
char * zipbuffer = (char *)memalign(32, SAVEBUFFERSIZE);
|
char * zipbuffer = (char *)memalign(32, SAVEBUFFERSIZE);
|
||||||
memset (zipbuffer, 0, SAVEBUFFERSIZE);
|
memset (zipbuffer, 0, SAVEBUFFERSIZE);
|
||||||
|
|
||||||
// skip the saveicon and comment
|
|
||||||
offset = (sizeof(saveicon) + 64);
|
|
||||||
uLongf zipsize = 0;
|
uLongf zipsize = 0;
|
||||||
uLongf decompressedsize = 0;
|
uLongf decompressedsize = 0;
|
||||||
|
|
||||||
memcpy (&zipsize, savebuffer+offset, 4);
|
|
||||||
offset += 4;
|
|
||||||
|
|
||||||
memcpy (&decompressedsize, savebuffer+offset, 4);
|
|
||||||
offset += 4;
|
|
||||||
|
|
||||||
uLongf DestBuffSize = SAVEBUFFERSIZE;
|
uLongf DestBuffSize = SAVEBUFFERSIZE;
|
||||||
int err= uncompress((Bytef*)zipbuffer, (uLongf*)&DestBuffSize, (const Bytef*)(savebuffer + offset), zipsize);
|
memcpy (&zipsize, savebuffer, 4);
|
||||||
|
memcpy (&decompressedsize, savebuffer+4, 4);
|
||||||
|
|
||||||
|
int err= uncompress((Bytef*)zipbuffer, (uLongf*)&DestBuffSize, (const Bytef*)(savebuffer+8), zipsize);
|
||||||
|
|
||||||
if ( err!=Z_OK )
|
if ( err!=Z_OK )
|
||||||
{
|
{
|
||||||
|
@ -24,8 +24,10 @@
|
|||||||
#include "filebrowser.h"
|
#include "filebrowser.h"
|
||||||
#include "fileop.h"
|
#include "fileop.h"
|
||||||
#include "dvd.h"
|
#include "dvd.h"
|
||||||
|
#include "images/saveicon.h"
|
||||||
|
|
||||||
static u8 * SysArea = NULL;
|
static u8 * SysArea = NULL;
|
||||||
|
static char savecomments[2][32];
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* MountMC
|
* MountMC
|
||||||
@ -268,6 +270,10 @@ LoadMCFile (char *buf, int slot, char *filename, bool silent)
|
|||||||
CARD_Unmount(slot);
|
CARD_Unmount(slot);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// discard save icon and comments
|
||||||
|
memmove(buf, buf+sizeof(saveicon)+64, bytesread);
|
||||||
|
bytesread -= (sizeof(saveicon)+64);
|
||||||
|
|
||||||
free(SysArea);
|
free(SysArea);
|
||||||
return bytesread;
|
return bytesread;
|
||||||
}
|
}
|
||||||
@ -290,6 +296,12 @@ SaveMCFile (char *buf, int slot, char *filename, int datasize, bool silent)
|
|||||||
if(datasize <= 0)
|
if(datasize <= 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
// add save icon and comments
|
||||||
|
memmove(buf+sizeof(saveicon)+64, buf, datasize);
|
||||||
|
memcpy(buf, saveicon, sizeof(saveicon));
|
||||||
|
memcpy(buf+sizeof(saveicon), savecomments, 64);
|
||||||
|
datasize += (sizeof(saveicon)+64);
|
||||||
|
|
||||||
// Try to mount the card
|
// Try to mount the card
|
||||||
CardError = MountMC(slot, NOTSILENT);
|
CardError = MountMC(slot, NOTSILENT);
|
||||||
|
|
||||||
@ -373,3 +385,8 @@ done:
|
|||||||
free(SysArea);
|
free(SysArea);
|
||||||
return byteswritten;
|
return byteswritten;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SetMCSaveComments(char * comments)
|
||||||
|
{
|
||||||
|
memcpy(savecomments, comments, 64);
|
||||||
|
}
|
||||||
|
@ -17,5 +17,6 @@ int ParseMCDirectory (int slot);
|
|||||||
int LoadMCFile (char *buf, int slot, char *filename, bool silent);
|
int LoadMCFile (char *buf, int slot, char *filename, bool silent);
|
||||||
int SaveMCFile (char *buf, int slot, char *filename, int datasize, bool silent);
|
int SaveMCFile (char *buf, int slot, char *filename, int datasize, bool silent);
|
||||||
bool TestMC(int slot, bool silent);
|
bool TestMC(int slot, bool silent);
|
||||||
|
void SetMCSaveComments(char * comments);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -16,7 +16,6 @@
|
|||||||
|
|
||||||
#include "snes9xGX.h"
|
#include "snes9xGX.h"
|
||||||
#include "s9xconfig.h"
|
#include "s9xconfig.h"
|
||||||
#include "images/saveicon.h"
|
|
||||||
#include "menu.h"
|
#include "menu.h"
|
||||||
#include "memcardop.h"
|
#include "memcardop.h"
|
||||||
#include "fileop.h"
|
#include "fileop.h"
|
||||||
@ -109,31 +108,12 @@ static const char * XMLSaveCallback(mxml_node_t *node, int where)
|
|||||||
static int
|
static int
|
||||||
preparePrefsData (int method)
|
preparePrefsData (int method)
|
||||||
{
|
{
|
||||||
int offset = 0;
|
|
||||||
|
|
||||||
// add save icon and comments for Memory Card saves
|
|
||||||
if(method == METHOD_MC_SLOTA || method == METHOD_MC_SLOTB)
|
|
||||||
{
|
|
||||||
offset = sizeof (saveicon);
|
|
||||||
|
|
||||||
// Copy in save icon
|
|
||||||
memcpy (savebuffer, saveicon, offset);
|
|
||||||
|
|
||||||
// And the comments
|
|
||||||
char prefscomment[2][32];
|
|
||||||
memset(prefscomment, 0, 64);
|
|
||||||
sprintf (prefscomment[0], "%s Prefs", APPNAME);
|
|
||||||
sprintf (prefscomment[1], "Preferences");
|
|
||||||
memcpy (savebuffer + offset, prefscomment, 64);
|
|
||||||
offset += 64;
|
|
||||||
}
|
|
||||||
|
|
||||||
xml = mxmlNewXML("1.0");
|
xml = mxmlNewXML("1.0");
|
||||||
mxmlSetWrapMargin(0); // disable line wrapping
|
mxmlSetWrapMargin(0); // disable line wrapping
|
||||||
|
|
||||||
data = mxmlNewElement(xml, "file");
|
data = mxmlNewElement(xml, "file");
|
||||||
mxmlElementSetAttr(data, "app",APPNAME);
|
mxmlElementSetAttr(data, "app", APPNAME);
|
||||||
mxmlElementSetAttr(data, "version",APPVERSION);
|
mxmlElementSetAttr(data, "version", APPVERSION);
|
||||||
|
|
||||||
createXMLSection("File", "File Settings");
|
createXMLSection("File", "File Settings");
|
||||||
|
|
||||||
@ -184,11 +164,11 @@ preparePrefsData (int method)
|
|||||||
createXMLController(btnmap[CTRL_JUST][CTRLR_GCPAD], "btnmap_just_gcpad", "Justifier - GameCube Controller");
|
createXMLController(btnmap[CTRL_JUST][CTRLR_GCPAD], "btnmap_just_gcpad", "Justifier - GameCube Controller");
|
||||||
createXMLController(btnmap[CTRL_JUST][CTRLR_WIIMOTE], "btnmap_just_wiimote", "Justifier - Wiimote");
|
createXMLController(btnmap[CTRL_JUST][CTRLR_WIIMOTE], "btnmap_just_wiimote", "Justifier - Wiimote");
|
||||||
|
|
||||||
int datasize = mxmlSaveString(xml, (char *)savebuffer+offset, (SAVEBUFFERSIZE-offset), XMLSaveCallback);
|
int datasize = mxmlSaveString(xml, (char *)savebuffer, SAVEBUFFERSIZE, XMLSaveCallback);
|
||||||
|
|
||||||
mxmlDelete(xml);
|
mxmlDelete(xml);
|
||||||
|
|
||||||
return datasize+offset;
|
return datasize;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
@ -264,16 +244,8 @@ static bool
|
|||||||
decodePrefsData (int method)
|
decodePrefsData (int method)
|
||||||
{
|
{
|
||||||
bool result = false;
|
bool result = false;
|
||||||
int offset = 0;
|
|
||||||
|
|
||||||
// skip save icon and comments for Memory Card saves
|
xml = mxmlLoadString(NULL, (char *)savebuffer, MXML_TEXT_CALLBACK);
|
||||||
if(method == METHOD_MC_SLOTA || method == METHOD_MC_SLOTB)
|
|
||||||
{
|
|
||||||
offset = sizeof (saveicon);
|
|
||||||
offset += 64; // sizeof comment
|
|
||||||
}
|
|
||||||
|
|
||||||
xml = mxmlLoadString(NULL, (char *)savebuffer+offset, MXML_TEXT_CALLBACK);
|
|
||||||
|
|
||||||
if(xml)
|
if(xml)
|
||||||
{
|
{
|
||||||
@ -374,6 +346,16 @@ SavePrefs (bool silent)
|
|||||||
AllocSaveBuffer ();
|
AllocSaveBuffer ();
|
||||||
datasize = preparePrefsData (method);
|
datasize = preparePrefsData (method);
|
||||||
|
|
||||||
|
if(method == METHOD_MC_SLOTA || method == METHOD_MC_SLOTB)
|
||||||
|
{
|
||||||
|
// Set the comments
|
||||||
|
char prefscomment[2][32];
|
||||||
|
memset(prefscomment, 0, 64);
|
||||||
|
sprintf (prefscomment[0], "%s Prefs", APPNAME);
|
||||||
|
sprintf (prefscomment[1], "Preferences");
|
||||||
|
SetMCSaveComments(prefscomment);
|
||||||
|
}
|
||||||
|
|
||||||
offset = SaveFile(filepath, datasize, method, silent);
|
offset = SaveFile(filepath, datasize, method, silent);
|
||||||
|
|
||||||
FreeSaveBuffer ();
|
FreeSaveBuffer ();
|
||||||
|
@ -20,120 +20,11 @@
|
|||||||
#include "srtc.h"
|
#include "srtc.h"
|
||||||
|
|
||||||
#include "snes9xGX.h"
|
#include "snes9xGX.h"
|
||||||
#include "images/saveicon.h"
|
|
||||||
#include "menu.h"
|
#include "menu.h"
|
||||||
#include "fileop.h"
|
#include "fileop.h"
|
||||||
#include "filebrowser.h"
|
#include "filebrowser.h"
|
||||||
#include "input.h"
|
#include "input.h"
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Prepare SRAM Save Data
|
|
||||||
*
|
|
||||||
* This sets up the savebuffer for saving in a format compatible with
|
|
||||||
* snes9x on other platforms.
|
|
||||||
***************************************************************************/
|
|
||||||
static int
|
|
||||||
preparesavedata (int method)
|
|
||||||
{
|
|
||||||
int offset = 0;
|
|
||||||
int size;
|
|
||||||
|
|
||||||
if(method == METHOD_MC_SLOTA || method == METHOD_MC_SLOTB)
|
|
||||||
{
|
|
||||||
// Copy in save icon
|
|
||||||
memcpy (savebuffer, saveicon, sizeof(saveicon));
|
|
||||||
offset += sizeof (saveicon);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Copy in the sramcomments
|
|
||||||
char sramcomment[2][32];
|
|
||||||
memset(sramcomment, 0, 64);
|
|
||||||
sprintf (sramcomment[0], "%s SRAM", APPNAME);
|
|
||||||
sprintf (sramcomment[1], Memory.ROMName);
|
|
||||||
memcpy (savebuffer + offset, sramcomment, 64);
|
|
||||||
offset += 64;
|
|
||||||
|
|
||||||
if(method != METHOD_MC_SLOTA && method != METHOD_MC_SLOTB)
|
|
||||||
{
|
|
||||||
// make it a 512 byte header so it is compatible with other platforms
|
|
||||||
if (offset <= 512)
|
|
||||||
offset = 512;
|
|
||||||
// header was longer than 512 bytes - hopefully this never happens!
|
|
||||||
else
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Copy in the SRAM
|
|
||||||
size = Memory.SRAMSize ? (1 << (Memory.SRAMSize + 3)) * 128 : 0;
|
|
||||||
|
|
||||||
if (size > 0x20000)
|
|
||||||
size = 0x20000;
|
|
||||||
|
|
||||||
if (size != 0)
|
|
||||||
{
|
|
||||||
memcpy (savebuffer + offset, Memory.SRAM, size);
|
|
||||||
offset += size;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
offset = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
return offset;
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Decode Save Data
|
|
||||||
***************************************************************************/
|
|
||||||
static void
|
|
||||||
decodesavedata (int method, int readsize)
|
|
||||||
{
|
|
||||||
int offset = 0;
|
|
||||||
char sramsavecomment[32];
|
|
||||||
|
|
||||||
int size = Memory.SRAMSize ? (1 << (Memory.SRAMSize + 3)) * 128 : 0;
|
|
||||||
|
|
||||||
if (size > 0x20000)
|
|
||||||
size = 0x20000;
|
|
||||||
|
|
||||||
// memory card save
|
|
||||||
if(method == METHOD_MC_SLOTA || method == METHOD_MC_SLOTB)
|
|
||||||
offset = sizeof (saveicon); // skip save icon
|
|
||||||
|
|
||||||
// Check for sram comment
|
|
||||||
memcpy (sramsavecomment, savebuffer+offset, 32);
|
|
||||||
|
|
||||||
// Snes9x GX save found!
|
|
||||||
if ( (strncmp (sramsavecomment, "Snes9x GX", 9) == 0) )
|
|
||||||
{
|
|
||||||
// adjust offset
|
|
||||||
if(method != METHOD_MC_SLOTA && method != METHOD_MC_SLOTB)
|
|
||||||
offset = 512; // skip entire 512 byte header
|
|
||||||
else
|
|
||||||
offset += 64; // skip savecomments
|
|
||||||
|
|
||||||
// import the SRAM
|
|
||||||
memcpy (Memory.SRAM, savebuffer + offset, size);
|
|
||||||
}
|
|
||||||
// check for SRAM from other version/platform of snes9x
|
|
||||||
else if (readsize == size || readsize == size + SRTC_SRAM_PAD)
|
|
||||||
{
|
|
||||||
// SRAM data should be at the start of the file, just import it and
|
|
||||||
// ignore anything after the SRAM
|
|
||||||
memcpy (Memory.SRAM, savebuffer, size);
|
|
||||||
}
|
|
||||||
else if (readsize == size + 512)
|
|
||||||
{
|
|
||||||
// SRAM has a 512 byte header - remove it, then import the SRAM,
|
|
||||||
// ignoring anything after the SRAM
|
|
||||||
memcpy(Memory.SRAM, savebuffer+512, size);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ErrorPrompt("Incompatible SRAM save!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Load SRAM
|
* Load SRAM
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
@ -154,7 +45,28 @@ LoadSRAM (char * filepath, int method, bool silent)
|
|||||||
|
|
||||||
if (offset > 0)
|
if (offset > 0)
|
||||||
{
|
{
|
||||||
decodesavedata (method, offset);
|
int size = Memory.SRAMSize ? (1 << (Memory.SRAMSize + 3)) * 128 : 0;
|
||||||
|
|
||||||
|
if (size > 0x20000)
|
||||||
|
size = 0x20000;
|
||||||
|
|
||||||
|
if (readsize == size + 512 || readsize == size + 512 + SRTC_SRAM_PAD)
|
||||||
|
{
|
||||||
|
// SRAM has a 512 byte header - remove it, then import the SRAM,
|
||||||
|
// ignoring anything after the SRAM
|
||||||
|
memcpy(Memory.SRAM, savebuffer+512, size);
|
||||||
|
}
|
||||||
|
else if (readsize == size || readsize == size + SRTC_SRAM_PAD)
|
||||||
|
{
|
||||||
|
// SRAM data should be at the start of the file, just import it and
|
||||||
|
// ignore anything after the SRAM
|
||||||
|
memcpy (Memory.SRAM, savebuffer, size);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ErrorPrompt("Incompatible SRAM save!");
|
||||||
|
}
|
||||||
|
|
||||||
S9xSoftReset();
|
S9xSoftReset();
|
||||||
FreeSaveBuffer ();
|
FreeSaveBuffer ();
|
||||||
return true;
|
return true;
|
||||||
@ -195,7 +107,6 @@ bool
|
|||||||
SaveSRAM (char * filepath, int method, bool silent)
|
SaveSRAM (char * filepath, int method, bool silent)
|
||||||
{
|
{
|
||||||
bool retval = false;
|
bool retval = false;
|
||||||
int datasize;
|
|
||||||
int offset = 0;
|
int offset = 0;
|
||||||
|
|
||||||
if(method == METHOD_AUTO)
|
if(method == METHOD_AUTO)
|
||||||
@ -204,13 +115,29 @@ SaveSRAM (char * filepath, int method, bool silent)
|
|||||||
if(method == METHOD_AUTO)
|
if(method == METHOD_AUTO)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
AllocSaveBuffer ();
|
// determine SRAM size
|
||||||
|
int size = Memory.SRAMSize ? (1 << (Memory.SRAMSize + 3)) * 128 : 0;
|
||||||
|
|
||||||
datasize = preparesavedata (method);
|
if (size > 0x20000)
|
||||||
|
size = 0x20000;
|
||||||
|
|
||||||
if (datasize)
|
if (size > 0)
|
||||||
{
|
{
|
||||||
offset = SaveFile(filepath, datasize, method, silent);
|
if(method == METHOD_MC_SLOTA || method == METHOD_MC_SLOTB)
|
||||||
|
{
|
||||||
|
// Set the sramcomments
|
||||||
|
char sramcomment[2][32];
|
||||||
|
memset(sramcomment, 0, 64);
|
||||||
|
sprintf (sramcomment[0], "%s SRAM", APPNAME);
|
||||||
|
sprintf (sramcomment[1], Memory.ROMName);
|
||||||
|
SetMCSaveComments(sramcomment);
|
||||||
|
}
|
||||||
|
|
||||||
|
AllocSaveBuffer ();
|
||||||
|
// copy in the SRAM, leaving a 512 byte header (for compatibility with other platforms)
|
||||||
|
memcpy(savebuffer+512, Memory.SRAM, size);
|
||||||
|
offset = SaveFile(filepath, size+512, method, silent);
|
||||||
|
FreeSaveBuffer ();
|
||||||
|
|
||||||
if (offset > 0)
|
if (offset > 0)
|
||||||
{
|
{
|
||||||
@ -224,8 +151,6 @@ SaveSRAM (char * filepath, int method, bool silent)
|
|||||||
if(!silent)
|
if(!silent)
|
||||||
ErrorPrompt("No SRAM data to save!");
|
ErrorPrompt("No SRAM data to save!");
|
||||||
}
|
}
|
||||||
|
|
||||||
FreeSaveBuffer ();
|
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user