Cheats: Fixed XML export code for custom codes - a compare value was always exported.

This commit is contained in:
Souryo 2016-12-14 17:16:55 -05:00
parent ee2898c328
commit fc24993836

View File

@ -30,7 +30,9 @@ namespace Mesen.GUI.Forms.Cheats
case CheatType.Custom:
writer.WriteElementString("address", "0x" + cheat.Address.ToString("X4"));
writer.WriteElementString("value", "0x" + cheat.Value.ToString("X2"));
writer.WriteElementString("compare", "0x" + cheat.CompareValue.ToString("X2"));
if(cheat.UseCompareValue) {
writer.WriteElementString("compare", "0x" + cheat.CompareValue.ToString("X2"));
}
if(!cheat.IsRelativeAddress) {
writer.WriteElementString("isPrgOffset", "true");
}