diff --git a/BizHawk.MultiClient/tools/RamSearch.cs b/BizHawk.MultiClient/tools/RamSearch.cs index 269a6d578a..eeb759eeac 100644 --- a/BizHawk.MultiClient/tools/RamSearch.cs +++ b/BizHawk.MultiClient/tools/RamSearch.cs @@ -575,25 +575,7 @@ namespace BizHawk.MultiClient } if (column == 1) { - if (searchList[index].signed == asigned.UNSIGNED) - text = searchList[index].value.ToString(); - else if (searchList[index].signed == asigned.SIGNED) - text = ((sbyte)searchList[index].value).ToString(); - else if (searchList[index].signed == asigned.HEX) - { - switch (searchList[index].type) - { - case atype.BYTE: - text = String.Format("{0:X2}", searchList[index].value); - break; - case atype.WORD: - text = String.Format("{0:X4}", searchList[index].value); - break; - case atype.DWORD: - text = String.Format("{0:X8}", searchList[index].value); - break; - } - } + text = searchList[index].ValueToString(); } if (column == 2) { @@ -615,33 +597,11 @@ namespace BizHawk.MultiClient { if (Global.Config.RamSearchPreviousAs == 2) //If prev frame { - switch (searchList[index].type) - { - case atype.BYTE: - text = String.Format("{0:X2}", searchList[index].prev); - break; - case atype.WORD: - text = String.Format("{0:X4}", searchList[index].prev); - break; - case atype.DWORD: - text = String.Format("{0:X8}", searchList[index].prev); - break; - } + text = searchList[index].PrevToString(); } else { - switch (searchList[index].type) - { - case atype.BYTE: - text = String.Format("{0:X2}", prevList[index].value); - break; - case atype.WORD: - text = String.Format("{0:X4}", prevList[index].value); - break; - case atype.DWORD: - text = String.Format("{0:X8}", prevList[index].value); - break; - } + text = prevList[index].ValueToString(); } } }