mirror of
https://github.com/dborth/fceugx.git
synced 2024-11-01 06:55:05 +01:00
Clean file before loading
This commit is contained in:
parent
8603657b8b
commit
efd5bfa7b0
@ -87,6 +87,7 @@ bool SaveRAM (char * filepath, bool silent)
|
|||||||
|
|
||||||
if (goomba_is_sram(&tag))
|
if (goomba_is_sram(&tag))
|
||||||
{
|
{
|
||||||
|
goomba_cleanup(savebuffer);
|
||||||
|
|
||||||
// Look for just one save file. If there aren't any, or there is more than one, don't read any data.
|
// Look for just one save file. If there aren't any, or there is more than one, don't read any data.
|
||||||
stateheader* sh1 = NULL;
|
stateheader* sh1 = NULL;
|
||||||
@ -176,6 +177,8 @@ bool LoadRAM (char * filepath, bool silent)
|
|||||||
// Check to see if this is a PocketNES save file
|
// Check to see if this is a PocketNES save file
|
||||||
if (goomba_is_sram(savebuffer))
|
if (goomba_is_sram(savebuffer))
|
||||||
{
|
{
|
||||||
|
goomba_cleanup(savebuffer);
|
||||||
|
|
||||||
// Look for just one save file. If there aren't any, or there is more than one, don't read any data.
|
// Look for just one save file. If there aren't any, or there is more than one, don't read any data.
|
||||||
stateheader* sh1 = NULL;
|
stateheader* sh1 = NULL;
|
||||||
stateheader* sh2 = NULL;
|
stateheader* sh2 = NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user