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)
|
||||
{
|
||||
uint32 Cycles = CPU.Cycles;
|
||||
int32 Cycles = CPU.Cycles;
|
||||
int32 NextEvent = CPU.NextEvent;
|
||||
uint8 byte;
|
||||
|
||||
CPU.NextEvent = 0x7FFFFFFF;
|
||||
byte = S9xGetByte(address);
|
||||
CPU.NextEvent = NextEvent;
|
||||
CPU.Cycles = Cycles;
|
||||
|
||||
return (byte);
|
||||
|
@ -197,9 +200,12 @@ static uint8 S9xGetByteFree (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);
|
||||
CPU.NextEvent = NextEvent;
|
||||
CPU.Cycles = Cycles;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue