Prevent HWEvents from firing when setting cheats

This commit is contained in:
OV2 2012-03-27 16:40:34 +02:00
parent 9cc05b3c12
commit da4829ec90
1 changed files with 8 additions and 2 deletions

View File

@ -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;
}