Skip to content

Commit

Permalink
ramwatch: print diffs as integers always, fixes spurious - display as…
Browse files Browse the repository at this point in the history
… well as what I assume is a combination of unwanted and illogical behaviour attempting to display it as the same format as the value
  • Loading branch information
zeromus committed Jun 27, 2017
1 parent 7318c6a commit f536002
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion BizHawk.Client.Common/tools/Watch/ByteWatch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ public override string Diff
diff = "-";
}

return $"{diff}{FormatValue((byte)Math.Abs(diffVal))}";
return $"{diff}{((byte)Math.Abs(diffVal))}";
}
}

Expand Down
2 changes: 1 addition & 1 deletion BizHawk.Client.Common/tools/Watch/DwordWatch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ public string FormatValue(uint val)
/// Get a string representation of difference
/// between current value and the previous one
/// </summary>
public override string Diff => FormatValue(_previous - _value);
public override string Diff => (_previous - _value).ToString();

/// <summary>
/// Get the maximum possible value
Expand Down
2 changes: 1 addition & 1 deletion BizHawk.Client.Common/tools/Watch/WordWatch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ public override string Diff
diff = "-";
}

return $"{diff}{FormatValue((ushort)Math.Abs(diffVal))}";
return $"{diff}{((ushort)Math.Abs(diffVal))}";
}
}

Expand Down

0 comments on commit f536002

Please sign in to comment.