Disable trim ASAP if XCI can't be trimmed

This commit is contained in:
Blake 2019-11-13 13:29:41 -05:00
parent 18fb5eb3b7
commit 72fc846986

View file

@ -227,6 +227,8 @@ namespace XCI_Explorer
TB_ROMSize.Text = $"{num:0.##} {array[num2]}"; TB_ROMSize.Text = $"{num:0.##} {array[num2]}";
double num3 = UsedSize = (double)(XCI.XCI_Headers[0].CardSize2 * 512 + 512); double num3 = UsedSize = (double)(XCI.XCI_Headers[0].CardSize2 * 512 + 512);
TB_ExactUsedSpace.Text = "(" + num3.ToString() + " bytes)"; TB_ExactUsedSpace.Text = "(" + num3.ToString() + " bytes)";
if (isTrimmed())
B_TrimXCI.Enabled = false;
num2 = 0; num2 = 0;
while (num3 >= 1024.0 && num2 < array.Length - 1) while (num3 >= 1024.0 && num2 < array.Length - 1)
{ {
@ -238,9 +240,6 @@ namespace XCI_Explorer
LoadPartitions(); LoadPartitions();
LoadNCAData(); LoadNCAData();
LoadGameInfos(); LoadGameInfos();
if (isTrimmed())
B_TrimXCI.Enabled = false;
} }
// Giba's better implementation (more native) // Giba's better implementation (more native)