Use P# format instead of custom

This commit is contained in:
YoshiRulz 2021-11-18 18:46:35 +10:00
parent 51e8ef94d0
commit d3b7e3fe0d
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
3 changed files with 4 additions and 6 deletions

View File

@ -317,9 +317,7 @@ namespace BizHawk.Client.EmuHawk
public void TbScanlineIntensity_Scroll(object sender, EventArgs e)
{
_config.TargetScanlineFilterIntensity = tbScanlineIntensity.Value;
int scanlines = _config.TargetScanlineFilterIntensity;
float percentage = (float) scanlines / 256 * 100;
lblScanlines.Text = $"{percentage:F2}%";
lblScanlines.Text = $"{_config.TargetScanlineFilterIntensity / 256.0:P2}";
}
private void TrackBarFrameSizeWindowed_ValueChanged(object sender, EventArgs e)

View File

@ -34,7 +34,7 @@ namespace BizHawk.Client.EmuHawk
var rewinder = _getRewinder();
if (rewinder?.Active == true)
{
FullnessLabel.Text = $"{rewinder.FullnessRatio * 100:0.00}%";
FullnessLabel.Text = $"{rewinder.FullnessRatio:P2}";
RewindFramesUsedLabel.Text = rewinder.Count.ToString();
_avgStateSize = rewinder.Size * rewinder.FullnessRatio / rewinder.Count;
}

View File

@ -172,7 +172,7 @@ namespace BizHawk.Client.EmuHawk
var lvi = _listContents[idx++] = new string[13];
lvi[0] = $"{addr:X8}";
lvi[1] = scope;
lvi[2] = $"{total / (float) dataA.Length * 100f:0.00}%";
lvi[2] = $"{total / (float) dataA.Length:P2}";
if (tsbViewStyle.SelectedIndex == 2)
lvi[3] = $"{total / 1024.0f:0.00}";
else
@ -188,7 +188,7 @@ namespace BizHawk.Client.EmuHawk
for (int i = 0; i < 8; i++)
{
if (tsbViewStyle.SelectedIndex == 0)
lvi[5 + i] = $"{totals[i] / (float) dataA.Length * 100f:0.00}%";
lvi[5 + i] = $"{totals[i] / (float) dataA.Length:P2}";
if (tsbViewStyle.SelectedIndex == 1)
lvi[5 + i] = $"{totals[i]}";
if (tsbViewStyle.SelectedIndex == 2)