[Stats] Recorrect stats output

This commit is contained in:
Matt Nadareski
2016-06-29 13:19:14 -07:00
parent c41c171b13
commit 7220828aee
3 changed files with 14 additions and 20 deletions

View File

@@ -8,6 +8,7 @@ namespace SabreTools.Helper
/// The current toolset version to be used by all child applications
/// </summary>
public static string Version = "v0.8.9";
public static int HeaderHeight = 3;
// 0-byte file constants
public static long SizeZero = 0;

View File

@@ -132,23 +132,15 @@ Please check the log folder if the stats scrolled offscreen");
}
SortedDictionary<string, List<Rom>> newroms = DatTools.BucketByGame(datdata.Roms, false, true, logger, false);
string line = " Uncompressed size: " + Style.GetBytesReadable(datdata.TotalSize);
logger.Log(line, Console.CursorTop, 0);
line = " Games found: " + (game == -1 ? newroms.Count : game);
logger.Log(line, Console.CursorTop + 1, 0);
line = " Roms found: " + datdata.RomCount;
logger.Log(line, Console.CursorTop + 1, 0);
line = " Disks found: " + datdata.DiskCount;
logger.Log(line, Console.CursorTop + 1, 0);
line = " Roms with CRC: " + datdata.CRCCount;
logger.Log(line, Console.CursorTop + 1, 0);
line = " Roms with MD5: " + datdata.MD5Count;
logger.Log(line, Console.CursorTop + 1, 0);
line = " Roms with SHA-1: " + datdata.SHA1Count;
logger.Log(line, Console.CursorTop + 1, 0);
line = " Roms with Nodump status: " + datdata.NodumpCount;
logger.Log(line, Console.CursorTop + 1, 0);
logger.User("");
logger.User(" Uncompressed size: " + Style.GetBytesReadable(datdata.TotalSize) + @"
Games found: " + (game == -1 ? newroms.Count : game) + @"
Roms found: " + datdata.RomCount + @"
Disks found: " + datdata.DiskCount + @"
Roms with CRC: " + datdata.CRCCount + @"
Roms with MD5: " + datdata.MD5Count + @"
Roms with SHA-1: " + datdata.SHA1Count + @"
Roms with Nodump status: " + datdata.NodumpCount + @"
");
}
}
}

View File

@@ -339,9 +339,10 @@ namespace SabreTools
}
}
// Now output the stats for the DAT (remaining)
Console.SetCursorPosition(0, Console.CursorTop - 2);
_logger.User("Stats of the matched ROMs:".PadRight(79, ' '));
// Now output the stats for the built files
_logger.ClearBeneath(Constants.HeaderHeight);
Console.SetCursorPosition(0, Constants.HeaderHeight + 1);
_logger.User("Stats of the matched ROMs:");
Stats.OutputStats(_matched, _logger, true);
return success;