Cheats - implement removing of cheats for the NES core

This commit is contained in:
adelikat 2012-09-01 14:35:12 +00:00
parent e741aa2af0
commit 21cd754a7d
2 changed files with 15 additions and 3 deletions

View File

@ -65,7 +65,19 @@ namespace BizHawk.MultiClient
public void Disable()
{
enabled = false;
MemoryPulse.Remove(domain, address);
DisposeOfCheat();
}
public void DisposeOfCheat()
{
if (Global.Emulator is NES)
{
(Global.Emulator as NES).RemoveGameGenie(address);
}
else
{
MemoryPulse.Remove(domain, address);
}
}
public bool IsEnabled()
@ -75,7 +87,7 @@ namespace BizHawk.MultiClient
~Cheat()
{
MemoryPulse.Remove(domain, address);
DisposeOfCheat();
}
}
}

View File

@ -279,7 +279,7 @@ namespace BizHawk.MultiClient
public void Remove(Cheat c)
{
MemoryPulse.Remove(c.domain, c.address);
c.DisposeOfCheat();
cheatList.Remove(c);
Global.MainForm.UpdateCheatStatus();
}