mirror of
https://github.com/dborth/snes9xgx.git
synced 2024-11-01 00:15:14 +01:00
delete existing cheats before loading new game, proper cheats init. avoids cheats from last game applied to next one.
This commit is contained in:
parent
93f2826d21
commit
f01152621d
@ -62,9 +62,7 @@ SetupCheats()
|
||||
{
|
||||
char filepath[1024];
|
||||
int offset = 0;
|
||||
|
||||
S9xInitCheatData ();
|
||||
S9xDeleteCheats ();
|
||||
uint16 i;
|
||||
|
||||
int method = GCSettings.SaveMethod;
|
||||
|
||||
@ -87,7 +85,7 @@ SetupCheats()
|
||||
if(NGCLoadCheatFile (offset))
|
||||
{
|
||||
// disable all cheats loaded from the file
|
||||
for (uint16 i = 0; i < Cheat.num_cheats; i++)
|
||||
for (i = 0; i < Cheat.num_cheats; i++)
|
||||
S9xDisableCheat(i);
|
||||
}
|
||||
}
|
||||
|
@ -474,6 +474,7 @@ int BrowserLoadFile(int method)
|
||||
StripExt(Memory.ROMFilename, browserList[browser.selIndex].filename);
|
||||
|
||||
SNESROMSize = 0;
|
||||
S9xDeleteCheats();
|
||||
|
||||
if(!inSz)
|
||||
{
|
||||
|
@ -170,11 +170,7 @@
|
||||
#include "apu.h"
|
||||
#include "dma.h"
|
||||
#include "sa1.h"
|
||||
|
||||
#ifndef NGC
|
||||
#include "cheats.h"
|
||||
#endif
|
||||
|
||||
#include "srtc.h"
|
||||
#include "sdd1.h"
|
||||
#include "spc7110.h"
|
||||
@ -313,9 +309,9 @@ void S9xReset (void)
|
||||
S9xSA1Init ();
|
||||
if (Settings.C4)
|
||||
S9xInitC4 ();
|
||||
#ifndef NGC
|
||||
|
||||
S9xInitCheatData ();
|
||||
#endif
|
||||
|
||||
if (Settings.OBC1)
|
||||
ResetOBC1();
|
||||
if (Settings.SuperFX)
|
||||
@ -359,9 +355,7 @@ void S9xSoftReset (void)
|
||||
if (Settings.C4)
|
||||
S9xInitC4 ();
|
||||
|
||||
#ifndef NGC
|
||||
S9xInitCheatData ();
|
||||
#endif
|
||||
|
||||
// Settings.Paused = FALSE;
|
||||
}
|
||||
|
@ -190,11 +190,10 @@
|
||||
#include "seta.h"
|
||||
#include "srtc.h"
|
||||
#include "bsx.h"
|
||||
|
||||
#include "cheats.h"
|
||||
|
||||
#ifndef NGC
|
||||
#include "reader.h"
|
||||
#include "cheats.h"
|
||||
#else
|
||||
#include <gccore.h>
|
||||
|
||||
@ -1006,8 +1005,8 @@ again:
|
||||
|
||||
InitROM();
|
||||
|
||||
#ifndef NGC
|
||||
S9xInitCheatData();
|
||||
#ifndef NGC
|
||||
S9xApplyCheats();
|
||||
#endif
|
||||
|
||||
@ -1231,8 +1230,8 @@ bool8 CMemory::LoadMultiCart (const char *cartA, const char *cartB)
|
||||
|
||||
InitROM();
|
||||
|
||||
#ifndef NGC
|
||||
S9xInitCheatData();
|
||||
#ifndef NGC
|
||||
S9xApplyCheats();
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user