mirror of https://github.com/snes9xgit/snes9x.git
Prevent HWEvents from firing when setting cheats
This commit is contained in:
parent
9cc05b3c12
commit
da4829ec90
10
cheats2.cpp
10
cheats2.cpp
|
@ -186,10 +186,13 @@ static void S9xSetByteFree (uint8, uint32);
|
||||||
|
|
||||||
static uint8 S9xGetByteFree (uint32 address)
|
static uint8 S9xGetByteFree (uint32 address)
|
||||||
{
|
{
|
||||||
uint32 Cycles = CPU.Cycles;
|
int32 Cycles = CPU.Cycles;
|
||||||
|
int32 NextEvent = CPU.NextEvent;
|
||||||
uint8 byte;
|
uint8 byte;
|
||||||
|
|
||||||
|
CPU.NextEvent = 0x7FFFFFFF;
|
||||||
byte = S9xGetByte(address);
|
byte = S9xGetByte(address);
|
||||||
|
CPU.NextEvent = NextEvent;
|
||||||
CPU.Cycles = Cycles;
|
CPU.Cycles = Cycles;
|
||||||
|
|
||||||
return (byte);
|
return (byte);
|
||||||
|
@ -197,9 +200,12 @@ static uint8 S9xGetByteFree (uint32 address)
|
||||||
|
|
||||||
static void S9xSetByteFree (uint8 byte, uint32 address)
|
static void S9xSetByteFree (uint8 byte, uint32 address)
|
||||||
{
|
{
|
||||||
uint32 Cycles = CPU.Cycles;
|
int32 Cycles = CPU.Cycles;
|
||||||
|
int32 NextEvent = CPU.NextEvent;
|
||||||
|
|
||||||
|
CPU.NextEvent = 0x7FFFFFFF;
|
||||||
S9xSetByte(byte, address);
|
S9xSetByte(byte, address);
|
||||||
|
CPU.NextEvent = NextEvent;
|
||||||
CPU.Cycles = Cycles;
|
CPU.Cycles = Cycles;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue