From d536cc8ae6d6725780365d858f2fd64b66d90b7f Mon Sep 17 00:00:00 2001 From: Wunk Date: Wed, 16 Nov 2022 14:27:42 -0800 Subject: Update units of memory from decimal to binary prefixes (#3716) `MB` and `GB` can either be interpreted as having base-10 units, or base-2. `MiB` and `GiB` removes this discrepancy so that units of memory are always interpreted using base-2 units. --- Ryujinx.Ava/Ui/Models/FileSizeSortComparer.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'Ryujinx.Ava/Ui/Models/FileSizeSortComparer.cs') diff --git a/Ryujinx.Ava/Ui/Models/FileSizeSortComparer.cs b/Ryujinx.Ava/Ui/Models/FileSizeSortComparer.cs index 4005f328..d4ac1412 100644 --- a/Ryujinx.Ava/Ui/Models/FileSizeSortComparer.cs +++ b/Ryujinx.Ava/Ui/Models/FileSizeSortComparer.cs @@ -10,22 +10,22 @@ namespace Ryujinx.Ava.Ui.Models string aValue = (x as ApplicationData).TimePlayed; string bValue = (y as ApplicationData).TimePlayed; - if (aValue[^2..] == "GB") + if (aValue[^3..] == "GiB") { - aValue = (float.Parse(aValue[0..^2]) * 1024).ToString(); + aValue = (float.Parse(aValue[0..^3]) * 1024).ToString(); } else { - aValue = aValue[0..^2]; + aValue = aValue[0..^3]; } - if (bValue[^2..] == "GB") + if (bValue[^3..] == "GiB") { - bValue = (float.Parse(bValue[0..^2]) * 1024).ToString(); + bValue = (float.Parse(bValue[0..^3]) * 1024).ToString(); } else { - bValue = bValue[0..^2]; + bValue = bValue[0..^3]; } if (float.Parse(aValue) > float.Parse(bValue)) -- cgit v1.2.3