Cheats - fix the adding of a cheat from another dialog (Ram Watch/Search, Hex Editor, etc)

This commit is contained in:
andres.delikat 2011-08-06 19:49:21 +00:00
parent d69abc909d
commit 9826e26a4b
2 changed files with 7 additions and 3 deletions

View File

@ -27,6 +27,9 @@ namespace BizHawk.MultiClient
value = c.value;
enabled = c.enabled;
domain = c.domain;
if (enabled)
MemoryPulse.Add(domain, address, value);
}
public Cheat(string cname, int addr, byte val, bool e, MemoryDomain d)
@ -36,18 +39,20 @@ namespace BizHawk.MultiClient
value = val;
enabled = e;
domain = d;
if (enabled)
MemoryPulse.Add(domain, address, value);
}
public void Enable()
{
enabled = true;
MemoryPulse.Add(domain, address, value);
MemoryPulse.Add(domain, address, value);
}
public void Disable()
{
enabled = false;
MemoryPulse.Remove(domain, address);
MemoryPulse.Remove(domain, address);
}
public bool IsEnabled()

View File

@ -14,7 +14,6 @@ namespace BizHawk.MultiClient
public partial class Cheats : Form
{
//Implement Freeze functions in all memory domains
//Restore Window Size should restore column order as well
//context menu - enable/disable highlight dependent items
int defaultWidth; //For saving the default size of the dialog, so the user can restore if desired