From f536002053a8ea3fe21351f9cc6e48aaeadddffa Mon Sep 17 00:00:00 2001 From: zeromus Date: Tue, 27 Jun 2017 16:20:04 -0500 Subject: [PATCH] ramwatch: print diffs as integers always, fixes spurious - display as well as what I assume is a combination of unwanted and illogical behaviour attempting to display it as the same format as the value --- BizHawk.Client.Common/tools/Watch/ByteWatch.cs | 2 +- BizHawk.Client.Common/tools/Watch/DwordWatch.cs | 2 +- BizHawk.Client.Common/tools/Watch/WordWatch.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/BizHawk.Client.Common/tools/Watch/ByteWatch.cs b/BizHawk.Client.Common/tools/Watch/ByteWatch.cs index a0810d878c..7d6c53738c 100644 --- a/BizHawk.Client.Common/tools/Watch/ByteWatch.cs +++ b/BizHawk.Client.Common/tools/Watch/ByteWatch.cs @@ -215,7 +215,7 @@ public override string Diff diff = "-"; } - return $"{diff}{FormatValue((byte)Math.Abs(diffVal))}"; + return $"{diff}{((byte)Math.Abs(diffVal))}"; } } diff --git a/BizHawk.Client.Common/tools/Watch/DwordWatch.cs b/BizHawk.Client.Common/tools/Watch/DwordWatch.cs index 7de03a1475..1e8c41f055 100644 --- a/BizHawk.Client.Common/tools/Watch/DwordWatch.cs +++ b/BizHawk.Client.Common/tools/Watch/DwordWatch.cs @@ -231,7 +231,7 @@ public string FormatValue(uint val) /// Get a string representation of difference /// between current value and the previous one /// - public override string Diff => FormatValue(_previous - _value); + public override string Diff => (_previous - _value).ToString(); /// /// Get the maximum possible value diff --git a/BizHawk.Client.Common/tools/Watch/WordWatch.cs b/BizHawk.Client.Common/tools/Watch/WordWatch.cs index acfad279f9..968e81e0f8 100644 --- a/BizHawk.Client.Common/tools/Watch/WordWatch.cs +++ b/BizHawk.Client.Common/tools/Watch/WordWatch.cs @@ -229,7 +229,7 @@ public override string Diff diff = "-"; } - return $"{diff}{FormatValue((ushort)Math.Abs(diffVal))}"; + return $"{diff}{((ushort)Math.Abs(diffVal))}"; } }