mirror of
https://github.com/dborth/snes9xgx.git
synced 2024-11-01 08:25:18 +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];
|
char filepath[1024];
|
||||||
int offset = 0;
|
int offset = 0;
|
||||||
|
uint16 i;
|
||||||
S9xInitCheatData ();
|
|
||||||
S9xDeleteCheats ();
|
|
||||||
|
|
||||||
int method = GCSettings.SaveMethod;
|
int method = GCSettings.SaveMethod;
|
||||||
|
|
||||||
@ -87,7 +85,7 @@ SetupCheats()
|
|||||||
if(NGCLoadCheatFile (offset))
|
if(NGCLoadCheatFile (offset))
|
||||||
{
|
{
|
||||||
// disable all cheats loaded from the file
|
// 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);
|
S9xDisableCheat(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -474,6 +474,7 @@ int BrowserLoadFile(int method)
|
|||||||
StripExt(Memory.ROMFilename, browserList[browser.selIndex].filename);
|
StripExt(Memory.ROMFilename, browserList[browser.selIndex].filename);
|
||||||
|
|
||||||
SNESROMSize = 0;
|
SNESROMSize = 0;
|
||||||
|
S9xDeleteCheats();
|
||||||
|
|
||||||
if(!inSz)
|
if(!inSz)
|
||||||
{
|
{
|
||||||
|
@ -170,11 +170,7 @@
|
|||||||
#include "apu.h"
|
#include "apu.h"
|
||||||
#include "dma.h"
|
#include "dma.h"
|
||||||
#include "sa1.h"
|
#include "sa1.h"
|
||||||
|
|
||||||
#ifndef NGC
|
|
||||||
#include "cheats.h"
|
#include "cheats.h"
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "srtc.h"
|
#include "srtc.h"
|
||||||
#include "sdd1.h"
|
#include "sdd1.h"
|
||||||
#include "spc7110.h"
|
#include "spc7110.h"
|
||||||
@ -313,9 +309,9 @@ void S9xReset (void)
|
|||||||
S9xSA1Init ();
|
S9xSA1Init ();
|
||||||
if (Settings.C4)
|
if (Settings.C4)
|
||||||
S9xInitC4 ();
|
S9xInitC4 ();
|
||||||
#ifndef NGC
|
|
||||||
S9xInitCheatData ();
|
S9xInitCheatData ();
|
||||||
#endif
|
|
||||||
if (Settings.OBC1)
|
if (Settings.OBC1)
|
||||||
ResetOBC1();
|
ResetOBC1();
|
||||||
if (Settings.SuperFX)
|
if (Settings.SuperFX)
|
||||||
@ -359,9 +355,7 @@ void S9xSoftReset (void)
|
|||||||
if (Settings.C4)
|
if (Settings.C4)
|
||||||
S9xInitC4 ();
|
S9xInitC4 ();
|
||||||
|
|
||||||
#ifndef NGC
|
|
||||||
S9xInitCheatData ();
|
S9xInitCheatData ();
|
||||||
#endif
|
|
||||||
|
|
||||||
// Settings.Paused = FALSE;
|
// Settings.Paused = FALSE;
|
||||||
}
|
}
|
||||||
|
@ -190,11 +190,10 @@
|
|||||||
#include "seta.h"
|
#include "seta.h"
|
||||||
#include "srtc.h"
|
#include "srtc.h"
|
||||||
#include "bsx.h"
|
#include "bsx.h"
|
||||||
|
#include "cheats.h"
|
||||||
|
|
||||||
#ifndef NGC
|
#ifndef NGC
|
||||||
#include "reader.h"
|
#include "reader.h"
|
||||||
#include "cheats.h"
|
|
||||||
#else
|
#else
|
||||||
#include <gccore.h>
|
#include <gccore.h>
|
||||||
|
|
||||||
@ -1006,8 +1005,8 @@ again:
|
|||||||
|
|
||||||
InitROM();
|
InitROM();
|
||||||
|
|
||||||
#ifndef NGC
|
|
||||||
S9xInitCheatData();
|
S9xInitCheatData();
|
||||||
|
#ifndef NGC
|
||||||
S9xApplyCheats();
|
S9xApplyCheats();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -1231,8 +1230,8 @@ bool8 CMemory::LoadMultiCart (const char *cartA, const char *cartB)
|
|||||||
|
|
||||||
InitROM();
|
InitROM();
|
||||||
|
|
||||||
#ifndef NGC
|
|
||||||
S9xInitCheatData();
|
S9xInitCheatData();
|
||||||
|
#ifndef NGC
|
||||||
S9xApplyCheats();
|
S9xApplyCheats();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user